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

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

Quest for Power 2 - create an army to conquor the evil warlords.swf

This is the info page for
Flash #90807

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


Text
Paused

GET
READY!

Level 1

Loading please wait

G

There will be another time Arthur when
you can be king!

GAME OVER!

GAME COMPLETE!

000000

Submit
score

Enter
name:

sgss

More Games

Restart Game

Restart Game

YOUR SCORE IS

Score submitted!

They are defeated!

The land is yours sire

The kingdom is yours sire

Archers have faster firing

Use left/right arrows keys, a/s/d keys or move the mouse
to the edge of the game screen and click to scroll.  Use +/-
to ZOOM the screen in/out. Use the up/down arrow keys
to aim the cannon up/down, and space bar to fire!

Basic Controls

Level 14: Sherwood Forest

King eldwood

EXPLOSIVE GAMES

Catapult

0000 yds

Click and hold on catapult
then move mouse pointer
to right of catapult to set distance.

Range

0000 yds

Start Game

Elmet

Lindsey

Play Game

Back

Back

England 880A.D.

Level 1

Wessex

Cornwall

Sussex

Kent

Luitcoyt

Mercia

Lindsey

Elmet

Wales

Anglia

Low defenses

Ollaf the boneless

Ruler:

Defenses:

00

00

Welcome Arthur to your quest for power!

Arthur

x1

x1

x2

x2

x3

x3

x4

x4

Fortifications

Troops

Spells

x1

x2

x3

x4

Level

Score

00

000000

Gold

0000

TOTAL SCORE:

+Money Bonus:

0000

0000

+Time Bonus:

0000

And so Arthur vanquished Morgan le Fay and reclaimed

his KINGDOM!

Our story continues..

Once Arthur defeated the kings and
queens and became king, a magical
castle was built where he would rule
called Camelot! Many years passed and
Arthur became a man, the land was at
peace, until one day..

Strange creatures where seen in the
forests...Tales came from afar of hideous
monsters of old were returning....

....Then news from the mountains in the
north came of a huge evil castle had
appeared over night!

Once more war will will be upon these lands! Arthur and his trusty knights are
called again in their....

Quest for
Power

II

*requires cookies enabled

Add this to your site

New Game

New Game

How to play

How to play

Controls

Controls

Highscores

Highscores

More games

More games

Load Game

Load Game

M

FLASHGAMEMAKER.

com

Www.arcadebomb.com

PLAY MORE GAMES

Game concept, and development copyright 2009 Phil Maxey  Music by Nick Perrin

Save your kingdom, Arthur! Create an
army to conquor the evil warlords!
There are 10 lands to defeat! Use your
gold to buy troops and fortifications.
Click the left and right arrows below to
learn more !

As Arthur you will stay at your post and
command your soldiers, but beware the
enemy does not get to you, for if your
life force is diminished it shall be game
over! Luckily you have a trusty sword to
defend yourself with!

Your most powerful weapon is your Cannon
Use it to fire boulders at your enemy! It is
also the best weapon you have for destroying
your enemies castle and towers! You can
upgrade your cannon to fire deadly cannon
balls with a spell!

The cannon is controlled by keyboard. Use
up and down arrow keys to rotate the
Cannon upwards or downwards, then use the
space bar to fire. Each cannon boulder shot
uses 2 pieces of gold, each cannonball shot
uses 4 pieces of gold.

You have 6 trusty soldiers to call upon! Each
with their own unique qualities. Once you have
the required gold you can hire them by clicking
on their icon, apart from the archer and wizard
which is bought by being dragged onto the game
area. Archers and wizards can only be dropped
on your own territory, and will automatically
fire when an enemy is in range!

You can build walls, and towers! There
are 3 building blocks you can use. A
wooden block, a stone block and a
wooden plank used to create a roof or
floor. Archers and wizards can be placed
high on these for a good defence!

Be mindful that you can only build on
your own territory! This is marked out
by the enemies flag roughly half way
between you and the enemy king. You
can build to the left of this flag, but not
further.

Apart from boulders you can also upgrade
your cannon to fire cannon balls which
explode on impact!
Boulders = 2 Gold
Cannon balls = 4 Gold

There are 3 magical scrolls that can be
bought. The first upgrades your cannon
to fire cannon balls. The 2nd gives your
soldiers a magical shield for a limited
time, and the 3rd increases the rate at
which your gold increases.

There are 5 rulers to defeat! Each ruler
has different defences and attack
strategies so learn which is the best
course to win the day! Good luck
Arthur!

Instructions

* Quest For Power is controlled via mouse or keyboard.
* Scroll the screen by moving the mouse to the edge of the screen and clicking, or by pressing the
left/arrow keys or the a/s keys. Zoom the screen out/in by pressing "-" or "+", or to zoom all the way out
press "0" or all the way in with "9".
* Aim the cannon by using the up/down arrow keys, and space bar to fire.
* Soldiers are bought by clicking on their icon once you have the required gold. Archers, wizards and
building materials (wooden block, wooden planks and stone blocks) are bought by pressing the mouse
button and holding, then dragging the item to the game area. These can also be re-selected and re-
positioned if required after they are bought.

Controls

High scores

name1

score1

1.

name1

score1

2.

name1

score1

3.

name1

score1

4.

name1

score1

5.

name1

score1

6.

name1

score1

7.

name1

score1

8.

name1

score1

9.

name1

score1

10.

name1

score1

11.

name1

score1

12.

name1

score1

13.

name1

score1

14.

name1

score1

15.

name1

score1

16.

name1

score1

17.

name1

score1

18.

name1

score1

19.

name1

score1

20.

name1

score1

21.

name1

score1

22.

name1

score1

23.

name1

score1

24.

name1

score1

25.

name1

score1

26.

name1

score1

27.

name1

score1

28.

name1

score1

29.

name1

score1

30.

ActionScript [AS3]

Section 1
//b2CircleDef (Box2D.Collision.Shapes.b2CircleDef) package Box2D.Collision.Shapes { import Box2D.Common.Math.*; public class b2CircleDef extends b2ShapeDef { public var localPosition:b2Vec2; public var radius:Number; public function b2CircleDef(){ localPosition = new b2Vec2(0, 0); super(); type = b2Shape.e_circleShape; radius = 1; } } }//package Box2D.Collision.Shapes
Section 2
//b2CircleShape (Box2D.Collision.Shapes.b2CircleShape) package Box2D.Collision.Shapes { import Box2D.Common.Math.*; import Box2D.Collision.*; import Box2D.Common.*; public class b2CircleShape extends b2Shape { public var m_radius:Number; public var m_localPosition:b2Vec2; public function b2CircleShape(_arg1:b2ShapeDef){ var _local2:b2CircleDef; m_localPosition = new b2Vec2(); super(_arg1); _local2 = (_arg1 as b2CircleDef); m_type = e_circleShape; m_localPosition.SetV(_local2.localPosition); m_radius = _local2.radius; } override public function TestPoint(_arg1:b2XForm, _arg2:b2Vec2):Boolean{ var _local3:b2Mat22; var _local4:Number; var _local5:Number; _local3 = _arg1.R; _local4 = (_arg1.position.x + ((_local3.col1.x * m_localPosition.x) + (_local3.col2.x * m_localPosition.y))); _local5 = (_arg1.position.y + ((_local3.col1.y * m_localPosition.x) + (_local3.col2.y * m_localPosition.y))); _local4 = (_arg2.x - _local4); _local5 = (_arg2.y - _local5); return ((((_local4 * _local4) + (_local5 * _local5)) <= (m_radius * m_radius))); } public function GetLocalPosition():b2Vec2{ return (m_localPosition); } override public function TestSegment(_arg1:b2XForm, _arg2:Array, _arg3:b2Vec2, _arg4:b2Segment, _arg5:Number):Boolean{ var _local6:b2Mat22; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; _local6 = _arg1.R; _local7 = (_arg1.position.x + ((_local6.col1.x * m_localPosition.x) + (_local6.col2.x * m_localPosition.y))); _local8 = (_arg1.position.x + ((_local6.col1.y * m_localPosition.x) + (_local6.col2.y * m_localPosition.y))); _local9 = (_arg4.p1.x - _local7); _local10 = (_arg4.p1.y - _local8); _local11 = (((_local9 * _local9) + (_local10 * _local10)) - (m_radius * m_radius)); if (_local11 < 0){ return (false); }; _local12 = (_arg4.p2.x - _arg4.p1.x); _local13 = (_arg4.p2.y - _arg4.p1.y); _local14 = ((_local9 * _local12) + (_local10 * _local13)); _local15 = ((_local12 * _local12) + (_local13 * _local13)); _local16 = ((_local14 * _local14) - (_local15 * _local11)); if ((((_local16 < 0)) || ((_local15 < Number.MIN_VALUE)))){ return (false); }; _local17 = -((_local14 + Math.sqrt(_local16))); if ((((0 <= _local17)) && ((_local17 <= (_arg5 * _local15))))){ _local17 = (_local17 / _local15); _arg2[0] = _local17; _arg3.x = (_local9 + (_local17 * _local12)); _arg3.y = (_local10 + (_local17 * _local13)); _arg3.Normalize(); return (true); }; return (false); } override public function ComputeMass(_arg1:b2MassData):void{ _arg1.mass = (((m_density * b2Settings.b2_pi) * m_radius) * m_radius); _arg1.center.SetV(m_localPosition); _arg1.I = (_arg1.mass * (((0.5 * m_radius) * m_radius) + ((m_localPosition.x * m_localPosition.x) + (m_localPosition.y * m_localPosition.y)))); } override public function ComputeSweptAABB(_arg1:b2AABB, _arg2:b2XForm, _arg3:b2XForm):void{ var _local4:b2Mat22; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; _local4 = _arg2.R; _local5 = (_arg2.position.x + ((_local4.col1.x * m_localPosition.x) + (_local4.col2.x * m_localPosition.y))); _local6 = (_arg2.position.y + ((_local4.col1.y * m_localPosition.x) + (_local4.col2.y * m_localPosition.y))); _local4 = _arg3.R; _local7 = (_arg3.position.x + ((_local4.col1.x * m_localPosition.x) + (_local4.col2.x * m_localPosition.y))); _local8 = (_arg3.position.y + ((_local4.col1.y * m_localPosition.x) + (_local4.col2.y * m_localPosition.y))); _arg1.lowerBound.Set((((_local5 < _local7)) ? _local5 : _local7 - m_radius), (((_local6 < _local8)) ? _local6 : _local8 - m_radius)); _arg1.upperBound.Set((((_local5 > _local7)) ? _local5 : _local7 + m_radius), (((_local6 > _local8)) ? _local6 : _local8 + m_radius)); } public function GetRadius():Number{ return (m_radius); } override public function UpdateSweepRadius(_arg1:b2Vec2):void{ var _local2:Number; var _local3:Number; _local2 = (m_localPosition.x - _arg1.x); _local3 = (m_localPosition.y - _arg1.y); _local2 = Math.sqrt(((_local2 * _local2) + (_local3 * _local3))); m_sweepRadius = ((_local2 + m_radius) - b2Settings.b2_toiSlop); } override public function ComputeAABB(_arg1:b2AABB, _arg2:b2XForm):void{ var _local3:b2Mat22; var _local4:Number; var _local5:Number; _local3 = _arg2.R; _local4 = (_arg2.position.x + ((_local3.col1.x * m_localPosition.x) + (_local3.col2.x * m_localPosition.y))); _local5 = (_arg2.position.y + ((_local3.col1.y * m_localPosition.x) + (_local3.col2.y * m_localPosition.y))); _arg1.lowerBound.Set((_local4 - m_radius), (_local5 - m_radius)); _arg1.upperBound.Set((_local4 + m_radius), (_local5 + m_radius)); } } }//package Box2D.Collision.Shapes
Section 3
//b2FilterData (Box2D.Collision.Shapes.b2FilterData) package Box2D.Collision.Shapes { public class b2FilterData { public var maskBits:uint;// = 0xFFFF public var groupIndex:int;// = 0 public var categoryBits:uint;// = 1 public function b2FilterData(){ categoryBits = 1; maskBits = 0xFFFF; groupIndex = 0; super(); } public function Copy():b2FilterData{ var _local1:b2FilterData; _local1 = new b2FilterData(); _local1.categoryBits = categoryBits; _local1.maskBits = maskBits; _local1.groupIndex = groupIndex; return (_local1); } } }//package Box2D.Collision.Shapes
Section 4
//b2MassData (Box2D.Collision.Shapes.b2MassData) package Box2D.Collision.Shapes { import Box2D.Common.Math.*; public class b2MassData { public var mass:Number;// = 0 public var center:b2Vec2; public var I:Number;// = 0 public function b2MassData(){ mass = 0; center = new b2Vec2(0, 0); I = 0; super(); } } }//package Box2D.Collision.Shapes
Section 5
//b2PolygonDef (Box2D.Collision.Shapes.b2PolygonDef) package Box2D.Collision.Shapes { import Box2D.Common.Math.*; import Box2D.Common.*; public class b2PolygonDef extends b2ShapeDef { public var vertexCount:int; public var vertices:Array; private static var s_mat:b2Mat22 = new b2Mat22(); public function b2PolygonDef(){ var _local1:int; vertices = new Array(b2Settings.b2_maxPolygonVertices); super(); type = b2Shape.e_polygonShape; vertexCount = 0; _local1 = 0; while (_local1 < b2Settings.b2_maxPolygonVertices) { vertices[_local1] = new b2Vec2(); _local1++; }; } public function SetAsOrientedBox(_arg1:Number, _arg2:Number, _arg3:b2Vec2=null, _arg4:Number=0):void{ var _local5:b2Vec2; var _local6:b2Mat22; var _local7:int; vertexCount = 4; vertices[0].Set(-(_arg1), -(_arg2)); vertices[1].Set(_arg1, -(_arg2)); vertices[2].Set(_arg1, _arg2); vertices[3].Set(-(_arg1), _arg2); if (_arg3){ _local5 = _arg3; _local6 = s_mat; _local6.Set(_arg4); _local7 = 0; while (_local7 < vertexCount) { _arg3 = vertices[_local7]; _arg1 = (_local5.x + ((_local6.col1.x * _arg3.x) + (_local6.col2.x * _arg3.y))); _arg3.y = (_local5.y + ((_local6.col1.y * _arg3.x) + (_local6.col2.y * _arg3.y))); _arg3.x = _arg1; _local7++; }; }; } public function SetAsBox(_arg1:Number, _arg2:Number):void{ vertexCount = 4; vertices[0].Set(-(_arg1), -(_arg2)); vertices[1].Set(_arg1, -(_arg2)); vertices[2].Set(_arg1, _arg2); vertices[3].Set(-(_arg1), _arg2); } } }//package Box2D.Collision.Shapes
Section 6
//b2PolygonShape (Box2D.Collision.Shapes.b2PolygonShape) package Box2D.Collision.Shapes { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Collision.*; import Box2D.Common.*; public class b2PolygonShape extends b2Shape { public var m_vertices:Array; public var m_normals:Array; private var s_supportVec:b2Vec2; public var m_obb:b2OBB; public var m_coreVertices:Array; public var m_centroid:b2Vec2; public var m_vertexCount:int; private static var s_computeMat:b2Mat22 = new b2Mat22(); private static var s_sweptAABB1:b2AABB = new b2AABB(); private static var s_sweptAABB2:b2AABB = new b2AABB(); public function b2PolygonShape(_arg1:b2ShapeDef){ var _local2:b2PolygonDef; var _local3:int; var _local4:int; var _local5:int; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; s_supportVec = new b2Vec2(); m_obb = new b2OBB(); m_vertices = new Array(b2Settings.b2_maxPolygonVertices); m_normals = new Array(b2Settings.b2_maxPolygonVertices); m_coreVertices = new Array(b2Settings.b2_maxPolygonVertices); super(_arg1); m_type = e_polygonShape; _local2 = (_arg1 as b2PolygonDef); m_vertexCount = _local2.vertexCount; _local4 = _local3; _local5 = _local3; _local3 = 0; while (_local3 < m_vertexCount) { m_vertices[_local3] = _local2.vertices[_local3].Copy(); _local3++; }; _local3 = 0; while (_local3 < m_vertexCount) { _local4 = _local3; _local5 = (((_local3 + 1) < m_vertexCount)) ? (_local3 + 1) : 0; _local6 = (m_vertices[_local5].x - m_vertices[_local4].x); _local7 = (m_vertices[_local5].y - m_vertices[_local4].y); _local8 = Math.sqrt(((_local6 * _local6) + (_local7 * _local7))); m_normals[_local3] = new b2Vec2((_local7 / _local8), (-(_local6) / _local8)); _local3++; }; m_centroid = ComputeCentroid(_local2.vertices, _local2.vertexCount); ComputeOBB(m_obb, m_vertices, m_vertexCount); _local3 = 0; while (_local3 < m_vertexCount) { _local4 = (((_local3 - 1) >= 0)) ? (_local3 - 1) : (m_vertexCount - 1); _local5 = _local3; _local9 = m_normals[_local4].x; _local10 = m_normals[_local4].y; _local11 = m_normals[_local5].x; _local12 = m_normals[_local5].y; _local13 = (m_vertices[_local3].x - m_centroid.x); _local14 = (m_vertices[_local3].y - m_centroid.y); _local15 = (((_local9 * _local13) + (_local10 * _local14)) - b2Settings.b2_toiSlop); _local16 = (((_local11 * _local13) + (_local12 * _local14)) - b2Settings.b2_toiSlop); _local17 = (1 / ((_local9 * _local12) - (_local10 * _local11))); m_coreVertices[_local3] = new b2Vec2(((_local17 * ((_local12 * _local15) - (_local10 * _local16))) + m_centroid.x), ((_local17 * ((_local9 * _local16) - (_local11 * _local15))) + m_centroid.y)); _local3++; }; } override public function TestPoint(_arg1:b2XForm, _arg2:b2Vec2):Boolean{ var _local3:b2Vec2; var _local4:b2Mat22; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:int; var _local10:Number; _local4 = _arg1.R; _local5 = (_arg2.x - _arg1.position.x); _local6 = (_arg2.y - _arg1.position.y); _local7 = ((_local5 * _local4.col1.x) + (_local6 * _local4.col1.y)); _local8 = ((_local5 * _local4.col2.x) + (_local6 * _local4.col2.y)); _local9 = 0; while (_local9 < m_vertexCount) { _local3 = m_vertices[_local9]; _local5 = (_local7 - _local3.x); _local6 = (_local8 - _local3.y); _local3 = m_normals[_local9]; _local10 = ((_local3.x * _local5) + (_local3.y * _local6)); if (_local10 > 0){ return (false); }; _local9++; }; return (true); } public function GetCoreVertices():Array{ return (m_coreVertices); } override public function TestSegment(_arg1:b2XForm, _arg2:Array, _arg3:b2Vec2, _arg4:b2Segment, _arg5:Number):Boolean{ var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:b2Mat22; var _local11:b2Vec2; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:int; var _local19:int; var _local20:Number; var _local21:Number; _local6 = 0; _local7 = _arg5; _local8 = (_arg4.p1.x - _arg1.position.x); _local9 = (_arg4.p1.y - _arg1.position.y); _local10 = _arg1.R; _local12 = ((_local8 * _local10.col1.x) + (_local9 * _local10.col1.y)); _local13 = ((_local8 * _local10.col2.x) + (_local9 * _local10.col2.y)); _local8 = (_arg4.p2.x - _arg1.position.x); _local9 = (_arg4.p2.y - _arg1.position.y); _local10 = _arg1.R; _local14 = ((_local8 * _local10.col1.x) + (_local9 * _local10.col1.y)); _local15 = ((_local8 * _local10.col2.x) + (_local9 * _local10.col2.y)); _local16 = (_local14 - _local12); _local17 = (_local15 - _local13); _local18 = -1; _local19 = 0; while (_local19 < m_vertexCount) { _local11 = m_vertices[_local19]; _local8 = (_local11.x - _local12); _local9 = (_local11.y - _local13); _local11 = m_normals[_local19]; _local20 = ((_local11.x * _local8) + (_local11.y * _local9)); _local21 = ((_local11.x * _local16) + (_local11.y * _local17)); if ((((_local21 < 0)) && ((_local20 < (_local6 * _local21))))){ _local6 = (_local20 / _local21); _local18 = _local19; } else { if ((((_local21 > 0)) && ((_local20 < (_local7 * _local21))))){ _local7 = (_local20 / _local21); }; }; if (_local7 < _local6){ return (false); }; _local19++; }; if (_local18 >= 0){ _arg2[0] = _local6; _local10 = _arg1.R; _local11 = m_normals[_local18]; _arg3.x = ((_local10.col1.x * _local11.x) + (_local10.col2.x * _local11.y)); _arg3.y = ((_local10.col1.y * _local11.x) + (_local10.col2.y * _local11.y)); return (true); }; return (false); } public function GetCentroid():b2Vec2{ return (m_centroid); } override public function ComputeMass(_arg1:b2MassData):void{ var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:int; var _local10:b2Vec2; var _local11:b2Vec2; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:Number; var _local21:Number; var _local22:Number; var _local23:Number; var _local24:Number; var _local25:Number; _local2 = 0; _local3 = 0; _local4 = 0; _local5 = 0; _local6 = 0; _local7 = 0; _local8 = (1 / 3); _local9 = 0; while (_local9 < m_vertexCount) { _local10 = m_vertices[_local9]; _local11 = (((_local9 + 1) < m_vertexCount)) ? m_vertices[int((_local9 + 1))] : m_vertices[0]; _local12 = (_local10.x - _local6); _local13 = (_local10.y - _local7); _local14 = (_local11.x - _local6); _local15 = (_local11.y - _local7); _local16 = ((_local12 * _local15) - (_local13 * _local14)); _local17 = (0.5 * _local16); _local4 = (_local4 + _local17); _local2 = (_local2 + ((_local17 * _local8) * ((_local6 + _local10.x) + _local11.x))); _local3 = (_local3 + ((_local17 * _local8) * ((_local7 + _local10.y) + _local11.y))); _local18 = _local6; _local19 = _local7; _local20 = _local12; _local21 = _local13; _local22 = _local14; _local23 = _local15; _local24 = ((_local8 * ((0.25 * (((_local20 * _local20) + (_local22 * _local20)) + (_local22 * _local22))) + ((_local18 * _local20) + (_local18 * _local22)))) + ((0.5 * _local18) * _local18)); _local25 = ((_local8 * ((0.25 * (((_local21 * _local21) + (_local23 * _local21)) + (_local23 * _local23))) + ((_local19 * _local21) + (_local19 * _local23)))) + ((0.5 * _local19) * _local19)); _local5 = (_local5 + (_local16 * (_local24 + _local25))); _local9++; }; _arg1.mass = (m_density * _local4); _local2 = (_local2 * (1 / _local4)); _local3 = (_local3 * (1 / _local4)); _arg1.center.Set(_local2, _local3); _arg1.I = (m_density * _local5); } public function Support(_arg1:b2XForm, _arg2:Number, _arg3:Number):b2Vec2{ var _local4:b2Vec2; var _local5:b2Mat22; var _local6:Number; var _local7:Number; var _local8:int; var _local9:Number; var _local10:int; var _local11:Number; _local5 = _arg1.R; _local6 = ((_arg2 * _local5.col1.x) + (_arg3 * _local5.col1.y)); _local7 = ((_arg2 * _local5.col2.x) + (_arg3 * _local5.col2.y)); _local8 = 0; _local4 = m_coreVertices[0]; _local9 = ((_local4.x * _local6) + (_local4.y * _local7)); _local10 = 1; while (_local10 < m_vertexCount) { _local4 = m_coreVertices[_local10]; _local11 = ((_local4.x * _local6) + (_local4.y * _local7)); if (_local11 > _local9){ _local8 = _local10; _local9 = _local11; }; _local10++; }; _local5 = _arg1.R; _local4 = m_coreVertices[_local8]; s_supportVec.x = (_arg1.position.x + ((_local5.col1.x * _local4.x) + (_local5.col2.x * _local4.y))); s_supportVec.y = (_arg1.position.y + ((_local5.col1.y * _local4.x) + (_local5.col2.y * _local4.y))); return (s_supportVec); } public function GetVertexCount():int{ return (m_vertexCount); } override public function ComputeSweptAABB(_arg1:b2AABB, _arg2:b2XForm, _arg3:b2XForm):void{ var _local4:b2AABB; var _local5:b2AABB; _local4 = s_sweptAABB1; _local5 = s_sweptAABB2; ComputeAABB(_local4, _arg2); ComputeAABB(_local5, _arg3); _arg1.lowerBound.Set(((_local4.lowerBound.x < _local5.lowerBound.x)) ? _local4.lowerBound.x : _local5.lowerBound.x, ((_local4.lowerBound.y < _local5.lowerBound.y)) ? _local4.lowerBound.y : _local5.lowerBound.y); _arg1.upperBound.Set(((_local4.upperBound.x > _local5.upperBound.x)) ? _local4.upperBound.x : _local5.upperBound.x, ((_local4.upperBound.y > _local5.upperBound.y)) ? _local4.upperBound.y : _local5.upperBound.y); } public function GetVertices():Array{ return (m_vertices); } public function GetNormals():Array{ return (m_normals); } public function GetOBB():b2OBB{ return (m_obb); } public function GetFirstVertex(_arg1:b2XForm):b2Vec2{ return (b2Math.b2MulX(_arg1, m_coreVertices[0])); } public function Centroid(_arg1:b2XForm):b2Vec2{ return (b2Math.b2MulX(_arg1, m_centroid)); } override public function UpdateSweepRadius(_arg1:b2Vec2):void{ var _local2:b2Vec2; var _local3:int; var _local4:Number; var _local5:Number; m_sweepRadius = 0; _local3 = 0; while (_local3 < m_vertexCount) { _local2 = m_coreVertices[_local3]; _local4 = (_local2.x - _arg1.x); _local5 = (_local2.y - _arg1.y); _local4 = Math.sqrt(((_local4 * _local4) + (_local5 * _local5))); if (_local4 > m_sweepRadius){ m_sweepRadius = _local4; }; _local3++; }; } override public function ComputeAABB(_arg1:b2AABB, _arg2:b2XForm):void{ var _local3:b2Mat22; var _local4:b2Vec2; var _local5:b2Mat22; var _local6:b2Mat22; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; _local5 = s_computeMat; _local3 = _arg2.R; _local4 = m_obb.R.col1; _local5.col1.x = ((_local3.col1.x * _local4.x) + (_local3.col2.x * _local4.y)); _local5.col1.y = ((_local3.col1.y * _local4.x) + (_local3.col2.y * _local4.y)); _local4 = m_obb.R.col2; _local5.col2.x = ((_local3.col1.x * _local4.x) + (_local3.col2.x * _local4.y)); _local5.col2.y = ((_local3.col1.y * _local4.x) + (_local3.col2.y * _local4.y)); _local5.Abs(); _local6 = _local5; _local4 = m_obb.extents; _local7 = ((_local6.col1.x * _local4.x) + (_local6.col2.x * _local4.y)); _local8 = ((_local6.col1.y * _local4.x) + (_local6.col2.y * _local4.y)); _local3 = _arg2.R; _local4 = m_obb.center; _local9 = (_arg2.position.x + ((_local3.col1.x * _local4.x) + (_local3.col2.x * _local4.y))); _local10 = (_arg2.position.y + ((_local3.col1.y * _local4.x) + (_local3.col2.y * _local4.y))); _arg1.lowerBound.Set((_local9 - _local7), (_local10 - _local8)); _arg1.upperBound.Set((_local9 + _local7), (_local10 + _local8)); } public static function ComputeCentroid(_arg1:Array, _arg2:int):b2Vec2{ var _local3:b2Vec2; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:int; var _local9:b2Vec2; var _local10:b2Vec2; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; _local3 = new b2Vec2(); _local4 = 0; _local5 = 0; _local6 = 0; _local7 = (1 / 3); _local8 = 0; while (_local8 < _arg2) { _local9 = _arg1[_local8]; _local10 = (((_local8 + 1) < _arg2)) ? _arg1[int((_local8 + 1))] : _arg1[0]; _local11 = (_local9.x - _local5); _local12 = (_local9.y - _local6); _local13 = (_local10.x - _local5); _local14 = (_local10.y - _local6); _local15 = ((_local11 * _local14) - (_local12 * _local13)); _local16 = (0.5 * _local15); _local4 = (_local4 + _local16); _local3.x = (_local3.x + ((_local16 * _local7) * ((_local5 + _local9.x) + _local10.x))); _local3.y = (_local3.y + ((_local16 * _local7) * ((_local6 + _local9.y) + _local10.y))); _local8++; }; _local3.x = (_local3.x * (1 / _local4)); _local3.y = (_local3.y * (1 / _local4)); return (_local3); } public static function ComputeOBB(_arg1:b2OBB, _arg2:Array, _arg3:int):void{ var _local4:int; var _local5:Array; var _local6:Number; var _local7:b2Vec2; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:int; var _local18:Number; var _local19:Number; var _local20:Number; var _local21:Number; var _local22:Number; var _local23:Number; var _local24:Number; var _local25:b2Mat22; _local5 = new Array((b2Settings.b2_maxPolygonVertices + 1)); _local4 = 0; while (_local4 < _arg3) { _local5[_local4] = _arg2[_local4]; _local4++; }; _local5[_arg3] = _local5[0]; _local6 = Number.MAX_VALUE; _local4 = 1; while (_local4 <= _arg3) { _local7 = _local5[int((_local4 - 1))]; _local8 = (_local5[_local4].x - _local7.x); _local9 = (_local5[_local4].y - _local7.y); _local10 = Math.sqrt(((_local8 * _local8) + (_local9 * _local9))); _local8 = (_local8 / _local10); _local9 = (_local9 / _local10); _local11 = -(_local9); _local12 = _local8; _local13 = Number.MAX_VALUE; _local14 = Number.MAX_VALUE; _local15 = -(Number.MAX_VALUE); _local16 = -(Number.MAX_VALUE); _local17 = 0; while (_local17 < _arg3) { _local19 = (_local5[_local17].x - _local7.x); _local20 = (_local5[_local17].y - _local7.y); _local21 = ((_local8 * _local19) + (_local9 * _local20)); _local22 = ((_local11 * _local19) + (_local12 * _local20)); if (_local21 < _local13){ _local13 = _local21; }; if (_local22 < _local14){ _local14 = _local22; }; if (_local21 > _local15){ _local15 = _local21; }; if (_local22 > _local16){ _local16 = _local22; }; _local17++; }; _local18 = ((_local15 - _local13) * (_local16 - _local14)); if (_local18 < (0.95 * _local6)){ _local6 = _local18; _arg1.R.col1.x = _local8; _arg1.R.col1.y = _local9; _arg1.R.col2.x = _local11; _arg1.R.col2.y = _local12; _local23 = (0.5 * (_local13 + _local15)); _local24 = (0.5 * (_local14 + _local16)); _local25 = _arg1.R; _arg1.center.x = (_local7.x + ((_local25.col1.x * _local23) + (_local25.col2.x * _local24))); _arg1.center.y = (_local7.y + ((_local25.col1.y * _local23) + (_local25.col2.y * _local24))); _arg1.extents.x = (0.5 * (_local15 - _local13)); _arg1.extents.y = (0.5 * (_local16 - _local14)); }; _local4++; }; } } }//package Box2D.Collision.Shapes
Section 7
//b2Shape (Box2D.Collision.Shapes.b2Shape) package Box2D.Collision.Shapes { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Collision.*; public class b2Shape { public var m_type:int; public var m_sweepRadius:Number; public var m_density:Number; public var m_filter:b2FilterData; public var m_friction:Number; public var m_next:b2Shape; public var m_restitution:Number; public var m_userData; public var m_isSensor:Boolean; public var m_proxyId:uint; public var m_body:b2Body; public static const e_polygonShape:int = 1; public static const e_unknownShape:int = -1; public static const e_circleShape:int = 0; public static const e_shapeTypeCount:int = 2; private static var s_resetAABB:b2AABB = new b2AABB(); private static var s_syncAABB:b2AABB = new b2AABB(); private static var s_proxyAABB:b2AABB = new b2AABB(); public function b2Shape(_arg1:b2ShapeDef){ m_userData = _arg1.userData; m_friction = _arg1.friction; m_restitution = _arg1.restitution; m_density = _arg1.density; m_body = null; m_sweepRadius = 0; m_next = null; m_proxyId = b2Pair.b2_nullProxy; m_filter = _arg1.filter.Copy(); m_isSensor = _arg1.isSensor; } public function TestPoint(_arg1:b2XForm, _arg2:b2Vec2):Boolean{ return (false); } public function GetSweepRadius():Number{ return (m_sweepRadius); } public function GetNext():b2Shape{ return (m_next); } public function ComputeSweptAABB(_arg1:b2AABB, _arg2:b2XForm, _arg3:b2XForm):void{ } public function GetType():int{ return (m_type); } public function GetRestitution():Number{ return (m_restitution); } public function GetFriction():Number{ return (m_friction); } public function GetFilterData():b2FilterData{ return (m_filter.Copy()); } public function TestSegment(_arg1:b2XForm, _arg2:Array, _arg3:b2Vec2, _arg4:b2Segment, _arg5:Number):Boolean{ return (false); } public function RefilterProxy(_arg1:b2BroadPhase, _arg2:b2XForm):void{ var _local3:b2AABB; var _local4:Boolean; if (m_proxyId == b2Pair.b2_nullProxy){ return; }; _arg1.DestroyProxy(m_proxyId); _local3 = s_resetAABB; ComputeAABB(_local3, _arg2); _local4 = _arg1.InRange(_local3); if (_local4){ m_proxyId = _arg1.CreateProxy(_local3, this); } else { m_proxyId = b2Pair.b2_nullProxy; }; } public function SetFilterData(_arg1:b2FilterData):void{ m_filter = _arg1.Copy(); } public function GetUserData(){ return (m_userData); } public function Synchronize(_arg1:b2BroadPhase, _arg2:b2XForm, _arg3:b2XForm):Boolean{ var _local4:b2AABB; if (m_proxyId == b2Pair.b2_nullProxy){ return (false); }; _local4 = s_syncAABB; ComputeSweptAABB(_local4, _arg2, _arg3); if (_arg1.InRange(_local4)){ _arg1.MoveProxy(m_proxyId, _local4); return (true); }; return (false); } public function ComputeMass(_arg1:b2MassData):void{ } public function IsSensor():Boolean{ return (m_isSensor); } public function DestroyProxy(_arg1:b2BroadPhase):void{ if (m_proxyId != b2Pair.b2_nullProxy){ _arg1.DestroyProxy(m_proxyId); m_proxyId = b2Pair.b2_nullProxy; }; } public function UpdateSweepRadius(_arg1:b2Vec2):void{ } public function ComputeAABB(_arg1:b2AABB, _arg2:b2XForm):void{ } public function GetBody():b2Body{ return (m_body); } public function CreateProxy(_arg1:b2BroadPhase, _arg2:b2XForm):void{ var _local3:b2AABB; var _local4:Boolean; _local3 = s_proxyAABB; ComputeAABB(_local3, _arg2); _local4 = _arg1.InRange(_local3); if (_local4){ m_proxyId = _arg1.CreateProxy(_local3, this); } else { m_proxyId = b2Pair.b2_nullProxy; }; } public function SetUserData(_arg1):void{ m_userData = _arg1; } public static function Destroy(_arg1:b2Shape, _arg2):void{ } public static function Create(_arg1:b2ShapeDef, _arg2):b2Shape{ switch (_arg1.type){ case e_circleShape: return (new b2CircleShape(_arg1)); case e_polygonShape: return (new b2PolygonShape(_arg1)); default: return (null); }; } } }//package Box2D.Collision.Shapes
Section 8
//b2ShapeDef (Box2D.Collision.Shapes.b2ShapeDef) package Box2D.Collision.Shapes { public class b2ShapeDef { public var isSensor:Boolean;// = false public var density:Number;// = 0 public var type:int;// = -1 public var restitution:Number;// = 0 public var userData;// = null public var filter:b2FilterData; public var friction:Number;// = 0.2 public function b2ShapeDef(){ type = b2Shape.e_unknownShape; userData = null; friction = 0.2; restitution = 0; density = 0; isSensor = false; filter = new b2FilterData(); super(); } } }//package Box2D.Collision.Shapes
Section 9
//b2AABB (Box2D.Collision.b2AABB) package Box2D.Collision { import Box2D.Common.Math.*; public class b2AABB { public var upperBound:b2Vec2; public var lowerBound:b2Vec2; public function b2AABB(){ lowerBound = new b2Vec2(); upperBound = new b2Vec2(); super(); } public function IsValid():Boolean{ var _local1:Number; var _local2:Number; var _local3:Boolean; _local1 = (upperBound.x - lowerBound.x); _local2 = (upperBound.y - lowerBound.y); _local3 = (((_local1 >= 0)) && ((_local2 >= 0))); _local3 = ((((_local3) && (lowerBound.IsValid()))) && (upperBound.IsValid())); return (_local3); } } }//package Box2D.Collision
Section 10
//b2Bound (Box2D.Collision.b2Bound) package Box2D.Collision { public class b2Bound { public var proxyId:uint; public var stabbingCount:uint; public var value:uint; public function Swap(_arg1:b2Bound):void{ var _local2:uint; var _local3:uint; var _local4:uint; _local2 = value; _local3 = proxyId; _local4 = stabbingCount; value = _arg1.value; proxyId = _arg1.proxyId; stabbingCount = _arg1.stabbingCount; _arg1.value = _local2; _arg1.proxyId = _local3; _arg1.stabbingCount = _local4; } public function IsLower():Boolean{ return (((value & 1) == 0)); } public function IsUpper():Boolean{ return (((value & 1) == 1)); } } }//package Box2D.Collision
Section 11
//b2BoundValues (Box2D.Collision.b2BoundValues) package Box2D.Collision { public class b2BoundValues { public var lowerValues:Array; public var upperValues:Array; public function b2BoundValues(){ lowerValues = [0, 0]; upperValues = [0, 0]; super(); } } }//package Box2D.Collision
Section 12
//b2BroadPhase (Box2D.Collision.b2BroadPhase) package Box2D.Collision { import Box2D.Common.Math.*; import Box2D.Common.*; public class b2BroadPhase { public var m_quantizationFactor:b2Vec2; public var m_worldAABB:b2AABB; public var m_bounds:Array; public var m_freeProxy:uint; public var m_proxyCount:int; public var m_proxyPool:Array; public var m_queryResultCount:int; public var m_pairManager:b2PairManager; public var m_timeStamp:uint; public var m_queryResults:Array; public static const b2_nullEdge:uint = b2Settings.USHRT_MAX; public static const b2_invalid:uint = b2Settings.USHRT_MAX; public static var s_validate:Boolean = false; public function b2BroadPhase(_arg1:b2AABB, _arg2:b2PairCallback){ var _local3:int; var _local4:Number; var _local5:Number; var _local6:b2Proxy; var _local7:int; m_pairManager = new b2PairManager(); m_proxyPool = new Array(b2Settings.b2_maxPairs); m_bounds = new Array((2 * b2Settings.b2_maxProxies)); m_queryResults = new Array(b2Settings.b2_maxProxies); m_quantizationFactor = new b2Vec2(); super(); m_pairManager.Initialize(this, _arg2); m_worldAABB = _arg1; m_proxyCount = 0; _local3 = 0; while (_local3 < b2Settings.b2_maxProxies) { m_queryResults[_local3] = 0; _local3++; }; m_bounds = new Array(2); _local3 = 0; while (_local3 < 2) { m_bounds[_local3] = new Array((2 * b2Settings.b2_maxProxies)); _local7 = 0; while (_local7 < (2 * b2Settings.b2_maxProxies)) { m_bounds[_local3][_local7] = new b2Bound(); _local7++; }; _local3++; }; _local4 = (_arg1.upperBound.x - _arg1.lowerBound.x); _local5 = (_arg1.upperBound.y - _arg1.lowerBound.y); m_quantizationFactor.x = (b2Settings.USHRT_MAX / _local4); m_quantizationFactor.y = (b2Settings.USHRT_MAX / _local5); _local3 = 0; while (_local3 < (b2Settings.b2_maxProxies - 1)) { _local6 = new b2Proxy(); m_proxyPool[_local3] = _local6; _local6.SetNext((_local3 + 1)); _local6.timeStamp = 0; _local6.overlapCount = b2_invalid; _local6.userData = null; _local3++; }; _local6 = new b2Proxy(); m_proxyPool[int((b2Settings.b2_maxProxies - 1))] = _local6; _local6.SetNext(b2Pair.b2_nullProxy); _local6.timeStamp = 0; _local6.overlapCount = b2_invalid; _local6.userData = null; m_freeProxy = 0; m_timeStamp = 1; m_queryResultCount = 0; } public function QueryAABB(_arg1:b2AABB, _arg2, _arg3:int):int{ var _local4:Array; var _local5:Array; var _local6:uint; var _local7:uint; var _local8:Array; var _local9:Array; var _local10:int; var _local11:int; var _local12:b2Proxy; _local4 = new Array(); _local5 = new Array(); ComputeBounds(_local4, _local5, _arg1); _local8 = [_local6]; _local9 = [_local7]; Query(_local8, _local9, _local4[0], _local5[0], m_bounds[0], (2 * m_proxyCount), 0); Query(_local8, _local9, _local4[1], _local5[1], m_bounds[1], (2 * m_proxyCount), 1); _local10 = 0; _local11 = 0; while ((((_local11 < m_queryResultCount)) && ((_local10 < _arg3)))) { _local12 = m_proxyPool[m_queryResults[_local11]]; _arg2[_local11] = _local12.userData; _local11++; _local10++; }; m_queryResultCount = 0; IncrementTimeStamp(); return (_local10); } public function Commit():void{ m_pairManager.Commit(); } public function GetProxy(_arg1:int):b2Proxy{ var _local2:b2Proxy; _local2 = m_proxyPool[_arg1]; if ((((_arg1 == b2Pair.b2_nullProxy)) || ((_local2.IsValid() == false)))){ return (null); }; return (_local2); } private function IncrementTimeStamp():void{ var _local1:uint; if (m_timeStamp == b2Settings.USHRT_MAX){ _local1 = 0; while (_local1 < b2Settings.b2_maxProxies) { (m_proxyPool[_local1] as b2Proxy).timeStamp = 0; _local1++; }; m_timeStamp = 1; } else { m_timeStamp++; }; } private function Query(_arg1:Array, _arg2:Array, _arg3:uint, _arg4:uint, _arg5:Array, _arg6:uint, _arg7:int):void{ var _local8:uint; var _local9:uint; var _local10:b2Bound; var _local11:uint; var _local12:int; var _local13:int; var _local14:b2Proxy; _local8 = BinarySearch(_arg5, _arg6, _arg3); _local9 = BinarySearch(_arg5, _arg6, _arg4); _local11 = _local8; while (_local11 < _local9) { _local10 = _arg5[_local11]; if (_local10.IsLower()){ IncrementOverlapCount(_local10.proxyId); }; _local11++; }; if (_local8 > 0){ _local12 = (_local8 - 1); _local10 = _arg5[_local12]; _local13 = _local10.stabbingCount; while (_local13) { _local10 = _arg5[_local12]; if (_local10.IsLower()){ _local14 = m_proxyPool[_local10.proxyId]; if (_local8 <= _local14.upperBounds[_arg7]){ IncrementOverlapCount(_local10.proxyId); _local13--; }; }; _local12--; }; }; _arg1[0] = _local8; _arg2[0] = _local9; } private function TestOverlapValidate(_arg1:b2Proxy, _arg2:b2Proxy):Boolean{ var _local3:int; var _local4:Array; var _local5:b2Bound; var _local6:b2Bound; _local3 = 0; while (_local3 < 2) { _local4 = m_bounds[_local3]; _local5 = _local4[_arg1.lowerBounds[_local3]]; _local6 = _local4[_arg2.upperBounds[_local3]]; if (_local5.value > _local6.value){ return (false); }; _local5 = _local4[_arg1.upperBounds[_local3]]; _local6 = _local4[_arg2.lowerBounds[_local3]]; if (_local5.value < _local6.value){ return (false); }; _local3++; }; return (true); } private function ComputeBounds(_arg1:Array, _arg2:Array, _arg3:b2AABB):void{ var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; _local4 = _arg3.lowerBound.x; _local5 = _arg3.lowerBound.y; _local4 = b2Math.b2Min(_local4, m_worldAABB.upperBound.x); _local5 = b2Math.b2Min(_local5, m_worldAABB.upperBound.y); _local4 = b2Math.b2Max(_local4, m_worldAABB.lowerBound.x); _local5 = b2Math.b2Max(_local5, m_worldAABB.lowerBound.y); _local6 = _arg3.upperBound.x; _local7 = _arg3.upperBound.y; _local6 = b2Math.b2Min(_local6, m_worldAABB.upperBound.x); _local7 = b2Math.b2Min(_local7, m_worldAABB.upperBound.y); _local6 = b2Math.b2Max(_local6, m_worldAABB.lowerBound.x); _local7 = b2Math.b2Max(_local7, m_worldAABB.lowerBound.y); _arg1[0] = (uint((m_quantizationFactor.x * (_local4 - m_worldAABB.lowerBound.x))) & (b2Settings.USHRT_MAX - 1)); _arg2[0] = ((uint((m_quantizationFactor.x * (_local6 - m_worldAABB.lowerBound.x))) & 0xFFFF) | 1); _arg1[1] = (uint((m_quantizationFactor.y * (_local5 - m_worldAABB.lowerBound.y))) & (b2Settings.USHRT_MAX - 1)); _arg2[1] = ((uint((m_quantizationFactor.y * (_local7 - m_worldAABB.lowerBound.y))) & 0xFFFF) | 1); } public function CreateProxy(_arg1:b2AABB, _arg2):uint{ var _local3:uint; var _local4:b2Proxy; var _local5:uint; var _local6:uint; var _local7:Array; var _local8:Array; var _local9:int; var _local10:int; var _local11:Array; var _local12:uint; var _local13:uint; var _local14:Array; var _local15:Array; var _local16:Array; var _local17:int; var _local18:int; var _local19:b2Bound; var _local20:b2Bound; var _local21:b2Bound; var _local22:int; var _local23:b2Proxy; _local5 = m_freeProxy; _local4 = m_proxyPool[_local5]; m_freeProxy = _local4.GetNext(); _local4.overlapCount = 0; _local4.userData = _arg2; _local6 = (2 * m_proxyCount); _local7 = new Array(); _local8 = new Array(); ComputeBounds(_local7, _local8, _arg1); _local9 = 0; while (_local9 < 2) { _local11 = m_bounds[_local9]; _local14 = [_local12]; _local15 = [_local13]; Query(_local14, _local15, _local7[_local9], _local8[_local9], _local11, _local6, _local9); _local12 = _local14[0]; _local13 = _local15[0]; _local16 = new Array(); _local18 = (_local6 - _local13); _local17 = 0; while (_local17 < _local18) { _local16[_local17] = new b2Bound(); _local19 = _local16[_local17]; _local20 = _local11[int((_local13 + _local17))]; _local19.value = _local20.value; _local19.proxyId = _local20.proxyId; _local19.stabbingCount = _local20.stabbingCount; _local17++; }; _local18 = _local16.length; _local22 = (_local13 + 2); _local17 = 0; while (_local17 < _local18) { _local20 = _local16[_local17]; _local19 = _local11[int((_local22 + _local17))]; _local19.value = _local20.value; _local19.proxyId = _local20.proxyId; _local19.stabbingCount = _local20.stabbingCount; _local17++; }; _local16 = new Array(); _local18 = (_local13 - _local12); _local17 = 0; while (_local17 < _local18) { _local16[_local17] = new b2Bound(); _local19 = _local16[_local17]; _local20 = _local11[int((_local12 + _local17))]; _local19.value = _local20.value; _local19.proxyId = _local20.proxyId; _local19.stabbingCount = _local20.stabbingCount; _local17++; }; _local18 = _local16.length; _local22 = (_local12 + 1); _local17 = 0; while (_local17 < _local18) { _local20 = _local16[_local17]; _local19 = _local11[int((_local22 + _local17))]; _local19.value = _local20.value; _local19.proxyId = _local20.proxyId; _local19.stabbingCount = _local20.stabbingCount; _local17++; }; _local13++; _local19 = _local11[_local12]; _local20 = _local11[_local13]; _local19.value = _local7[_local9]; _local19.proxyId = _local5; _local20.value = _local8[_local9]; _local20.proxyId = _local5; _local21 = _local11[int((_local12 - 1))]; _local19.stabbingCount = ((_local12 == 0)) ? 0 : _local21.stabbingCount; _local21 = _local11[int((_local13 - 1))]; _local20.stabbingCount = _local21.stabbingCount; _local3 = _local12; while (_local3 < _local13) { _local21 = _local11[_local3]; _local21.stabbingCount++; _local3++; }; _local3 = _local12; while (_local3 < (_local6 + 2)) { _local19 = _local11[_local3]; _local23 = m_proxyPool[_local19.proxyId]; if (_local19.IsLower()){ _local23.lowerBounds[_local9] = _local3; } else { _local23.upperBounds[_local9] = _local3; }; _local3++; }; _local9++; }; m_proxyCount++; _local10 = 0; while (_local10 < m_queryResultCount) { m_pairManager.AddBufferedPair(_local5, m_queryResults[_local10]); _local10++; }; m_pairManager.Commit(); m_queryResultCount = 0; IncrementTimeStamp(); return (_local5); } public function DestroyProxy(_arg1:uint):void{ var _local2:b2Bound; var _local3:b2Bound; var _local4:b2Proxy; var _local5:int; var _local6:int; var _local7:int; var _local8:Array; var _local9:uint; var _local10:uint; var _local11:uint; var _local12:uint; var _local13:Array; var _local14:int; var _local15:int; var _local16:int; var _local17:uint; var _local18:int; var _local19:b2Proxy; _local4 = m_proxyPool[_arg1]; _local5 = (2 * m_proxyCount); _local6 = 0; while (_local6 < 2) { _local8 = m_bounds[_local6]; _local9 = _local4.lowerBounds[_local6]; _local10 = _local4.upperBounds[_local6]; _local2 = _local8[_local9]; _local11 = _local2.value; _local3 = _local8[_local10]; _local12 = _local3.value; _local13 = new Array(); _local15 = ((_local10 - _local9) - 1); _local14 = 0; while (_local14 < _local15) { _local13[_local14] = new b2Bound(); _local2 = _local13[_local14]; _local3 = _local8[int(((_local9 + 1) + _local14))]; _local2.value = _local3.value; _local2.proxyId = _local3.proxyId; _local2.stabbingCount = _local3.stabbingCount; _local14++; }; _local15 = _local13.length; _local16 = _local9; _local14 = 0; while (_local14 < _local15) { _local3 = _local13[_local14]; _local2 = _local8[int((_local16 + _local14))]; _local2.value = _local3.value; _local2.proxyId = _local3.proxyId; _local2.stabbingCount = _local3.stabbingCount; _local14++; }; _local13 = new Array(); _local15 = ((_local5 - _local10) - 1); _local14 = 0; while (_local14 < _local15) { _local13[_local14] = new b2Bound(); _local2 = _local13[_local14]; _local3 = _local8[int(((_local10 + 1) + _local14))]; _local2.value = _local3.value; _local2.proxyId = _local3.proxyId; _local2.stabbingCount = _local3.stabbingCount; _local14++; }; _local15 = _local13.length; _local16 = (_local10 - 1); _local14 = 0; while (_local14 < _local15) { _local3 = _local13[_local14]; _local2 = _local8[int((_local16 + _local14))]; _local2.value = _local3.value; _local2.proxyId = _local3.proxyId; _local2.stabbingCount = _local3.stabbingCount; _local14++; }; _local15 = (_local5 - 2); _local17 = _local9; while (_local17 < _local15) { _local2 = _local8[_local17]; _local19 = m_proxyPool[_local2.proxyId]; if (_local2.IsLower()){ _local19.lowerBounds[_local6] = _local17; } else { _local19.upperBounds[_local6] = _local17; }; _local17++; }; _local15 = (_local10 - 1); _local18 = _local9; while (_local18 < _local15) { _local2 = _local8[_local18]; _local2.stabbingCount--; _local18++; }; Query([0], [0], _local11, _local12, _local8, (_local5 - 2), _local6); _local6++; }; _local7 = 0; while (_local7 < m_queryResultCount) { m_pairManager.RemoveBufferedPair(_arg1, m_queryResults[_local7]); _local7++; }; m_pairManager.Commit(); m_queryResultCount = 0; IncrementTimeStamp(); _local4.userData = null; _local4.overlapCount = b2_invalid; _local4.lowerBounds[0] = b2_invalid; _local4.lowerBounds[1] = b2_invalid; _local4.upperBounds[0] = b2_invalid; _local4.upperBounds[1] = b2_invalid; _local4.SetNext(m_freeProxy); m_freeProxy = _arg1; m_proxyCount--; } public function TestOverlap(_arg1:b2BoundValues, _arg2:b2Proxy):Boolean{ var _local3:int; var _local4:Array; var _local5:b2Bound; _local3 = 0; while (_local3 < 2) { _local4 = m_bounds[_local3]; _local5 = _local4[_arg2.upperBounds[_local3]]; if (_arg1.lowerValues[_local3] > _local5.value){ return (false); }; _local5 = _local4[_arg2.lowerBounds[_local3]]; if (_arg1.upperValues[_local3] < _local5.value){ return (false); }; _local3++; }; return (true); } public function Validate():void{ var _local1:b2Pair; var _local2:b2Proxy; var _local3:b2Proxy; var _local4:Boolean; var _local5:int; var _local6:b2Bound; var _local7:uint; var _local8:uint; var _local9:uint; var _local10:b2Bound; _local5 = 0; while (_local5 < 2) { _local6 = m_bounds[_local5]; _local7 = (2 * m_proxyCount); _local8 = 0; _local9 = 0; while (_local9 < _local7) { _local10 = _local6[_local9]; if (_local10.IsLower() == true){ _local8++; } else { _local8--; }; _local9++; }; _local5++; }; } private function IncrementOverlapCount(_arg1:uint):void{ var _local2:b2Proxy; _local2 = m_proxyPool[_arg1]; if (_local2.timeStamp < m_timeStamp){ _local2.timeStamp = m_timeStamp; _local2.overlapCount = 1; } else { _local2.overlapCount = 2; m_queryResults[m_queryResultCount] = _arg1; m_queryResultCount++; }; } public function InRange(_arg1:b2AABB):Boolean{ var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; _local2 = _arg1.lowerBound.x; _local3 = _arg1.lowerBound.y; _local2 = (_local2 - m_worldAABB.upperBound.x); _local3 = (_local3 - m_worldAABB.upperBound.y); _local4 = m_worldAABB.lowerBound.x; _local5 = m_worldAABB.lowerBound.y; _local4 = (_local4 - _arg1.upperBound.x); _local5 = (_local5 - _arg1.upperBound.y); _local2 = b2Math.b2Max(_local2, _local4); _local3 = b2Math.b2Max(_local3, _local5); return ((b2Math.b2Max(_local2, _local3) < 0)); } public function MoveProxy(_arg1:uint, _arg2:b2AABB):void{ var _local3:Array; var _local4:int; var _local5:uint; var _local6:uint; var _local7:b2Bound; var _local8:b2Bound; var _local9:b2Bound; var _local10:uint; var _local11:b2Proxy; var _local12:uint; var _local13:b2Proxy; var _local14:b2BoundValues; var _local15:b2BoundValues; var _local16:Array; var _local17:uint; var _local18:uint; var _local19:uint; var _local20:uint; var _local21:int; var _local22:int; var _local23:uint; var _local24:b2Proxy; if ((((_arg1 == b2Pair.b2_nullProxy)) || ((b2Settings.b2_maxProxies <= _arg1)))){ return; }; if (_arg2.IsValid() == false){ return; }; _local12 = (2 * m_proxyCount); _local13 = m_proxyPool[_arg1]; _local14 = new b2BoundValues(); ComputeBounds(_local14.lowerValues, _local14.upperValues, _arg2); _local15 = new b2BoundValues(); _local5 = 0; while (_local5 < 2) { _local7 = m_bounds[_local5][_local13.lowerBounds[_local5]]; _local15.lowerValues[_local5] = _local7.value; _local7 = m_bounds[_local5][_local13.upperBounds[_local5]]; _local15.upperValues[_local5] = _local7.value; _local5++; }; _local5 = 0; while (_local5 < 2) { _local16 = m_bounds[_local5]; _local17 = _local13.lowerBounds[_local5]; _local18 = _local13.upperBounds[_local5]; _local19 = _local14.lowerValues[_local5]; _local20 = _local14.upperValues[_local5]; _local7 = _local16[_local17]; _local21 = (_local19 - _local7.value); _local7.value = _local19; _local7 = _local16[_local18]; _local22 = (_local20 - _local7.value); _local7.value = _local20; if (_local21 < 0){ _local6 = _local17; while ((((_local6 > 0)) && ((_local19 < (_local16[int((_local6 - 1))] as b2Bound).value)))) { _local7 = _local16[_local6]; _local8 = _local16[int((_local6 - 1))]; _local23 = _local8.proxyId; _local24 = m_proxyPool[_local8.proxyId]; _local8.stabbingCount++; if (_local8.IsUpper() == true){ if (TestOverlap(_local14, _local24)){ m_pairManager.AddBufferedPair(_arg1, _local23); }; _local3 = _local24.upperBounds; _local4 = _local3[_local5]; _local4++; _local3[_local5] = _local4; _local7.stabbingCount++; } else { _local3 = _local24.lowerBounds; _local4 = _local3[_local5]; _local4++; _local3[_local5] = _local4; _local7.stabbingCount--; }; _local3 = _local13.lowerBounds; _local4 = _local3[_local5]; _local4--; _local3[_local5] = _local4; _local7.Swap(_local8); _local6--; }; }; if (_local22 > 0){ _local6 = _local18; while ((((_local6 < (_local12 - 1))) && (((_local16[int((_local6 + 1))] as b2Bound).value <= _local20)))) { _local7 = _local16[_local6]; _local9 = _local16[int((_local6 + 1))]; _local10 = _local9.proxyId; _local11 = m_proxyPool[_local10]; _local9.stabbingCount++; if (_local9.IsLower() == true){ if (TestOverlap(_local14, _local11)){ m_pairManager.AddBufferedPair(_arg1, _local10); }; _local3 = _local11.lowerBounds; _local4 = _local3[_local5]; _local4--; _local3[_local5] = _local4; _local7.stabbingCount++; } else { _local3 = _local11.upperBounds; _local4 = _local3[_local5]; _local4--; _local3[_local5] = _local4; _local7.stabbingCount--; }; _local3 = _local13.upperBounds; _local4 = _local3[_local5]; _local4++; _local3[_local5] = _local4; _local7.Swap(_local9); _local6++; }; }; if (_local21 > 0){ _local6 = _local17; while ((((_local6 < (_local12 - 1))) && (((_local16[int((_local6 + 1))] as b2Bound).value <= _local19)))) { _local7 = _local16[_local6]; _local9 = _local16[int((_local6 + 1))]; _local10 = _local9.proxyId; _local11 = m_proxyPool[_local10]; _local9.stabbingCount--; if (_local9.IsUpper()){ if (TestOverlap(_local15, _local11)){ m_pairManager.RemoveBufferedPair(_arg1, _local10); }; _local3 = _local11.upperBounds; _local4 = _local3[_local5]; _local4--; _local3[_local5] = _local4; _local7.stabbingCount--; } else { _local3 = _local11.lowerBounds; _local4 = _local3[_local5]; _local4--; _local3[_local5] = _local4; _local7.stabbingCount++; }; _local3 = _local13.lowerBounds; _local4 = _local3[_local5]; _local4++; _local3[_local5] = _local4; _local7.Swap(_local9); _local6++; }; }; if (_local22 < 0){ _local6 = _local18; while ((((_local6 > 0)) && ((_local20 < (_local16[int((_local6 - 1))] as b2Bound).value)))) { _local7 = _local16[_local6]; _local8 = _local16[int((_local6 - 1))]; _local23 = _local8.proxyId; _local24 = m_proxyPool[_local23]; _local8.stabbingCount--; if (_local8.IsLower() == true){ if (TestOverlap(_local15, _local24)){ m_pairManager.RemoveBufferedPair(_arg1, _local23); }; _local3 = _local24.lowerBounds; _local4 = _local3[_local5]; _local4++; _local3[_local5] = _local4; _local7.stabbingCount--; } else { _local3 = _local24.upperBounds; _local4 = _local3[_local5]; _local4++; _local3[_local5] = _local4; _local7.stabbingCount++; }; _local3 = _local13.upperBounds; _local4 = _local3[_local5]; _local4--; _local3[_local5] = _local4; _local7.Swap(_local8); _local6--; }; }; _local5++; }; } public static function BinarySearch(_arg1:Array, _arg2:int, _arg3:uint):uint{ var _local4:int; var _local5:int; var _local6:int; var _local7:b2Bound; _local4 = 0; _local5 = (_arg2 - 1); while (_local4 <= _local5) { _local6 = ((_local4 + _local5) / 2); _local7 = _arg1[_local6]; if (_local7.value > _arg3){ _local5 = (_local6 - 1); } else { if (_local7.value < _arg3){ _local4 = (_local6 + 1); } else { return (uint(_local6)); }; }; }; return (uint(_local4)); } } }//package Box2D.Collision
Section 13
//b2BufferedPair (Box2D.Collision.b2BufferedPair) package Box2D.Collision { public class b2BufferedPair { public var proxyId1:uint; public var proxyId2:uint; } }//package Box2D.Collision
Section 14
//b2Collision (Box2D.Collision.b2Collision) package Box2D.Collision { import Box2D.Common.Math.*; import Box2D.Collision.Shapes.*; import Box2D.Common.*; public class b2Collision { public static const b2_nullFeature:uint = 0xFF; private static var b2CollidePolyTempVec:b2Vec2 = new b2Vec2(); public static function EdgeSeparation(_arg1:b2PolygonShape, _arg2:b2XForm, _arg3:int, _arg4:b2PolygonShape, _arg5:b2XForm):Number{ var _local6:int; var _local7:Array; var _local8:Array; var _local9:int; var _local10:Array; var _local11:b2Mat22; var _local12:b2Vec2; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:int; var _local18:Number; var _local19:int; var _local20:Number; var _local21:Number; var _local22:Number; var _local23:Number; var _local24:Number; var _local25:Number; _local6 = _arg1.m_vertexCount; _local7 = _arg1.m_vertices; _local8 = _arg1.m_normals; _local9 = _arg4.m_vertexCount; _local10 = _arg4.m_vertices; _local11 = _arg2.R; _local12 = _local8[_arg3]; _local13 = ((_local11.col1.x * _local12.x) + (_local11.col2.x * _local12.y)); _local14 = ((_local11.col1.y * _local12.x) + (_local11.col2.y * _local12.y)); _local11 = _arg5.R; _local15 = ((_local11.col1.x * _local13) + (_local11.col1.y * _local14)); _local16 = ((_local11.col2.x * _local13) + (_local11.col2.y * _local14)); _local17 = 0; _local18 = Number.MAX_VALUE; _local19 = 0; while (_local19 < _local9) { _local12 = _local10[_local19]; _local25 = ((_local12.x * _local15) + (_local12.y * _local16)); if (_local25 < _local18){ _local18 = _local25; _local17 = _local19; }; _local19++; }; _local12 = _local7[_arg3]; _local11 = _arg2.R; _local20 = (_arg2.position.x + ((_local11.col1.x * _local12.x) + (_local11.col2.x * _local12.y))); _local21 = (_arg2.position.y + ((_local11.col1.y * _local12.x) + (_local11.col2.y * _local12.y))); _local12 = _local10[_local17]; _local11 = _arg5.R; _local22 = (_arg5.position.x + ((_local11.col1.x * _local12.x) + (_local11.col2.x * _local12.y))); _local23 = (_arg5.position.y + ((_local11.col1.y * _local12.x) + (_local11.col2.y * _local12.y))); _local22 = (_local22 - _local20); _local23 = (_local23 - _local21); _local24 = ((_local22 * _local13) + (_local23 * _local14)); return (_local24); } public static function b2TestOverlap(_arg1:b2AABB, _arg2:b2AABB):Boolean{ var _local3:b2Vec2; var _local4:b2Vec2; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; _local3 = _arg2.lowerBound; _local4 = _arg1.upperBound; _local5 = (_local3.x - _local4.x); _local6 = (_local3.y - _local4.y); _local3 = _arg1.lowerBound; _local4 = _arg2.upperBound; _local7 = (_local3.x - _local4.x); _local8 = (_local3.y - _local4.y); if ((((_local5 > 0)) || ((_local6 > 0)))){ return (false); }; if ((((_local7 > 0)) || ((_local8 > 0)))){ return (false); }; return (true); } public static function FindIncidentEdge(_arg1:Array, _arg2:b2PolygonShape, _arg3:b2XForm, _arg4:int, _arg5:b2PolygonShape, _arg6:b2XForm):void{ var _local7:int; var _local8:Array; var _local9:int; var _local10:Array; var _local11:Array; var _local12:b2Mat22; var _local13:b2Vec2; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:int; var _local18:Number; var _local19:int; var _local20:ClipVertex; var _local21:int; var _local22:int; var _local23:Number; _local7 = _arg2.m_vertexCount; _local8 = _arg2.m_normals; _local9 = _arg5.m_vertexCount; _local10 = _arg5.m_vertices; _local11 = _arg5.m_normals; _local12 = _arg3.R; _local13 = _local8[_arg4]; _local14 = ((_local12.col1.x * _local13.x) + (_local12.col2.x * _local13.y)); _local15 = ((_local12.col1.y * _local13.x) + (_local12.col2.y * _local13.y)); _local12 = _arg6.R; _local16 = ((_local12.col1.x * _local14) + (_local12.col1.y * _local15)); _local15 = ((_local12.col2.x * _local14) + (_local12.col2.y * _local15)); _local14 = _local16; _local17 = 0; _local18 = Number.MAX_VALUE; _local19 = 0; while (_local19 < _local9) { _local13 = _local11[_local19]; _local23 = ((_local14 * _local13.x) + (_local15 * _local13.y)); if (_local23 < _local18){ _local18 = _local23; _local17 = _local19; }; _local19++; }; _local21 = _local17; _local22 = (((_local21 + 1) < _local9)) ? (_local21 + 1) : 0; _local20 = _arg1[0]; _local13 = _local10[_local21]; _local12 = _arg6.R; _local20.v.x = (_arg6.position.x + ((_local12.col1.x * _local13.x) + (_local12.col2.x * _local13.y))); _local20.v.y = (_arg6.position.y + ((_local12.col1.y * _local13.x) + (_local12.col2.y * _local13.y))); _local20.id.features.referenceEdge = _arg4; _local20.id.features.incidentEdge = _local21; _local20.id.features.incidentVertex = 0; _local20 = _arg1[1]; _local13 = _local10[_local22]; _local12 = _arg6.R; _local20.v.x = (_arg6.position.x + ((_local12.col1.x * _local13.x) + (_local12.col2.x * _local13.y))); _local20.v.y = (_arg6.position.y + ((_local12.col1.y * _local13.x) + (_local12.col2.y * _local13.y))); _local20.id.features.referenceEdge = _arg4; _local20.id.features.incidentEdge = _local22; _local20.id.features.incidentVertex = 1; } public static function b2CollidePolygons(_arg1:b2Manifold, _arg2:b2PolygonShape, _arg3:b2XForm, _arg4:b2PolygonShape, _arg5:b2XForm):void{ var _local6:ClipVertex; var _local7:int; var _local8:Array; var _local9:Number; var _local10:int; var _local11:Array; var _local12:Number; var _local13:b2PolygonShape; var _local14:b2PolygonShape; var _local15:b2XForm; var _local16:b2XForm; var _local17:int; var _local18:uint; var _local19:Number; var _local20:Number; var _local21:Array; var _local22:int; var _local23:Array; var _local24:b2Vec2; var _local25:b2Vec2; var _local26:b2Vec2; var _local27:b2Vec2; var _local28:b2Vec2; var _local29:Number; var _local30:Number; var _local31:Number; var _local32:Array; var _local33:Array; var _local34:int; var _local35:int; var _local36:int; var _local37:b2Vec2; var _local38:Number; var _local39:b2ManifoldPoint; _arg1.pointCount = 0; _local7 = 0; _local8 = [_local7]; _local9 = FindMaxSeparation(_local8, _arg2, _arg3, _arg4, _arg5); _local7 = _local8[0]; if (_local9 > 0){ return; }; _local10 = 0; _local11 = [_local10]; _local12 = FindMaxSeparation(_local11, _arg4, _arg5, _arg2, _arg3); _local10 = _local11[0]; if (_local12 > 0){ return; }; _local15 = new b2XForm(); _local16 = new b2XForm(); _local19 = 0.98; _local20 = 0.001; if (_local12 > ((_local19 * _local9) + _local20)){ _local13 = _arg4; _local14 = _arg2; _local15.Set(_arg5); _local16.Set(_arg3); _local17 = _local10; _local18 = 1; } else { _local13 = _arg2; _local14 = _arg4; _local15.Set(_arg3); _local16.Set(_arg5); _local17 = _local7; _local18 = 0; }; _local21 = [new ClipVertex(), new ClipVertex()]; FindIncidentEdge(_local21, _local13, _local15, _local17, _local14, _local16); _local22 = _local13.m_vertexCount; _local23 = _local13.m_vertices; _local24 = _local23[_local17]; _local25 = _local24.Copy(); if ((_local17 + 1) < _local22){ _local24 = _local23[int((_local17 + 1))]; _local37 = _local24.Copy(); } else { _local24 = _local23[0]; _local37 = _local24.Copy(); }; _local26 = b2Math.SubtractVV(_local37, _local25); _local27 = b2Math.b2MulMV(_local15.R, b2Math.SubtractVV(_local37, _local25)); _local27.Normalize(); _local28 = b2Math.b2CrossVF(_local27, 1); _local25 = b2Math.b2MulX(_local15, _local25); _local37 = b2Math.b2MulX(_local15, _local37); _local29 = b2Math.b2Dot(_local28, _local25); _local30 = -(b2Math.b2Dot(_local27, _local25)); _local31 = b2Math.b2Dot(_local27, _local37); _local32 = [new ClipVertex(), new ClipVertex()]; _local33 = [new ClipVertex(), new ClipVertex()]; _local34 = ClipSegmentToLine(_local32, _local21, _local27.Negative(), _local30); if (_local34 < 2){ return; }; _local34 = ClipSegmentToLine(_local33, _local32, _local27, _local31); if (_local34 < 2){ return; }; _arg1.normal = (_local18) ? _local28.Negative() : _local28.Copy(); _local35 = 0; _local36 = 0; while (_local36 < b2Settings.b2_maxManifoldPoints) { _local6 = _local33[_local36]; _local38 = (b2Math.b2Dot(_local28, _local6.v) - _local29); if (_local38 <= 0){ _local39 = _arg1.points[_local35]; _local39.separation = _local38; _local39.localPoint1 = b2Math.b2MulXT(_arg3, _local6.v); _local39.localPoint2 = b2Math.b2MulXT(_arg5, _local6.v); _local39.id.key = _local6.id._key; _local39.id.features.flip = _local18; _local35++; }; _local36++; }; _arg1.pointCount = _local35; } public static function FindMaxSeparation(_arg1:Array, _arg2:b2PolygonShape, _arg3:b2XForm, _arg4:b2PolygonShape, _arg5:b2XForm):Number{ var _local6:int; var _local7:Array; var _local8:b2Vec2; var _local9:b2Mat22; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:int; var _local15:Number; var _local16:int; var _local17:Number; var _local18:int; var _local19:Number; var _local20:int; var _local21:Number; var _local22:int; var _local23:Number; var _local24:int; var _local25:Number; _local6 = _arg2.m_vertexCount; _local7 = _arg2.m_normals; _local9 = _arg5.R; _local8 = _arg4.m_centroid; _local10 = (_arg5.position.x + ((_local9.col1.x * _local8.x) + (_local9.col2.x * _local8.y))); _local11 = (_arg5.position.y + ((_local9.col1.y * _local8.x) + (_local9.col2.y * _local8.y))); _local9 = _arg3.R; _local8 = _arg2.m_centroid; _local10 = (_local10 - (_arg3.position.x + ((_local9.col1.x * _local8.x) + (_local9.col2.x * _local8.y)))); _local11 = (_local11 - (_arg3.position.y + ((_local9.col1.y * _local8.x) + (_local9.col2.y * _local8.y)))); _local12 = ((_local10 * _arg3.R.col1.x) + (_local11 * _arg3.R.col1.y)); _local13 = ((_local10 * _arg3.R.col2.x) + (_local11 * _arg3.R.col2.y)); _local14 = 0; _local15 = -(Number.MAX_VALUE); _local16 = 0; while (_local16 < _local6) { _local8 = _local7[_local16]; _local25 = ((_local8.x * _local12) + (_local8.y * _local13)); if (_local25 > _local15){ _local15 = _local25; _local14 = _local16; }; _local16++; }; _local17 = EdgeSeparation(_arg2, _arg3, _local14, _arg4, _arg5); if (_local17 > 0){ return (_local17); }; _local18 = (((_local14 - 1) >= 0)) ? (_local14 - 1) : (_local6 - 1); _local19 = EdgeSeparation(_arg2, _arg3, _local18, _arg4, _arg5); if (_local19 > 0){ return (_local19); }; _local20 = (((_local14 + 1) < _local6)) ? (_local14 + 1) : 0; _local21 = EdgeSeparation(_arg2, _arg3, _local20, _arg4, _arg5); if (_local21 > 0){ return (_local21); }; if ((((_local19 > _local17)) && ((_local19 > _local21)))){ _local24 = -1; _local22 = _local18; _local23 = _local19; } else { if (_local21 > _local17){ _local24 = 1; _local22 = _local20; _local23 = _local21; } else { _arg1[0] = _local14; return (_local17); }; }; while (true) { if (_local24 == -1){ _local14 = (((_local22 - 1) >= 0)) ? (_local22 - 1) : (_local6 - 1); } else { _local14 = (((_local22 + 1) < _local6)) ? (_local22 + 1) : 0; }; _local17 = EdgeSeparation(_arg2, _arg3, _local14, _arg4, _arg5); if (_local17 > 0){ return (_local17); }; if (_local17 > _local23){ _local22 = _local14; _local23 = _local17; } else { break; }; }; _arg1[0] = _local22; return (_local23); } public static function ClipSegmentToLine(_arg1:Array, _arg2:Array, _arg3:b2Vec2, _arg4:Number):int{ var _local5:ClipVertex; var _local6:int; var _local7:b2Vec2; var _local8:b2Vec2; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:b2Vec2; var _local13:ClipVertex; _local6 = 0; _local5 = _arg2[0]; _local7 = _local5.v; _local5 = _arg2[1]; _local8 = _local5.v; _local9 = (b2Math.b2Dot(_arg3, _local7) - _arg4); _local10 = (b2Math.b2Dot(_arg3, _local8) - _arg4); if (_local9 <= 0){ var _temp1 = _local6; _local6 = (_local6 + 1); var _local14 = _temp1; _arg1[_local14] = _arg2[0]; }; if (_local10 <= 0){ var _temp2 = _local6; _local6 = (_local6 + 1); _local14 = _temp2; _arg1[_local14] = _arg2[1]; }; if ((_local9 * _local10) < 0){ _local11 = (_local9 / (_local9 - _local10)); _local5 = _arg1[_local6]; _local12 = _local5.v; _local12.x = (_local7.x + (_local11 * (_local8.x - _local7.x))); _local12.y = (_local7.y + (_local11 * (_local8.y - _local7.y))); _local5 = _arg1[_local6]; if (_local9 > 0){ _local13 = _arg2[0]; _local5.id = _local13.id; } else { _local13 = _arg2[1]; _local5.id = _local13.id; }; _local6++; }; return (_local6); } public static function b2CollideCircles(_arg1:b2Manifold, _arg2:b2CircleShape, _arg3:b2XForm, _arg4:b2CircleShape, _arg5:b2XForm):void{ var _local6:b2Mat22; var _local7:b2Vec2; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:b2ManifoldPoint; var _local20:Number; var _local21:Number; var _local22:Number; var _local23:Number; var _local24:Number; var _local25:Number; _arg1.pointCount = 0; _local6 = _arg3.R; _local7 = _arg2.m_localPosition; _local8 = (_arg3.position.x + ((_local6.col1.x * _local7.x) + (_local6.col2.x * _local7.y))); _local9 = (_arg3.position.y + ((_local6.col1.y * _local7.x) + (_local6.col2.y * _local7.y))); _local6 = _arg5.R; _local7 = _arg4.m_localPosition; _local10 = (_arg5.position.x + ((_local6.col1.x * _local7.x) + (_local6.col2.x * _local7.y))); _local11 = (_arg5.position.y + ((_local6.col1.y * _local7.x) + (_local6.col2.y * _local7.y))); _local12 = (_local10 - _local8); _local13 = (_local11 - _local9); _local14 = ((_local12 * _local12) + (_local13 * _local13)); _local15 = _arg2.m_radius; _local16 = _arg4.m_radius; _local17 = (_local15 + _local16); if (_local14 > (_local17 * _local17)){ return; }; if (_local14 < Number.MIN_VALUE){ _local18 = -(_local17); _arg1.normal.Set(0, 1); } else { _local24 = Math.sqrt(_local14); _local18 = (_local24 - _local17); _local25 = (1 / _local24); _arg1.normal.x = (_local25 * _local12); _arg1.normal.y = (_local25 * _local13); }; _arg1.pointCount = 1; _local19 = _arg1.points[0]; _local19.id.key = 0; _local19.separation = _local18; _local8 = (_local8 + (_local15 * _arg1.normal.x)); _local9 = (_local9 + (_local15 * _arg1.normal.y)); _local10 = (_local10 - (_local16 * _arg1.normal.x)); _local11 = (_local11 - (_local16 * _arg1.normal.y)); _local20 = (0.5 * (_local8 + _local10)); _local21 = (0.5 * (_local9 + _local11)); _local22 = (_local20 - _arg3.position.x); _local23 = (_local21 - _arg3.position.y); _local19.localPoint1.x = ((_local22 * _arg3.R.col1.x) + (_local23 * _arg3.R.col1.y)); _local19.localPoint1.y = ((_local22 * _arg3.R.col2.x) + (_local23 * _arg3.R.col2.y)); _local22 = (_local20 - _arg5.position.x); _local23 = (_local21 - _arg5.position.y); _local19.localPoint2.x = ((_local22 * _arg5.R.col1.x) + (_local23 * _arg5.R.col1.y)); _local19.localPoint2.y = ((_local22 * _arg5.R.col2.x) + (_local23 * _arg5.R.col2.y)); } public static function b2CollidePolygonAndCircle(_arg1:b2Manifold, _arg2:b2PolygonShape, _arg3:b2XForm, _arg4:b2CircleShape, _arg5:b2XForm):void{ var _local6:b2ManifoldPoint; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:b2Vec2; var _local12:b2Mat22; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:int; var _local19:Number; var _local20:Number; var _local21:int; var _local22:Array; var _local23:Array; var _local24:int; var _local25:int; var _local26:int; var _local27:b2Vec2; var _local28:Number; var _local29:Number; var _local30:Number; var _local31:Number; var _local32:Number; var _local33:Number; var _local34:Number; _arg1.pointCount = 0; _local12 = _arg5.R; _local11 = _arg4.m_localPosition; _local13 = (_arg5.position.x + ((_local12.col1.x * _local11.x) + (_local12.col2.x * _local11.y))); _local14 = (_arg5.position.y + ((_local12.col1.y * _local11.x) + (_local12.col2.y * _local11.y))); _local7 = (_local13 - _arg3.position.x); _local8 = (_local14 - _arg3.position.y); _local12 = _arg3.R; _local15 = ((_local7 * _local12.col1.x) + (_local8 * _local12.col1.y)); _local16 = ((_local7 * _local12.col2.x) + (_local8 * _local12.col2.y)); _local18 = 0; _local19 = -(Number.MAX_VALUE); _local20 = _arg4.m_radius; _local21 = _arg2.m_vertexCount; _local22 = _arg2.m_vertices; _local23 = _arg2.m_normals; _local24 = 0; while (_local24 < _local21) { _local11 = _local22[_local24]; _local7 = (_local15 - _local11.x); _local8 = (_local16 - _local11.y); _local11 = _local23[_local24]; _local34 = ((_local11.x * _local7) + (_local11.y * _local8)); if (_local34 > _local20){ return; }; if (_local34 > _local19){ _local19 = _local34; _local18 = _local24; }; _local24++; }; if (_local19 < Number.MIN_VALUE){ _arg1.pointCount = 1; _local11 = _local23[_local18]; _local12 = _arg3.R; _arg1.normal.x = ((_local12.col1.x * _local11.x) + (_local12.col2.x * _local11.y)); _arg1.normal.y = ((_local12.col1.y * _local11.x) + (_local12.col2.y * _local11.y)); _local6 = _arg1.points[0]; _local6.id.features.incidentEdge = _local18; _local6.id.features.incidentVertex = b2_nullFeature; _local6.id.features.referenceEdge = 0; _local6.id.features.flip = 0; _local9 = (_local13 - (_local20 * _arg1.normal.x)); _local10 = (_local14 - (_local20 * _arg1.normal.y)); _local7 = (_local9 - _arg3.position.x); _local8 = (_local10 - _arg3.position.y); _local12 = _arg3.R; _local6.localPoint1.x = ((_local7 * _local12.col1.x) + (_local8 * _local12.col1.y)); _local6.localPoint1.y = ((_local7 * _local12.col2.x) + (_local8 * _local12.col2.y)); _local7 = (_local9 - _arg5.position.x); _local8 = (_local10 - _arg5.position.y); _local12 = _arg5.R; _local6.localPoint2.x = ((_local7 * _local12.col1.x) + (_local8 * _local12.col1.y)); _local6.localPoint2.y = ((_local7 * _local12.col2.x) + (_local8 * _local12.col2.y)); _local6.separation = (_local19 - _local20); return; }; _local25 = _local18; _local26 = (((_local25 + 1) < _local21)) ? (_local25 + 1) : 0; _local11 = _local22[_local25]; _local27 = _local22[_local26]; _local28 = (_local27.x - _local11.x); _local29 = (_local27.y - _local11.y); _local30 = Math.sqrt(((_local28 * _local28) + (_local29 * _local29))); _local28 = (_local28 / _local30); _local29 = (_local29 / _local30); _local7 = (_local15 - _local11.x); _local8 = (_local16 - _local11.y); _local31 = ((_local7 * _local28) + (_local8 * _local29)); _local6 = _arg1.points[0]; if (_local31 <= 0){ _local32 = _local11.x; _local33 = _local11.y; _local6.id.features.incidentEdge = b2_nullFeature; _local6.id.features.incidentVertex = _local25; } else { if (_local31 >= _local30){ _local32 = _local27.x; _local33 = _local27.y; _local6.id.features.incidentEdge = b2_nullFeature; _local6.id.features.incidentVertex = _local26; } else { _local32 = ((_local28 * _local31) + _local11.x); _local33 = ((_local29 * _local31) + _local11.y); _local6.id.features.incidentEdge = _local18; _local6.id.features.incidentVertex = 0; }; }; _local7 = (_local15 - _local32); _local8 = (_local16 - _local33); _local17 = Math.sqrt(((_local7 * _local7) + (_local8 * _local8))); _local7 = (_local7 / _local17); _local8 = (_local8 / _local17); if (_local17 > _local20){ return; }; _arg1.pointCount = 1; _local12 = _arg3.R; _arg1.normal.x = ((_local12.col1.x * _local7) + (_local12.col2.x * _local8)); _arg1.normal.y = ((_local12.col1.y * _local7) + (_local12.col2.y * _local8)); _local9 = (_local13 - (_local20 * _arg1.normal.x)); _local10 = (_local14 - (_local20 * _arg1.normal.y)); _local7 = (_local9 - _arg3.position.x); _local8 = (_local10 - _arg3.position.y); _local12 = _arg3.R; _local6.localPoint1.x = ((_local7 * _local12.col1.x) + (_local8 * _local12.col1.y)); _local6.localPoint1.y = ((_local7 * _local12.col2.x) + (_local8 * _local12.col2.y)); _local7 = (_local9 - _arg5.position.x); _local8 = (_local10 - _arg5.position.y); _local12 = _arg5.R; _local6.localPoint2.x = ((_local7 * _local12.col1.x) + (_local8 * _local12.col1.y)); _local6.localPoint2.y = ((_local7 * _local12.col2.x) + (_local8 * _local12.col2.y)); _local6.separation = (_local17 - _local20); _local6.id.features.referenceEdge = 0; _local6.id.features.flip = 0; } } }//package Box2D.Collision
Section 15
//b2ContactID (Box2D.Collision.b2ContactID) package Box2D.Collision { public class b2ContactID { public var _key:uint; public var features:Features; public function b2ContactID(){ features = new Features(); super(); features._m_id = this; } public function Set(_arg1:b2ContactID):void{ key = _arg1._key; } public function Copy():b2ContactID{ var _local1:b2ContactID; _local1 = new b2ContactID(); _local1.key = key; return (_local1); } public function get key():uint{ return (_key); } public function set key(_arg1:uint):void{ _key = _arg1; features._referenceEdge = (_key & 0xFF); features._incidentEdge = (((_key & 0xFF00) >> 8) & 0xFF); features._incidentVertex = (((_key & 0xFF0000) >> 16) & 0xFF); features._flip = (((_key & 4278190080) >> 24) & 0xFF); } } }//package Box2D.Collision
Section 16
//b2ContactPoint (Box2D.Collision.b2ContactPoint) package Box2D.Collision { import Box2D.Common.Math.*; import Box2D.Collision.Shapes.*; public class b2ContactPoint { public var separation:Number; public var normal:b2Vec2; public var position:b2Vec2; public var restitution:Number; public var shape1:b2Shape; public var shape2:b2Shape; public var id:b2ContactID; public var friction:Number; public var velocity:b2Vec2; public function b2ContactPoint(){ position = new b2Vec2(); velocity = new b2Vec2(); normal = new b2Vec2(); id = new b2ContactID(); super(); } } }//package Box2D.Collision
Section 17
//b2Distance (Box2D.Collision.b2Distance) package Box2D.Collision { import Box2D.Common.Math.*; import Box2D.Collision.Shapes.*; import Box2D.Common.*; public class b2Distance { private static var s_p2s:Array = [new b2Vec2(), new b2Vec2(), new b2Vec2()]; private static var s_p1s:Array = [new b2Vec2(), new b2Vec2(), new b2Vec2()]; private static var s_points:Array = [new b2Vec2(), new b2Vec2(), new b2Vec2()]; private static var gPoint:b2Point = new b2Point(); public static var g_GJK_Iterations:int = 0; public static function InPoints(_arg1:b2Vec2, _arg2:Array, _arg3:int):Boolean{ var _local4:Number; var _local5:int; var _local6:b2Vec2; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; _local4 = (100 * Number.MIN_VALUE); _local5 = 0; while (_local5 < _arg3) { _local6 = _arg2[_local5]; _local7 = Math.abs((_arg1.x - _local6.x)); _local8 = Math.abs((_arg1.y - _local6.y)); _local9 = Math.max(Math.abs(_arg1.x), Math.abs(_local6.x)); _local10 = Math.max(Math.abs(_arg1.y), Math.abs(_local6.y)); if ((((_local7 < (_local4 * (_local9 + 1)))) && ((_local8 < (_local4 * (_local10 + 1)))))){ return (true); }; _local5++; }; return (false); } public static function DistanceGeneric(_arg1:b2Vec2, _arg2:b2Vec2, _arg3, _arg4:b2XForm, _arg5, _arg6:b2XForm):Number{ var _local7:b2Vec2; var _local8:Array; var _local9:Array; var _local10:Array; var _local11:int; var _local12:Number; var _local13:int; var _local14:int; var _local15:Number; var _local16:Number; var _local17:b2Vec2; var _local18:b2Vec2; var _local19:Number; var _local20:Number; var _local21:Number; var _local22:Number; var _local23:int; _local8 = s_p1s; _local9 = s_p2s; _local10 = s_points; _local11 = 0; _arg1.SetV(_arg3.GetFirstVertex(_arg4)); _arg2.SetV(_arg5.GetFirstVertex(_arg6)); _local12 = 0; _local13 = 20; _local14 = 0; while (_local14 < _local13) { _local15 = (_arg2.x - _arg1.x); _local16 = (_arg2.y - _arg1.y); _local17 = _arg3.Support(_arg4, _local15, _local16); _local18 = _arg5.Support(_arg6, -(_local15), -(_local16)); _local12 = ((_local15 * _local15) + (_local16 * _local16)); _local19 = (_local18.x - _local17.x); _local20 = (_local18.y - _local17.y); _local21 = ((_local15 * _local19) + (_local16 * _local20)); if ((_local12 - ((_local15 * _local19) + (_local16 * _local20))) <= (0.01 * _local12)){ if (_local11 == 0){ _arg1.SetV(_local17); _arg2.SetV(_local18); }; g_GJK_Iterations = _local14; return (Math.sqrt(_local12)); }; switch (_local11){ case 0: _local7 = _local8[0]; _local7.SetV(_local17); _local7 = _local9[0]; _local7.SetV(_local18); _local7 = _local10[0]; _local7.x = _local19; _local7.y = _local20; _arg1.SetV(_local8[0]); _arg2.SetV(_local9[0]); _local11++; break; case 1: _local7 = _local8[1]; _local7.SetV(_local17); _local7 = _local9[1]; _local7.SetV(_local18); _local7 = _local10[1]; _local7.x = _local19; _local7.y = _local20; _local11 = ProcessTwo(_arg1, _arg2, _local8, _local9, _local10); break; case 2: _local7 = _local8[2]; _local7.SetV(_local17); _local7 = _local9[2]; _local7.SetV(_local18); _local7 = _local10[2]; _local7.x = _local19; _local7.y = _local20; _local11 = ProcessThree(_arg1, _arg2, _local8, _local9, _local10); break; }; if (_local11 == 3){ g_GJK_Iterations = _local14; return (0); }; _local22 = -(Number.MAX_VALUE); _local23 = 0; while (_local23 < _local11) { _local7 = _local10[_local23]; _local22 = b2Math.b2Max(_local22, ((_local7.x * _local7.x) + (_local7.y * _local7.y))); _local23++; }; if ((((_local11 == 3)) || ((_local12 <= ((100 * Number.MIN_VALUE) * _local22))))){ g_GJK_Iterations = _local14; _local15 = (_arg2.x - _arg1.x); _local16 = (_arg2.y - _arg1.y); _local12 = ((_local15 * _local15) + (_local16 * _local16)); return (Math.sqrt(_local12)); }; _local14++; }; g_GJK_Iterations = _local13; return (Math.sqrt(_local12)); } public static function DistanceCC(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:b2CircleShape, _arg4:b2XForm, _arg5:b2CircleShape, _arg6:b2XForm):Number{ var _local7:b2Mat22; var _local8:b2Vec2; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:Number; _local7 = _arg4.R; _local8 = _arg3.m_localPosition; _local9 = (_arg4.position.x + ((_local7.col1.x * _local8.x) + (_local7.col2.x * _local8.y))); _local10 = (_arg4.position.y + ((_local7.col1.y * _local8.x) + (_local7.col2.y * _local8.y))); _local7 = _arg6.R; _local8 = _arg5.m_localPosition; _local11 = (_arg6.position.x + ((_local7.col1.x * _local8.x) + (_local7.col2.x * _local8.y))); _local12 = (_arg6.position.y + ((_local7.col1.y * _local8.x) + (_local7.col2.y * _local8.y))); _local13 = (_local11 - _local9); _local14 = (_local12 - _local10); _local15 = ((_local13 * _local13) + (_local14 * _local14)); _local16 = (_arg3.m_radius - b2Settings.b2_toiSlop); _local17 = (_arg5.m_radius - b2Settings.b2_toiSlop); _local18 = (_local16 + _local17); if (_local15 > (_local18 * _local18)){ _local19 = Math.sqrt(((_local13 * _local13) + (_local14 * _local14))); _local13 = (_local13 / _local19); _local14 = (_local14 / _local19); _local20 = (_local19 - _local18); _arg1.x = (_local9 + (_local16 * _local13)); _arg1.y = (_local10 + (_local16 * _local14)); _arg2.x = (_local11 - (_local17 * _local13)); _arg2.y = (_local12 - (_local17 * _local14)); return (_local20); }; if (_local15 > (Number.MIN_VALUE * Number.MIN_VALUE)){ _local19 = Math.sqrt(((_local13 * _local13) + (_local14 * _local14))); _local13 = (_local13 / _local19); _local14 = (_local14 / _local19); _arg1.x = (_local9 + (_local16 * _local13)); _arg1.y = (_local10 + (_local16 * _local14)); _arg2.x = _arg1.x; _arg2.y = _arg1.y; return (0); }; _arg1.x = _local9; _arg1.y = _local10; _arg2.x = _arg1.x; _arg2.y = _arg1.y; return (0); } public static function ProcessThree(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:Array, _arg4:Array, _arg5:Array):int{ var _local6:b2Vec2; var _local7:b2Vec2; var _local8:b2Vec2; var _local9:b2Vec2; var _local10:b2Vec2; var _local11:b2Vec2; var _local12:b2Vec2; var _local13:b2Vec2; var _local14:b2Vec2; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:Number; var _local21:Number; var _local22:Number; var _local23:Number; var _local24:Number; var _local25:Number; var _local26:Number; var _local27:Number; var _local28:Number; var _local29:Number; var _local30:Number; var _local31:Number; var _local32:Number; var _local33:Number; var _local34:Number; var _local35:Number; var _local36:Number; var _local37:Number; var _local38:Number; var _local39:Number; var _local40:Number; var _local41:Number; _local6 = _arg5[0]; _local7 = _arg5[1]; _local8 = _arg5[2]; _local9 = _arg3[0]; _local10 = _arg3[1]; _local11 = _arg3[2]; _local12 = _arg4[0]; _local13 = _arg4[1]; _local14 = _arg4[2]; _local15 = _local6.x; _local16 = _local6.y; _local17 = _local7.x; _local18 = _local7.y; _local19 = _local8.x; _local20 = _local8.y; _local21 = (_local17 - _local15); _local22 = (_local18 - _local16); _local23 = (_local19 - _local15); _local24 = (_local20 - _local16); _local25 = (_local19 - _local17); _local26 = (_local20 - _local18); _local27 = -(((_local15 * _local21) + (_local16 * _local22))); _local28 = ((_local17 * _local21) + (_local18 * _local22)); _local29 = -(((_local15 * _local23) + (_local16 * _local24))); _local30 = ((_local19 * _local23) + (_local20 * _local24)); _local31 = -(((_local17 * _local25) + (_local18 * _local26))); _local32 = ((_local19 * _local25) + (_local20 * _local26)); if ((((_local30 <= 0)) && ((_local32 <= 0)))){ _arg1.SetV(_local11); _arg2.SetV(_local14); _local9.SetV(_local11); _local12.SetV(_local14); _local6.SetV(_local8); return (1); }; _local33 = ((_local21 * _local24) - (_local22 * _local23)); _local34 = (_local33 * ((_local15 * _local18) - (_local16 * _local17))); _local36 = (_local33 * ((_local17 * _local20) - (_local18 * _local19))); if ((((((((_local36 <= 0)) && ((_local31 >= 0)))) && ((_local32 >= 0)))) && (((_local31 + _local32) > 0)))){ _local35 = (_local31 / (_local31 + _local32)); _arg1.x = (_local10.x + (_local35 * (_local11.x - _local10.x))); _arg1.y = (_local10.y + (_local35 * (_local11.y - _local10.y))); _arg2.x = (_local13.x + (_local35 * (_local14.x - _local13.x))); _arg2.y = (_local13.y + (_local35 * (_local14.y - _local13.y))); _local9.SetV(_local11); _local12.SetV(_local14); _local6.SetV(_local8); return (2); }; _local37 = (_local33 * ((_local19 * _local16) - (_local20 * _local15))); if ((((((((_local37 <= 0)) && ((_local29 >= 0)))) && ((_local30 >= 0)))) && (((_local29 + _local30) > 0)))){ _local35 = (_local29 / (_local29 + _local30)); _arg1.x = (_local9.x + (_local35 * (_local11.x - _local9.x))); _arg1.y = (_local9.y + (_local35 * (_local11.y - _local9.y))); _arg2.x = (_local12.x + (_local35 * (_local14.x - _local12.x))); _arg2.y = (_local12.y + (_local35 * (_local14.y - _local12.y))); _local10.SetV(_local11); _local13.SetV(_local14); _local7.SetV(_local8); return (2); }; _local38 = ((_local36 + _local37) + _local34); _local38 = (1 / _local38); _local39 = (_local36 * _local38); _local40 = (_local37 * _local38); _local41 = ((1 - _local39) - _local40); _arg1.x = (((_local39 * _local9.x) + (_local40 * _local10.x)) + (_local41 * _local11.x)); _arg1.y = (((_local39 * _local9.y) + (_local40 * _local10.y)) + (_local41 * _local11.y)); _arg2.x = (((_local39 * _local12.x) + (_local40 * _local13.x)) + (_local41 * _local14.x)); _arg2.y = (((_local39 * _local12.y) + (_local40 * _local13.y)) + (_local41 * _local14.y)); return (3); } public static function DistancePC(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:b2PolygonShape, _arg4:b2XForm, _arg5:b2CircleShape, _arg6:b2XForm):Number{ var _local7:b2Mat22; var _local8:b2Vec2; var _local9:b2Point; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; _local9 = gPoint; _local8 = _arg5.m_localPosition; _local7 = _arg6.R; _local9.p.x = (_arg6.position.x + ((_local7.col1.x * _local8.x) + (_local7.col2.x * _local8.y))); _local9.p.y = (_arg6.position.y + ((_local7.col1.y * _local8.x) + (_local7.col2.y * _local8.y))); _local10 = DistanceGeneric(_arg1, _arg2, _arg3, _arg4, _local9, b2Math.b2XForm_identity); _local11 = (_arg5.m_radius - b2Settings.b2_toiSlop); if (_local10 > _local11){ _local10 = (_local10 - _local11); _local12 = (_arg2.x - _arg1.x); _local13 = (_arg2.y - _arg1.y); _local14 = Math.sqrt(((_local12 * _local12) + (_local13 * _local13))); _local12 = (_local12 / _local14); _local13 = (_local13 / _local14); _arg2.x = (_arg2.x - (_local11 * _local12)); _arg2.y = (_arg2.y - (_local11 * _local13)); } else { _local10 = 0; _arg2.x = _arg1.x; _arg2.y = _arg1.y; }; return (_local10); } public static function Distance(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:b2Shape, _arg4:b2XForm, _arg5:b2Shape, _arg6:b2XForm):Number{ var _local7:int; var _local8:int; _local7 = _arg3.m_type; _local8 = _arg5.m_type; if ((((_local7 == b2Shape.e_circleShape)) && ((_local8 == b2Shape.e_circleShape)))){ return (DistanceCC(_arg1, _arg2, (_arg3 as b2CircleShape), _arg4, (_arg5 as b2CircleShape), _arg6)); }; if ((((_local7 == b2Shape.e_polygonShape)) && ((_local8 == b2Shape.e_circleShape)))){ return (DistancePC(_arg1, _arg2, (_arg3 as b2PolygonShape), _arg4, (_arg5 as b2CircleShape), _arg6)); }; if ((((_local7 == b2Shape.e_circleShape)) && ((_local8 == b2Shape.e_polygonShape)))){ return (DistancePC(_arg2, _arg1, (_arg5 as b2PolygonShape), _arg6, (_arg3 as b2CircleShape), _arg4)); }; if ((((_local7 == b2Shape.e_polygonShape)) && ((_local8 == b2Shape.e_polygonShape)))){ return (DistanceGeneric(_arg1, _arg2, (_arg3 as b2PolygonShape), _arg4, (_arg5 as b2PolygonShape), _arg6)); }; return (0); } public static function ProcessTwo(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:Array, _arg4:Array, _arg5:Array):int{ var _local6:b2Vec2; var _local7:b2Vec2; var _local8:b2Vec2; var _local9:b2Vec2; var _local10:b2Vec2; var _local11:b2Vec2; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; _local6 = _arg5[0]; _local7 = _arg5[1]; _local8 = _arg3[0]; _local9 = _arg3[1]; _local10 = _arg4[0]; _local11 = _arg4[1]; _local12 = -(_local7.x); _local13 = -(_local7.y); _local14 = (_local6.x - _local7.x); _local15 = (_local6.y - _local7.y); _local16 = Math.sqrt(((_local14 * _local14) + (_local15 * _local15))); _local14 = (_local14 / _local16); _local15 = (_local15 / _local16); _local17 = ((_local12 * _local14) + (_local13 * _local15)); if ((((_local17 <= 0)) || ((_local16 < Number.MIN_VALUE)))){ _arg1.SetV(_local9); _arg2.SetV(_local11); _local8.SetV(_local9); _local10.SetV(_local11); _local6.SetV(_local7); return (1); }; _local17 = (_local17 / _local16); _arg1.x = (_local9.x + (_local17 * (_local8.x - _local9.x))); _arg1.y = (_local9.y + (_local17 * (_local8.y - _local9.y))); _arg2.x = (_local11.x + (_local17 * (_local10.x - _local11.x))); _arg2.y = (_local11.y + (_local17 * (_local10.y - _local11.y))); return (2); } } }//package Box2D.Collision
Section 18
//b2Manifold (Box2D.Collision.b2Manifold) package Box2D.Collision { import Box2D.Common.Math.*; import Box2D.Common.*; public class b2Manifold { public var points:Array; public var pointCount:int;// = 0 public var normal:b2Vec2; public function b2Manifold(){ var _local1:int; pointCount = 0; super(); points = new Array(b2Settings.b2_maxManifoldPoints); _local1 = 0; while (_local1 < b2Settings.b2_maxManifoldPoints) { points[_local1] = new b2ManifoldPoint(); _local1++; }; normal = new b2Vec2(); } public function Set(_arg1:b2Manifold):void{ var _local2:int; pointCount = _arg1.pointCount; _local2 = 0; while (_local2 < b2Settings.b2_maxManifoldPoints) { (points[_local2] as b2ManifoldPoint).Set(_arg1.points[_local2]); _local2++; }; normal.SetV(_arg1.normal); } public function Reset():void{ var _local1:int; _local1 = 0; while (_local1 < b2Settings.b2_maxManifoldPoints) { (points[_local1] as b2ManifoldPoint).Reset(); _local1++; }; normal.SetZero(); pointCount = 0; } } }//package Box2D.Collision
Section 19
//b2ManifoldPoint (Box2D.Collision.b2ManifoldPoint) package Box2D.Collision { import Box2D.Common.Math.*; public class b2ManifoldPoint { public var separation:Number; public var localPoint2:b2Vec2; public var normalImpulse:Number; public var tangentImpulse:Number; public var localPoint1:b2Vec2; public var id:b2ContactID; public function b2ManifoldPoint(){ localPoint1 = new b2Vec2(); localPoint2 = new b2Vec2(); id = new b2ContactID(); super(); } public function Set(_arg1:b2ManifoldPoint):void{ localPoint1.SetV(_arg1.localPoint1); localPoint2.SetV(_arg1.localPoint2); separation = _arg1.separation; normalImpulse = _arg1.normalImpulse; tangentImpulse = _arg1.tangentImpulse; id.key = _arg1.id.key; } public function Reset():void{ localPoint1.SetZero(); localPoint2.SetZero(); separation = 0; normalImpulse = 0; tangentImpulse = 0; id.key = 0; } } }//package Box2D.Collision
Section 20
//b2OBB (Box2D.Collision.b2OBB) package Box2D.Collision { import Box2D.Common.Math.*; public class b2OBB { public var R:b2Mat22; public var center:b2Vec2; public var extents:b2Vec2; public function b2OBB(){ R = new b2Mat22(); center = new b2Vec2(); extents = new b2Vec2(); super(); } } }//package Box2D.Collision
Section 21
//b2Pair (Box2D.Collision.b2Pair) package Box2D.Collision { import Box2D.Common.*; public class b2Pair { public var userData;// = null public var proxyId1:uint; public var proxyId2:uint; public var status:uint; public var next:uint; public static var e_pairFinal:uint = 4; public static var b2_tableMask:int = (b2_tableCapacity - 1); public static var e_pairRemoved:uint = 2; public static var b2_nullPair:uint = b2Settings.USHRT_MAX; public static var e_pairBuffered:uint = 1; public static var b2_nullProxy:uint = b2Settings.USHRT_MAX; public static var b2_tableCapacity:int = b2Settings.b2_maxPairs; public function b2Pair(){ userData = null; super(); } public function SetBuffered():void{ status = (status | e_pairBuffered); } public function IsBuffered():Boolean{ return (((status & e_pairBuffered) == e_pairBuffered)); } public function IsFinal():Boolean{ return (((status & e_pairFinal) == e_pairFinal)); } public function ClearRemoved():void{ status = (status & ~(e_pairRemoved)); } public function SetFinal():void{ status = (status | e_pairFinal); } public function IsRemoved():Boolean{ return (((status & e_pairRemoved) == e_pairRemoved)); } public function ClearBuffered():void{ status = (status & ~(e_pairBuffered)); } public function SetRemoved():void{ status = (status | e_pairRemoved); } } }//package Box2D.Collision
Section 22
//b2PairCallback (Box2D.Collision.b2PairCallback) package Box2D.Collision { public class b2PairCallback { public function PairRemoved(_arg1, _arg2, _arg3):void{ } public function PairAdded(_arg1, _arg2){ return (null); } } }//package Box2D.Collision
Section 23
//b2PairManager (Box2D.Collision.b2PairManager) package Box2D.Collision { import Box2D.Common.Math.*; import Box2D.Common.*; public class b2PairManager { public var m_pairCount:int; public var m_pairBuffer:Array; public var m_callback:b2PairCallback; public var m_pairs:Array; public var m_pairBufferCount:int; public var m_hashTable:Array; public var m_broadPhase:b2BroadPhase; public var m_freePair:uint; public function b2PairManager(){ var _local1:uint; super(); m_hashTable = new Array(b2Pair.b2_tableCapacity); _local1 = 0; while (_local1 < b2Pair.b2_tableCapacity) { m_hashTable[_local1] = b2Pair.b2_nullPair; _local1++; }; m_pairs = new Array(b2Settings.b2_maxPairs); _local1 = 0; while (_local1 < b2Settings.b2_maxPairs) { m_pairs[_local1] = new b2Pair(); _local1++; }; m_pairBuffer = new Array(b2Settings.b2_maxPairs); _local1 = 0; while (_local1 < b2Settings.b2_maxPairs) { m_pairBuffer[_local1] = new b2BufferedPair(); _local1++; }; _local1 = 0; while (_local1 < b2Settings.b2_maxPairs) { m_pairs[_local1].proxyId1 = b2Pair.b2_nullProxy; m_pairs[_local1].proxyId2 = b2Pair.b2_nullProxy; m_pairs[_local1].userData = null; m_pairs[_local1].status = 0; m_pairs[_local1].next = (_local1 + 1); _local1++; }; m_pairs[int((b2Settings.b2_maxPairs - 1))].next = b2Pair.b2_nullPair; m_pairCount = 0; m_pairBufferCount = 0; } private function FindHash(_arg1:uint, _arg2:uint, _arg3:uint):b2Pair{ var _local4:b2Pair; var _local5:uint; _local5 = m_hashTable[_arg3]; _local4 = m_pairs[_local5]; while (((!((_local5 == b2Pair.b2_nullPair))) && ((Equals(_local4, _arg1, _arg2) == false)))) { _local5 = _local4.next; _local4 = m_pairs[_local5]; }; if (_local5 == b2Pair.b2_nullPair){ return (null); }; return (_local4); } private function Find(_arg1:uint, _arg2:uint):b2Pair{ var _local3:uint; var _local4:uint; if (_arg1 > _arg2){ _local4 = _arg1; _arg1 = _arg2; _arg2 = _local4; }; _local3 = (Hash(_arg1, _arg2) & b2Pair.b2_tableMask); return (FindHash(_arg1, _arg2, _local3)); } private function ValidateBuffer():void{ } public function Commit():void{ var _local1:b2BufferedPair; var _local2:int; var _local3:int; var _local4:Array; var _local5:b2Pair; var _local6:b2Proxy; var _local7:b2Proxy; _local3 = 0; _local4 = m_broadPhase.m_proxyPool; _local2 = 0; while (_local2 < m_pairBufferCount) { _local1 = m_pairBuffer[_local2]; _local5 = Find(_local1.proxyId1, _local1.proxyId2); _local5.ClearBuffered(); _local6 = _local4[_local5.proxyId1]; _local7 = _local4[_local5.proxyId2]; if (_local5.IsRemoved()){ if (_local5.IsFinal() == true){ m_callback.PairRemoved(_local6.userData, _local7.userData, _local5.userData); }; _local1 = m_pairBuffer[_local3]; _local1.proxyId1 = _local5.proxyId1; _local1.proxyId2 = _local5.proxyId2; _local3++; } else { if (_local5.IsFinal() == false){ _local5.userData = m_callback.PairAdded(_local6.userData, _local7.userData); _local5.SetFinal(); }; }; _local2++; }; _local2 = 0; while (_local2 < _local3) { _local1 = m_pairBuffer[_local2]; RemovePair(_local1.proxyId1, _local1.proxyId2); _local2++; }; m_pairBufferCount = 0; if (b2BroadPhase.s_validate){ ValidateTable(); }; } public function RemoveBufferedPair(_arg1:int, _arg2:int):void{ var _local3:b2BufferedPair; var _local4:b2Pair; _local4 = Find(_arg1, _arg2); if (_local4 == null){ return; }; if (_local4.IsBuffered() == false){ _local4.SetBuffered(); _local3 = m_pairBuffer[m_pairBufferCount]; _local3.proxyId1 = _local4.proxyId1; _local3.proxyId2 = _local4.proxyId2; m_pairBufferCount++; }; _local4.SetRemoved(); if (b2BroadPhase.s_validate){ ValidateBuffer(); }; } private function RemovePair(_arg1:uint, _arg2:uint){ var _local3:b2Pair; var _local4:uint; var _local5:uint; var _local6:b2Pair; var _local7:uint; var _local8:uint; var _local9:*; if (_arg1 > _arg2){ _local7 = _arg1; _arg1 = _arg2; _arg2 = _local7; }; _local4 = (Hash(_arg1, _arg2) & b2Pair.b2_tableMask); _local5 = m_hashTable[_local4]; _local6 = null; while (_local5 != b2Pair.b2_nullPair) { if (Equals(m_pairs[_local5], _arg1, _arg2)){ _local8 = _local5; _local3 = m_pairs[_local5]; if (_local6){ _local6.next = _local3.next; } else { m_hashTable[_local4] = _local3.next; }; _local3 = m_pairs[_local8]; _local9 = _local3.userData; _local3.next = m_freePair; _local3.proxyId1 = b2Pair.b2_nullProxy; _local3.proxyId2 = b2Pair.b2_nullProxy; _local3.userData = null; _local3.status = 0; m_freePair = _local8; m_pairCount--; return (_local9); } else { _local6 = m_pairs[_local5]; _local5 = _local6.next; }; }; return (null); } public function Initialize(_arg1:b2BroadPhase, _arg2:b2PairCallback):void{ m_broadPhase = _arg1; m_callback = _arg2; } public function AddBufferedPair(_arg1:int, _arg2:int):void{ var _local3:b2BufferedPair; var _local4:b2Pair; _local4 = AddPair(_arg1, _arg2); if (_local4.IsBuffered() == false){ _local4.SetBuffered(); _local3 = m_pairBuffer[m_pairBufferCount]; _local3.proxyId1 = _local4.proxyId1; _local3.proxyId2 = _local4.proxyId2; m_pairBufferCount++; }; _local4.ClearRemoved(); if (b2BroadPhase.s_validate){ ValidateBuffer(); }; } private function AddPair(_arg1:uint, _arg2:uint):b2Pair{ var _local3:uint; var _local4:b2Pair; var _local5:uint; var _local6:uint; if (_arg1 > _arg2){ _local6 = _arg1; _arg1 = _arg2; _arg2 = _local6; }; _local3 = (Hash(_arg1, _arg2) & b2Pair.b2_tableMask); _local4 = FindHash(_arg1, _arg2, _local3); if (_local4 != null){ return (_local4); }; _local5 = m_freePair; _local4 = m_pairs[_local5]; m_freePair = _local4.next; _local4.proxyId1 = _arg1; _local4.proxyId2 = _arg2; _local4.status = 0; _local4.userData = null; _local4.next = m_hashTable[_local3]; m_hashTable[_local3] = _local5; m_pairCount++; return (_local4); } private function ValidateTable():void{ } public static function EqualsPair(_arg1:b2BufferedPair, _arg2:b2BufferedPair):Boolean{ return ((((_arg1.proxyId1 == _arg2.proxyId1)) && ((_arg1.proxyId2 == _arg2.proxyId2)))); } public static function Hash(_arg1:uint, _arg2:uint):uint{ var _local3:uint; _local3 = (((_arg2 << 16) & 4294901760) | _arg1); _local3 = (~(_local3) + ((_local3 << 15) & 4294934528)); _local3 = (_local3 ^ ((_local3 >> 12) & 1048575)); _local3 = (_local3 + ((_local3 << 2) & 4294967292)); _local3 = (_local3 ^ ((_local3 >> 4) & 268435455)); _local3 = (_local3 * 2057); _local3 = (_local3 ^ ((_local3 >> 16) & 0xFFFF)); return (_local3); } public static function Equals(_arg1:b2Pair, _arg2:uint, _arg3:uint):Boolean{ return ((((_arg1.proxyId1 == _arg2)) && ((_arg1.proxyId2 == _arg3)))); } } }//package Box2D.Collision
Section 24
//b2Point (Box2D.Collision.b2Point) package Box2D.Collision { import Box2D.Common.Math.*; public class b2Point { public var p:b2Vec2; public function b2Point(){ p = new b2Vec2(); super(); } public function GetFirstVertex(_arg1:b2XForm):b2Vec2{ return (p); } public function Support(_arg1:b2XForm, _arg2:Number, _arg3:Number):b2Vec2{ return (p); } } }//package Box2D.Collision
Section 25
//b2Proxy (Box2D.Collision.b2Proxy) package Box2D.Collision { public class b2Proxy { public var overlapCount:uint; public var lowerBounds:Array; public var upperBounds:Array; public var userData;// = null public var timeStamp:uint; public function b2Proxy(){ lowerBounds = [uint(0), uint(0)]; upperBounds = [uint(0), uint(0)]; userData = null; super(); } public function GetNext():uint{ return (lowerBounds[0]); } public function IsValid():Boolean{ return (!((overlapCount == b2BroadPhase.b2_invalid))); } public function SetNext(_arg1:uint):void{ lowerBounds[0] = (_arg1 & 0xFFFF); } } }//package Box2D.Collision
Section 26
//b2Segment (Box2D.Collision.b2Segment) package Box2D.Collision { import Box2D.Common.Math.*; public class b2Segment { public var p1:b2Vec2; public var p2:b2Vec2; public function b2Segment(){ p1 = new b2Vec2(); p2 = new b2Vec2(); super(); } public function TestSegment(_arg1:Array, _arg2:b2Vec2, _arg3:b2Segment, _arg4:Number):Boolean{ var _local5:b2Vec2; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; _local5 = _arg3.p1; _local6 = (_arg3.p2.x - _local5.x); _local7 = (_arg3.p2.y - _local5.y); _local8 = (p2.x - p1.x); _local9 = (p2.y - p1.y); _local10 = _local9; _local11 = -(_local8); _local12 = (100 * Number.MIN_VALUE); _local13 = -(((_local6 * _local10) + (_local7 * _local11))); if (_local13 > _local12){ _local14 = (_local5.x - p1.x); _local15 = (_local5.y - p1.y); _local16 = ((_local14 * _local10) + (_local15 * _local11)); if ((((0 <= _local16)) && ((_local16 <= (_arg4 * _local13))))){ _local17 = ((-(_local7) * _local15) + (_local7 * _local14)); if (((((-(_local12) * _local13) <= _local17)) && ((_local17 <= (_local13 * (1 + _local12)))))){ _local16 = (_local16 / _local13); _local18 = Math.sqrt(((_local10 * _local10) + (_local11 * _local11))); _local10 = (_local10 / _local18); _local11 = (_local11 / _local18); _arg1[0] = _local16; _arg2.Set(_local10, _local11); return (true); }; }; }; return (false); } } }//package Box2D.Collision
Section 27
//b2TimeOfImpact (Box2D.Collision.b2TimeOfImpact) package Box2D.Collision { import Box2D.Common.Math.*; import Box2D.Collision.Shapes.*; import Box2D.Common.*; public class b2TimeOfImpact { public static var s_xf1:b2XForm = new b2XForm(); public static var s_xf2:b2XForm = new b2XForm(); public static var s_p1:b2Vec2 = new b2Vec2(); public static var s_p2:b2Vec2 = new b2Vec2(); public static function TimeOfImpact(_arg1:b2Shape, _arg2:b2Sweep, _arg3:b2Shape, _arg4:b2Sweep):Number{ var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:b2Vec2; var _local18:b2Vec2; var _local19:int; var _local20:int; var _local21:Number; var _local22:Number; var _local23:Number; var _local24:Number; var _local25:Number; var _local26:b2XForm; var _local27:b2XForm; var _local28:Number; var _local29:Number; var _local30:Number; var _local31:Number; _local7 = _arg1.m_sweepRadius; _local8 = _arg3.m_sweepRadius; _local9 = _arg2.t0; _local10 = (_arg2.c.x - _arg2.c0.x); _local11 = (_arg2.c.y - _arg2.c0.y); _local12 = (_arg4.c.x - _arg4.c0.x); _local13 = (_arg4.c.y - _arg4.c0.y); _local14 = (_arg2.a - _arg2.a0); _local15 = (_arg4.a - _arg4.a0); _local16 = 0; _local17 = s_p1; _local18 = s_p2; _local19 = 20; _local20 = 0; _local21 = 0; _local22 = 0; _local23 = 0; _local24 = 0; while (true) { _local25 = (((1 - _local16) * _local9) + _local16); _local26 = s_xf1; _local27 = s_xf2; _arg2.GetXForm(_local26, _local25); _arg4.GetXForm(_local27, _local25); _local23 = b2Distance.Distance(_local17, _local18, _arg1, _local26, _arg3, _local27); if (_local20 == 0){ if (_local23 > (2 * b2Settings.b2_toiSlop)){ _local24 = (1.5 * b2Settings.b2_toiSlop); } else { _local5 = (0.05 * b2Settings.b2_toiSlop); _local6 = (_local23 - (0.5 * b2Settings.b2_toiSlop)); _local24 = ((_local5 > _local6)) ? _local5 : _local6; }; }; if (((((_local23 - _local24) < (0.05 * b2Settings.b2_toiSlop))) || ((_local20 == _local19)))){ break; }; _local21 = (_local18.x - _local17.x); _local22 = (_local18.y - _local17.y); _local28 = Math.sqrt(((_local21 * _local21) + (_local22 * _local22))); _local21 = (_local21 / _local28); _local22 = (_local22 / _local28); _local29 = ((((_local21 * (_local10 - _local12)) + (_local22 * (_local11 - _local13))) + (((_local14 < 0)) ? -(_local14) : _local14 * _local7)) + (((_local15 < 0)) ? -(_local15) : _local15 * _local8)); if (_local29 == 0){ _local16 = 1; break; }; _local30 = ((_local23 - _local24) / _local29); _local31 = (_local16 + _local30); if ((((_local31 < 0)) || ((1 < _local31)))){ _local16 = 1; break; }; if (_local31 < ((1 + (100 * Number.MIN_VALUE)) * _local16)){ break; }; _local16 = _local31; _local20++; }; return (_local16); } } }//package Box2D.Collision
Section 28
//ClipVertex (Box2D.Collision.ClipVertex) package Box2D.Collision { import Box2D.Common.Math.*; public class ClipVertex { public var v:b2Vec2; public var id:b2ContactID; public function ClipVertex(){ v = new b2Vec2(); id = new b2ContactID(); super(); } } }//package Box2D.Collision
Section 29
//Features (Box2D.Collision.Features) package Box2D.Collision { public class Features { public var _referenceEdge:int; public var _incidentEdge:int; public var _flip:int; public var _incidentVertex:int; public var _m_id:b2ContactID; public function get referenceEdge():int{ return (_referenceEdge); } public function set incidentVertex(_arg1:int):void{ _incidentVertex = _arg1; _m_id._key = ((_m_id._key & 4278255615) | ((_incidentVertex << 16) & 0xFF0000)); } public function get flip():int{ return (_flip); } public function get incidentEdge():int{ return (_incidentEdge); } public function set referenceEdge(_arg1:int):void{ _referenceEdge = _arg1; _m_id._key = ((_m_id._key & 4294967040) | (_referenceEdge & 0xFF)); } public function set flip(_arg1:int):void{ _flip = _arg1; _m_id._key = ((_m_id._key & 0xFFFFFF) | ((_flip << 24) & 4278190080)); } public function get incidentVertex():int{ return (_incidentVertex); } public function set incidentEdge(_arg1:int):void{ _incidentEdge = _arg1; _m_id._key = ((_m_id._key & 4294902015) | ((_incidentEdge << 8) & 0xFF00)); } } }//package Box2D.Collision
Section 30
//b2Mat22 (Box2D.Common.Math.b2Mat22) package Box2D.Common.Math { public class b2Mat22 { public var col1:b2Vec2; public var col2:b2Vec2; public function b2Mat22(_arg1:Number=0, _arg2:b2Vec2=null, _arg3:b2Vec2=null){ var _local4:Number; var _local5:Number; col1 = new b2Vec2(); col2 = new b2Vec2(); super(); if (((!((_arg2 == null))) && (!((_arg3 == null))))){ col1.SetV(_arg2); col2.SetV(_arg3); } else { _local4 = Math.cos(_arg1); _local5 = Math.sin(_arg1); col1.x = _local4; col2.x = -(_local5); col1.y = _local5; col2.y = _local4; }; } public function SetIdentity():void{ col1.x = 1; col2.x = 0; col1.y = 0; col2.y = 1; } public function Set(_arg1:Number):void{ var _local2:Number; var _local3:Number; _local2 = Math.cos(_arg1); _local3 = Math.sin(_arg1); col1.x = _local2; col2.x = -(_local3); col1.y = _local3; col2.y = _local2; } public function SetVV(_arg1:b2Vec2, _arg2:b2Vec2):void{ col1.SetV(_arg1); col2.SetV(_arg2); } public function SetZero():void{ col1.x = 0; col2.x = 0; col1.y = 0; col2.y = 0; } public function SetM(_arg1:b2Mat22):void{ col1.SetV(_arg1.col1); col2.SetV(_arg1.col2); } public function AddM(_arg1:b2Mat22):void{ col1.x = (col1.x + _arg1.col1.x); col1.y = (col1.y + _arg1.col1.y); col2.x = (col2.x + _arg1.col2.x); col2.y = (col2.y + _arg1.col2.y); } public function Abs():void{ col1.Abs(); col2.Abs(); } public function Copy():b2Mat22{ return (new b2Mat22(0, col1, col2)); } public function Invert(_arg1:b2Mat22):b2Mat22{ var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; _local2 = col1.x; _local3 = col2.x; _local4 = col1.y; _local5 = col2.y; _local6 = ((_local2 * _local5) - (_local3 * _local4)); _local6 = (1 / _local6); _arg1.col1.x = (_local6 * _local5); _arg1.col2.x = (-(_local6) * _local3); _arg1.col1.y = (-(_local6) * _local4); _arg1.col2.y = (_local6 * _local2); return (_arg1); } public function GetAngle():Number{ return (Math.atan2(col1.y, col1.x)); } public function Solve(_arg1:b2Vec2, _arg2:Number, _arg3:Number):b2Vec2{ var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; _local4 = col1.x; _local5 = col2.x; _local6 = col1.y; _local7 = col2.y; _local8 = ((_local4 * _local7) - (_local5 * _local6)); _local8 = (1 / _local8); _arg1.x = (_local8 * ((_local7 * _arg2) - (_local5 * _arg3))); _arg1.y = (_local8 * ((_local4 * _arg3) - (_local6 * _arg2))); return (_arg1); } } }//package Box2D.Common.Math
Section 31
//b2Math (Box2D.Common.Math.b2Math) package Box2D.Common.Math { public class b2Math { public static const b2Mat22_identity:b2Mat22 = new b2Mat22(0, new b2Vec2(1, 0), new b2Vec2(0, 1)); public static const b2XForm_identity:b2XForm = new b2XForm(b2Vec2_zero, b2Mat22_identity); public static const b2Vec2_zero:b2Vec2 = new b2Vec2(0, 0); public static function b2CrossVF(_arg1:b2Vec2, _arg2:Number):b2Vec2{ var _local3:b2Vec2; _local3 = new b2Vec2((_arg2 * _arg1.y), (-(_arg2) * _arg1.x)); return (_local3); } public static function AddVV(_arg1:b2Vec2, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2; _local3 = new b2Vec2((_arg1.x + _arg2.x), (_arg1.y + _arg2.y)); return (_local3); } public static function b2IsValid(_arg1:Number):Boolean{ return (isFinite(_arg1)); } public static function b2MinV(_arg1:b2Vec2, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2; _local3 = new b2Vec2(b2Min(_arg1.x, _arg2.x), b2Min(_arg1.y, _arg2.y)); return (_local3); } public static function b2MulX(_arg1:b2XForm, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2; _local3 = b2MulMV(_arg1.R, _arg2); _local3.x = (_local3.x + _arg1.position.x); _local3.y = (_local3.y + _arg1.position.y); return (_local3); } public static function b2DistanceSquared(_arg1:b2Vec2, _arg2:b2Vec2):Number{ var _local3:Number; var _local4:Number; _local3 = (_arg1.x - _arg2.x); _local4 = (_arg1.y - _arg2.y); return (((_local3 * _local3) + (_local4 * _local4))); } public static function b2Swap(_arg1:Array, _arg2:Array):void{ var _local3:*; _local3 = _arg1[0]; _arg1[0] = _arg2[0]; _arg2[0] = _local3; } public static function b2AbsM(_arg1:b2Mat22):b2Mat22{ var _local2:b2Mat22; _local2 = new b2Mat22(0, b2AbsV(_arg1.col1), b2AbsV(_arg1.col2)); return (_local2); } public static function SubtractVV(_arg1:b2Vec2, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2; _local3 = new b2Vec2((_arg1.x - _arg2.x), (_arg1.y - _arg2.y)); return (_local3); } public static function b2MulXT(_arg1:b2XForm, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2; var _local4:Number; _local3 = SubtractVV(_arg2, _arg1.position); _local4 = ((_local3.x * _arg1.R.col1.x) + (_local3.y * _arg1.R.col1.y)); _local3.y = ((_local3.x * _arg1.R.col2.x) + (_local3.y * _arg1.R.col2.y)); _local3.x = _local4; return (_local3); } public static function b2Abs(_arg1:Number):Number{ return (((_arg1 > 0)) ? _arg1 : -(_arg1)); } public static function b2Clamp(_arg1:Number, _arg2:Number, _arg3:Number):Number{ return (b2Max(_arg2, b2Min(_arg1, _arg3))); } public static function b2AbsV(_arg1:b2Vec2):b2Vec2{ var _local2:b2Vec2; _local2 = new b2Vec2(b2Abs(_arg1.x), b2Abs(_arg1.y)); return (_local2); } public static function MulFV(_arg1:Number, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2; _local3 = new b2Vec2((_arg1 * _arg2.x), (_arg1 * _arg2.y)); return (_local3); } public static function b2CrossVV(_arg1:b2Vec2, _arg2:b2Vec2):Number{ return (((_arg1.x * _arg2.y) - (_arg1.y * _arg2.x))); } public static function b2Dot(_arg1:b2Vec2, _arg2:b2Vec2):Number{ return (((_arg1.x * _arg2.x) + (_arg1.y * _arg2.y))); } public static function b2CrossFV(_arg1:Number, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2; _local3 = new b2Vec2((-(_arg1) * _arg2.y), (_arg1 * _arg2.x)); return (_local3); } public static function AddMM(_arg1:b2Mat22, _arg2:b2Mat22):b2Mat22{ var _local3:b2Mat22; _local3 = new b2Mat22(0, AddVV(_arg1.col1, _arg2.col1), AddVV(_arg1.col2, _arg2.col2)); return (_local3); } public static function b2Distance(_arg1:b2Vec2, _arg2:b2Vec2):Number{ var _local3:Number; var _local4:Number; _local3 = (_arg1.x - _arg2.x); _local4 = (_arg1.y - _arg2.y); return (Math.sqrt(((_local3 * _local3) + (_local4 * _local4)))); } public static function b2MulTMM(_arg1:b2Mat22, _arg2:b2Mat22):b2Mat22{ var _local3:b2Vec2; var _local4:b2Vec2; var _local5:b2Mat22; _local3 = new b2Vec2(b2Dot(_arg1.col1, _arg2.col1), b2Dot(_arg1.col2, _arg2.col1)); _local4 = new b2Vec2(b2Dot(_arg1.col1, _arg2.col2), b2Dot(_arg1.col2, _arg2.col2)); _local5 = new b2Mat22(0, _local3, _local4); return (_local5); } public static function b2MaxV(_arg1:b2Vec2, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2; _local3 = new b2Vec2(b2Max(_arg1.x, _arg2.x), b2Max(_arg1.y, _arg2.y)); return (_local3); } public static function b2IsPowerOfTwo(_arg1:uint):Boolean{ var _local2:Boolean; _local2 = (((_arg1 > 0)) && (((_arg1 & (_arg1 - 1)) == 0))); return (_local2); } public static function b2ClampV(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:b2Vec2):b2Vec2{ return (b2MaxV(_arg2, b2MinV(_arg1, _arg3))); } public static function b2RandomRange(_arg1:Number, _arg2:Number):Number{ var _local3:Number; _local3 = Math.random(); _local3 = (((_arg2 - _arg1) * _local3) + _arg1); return (_local3); } public static function b2MulTMV(_arg1:b2Mat22, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2; _local3 = new b2Vec2(b2Dot(_arg2, _arg1.col1), b2Dot(_arg2, _arg1.col2)); return (_local3); } public static function b2Min(_arg1:Number, _arg2:Number):Number{ return (((_arg1 < _arg2)) ? _arg1 : _arg2); } public static function b2Random():Number{ return (((Math.random() * 2) - 1)); } public static function b2MulMM(_arg1:b2Mat22, _arg2:b2Mat22):b2Mat22{ var _local3:b2Mat22; _local3 = new b2Mat22(0, b2MulMV(_arg1, _arg2.col1), b2MulMV(_arg1, _arg2.col2)); return (_local3); } public static function b2NextPowerOfTwo(_arg1:uint):uint{ _arg1 = (_arg1 | ((_arg1 >> 1) & 2147483647)); _arg1 = (_arg1 | ((_arg1 >> 2) & 1073741823)); _arg1 = (_arg1 | ((_arg1 >> 4) & 268435455)); _arg1 = (_arg1 | ((_arg1 >> 8) & 0xFFFFFF)); _arg1 = (_arg1 | ((_arg1 >> 16) & 0xFFFF)); return ((_arg1 + 1)); } public static function b2Max(_arg1:Number, _arg2:Number):Number{ return (((_arg1 > _arg2)) ? _arg1 : _arg2); } public static function b2MulMV(_arg1:b2Mat22, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2; _local3 = new b2Vec2(((_arg1.col1.x * _arg2.x) + (_arg1.col2.x * _arg2.y)), ((_arg1.col1.y * _arg2.x) + (_arg1.col2.y * _arg2.y))); return (_local3); } } }//package Box2D.Common.Math
Section 32
//b2Sweep (Box2D.Common.Math.b2Sweep) package Box2D.Common.Math { public class b2Sweep { public var localCenter:b2Vec2; public var c:b2Vec2; public var a:Number; public var c0:b2Vec2; public var a0:Number; public var t0:Number; public function b2Sweep(){ localCenter = new b2Vec2(); c0 = new b2Vec2(); c = new b2Vec2(); super(); } public function Advance(_arg1:Number):void{ var _local2:Number; if ((((t0 < _arg1)) && (((1 - t0) > Number.MIN_VALUE)))){ _local2 = ((_arg1 - t0) / (1 - t0)); c0.x = (((1 - _local2) * c0.x) + (_local2 * c.x)); c0.y = (((1 - _local2) * c0.y) + (_local2 * c.y)); a0 = (((1 - _local2) * a0) + (_local2 * a)); t0 = _arg1; }; } public function GetXForm(_arg1:b2XForm, _arg2:Number):void{ var _local3:b2Mat22; var _local4:Number; var _local5:Number; if ((1 - t0) > Number.MIN_VALUE){ _local4 = ((_arg2 - t0) / (1 - t0)); _arg1.position.x = (((1 - _local4) * c0.x) + (_local4 * c.x)); _arg1.position.y = (((1 - _local4) * c0.y) + (_local4 * c.y)); _local5 = (((1 - _local4) * a0) + (_local4 * a)); _arg1.R.Set(_local5); } else { _arg1.position.SetV(c); _arg1.R.Set(a); }; _local3 = _arg1.R; _arg1.position.x = (_arg1.position.x - ((_local3.col1.x * localCenter.x) + (_local3.col2.x * localCenter.y))); _arg1.position.y = (_arg1.position.y - ((_local3.col1.y * localCenter.x) + (_local3.col2.y * localCenter.y))); } } }//package Box2D.Common.Math
Section 33
//b2Vec2 (Box2D.Common.Math.b2Vec2) package Box2D.Common.Math { public class b2Vec2 { public var x:Number; public var y:Number; public function b2Vec2(_arg1:Number=0, _arg2:Number=0):void{ x = _arg1; y = _arg2; } public function Set(_arg1:Number=0, _arg2:Number=0):void{ x = _arg1; y = _arg2; } public function Multiply(_arg1:Number):void{ x = (x * _arg1); y = (y * _arg1); } public function Length():Number{ return (Math.sqrt(((x * x) + (y * y)))); } public function LengthSquared():Number{ return (((x * x) + (y * y))); } public function SetZero():void{ x = 0; y = 0; } public function Add(_arg1:b2Vec2):void{ x = (x + _arg1.x); y = (y + _arg1.y); } public function MaxV(_arg1:b2Vec2):void{ x = ((x > _arg1.x)) ? x : _arg1.x; y = ((y > _arg1.y)) ? y : _arg1.y; } public function SetV(_arg1:b2Vec2):void{ x = _arg1.x; y = _arg1.y; } public function Negative():b2Vec2{ return (new b2Vec2(-(x), -(y))); } public function CrossVF(_arg1:Number):void{ var _local2:Number; _local2 = x; x = (_arg1 * y); y = (-(_arg1) * _local2); } public function Abs():void{ if (x < 0){ x = -(x); }; if (y < 0){ y = -(y); }; } public function Copy():b2Vec2{ return (new b2Vec2(x, y)); } public function MulTM(_arg1:b2Mat22):void{ var _local2:Number; _local2 = b2Math.b2Dot(this, _arg1.col1); y = b2Math.b2Dot(this, _arg1.col2); x = _local2; } public function IsValid():Boolean{ return (((b2Math.b2IsValid(x)) && (b2Math.b2IsValid(y)))); } public function MinV(_arg1:b2Vec2):void{ x = ((x < _arg1.x)) ? x : _arg1.x; y = ((y < _arg1.y)) ? y : _arg1.y; } public function MulM(_arg1:b2Mat22):void{ var _local2:Number; _local2 = x; x = ((_arg1.col1.x * _local2) + (_arg1.col2.x * y)); y = ((_arg1.col1.y * _local2) + (_arg1.col2.y * y)); } public function Normalize():Number{ var _local1:Number; var _local2:Number; _local1 = Math.sqrt(((x * x) + (y * y))); if (_local1 < Number.MIN_VALUE){ return (0); }; _local2 = (1 / _local1); x = (x * _local2); y = (y * _local2); return (_local1); } public function Subtract(_arg1:b2Vec2):void{ x = (x - _arg1.x); y = (y - _arg1.y); } public function CrossFV(_arg1:Number):void{ var _local2:Number; _local2 = x; x = (-(_arg1) * y); y = (_arg1 * _local2); } public static function Make(_arg1:Number, _arg2:Number):b2Vec2{ return (new b2Vec2(_arg1, _arg2)); } } }//package Box2D.Common.Math
Section 34
//b2XForm (Box2D.Common.Math.b2XForm) package Box2D.Common.Math { public class b2XForm { public var R:b2Mat22; public var position:b2Vec2; public function b2XForm(_arg1:b2Vec2=null, _arg2:b2Mat22=null):void{ position = new b2Vec2(); R = new b2Mat22(); super(); if (_arg1){ position.SetV(_arg1); R.SetM(_arg2); }; } public function Initialize(_arg1:b2Vec2, _arg2:b2Mat22):void{ position.SetV(_arg1); R.SetM(_arg2); } public function Set(_arg1:b2XForm):void{ position.SetV(_arg1.position); R.SetM(_arg1.R); } public function SetIdentity():void{ position.SetZero(); R.SetIdentity(); } } }//package Box2D.Common.Math
Section 35
//b2Color (Box2D.Common.b2Color) package Box2D.Common { import Box2D.Common.Math.*; public class b2Color { private var _g:uint;// = 0 private var _b:uint;// = 0 private var _r:uint;// = 0 public function b2Color(_arg1:Number, _arg2:Number, _arg3:Number){ _r = 0; _g = 0; _b = 0; super(); _r = uint((0xFF * b2Math.b2Clamp(_arg1, 0, 1))); _g = uint((0xFF * b2Math.b2Clamp(_arg2, 0, 1))); _b = uint((0xFF * b2Math.b2Clamp(_arg3, 0, 1))); } public function Set(_arg1:Number, _arg2:Number, _arg3:Number):void{ _r = uint((0xFF * b2Math.b2Clamp(_arg1, 0, 1))); _g = uint((0xFF * b2Math.b2Clamp(_arg2, 0, 1))); _b = uint((0xFF * b2Math.b2Clamp(_arg3, 0, 1))); } public function get color():uint{ return (((_r | (_g << 8)) | (_b << 16))); } public function set r(_arg1:Number):void{ _r = uint((0xFF * b2Math.b2Clamp(_arg1, 0, 1))); } public function set b(_arg1:Number):void{ _b = uint((0xFF * b2Math.b2Clamp(_arg1, 0, 1))); } public function set g(_arg1:Number):void{ _g = uint((0xFF * b2Math.b2Clamp(_arg1, 0, 1))); } } }//package Box2D.Common
Section 36
//b2Settings (Box2D.Common.b2Settings) package Box2D.Common { import Box2D.Common.Math.*; public class b2Settings { public static const b2_angularSleepTolerance:Number = 0.0111111111111111; public static const b2_linearSleepTolerance:Number = 0.01; public static const b2_angularSlop:Number = 0.0349065850398866; public static const b2_linearSlop:Number = 0.005; public static const b2_pi:Number = 3.14159265358979; public static const b2_maxProxies:int = 0x0200; public static const b2_maxAngularVelocitySquared:Number = 62500; public static const b2_maxPolygonVertices:int = 8; public static const b2_velocityThreshold:Number = 1; public static const b2_contactBaumgarte:Number = 0.2; public static const b2_maxPairs:int = 4096; public static const b2_maxTOIContactsPerIsland:int = 32; public static const b2_timeToSleep:Number = 0.5; public static const b2_maxManifoldPoints:int = 2; public static const b2_maxAngularVelocity:Number = 250; public static const b2_maxAngularCorrection:Number = 0.139626340159546; public static const USHRT_MAX:int = 0xFFFF; public static const b2_maxLinearVelocity:Number = 200; public static const b2_maxLinearCorrection:Number = 0.2; public static const b2_toiSlop:Number = 0.04; public static const b2_maxLinearVelocitySquared:Number = 40000; public static function b2Assert(_arg1:Boolean):void{ var _local2:b2Vec2; if (!_arg1){ _local2.x++; }; } } }//package Box2D.Common
Section 37
//b2CircleContact (Box2D.Dynamics.Contacts.b2CircleContact) package Box2D.Dynamics.Contacts { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Collision.Shapes.*; import Box2D.Collision.*; public class b2CircleContact extends b2Contact { private var m_manifolds:Array; private var m0:b2Manifold; public var m_manifold:b2Manifold; private static const s_evalCP:b2ContactPoint = new b2ContactPoint(); public function b2CircleContact(_arg1:b2Shape, _arg2:b2Shape){ var _local3:b2ManifoldPoint; m_manifolds = [new b2Manifold()]; m0 = new b2Manifold(); super(_arg1, _arg2); m_manifold = m_manifolds[0]; m_manifold.pointCount = 0; _local3 = m_manifold.points[0]; _local3.normalImpulse = 0; _local3.tangentImpulse = 0; } override public function GetManifolds():Array{ return (m_manifolds); } override public function Evaluate(_arg1:b2ContactListener):void{ var _local2:b2Vec2; var _local3:b2Vec2; var _local4:b2ManifoldPoint; var _local5:b2Body; var _local6:b2Body; var _local7:b2ContactPoint; var _local8:b2ManifoldPoint; _local5 = m_shape1.m_body; _local6 = m_shape2.m_body; m0.Set(m_manifold); b2Collision.b2CollideCircles(m_manifold, (m_shape1 as b2CircleShape), _local5.m_xf, (m_shape2 as b2CircleShape), _local6.m_xf); _local7 = s_evalCP; _local7.shape1 = m_shape1; _local7.shape2 = m_shape2; _local7.friction = m_friction; _local7.restitution = m_restitution; if (m_manifold.pointCount > 0){ m_manifoldCount = 1; _local8 = m_manifold.points[0]; if (m0.pointCount == 0){ _local8.normalImpulse = 0; _local8.tangentImpulse = 0; if (_arg1){ _local7.position = _local5.GetWorldPoint(_local8.localPoint1); _local2 = _local5.GetLinearVelocityFromLocalPoint(_local8.localPoint1); _local3 = _local6.GetLinearVelocityFromLocalPoint(_local8.localPoint2); _local7.velocity.Set((_local3.x - _local2.x), (_local3.y - _local2.y)); _local7.normal.SetV(m_manifold.normal); _local7.separation = _local8.separation; _local7.id.key = _local8.id._key; _arg1.Add(_local7); }; } else { _local4 = m0.points[0]; _local8.normalImpulse = _local4.normalImpulse; _local8.tangentImpulse = _local4.tangentImpulse; if (_arg1){ _local7.position = _local5.GetWorldPoint(_local8.localPoint1); _local2 = _local5.GetLinearVelocityFromLocalPoint(_local8.localPoint1); _local3 = _local6.GetLinearVelocityFromLocalPoint(_local8.localPoint2); _local7.velocity.Set((_local3.x - _local2.x), (_local3.y - _local2.y)); _local7.normal.SetV(m_manifold.normal); _local7.separation = _local8.separation; _local7.id.key = _local8.id._key; _arg1.Persist(_local7); }; }; } else { m_manifoldCount = 0; if ((((m0.pointCount > 0)) && (_arg1))){ _local4 = m0.points[0]; _local7.position = _local5.GetWorldPoint(_local4.localPoint1); _local2 = _local5.GetLinearVelocityFromLocalPoint(_local4.localPoint1); _local3 = _local6.GetLinearVelocityFromLocalPoint(_local4.localPoint2); _local7.velocity.Set((_local3.x - _local2.x), (_local3.y - _local2.y)); _local7.normal.SetV(m0.normal); _local7.separation = _local4.separation; _local7.id.key = _local4.id._key; _arg1.Remove(_local7); }; }; } public static function Destroy(_arg1:b2Contact, _arg2):void{ } public static function Create(_arg1:b2Shape, _arg2:b2Shape, _arg3):b2Contact{ return (new b2CircleContact(_arg1, _arg2)); } } }//package Box2D.Dynamics.Contacts
Section 38
//b2Contact (Box2D.Dynamics.Contacts.b2Contact) package Box2D.Dynamics.Contacts { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Collision.Shapes.*; import Box2D.Collision.*; import Box2D.Common.*; public class b2Contact { public var m_shape1:b2Shape; public var m_shape2:b2Shape; public var m_prev:b2Contact; public var m_toi:Number; public var m_next:b2Contact; public var m_friction:Number; public var m_manifoldCount:int; public var m_node1:b2ContactEdge; public var m_node2:b2ContactEdge; public var m_restitution:Number; public var m_flags:uint; public static var e_toiFlag:uint = 8; public static var e_nonSolidFlag:uint = 1; public static var e_slowFlag:uint = 2; public static var e_islandFlag:uint = 4; public static var s_registers:Array; public static var s_initialized:Boolean = false; public function b2Contact(_arg1:b2Shape=null, _arg2:b2Shape=null){ m_node1 = new b2ContactEdge(); m_node2 = new b2ContactEdge(); super(); m_flags = 0; if (((!(_arg1)) || (!(_arg2)))){ m_shape1 = null; m_shape2 = null; return; }; if (((_arg1.IsSensor()) || (_arg2.IsSensor()))){ m_flags = (m_flags | e_nonSolidFlag); }; m_shape1 = _arg1; m_shape2 = _arg2; m_manifoldCount = 0; m_friction = Math.sqrt((m_shape1.m_friction * m_shape2.m_friction)); m_restitution = b2Math.b2Max(m_shape1.m_restitution, m_shape2.m_restitution); m_prev = null; m_next = null; m_node1.contact = null; m_node1.prev = null; m_node1.next = null; m_node1.other = null; m_node2.contact = null; m_node2.prev = null; m_node2.next = null; m_node2.other = null; } public function GetShape1():b2Shape{ return (m_shape1); } public function IsSolid():Boolean{ return (((m_flags & e_nonSolidFlag) == 0)); } public function GetNext():b2Contact{ return (m_next); } public function GetManifolds():Array{ return (null); } public function GetShape2():b2Shape{ return (m_shape2); } public function GetManifoldCount():int{ return (m_manifoldCount); } public function Update(_arg1:b2ContactListener):void{ var _local2:int; var _local3:int; var _local4:b2Body; var _local5:b2Body; _local2 = m_manifoldCount; Evaluate(_arg1); _local3 = m_manifoldCount; _local4 = m_shape1.m_body; _local5 = m_shape2.m_body; if ((((_local3 == 0)) && ((_local2 > 0)))){ _local4.WakeUp(); _local5.WakeUp(); }; if (((((((_local4.IsStatic()) || (_local4.IsBullet()))) || (_local5.IsStatic()))) || (_local5.IsBullet()))){ m_flags = (m_flags & ~(e_slowFlag)); } else { m_flags = (m_flags | e_slowFlag); }; } public function Evaluate(_arg1:b2ContactListener):void{ } public static function InitializeRegisters():void{ var _local1:int; var _local2:int; s_registers = new Array(b2Shape.e_shapeTypeCount); _local1 = 0; while (_local1 < b2Shape.e_shapeTypeCount) { s_registers[_local1] = new Array(b2Shape.e_shapeTypeCount); _local2 = 0; while (_local2 < b2Shape.e_shapeTypeCount) { s_registers[_local1][_local2] = new b2ContactRegister(); _local2++; }; _local1++; }; AddType(b2CircleContact.Create, b2CircleContact.Destroy, b2Shape.e_circleShape, b2Shape.e_circleShape); AddType(b2PolyAndCircleContact.Create, b2PolyAndCircleContact.Destroy, b2Shape.e_polygonShape, b2Shape.e_circleShape); AddType(b2PolygonContact.Create, b2PolygonContact.Destroy, b2Shape.e_polygonShape, b2Shape.e_polygonShape); } public static function Destroy(_arg1:b2Contact, _arg2):void{ var _local3:int; var _local4:int; var _local5:b2ContactRegister; var _local6:Function; if (_arg1.m_manifoldCount > 0){ _arg1.m_shape1.m_body.WakeUp(); _arg1.m_shape2.m_body.WakeUp(); }; _local3 = _arg1.m_shape1.m_type; _local4 = _arg1.m_shape2.m_type; _local5 = s_registers[_local3][_local4]; _local6 = _local5.destroyFcn; _local6(_arg1, _arg2); } public static function AddType(_arg1:Function, _arg2:Function, _arg3:int, _arg4:int):void{ s_registers[_arg3][_arg4].createFcn = _arg1; s_registers[_arg3][_arg4].destroyFcn = _arg2; s_registers[_arg3][_arg4].primary = true; if (_arg3 != _arg4){ s_registers[_arg4][_arg3].createFcn = _arg1; s_registers[_arg4][_arg3].destroyFcn = _arg2; s_registers[_arg4][_arg3].primary = false; }; } public static function Create(_arg1:b2Shape, _arg2:b2Shape, _arg3):b2Contact{ var _local4:int; var _local5:int; var _local6:b2ContactRegister; var _local7:Function; var _local8:b2Contact; var _local9:int; var _local10:b2Manifold; if (s_initialized == false){ InitializeRegisters(); s_initialized = true; }; _local4 = _arg1.m_type; _local5 = _arg2.m_type; _local6 = s_registers[_local4][_local5]; _local7 = _local6.createFcn; if (_local7 != null){ if (_local6.primary){ return (_local7(_arg1, _arg2, _arg3)); }; _local8 = _local7(_arg2, _arg1, _arg3); _local9 = 0; while (_local9 < _local8.m_manifoldCount) { _local10 = _local8.GetManifolds()[_local9]; _local8.GetManifolds()[_local9].normal = _local10.normal.Negative(); _local9++; }; return (_local8); //unresolved jump }; return (null); } } }//package Box2D.Dynamics.Contacts
Section 39
//b2ContactConstraint (Box2D.Dynamics.Contacts.b2ContactConstraint) package Box2D.Dynamics.Contacts { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Collision.*; import Box2D.Common.*; public class b2ContactConstraint { public var points:Array; public var restitution:Number; public var body1:b2Body; public var manifold:b2Manifold; public var normal:b2Vec2; public var body2:b2Body; public var friction:Number; public var pointCount:int; public function b2ContactConstraint(){ var _local1:int; normal = new b2Vec2(); super(); points = new Array(b2Settings.b2_maxManifoldPoints); _local1 = 0; while (_local1 < b2Settings.b2_maxManifoldPoints) { points[_local1] = new b2ContactConstraintPoint(); _local1++; }; } } }//package Box2D.Dynamics.Contacts
Section 40
//b2ContactConstraintPoint (Box2D.Dynamics.Contacts.b2ContactConstraintPoint) package Box2D.Dynamics.Contacts { import Box2D.Common.Math.*; public class b2ContactConstraintPoint { public var r2:b2Vec2; public var separation:Number; public var positionImpulse:Number; public var normalImpulse:Number; public var equalizedMass:Number; public var tangentMass:Number; public var tangentImpulse:Number; public var localAnchor1:b2Vec2; public var localAnchor2:b2Vec2; public var normalMass:Number; public var velocityBias:Number; public var r1:b2Vec2; public function b2ContactConstraintPoint(){ localAnchor1 = new b2Vec2(); localAnchor2 = new b2Vec2(); r1 = new b2Vec2(); r2 = new b2Vec2(); super(); } } }//package Box2D.Dynamics.Contacts
Section 41
//b2ContactEdge (Box2D.Dynamics.Contacts.b2ContactEdge) package Box2D.Dynamics.Contacts { import Box2D.Dynamics.*; public class b2ContactEdge { public var next:b2ContactEdge; public var other:b2Body; public var contact:b2Contact; public var prev:b2ContactEdge; } }//package Box2D.Dynamics.Contacts
Section 42
//b2ContactRegister (Box2D.Dynamics.Contacts.b2ContactRegister) package Box2D.Dynamics.Contacts { public class b2ContactRegister { public var primary:Boolean; public var createFcn:Function; public var destroyFcn:Function; } }//package Box2D.Dynamics.Contacts
Section 43
//b2ContactResult (Box2D.Dynamics.Contacts.b2ContactResult) package Box2D.Dynamics.Contacts { import Box2D.Common.Math.*; import Box2D.Collision.Shapes.*; import Box2D.Collision.*; public class b2ContactResult { public var normal:b2Vec2; public var position:b2Vec2; public var shape1:b2Shape; public var shape2:b2Shape; public var normalImpulse:Number; public var tangentImpulse:Number; public var id:b2ContactID; public function b2ContactResult(){ position = new b2Vec2(); normal = new b2Vec2(); id = new b2ContactID(); super(); } } }//package Box2D.Dynamics.Contacts
Section 44
//b2ContactSolver (Box2D.Dynamics.Contacts.b2ContactSolver) package Box2D.Dynamics.Contacts { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Collision.*; import Box2D.Common.*; public class b2ContactSolver { public var m_constraintCount:int; public var m_constraints:Array; public var m_allocator; public var m_step:b2TimeStep; public function b2ContactSolver(_arg1:b2TimeStep, _arg2:Array, _arg3:int, _arg4){ var _local5:b2Contact; var _local6:int; var _local7:b2Vec2; var _local8:b2Mat22; var _local9:int; var _local10:b2Body; var _local11:b2Body; var _local12:int; var _local13:Array; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:Number; var _local21:Number; var _local22:int; var _local23:b2Manifold; var _local24:Number; var _local25:Number; var _local26:b2ContactConstraint; var _local27:uint; var _local28:b2ManifoldPoint; var _local29:b2ContactConstraintPoint; var _local30:Number; var _local31:Number; var _local32:Number; var _local33:Number; var _local34:Number; var _local35:Number; var _local36:Number; var _local37:Number; var _local38:Number; var _local39:Number; var _local40:Number; var _local41:Number; var _local42:Number; var _local43:Number; var _local44:Number; var _local45:Number; var _local46:Number; var _local47:Number; m_step = new b2TimeStep(); m_constraints = new Array(); super(); m_step.dt = _arg1.dt; m_step.inv_dt = _arg1.inv_dt; m_step.maxIterations = _arg1.maxIterations; m_allocator = _arg4; m_constraintCount = 0; _local6 = 0; while (_local6 < _arg3) { _local5 = _arg2[_local6]; m_constraintCount = (m_constraintCount + _local5.m_manifoldCount); _local6++; }; _local6 = 0; while (_local6 < m_constraintCount) { m_constraints[_local6] = new b2ContactConstraint(); _local6++; }; _local9 = 0; _local6 = 0; while (_local6 < _arg3) { _local5 = _arg2[_local6]; _local10 = _local5.m_shape1.m_body; _local11 = _local5.m_shape2.m_body; _local12 = _local5.m_manifoldCount; _local13 = _local5.GetManifolds(); _local14 = _local5.m_friction; _local15 = _local5.m_restitution; _local16 = _local10.m_linearVelocity.x; _local17 = _local10.m_linearVelocity.y; _local18 = _local11.m_linearVelocity.x; _local19 = _local11.m_linearVelocity.y; _local20 = _local10.m_angularVelocity; _local21 = _local11.m_angularVelocity; _local22 = 0; while (_local22 < _local12) { _local23 = _local13[_local22]; _local24 = _local23.normal.x; _local25 = _local23.normal.y; _local26 = m_constraints[_local9]; _local26.body1 = _local10; _local26.body2 = _local11; _local26.manifold = _local23; _local26.normal.x = _local24; _local26.normal.y = _local25; _local26.pointCount = _local23.pointCount; _local26.friction = _local14; _local26.restitution = _local15; _local27 = 0; while (_local27 < _local26.pointCount) { _local28 = _local23.points[_local27]; _local29 = _local26.points[_local27]; _local29.normalImpulse = _local28.normalImpulse; _local29.tangentImpulse = _local28.tangentImpulse; _local29.separation = _local28.separation; _local29.positionImpulse = 0; _local29.localAnchor1.SetV(_local28.localPoint1); _local29.localAnchor2.SetV(_local28.localPoint2); _local8 = _local10.m_xf.R; _local32 = (_local28.localPoint1.x - _local10.m_sweep.localCenter.x); _local33 = (_local28.localPoint1.y - _local10.m_sweep.localCenter.y); _local30 = ((_local8.col1.x * _local32) + (_local8.col2.x * _local33)); _local33 = ((_local8.col1.y * _local32) + (_local8.col2.y * _local33)); _local32 = _local30; _local29.r1.Set(_local32, _local33); _local8 = _local11.m_xf.R; _local34 = (_local28.localPoint2.x - _local11.m_sweep.localCenter.x); _local35 = (_local28.localPoint2.y - _local11.m_sweep.localCenter.y); _local30 = ((_local8.col1.x * _local34) + (_local8.col2.x * _local35)); _local35 = ((_local8.col1.y * _local34) + (_local8.col2.y * _local35)); _local34 = _local30; _local29.r2.Set(_local34, _local35); _local36 = ((_local32 * _local32) + (_local33 * _local33)); _local37 = ((_local34 * _local34) + (_local35 * _local35)); _local38 = ((_local32 * _local24) + (_local33 * _local25)); _local39 = ((_local34 * _local24) + (_local35 * _local25)); _local40 = (_local10.m_invMass + _local11.m_invMass); _local40 = (_local40 + ((_local10.m_invI * (_local36 - (_local38 * _local38))) + (_local11.m_invI * (_local37 - (_local39 * _local39))))); _local29.normalMass = (1 / _local40); _local41 = ((_local10.m_mass * _local10.m_invMass) + (_local11.m_mass * _local11.m_invMass)); _local41 = (_local41 + (((_local10.m_mass * _local10.m_invI) * (_local36 - (_local38 * _local38))) + ((_local11.m_mass * _local11.m_invI) * (_local37 - (_local39 * _local39))))); _local29.equalizedMass = (1 / _local41); _local42 = _local25; _local43 = -(_local24); _local44 = ((_local32 * _local42) + (_local33 * _local43)); _local45 = ((_local34 * _local42) + (_local35 * _local43)); _local46 = (_local10.m_invMass + _local11.m_invMass); _local46 = (_local46 + ((_local10.m_invI * (_local36 - (_local44 * _local44))) + (_local11.m_invI * (_local37 - (_local45 * _local45))))); _local29.tangentMass = (1 / _local46); _local29.velocityBias = 0; if (_local29.separation > 0){ _local29.velocityBias = (-60 * _local29.separation); }; _local30 = (((_local18 + (-(_local21) * _local35)) - _local16) - (-(_local20) * _local33)); _local31 = (((_local19 + (_local21 * _local34)) - _local17) - (_local20 * _local32)); _local47 = ((_local26.normal.x * _local30) + (_local26.normal.y * _local31)); if (_local47 < -(b2Settings.b2_velocityThreshold)){ _local29.velocityBias = (_local29.velocityBias + (-(_local26.restitution) * _local47)); }; _local27++; }; _local9++; _local22++; }; _local6++; }; } public function InitVelocityConstraints(_arg1:b2TimeStep):void{ var _local2:b2Vec2; var _local3:b2Vec2; var _local4:b2Mat22; var _local5:int; var _local6:b2ContactConstraint; var _local7:b2Body; var _local8:b2Body; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:int; var _local19:int; var _local20:b2ContactConstraintPoint; var _local21:Number; var _local22:Number; var _local23:b2ContactConstraintPoint; _local5 = 0; while (_local5 < m_constraintCount) { _local6 = m_constraints[_local5]; _local7 = _local6.body1; _local8 = _local6.body2; _local9 = _local7.m_invMass; _local10 = _local7.m_invI; _local11 = _local8.m_invMass; _local12 = _local8.m_invI; _local13 = _local6.normal.x; _local14 = _local6.normal.y; _local15 = _local14; _local16 = -(_local13); if (_arg1.warmStarting){ _local19 = _local6.pointCount; _local18 = 0; while (_local18 < _local19) { _local20 = _local6.points[_local18]; _local6.points[_local18].normalImpulse = (_local20.normalImpulse * _arg1.dtRatio); _local20.tangentImpulse = (_local20.tangentImpulse * _arg1.dtRatio); _local21 = ((_local20.normalImpulse * _local13) + (_local20.tangentImpulse * _local15)); _local22 = ((_local20.normalImpulse * _local14) + (_local20.tangentImpulse * _local16)); _local7.m_angularVelocity = (_local7.m_angularVelocity - (_local10 * ((_local20.r1.x * _local22) - (_local20.r1.y * _local21)))); _local7.m_linearVelocity.x = (_local7.m_linearVelocity.x - (_local9 * _local21)); _local7.m_linearVelocity.y = (_local7.m_linearVelocity.y - (_local9 * _local22)); _local8.m_angularVelocity = (_local8.m_angularVelocity + (_local12 * ((_local20.r2.x * _local22) - (_local20.r2.y * _local21)))); _local8.m_linearVelocity.x = (_local8.m_linearVelocity.x + (_local11 * _local21)); _local8.m_linearVelocity.y = (_local8.m_linearVelocity.y + (_local11 * _local22)); _local18++; }; } else { _local19 = _local6.pointCount; _local18 = 0; while (_local18 < _local19) { _local23 = _local6.points[_local18]; _local23.normalImpulse = 0; _local23.tangentImpulse = 0; _local18++; }; }; _local5++; }; } public function SolvePositionConstraints(_arg1:Number):Boolean{ var _local2:Number; var _local3:b2Mat22; var _local4:b2Vec2; var _local5:int; var _local6:b2ContactConstraint; var _local7:b2Body; var _local8:b2Body; var _local9:b2Vec2; var _local10:Number; var _local11:b2Vec2; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:int; var _local20:int; var _local21:b2ContactConstraintPoint; var _local22:Number; var _local23:Number; var _local24:Number; var _local25:Number; var _local26:Number; var _local27:Number; var _local28:Number; var _local29:Number; var _local30:Number; var _local31:Number; var _local32:Number; var _local33:Number; var _local34:Number; var _local35:Number; var _local36:Number; var _local37:Number; var _local38:Number; _local2 = 0; _local5 = 0; while (_local5 < m_constraintCount) { _local6 = m_constraints[_local5]; _local7 = _local6.body1; _local8 = _local6.body2; _local9 = _local7.m_sweep.c; _local10 = _local7.m_sweep.a; _local11 = _local8.m_sweep.c; _local12 = _local8.m_sweep.a; _local13 = (_local7.m_mass * _local7.m_invMass); _local14 = (_local7.m_mass * _local7.m_invI); _local15 = (_local8.m_mass * _local8.m_invMass); _local16 = (_local8.m_mass * _local8.m_invI); _local17 = _local6.normal.x; _local18 = _local6.normal.y; _local19 = _local6.pointCount; _local20 = 0; while (_local20 < _local19) { _local21 = _local6.points[_local20]; _local3 = _local7.m_xf.R; _local4 = _local7.m_sweep.localCenter; _local22 = (_local21.localAnchor1.x - _local4.x); _local23 = (_local21.localAnchor1.y - _local4.y); _local26 = ((_local3.col1.x * _local22) + (_local3.col2.x * _local23)); _local23 = ((_local3.col1.y * _local22) + (_local3.col2.y * _local23)); _local22 = _local26; _local3 = _local8.m_xf.R; _local4 = _local8.m_sweep.localCenter; _local24 = (_local21.localAnchor2.x - _local4.x); _local25 = (_local21.localAnchor2.y - _local4.y); _local26 = ((_local3.col1.x * _local24) + (_local3.col2.x * _local25)); _local25 = ((_local3.col1.y * _local24) + (_local3.col2.y * _local25)); _local24 = _local26; _local27 = (_local9.x + _local22); _local28 = (_local9.y + _local23); _local29 = (_local11.x + _local24); _local30 = (_local11.y + _local25); _local31 = (_local29 - _local27); _local32 = (_local30 - _local28); _local33 = (((_local31 * _local17) + (_local32 * _local18)) + _local21.separation); _local2 = b2Math.b2Min(_local2, _local33); _local34 = (_arg1 * b2Math.b2Clamp((_local33 + b2Settings.b2_linearSlop), -(b2Settings.b2_maxLinearCorrection), 0)); _local35 = (-(_local21.equalizedMass) * _local34); _local36 = _local21.positionImpulse; _local21.positionImpulse = b2Math.b2Max((_local36 + _local35), 0); _local35 = (_local21.positionImpulse - _local36); _local37 = (_local35 * _local17); _local38 = (_local35 * _local18); _local9.x = (_local9.x - (_local13 * _local37)); _local9.y = (_local9.y - (_local13 * _local38)); _local10 = (_local10 - (_local14 * ((_local22 * _local38) - (_local23 * _local37)))); _local7.m_sweep.a = _local10; _local7.SynchronizeTransform(); _local11.x = (_local11.x + (_local15 * _local37)); _local11.y = (_local11.y + (_local15 * _local38)); _local12 = (_local12 + (_local16 * ((_local24 * _local38) - (_local25 * _local37)))); _local8.m_sweep.a = _local12; _local8.SynchronizeTransform(); _local20++; }; _local5++; }; return ((_local2 >= (-1.5 * b2Settings.b2_linearSlop))); } public function SolveVelocityConstraints():void{ var _local1:int; var _local2:b2ContactConstraintPoint; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:b2Mat22; var _local18:b2Vec2; var _local19:int; var _local20:b2ContactConstraint; var _local21:b2Body; var _local22:b2Body; var _local23:Number; var _local24:Number; var _local25:b2Vec2; var _local26:b2Vec2; var _local27:Number; var _local28:Number; var _local29:Number; var _local30:Number; var _local31:Number; var _local32:Number; var _local33:Number; var _local34:Number; var _local35:Number; var _local36:Number; var _local37:int; var _local38:Number; _local19 = 0; while (_local19 < m_constraintCount) { _local20 = m_constraints[_local19]; _local21 = _local20.body1; _local22 = _local20.body2; _local23 = _local21.m_angularVelocity; _local24 = _local22.m_angularVelocity; _local25 = _local21.m_linearVelocity; _local26 = _local22.m_linearVelocity; _local27 = _local21.m_invMass; _local28 = _local21.m_invI; _local29 = _local22.m_invMass; _local30 = _local22.m_invI; _local31 = _local20.normal.x; _local32 = _local20.normal.y; _local33 = _local32; _local34 = -(_local31); _local35 = _local20.friction; _local37 = _local20.pointCount; _local1 = 0; while (_local1 < _local37) { _local2 = _local20.points[_local1]; _local7 = (((_local26.x + (-(_local24) * _local2.r2.y)) - _local25.x) - (-(_local23) * _local2.r1.y)); _local8 = (((_local26.y + (_local24 * _local2.r2.x)) - _local25.y) - (_local23 * _local2.r1.x)); _local9 = ((_local7 * _local31) + (_local8 * _local32)); _local11 = (-(_local2.normalMass) * (_local9 - _local2.velocityBias)); _local10 = ((_local7 * _local33) + (_local8 * _local34)); _local12 = (_local2.tangentMass * -(_local10)); _local13 = b2Math.b2Max((_local2.normalImpulse + _local11), 0); _local11 = (_local13 - _local2.normalImpulse); _local38 = (_local35 * _local2.normalImpulse); _local14 = b2Math.b2Clamp((_local2.tangentImpulse + _local12), -(_local38), _local38); _local12 = (_local14 - _local2.tangentImpulse); _local15 = ((_local11 * _local31) + (_local12 * _local33)); _local16 = ((_local11 * _local32) + (_local12 * _local34)); _local25.x = (_local25.x - (_local27 * _local15)); _local25.y = (_local25.y - (_local27 * _local16)); _local23 = (_local23 - (_local28 * ((_local2.r1.x * _local16) - (_local2.r1.y * _local15)))); _local26.x = (_local26.x + (_local29 * _local15)); _local26.y = (_local26.y + (_local29 * _local16)); _local24 = (_local24 + (_local30 * ((_local2.r2.x * _local16) - (_local2.r2.y * _local15)))); _local2.normalImpulse = _local13; _local2.tangentImpulse = _local14; _local1++; }; _local21.m_angularVelocity = _local23; _local22.m_angularVelocity = _local24; _local19++; }; } public function FinalizeVelocityConstraints():void{ var _local1:int; var _local2:b2ContactConstraint; var _local3:b2Manifold; var _local4:int; var _local5:b2ManifoldPoint; var _local6:b2ContactConstraintPoint; _local1 = 0; while (_local1 < m_constraintCount) { _local2 = m_constraints[_local1]; _local3 = _local2.manifold; _local4 = 0; while (_local4 < _local2.pointCount) { _local5 = _local3.points[_local4]; _local6 = _local2.points[_local4]; _local5.normalImpulse = _local6.normalImpulse; _local5.tangentImpulse = _local6.tangentImpulse; _local4++; }; _local1++; }; } } }//package Box2D.Dynamics.Contacts
Section 45
//b2NullContact (Box2D.Dynamics.Contacts.b2NullContact) package Box2D.Dynamics.Contacts { import Box2D.Dynamics.*; public class b2NullContact extends b2Contact { override public function GetManifolds():Array{ return (null); } override public function Evaluate(_arg1:b2ContactListener):void{ } } }//package Box2D.Dynamics.Contacts
Section 46
//b2PolyAndCircleContact (Box2D.Dynamics.Contacts.b2PolyAndCircleContact) package Box2D.Dynamics.Contacts { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Collision.Shapes.*; import Box2D.Collision.*; import Box2D.Common.*; public class b2PolyAndCircleContact extends b2Contact { private var m_manifolds:Array; private var m0:b2Manifold; public var m_manifold:b2Manifold; private static const s_evalCP:b2ContactPoint = new b2ContactPoint(); public function b2PolyAndCircleContact(_arg1:b2Shape, _arg2:b2Shape){ var _local3:b2ManifoldPoint; m_manifolds = [new b2Manifold()]; m0 = new b2Manifold(); super(_arg1, _arg2); m_manifold = m_manifolds[0]; b2Settings.b2Assert((m_shape1.m_type == b2Shape.e_polygonShape)); b2Settings.b2Assert((m_shape2.m_type == b2Shape.e_circleShape)); m_manifold.pointCount = 0; _local3 = m_manifold.points[0]; _local3.normalImpulse = 0; _local3.tangentImpulse = 0; } override public function GetManifolds():Array{ return (m_manifolds); } override public function Evaluate(_arg1:b2ContactListener):void{ var _local2:int; var _local3:b2Vec2; var _local4:b2Vec2; var _local5:b2ManifoldPoint; var _local6:b2Body; var _local7:b2Body; var _local8:Array; var _local9:b2ContactPoint; var _local10:b2ManifoldPoint; var _local11:Boolean; var _local12:uint; var _local13:int; _local6 = m_shape1.m_body; _local7 = m_shape2.m_body; m0.Set(m_manifold); b2Collision.b2CollidePolygonAndCircle(m_manifold, (m_shape1 as b2PolygonShape), _local6.m_xf, (m_shape2 as b2CircleShape), _local7.m_xf); _local8 = [false, false]; _local9 = s_evalCP; _local9.shape1 = m_shape1; _local9.shape2 = m_shape2; _local9.friction = m_friction; _local9.restitution = m_restitution; if (m_manifold.pointCount > 0){ _local2 = 0; while (_local2 < m_manifold.pointCount) { _local10 = m_manifold.points[_local2]; _local10.normalImpulse = 0; _local10.tangentImpulse = 0; _local11 = false; _local12 = _local10.id._key; _local13 = 0; while (_local13 < m0.pointCount) { if (_local8[_local13] == true){ } else { _local5 = m0.points[_local13]; if (_local5.id._key == _local12){ _local8[_local13] = true; _local10.normalImpulse = _local5.normalImpulse; _local10.tangentImpulse = _local5.tangentImpulse; _local11 = true; if (_arg1 != null){ _local9.position = _local6.GetWorldPoint(_local10.localPoint1); _local3 = _local6.GetLinearVelocityFromLocalPoint(_local10.localPoint1); _local4 = _local7.GetLinearVelocityFromLocalPoint(_local10.localPoint2); _local9.velocity.Set((_local4.x - _local3.x), (_local4.y - _local3.y)); _local9.normal.SetV(m_manifold.normal); _local9.separation = _local10.separation; _local9.id.key = _local12; _arg1.Persist(_local9); }; break; }; }; _local13++; }; if ((((_local11 == false)) && (!((_arg1 == null))))){ _local9.position = _local6.GetWorldPoint(_local10.localPoint1); _local3 = _local6.GetLinearVelocityFromLocalPoint(_local10.localPoint1); _local4 = _local7.GetLinearVelocityFromLocalPoint(_local10.localPoint2); _local9.velocity.Set((_local4.x - _local3.x), (_local4.y - _local3.y)); _local9.normal.SetV(m_manifold.normal); _local9.separation = _local10.separation; _local9.id.key = _local12; _arg1.Add(_local9); }; _local2++; }; m_manifoldCount = 1; } else { m_manifoldCount = 0; }; if (_arg1 == null){ return; }; _local2 = 0; while (_local2 < m0.pointCount) { if (_local8[_local2]){ } else { _local5 = m0.points[_local2]; _local9.position = _local6.GetWorldPoint(_local5.localPoint1); _local3 = _local6.GetLinearVelocityFromLocalPoint(_local5.localPoint1); _local4 = _local7.GetLinearVelocityFromLocalPoint(_local5.localPoint2); _local9.velocity.Set((_local4.x - _local3.x), (_local4.y - _local3.y)); _local9.normal.SetV(m0.normal); _local9.separation = _local5.separation; _local9.id.key = _local5.id._key; _arg1.Remove(_local9); }; _local2++; }; } public static function Destroy(_arg1:b2Contact, _arg2):void{ } public static function Create(_arg1:b2Shape, _arg2:b2Shape, _arg3):b2Contact{ return (new b2PolyAndCircleContact(_arg1, _arg2)); } } }//package Box2D.Dynamics.Contacts
Section 47
//b2PolygonContact (Box2D.Dynamics.Contacts.b2PolygonContact) package Box2D.Dynamics.Contacts { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Collision.Shapes.*; import Box2D.Collision.*; public class b2PolygonContact extends b2Contact { private var m_manifolds:Array; private var m0:b2Manifold; public var m_manifold:b2Manifold; private static const s_evalCP:b2ContactPoint = new b2ContactPoint(); public function b2PolygonContact(_arg1:b2Shape, _arg2:b2Shape):void{ m0 = new b2Manifold(); m_manifolds = [new b2Manifold()]; super(_arg1, _arg2); m_manifold = m_manifolds[0]; m_manifold.pointCount = 0; } override public function GetManifolds():Array{ return (m_manifolds); } override public function Evaluate(_arg1:b2ContactListener):void{ var _local2:b2Vec2; var _local3:b2Vec2; var _local4:b2ManifoldPoint; var _local5:b2Body; var _local6:b2Body; var _local7:b2ContactPoint; var _local8:int; var _local9:Array; var _local10:b2ManifoldPoint; var _local11:Boolean; var _local12:uint; var _local13:int; _local5 = m_shape1.m_body; _local6 = m_shape2.m_body; m0.Set(m_manifold); b2Collision.b2CollidePolygons(m_manifold, (m_shape1 as b2PolygonShape), _local5.m_xf, (m_shape2 as b2PolygonShape), _local6.m_xf); _local9 = [false, false]; _local7 = s_evalCP; _local7.shape1 = m_shape1; _local7.shape2 = m_shape2; _local7.friction = m_friction; _local7.restitution = m_restitution; if (m_manifold.pointCount > 0){ _local8 = 0; while (_local8 < m_manifold.pointCount) { _local10 = m_manifold.points[_local8]; _local10.normalImpulse = 0; _local10.tangentImpulse = 0; _local11 = false; _local12 = _local10.id._key; _local13 = 0; while (_local13 < m0.pointCount) { if (_local9[_local13] == true){ } else { _local4 = m0.points[_local13]; if (_local4.id._key == _local12){ _local9[_local13] = true; _local10.normalImpulse = _local4.normalImpulse; _local10.tangentImpulse = _local4.tangentImpulse; _local11 = true; if (_arg1 != null){ _local7.position = _local5.GetWorldPoint(_local10.localPoint1); _local2 = _local5.GetLinearVelocityFromLocalPoint(_local10.localPoint1); _local3 = _local6.GetLinearVelocityFromLocalPoint(_local10.localPoint2); _local7.velocity.Set((_local3.x - _local2.x), (_local3.y - _local2.y)); _local7.normal.SetV(m_manifold.normal); _local7.separation = _local10.separation; _local7.id.key = _local12; _arg1.Persist(_local7); }; break; }; }; _local13++; }; if ((((_local11 == false)) && (!((_arg1 == null))))){ _local7.position = _local5.GetWorldPoint(_local10.localPoint1); _local2 = _local5.GetLinearVelocityFromLocalPoint(_local10.localPoint1); _local3 = _local6.GetLinearVelocityFromLocalPoint(_local10.localPoint2); _local7.velocity.Set((_local3.x - _local2.x), (_local3.y - _local2.y)); _local7.normal.SetV(m_manifold.normal); _local7.separation = _local10.separation; _local7.id.key = _local12; _arg1.Add(_local7); }; _local8++; }; m_manifoldCount = 1; } else { m_manifoldCount = 0; }; if (_arg1 == null){ return; }; _local8 = 0; while (_local8 < m0.pointCount) { if (_local9[_local8]){ } else { _local4 = m0.points[_local8]; _local7.position = _local5.GetWorldPoint(_local4.localPoint1); _local2 = _local5.GetLinearVelocityFromLocalPoint(_local4.localPoint1); _local3 = _local6.GetLinearVelocityFromLocalPoint(_local4.localPoint2); _local7.velocity.Set((_local3.x - _local2.x), (_local3.y - _local2.y)); _local7.normal.SetV(m0.normal); _local7.separation = _local4.separation; _local7.id.key = _local4.id._key; _arg1.Remove(_local7); }; _local8++; }; } public static function Destroy(_arg1:b2Contact, _arg2):void{ } public static function Create(_arg1:b2Shape, _arg2:b2Shape, _arg3):b2Contact{ return (new b2PolygonContact(_arg1, _arg2)); } } }//package Box2D.Dynamics.Contacts
Section 48
//b2DistanceJoint (Box2D.Dynamics.Joints.b2DistanceJoint) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Common.*; public class b2DistanceJoint extends b2Joint { public var m_mass:Number; public var m_u:b2Vec2; public var m_impulse:Number; public var m_dampingRatio:Number; public var m_frequencyHz:Number; public var m_localAnchor2:b2Vec2; public var m_localAnchor1:b2Vec2; public var m_bias:Number; public var m_gamma:Number; public var m_length:Number; public function b2DistanceJoint(_arg1:b2DistanceJointDef){ var _local2:b2Mat22; var _local3:Number; var _local4:Number; m_localAnchor1 = new b2Vec2(); m_localAnchor2 = new b2Vec2(); m_u = new b2Vec2(); super(_arg1); m_localAnchor1.SetV(_arg1.localAnchor1); m_localAnchor2.SetV(_arg1.localAnchor2); m_length = _arg1.length; m_frequencyHz = _arg1.frequencyHz; m_dampingRatio = _arg1.dampingRatio; m_impulse = 0; m_gamma = 0; m_bias = 0; m_inv_dt = 0; } override public function GetAnchor1():b2Vec2{ return (m_body1.GetWorldPoint(m_localAnchor1)); } override public function GetAnchor2():b2Vec2{ return (m_body2.GetWorldPoint(m_localAnchor2)); } override public function GetReactionForce():b2Vec2{ var _local1:b2Vec2; _local1 = new b2Vec2(); _local1.SetV(m_u); _local1.Multiply((m_inv_dt * m_impulse)); return (_local1); } override public function SolvePositionConstraints():Boolean{ var _local1:b2Mat22; var _local2:b2Body; var _local3:b2Body; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; if (m_frequencyHz > 0){ return (true); }; _local2 = m_body1; _local3 = m_body2; _local1 = _local2.m_xf.R; _local4 = (m_localAnchor1.x - _local2.m_sweep.localCenter.x); _local5 = (m_localAnchor1.y - _local2.m_sweep.localCenter.y); _local6 = ((_local1.col1.x * _local4) + (_local1.col2.x * _local5)); _local5 = ((_local1.col1.y * _local4) + (_local1.col2.y * _local5)); _local4 = _local6; _local1 = _local3.m_xf.R; _local7 = (m_localAnchor2.x - _local3.m_sweep.localCenter.x); _local8 = (m_localAnchor2.y - _local3.m_sweep.localCenter.y); _local6 = ((_local1.col1.x * _local7) + (_local1.col2.x * _local8)); _local8 = ((_local1.col1.y * _local7) + (_local1.col2.y * _local8)); _local7 = _local6; _local9 = (((_local3.m_sweep.c.x + _local7) - _local2.m_sweep.c.x) - _local4); _local10 = (((_local3.m_sweep.c.y + _local8) - _local2.m_sweep.c.y) - _local5); _local11 = Math.sqrt(((_local9 * _local9) + (_local10 * _local10))); _local9 = (_local9 / _local11); _local10 = (_local10 / _local11); _local12 = (_local11 - m_length); _local12 = b2Math.b2Clamp(_local12, -(b2Settings.b2_maxLinearCorrection), b2Settings.b2_maxLinearCorrection); _local13 = (-(m_mass) * _local12); m_u.Set(_local9, _local10); _local14 = (_local13 * m_u.x); _local15 = (_local13 * m_u.y); _local2.m_sweep.c.x = (_local2.m_sweep.c.x - (_local2.m_invMass * _local14)); _local2.m_sweep.c.y = (_local2.m_sweep.c.y - (_local2.m_invMass * _local15)); _local2.m_sweep.a = (_local2.m_sweep.a - (_local2.m_invI * ((_local4 * _local15) - (_local5 * _local14)))); _local3.m_sweep.c.x = (_local3.m_sweep.c.x + (_local3.m_invMass * _local14)); _local3.m_sweep.c.y = (_local3.m_sweep.c.y + (_local3.m_invMass * _local15)); _local3.m_sweep.a = (_local3.m_sweep.a + (_local3.m_invI * ((_local7 * _local15) - (_local8 * _local14)))); _local2.SynchronizeTransform(); _local3.SynchronizeTransform(); return ((b2Math.b2Abs(_local12) < b2Settings.b2_linearSlop)); } override public function InitVelocityConstraints(_arg1:b2TimeStep):void{ var _local2:b2Mat22; var _local3:Number; var _local4:b2Body; var _local5:b2Body; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; m_inv_dt = _arg1.inv_dt; _local4 = m_body1; _local5 = m_body2; _local2 = _local4.m_xf.R; _local6 = (m_localAnchor1.x - _local4.m_sweep.localCenter.x); _local7 = (m_localAnchor1.y - _local4.m_sweep.localCenter.y); _local3 = ((_local2.col1.x * _local6) + (_local2.col2.x * _local7)); _local7 = ((_local2.col1.y * _local6) + (_local2.col2.y * _local7)); _local6 = _local3; _local2 = _local5.m_xf.R; _local8 = (m_localAnchor2.x - _local5.m_sweep.localCenter.x); _local9 = (m_localAnchor2.y - _local5.m_sweep.localCenter.y); _local3 = ((_local2.col1.x * _local8) + (_local2.col2.x * _local9)); _local9 = ((_local2.col1.y * _local8) + (_local2.col2.y * _local9)); _local8 = _local3; m_u.x = (((_local5.m_sweep.c.x + _local8) - _local4.m_sweep.c.x) - _local6); m_u.y = (((_local5.m_sweep.c.y + _local9) - _local4.m_sweep.c.y) - _local7); _local10 = Math.sqrt(((m_u.x * m_u.x) + (m_u.y * m_u.y))); if (_local10 > b2Settings.b2_linearSlop){ m_u.Multiply((1 / _local10)); } else { m_u.SetZero(); }; _local11 = ((_local6 * m_u.y) - (_local7 * m_u.x)); _local12 = ((_local8 * m_u.y) - (_local9 * m_u.x)); _local13 = (((_local4.m_invMass + ((_local4.m_invI * _local11) * _local11)) + _local5.m_invMass) + ((_local5.m_invI * _local12) * _local12)); m_mass = (1 / _local13); if (m_frequencyHz > 0){ _local14 = (_local10 - m_length); _local15 = ((2 * Math.PI) * m_frequencyHz); _local16 = (((2 * m_mass) * m_dampingRatio) * _local15); _local17 = ((m_mass * _local15) * _local15); m_gamma = (1 / (_arg1.dt * (_local16 + (_arg1.dt * _local17)))); m_bias = (((_local14 * _arg1.dt) * _local17) * m_gamma); m_mass = (1 / (_local13 + m_gamma)); }; if (_arg1.warmStarting){ m_impulse = (m_impulse * _arg1.dtRatio); _local18 = (m_impulse * m_u.x); _local19 = (m_impulse * m_u.y); _local4.m_linearVelocity.x = (_local4.m_linearVelocity.x - (_local4.m_invMass * _local18)); _local4.m_linearVelocity.y = (_local4.m_linearVelocity.y - (_local4.m_invMass * _local19)); _local4.m_angularVelocity = (_local4.m_angularVelocity - (_local4.m_invI * ((_local6 * _local19) - (_local7 * _local18)))); _local5.m_linearVelocity.x = (_local5.m_linearVelocity.x + (_local5.m_invMass * _local18)); _local5.m_linearVelocity.y = (_local5.m_linearVelocity.y + (_local5.m_invMass * _local19)); _local5.m_angularVelocity = (_local5.m_angularVelocity + (_local5.m_invI * ((_local8 * _local19) - (_local9 * _local18)))); } else { m_impulse = 0; }; } override public function GetReactionTorque():Number{ return (0); } override public function SolveVelocityConstraints(_arg1:b2TimeStep):void{ var _local2:b2Mat22; var _local3:b2Body; var _local4:b2Body; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; _local3 = m_body1; _local4 = m_body2; _local2 = _local3.m_xf.R; _local5 = (m_localAnchor1.x - _local3.m_sweep.localCenter.x); _local6 = (m_localAnchor1.y - _local3.m_sweep.localCenter.y); _local7 = ((_local2.col1.x * _local5) + (_local2.col2.x * _local6)); _local6 = ((_local2.col1.y * _local5) + (_local2.col2.y * _local6)); _local5 = _local7; _local2 = _local4.m_xf.R; _local8 = (m_localAnchor2.x - _local4.m_sweep.localCenter.x); _local9 = (m_localAnchor2.y - _local4.m_sweep.localCenter.y); _local7 = ((_local2.col1.x * _local8) + (_local2.col2.x * _local9)); _local9 = ((_local2.col1.y * _local8) + (_local2.col2.y * _local9)); _local8 = _local7; _local10 = (_local3.m_linearVelocity.x + (-(_local3.m_angularVelocity) * _local6)); _local11 = (_local3.m_linearVelocity.y + (_local3.m_angularVelocity * _local5)); _local12 = (_local4.m_linearVelocity.x + (-(_local4.m_angularVelocity) * _local9)); _local13 = (_local4.m_linearVelocity.y + (_local4.m_angularVelocity * _local8)); _local14 = ((m_u.x * (_local12 - _local10)) + (m_u.y * (_local13 - _local11))); _local15 = (-(m_mass) * ((_local14 + m_bias) + (m_gamma * m_impulse))); m_impulse = (m_impulse + _local15); _local16 = (_local15 * m_u.x); _local17 = (_local15 * m_u.y); _local3.m_linearVelocity.x = (_local3.m_linearVelocity.x - (_local3.m_invMass * _local16)); _local3.m_linearVelocity.y = (_local3.m_linearVelocity.y - (_local3.m_invMass * _local17)); _local3.m_angularVelocity = (_local3.m_angularVelocity - (_local3.m_invI * ((_local5 * _local17) - (_local6 * _local16)))); _local4.m_linearVelocity.x = (_local4.m_linearVelocity.x + (_local4.m_invMass * _local16)); _local4.m_linearVelocity.y = (_local4.m_linearVelocity.y + (_local4.m_invMass * _local17)); _local4.m_angularVelocity = (_local4.m_angularVelocity + (_local4.m_invI * ((_local8 * _local17) - (_local9 * _local16)))); } } }//package Box2D.Dynamics.Joints
Section 49
//b2DistanceJointDef (Box2D.Dynamics.Joints.b2DistanceJointDef) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; public class b2DistanceJointDef extends b2JointDef { public var length:Number; public var dampingRatio:Number; public var frequencyHz:Number; public var localAnchor2:b2Vec2; public var localAnchor1:b2Vec2; public function b2DistanceJointDef(){ localAnchor1 = new b2Vec2(); localAnchor2 = new b2Vec2(); super(); type = b2Joint.e_distanceJoint; length = 1; frequencyHz = 0; dampingRatio = 0; } public function Initialize(_arg1:b2Body, _arg2:b2Body, _arg3:b2Vec2, _arg4:b2Vec2):void{ var _local5:Number; var _local6:Number; body1 = _arg1; body2 = _arg2; localAnchor1.SetV(body1.GetLocalPoint(_arg3)); localAnchor2.SetV(body2.GetLocalPoint(_arg4)); _local5 = (_arg4.x - _arg3.x); _local6 = (_arg4.y - _arg3.y); length = Math.sqrt(((_local5 * _local5) + (_local6 * _local6))); frequencyHz = 0; dampingRatio = 0; } } }//package Box2D.Dynamics.Joints
Section 50
//b2GearJoint (Box2D.Dynamics.Joints.b2GearJoint) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Common.*; public class b2GearJoint extends b2Joint { public var m_force:Number; public var m_mass:Number; public var m_prismatic1:b2PrismaticJoint; public var m_prismatic2:b2PrismaticJoint; public var m_ground1:b2Body; public var m_ground2:b2Body; public var m_constant:Number; public var m_revolute1:b2RevoluteJoint; public var m_revolute2:b2RevoluteJoint; public var m_groundAnchor1:b2Vec2; public var m_groundAnchor2:b2Vec2; public var m_localAnchor1:b2Vec2; public var m_localAnchor2:b2Vec2; public var m_ratio:Number; public var m_J:b2Jacobian; public function b2GearJoint(_arg1:b2GearJointDef){ var _local2:int; var _local3:int; var _local4:Number; var _local5:Number; m_groundAnchor1 = new b2Vec2(); m_groundAnchor2 = new b2Vec2(); m_localAnchor1 = new b2Vec2(); m_localAnchor2 = new b2Vec2(); m_J = new b2Jacobian(); super(_arg1); _local2 = _arg1.joint1.m_type; _local3 = _arg1.joint2.m_type; m_revolute1 = null; m_prismatic1 = null; m_revolute2 = null; m_prismatic2 = null; m_ground1 = _arg1.joint1.m_body1; m_body1 = _arg1.joint1.m_body2; if (_local2 == b2Joint.e_revoluteJoint){ m_revolute1 = (_arg1.joint1 as b2RevoluteJoint); m_groundAnchor1.SetV(m_revolute1.m_localAnchor1); m_localAnchor1.SetV(m_revolute1.m_localAnchor2); _local4 = m_revolute1.GetJointAngle(); } else { m_prismatic1 = (_arg1.joint1 as b2PrismaticJoint); m_groundAnchor1.SetV(m_prismatic1.m_localAnchor1); m_localAnchor1.SetV(m_prismatic1.m_localAnchor2); _local4 = m_prismatic1.GetJointTranslation(); }; m_ground2 = _arg1.joint2.m_body1; m_body2 = _arg1.joint2.m_body2; if (_local3 == b2Joint.e_revoluteJoint){ m_revolute2 = (_arg1.joint2 as b2RevoluteJoint); m_groundAnchor2.SetV(m_revolute2.m_localAnchor1); m_localAnchor2.SetV(m_revolute2.m_localAnchor2); _local5 = m_revolute2.GetJointAngle(); } else { m_prismatic2 = (_arg1.joint2 as b2PrismaticJoint); m_groundAnchor2.SetV(m_prismatic2.m_localAnchor1); m_localAnchor2.SetV(m_prismatic2.m_localAnchor2); _local5 = m_prismatic2.GetJointTranslation(); }; m_ratio = _arg1.ratio; m_constant = (_local4 + (m_ratio * _local5)); m_force = 0; } override public function GetAnchor1():b2Vec2{ return (m_body1.GetWorldPoint(m_localAnchor1)); } override public function GetAnchor2():b2Vec2{ return (m_body2.GetWorldPoint(m_localAnchor2)); } override public function GetReactionForce():b2Vec2{ var _local1:b2Vec2; _local1 = new b2Vec2((m_force * m_J.linear2.x), (m_force * m_J.linear2.y)); return (_local1); } override public function SolvePositionConstraints():Boolean{ var _local1:Number; var _local2:b2Body; var _local3:b2Body; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; _local1 = 0; _local2 = m_body1; _local3 = m_body2; if (m_revolute1){ _local4 = m_revolute1.GetJointAngle(); } else { _local4 = m_prismatic1.GetJointTranslation(); }; if (m_revolute2){ _local5 = m_revolute2.GetJointAngle(); } else { _local5 = m_prismatic2.GetJointTranslation(); }; _local6 = (m_constant - (_local4 + (m_ratio * _local5))); _local7 = (-(m_mass) * _local6); _local2.m_sweep.c.x = (_local2.m_sweep.c.x + ((_local2.m_invMass * _local7) * m_J.linear1.x)); _local2.m_sweep.c.y = (_local2.m_sweep.c.y + ((_local2.m_invMass * _local7) * m_J.linear1.y)); _local2.m_sweep.a = (_local2.m_sweep.a + ((_local2.m_invI * _local7) * m_J.angular1)); _local3.m_sweep.c.x = (_local3.m_sweep.c.x + ((_local3.m_invMass * _local7) * m_J.linear2.x)); _local3.m_sweep.c.y = (_local3.m_sweep.c.y + ((_local3.m_invMass * _local7) * m_J.linear2.y)); _local3.m_sweep.a = (_local3.m_sweep.a + ((_local3.m_invI * _local7) * m_J.angular2)); _local2.SynchronizeTransform(); _local3.SynchronizeTransform(); return ((_local1 < b2Settings.b2_linearSlop)); } override public function InitVelocityConstraints(_arg1:b2TimeStep):void{ var _local2:b2Body; var _local3:b2Body; var _local4:b2Body; var _local5:b2Body; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:b2Mat22; var _local11:b2Vec2; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; _local2 = m_ground1; _local3 = m_ground2; _local4 = m_body1; _local5 = m_body2; _local14 = 0; m_J.SetZero(); if (m_revolute1){ m_J.angular1 = -1; _local14 = (_local14 + _local4.m_invI); } else { _local10 = _local2.m_xf.R; _local11 = m_prismatic1.m_localXAxis1; _local6 = ((_local10.col1.x * _local11.x) + (_local10.col2.x * _local11.y)); _local7 = ((_local10.col1.y * _local11.x) + (_local10.col2.y * _local11.y)); _local10 = _local4.m_xf.R; _local8 = (m_localAnchor1.x - _local4.m_sweep.localCenter.x); _local9 = (m_localAnchor1.y - _local4.m_sweep.localCenter.y); _local13 = ((_local10.col1.x * _local8) + (_local10.col2.x * _local9)); _local9 = ((_local10.col1.y * _local8) + (_local10.col2.y * _local9)); _local8 = _local13; _local12 = ((_local8 * _local7) - (_local9 * _local6)); m_J.linear1.Set(-(_local6), -(_local7)); m_J.angular1 = -(_local12); _local14 = (_local14 + (_local4.m_invMass + ((_local4.m_invI * _local12) * _local12))); }; if (m_revolute2){ m_J.angular2 = -(m_ratio); _local14 = (_local14 + ((m_ratio * m_ratio) * _local5.m_invI)); } else { _local10 = _local3.m_xf.R; _local11 = m_prismatic2.m_localXAxis1; _local6 = ((_local10.col1.x * _local11.x) + (_local10.col2.x * _local11.y)); _local7 = ((_local10.col1.y * _local11.x) + (_local10.col2.y * _local11.y)); _local10 = _local5.m_xf.R; _local8 = (m_localAnchor2.x - _local5.m_sweep.localCenter.x); _local9 = (m_localAnchor2.y - _local5.m_sweep.localCenter.y); _local13 = ((_local10.col1.x * _local8) + (_local10.col2.x * _local9)); _local9 = ((_local10.col1.y * _local8) + (_local10.col2.y * _local9)); _local8 = _local13; _local12 = ((_local8 * _local7) - (_local9 * _local6)); m_J.linear2.Set((-(m_ratio) * _local6), (-(m_ratio) * _local7)); m_J.angular2 = (-(m_ratio) * _local12); _local14 = (_local14 + ((m_ratio * m_ratio) * (_local5.m_invMass + ((_local5.m_invI * _local12) * _local12)))); }; m_mass = (1 / _local14); if (_arg1.warmStarting){ _local15 = (_arg1.dt * m_force); _local4.m_linearVelocity.x = (_local4.m_linearVelocity.x + ((_local4.m_invMass * _local15) * m_J.linear1.x)); _local4.m_linearVelocity.y = (_local4.m_linearVelocity.y + ((_local4.m_invMass * _local15) * m_J.linear1.y)); _local4.m_angularVelocity = (_local4.m_angularVelocity + ((_local4.m_invI * _local15) * m_J.angular1)); _local5.m_linearVelocity.x = (_local5.m_linearVelocity.x + ((_local5.m_invMass * _local15) * m_J.linear2.x)); _local5.m_linearVelocity.y = (_local5.m_linearVelocity.y + ((_local5.m_invMass * _local15) * m_J.linear2.y)); _local5.m_angularVelocity = (_local5.m_angularVelocity + ((_local5.m_invI * _local15) * m_J.angular2)); } else { m_force = 0; }; } override public function GetReactionTorque():Number{ var _local1:b2Mat22; var _local2:Number; var _local3:Number; var _local4:Number; _local1 = m_body2.m_xf.R; _local2 = (m_localAnchor1.x - m_body2.m_sweep.localCenter.x); _local3 = (m_localAnchor1.y - m_body2.m_sweep.localCenter.y); _local4 = ((_local1.col1.x * _local2) + (_local1.col2.x * _local3)); _local3 = ((_local1.col1.y * _local2) + (_local1.col2.y * _local3)); _local2 = _local4; _local4 = ((m_force * m_J.angular2) - ((_local2 * (m_force * m_J.linear2.y)) - (_local3 * (m_force * m_J.linear2.x)))); return (_local4); } public function GetRatio():Number{ return (m_ratio); } override public function SolveVelocityConstraints(_arg1:b2TimeStep):void{ var _local2:b2Body; var _local3:b2Body; var _local4:Number; var _local5:Number; var _local6:Number; _local2 = m_body1; _local3 = m_body2; _local4 = m_J.Compute(_local2.m_linearVelocity, _local2.m_angularVelocity, _local3.m_linearVelocity, _local3.m_angularVelocity); _local5 = ((-(_arg1.inv_dt) * m_mass) * _local4); m_force = (m_force + _local5); _local6 = (_arg1.dt * _local5); _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + ((_local2.m_invMass * _local6) * m_J.linear1.x)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + ((_local2.m_invMass * _local6) * m_J.linear1.y)); _local2.m_angularVelocity = (_local2.m_angularVelocity + ((_local2.m_invI * _local6) * m_J.angular1)); _local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + ((_local3.m_invMass * _local6) * m_J.linear2.x)); _local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + ((_local3.m_invMass * _local6) * m_J.linear2.y)); _local3.m_angularVelocity = (_local3.m_angularVelocity + ((_local3.m_invI * _local6) * m_J.angular2)); } } }//package Box2D.Dynamics.Joints
Section 51
//b2GearJointDef (Box2D.Dynamics.Joints.b2GearJointDef) package Box2D.Dynamics.Joints { public class b2GearJointDef extends b2JointDef { public var joint2:b2Joint; public var joint1:b2Joint; public var ratio:Number; public function b2GearJointDef(){ type = b2Joint.e_gearJoint; joint1 = null; joint2 = null; ratio = 1; } } }//package Box2D.Dynamics.Joints
Section 52
//b2Jacobian (Box2D.Dynamics.Joints.b2Jacobian) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; public class b2Jacobian { public var linear1:b2Vec2; public var linear2:b2Vec2; public var angular2:Number; public var angular1:Number; public function b2Jacobian(){ linear1 = new b2Vec2(); linear2 = new b2Vec2(); super(); } public function Set(_arg1:b2Vec2, _arg2:Number, _arg3:b2Vec2, _arg4:Number):void{ linear1.SetV(_arg1); angular1 = _arg2; linear2.SetV(_arg3); angular2 = _arg4; } public function SetZero():void{ linear1.SetZero(); angular1 = 0; linear2.SetZero(); angular2 = 0; } public function Compute(_arg1:b2Vec2, _arg2:Number, _arg3:b2Vec2, _arg4:Number):Number{ return ((((((linear1.x * _arg1.x) + (linear1.y * _arg1.y)) + (angular1 * _arg2)) + ((linear2.x * _arg3.x) + (linear2.y * _arg3.y))) + (angular2 * _arg4))); } } }//package Box2D.Dynamics.Joints
Section 53
//b2Joint (Box2D.Dynamics.Joints.b2Joint) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; public class b2Joint { public var m_islandFlag:Boolean; public var m_body1:b2Body; public var m_prev:b2Joint; public var m_next:b2Joint; public var m_type:int; public var m_collideConnected:Boolean; public var m_node1:b2JointEdge; public var m_node2:b2JointEdge; public var m_inv_dt:Number; public var m_userData; public var m_body2:b2Body; public static const e_unknownJoint:int = 0; public static const e_inactiveLimit:int = 0; public static const e_atUpperLimit:int = 2; public static const e_atLowerLimit:int = 1; public static const e_gearJoint:int = 6; public static const e_revoluteJoint:int = 1; public static const e_equalLimits:int = 3; public static const e_distanceJoint:int = 3; public static const e_pulleyJoint:int = 4; public static const e_prismaticJoint:int = 2; public static const e_mouseJoint:int = 5; public function b2Joint(_arg1:b2JointDef){ m_node1 = new b2JointEdge(); m_node2 = new b2JointEdge(); super(); m_type = _arg1.type; m_prev = null; m_next = null; m_body1 = _arg1.body1; m_body2 = _arg1.body2; m_collideConnected = _arg1.collideConnected; m_islandFlag = false; m_userData = _arg1.userData; } public function GetAnchor1():b2Vec2{ return (null); } public function GetAnchor2():b2Vec2{ return (null); } public function InitVelocityConstraints(_arg1:b2TimeStep):void{ } public function GetType():int{ return (m_type); } public function GetBody2():b2Body{ return (m_body2); } public function GetNext():b2Joint{ return (m_next); } public function GetReactionTorque():Number{ return (0); } public function GetUserData(){ return (m_userData); } public function GetReactionForce():b2Vec2{ return (null); } public function SolvePositionConstraints():Boolean{ return (false); } public function SetUserData(_arg1):void{ m_userData = _arg1; } public function GetBody1():b2Body{ return (m_body1); } public function SolveVelocityConstraints(_arg1:b2TimeStep):void{ } public function InitPositionConstraints():void{ } public static function Destroy(_arg1:b2Joint, _arg2):void{ } public static function Create(_arg1:b2JointDef, _arg2):b2Joint{ var _local3:b2Joint; _local3 = null; switch (_arg1.type){ case e_distanceJoint: _local3 = new b2DistanceJoint((_arg1 as b2DistanceJointDef)); break; case e_mouseJoint: _local3 = new b2MouseJoint((_arg1 as b2MouseJointDef)); break; case e_prismaticJoint: _local3 = new b2PrismaticJoint((_arg1 as b2PrismaticJointDef)); break; case e_revoluteJoint: _local3 = new b2RevoluteJoint((_arg1 as b2RevoluteJointDef)); break; case e_pulleyJoint: _local3 = new b2PulleyJoint((_arg1 as b2PulleyJointDef)); break; case e_gearJoint: _local3 = new b2GearJoint((_arg1 as b2GearJointDef)); break; default: break; }; return (_local3); } } }//package Box2D.Dynamics.Joints
Section 54
//b2JointDef (Box2D.Dynamics.Joints.b2JointDef) package Box2D.Dynamics.Joints { import Box2D.Dynamics.*; public class b2JointDef { public var collideConnected:Boolean; public var body1:b2Body; public var body2:b2Body; public var userData; public var type:int; public function b2JointDef(){ type = b2Joint.e_unknownJoint; userData = null; body1 = null; body2 = null; collideConnected = false; } } }//package Box2D.Dynamics.Joints
Section 55
//b2JointEdge (Box2D.Dynamics.Joints.b2JointEdge) package Box2D.Dynamics.Joints { import Box2D.Dynamics.*; public class b2JointEdge { public var joint:b2Joint; public var other:b2Body; public var next:b2JointEdge; public var prev:b2JointEdge; } }//package Box2D.Dynamics.Joints
Section 56
//b2MouseJoint (Box2D.Dynamics.Joints.b2MouseJoint) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Common.*; public class b2MouseJoint extends b2Joint { public var m_beta:Number; public var m_mass:b2Mat22; public var m_target:b2Vec2; public var m_impulse:b2Vec2; public var m_localAnchor:b2Vec2; private var K1:b2Mat22; private var K2:b2Mat22; private var K:b2Mat22; public var m_gamma:Number; public var m_C:b2Vec2; public var m_maxForce:Number; public function b2MouseJoint(_arg1:b2MouseJointDef){ var _local2:Number; var _local3:Number; var _local4:b2Mat22; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; K = new b2Mat22(); K1 = new b2Mat22(); K2 = new b2Mat22(); m_localAnchor = new b2Vec2(); m_target = new b2Vec2(); m_impulse = new b2Vec2(); m_mass = new b2Mat22(); m_C = new b2Vec2(); super(_arg1); m_target.SetV(_arg1.target); _local2 = (m_target.x - m_body2.m_xf.position.x); _local3 = (m_target.y - m_body2.m_xf.position.y); _local4 = m_body2.m_xf.R; m_localAnchor.x = ((_local2 * _local4.col1.x) + (_local3 * _local4.col1.y)); m_localAnchor.y = ((_local2 * _local4.col2.x) + (_local3 * _local4.col2.y)); m_maxForce = _arg1.maxForce; m_impulse.SetZero(); _local5 = m_body2.m_mass; _local6 = ((2 * b2Settings.b2_pi) * _arg1.frequencyHz); _local7 = (((2 * _local5) * _arg1.dampingRatio) * _local6); _local8 = ((_arg1.timeStep * _local5) * (_local6 * _local6)); m_gamma = (1 / (_local7 + _local8)); m_beta = (_local8 / (_local7 + _local8)); } override public function GetAnchor1():b2Vec2{ return (m_target); } override public function GetAnchor2():b2Vec2{ return (m_body2.GetWorldPoint(m_localAnchor)); } override public function GetReactionForce():b2Vec2{ return (m_impulse); } override public function SolvePositionConstraints():Boolean{ return (true); } override public function InitVelocityConstraints(_arg1:b2TimeStep):void{ var _local2:b2Body; var _local3:b2Mat22; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; _local2 = m_body2; _local3 = _local2.m_xf.R; _local4 = (m_localAnchor.x - _local2.m_sweep.localCenter.x); _local5 = (m_localAnchor.y - _local2.m_sweep.localCenter.y); _local6 = ((_local3.col1.x * _local4) + (_local3.col2.x * _local5)); _local5 = ((_local3.col1.y * _local4) + (_local3.col2.y * _local5)); _local4 = _local6; _local7 = _local2.m_invMass; _local8 = _local2.m_invI; K1.col1.x = _local7; K1.col2.x = 0; K1.col1.y = 0; K1.col2.y = _local7; K2.col1.x = ((_local8 * _local5) * _local5); K2.col2.x = ((-(_local8) * _local4) * _local5); K2.col1.y = ((-(_local8) * _local4) * _local5); K2.col2.y = ((_local8 * _local4) * _local4); K.SetM(K1); K.AddM(K2); K.col1.x = (K.col1.x + m_gamma); K.col2.y = (K.col2.y + m_gamma); K.Invert(m_mass); m_C.x = ((_local2.m_sweep.c.x + _local4) - m_target.x); m_C.y = ((_local2.m_sweep.c.y + _local5) - m_target.y); _local2.m_angularVelocity = (_local2.m_angularVelocity * 0.98); _local9 = (_arg1.dt * m_impulse.x); _local10 = (_arg1.dt * m_impulse.y); _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + (_local7 * _local9)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + (_local7 * _local10)); _local2.m_angularVelocity = (_local2.m_angularVelocity + (_local8 * ((_local4 * _local10) - (_local5 * _local9)))); } override public function GetReactionTorque():Number{ return (0); } public function SetTarget(_arg1:b2Vec2):void{ if (m_body2.IsSleeping()){ m_body2.WakeUp(); }; m_target = _arg1; } override public function SolveVelocityConstraints(_arg1:b2TimeStep):void{ var _local2:b2Body; var _local3:b2Mat22; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; _local2 = m_body2; _local3 = _local2.m_xf.R; _local6 = (m_localAnchor.x - _local2.m_sweep.localCenter.x); _local7 = (m_localAnchor.y - _local2.m_sweep.localCenter.y); _local4 = ((_local3.col1.x * _local6) + (_local3.col2.x * _local7)); _local7 = ((_local3.col1.y * _local6) + (_local3.col2.y * _local7)); _local6 = _local4; _local8 = (_local2.m_linearVelocity.x + (-(_local2.m_angularVelocity) * _local7)); _local9 = (_local2.m_linearVelocity.y + (_local2.m_angularVelocity * _local6)); _local3 = m_mass; _local4 = ((_local8 + ((m_beta * _arg1.inv_dt) * m_C.x)) + ((m_gamma * _arg1.dt) * m_impulse.x)); _local5 = ((_local9 + ((m_beta * _arg1.inv_dt) * m_C.y)) + ((m_gamma * _arg1.dt) * m_impulse.y)); _local10 = (-(_arg1.inv_dt) * ((_local3.col1.x * _local4) + (_local3.col2.x * _local5))); _local11 = (-(_arg1.inv_dt) * ((_local3.col1.y * _local4) + (_local3.col2.y * _local5))); _local12 = m_impulse.x; _local13 = m_impulse.y; m_impulse.x = (m_impulse.x + _local10); m_impulse.y = (m_impulse.y + _local11); _local14 = m_impulse.Length(); if (_local14 > m_maxForce){ m_impulse.Multiply((m_maxForce / _local14)); }; _local10 = (m_impulse.x - _local12); _local11 = (m_impulse.y - _local13); _local15 = (_arg1.dt * _local10); _local16 = (_arg1.dt * _local11); _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + (_local2.m_invMass * _local15)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + (_local2.m_invMass * _local16)); _local2.m_angularVelocity = (_local2.m_angularVelocity + (_local2.m_invI * ((_local6 * _local16) - (_local7 * _local15)))); } } }//package Box2D.Dynamics.Joints
Section 57
//b2MouseJointDef (Box2D.Dynamics.Joints.b2MouseJointDef) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; public class b2MouseJointDef extends b2JointDef { public var frequencyHz:Number; public var dampingRatio:Number; public var maxForce:Number; public var target:b2Vec2; public var timeStep:Number; public function b2MouseJointDef(){ target = new b2Vec2(); super(); type = b2Joint.e_mouseJoint; maxForce = 0; frequencyHz = 5; dampingRatio = 0.7; timeStep = (1 / 60); } } }//package Box2D.Dynamics.Joints
Section 58
//b2PrismaticJoint (Box2D.Dynamics.Joints.b2PrismaticJoint) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Common.*; public class b2PrismaticJoint extends b2Joint { public var m_limitForce:Number; public var m_refAngle:Number; public var m_lowerTranslation:Number; public var m_localXAxis1:b2Vec2; public var m_torque:Number; public var m_enableLimit:Boolean; public var m_motorForce:Number; public var m_force:Number; public var m_localYAxis1:b2Vec2; public var m_motorMass:Number; public var m_maxMotorForce:Number; public var m_localAnchor1:b2Vec2; public var m_localAnchor2:b2Vec2; public var m_angularMass:Number; public var m_limitState:int; public var m_linearMass:Number; public var m_upperTranslation:Number; public var m_motorJacobian:b2Jacobian; public var m_limitPositionImpulse:Number; public var m_motorSpeed:Number; public var m_linearJacobian:b2Jacobian; public var m_enableMotor:Boolean; public function b2PrismaticJoint(_arg1:b2PrismaticJointDef){ var _local2:b2Mat22; var _local3:Number; var _local4:Number; m_localAnchor1 = new b2Vec2(); m_localAnchor2 = new b2Vec2(); m_localXAxis1 = new b2Vec2(); m_localYAxis1 = new b2Vec2(); m_linearJacobian = new b2Jacobian(); m_motorJacobian = new b2Jacobian(); super(_arg1); m_localAnchor1.SetV(_arg1.localAnchor1); m_localAnchor2.SetV(_arg1.localAnchor2); m_localXAxis1.SetV(_arg1.localAxis1); m_localYAxis1.x = -(m_localXAxis1.y); m_localYAxis1.y = m_localXAxis1.x; m_refAngle = _arg1.referenceAngle; m_linearJacobian.SetZero(); m_linearMass = 0; m_force = 0; m_angularMass = 0; m_torque = 0; m_motorJacobian.SetZero(); m_motorMass = 0; m_motorForce = 0; m_limitForce = 0; m_limitPositionImpulse = 0; m_lowerTranslation = _arg1.lowerTranslation; m_upperTranslation = _arg1.upperTranslation; m_maxMotorForce = _arg1.maxMotorForce; m_motorSpeed = _arg1.motorSpeed; m_enableLimit = _arg1.enableLimit; m_enableMotor = _arg1.enableMotor; } override public function GetAnchor1():b2Vec2{ return (m_body1.GetWorldPoint(m_localAnchor1)); } override public function GetAnchor2():b2Vec2{ return (m_body2.GetWorldPoint(m_localAnchor2)); } public function EnableMotor(_arg1:Boolean):void{ m_enableMotor = _arg1; } public function GetUpperLimit():Number{ return (m_upperTranslation); } public function GetLowerLimit():Number{ return (m_lowerTranslation); } public function GetJointTranslation():Number{ var _local1:b2Body; var _local2:b2Body; var _local3:b2Mat22; var _local4:b2Vec2; var _local5:b2Vec2; var _local6:Number; var _local7:Number; var _local8:b2Vec2; var _local9:Number; _local1 = m_body1; _local2 = m_body2; _local4 = _local1.GetWorldPoint(m_localAnchor1); _local5 = _local2.GetWorldPoint(m_localAnchor2); _local6 = (_local5.x - _local4.x); _local7 = (_local5.y - _local4.y); _local8 = _local1.GetWorldVector(m_localXAxis1); _local9 = ((_local8.x * _local6) + (_local8.y * _local7)); return (_local9); } public function SetLimits(_arg1:Number, _arg2:Number):void{ m_lowerTranslation = _arg1; m_upperTranslation = _arg2; } public function GetMotorSpeed():Number{ return (m_motorSpeed); } override public function GetReactionForce():b2Vec2{ var _local1:b2Mat22; var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; _local1 = m_body1.m_xf.R; _local2 = (m_limitForce * ((_local1.col1.x * m_localXAxis1.x) + (_local1.col2.x * m_localXAxis1.y))); _local3 = (m_limitForce * ((_local1.col1.y * m_localXAxis1.x) + (_local1.col2.y * m_localXAxis1.y))); _local4 = (m_force * ((_local1.col1.x * m_localYAxis1.x) + (_local1.col2.x * m_localYAxis1.y))); _local5 = (m_force * ((_local1.col1.y * m_localYAxis1.x) + (_local1.col2.y * m_localYAxis1.y))); return (new b2Vec2(((m_limitForce * _local2) + (m_force * _local4)), ((m_limitForce * _local3) + (m_force * _local5)))); } override public function SolvePositionConstraints():Boolean{ var _local1:Number; var _local2:Number; var _local3:b2Body; var _local4:b2Body; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:b2Mat22; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:Number; var _local21:Number; var _local22:Number; var _local23:Number; var _local24:Number; var _local25:Number; var _local26:Number; var _local27:Number; var _local28:Number; var _local29:Number; var _local30:Number; var _local31:Number; var _local32:Number; _local3 = m_body1; _local4 = m_body2; _local5 = _local3.m_invMass; _local6 = _local4.m_invMass; _local7 = _local3.m_invI; _local8 = _local4.m_invI; _local9 = _local3.m_xf.R; _local11 = (m_localAnchor1.x - _local3.m_sweep.localCenter.x); _local12 = (m_localAnchor1.y - _local3.m_sweep.localCenter.y); _local10 = ((_local9.col1.x * _local11) + (_local9.col2.x * _local12)); _local12 = ((_local9.col1.y * _local11) + (_local9.col2.y * _local12)); _local11 = _local10; _local9 = _local4.m_xf.R; _local13 = (m_localAnchor2.x - _local4.m_sweep.localCenter.x); _local14 = (m_localAnchor2.y - _local4.m_sweep.localCenter.y); _local10 = ((_local9.col1.x * _local13) + (_local9.col2.x * _local14)); _local14 = ((_local9.col1.y * _local13) + (_local9.col2.y * _local14)); _local13 = _local10; _local15 = (_local3.m_sweep.c.x + _local11); _local16 = (_local3.m_sweep.c.y + _local12); _local17 = (_local4.m_sweep.c.x + _local13); _local18 = (_local4.m_sweep.c.y + _local14); _local19 = (_local17 - _local15); _local20 = (_local18 - _local16); _local9 = _local3.m_xf.R; _local21 = ((_local9.col1.x * m_localYAxis1.x) + (_local9.col2.x * m_localYAxis1.y)); _local22 = ((_local9.col1.y * m_localYAxis1.x) + (_local9.col2.y * m_localYAxis1.y)); _local23 = ((_local21 * _local19) + (_local22 * _local20)); _local23 = b2Math.b2Clamp(_local23, -(b2Settings.b2_maxLinearCorrection), b2Settings.b2_maxLinearCorrection); _local24 = (-(m_linearMass) * _local23); _local3.m_sweep.c.x = (_local3.m_sweep.c.x + ((_local5 * _local24) * m_linearJacobian.linear1.x)); _local3.m_sweep.c.y = (_local3.m_sweep.c.y + ((_local5 * _local24) * m_linearJacobian.linear1.y)); _local3.m_sweep.a = (_local3.m_sweep.a + ((_local7 * _local24) * m_linearJacobian.angular1)); _local4.m_sweep.c.x = (_local4.m_sweep.c.x + ((_local6 * _local24) * m_linearJacobian.linear2.x)); _local4.m_sweep.c.y = (_local4.m_sweep.c.y + ((_local6 * _local24) * m_linearJacobian.linear2.y)); _local4.m_sweep.a = (_local4.m_sweep.a + ((_local8 * _local24) * m_linearJacobian.angular2)); _local25 = b2Math.b2Abs(_local23); _local26 = ((_local4.m_sweep.a - _local3.m_sweep.a) - m_refAngle); _local26 = b2Math.b2Clamp(_local26, -(b2Settings.b2_maxAngularCorrection), b2Settings.b2_maxAngularCorrection); _local27 = (-(m_angularMass) * _local26); _local3.m_sweep.a = (_local3.m_sweep.a - (_local3.m_invI * _local27)); _local4.m_sweep.a = (_local4.m_sweep.a + (_local4.m_invI * _local27)); _local3.SynchronizeTransform(); _local4.SynchronizeTransform(); _local28 = b2Math.b2Abs(_local26); if (((m_enableLimit) && (!((m_limitState == e_inactiveLimit))))){ _local9 = _local3.m_xf.R; _local11 = (m_localAnchor1.x - _local3.m_sweep.localCenter.x); _local12 = (m_localAnchor1.y - _local3.m_sweep.localCenter.y); _local10 = ((_local9.col1.x * _local11) + (_local9.col2.x * _local12)); _local12 = ((_local9.col1.y * _local11) + (_local9.col2.y * _local12)); _local11 = _local10; _local9 = _local4.m_xf.R; _local13 = (m_localAnchor2.x - _local4.m_sweep.localCenter.x); _local14 = (m_localAnchor2.y - _local4.m_sweep.localCenter.y); _local10 = ((_local9.col1.x * _local13) + (_local9.col2.x * _local14)); _local14 = ((_local9.col1.y * _local13) + (_local9.col2.y * _local14)); _local13 = _local10; _local15 = (_local3.m_sweep.c.x + _local11); _local16 = (_local3.m_sweep.c.y + _local12); _local17 = (_local4.m_sweep.c.x + _local13); _local18 = (_local4.m_sweep.c.y + _local14); _local19 = (_local17 - _local15); _local20 = (_local18 - _local16); _local9 = _local3.m_xf.R; _local29 = ((_local9.col1.x * m_localXAxis1.x) + (_local9.col2.x * m_localXAxis1.y)); _local30 = ((_local9.col1.y * m_localXAxis1.x) + (_local9.col2.y * m_localXAxis1.y)); _local31 = ((_local29 * _local19) + (_local30 * _local20)); _local32 = 0; if (m_limitState == e_equalLimits){ _local1 = b2Math.b2Clamp(_local31, -(b2Settings.b2_maxLinearCorrection), b2Settings.b2_maxLinearCorrection); _local32 = (-(m_motorMass) * _local1); _local25 = b2Math.b2Max(_local25, b2Math.b2Abs(_local26)); } else { if (m_limitState == e_atLowerLimit){ _local1 = (_local31 - m_lowerTranslation); _local25 = b2Math.b2Max(_local25, -(_local1)); _local1 = b2Math.b2Clamp((_local1 + b2Settings.b2_linearSlop), -(b2Settings.b2_maxLinearCorrection), 0); _local32 = (-(m_motorMass) * _local1); _local2 = m_limitPositionImpulse; m_limitPositionImpulse = b2Math.b2Max((m_limitPositionImpulse + _local32), 0); _local32 = (m_limitPositionImpulse - _local2); } else { if (m_limitState == e_atUpperLimit){ _local1 = (_local31 - m_upperTranslation); _local25 = b2Math.b2Max(_local25, _local1); _local1 = b2Math.b2Clamp((_local1 - b2Settings.b2_linearSlop), 0, b2Settings.b2_maxLinearCorrection); _local32 = (-(m_motorMass) * _local1); _local2 = m_limitPositionImpulse; m_limitPositionImpulse = b2Math.b2Min((m_limitPositionImpulse + _local32), 0); _local32 = (m_limitPositionImpulse - _local2); }; }; }; _local3.m_sweep.c.x = (_local3.m_sweep.c.x + ((_local5 * _local32) * m_motorJacobian.linear1.x)); _local3.m_sweep.c.y = (_local3.m_sweep.c.y + ((_local5 * _local32) * m_motorJacobian.linear1.y)); _local3.m_sweep.a = (_local3.m_sweep.a + ((_local7 * _local32) * m_motorJacobian.angular1)); _local4.m_sweep.c.x = (_local4.m_sweep.c.x + ((_local6 * _local32) * m_motorJacobian.linear2.x)); _local4.m_sweep.c.y = (_local4.m_sweep.c.y + ((_local6 * _local32) * m_motorJacobian.linear2.y)); _local4.m_sweep.a = (_local4.m_sweep.a + ((_local8 * _local32) * m_motorJacobian.angular2)); _local3.SynchronizeTransform(); _local4.SynchronizeTransform(); }; return ((((_local25 <= b2Settings.b2_linearSlop)) && ((_local28 <= b2Settings.b2_angularSlop)))); } public function GetJointSpeed():Number{ var _local1:b2Body; var _local2:b2Body; var _local3:b2Mat22; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:b2Vec2; var _local16:b2Vec2; var _local17:b2Vec2; var _local18:Number; var _local19:Number; var _local20:Number; _local1 = m_body1; _local2 = m_body2; _local3 = _local1.m_xf.R; _local4 = (m_localAnchor1.x - _local1.m_sweep.localCenter.x); _local5 = (m_localAnchor1.y - _local1.m_sweep.localCenter.y); _local6 = ((_local3.col1.x * _local4) + (_local3.col2.x * _local5)); _local5 = ((_local3.col1.y * _local4) + (_local3.col2.y * _local5)); _local4 = _local6; _local3 = _local2.m_xf.R; _local7 = (m_localAnchor2.x - _local2.m_sweep.localCenter.x); _local8 = (m_localAnchor2.y - _local2.m_sweep.localCenter.y); _local6 = ((_local3.col1.x * _local7) + (_local3.col2.x * _local8)); _local8 = ((_local3.col1.y * _local7) + (_local3.col2.y * _local8)); _local7 = _local6; _local9 = (_local1.m_sweep.c.x + _local4); _local10 = (_local1.m_sweep.c.y + _local5); _local11 = (_local2.m_sweep.c.x + _local7); _local12 = (_local2.m_sweep.c.y + _local8); _local13 = (_local11 - _local9); _local14 = (_local12 - _local10); _local15 = _local1.GetWorldVector(m_localXAxis1); _local16 = _local1.m_linearVelocity; _local17 = _local2.m_linearVelocity; _local18 = _local1.m_angularVelocity; _local19 = _local2.m_angularVelocity; _local20 = (((_local13 * (-(_local18) * _local15.y)) + (_local14 * (_local18 * _local15.x))) + ((_local15.x * (((_local17.x + (-(_local19) * _local8)) - _local16.x) - (-(_local18) * _local5))) + (_local15.y * (((_local17.y + (_local19 * _local7)) - _local16.y) - (_local18 * _local4))))); return (_local20); } public function SetMotorSpeed(_arg1:Number):void{ m_motorSpeed = _arg1; } override public function InitVelocityConstraints(_arg1:b2TimeStep):void{ var _local2:b2Body; var _local3:b2Body; var _local4:b2Mat22; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:Number; var _local21:Number; var _local22:Number; var _local23:Number; var _local24:Number; var _local25:Number; var _local26:Number; var _local27:Number; var _local28:Number; _local2 = m_body1; _local3 = m_body2; _local4 = _local2.m_xf.R; _local6 = (m_localAnchor1.x - _local2.m_sweep.localCenter.x); _local7 = (m_localAnchor1.y - _local2.m_sweep.localCenter.y); _local5 = ((_local4.col1.x * _local6) + (_local4.col2.x * _local7)); _local7 = ((_local4.col1.y * _local6) + (_local4.col2.y * _local7)); _local6 = _local5; _local4 = _local3.m_xf.R; _local8 = (m_localAnchor2.x - _local3.m_sweep.localCenter.x); _local9 = (m_localAnchor2.y - _local3.m_sweep.localCenter.y); _local5 = ((_local4.col1.x * _local8) + (_local4.col2.x * _local9)); _local9 = ((_local4.col1.y * _local8) + (_local4.col2.y * _local9)); _local8 = _local5; _local10 = _local2.m_invMass; _local11 = _local3.m_invMass; _local12 = _local2.m_invI; _local13 = _local3.m_invI; _local4 = _local2.m_xf.R; _local14 = ((_local4.col1.x * m_localYAxis1.x) + (_local4.col2.x * m_localYAxis1.y)); _local15 = ((_local4.col1.y * m_localYAxis1.x) + (_local4.col2.y * m_localYAxis1.y)); _local16 = ((_local3.m_sweep.c.x + _local8) - _local2.m_sweep.c.x); _local17 = ((_local3.m_sweep.c.y + _local9) - _local2.m_sweep.c.y); m_linearJacobian.linear1.x = -(_local14); m_linearJacobian.linear1.y = -(_local15); m_linearJacobian.linear2.x = _local14; m_linearJacobian.linear2.y = _local15; m_linearJacobian.angular1 = -(((_local16 * _local15) - (_local17 * _local14))); m_linearJacobian.angular2 = ((_local8 * _local15) - (_local9 * _local14)); m_linearMass = (((_local10 + ((_local12 * m_linearJacobian.angular1) * m_linearJacobian.angular1)) + _local11) + ((_local13 * m_linearJacobian.angular2) * m_linearJacobian.angular2)); m_linearMass = (1 / m_linearMass); m_angularMass = (_local12 + _local13); if (m_angularMass > Number.MIN_VALUE){ m_angularMass = (1 / m_angularMass); }; if (((m_enableLimit) || (m_enableMotor))){ _local4 = _local2.m_xf.R; _local18 = ((_local4.col1.x * m_localXAxis1.x) + (_local4.col2.x * m_localXAxis1.y)); _local19 = ((_local4.col1.y * m_localXAxis1.x) + (_local4.col2.y * m_localXAxis1.y)); m_motorJacobian.linear1.x = -(_local18); m_motorJacobian.linear1.y = -(_local19); m_motorJacobian.linear2.x = _local18; m_motorJacobian.linear2.y = _local19; m_motorJacobian.angular1 = -(((_local16 * _local19) - (_local17 * _local18))); m_motorJacobian.angular2 = ((_local8 * _local19) - (_local9 * _local18)); m_motorMass = (((_local10 + ((_local12 * m_motorJacobian.angular1) * m_motorJacobian.angular1)) + _local11) + ((_local13 * m_motorJacobian.angular2) * m_motorJacobian.angular2)); m_motorMass = (1 / m_motorMass); if (m_enableLimit){ _local20 = (_local16 - _local6); _local21 = (_local17 - _local7); _local22 = ((_local18 * _local20) + (_local19 * _local21)); if (b2Math.b2Abs((m_upperTranslation - m_lowerTranslation)) < (2 * b2Settings.b2_linearSlop)){ m_limitState = e_equalLimits; } else { if (_local22 <= m_lowerTranslation){ if (m_limitState != e_atLowerLimit){ m_limitForce = 0; }; m_limitState = e_atLowerLimit; } else { if (_local22 >= m_upperTranslation){ if (m_limitState != e_atUpperLimit){ m_limitForce = 0; }; m_limitState = e_atUpperLimit; } else { m_limitState = e_inactiveLimit; m_limitForce = 0; }; }; }; }; }; if (m_enableMotor == false){ m_motorForce = 0; }; if (m_enableLimit == false){ m_limitForce = 0; }; if (_arg1.warmStarting){ _local23 = (_arg1.dt * ((m_force * m_linearJacobian.linear1.x) + ((m_motorForce + m_limitForce) * m_motorJacobian.linear1.x))); _local24 = (_arg1.dt * ((m_force * m_linearJacobian.linear1.y) + ((m_motorForce + m_limitForce) * m_motorJacobian.linear1.y))); _local25 = (_arg1.dt * ((m_force * m_linearJacobian.linear2.x) + ((m_motorForce + m_limitForce) * m_motorJacobian.linear2.x))); _local26 = (_arg1.dt * ((m_force * m_linearJacobian.linear2.y) + ((m_motorForce + m_limitForce) * m_motorJacobian.linear2.y))); _local27 = (_arg1.dt * (((m_force * m_linearJacobian.angular1) - m_torque) + ((m_motorForce + m_limitForce) * m_motorJacobian.angular1))); _local28 = (_arg1.dt * (((m_force * m_linearJacobian.angular2) + m_torque) + ((m_motorForce + m_limitForce) * m_motorJacobian.angular2))); _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + (_local10 * _local23)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + (_local10 * _local24)); _local2.m_angularVelocity = (_local2.m_angularVelocity + (_local12 * _local27)); _local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + (_local11 * _local25)); _local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + (_local11 * _local26)); _local3.m_angularVelocity = (_local3.m_angularVelocity + (_local13 * _local28)); } else { m_force = 0; m_torque = 0; m_limitForce = 0; m_motorForce = 0; }; m_limitPositionImpulse = 0; } public function GetMotorForce():Number{ return (m_motorForce); } public function SetMaxMotorForce(_arg1:Number):void{ m_maxMotorForce = _arg1; } public function EnableLimit(_arg1:Boolean):void{ m_enableLimit = _arg1; } override public function GetReactionTorque():Number{ return (m_torque); } public function IsLimitEnabled():Boolean{ return (m_enableLimit); } public function IsMotorEnabled():Boolean{ return (m_enableMotor); } override public function SolveVelocityConstraints(_arg1:b2TimeStep):void{ var _local2:b2Body; var _local3:b2Body; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; _local2 = m_body1; _local3 = m_body2; _local4 = _local2.m_invMass; _local5 = _local3.m_invMass; _local6 = _local2.m_invI; _local7 = _local3.m_invI; _local9 = m_linearJacobian.Compute(_local2.m_linearVelocity, _local2.m_angularVelocity, _local3.m_linearVelocity, _local3.m_angularVelocity); _local10 = ((-(_arg1.inv_dt) * m_linearMass) * _local9); m_force = (m_force + _local10); _local11 = (_arg1.dt * _local10); _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + ((_local4 * _local11) * m_linearJacobian.linear1.x)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + ((_local4 * _local11) * m_linearJacobian.linear1.y)); _local2.m_angularVelocity = (_local2.m_angularVelocity + ((_local6 * _local11) * m_linearJacobian.angular1)); _local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + ((_local5 * _local11) * m_linearJacobian.linear2.x)); _local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + ((_local5 * _local11) * m_linearJacobian.linear2.y)); _local3.m_angularVelocity = (_local3.m_angularVelocity + ((_local7 * _local11) * m_linearJacobian.angular2)); _local12 = (_local3.m_angularVelocity - _local2.m_angularVelocity); _local13 = ((-(_arg1.inv_dt) * m_angularMass) * _local12); m_torque = (m_torque + _local13); _local14 = (_arg1.dt * _local13); _local2.m_angularVelocity = (_local2.m_angularVelocity - (_local6 * _local14)); _local3.m_angularVelocity = (_local3.m_angularVelocity + (_local7 * _local14)); if (((m_enableMotor) && (!((m_limitState == e_equalLimits))))){ _local15 = (m_motorJacobian.Compute(_local2.m_linearVelocity, _local2.m_angularVelocity, _local3.m_linearVelocity, _local3.m_angularVelocity) - m_motorSpeed); _local16 = ((-(_arg1.inv_dt) * m_motorMass) * _local15); _local17 = m_motorForce; m_motorForce = b2Math.b2Clamp((m_motorForce + _local16), -(m_maxMotorForce), m_maxMotorForce); _local16 = (m_motorForce - _local17); _local11 = (_arg1.dt * _local16); _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + ((_local4 * _local11) * m_motorJacobian.linear1.x)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + ((_local4 * _local11) * m_motorJacobian.linear1.y)); _local2.m_angularVelocity = (_local2.m_angularVelocity + ((_local6 * _local11) * m_motorJacobian.angular1)); _local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + ((_local5 * _local11) * m_motorJacobian.linear2.x)); _local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + ((_local5 * _local11) * m_motorJacobian.linear2.y)); _local3.m_angularVelocity = (_local3.m_angularVelocity + ((_local7 * _local11) * m_motorJacobian.angular2)); }; if (((m_enableLimit) && (!((m_limitState == e_inactiveLimit))))){ _local18 = m_motorJacobian.Compute(_local2.m_linearVelocity, _local2.m_angularVelocity, _local3.m_linearVelocity, _local3.m_angularVelocity); _local19 = ((-(_arg1.inv_dt) * m_motorMass) * _local18); if (m_limitState == e_equalLimits){ m_limitForce = (m_limitForce + _local19); } else { if (m_limitState == e_atLowerLimit){ _local8 = m_limitForce; m_limitForce = b2Math.b2Max((m_limitForce + _local19), 0); _local19 = (m_limitForce - _local8); } else { if (m_limitState == e_atUpperLimit){ _local8 = m_limitForce; m_limitForce = b2Math.b2Min((m_limitForce + _local19), 0); _local19 = (m_limitForce - _local8); }; }; }; _local11 = (_arg1.dt * _local19); _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + ((_local4 * _local11) * m_motorJacobian.linear1.x)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + ((_local4 * _local11) * m_motorJacobian.linear1.y)); _local2.m_angularVelocity = (_local2.m_angularVelocity + ((_local6 * _local11) * m_motorJacobian.angular1)); _local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + ((_local5 * _local11) * m_motorJacobian.linear2.x)); _local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + ((_local5 * _local11) * m_motorJacobian.linear2.y)); _local3.m_angularVelocity = (_local3.m_angularVelocity + ((_local7 * _local11) * m_motorJacobian.angular2)); }; } } }//package Box2D.Dynamics.Joints
Section 59
//b2PrismaticJointDef (Box2D.Dynamics.Joints.b2PrismaticJointDef) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; public class b2PrismaticJointDef extends b2JointDef { public var localAxis1:b2Vec2; public var referenceAngle:Number; public var maxMotorForce:Number; public var motorSpeed:Number; public var upperTranslation:Number; public var localAnchor1:b2Vec2; public var localAnchor2:b2Vec2; public var enableLimit:Boolean; public var enableMotor:Boolean; public var lowerTranslation:Number; public function b2PrismaticJointDef(){ localAnchor1 = new b2Vec2(); localAnchor2 = new b2Vec2(); localAxis1 = new b2Vec2(); super(); type = b2Joint.e_prismaticJoint; localAxis1.Set(1, 0); referenceAngle = 0; enableLimit = false; lowerTranslation = 0; upperTranslation = 0; enableMotor = false; maxMotorForce = 0; motorSpeed = 0; } public function Initialize(_arg1:b2Body, _arg2:b2Body, _arg3:b2Vec2, _arg4:b2Vec2):void{ body1 = _arg1; body2 = _arg2; localAnchor1 = body1.GetLocalPoint(_arg3); localAnchor2 = body2.GetLocalPoint(_arg3); localAxis1 = body1.GetLocalVector(_arg4); referenceAngle = (body2.GetAngle() - body1.GetAngle()); } } }//package Box2D.Dynamics.Joints
Section 60
//b2PulleyJoint (Box2D.Dynamics.Joints.b2PulleyJoint) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Common.*; public class b2PulleyJoint extends b2Joint { public var m_ground:b2Body; public var m_maxLength2:Number; public var m_limitForce1:Number; public var m_maxLength1:Number; public var m_limitState1:int; public var m_limitState2:int; public var m_limitPositionImpulse2:Number; public var m_force:Number; public var m_limitPositionImpulse1:Number; public var m_constant:Number; public var m_state:int; public var m_ratio:Number; public var m_groundAnchor1:b2Vec2; public var m_groundAnchor2:b2Vec2; public var m_localAnchor1:b2Vec2; public var m_localAnchor2:b2Vec2; public var m_positionImpulse:Number; public var m_limitMass2:Number; public var m_limitMass1:Number; public var m_pulleyMass:Number; public var m_u1:b2Vec2; public var m_u2:b2Vec2; public var m_limitForce2:Number; public static const b2_minPulleyLength:Number = 2; public function b2PulleyJoint(_arg1:b2PulleyJointDef){ var _local2:b2Mat22; var _local3:Number; var _local4:Number; m_groundAnchor1 = new b2Vec2(); m_groundAnchor2 = new b2Vec2(); m_localAnchor1 = new b2Vec2(); m_localAnchor2 = new b2Vec2(); m_u1 = new b2Vec2(); m_u2 = new b2Vec2(); super(_arg1); m_ground = m_body1.m_world.m_groundBody; m_groundAnchor1.x = (_arg1.groundAnchor1.x - m_ground.m_xf.position.x); m_groundAnchor1.y = (_arg1.groundAnchor1.y - m_ground.m_xf.position.y); m_groundAnchor2.x = (_arg1.groundAnchor2.x - m_ground.m_xf.position.x); m_groundAnchor2.y = (_arg1.groundAnchor2.y - m_ground.m_xf.position.y); m_localAnchor1.SetV(_arg1.localAnchor1); m_localAnchor2.SetV(_arg1.localAnchor2); m_ratio = _arg1.ratio; m_constant = (_arg1.length1 + (m_ratio * _arg1.length2)); m_maxLength1 = b2Math.b2Min(_arg1.maxLength1, (m_constant - (m_ratio * b2_minPulleyLength))); m_maxLength2 = b2Math.b2Min(_arg1.maxLength2, ((m_constant - b2_minPulleyLength) / m_ratio)); m_force = 0; m_limitForce1 = 0; m_limitForce2 = 0; } public function GetGroundAnchor2():b2Vec2{ var _local1:b2Vec2; _local1 = m_ground.m_xf.position.Copy(); _local1.Add(m_groundAnchor2); return (_local1); } override public function GetAnchor1():b2Vec2{ return (m_body1.GetWorldPoint(m_localAnchor1)); } override public function GetAnchor2():b2Vec2{ return (m_body2.GetWorldPoint(m_localAnchor2)); } override public function GetReactionForce():b2Vec2{ var _local1:b2Vec2; _local1 = m_u2.Copy(); _local1.Multiply(m_force); return (_local1); } override public function SolvePositionConstraints():Boolean{ var _local1:b2Body; var _local2:b2Body; var _local3:b2Mat22; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:Number; var _local21:Number; var _local22:Number; var _local23:Number; _local1 = m_body1; _local2 = m_body2; _local4 = (m_ground.m_xf.position.x + m_groundAnchor1.x); _local5 = (m_ground.m_xf.position.y + m_groundAnchor1.y); _local6 = (m_ground.m_xf.position.x + m_groundAnchor2.x); _local7 = (m_ground.m_xf.position.y + m_groundAnchor2.y); _local23 = 0; if (m_state == e_atUpperLimit){ _local3 = _local1.m_xf.R; _local8 = (m_localAnchor1.x - _local1.m_sweep.localCenter.x); _local9 = (m_localAnchor1.y - _local1.m_sweep.localCenter.y); _local22 = ((_local3.col1.x * _local8) + (_local3.col2.x * _local9)); _local9 = ((_local3.col1.y * _local8) + (_local3.col2.y * _local9)); _local8 = _local22; _local3 = _local2.m_xf.R; _local10 = (m_localAnchor2.x - _local2.m_sweep.localCenter.x); _local11 = (m_localAnchor2.y - _local2.m_sweep.localCenter.y); _local22 = ((_local3.col1.x * _local10) + (_local3.col2.x * _local11)); _local11 = ((_local3.col1.y * _local10) + (_local3.col2.y * _local11)); _local10 = _local22; _local12 = (_local1.m_sweep.c.x + _local8); _local13 = (_local1.m_sweep.c.y + _local9); _local14 = (_local2.m_sweep.c.x + _local10); _local15 = (_local2.m_sweep.c.y + _local11); m_u1.Set((_local12 - _local4), (_local13 - _local5)); m_u2.Set((_local14 - _local6), (_local15 - _local7)); _local16 = m_u1.Length(); _local17 = m_u2.Length(); if (_local16 > b2Settings.b2_linearSlop){ m_u1.Multiply((1 / _local16)); } else { m_u1.SetZero(); }; if (_local17 > b2Settings.b2_linearSlop){ m_u2.Multiply((1 / _local17)); } else { m_u2.SetZero(); }; _local18 = ((m_constant - _local16) - (m_ratio * _local17)); _local23 = b2Math.b2Max(_local23, -(_local18)); _local18 = b2Math.b2Clamp((_local18 + b2Settings.b2_linearSlop), -(b2Settings.b2_maxLinearCorrection), 0); _local19 = (-(m_pulleyMass) * _local18); _local20 = m_positionImpulse; m_positionImpulse = b2Math.b2Max(0, (m_positionImpulse + _local19)); _local19 = (m_positionImpulse - _local20); _local12 = (-(_local19) * m_u1.x); _local13 = (-(_local19) * m_u1.y); _local14 = ((-(m_ratio) * _local19) * m_u2.x); _local15 = ((-(m_ratio) * _local19) * m_u2.y); _local1.m_sweep.c.x = (_local1.m_sweep.c.x + (_local1.m_invMass * _local12)); _local1.m_sweep.c.y = (_local1.m_sweep.c.y + (_local1.m_invMass * _local13)); _local1.m_sweep.a = (_local1.m_sweep.a + (_local1.m_invI * ((_local8 * _local13) - (_local9 * _local12)))); _local2.m_sweep.c.x = (_local2.m_sweep.c.x + (_local2.m_invMass * _local14)); _local2.m_sweep.c.y = (_local2.m_sweep.c.y + (_local2.m_invMass * _local15)); _local2.m_sweep.a = (_local2.m_sweep.a + (_local2.m_invI * ((_local10 * _local15) - (_local11 * _local14)))); _local1.SynchronizeTransform(); _local2.SynchronizeTransform(); }; if (m_limitState1 == e_atUpperLimit){ _local3 = _local1.m_xf.R; _local8 = (m_localAnchor1.x - _local1.m_sweep.localCenter.x); _local9 = (m_localAnchor1.y - _local1.m_sweep.localCenter.y); _local22 = ((_local3.col1.x * _local8) + (_local3.col2.x * _local9)); _local9 = ((_local3.col1.y * _local8) + (_local3.col2.y * _local9)); _local8 = _local22; _local12 = (_local1.m_sweep.c.x + _local8); _local13 = (_local1.m_sweep.c.y + _local9); m_u1.Set((_local12 - _local4), (_local13 - _local5)); _local16 = m_u1.Length(); if (_local16 > b2Settings.b2_linearSlop){ m_u1.x = (m_u1.x * (1 / _local16)); m_u1.y = (m_u1.y * (1 / _local16)); } else { m_u1.SetZero(); }; _local18 = (m_maxLength1 - _local16); _local23 = b2Math.b2Max(_local23, -(_local18)); _local18 = b2Math.b2Clamp((_local18 + b2Settings.b2_linearSlop), -(b2Settings.b2_maxLinearCorrection), 0); _local19 = (-(m_limitMass1) * _local18); _local21 = m_limitPositionImpulse1; m_limitPositionImpulse1 = b2Math.b2Max(0, (m_limitPositionImpulse1 + _local19)); _local19 = (m_limitPositionImpulse1 - _local21); _local12 = (-(_local19) * m_u1.x); _local13 = (-(_local19) * m_u1.y); _local1.m_sweep.c.x = (_local1.m_sweep.c.x + (_local1.m_invMass * _local12)); _local1.m_sweep.c.y = (_local1.m_sweep.c.y + (_local1.m_invMass * _local13)); _local1.m_sweep.a = (_local1.m_sweep.a + (_local1.m_invI * ((_local8 * _local13) - (_local9 * _local12)))); _local1.SynchronizeTransform(); }; if (m_limitState2 == e_atUpperLimit){ _local3 = _local2.m_xf.R; _local10 = (m_localAnchor2.x - _local2.m_sweep.localCenter.x); _local11 = (m_localAnchor2.y - _local2.m_sweep.localCenter.y); _local22 = ((_local3.col1.x * _local10) + (_local3.col2.x * _local11)); _local11 = ((_local3.col1.y * _local10) + (_local3.col2.y * _local11)); _local10 = _local22; _local14 = (_local2.m_sweep.c.x + _local10); _local15 = (_local2.m_sweep.c.y + _local11); m_u2.Set((_local14 - _local6), (_local15 - _local7)); _local17 = m_u2.Length(); if (_local17 > b2Settings.b2_linearSlop){ m_u2.x = (m_u2.x * (1 / _local17)); m_u2.y = (m_u2.y * (1 / _local17)); } else { m_u2.SetZero(); }; _local18 = (m_maxLength2 - _local17); _local23 = b2Math.b2Max(_local23, -(_local18)); _local18 = b2Math.b2Clamp((_local18 + b2Settings.b2_linearSlop), -(b2Settings.b2_maxLinearCorrection), 0); _local19 = (-(m_limitMass2) * _local18); _local21 = m_limitPositionImpulse2; m_limitPositionImpulse2 = b2Math.b2Max(0, (m_limitPositionImpulse2 + _local19)); _local19 = (m_limitPositionImpulse2 - _local21); _local14 = (-(_local19) * m_u2.x); _local15 = (-(_local19) * m_u2.y); _local2.m_sweep.c.x = (_local2.m_sweep.c.x + (_local2.m_invMass * _local14)); _local2.m_sweep.c.y = (_local2.m_sweep.c.y + (_local2.m_invMass * _local15)); _local2.m_sweep.a = (_local2.m_sweep.a + (_local2.m_invI * ((_local10 * _local15) - (_local11 * _local14)))); _local2.SynchronizeTransform(); }; return ((_local23 < b2Settings.b2_linearSlop)); } override public function InitVelocityConstraints(_arg1:b2TimeStep):void{ var _local2:b2Body; var _local3:b2Body; var _local4:b2Mat22; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:Number; var _local21:Number; var _local22:Number; var _local23:Number; var _local24:Number; var _local25:Number; var _local26:Number; _local2 = m_body1; _local3 = m_body2; _local4 = _local2.m_xf.R; _local5 = (m_localAnchor1.x - _local2.m_sweep.localCenter.x); _local6 = (m_localAnchor1.y - _local2.m_sweep.localCenter.y); _local7 = ((_local4.col1.x * _local5) + (_local4.col2.x * _local6)); _local6 = ((_local4.col1.y * _local5) + (_local4.col2.y * _local6)); _local5 = _local7; _local4 = _local3.m_xf.R; _local8 = (m_localAnchor2.x - _local3.m_sweep.localCenter.x); _local9 = (m_localAnchor2.y - _local3.m_sweep.localCenter.y); _local7 = ((_local4.col1.x * _local8) + (_local4.col2.x * _local9)); _local9 = ((_local4.col1.y * _local8) + (_local4.col2.y * _local9)); _local8 = _local7; _local10 = (_local2.m_sweep.c.x + _local5); _local11 = (_local2.m_sweep.c.y + _local6); _local12 = (_local3.m_sweep.c.x + _local8); _local13 = (_local3.m_sweep.c.y + _local9); _local14 = (m_ground.m_xf.position.x + m_groundAnchor1.x); _local15 = (m_ground.m_xf.position.y + m_groundAnchor1.y); _local16 = (m_ground.m_xf.position.x + m_groundAnchor2.x); _local17 = (m_ground.m_xf.position.y + m_groundAnchor2.y); m_u1.Set((_local10 - _local14), (_local11 - _local15)); m_u2.Set((_local12 - _local16), (_local13 - _local17)); _local18 = m_u1.Length(); _local19 = m_u2.Length(); if (_local18 > b2Settings.b2_linearSlop){ m_u1.Multiply((1 / _local18)); } else { m_u1.SetZero(); }; if (_local19 > b2Settings.b2_linearSlop){ m_u2.Multiply((1 / _local19)); } else { m_u2.SetZero(); }; _local20 = ((m_constant - _local18) - (m_ratio * _local19)); if (_local20 > 0){ m_state = e_inactiveLimit; m_force = 0; } else { m_state = e_atUpperLimit; m_positionImpulse = 0; }; if (_local18 < m_maxLength1){ m_limitState1 = e_inactiveLimit; m_limitForce1 = 0; } else { m_limitState1 = e_atUpperLimit; m_limitPositionImpulse1 = 0; }; if (_local19 < m_maxLength2){ m_limitState2 = e_inactiveLimit; m_limitForce2 = 0; } else { m_limitState2 = e_atUpperLimit; m_limitPositionImpulse2 = 0; }; _local21 = ((_local5 * m_u1.y) - (_local6 * m_u1.x)); _local22 = ((_local8 * m_u2.y) - (_local9 * m_u2.x)); m_limitMass1 = (_local2.m_invMass + ((_local2.m_invI * _local21) * _local21)); m_limitMass2 = (_local3.m_invMass + ((_local3.m_invI * _local22) * _local22)); m_pulleyMass = (m_limitMass1 + ((m_ratio * m_ratio) * m_limitMass2)); m_limitMass1 = (1 / m_limitMass1); m_limitMass2 = (1 / m_limitMass2); m_pulleyMass = (1 / m_pulleyMass); if (_arg1.warmStarting){ _local23 = ((_arg1.dt * (-(m_force) - m_limitForce1)) * m_u1.x); _local24 = ((_arg1.dt * (-(m_force) - m_limitForce1)) * m_u1.y); _local25 = ((_arg1.dt * ((-(m_ratio) * m_force) - m_limitForce2)) * m_u2.x); _local26 = ((_arg1.dt * ((-(m_ratio) * m_force) - m_limitForce2)) * m_u2.y); _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + (_local2.m_invMass * _local23)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + (_local2.m_invMass * _local24)); _local2.m_angularVelocity = (_local2.m_angularVelocity + (_local2.m_invI * ((_local5 * _local24) - (_local6 * _local23)))); _local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + (_local3.m_invMass * _local25)); _local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + (_local3.m_invMass * _local26)); _local3.m_angularVelocity = (_local3.m_angularVelocity + (_local3.m_invI * ((_local8 * _local26) - (_local9 * _local25)))); } else { m_force = 0; m_limitForce1 = 0; m_limitForce2 = 0; }; } override public function GetReactionTorque():Number{ return (0); } public function GetRatio():Number{ return (m_ratio); } public function GetLength2():Number{ var _local1:b2Vec2; var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; _local1 = m_body2.GetWorldPoint(m_localAnchor2); _local2 = (m_ground.m_xf.position.x + m_groundAnchor2.x); _local3 = (m_ground.m_xf.position.y + m_groundAnchor2.y); _local4 = (_local1.x - _local2); _local5 = (_local1.y - _local3); return (Math.sqrt(((_local4 * _local4) + (_local5 * _local5)))); } override public function SolveVelocityConstraints(_arg1:b2TimeStep):void{ var _local2:b2Body; var _local3:b2Body; var _local4:b2Mat22; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:Number; _local2 = m_body1; _local3 = m_body2; _local4 = _local2.m_xf.R; _local5 = (m_localAnchor1.x - _local2.m_sweep.localCenter.x); _local6 = (m_localAnchor1.y - _local2.m_sweep.localCenter.y); _local7 = ((_local4.col1.x * _local5) + (_local4.col2.x * _local6)); _local6 = ((_local4.col1.y * _local5) + (_local4.col2.y * _local6)); _local5 = _local7; _local4 = _local3.m_xf.R; _local8 = (m_localAnchor2.x - _local3.m_sweep.localCenter.x); _local9 = (m_localAnchor2.y - _local3.m_sweep.localCenter.y); _local7 = ((_local4.col1.x * _local8) + (_local4.col2.x * _local9)); _local9 = ((_local4.col1.y * _local8) + (_local4.col2.y * _local9)); _local8 = _local7; if (m_state == e_atUpperLimit){ _local10 = (_local2.m_linearVelocity.x + (-(_local2.m_angularVelocity) * _local6)); _local11 = (_local2.m_linearVelocity.y + (_local2.m_angularVelocity * _local5)); _local12 = (_local3.m_linearVelocity.x + (-(_local3.m_angularVelocity) * _local9)); _local13 = (_local3.m_linearVelocity.y + (_local3.m_angularVelocity * _local8)); _local18 = (-(((m_u1.x * _local10) + (m_u1.y * _local11))) - (m_ratio * ((m_u2.x * _local12) + (m_u2.y * _local13)))); _local19 = ((-(_arg1.inv_dt) * m_pulleyMass) * _local18); _local20 = m_force; m_force = b2Math.b2Max(0, (m_force + _local19)); _local19 = (m_force - _local20); _local14 = ((-(_arg1.dt) * _local19) * m_u1.x); _local15 = ((-(_arg1.dt) * _local19) * m_u1.y); _local16 = (((-(_arg1.dt) * m_ratio) * _local19) * m_u2.x); _local17 = (((-(_arg1.dt) * m_ratio) * _local19) * m_u2.y); _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + (_local2.m_invMass * _local14)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + (_local2.m_invMass * _local15)); _local2.m_angularVelocity = (_local2.m_angularVelocity + (_local2.m_invI * ((_local5 * _local15) - (_local6 * _local14)))); _local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + (_local3.m_invMass * _local16)); _local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + (_local3.m_invMass * _local17)); _local3.m_angularVelocity = (_local3.m_angularVelocity + (_local3.m_invI * ((_local8 * _local17) - (_local9 * _local16)))); }; if (m_limitState1 == e_atUpperLimit){ _local10 = (_local2.m_linearVelocity.x + (-(_local2.m_angularVelocity) * _local6)); _local11 = (_local2.m_linearVelocity.y + (_local2.m_angularVelocity * _local5)); _local18 = -(((m_u1.x * _local10) + (m_u1.y * _local11))); _local19 = ((-(_arg1.inv_dt) * m_limitMass1) * _local18); _local20 = m_limitForce1; m_limitForce1 = b2Math.b2Max(0, (m_limitForce1 + _local19)); _local19 = (m_limitForce1 - _local20); _local14 = ((-(_arg1.dt) * _local19) * m_u1.x); _local15 = ((-(_arg1.dt) * _local19) * m_u1.y); _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + (_local2.m_invMass * _local14)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + (_local2.m_invMass * _local15)); _local2.m_angularVelocity = (_local2.m_angularVelocity + (_local2.m_invI * ((_local5 * _local15) - (_local6 * _local14)))); }; if (m_limitState2 == e_atUpperLimit){ _local12 = (_local3.m_linearVelocity.x + (-(_local3.m_angularVelocity) * _local9)); _local13 = (_local3.m_linearVelocity.y + (_local3.m_angularVelocity * _local8)); _local18 = -(((m_u2.x * _local12) + (m_u2.y * _local13))); _local19 = ((-(_arg1.inv_dt) * m_limitMass2) * _local18); _local20 = m_limitForce2; m_limitForce2 = b2Math.b2Max(0, (m_limitForce2 + _local19)); _local19 = (m_limitForce2 - _local20); _local16 = ((-(_arg1.dt) * _local19) * m_u2.x); _local17 = ((-(_arg1.dt) * _local19) * m_u2.y); _local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + (_local3.m_invMass * _local16)); _local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + (_local3.m_invMass * _local17)); _local3.m_angularVelocity = (_local3.m_angularVelocity + (_local3.m_invI * ((_local8 * _local17) - (_local9 * _local16)))); }; } public function GetLength1():Number{ var _local1:b2Vec2; var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; _local1 = m_body1.GetWorldPoint(m_localAnchor1); _local2 = (m_ground.m_xf.position.x + m_groundAnchor1.x); _local3 = (m_ground.m_xf.position.y + m_groundAnchor1.y); _local4 = (_local1.x - _local2); _local5 = (_local1.y - _local3); return (Math.sqrt(((_local4 * _local4) + (_local5 * _local5)))); } public function GetGroundAnchor1():b2Vec2{ var _local1:b2Vec2; _local1 = m_ground.m_xf.position.Copy(); _local1.Add(m_groundAnchor1); return (_local1); } } }//package Box2D.Dynamics.Joints
Section 61
//b2PulleyJointDef (Box2D.Dynamics.Joints.b2PulleyJointDef) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; public class b2PulleyJointDef extends b2JointDef { public var maxLength2:Number; public var length1:Number; public var length2:Number; public var maxLength1:Number; public var ratio:Number; public var groundAnchor1:b2Vec2; public var groundAnchor2:b2Vec2; public var localAnchor1:b2Vec2; public var localAnchor2:b2Vec2; public function b2PulleyJointDef(){ groundAnchor1 = new b2Vec2(); groundAnchor2 = new b2Vec2(); localAnchor1 = new b2Vec2(); localAnchor2 = new b2Vec2(); super(); type = b2Joint.e_pulleyJoint; groundAnchor1.Set(-1, 1); groundAnchor2.Set(1, 1); localAnchor1.Set(-1, 0); localAnchor2.Set(1, 0); length1 = 0; maxLength1 = 0; length2 = 0; maxLength2 = 0; ratio = 1; collideConnected = true; } public function Initialize(_arg1:b2Body, _arg2:b2Body, _arg3:b2Vec2, _arg4:b2Vec2, _arg5:b2Vec2, _arg6:b2Vec2, _arg7:Number):void{ var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; body1 = _arg1; body2 = _arg2; groundAnchor1.SetV(_arg3); groundAnchor2.SetV(_arg4); localAnchor1 = body1.GetLocalPoint(_arg5); localAnchor2 = body2.GetLocalPoint(_arg6); _local8 = (_arg5.x - _arg3.x); _local9 = (_arg5.y - _arg3.y); length1 = Math.sqrt(((_local8 * _local8) + (_local9 * _local9))); _local10 = (_arg6.x - _arg4.x); _local11 = (_arg6.y - _arg4.y); length2 = Math.sqrt(((_local10 * _local10) + (_local11 * _local11))); ratio = _arg7; _local12 = (length1 + (ratio * length2)); maxLength1 = (_local12 - (ratio * b2PulleyJoint.b2_minPulleyLength)); maxLength2 = ((_local12 - b2PulleyJoint.b2_minPulleyLength) / ratio); } } }//package Box2D.Dynamics.Joints
Section 62
//b2RevoluteJoint (Box2D.Dynamics.Joints.b2RevoluteJoint) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Common.*; public class b2RevoluteJoint extends b2Joint { public var m_limitForce:Number; public var m_motorForce:Number; public var m_pivotMass:b2Mat22; public var m_enableLimit:Boolean; public var m_limitState:int; public var m_motorMass:Number; public var m_localAnchor1:b2Vec2; public var m_localAnchor2:b2Vec2; private var K1:b2Mat22; private var K2:b2Mat22; private var K3:b2Mat22; private var K:b2Mat22; public var m_pivotForce:b2Vec2; public var m_motorSpeed:Number; public var m_enableMotor:Boolean; public var m_limitPositionImpulse:Number; public var m_maxMotorTorque:Number; public var m_referenceAngle:Number; public var m_lowerAngle:Number; public var m_upperAngle:Number; public static var tImpulse:b2Vec2 = new b2Vec2(); public function b2RevoluteJoint(_arg1:b2RevoluteJointDef){ K = new b2Mat22(); K1 = new b2Mat22(); K2 = new b2Mat22(); K3 = new b2Mat22(); m_localAnchor1 = new b2Vec2(); m_localAnchor2 = new b2Vec2(); m_pivotForce = new b2Vec2(); m_pivotMass = new b2Mat22(); super(_arg1); m_localAnchor1.SetV(_arg1.localAnchor1); m_localAnchor2.SetV(_arg1.localAnchor2); m_referenceAngle = _arg1.referenceAngle; m_pivotForce.Set(0, 0); m_motorForce = 0; m_limitForce = 0; m_limitPositionImpulse = 0; m_lowerAngle = _arg1.lowerAngle; m_upperAngle = _arg1.upperAngle; m_maxMotorTorque = _arg1.maxMotorTorque; m_motorSpeed = _arg1.motorSpeed; m_enableLimit = _arg1.enableLimit; m_enableMotor = _arg1.enableMotor; } override public function GetAnchor1():b2Vec2{ return (m_body1.GetWorldPoint(m_localAnchor1)); } override public function GetAnchor2():b2Vec2{ return (m_body2.GetWorldPoint(m_localAnchor2)); } public function EnableMotor(_arg1:Boolean):void{ m_enableMotor = _arg1; } public function GetUpperLimit():Number{ return (m_upperAngle); } public function GetLowerLimit():Number{ return (m_lowerAngle); } public function SetLimits(_arg1:Number, _arg2:Number):void{ m_lowerAngle = _arg1; m_upperAngle = _arg2; } public function GetMotorSpeed():Number{ return (m_motorSpeed); } override public function GetReactionForce():b2Vec2{ return (m_pivotForce); } override public function SolvePositionConstraints():Boolean{ var _local1:Number; var _local2:Number; var _local3:b2Body; var _local4:b2Body; var _local5:Number; var _local6:b2Mat22; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:Number; var _local21:Number; var _local22:Number; var _local23:Number; var _local24:Number; var _local25:Number; var _local26:Number; _local3 = m_body1; _local4 = m_body2; _local5 = 0; _local6 = _local3.m_xf.R; _local7 = (m_localAnchor1.x - _local3.m_sweep.localCenter.x); _local8 = (m_localAnchor1.y - _local3.m_sweep.localCenter.y); _local9 = ((_local6.col1.x * _local7) + (_local6.col2.x * _local8)); _local8 = ((_local6.col1.y * _local7) + (_local6.col2.y * _local8)); _local7 = _local9; _local6 = _local4.m_xf.R; _local10 = (m_localAnchor2.x - _local4.m_sweep.localCenter.x); _local11 = (m_localAnchor2.y - _local4.m_sweep.localCenter.y); _local9 = ((_local6.col1.x * _local10) + (_local6.col2.x * _local11)); _local11 = ((_local6.col1.y * _local10) + (_local6.col2.y * _local11)); _local10 = _local9; _local12 = (_local3.m_sweep.c.x + _local7); _local13 = (_local3.m_sweep.c.y + _local8); _local14 = (_local4.m_sweep.c.x + _local10); _local15 = (_local4.m_sweep.c.y + _local11); _local16 = (_local14 - _local12); _local17 = (_local15 - _local13); _local5 = Math.sqrt(((_local16 * _local16) + (_local17 * _local17))); _local18 = _local3.m_invMass; _local19 = _local4.m_invMass; _local20 = _local3.m_invI; _local21 = _local4.m_invI; K1.col1.x = (_local18 + _local19); K1.col2.x = 0; K1.col1.y = 0; K1.col2.y = (_local18 + _local19); K2.col1.x = ((_local20 * _local8) * _local8); K2.col2.x = ((-(_local20) * _local7) * _local8); K2.col1.y = ((-(_local20) * _local7) * _local8); K2.col2.y = ((_local20 * _local7) * _local7); K3.col1.x = ((_local21 * _local11) * _local11); K3.col2.x = ((-(_local21) * _local10) * _local11); K3.col1.y = ((-(_local21) * _local10) * _local11); K3.col2.y = ((_local21 * _local10) * _local10); K.SetM(K1); K.AddM(K2); K.AddM(K3); K.Solve(tImpulse, -(_local16), -(_local17)); _local22 = tImpulse.x; _local23 = tImpulse.y; _local3.m_sweep.c.x = (_local3.m_sweep.c.x - (_local3.m_invMass * _local22)); _local3.m_sweep.c.y = (_local3.m_sweep.c.y - (_local3.m_invMass * _local23)); _local3.m_sweep.a = (_local3.m_sweep.a - (_local3.m_invI * ((_local7 * _local23) - (_local8 * _local22)))); _local4.m_sweep.c.x = (_local4.m_sweep.c.x + (_local4.m_invMass * _local22)); _local4.m_sweep.c.y = (_local4.m_sweep.c.y + (_local4.m_invMass * _local23)); _local4.m_sweep.a = (_local4.m_sweep.a + (_local4.m_invI * ((_local10 * _local23) - (_local11 * _local22)))); _local3.SynchronizeTransform(); _local4.SynchronizeTransform(); _local24 = 0; if (((m_enableLimit) && (!((m_limitState == e_inactiveLimit))))){ _local25 = ((_local4.m_sweep.a - _local3.m_sweep.a) - m_referenceAngle); _local26 = 0; if (m_limitState == e_equalLimits){ _local2 = b2Math.b2Clamp(_local25, -(b2Settings.b2_maxAngularCorrection), b2Settings.b2_maxAngularCorrection); _local26 = (-(m_motorMass) * _local2); _local24 = b2Math.b2Abs(_local2); } else { if (m_limitState == e_atLowerLimit){ _local2 = (_local25 - m_lowerAngle); _local24 = b2Math.b2Max(0, -(_local2)); _local2 = b2Math.b2Clamp((_local2 + b2Settings.b2_angularSlop), -(b2Settings.b2_maxAngularCorrection), 0); _local26 = (-(m_motorMass) * _local2); _local1 = m_limitPositionImpulse; m_limitPositionImpulse = b2Math.b2Max((m_limitPositionImpulse + _local26), 0); _local26 = (m_limitPositionImpulse - _local1); } else { if (m_limitState == e_atUpperLimit){ _local2 = (_local25 - m_upperAngle); _local24 = b2Math.b2Max(0, _local2); _local2 = b2Math.b2Clamp((_local2 - b2Settings.b2_angularSlop), 0, b2Settings.b2_maxAngularCorrection); _local26 = (-(m_motorMass) * _local2); _local1 = m_limitPositionImpulse; m_limitPositionImpulse = b2Math.b2Min((m_limitPositionImpulse + _local26), 0); _local26 = (m_limitPositionImpulse - _local1); }; }; }; _local3.m_sweep.a = (_local3.m_sweep.a - (_local3.m_invI * _local26)); _local4.m_sweep.a = (_local4.m_sweep.a + (_local4.m_invI * _local26)); _local3.SynchronizeTransform(); _local4.SynchronizeTransform(); }; return ((((_local5 <= b2Settings.b2_linearSlop)) && ((_local24 <= b2Settings.b2_angularSlop)))); } public function GetJointSpeed():Number{ return ((m_body2.m_angularVelocity - m_body1.m_angularVelocity)); } public function SetMotorSpeed(_arg1:Number):void{ m_motorSpeed = _arg1; } public function SetMaxMotorTorque(_arg1:Number):void{ m_maxMotorTorque = _arg1; } public function GetJointAngle():Number{ return (((m_body2.m_sweep.a - m_body1.m_sweep.a) - m_referenceAngle)); } override public function InitVelocityConstraints(_arg1:b2TimeStep):void{ var _local2:b2Body; var _local3:b2Body; var _local4:b2Mat22; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; _local2 = m_body1; _local3 = m_body2; _local4 = _local2.m_xf.R; _local6 = (m_localAnchor1.x - _local2.m_sweep.localCenter.x); _local7 = (m_localAnchor1.y - _local2.m_sweep.localCenter.y); _local5 = ((_local4.col1.x * _local6) + (_local4.col2.x * _local7)); _local7 = ((_local4.col1.y * _local6) + (_local4.col2.y * _local7)); _local6 = _local5; _local4 = _local3.m_xf.R; _local8 = (m_localAnchor2.x - _local3.m_sweep.localCenter.x); _local9 = (m_localAnchor2.y - _local3.m_sweep.localCenter.y); _local5 = ((_local4.col1.x * _local8) + (_local4.col2.x * _local9)); _local9 = ((_local4.col1.y * _local8) + (_local4.col2.y * _local9)); _local8 = _local5; _local10 = _local2.m_invMass; _local11 = _local3.m_invMass; _local12 = _local2.m_invI; _local13 = _local3.m_invI; K1.col1.x = (_local10 + _local11); K1.col2.x = 0; K1.col1.y = 0; K1.col2.y = (_local10 + _local11); K2.col1.x = ((_local12 * _local7) * _local7); K2.col2.x = ((-(_local12) * _local6) * _local7); K2.col1.y = ((-(_local12) * _local6) * _local7); K2.col2.y = ((_local12 * _local6) * _local6); K3.col1.x = ((_local13 * _local9) * _local9); K3.col2.x = ((-(_local13) * _local8) * _local9); K3.col1.y = ((-(_local13) * _local8) * _local9); K3.col2.y = ((_local13 * _local8) * _local8); K.SetM(K1); K.AddM(K2); K.AddM(K3); K.Invert(m_pivotMass); m_motorMass = (1 / (_local12 + _local13)); if (m_enableMotor == false){ m_motorForce = 0; }; if (m_enableLimit){ _local14 = ((_local3.m_sweep.a - _local2.m_sweep.a) - m_referenceAngle); if (b2Math.b2Abs((m_upperAngle - m_lowerAngle)) < (2 * b2Settings.b2_angularSlop)){ m_limitState = e_equalLimits; } else { if (_local14 <= m_lowerAngle){ if (m_limitState != e_atLowerLimit){ m_limitForce = 0; }; m_limitState = e_atLowerLimit; } else { if (_local14 >= m_upperAngle){ if (m_limitState != e_atUpperLimit){ m_limitForce = 0; }; m_limitState = e_atUpperLimit; } else { m_limitState = e_inactiveLimit; m_limitForce = 0; }; }; }; } else { m_limitForce = 0; }; if (_arg1.warmStarting){ _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x - ((_arg1.dt * _local10) * m_pivotForce.x)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y - ((_arg1.dt * _local10) * m_pivotForce.y)); _local2.m_angularVelocity = (_local2.m_angularVelocity - ((_arg1.dt * _local12) * ((((_local6 * m_pivotForce.y) - (_local7 * m_pivotForce.x)) + m_motorForce) + m_limitForce))); _local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + ((_arg1.dt * _local11) * m_pivotForce.x)); _local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + ((_arg1.dt * _local11) * m_pivotForce.y)); _local3.m_angularVelocity = (_local3.m_angularVelocity + ((_arg1.dt * _local13) * ((((_local8 * m_pivotForce.y) - (_local9 * m_pivotForce.x)) + m_motorForce) + m_limitForce))); } else { m_pivotForce.SetZero(); m_motorForce = 0; m_limitForce = 0; }; m_limitPositionImpulse = 0; } public function EnableLimit(_arg1:Boolean):void{ m_enableLimit = _arg1; } public function GetMotorTorque():Number{ return (m_motorForce); } override public function GetReactionTorque():Number{ return (m_limitForce); } public function IsLimitEnabled():Boolean{ return (m_enableLimit); } public function IsMotorEnabled():Boolean{ return (m_enableMotor); } override public function SolveVelocityConstraints(_arg1:b2TimeStep):void{ var _local2:b2Body; var _local3:b2Body; var _local4:b2Mat22; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:Number; var _local21:Number; _local2 = m_body1; _local3 = m_body2; _local4 = _local2.m_xf.R; _local6 = (m_localAnchor1.x - _local2.m_sweep.localCenter.x); _local7 = (m_localAnchor1.y - _local2.m_sweep.localCenter.y); _local5 = ((_local4.col1.x * _local6) + (_local4.col2.x * _local7)); _local7 = ((_local4.col1.y * _local6) + (_local4.col2.y * _local7)); _local6 = _local5; _local4 = _local3.m_xf.R; _local8 = (m_localAnchor2.x - _local3.m_sweep.localCenter.x); _local9 = (m_localAnchor2.y - _local3.m_sweep.localCenter.y); _local5 = ((_local4.col1.x * _local8) + (_local4.col2.x * _local9)); _local9 = ((_local4.col1.y * _local8) + (_local4.col2.y * _local9)); _local8 = _local5; _local11 = (((_local3.m_linearVelocity.x + (-(_local3.m_angularVelocity) * _local9)) - _local2.m_linearVelocity.x) - (-(_local2.m_angularVelocity) * _local7)); _local12 = (((_local3.m_linearVelocity.y + (_local3.m_angularVelocity * _local8)) - _local2.m_linearVelocity.y) - (_local2.m_angularVelocity * _local6)); _local13 = (-(_arg1.inv_dt) * ((m_pivotMass.col1.x * _local11) + (m_pivotMass.col2.x * _local12))); _local14 = (-(_arg1.inv_dt) * ((m_pivotMass.col1.y * _local11) + (m_pivotMass.col2.y * _local12))); m_pivotForce.x = (m_pivotForce.x + _local13); m_pivotForce.y = (m_pivotForce.y + _local14); _local15 = (_arg1.dt * _local13); _local16 = (_arg1.dt * _local14); _local2.m_linearVelocity.x = (_local2.m_linearVelocity.x - (_local2.m_invMass * _local15)); _local2.m_linearVelocity.y = (_local2.m_linearVelocity.y - (_local2.m_invMass * _local16)); _local2.m_angularVelocity = (_local2.m_angularVelocity - (_local2.m_invI * ((_local6 * _local16) - (_local7 * _local15)))); _local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + (_local3.m_invMass * _local15)); _local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + (_local3.m_invMass * _local16)); _local3.m_angularVelocity = (_local3.m_angularVelocity + (_local3.m_invI * ((_local8 * _local16) - (_local9 * _local15)))); if (((m_enableMotor) && (!((m_limitState == e_equalLimits))))){ _local17 = ((_local3.m_angularVelocity - _local2.m_angularVelocity) - m_motorSpeed); _local18 = ((-(_arg1.inv_dt) * m_motorMass) * _local17); _local19 = m_motorForce; m_motorForce = b2Math.b2Clamp((m_motorForce + _local18), -(m_maxMotorTorque), m_maxMotorTorque); _local18 = (m_motorForce - _local19); _local2.m_angularVelocity = (_local2.m_angularVelocity - ((_local2.m_invI * _arg1.dt) * _local18)); _local3.m_angularVelocity = (_local3.m_angularVelocity + ((_local3.m_invI * _arg1.dt) * _local18)); }; if (((m_enableLimit) && (!((m_limitState == e_inactiveLimit))))){ _local20 = (_local3.m_angularVelocity - _local2.m_angularVelocity); _local21 = ((-(_arg1.inv_dt) * m_motorMass) * _local20); if (m_limitState == e_equalLimits){ m_limitForce = (m_limitForce + _local21); } else { if (m_limitState == e_atLowerLimit){ _local10 = m_limitForce; m_limitForce = b2Math.b2Max((m_limitForce + _local21), 0); _local21 = (m_limitForce - _local10); } else { if (m_limitState == e_atUpperLimit){ _local10 = m_limitForce; m_limitForce = b2Math.b2Min((m_limitForce + _local21), 0); _local21 = (m_limitForce - _local10); }; }; }; _local2.m_angularVelocity = (_local2.m_angularVelocity - ((_local2.m_invI * _arg1.dt) * _local21)); _local3.m_angularVelocity = (_local3.m_angularVelocity + ((_local3.m_invI * _arg1.dt) * _local21)); }; } } }//package Box2D.Dynamics.Joints
Section 63
//b2RevoluteJointDef (Box2D.Dynamics.Joints.b2RevoluteJointDef) package Box2D.Dynamics.Joints { import Box2D.Common.Math.*; import Box2D.Dynamics.*; public class b2RevoluteJointDef extends b2JointDef { public var referenceAngle:Number; public var upperAngle:Number; public var lowerAngle:Number; public var motorSpeed:Number; public var maxMotorTorque:Number; public var localAnchor1:b2Vec2; public var localAnchor2:b2Vec2; public var enableLimit:Boolean; public var enableMotor:Boolean; public function b2RevoluteJointDef(){ localAnchor1 = new b2Vec2(); localAnchor2 = new b2Vec2(); super(); type = b2Joint.e_revoluteJoint; localAnchor1.Set(0, 0); localAnchor2.Set(0, 0); referenceAngle = 0; lowerAngle = 0; upperAngle = 0; maxMotorTorque = 0; motorSpeed = 0; enableLimit = false; enableMotor = false; } public function Initialize(_arg1:b2Body, _arg2:b2Body, _arg3:b2Vec2):void{ body1 = _arg1; body2 = _arg2; localAnchor1 = body1.GetLocalPoint(_arg3); localAnchor2 = body2.GetLocalPoint(_arg3); referenceAngle = (body2.GetAngle() - body1.GetAngle()); } } }//package Box2D.Dynamics.Joints
Section 64
//b2Body (Box2D.Dynamics.b2Body) package Box2D.Dynamics { import Box2D.Common.Math.*; import Box2D.Collision.Shapes.*; import Box2D.Dynamics.Joints.*; import Box2D.Dynamics.Contacts.*; public class b2Body { public var m_next:b2Body; public var m_contactList:b2ContactEdge; public var m_angularVelocity:Number; public var m_shapeList:b2Shape; public var m_force:b2Vec2; public var m_mass:Number; public var m_sweep:b2Sweep; public var m_xf:b2XForm; public var m_torque:Number; public var m_userData; public var m_flags:uint; public var m_world:b2World; public var m_prev:b2Body; public var m_invMass:Number; public var m_type:int; public var m_linearDamping:Number; public var m_angularDamping:Number; public var m_invI:Number; public var m_linearVelocity:b2Vec2; public var m_sleepTime:Number; public var m_shapeCount:int; public var m_jointList:b2JointEdge; public var m_I:Number; public static var e_fixedRotationFlag:uint = 64; public static var e_frozenFlag:uint = 2; public static var e_maxTypes:uint = 3; public static var e_sleepFlag:uint = 8; private static var s_massData:b2MassData = new b2MassData(); public static var e_bulletFlag:uint = 32; public static var e_staticType:uint = 1; public static var e_islandFlag:uint = 4; public static var e_allowSleepFlag:uint = 16; private static var s_xf1:b2XForm = new b2XForm(); public static var e_dynamicType:uint = 2; public function b2Body(_arg1:b2BodyDef, _arg2:b2World){ var _local3:b2Mat22; var _local4:b2Vec2; m_xf = new b2XForm(); m_sweep = new b2Sweep(); m_linearVelocity = new b2Vec2(); m_force = new b2Vec2(); super(); m_flags = 0; if (_arg1.isBullet){ m_flags = (m_flags | e_bulletFlag); }; if (_arg1.fixedRotation){ m_flags = (m_flags | e_fixedRotationFlag); }; if (_arg1.allowSleep){ m_flags = (m_flags | e_allowSleepFlag); }; if (_arg1.isSleeping){ m_flags = (m_flags | e_sleepFlag); }; m_world = _arg2; m_xf.position.SetV(_arg1.position); m_xf.R.Set(_arg1.angle); m_sweep.localCenter.SetV(_arg1.massData.center); m_sweep.t0 = 1; m_sweep.a0 = (m_sweep.a = _arg1.angle); _local3 = m_xf.R; _local4 = m_sweep.localCenter; m_sweep.c.x = ((_local3.col1.x * _local4.x) + (_local3.col2.x * _local4.y)); m_sweep.c.y = ((_local3.col1.y * _local4.x) + (_local3.col2.y * _local4.y)); m_sweep.c.x = (m_sweep.c.x + m_xf.position.x); m_sweep.c.y = (m_sweep.c.y + m_xf.position.y); m_sweep.c0.SetV(m_sweep.c); m_jointList = null; m_contactList = null; m_prev = null; m_next = null; m_linearDamping = _arg1.linearDamping; m_angularDamping = _arg1.angularDamping; m_force.Set(0, 0); m_torque = 0; m_linearVelocity.SetZero(); m_angularVelocity = 0; m_sleepTime = 0; m_invMass = 0; m_I = 0; m_invI = 0; m_mass = _arg1.massData.mass; if (m_mass > 0){ m_invMass = (1 / m_mass); }; if ((m_flags & b2Body.e_fixedRotationFlag) == 0){ m_I = _arg1.massData.I; }; if (m_I > 0){ m_invI = (1 / m_I); }; if ((((m_invMass == 0)) && ((m_invI == 0)))){ m_type = e_staticType; } else { m_type = e_dynamicType; }; m_userData = _arg1.userData; m_shapeList = null; m_shapeCount = 0; } public function GetLinearVelocityFromWorldPoint(_arg1:b2Vec2):b2Vec2{ return (new b2Vec2((m_linearVelocity.x + (m_angularVelocity * (_arg1.y - m_sweep.c.y))), (m_linearVelocity.x - (m_angularVelocity * (_arg1.x - m_sweep.c.x))))); } public function SetLinearVelocity(_arg1:b2Vec2):void{ m_linearVelocity.SetV(_arg1); } public function WakeUp():void{ m_flags = (m_flags & ~(e_sleepFlag)); m_sleepTime = 0; } public function GetLocalCenter():b2Vec2{ return (m_sweep.localCenter); } public function ApplyTorque(_arg1:Number):void{ if (IsSleeping()){ WakeUp(); }; m_torque = (m_torque + _arg1); } public function IsFrozen():Boolean{ return (((m_flags & e_frozenFlag) == e_frozenFlag)); } public function IsDynamic():Boolean{ return ((m_type == e_dynamicType)); } public function GetLinearVelocity():b2Vec2{ return (m_linearVelocity); } public function SynchronizeTransform():void{ var _local1:b2Mat22; var _local2:b2Vec2; m_xf.R.Set(m_sweep.a); _local1 = m_xf.R; _local2 = m_sweep.localCenter; m_xf.position.x = (m_sweep.c.x - ((_local1.col1.x * _local2.x) + (_local1.col2.x * _local2.y))); m_xf.position.y = (m_sweep.c.y - ((_local1.col1.y * _local2.x) + (_local1.col2.y * _local2.y))); } public function GetInertia():Number{ return (m_I); } public function IsSleeping():Boolean{ return (((m_flags & e_sleepFlag) == e_sleepFlag)); } public function SetMassFromShapes():void{ var _local1:b2Shape; var _local2:Number; var _local3:Number; var _local4:b2MassData; var _local5:b2Mat22; var _local6:b2Vec2; var _local7:int; if (m_world.m_lock == true){ return; }; m_mass = 0; m_invMass = 0; m_I = 0; m_invI = 0; _local2 = 0; _local3 = 0; _local4 = s_massData; _local1 = m_shapeList; while (_local1) { _local1.ComputeMass(_local4); m_mass = (m_mass + _local4.mass); _local2 = (_local2 + (_local4.mass * _local4.center.x)); _local3 = (_local3 + (_local4.mass * _local4.center.y)); m_I = (m_I + _local4.I); _local1 = _local1.m_next; }; if (m_mass > 0){ m_invMass = (1 / m_mass); _local2 = (_local2 * m_invMass); _local3 = (_local3 * m_invMass); }; if ((((m_I > 0)) && (((m_flags & e_fixedRotationFlag) == 0)))){ m_I = (m_I - (m_mass * ((_local2 * _local2) + (_local3 * _local3)))); m_invI = (1 / m_I); } else { m_I = 0; m_invI = 0; }; m_sweep.localCenter.Set(_local2, _local3); _local5 = m_xf.R; _local6 = m_sweep.localCenter; m_sweep.c.x = ((_local5.col1.x * _local6.x) + (_local5.col2.x * _local6.y)); m_sweep.c.y = ((_local5.col1.y * _local6.x) + (_local5.col2.y * _local6.y)); m_sweep.c.x = (m_sweep.c.x + m_xf.position.x); m_sweep.c.y = (m_sweep.c.y + m_xf.position.y); m_sweep.c0.SetV(m_sweep.c); _local1 = m_shapeList; while (_local1) { _local1.UpdateSweepRadius(m_sweep.localCenter); _local1 = _local1.m_next; }; _local7 = m_type; if ((((m_invMass == 0)) && ((m_invI == 0)))){ m_type = e_staticType; } else { m_type = e_dynamicType; }; if (_local7 != m_type){ _local1 = m_shapeList; while (_local1) { _local1.RefilterProxy(m_world.m_broadPhase, m_xf); _local1 = _local1.m_next; }; }; } public function PutToSleep():void{ m_flags = (m_flags | e_sleepFlag); m_sleepTime = 0; m_linearVelocity.SetZero(); m_angularVelocity = 0; m_force.SetZero(); m_torque = 0; } public function GetJointList():b2JointEdge{ return (m_jointList); } public function SetXForm(_arg1:b2Vec2, _arg2:Number):Boolean{ var _local3:b2Shape; var _local4:b2Mat22; var _local5:b2Vec2; var _local6:Boolean; var _local7:Boolean; if (m_world.m_lock == true){ return (true); }; if (IsFrozen()){ return (false); }; m_xf.R.Set(_arg2); m_xf.position.SetV(_arg1); _local4 = m_xf.R; _local5 = m_sweep.localCenter; m_sweep.c.x = ((_local4.col1.x * _local5.x) + (_local4.col2.x * _local5.y)); m_sweep.c.y = ((_local4.col1.y * _local5.x) + (_local4.col2.y * _local5.y)); m_sweep.c.x = (m_sweep.c.x + m_xf.position.x); m_sweep.c.y = (m_sweep.c.y + m_xf.position.y); m_sweep.c0.SetV(m_sweep.c); m_sweep.a0 = (m_sweep.a = _arg2); _local6 = false; _local3 = m_shapeList; while (_local3) { _local7 = _local3.Synchronize(m_world.m_broadPhase, m_xf, m_xf); if (_local7 == false){ _local6 = true; break; }; _local3 = _local3.m_next; }; if (_local6 == true){ m_flags = (m_flags | e_frozenFlag); m_linearVelocity.SetZero(); m_angularVelocity = 0; _local3 = m_shapeList; while (_local3) { _local3.DestroyProxy(m_world.m_broadPhase); _local3 = _local3.m_next; }; return (false); }; m_world.m_broadPhase.Commit(); return (true); } public function GetLocalPoint(_arg1:b2Vec2):b2Vec2{ return (b2Math.b2MulXT(m_xf, _arg1)); } public function ApplyForce(_arg1:b2Vec2, _arg2:b2Vec2):void{ if (IsSleeping()){ WakeUp(); }; m_force.x = (m_force.x + _arg1.x); m_force.y = (m_force.y + _arg1.y); m_torque = (m_torque + (((_arg2.x - m_sweep.c.x) * _arg1.y) - ((_arg2.y - m_sweep.c.y) * _arg1.x))); } public function SynchronizeShapes():Boolean{ var _local1:b2XForm; var _local2:b2Mat22; var _local3:b2Vec2; var _local4:b2Shape; var _local5:Boolean; _local1 = s_xf1; _local1.R.Set(m_sweep.a0); _local2 = _local1.R; _local3 = m_sweep.localCenter; _local1.position.x = (m_sweep.c0.x - ((_local2.col1.x * _local3.x) + (_local2.col2.x * _local3.y))); _local1.position.y = (m_sweep.c0.y - ((_local2.col1.y * _local3.x) + (_local2.col2.y * _local3.y))); _local5 = true; _local4 = m_shapeList; while (_local4) { _local5 = _local4.Synchronize(m_world.m_broadPhase, _local1, m_xf); if (_local5 == false){ break; }; _local4 = _local4.m_next; }; if (_local5 == false){ m_flags = (m_flags | e_frozenFlag); m_linearVelocity.SetZero(); m_angularVelocity = 0; _local4 = m_shapeList; while (_local4) { _local4.DestroyProxy(m_world.m_broadPhase); _local4 = _local4.m_next; }; return (false); }; return (true); } public function GetAngle():Number{ return (m_sweep.a); } public function GetXForm():b2XForm{ return (m_xf); } public function ApplyImpulse(_arg1:b2Vec2, _arg2:b2Vec2):void{ if (IsSleeping()){ WakeUp(); }; m_linearVelocity.x = (m_linearVelocity.x + (m_invMass * _arg1.x)); m_linearVelocity.y = (m_linearVelocity.y + (m_invMass * _arg1.y)); m_angularVelocity = (m_angularVelocity + (m_invI * (((_arg2.x - m_sweep.c.x) * _arg1.y) - ((_arg2.y - m_sweep.c.y) * _arg1.x)))); } public function GetNext():b2Body{ return (m_next); } public function GetMass():Number{ return (m_mass); } public function GetLinearVelocityFromLocalPoint(_arg1:b2Vec2):b2Vec2{ var _local2:b2Mat22; var _local3:b2Vec2; _local2 = m_xf.R; _local3 = new b2Vec2(((_local2.col1.x * _arg1.x) + (_local2.col2.x * _arg1.y)), ((_local2.col1.y * _arg1.x) + (_local2.col2.y * _arg1.y))); _local3.x = (_local3.x + m_xf.position.x); _local3.y = (_local3.y + m_xf.position.y); return (new b2Vec2((m_linearVelocity.x + (m_angularVelocity * (_local3.y - m_sweep.c.y))), (m_linearVelocity.x - (m_angularVelocity * (_local3.x - m_sweep.c.x))))); } public function GetAngularVelocity():Number{ return (m_angularVelocity); } public function SetAngularVelocity(_arg1:Number):void{ m_angularVelocity = _arg1; } public function SetMass(_arg1:b2MassData):void{ var _local2:b2Shape; var _local3:b2Mat22; var _local4:b2Vec2; var _local5:int; if (m_world.m_lock == true){ return; }; m_invMass = 0; m_I = 0; m_invI = 0; m_mass = _arg1.mass; if (m_mass > 0){ m_invMass = (1 / m_mass); }; if ((m_flags & b2Body.e_fixedRotationFlag) == 0){ m_I = _arg1.I; }; if (m_I > 0){ m_invI = (1 / m_I); }; m_sweep.localCenter.SetV(_arg1.center); _local3 = m_xf.R; _local4 = m_sweep.localCenter; m_sweep.c.x = ((_local3.col1.x * _local4.x) + (_local3.col2.x * _local4.y)); m_sweep.c.y = ((_local3.col1.y * _local4.x) + (_local3.col2.y * _local4.y)); m_sweep.c.x = (m_sweep.c.x + m_xf.position.x); m_sweep.c.y = (m_sweep.c.y + m_xf.position.y); m_sweep.c0.SetV(m_sweep.c); _local2 = m_shapeList; while (_local2) { _local2.UpdateSweepRadius(m_sweep.localCenter); _local2 = _local2.m_next; }; _local5 = m_type; if ((((m_invMass == 0)) && ((m_invI == 0)))){ m_type = e_staticType; } else { m_type = e_dynamicType; }; if (_local5 != m_type){ _local2 = m_shapeList; while (_local2) { _local2.RefilterProxy(m_world.m_broadPhase, m_xf); _local2 = _local2.m_next; }; }; } public function IsStatic():Boolean{ return ((m_type == e_staticType)); } public function GetWorldVector(_arg1:b2Vec2):b2Vec2{ return (b2Math.b2MulMV(m_xf.R, _arg1)); } public function GetShapeList():b2Shape{ return (m_shapeList); } public function Advance(_arg1:Number):void{ m_sweep.Advance(_arg1); m_sweep.c.SetV(m_sweep.c0); m_sweep.a = m_sweep.a0; SynchronizeTransform(); } public function SetBullet(_arg1:Boolean):void{ if (_arg1){ m_flags = (m_flags | e_bulletFlag); } else { m_flags = (m_flags & ~(e_bulletFlag)); }; } public function CreateShape(_arg1:b2ShapeDef):b2Shape{ var _local2:b2Shape; if (m_world.m_lock == true){ return (null); }; _local2 = b2Shape.Create(_arg1, m_world.m_blockAllocator); _local2.m_next = m_shapeList; m_shapeList = _local2; m_shapeCount++; _local2.m_body = this; _local2.CreateProxy(m_world.m_broadPhase, m_xf); _local2.UpdateSweepRadius(m_sweep.localCenter); return (_local2); } public function IsConnected(_arg1:b2Body):Boolean{ var _local2:b2JointEdge; _local2 = m_jointList; while (_local2) { if (_local2.other == _arg1){ return ((_local2.joint.m_collideConnected == false)); }; _local2 = _local2.next; }; return (false); } public function DestroyShape(_arg1:b2Shape):void{ var _local2:b2Shape; var _local3:b2Shape; var _local4:Boolean; if (m_world.m_lock == true){ return; }; _arg1.DestroyProxy(m_world.m_broadPhase); _local2 = m_shapeList; _local3 = null; _local4 = false; while (_local2 != null) { if (_local2 == _arg1){ if (_local3){ _local3.m_next = _arg1.m_next; } else { m_shapeList = _arg1.m_next; }; _local4 = true; break; }; _local3 = _local2; _local2 = _local2.m_next; }; _arg1.m_body = null; _arg1.m_next = null; m_shapeCount--; b2Shape.Destroy(_arg1, m_world.m_blockAllocator); } public function GetUserData(){ return (m_userData); } public function IsBullet():Boolean{ return (((m_flags & e_bulletFlag) == e_bulletFlag)); } public function GetWorldCenter():b2Vec2{ return (m_sweep.c); } public function AllowSleeping(_arg1:Boolean):void{ if (_arg1){ m_flags = (m_flags | e_allowSleepFlag); } else { m_flags = (m_flags & ~(e_allowSleepFlag)); WakeUp(); }; } public function SetUserData(_arg1):void{ m_userData = _arg1; } public function GetLocalVector(_arg1:b2Vec2):b2Vec2{ return (b2Math.b2MulTMV(m_xf.R, _arg1)); } public function GetWorldPoint(_arg1:b2Vec2):b2Vec2{ var _local2:b2Mat22; var _local3:b2Vec2; _local2 = m_xf.R; _local3 = new b2Vec2(((_local2.col1.x * _arg1.x) + (_local2.col2.x * _arg1.y)), ((_local2.col1.y * _arg1.x) + (_local2.col2.y * _arg1.y))); _local3.x = (_local3.x + m_xf.position.x); _local3.y = (_local3.y + m_xf.position.y); return (_local3); } public function GetWorld():b2World{ return (m_world); } public function GetPosition():b2Vec2{ return (m_xf.position); } } }//package Box2D.Dynamics
Section 65
//b2BodyDef (Box2D.Dynamics.b2BodyDef) package Box2D.Dynamics { import Box2D.Common.Math.*; import Box2D.Collision.Shapes.*; public class b2BodyDef { public var isSleeping:Boolean; public var position:b2Vec2; public var isBullet:Boolean; public var allowSleep:Boolean; public var userData; public var angularDamping:Number; public var fixedRotation:Boolean; public var angle:Number; public var linearDamping:Number; public var massData:b2MassData; public function b2BodyDef(){ massData = new b2MassData(); position = new b2Vec2(); super(); massData.center.SetZero(); massData.mass = 0; massData.I = 0; userData = null; position.Set(0, 0); angle = 0; linearDamping = 0; angularDamping = 0; allowSleep = true; isSleeping = false; fixedRotation = false; isBullet = false; } } }//package Box2D.Dynamics
Section 66
//b2BoundaryListener (Box2D.Dynamics.b2BoundaryListener) package Box2D.Dynamics { public class b2BoundaryListener { public function Violation(_arg1:b2Body):void{ } } }//package Box2D.Dynamics
Section 67
//b2ContactFilter (Box2D.Dynamics.b2ContactFilter) package Box2D.Dynamics { import Box2D.Common.Math.*; import Box2D.Collision.Shapes.*; import Box2D.Collision.*; import Box2D.Common.*; import Box2D.Dynamics.Contacts.*; public class b2ContactFilter { public static var b2_defaultFilter:b2ContactFilter = new (b2ContactFilter); ; function checkForBadKnights(_arg1, _arg2){ if (_arg2.myType != "floor"){ if (_arg2.goodBad == true){ return (true); }; }; return (false); } function checkForKnights(_arg1, _arg2){ if (_arg2.myType != "floor"){ if (_arg2.goodBad == false){ if (_arg2.myType != "potion3"){ return (true); }; }; }; return (false); } function checkForBoulders(_arg1, _arg2){ if (_arg2.myType != "floor"){ if (_arg2.myType != "catapultRod"){ if (_arg2.myType != "catapultCup"){ if (_arg2.myType != "catapultBase"){ if (_arg2.goodBad == false){ return (true); }; }; }; }; }; return (false); } public function ShouldCollide(_arg1:b2Shape, _arg2:b2Shape):Boolean{ var _local3:*; var _local4:Boolean; var _local5:b2FilterData; var _local6:b2FilterData; var _local7:Boolean; var _local8:*; var _local9:*; if (_arg1.m_body.m_userData != null){ _local3 = _arg1.m_body.m_userData.rt; } else { if (_arg2.m_body.m_userData != null){ _local3 = _arg2.m_body.m_userData.rt; }; }; _local4 = false; if (_local3 != null){ if (_local3.bodyGrabbed == _arg1.m_body){ _local4 = true; } else { if (_local3.bodyGrabbed == _arg2.m_body){ _local4 = true; }; }; }; if (_local4 == false){ if (_arg1.m_body.m_userData != null){ if (_arg1.m_body.m_userData.myType == "archer"){ }; }; if (_arg2.m_body.m_userData != null){ if (_arg2.m_body.m_userData.myType == "archer"){ }; }; if (_arg1.m_body.m_userData != null){ if (_arg1.m_body.m_userData.myType == "block"){ if (_arg1.m_body.m_userData.currentFrame > 1){ if (_arg2.m_body.m_userData.myType != "blockEnemy"){ if (_arg2.m_body.m_userData.myType != "block"){ if (_arg2.m_body.m_userData.myType != "wood"){ if (_arg2.m_body.m_userData.myType != "foor"){ if (_arg2.m_body.m_userData.goodBad == false){ return (false); }; }; }; }; }; }; } else { if (_arg1.m_body.m_userData.myType == "blockEnemy"){ if (_arg1.m_body.m_userData.currentFrame > 1){ if (_arg2.m_body.m_userData.myType != "block"){ if (_arg2.m_body.m_userData.myType != "blockEnemy"){ if (_arg2.m_body.m_userData.myType != "wood"){ if (_arg2.m_body.m_userData.myType != "foor"){ if (_arg2.m_body.m_userData.goodBad == true){ return (false); }; }; }; }; }; }; } else { if (_arg2.m_body.m_userData.myType == "block"){ if (_arg2.m_body.m_userData.currentFrame > 1){ if (_arg1.m_body.m_userData.myType != "block"){ if (_arg1.m_body.m_userData.myType != "blockEnemy"){ if (_arg1.m_body.m_userData.myType != "wood"){ if (_arg1.m_body.m_userData.myType != "floor"){ if (_arg1.m_body.m_userData.goodBad == false){ return (false); }; }; }; }; }; }; } else { if (_arg2.m_body.m_userData.myType == "blockEnemy"){ if (_arg2.m_body.m_userData.currentFrame > 1){ if (_arg1.m_body.m_userData.myType != "block"){ if (_arg1.m_body.m_userData.myType != "blockEnemy"){ if (_arg1.m_body.m_userData.myType != "wood"){ if (_arg1.m_body.m_userData.myType != "floor"){ if (_arg1.m_body.m_userData.goodBad == true){ return (false); }; }; }; }; }; }; } else { if (_arg1.m_body.m_userData.myType == "kingBad1"){ if (_arg2.m_body.m_userData.goodBad == true){ return (false); }; } else { if (_arg2.m_body.m_userData.myType == "kingBad1"){ if (_arg1.m_body.m_userData.goodBad == true){ return (false); }; }; }; }; }; }; }; _local8 = _arg1.m_body.m_userData; _local9 = _arg2.m_body.m_userData; if (_arg1.m_body.m_userData.myType == "knight"){ if (checkForKnights(_local8, _local9)){ return (false); }; } else { if (_arg2.m_body.m_userData.myType == "knight"){ if (checkForKnights(_local9, _local8)){ return (false); }; }; }; if (_arg1.m_body.m_userData.myType == "badKnight2"){ if (checkForBadKnights(_local8, _local9)){ return (false); }; } else { if (_arg2.m_body.m_userData.myType == "badKnight2"){ if (checkForBadKnights(_local9, _local8)){ return (false); }; }; }; if (_arg1.m_body.m_userData.myType == "badKnight1"){ if (checkForBadKnights(_local8, _local9)){ return (false); }; } else { if (_arg2.m_body.m_userData.myType == "badKnight1"){ if (checkForBadKnights(_local9, _local8)){ return (false); }; }; }; if (_arg1.m_body.m_userData.myType == "boulder"){ if (checkForBoulders(_local8, _local9)){ return (false); }; } else { if (_arg2.m_body.m_userData.myType == "boulder"){ if (checkForBoulders(_local9, _local8)){ return (false); }; }; }; if (_arg1.m_body.m_userData.myType == "cannonBall"){ if (checkForBoulders(_local8, _local9)){ return (false); }; } else { if (_arg2.m_body.m_userData.myType == "cannonBall"){ if (checkForBoulders(_local9, _local8)){ return (false); }; }; }; if (_arg1.m_body.m_userData.myType == "badKnight3"){ if (checkForBadKnights(_local8, _local9)){ return (false); }; } else { if (_arg2.m_body.m_userData.myType == "badKnight3"){ if (checkForBadKnights(_local9, _local8)){ return (false); }; }; }; if (_arg1.m_body.m_userData.myType == "kingGood"){ if (checkForKingGood(_local8, _local9)){ return (false); }; } else { if (_arg2.m_body.m_userData.myType == "kingGood"){ if (checkForKingGood(_local9, _local8)){ return (false); }; }; }; if (_arg1.m_body.m_userData.myType == "kingBad"){ if (checkForKingBad(_local8, _local9)){ return (false); }; } else { if (_arg2.m_body.m_userData.myType == "kingBad"){ if (checkForKingBad(_local9, _local8)){ return (false); }; }; }; }; _local5 = _arg1.GetFilterData(); _local6 = _arg2.GetFilterData(); if ((((_local5.groupIndex == _local6.groupIndex)) && (!((_local5.groupIndex == 0))))){ return ((_local5.groupIndex > 0)); }; _local7 = ((!(((_local5.maskBits & _local6.categoryBits) == 0))) && (!(((_local5.categoryBits & _local6.maskBits) == 0)))); return (_local7); //unresolved jump }; return (false); } function checkForKingGood(_arg1, _arg2){ if (_arg2.myType == "floor"){ return (false); }; if (_arg2.buildingBit == true){ return (false); }; if (_arg2.goodBad == false){ return (true); }; } function checkForKingBad(_arg1, _arg2){ if (_arg2.myType == "floor"){ return (false); }; if (_arg2.buildingBit == false){ return (false); }; return (true); } function checkForPotions(_arg1, _arg2){ if (_arg2.myType != "floor"){ if (_arg2.myType != "catapultRod"){ if (_arg2.myType != "catapultCup"){ if (_arg2.myType != "catapultBase"){ if (_arg2.goodBad == true){ return (true); }; }; }; }; }; return (false); } } }//package Box2D.Dynamics
Section 68
//b2ContactListener (Box2D.Dynamics.b2ContactListener) package Box2D.Dynamics { import Box2D.Common.Math.*; import Box2D.Collision.Shapes.*; import Box2D.Collision.*; import Box2D.Common.*; import Box2D.Dynamics.Contacts.*; public class b2ContactListener { var myName2:String; var goodBad1:Boolean; var goodBad2:Boolean; var myName1:String; function checkForBadKnight1(_arg1:b2ContactPoint){ if (goodBad2 == false){ if (myName2 != "floor"){ if (_arg1.shape2.GetBody().GetUserData().energy > 0){ if (myName2 != "kingGood"){ _arg1.shape1.GetBody().GetUserData().collisionWith = _arg1.shape2.GetBody().GetUserData(); } else { _arg1.shape1.GetBody().GetUserData().collisionWithS = _arg1.shape2.GetBody().GetUserData(); _arg1.shape2.GetBody().GetUserData().collisionWithS = _arg1.shape1.GetBody().GetUserData(); }; }; }; } else { if (_arg1.shape1.GetBody().GetUserData().myObject != null){ if (myName2 == "blockEnemy"){ _arg1.shape1.GetBody().GetUserData().collisionWith = _arg1.shape2.GetBody().GetUserData(); }; }; }; } public function Persist(_arg1:b2ContactPoint):void{ } public function Remove(_arg1:b2ContactPoint):void{ } public function Add(_arg1:b2ContactPoint):void{ if (_arg1.shape1.GetBody().GetUserData() != null){ if (_arg1.shape2.GetBody().GetUserData() != null){ myName1 = _arg1.shape1.GetBody().GetUserData().myType; myName2 = _arg1.shape2.GetBody().GetUserData().myType; if (_arg1.shape1.GetBody().GetUserData() != null){ goodBad1 = _arg1.shape1.GetBody().GetUserData().goodBad; }; if (_arg1.shape2.GetBody().GetUserData() != null){ goodBad2 = _arg1.shape2.GetBody().GetUserData().goodBad; }; if (myName1 == "knight"){ if (goodBad2 == true){ if (myName2 != "blockEnemy"){ if (myName2 != "woodBad"){ if (myName2 != "woodBlockEnemy"){ if (_arg1.shape2.GetBody().GetUserData().energy > 0){ _arg1.shape1.GetBody().GetUserData().collisionWithS = _arg1.shape2.GetBody().GetUserData(); _arg1.shape2.GetBody().GetUserData().collisionWithS = _arg1.shape1.GetBody().GetUserData(); }; } else { _arg1.shape1.GetBody().GetUserData().collisionWith = _arg1.shape2.GetBody().GetUserData(); }; } else { if (_arg1.shape2.GetBody().GetUserData().energy > 0){ _arg1.shape1.GetBody().GetUserData().collisionWithW = _arg1.shape2.GetBody().GetUserData(); }; }; } else { if (_arg1.shape2.GetBody().GetUserData().energy > 0){ _arg1.shape1.GetBody().GetUserData().collisionWith = _arg1.shape2.GetBody().GetUserData(); }; }; } else { if (myName2 != "floor"){ if (_arg1.shape1.GetBody().GetUserData().myObject != null){ if (myName2 != "knight"){ if (myName2 == "potion3"){ _arg1.shape2.GetBody().GetUserData().collisionWith = _arg1.shape1.GetBody().GetUserData(); } else { _arg1.shape1.GetBody().GetUserData().collisionWith = _arg1.shape2.GetBody().GetUserData(); }; }; }; }; }; } else { if (myName2 == "knight"){ if (goodBad1 == true){ if (myName1 != "blockEnemy"){ if (myName1 != "woodBad"){ if (myName1 != "woodBlockEnemy"){ if (_arg1.shape1.GetBody().GetUserData().energy > 0){ _arg1.shape2.GetBody().GetUserData().collisionWithS = _arg1.shape1.GetBody().GetUserData(); _arg1.shape1.GetBody().GetUserData().collisionWithS = _arg1.shape2.GetBody().GetUserData(); }; } else { if (_arg1.shape1.GetBody().GetUserData().energy > 0){ _arg1.shape2.GetBody().GetUserData().collisionWith = _arg1.shape1.GetBody().GetUserData(); }; }; } else { if (_arg1.shape1.GetBody().GetUserData().energy > 0){ _arg1.shape2.GetBody().GetUserData().collisionWithW = _arg1.shape1.GetBody().GetUserData(); }; }; } else { if (_arg1.shape1.GetBody().GetUserData().energy > 0){ _arg1.shape2.GetBody().GetUserData().collisionWith = _arg1.shape1.GetBody().GetUserData(); }; }; } else { if (myName1 != "floor"){ if (_arg1.shape2.GetBody().GetUserData().myObject != null){ if (myName1 != "knight"){ if (myName1 == "potion3"){ _arg1.shape1.GetBody().GetUserData().collisionWith = _arg1.shape2.GetBody().GetUserData(); } else { _arg1.shape2.GetBody().GetUserData().collisionWith = _arg1.shape1.GetBody().GetUserData(); }; }; }; }; }; } else { if (myName1 == "archer"){ if (goodBad2 == true){ if (myName2 != "blockEnemy"){ if (myName2 != "woodBad"){ if (_arg1.shape2.GetBody().GetUserData().energy > 0){ _arg1.shape1.GetBody().GetUserData().collisionWithS = _arg1.shape2.GetBody().GetUserData(); _arg1.shape2.GetBody().GetUserData().collisionWithS = _arg1.shape1.GetBody().GetUserData(); }; } else { if (_arg1.shape2.GetBody().GetUserData().energy > 0){ _arg1.shape1.GetBody().GetUserData().collisionWithW = _arg1.shape2.GetBody().GetUserData(); }; }; } else { if (_arg1.shape2.GetBody().GetUserData().energy > 0){ _arg1.shape1.GetBody().GetUserData().collisionWith = _arg1.shape2.GetBody().GetUserData(); }; }; } else { if (myName2 != "floor"){ if (_arg1.shape1.GetBody().GetUserData().myObject != null){ if (myName2 != "knight"){ if (myName2 == "potion3"){ _arg1.shape2.GetBody().GetUserData().collisionWith = _arg1.shape1.GetBody().GetUserData(); } else { _arg1.shape1.GetBody().GetUserData().collisionWith = _arg1.shape2.GetBody().GetUserData(); }; }; }; }; }; } else { if (myName2 == "archer"){ if (goodBad1 == true){ if (myName1 != "blockEnemy"){ if (myName1 != "woodBad"){ if (_arg1.shape1.GetBody().GetUserData().energy > 0){ _arg1.shape2.GetBody().GetUserData().collisionWithS = _arg1.shape1.GetBody().GetUserData(); _arg1.shape1.GetBody().GetUserData().collisionWithS = _arg1.shape2.GetBody().GetUserData(); }; } else { if (_arg1.shape1.GetBody().GetUserData().energy > 0){ _arg1.shape2.GetBody().GetUserData().collisionWithW = _arg1.shape1.GetBody().GetUserData(); }; }; } else { if (_arg1.shape1.GetBody().GetUserData().energy > 0){ _arg1.shape2.GetBody().GetUserData().collisionWith = _arg1.shape1.GetBody().GetUserData(); }; }; } else { if (myName1 != "floor"){ if (_arg1.shape2.GetBody().GetUserData().myObject != null){ if (myName1 != "knight"){ if (myName1 == "potion3"){ _arg1.shape1.GetBody().GetUserData().collisionWith = _arg1.shape2.GetBody().GetUserData(); } else { _arg1.shape2.GetBody().GetUserData().collisionWith = _arg1.shape1.GetBody().GetUserData(); }; }; }; }; }; } else { if (myName1 == "wizard"){ if (goodBad2 == true){ if (myName2 != "blockEnemy"){ if (myName2 != "woodBad"){ if (_arg1.shape2.GetBody().GetUserData().energy > 0){ _arg1.shape1.GetBody().GetUserData().collisionWithS = _arg1.shape2.GetBody().GetUserData(); _arg1.shape2.GetBody().GetUserData().collisionWithS = _arg1.shape1.GetBody().GetUserData(); }; } else { if (_arg1.shape2.GetBody().GetUserData().energy > 0){ _arg1.shape1.GetBody().GetUserData().collisionWithW = _arg1.shape2.GetBody().GetUserData(); }; }; } else { if (_arg1.shape2.GetBody().GetUserData().energy > 0){ _arg1.shape1.GetBody().GetUserData().collisionWith = _arg1.shape2.GetBody().GetUserData(); }; }; } else { if (myName2 != "floor"){ if (_arg1.shape1.GetBody().GetUserData().myObject != null){ if (myName2 != "knight"){ if (myName2 == "potion3"){ _arg1.shape2.GetBody().GetUserData().collisionWith = _arg1.shape1.GetBody().GetUserData(); } else { _arg1.shape1.GetBody().GetUserData().collisionWith = _arg1.shape2.GetBody().GetUserData(); }; }; }; }; }; } else { if (myName2 == "wizard"){ if (goodBad1 == true){ if (myName1 != "blockEnemy"){ if (myName1 != "woodBad"){ if (_arg1.shape1.GetBody().GetUserData().energy > 0){ _arg1.shape2.GetBody().GetUserData().collisionWithS = _arg1.shape1.GetBody().GetUserData(); _arg1.shape1.GetBody().GetUserData().collisionWithS = _arg1.shape2.GetBody().GetUserData(); }; } else { if (_arg1.shape1.GetBody().GetUserData().energy > 0){ _arg1.shape2.GetBody().GetUserData().collisionWithW = _arg1.shape1.GetBody().GetUserData(); }; }; } else { if (_arg1.shape1.GetBody().GetUserData().energy > 0){ _arg1.shape2.GetBody().GetUserData().collisionWith = _arg1.shape1.GetBody().GetUserData(); }; }; } else { if (myName1 != "floor"){ if (_arg1.shape2.GetBody().GetUserData().myObject != null){ if (myName1 != "knight"){ if (myName1 == "potion3"){ _arg1.shape1.GetBody().GetUserData().collisionWith = _arg1.shape2.GetBody().GetUserData(); } else { _arg1.shape2.GetBody().GetUserData().collisionWith = _arg1.shape1.GetBody().GetUserData(); }; }; }; }; }; } else { if (myName1 == "badKnight1"){ checkForBadKnight1(_arg1); } else { if (myName2 == "badKnight1"){ checkForBadKnight2(_arg1); } else { if (myName1 == "badKnight2"){ checkForBadKnight1(_arg1); } else { if (myName2 == "badKnight2"){ checkForBadKnight2(_arg1); } else { if (myName1 == "badKnight3"){ checkForBadKnight1(_arg1); } else { if (myName2 == "badKnight3"){ checkForBadKnight2(_arg1); } else { if (myName1 == "viking1"){ checkForBadKnight1(_arg1); } else { if (myName2 == "viking1"){ checkForBadKnight2(_arg1); } else { if (myName1 == "ram"){ checkForBadKnight1(_arg1); } else { if (myName2 == "ram"){ checkForBadKnight2(_arg1); } else { if (myName1 == "boulder"){ if (myName2 != "floor"){ if (_arg1.shape2.GetBody().GetUserData().goodBad == true){ _arg1.shape1.GetBody().GetUserData().collisionWith = _arg1.shape2.GetBody().GetUserData(); }; } else { _arg1.shape1.GetBody().GetUserData().decreaseEnergy(100); }; } else { if (myName2 == "boulder"){ if (myName1 != "floor"){ if (_arg1.shape1.GetBody().GetUserData().goodBad == true){ _arg1.shape2.GetBody().GetUserData().collisionWith = _arg1.shape1.GetBody().GetUserData(); }; } else { _arg1.shape2.GetBody().GetUserData().decreaseEnergy(100); }; } else { if (myName1 == "cannonBall"){ if (myName2 != "floor"){ if (_arg1.shape2.GetBody().GetUserData().goodBad == true){ _arg1.shape1.GetBody().GetUserData().collisionWith = _arg1.shape2.GetBody().GetUserData(); }; } else { _arg1.shape1.GetBody().GetUserData().decreaseEnergy(100); }; } else { if (myName2 == "cannonBall"){ if (myName1 != "floor"){ if (_arg1.shape1.GetBody().GetUserData().goodBad == true){ _arg1.shape2.GetBody().GetUserData().collisionWith = _arg1.shape1.GetBody().GetUserData(); }; } else { _arg1.shape2.GetBody().GetUserData().decreaseEnergy(100); }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; if (myName1 == "floor"){ if (_arg1.shape2.GetBody().GetUserData().y != 0){ _arg1.shape2.GetBody().GetUserData().setupPuffSmoke(); }; } else { if (myName2 == "floor"){ if (_arg1.shape1.GetBody().GetUserData().y != 0){ _arg1.shape1.GetBody().GetUserData().setupPuffSmoke(); }; }; }; }; }; } function checkForBadKnight2(_arg1:b2ContactPoint){ if (goodBad1 == false){ if (myName1 != "floor"){ if (_arg1.shape1.GetBody().GetUserData().energy > 0){ if (myName1 != "kingGood"){ _arg1.shape2.GetBody().GetUserData().collisionWith = _arg1.shape1.GetBody().GetUserData(); } else { _arg1.shape2.GetBody().GetUserData().collisionWithS = _arg1.shape1.GetBody().GetUserData(); _arg1.shape1.GetBody().GetUserData().collisionWithS = _arg1.shape2.GetBody().GetUserData(); }; }; }; } else { if (_arg1.shape2.GetBody().GetUserData().myObject != null){ if (myName1 == "blockEnemy"){ _arg1.shape2.GetBody().GetUserData().collisionWith = _arg1.shape1.GetBody().GetUserData(); }; }; }; } public function Result(_arg1:b2ContactResult):void{ } } }//package Box2D.Dynamics
Section 69
//b2ContactManager (Box2D.Dynamics.b2ContactManager) package Box2D.Dynamics { import Box2D.Common.Math.*; import Box2D.Collision.Shapes.*; import Box2D.Collision.*; import Box2D.Dynamics.Contacts.*; public class b2ContactManager extends b2PairCallback { public var m_world:b2World; public var m_destroyImmediate:Boolean; public var m_nullContact:b2NullContact; private static const s_evalCP:b2ContactPoint = new b2ContactPoint(); public function b2ContactManager(){ m_nullContact = new b2NullContact(); super(); m_world = null; m_destroyImmediate = false; } override public function PairAdded(_arg1, _arg2){ var _local3:b2Shape; var _local4:b2Shape; var _local5:b2Body; var _local6:b2Body; var _local7:b2Contact; _local3 = (_arg1 as b2Shape); _local4 = (_arg2 as b2Shape); _local5 = _local3.m_body; _local6 = _local4.m_body; if (((_local5.IsStatic()) && (_local6.IsStatic()))){ return (m_nullContact); }; if (_local3.m_body == _local4.m_body){ return (m_nullContact); }; if (_local6.IsConnected(_local5)){ return (m_nullContact); }; if (((!((m_world.m_contactFilter == null))) && ((m_world.m_contactFilter.ShouldCollide(_local3, _local4) == false)))){ return (m_nullContact); }; _local7 = b2Contact.Create(_local3, _local4, m_world.m_blockAllocator); if (_local7 == null){ return (m_nullContact); }; _local3 = _local7.m_shape1; _local4 = _local7.m_shape2; _local5 = _local3.m_body; _local6 = _local4.m_body; _local7.m_prev = null; _local7.m_next = m_world.m_contactList; if (m_world.m_contactList != null){ m_world.m_contactList.m_prev = _local7; }; m_world.m_contactList = _local7; _local7.m_node1.contact = _local7; _local7.m_node1.other = _local6; _local7.m_node1.prev = null; _local7.m_node1.next = _local5.m_contactList; if (_local5.m_contactList != null){ _local5.m_contactList.prev = _local7.m_node1; }; _local5.m_contactList = _local7.m_node1; _local7.m_node2.contact = _local7; _local7.m_node2.other = _local5; _local7.m_node2.prev = null; _local7.m_node2.next = _local6.m_contactList; if (_local6.m_contactList != null){ _local6.m_contactList.prev = _local7.m_node2; }; _local6.m_contactList = _local7.m_node2; m_world.m_contactCount++; return (_local7); } override public function PairRemoved(_arg1, _arg2, _arg3):void{ var _local4:b2Contact; if (_arg3 == null){ return; }; _local4 = (_arg3 as b2Contact); if (_local4 == m_nullContact){ return; }; Destroy(_local4); } public function Destroy(_arg1:b2Contact):void{ var _local2:b2Shape; var _local3:b2Shape; var _local4:int; var _local5:b2Body; var _local6:b2Body; var _local7:b2Body; var _local8:b2Body; var _local9:Array; var _local10:b2ContactPoint; var _local11:int; var _local12:b2Manifold; var _local13:int; var _local14:b2ManifoldPoint; var _local15:b2Vec2; var _local16:b2Vec2; _local2 = _arg1.m_shape1; _local3 = _arg1.m_shape2; _local4 = _arg1.m_manifoldCount; if ((((_local4 > 0)) && (m_world.m_contactListener))){ _local7 = _local2.m_body; _local8 = _local3.m_body; _local9 = _arg1.GetManifolds(); _local10 = s_evalCP; _local10.shape1 = _arg1.m_shape1; _local10.shape2 = _arg1.m_shape1; _local10.friction = _arg1.m_friction; _local10.restitution = _arg1.m_restitution; _local11 = 0; while (_local11 < _local4) { _local12 = _local9[_local11]; _local10.normal.SetV(_local12.normal); _local13 = 0; while (_local13 < _local12.pointCount) { _local14 = _local12.points[_local13]; _local10.position = _local7.GetWorldPoint(_local14.localPoint1); _local15 = _local7.GetLinearVelocityFromLocalPoint(_local14.localPoint1); _local16 = _local8.GetLinearVelocityFromLocalPoint(_local14.localPoint2); _local10.velocity.Set((_local16.x - _local15.x), (_local16.y - _local15.y)); _local10.separation = _local14.separation; _local10.id.key = _local14.id._key; m_world.m_contactListener.Remove(_local10); _local13++; }; _local11++; }; }; if (_arg1.m_prev){ _arg1.m_prev.m_next = _arg1.m_next; }; if (_arg1.m_next){ _arg1.m_next.m_prev = _arg1.m_prev; }; if (_arg1 == m_world.m_contactList){ m_world.m_contactList = _arg1.m_next; }; _local5 = _local2.m_body; _local6 = _local3.m_body; if (_arg1.m_node1.prev){ _arg1.m_node1.prev.next = _arg1.m_node1.next; }; if (_arg1.m_node1.next){ _arg1.m_node1.next.prev = _arg1.m_node1.prev; }; if (_arg1.m_node1 == _local5.m_contactList){ _local5.m_contactList = _arg1.m_node1.next; }; if (_arg1.m_node2.prev){ _arg1.m_node2.prev.next = _arg1.m_node2.next; }; if (_arg1.m_node2.next){ _arg1.m_node2.next.prev = _arg1.m_node2.prev; }; if (_arg1.m_node2 == _local6.m_contactList){ _local6.m_contactList = _arg1.m_node2.next; }; b2Contact.Destroy(_arg1, m_world.m_blockAllocator); m_world.m_contactCount--; } public function Collide():void{ var _local1:b2Contact; var _local2:b2Body; var _local3:b2Body; _local1 = m_world.m_contactList; while (_local1) { _local2 = _local1.m_shape1.m_body; _local3 = _local1.m_shape2.m_body; if (((_local2.IsSleeping()) && (_local3.IsSleeping()))){ } else { _local1.Update(m_world.m_contactListener); }; _local1 = _local1.m_next; }; } } }//package Box2D.Dynamics
Section 70
//b2DebugDraw (Box2D.Dynamics.b2DebugDraw) package Box2D.Dynamics { import flash.display.*; import Box2D.Common.Math.*; import Box2D.Collision.Shapes.*; import Box2D.Collision.*; import Box2D.Common.*; import Box2D.Dynamics.Contacts.*; public class b2DebugDraw { public var m_xformScale:Number;// = 1 public var m_fillAlpha:Number;// = 1 public var m_alpha:Number;// = 1 public var m_lineThickness:Number;// = 1 public var m_drawFlags:uint; public var m_sprite:Sprite; public var m_drawScale:Number;// = 1 public static var e_coreShapeBit:uint = 4; public static var e_shapeBit:uint = 1; public static var e_centerOfMassBit:uint = 64; public static var e_aabbBit:uint = 8; public static var e_obbBit:uint = 16; public static var e_pairBit:uint = 32; public static var e_jointBit:uint = 2; public function b2DebugDraw(){ m_drawScale = 1; m_lineThickness = 1; m_alpha = 1; m_fillAlpha = 1; m_xformScale = 1; super(); m_drawFlags = 0; } public function DrawSolidPolygon(_arg1:Array, _arg2:int, _arg3:b2Color):void{ var _local4:int; m_sprite.graphics.lineStyle(m_lineThickness, _arg3.color, m_alpha); m_sprite.graphics.moveTo((_arg1[0].x * m_drawScale), (_arg1[0].y * m_drawScale)); m_sprite.graphics.beginFill(_arg3.color, m_fillAlpha); _local4 = 1; while (_local4 < _arg2) { m_sprite.graphics.lineTo((_arg1[_local4].x * m_drawScale), (_arg1[_local4].y * m_drawScale)); _local4++; }; m_sprite.graphics.lineTo((_arg1[0].x * m_drawScale), (_arg1[0].y * m_drawScale)); m_sprite.graphics.endFill(); } public function DrawCircle(_arg1:b2Vec2, _arg2:Number, _arg3:b2Color):void{ m_sprite.graphics.lineStyle(m_lineThickness, _arg3.color, m_alpha); m_sprite.graphics.drawCircle((_arg1.x * m_drawScale), (_arg1.y * m_drawScale), (_arg2 * m_drawScale)); } public function DrawXForm(_arg1:b2XForm):void{ m_sprite.graphics.lineStyle(m_lineThickness, 0xFF0000, m_alpha); m_sprite.graphics.moveTo((_arg1.position.x * m_drawScale), (_arg1.position.y * m_drawScale)); m_sprite.graphics.lineTo(((_arg1.position.x + (m_xformScale * _arg1.R.col1.x)) * m_drawScale), ((_arg1.position.y + (m_xformScale * _arg1.R.col1.y)) * m_drawScale)); m_sprite.graphics.lineStyle(m_lineThickness, 0xFF00, m_alpha); m_sprite.graphics.moveTo((_arg1.position.x * m_drawScale), (_arg1.position.y * m_drawScale)); m_sprite.graphics.lineTo(((_arg1.position.x + (m_xformScale * _arg1.R.col2.x)) * m_drawScale), ((_arg1.position.y + (m_xformScale * _arg1.R.col2.y)) * m_drawScale)); } public function ClearFlags(_arg1:uint):void{ m_drawFlags = (m_drawFlags & ~(_arg1)); } public function DrawSolidCircle(_arg1:b2Vec2, _arg2:Number, _arg3:b2Vec2, _arg4:b2Color):void{ m_sprite.graphics.lineStyle(m_lineThickness, _arg4.color, m_alpha); m_sprite.graphics.moveTo(0, 0); m_sprite.graphics.beginFill(_arg4.color, m_fillAlpha); m_sprite.graphics.drawCircle((_arg1.x * m_drawScale), (_arg1.y * m_drawScale), (_arg2 * m_drawScale)); m_sprite.graphics.endFill(); m_sprite.graphics.moveTo((_arg1.x * m_drawScale), (_arg1.y * m_drawScale)); m_sprite.graphics.lineTo(((_arg1.x + (_arg3.x * _arg2)) * m_drawScale), ((_arg1.y + (_arg3.y * _arg2)) * m_drawScale)); } public function SetFlags(_arg1:uint):void{ m_drawFlags = _arg1; } public function AppendFlags(_arg1:uint):void{ m_drawFlags = (m_drawFlags | _arg1); } public function DrawSegment(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:b2Color):void{ m_sprite.graphics.lineStyle(m_lineThickness, _arg3.color, m_alpha); m_sprite.graphics.moveTo((_arg1.x * m_drawScale), (_arg1.y * m_drawScale)); m_sprite.graphics.lineTo((_arg2.x * m_drawScale), (_arg2.y * m_drawScale)); } public function GetFlags():uint{ return (m_drawFlags); } public function DrawPolygon(_arg1:Array, _arg2:int, _arg3:b2Color):void{ var _local4:int; m_sprite.graphics.lineStyle(m_lineThickness, _arg3.color, m_alpha); m_sprite.graphics.moveTo((_arg1[0].x * m_drawScale), (_arg1[0].y * m_drawScale)); _local4 = 1; while (_local4 < _arg2) { m_sprite.graphics.lineTo((_arg1[_local4].x * m_drawScale), (_arg1[_local4].y * m_drawScale)); _local4++; }; m_sprite.graphics.lineTo((_arg1[0].x * m_drawScale), (_arg1[0].y * m_drawScale)); } } }//package Box2D.Dynamics
Section 71
//b2DestructionListener (Box2D.Dynamics.b2DestructionListener) package Box2D.Dynamics { import Box2D.Collision.Shapes.*; import Box2D.Dynamics.Joints.*; public class b2DestructionListener { public function SayGoodbyeJoint(_arg1:b2Joint):void{ } public function SayGoodbyeShape(_arg1:b2Shape):void{ } } }//package Box2D.Dynamics
Section 72
//b2Island (Box2D.Dynamics.b2Island) package Box2D.Dynamics { import Box2D.Common.Math.*; import Box2D.Dynamics.Joints.*; import Box2D.Collision.*; import Box2D.Common.*; import Box2D.Dynamics.Contacts.*; public class b2Island { public var m_joints:Array; public var m_listener:b2ContactListener; public var m_positionIterationCount:int; public var m_bodyCapacity:int; public var m_bodies:Array; public var m_jointCapacity:int; public var m_contactCount:int; public var m_contacts:Array; public var m_contactCapacity:int; public var m_jointCount:int; public var m_allocator; public var m_bodyCount:int; private static var s_reportCR:b2ContactResult = new b2ContactResult(); public function b2Island(_arg1:int, _arg2:int, _arg3:int, _arg4, _arg5:b2ContactListener){ var _local6:int; super(); m_bodyCapacity = _arg1; m_contactCapacity = _arg2; m_jointCapacity = _arg3; m_bodyCount = 0; m_contactCount = 0; m_jointCount = 0; m_allocator = _arg4; m_listener = _arg5; m_bodies = new Array(_arg1); _local6 = 0; while (_local6 < _arg1) { m_bodies[_local6] = null; _local6++; }; m_contacts = new Array(_arg2); _local6 = 0; while (_local6 < _arg2) { m_contacts[_local6] = null; _local6++; }; m_joints = new Array(_arg3); _local6 = 0; while (_local6 < _arg3) { m_joints[_local6] = null; _local6++; }; m_positionIterationCount = 0; } public function AddBody(_arg1:b2Body):void{ var _local2 = m_bodyCount++; m_bodies[_local2] = _arg1; } public function AddJoint(_arg1:b2Joint):void{ var _local2 = m_jointCount++; m_joints[_local2] = _arg1; } public function Report(_arg1:Array):void{ var _local2:b2Mat22; var _local3:b2Vec2; var _local4:int; var _local5:b2Contact; var _local6:b2ContactConstraint; var _local7:b2ContactResult; var _local8:b2Body; var _local9:int; var _local10:Array; var _local11:int; var _local12:b2Manifold; var _local13:int; var _local14:b2ManifoldPoint; var _local15:b2ContactConstraintPoint; if (m_listener == null){ return; }; _local4 = 0; while (_local4 < m_contactCount) { _local5 = m_contacts[_local4]; _local6 = _arg1[_local4]; _local7 = s_reportCR; _local7.shape1 = _local5.m_shape1; _local7.shape2 = _local5.m_shape2; _local8 = _local7.shape1.m_body; _local9 = _local5.m_manifoldCount; _local10 = _local5.GetManifolds(); _local11 = 0; while (_local11 < _local9) { _local12 = _local10[_local11]; _local7.normal.SetV(_local12.normal); _local13 = 0; while (_local13 < _local12.pointCount) { _local14 = _local12.points[_local13]; _local15 = _local6.points[_local13]; _local7.position = _local8.GetWorldPoint(_local14.localPoint1); _local7.normalImpulse = _local15.normalImpulse; _local7.tangentImpulse = _local15.tangentImpulse; _local7.id.key = _local14.id.key; m_listener.Result(_local7); _local13++; }; _local11++; }; _local4++; }; } public function Solve(_arg1:b2TimeStep, _arg2:b2Vec2, _arg3:Boolean, _arg4:Boolean):void{ var _local5:int; var _local6:b2Body; var _local7:b2Joint; var _local8:b2ContactSolver; var _local9:int; var _local10:Boolean; var _local11:Boolean; var _local12:Boolean; var _local13:Number; var _local14:Number; var _local15:Number; _local5 = 0; while (_local5 < m_bodyCount) { _local6 = m_bodies[_local5]; if (_local6.IsStatic()){ } else { _local6.m_linearVelocity.x = (_local6.m_linearVelocity.x + (_arg1.dt * (_arg2.x + (_local6.m_invMass * _local6.m_force.x)))); _local6.m_linearVelocity.y = (_local6.m_linearVelocity.y + (_arg1.dt * (_arg2.y + (_local6.m_invMass * _local6.m_force.y)))); _local6.m_angularVelocity = (_local6.m_angularVelocity + ((_arg1.dt * _local6.m_invI) * _local6.m_torque)); _local6.m_force.SetZero(); _local6.m_torque = 0; _local6.m_linearVelocity.Multiply(b2Math.b2Clamp((1 - (_arg1.dt * _local6.m_linearDamping)), 0, 1)); _local6.m_angularVelocity = (_local6.m_angularVelocity * b2Math.b2Clamp((1 - (_arg1.dt * _local6.m_angularDamping)), 0, 1)); if (_local6.m_linearVelocity.LengthSquared() > b2Settings.b2_maxLinearVelocitySquared){ _local6.m_linearVelocity.Normalize(); _local6.m_linearVelocity.x = (_local6.m_linearVelocity.x * b2Settings.b2_maxLinearVelocity); _local6.m_linearVelocity.y = (_local6.m_linearVelocity.y * b2Settings.b2_maxLinearVelocity); }; if ((_local6.m_angularVelocity * _local6.m_angularVelocity) > b2Settings.b2_maxAngularVelocitySquared){ if (_local6.m_angularVelocity < 0){ _local6.m_angularVelocity = -(b2Settings.b2_maxAngularVelocity); } else { _local6.m_angularVelocity = b2Settings.b2_maxAngularVelocity; }; }; }; _local5++; }; _local8 = new b2ContactSolver(_arg1, m_contacts, m_contactCount, m_allocator); _local8.InitVelocityConstraints(_arg1); _local5 = 0; while (_local5 < m_jointCount) { _local7 = m_joints[_local5]; _local7.InitVelocityConstraints(_arg1); _local5++; }; _local5 = 0; while (_local5 < _arg1.maxIterations) { _local8.SolveVelocityConstraints(); _local9 = 0; while (_local9 < m_jointCount) { _local7 = m_joints[_local9]; _local7.SolveVelocityConstraints(_arg1); _local9++; }; _local5++; }; _local8.FinalizeVelocityConstraints(); _local5 = 0; while (_local5 < m_bodyCount) { _local6 = m_bodies[_local5]; if (_local6.IsStatic()){ } else { _local6.m_sweep.c0.SetV(_local6.m_sweep.c); _local6.m_sweep.a0 = _local6.m_sweep.a; _local6.m_sweep.c.x = (_local6.m_sweep.c.x + (_arg1.dt * _local6.m_linearVelocity.x)); _local6.m_sweep.c.y = (_local6.m_sweep.c.y + (_arg1.dt * _local6.m_linearVelocity.y)); _local6.m_sweep.a = (_local6.m_sweep.a + (_arg1.dt * _local6.m_angularVelocity)); _local6.SynchronizeTransform(); }; _local5++; }; if (_arg3){ _local5 = 0; while (_local5 < m_jointCount) { _local7 = m_joints[_local5]; _local7.InitPositionConstraints(); _local5++; }; m_positionIterationCount = 0; while (m_positionIterationCount < _arg1.maxIterations) { _local10 = _local8.SolvePositionConstraints(b2Settings.b2_contactBaumgarte); _local11 = true; _local5 = 0; while (_local5 < m_jointCount) { _local7 = m_joints[_local5]; _local12 = _local7.SolvePositionConstraints(); _local11 = ((_local11) && (_local12)); _local5++; }; if (((_local10) && (_local11))){ break; }; m_positionIterationCount++; }; }; Report(_local8.m_constraints); if (_arg4){ _local13 = Number.MAX_VALUE; _local14 = (b2Settings.b2_linearSleepTolerance * b2Settings.b2_linearSleepTolerance); _local15 = (b2Settings.b2_angularSleepTolerance * b2Settings.b2_angularSleepTolerance); _local5 = 0; while (_local5 < m_bodyCount) { _local6 = m_bodies[_local5]; if (_local6.m_invMass == 0){ } else { if ((_local6.m_flags & b2Body.e_allowSleepFlag) == 0){ _local6.m_sleepTime = 0; _local13 = 0; }; if (((((((_local6.m_flags & b2Body.e_allowSleepFlag) == 0)) || (((_local6.m_angularVelocity * _local6.m_angularVelocity) > _local15)))) || ((b2Math.b2Dot(_local6.m_linearVelocity, _local6.m_linearVelocity) > _local14)))){ _local6.m_sleepTime = 0; _local13 = 0; } else { _local6.m_sleepTime = (_local6.m_sleepTime + _arg1.dt); _local13 = b2Math.b2Min(_local13, _local6.m_sleepTime); }; }; _local5++; }; if (_local13 >= b2Settings.b2_timeToSleep){ _local5 = 0; while (_local5 < m_bodyCount) { _local6 = m_bodies[_local5]; m_bodies[_local5].m_flags = (_local6.m_flags | b2Body.e_sleepFlag); _local6.m_linearVelocity.SetZero(); _local6.m_angularVelocity = 0; _local5++; }; }; }; } public function AddContact(_arg1:b2Contact):void{ var _local2 = m_contactCount++; m_contacts[_local2] = _arg1; } public function Clear():void{ m_bodyCount = 0; m_contactCount = 0; m_jointCount = 0; } public function SolveTOI(_arg1:b2TimeStep):void{ var _local2:int; var _local3:b2ContactSolver; var _local4:Number; var _local5:b2Body; var _local6:Boolean; _local3 = new b2ContactSolver(_arg1, m_contacts, m_contactCount, m_allocator); _local2 = 0; while (_local2 < _arg1.maxIterations) { _local3.SolveVelocityConstraints(); _local2++; }; _local2 = 0; while (_local2 < m_bodyCount) { _local5 = m_bodies[_local2]; if (_local5.IsStatic()){ } else { _local5.m_sweep.c0.SetV(_local5.m_sweep.c); _local5.m_sweep.a0 = _local5.m_sweep.a; _local5.m_sweep.c.x = (_local5.m_sweep.c.x + (_arg1.dt * _local5.m_linearVelocity.x)); _local5.m_sweep.c.y = (_local5.m_sweep.c.y + (_arg1.dt * _local5.m_linearVelocity.y)); _local5.m_sweep.a = (_local5.m_sweep.a + (_arg1.dt * _local5.m_angularVelocity)); _local5.SynchronizeTransform(); }; _local2++; }; _local4 = 0.75; _local2 = 0; while (_local2 < _arg1.maxIterations) { _local6 = _local3.SolvePositionConstraints(_local4); if (_local6){ break; }; _local2++; }; Report(_local3.m_constraints); } } }//package Box2D.Dynamics
Section 73
//b2TimeStep (Box2D.Dynamics.b2TimeStep) package Box2D.Dynamics { public class b2TimeStep { public var warmStarting:Boolean; public var positionCorrection:Boolean; public var dt:Number; public var maxIterations:int; public var dtRatio:Number; public var inv_dt:Number; } }//package Box2D.Dynamics
Section 74
//b2World (Box2D.Dynamics.b2World) package Box2D.Dynamics { import Box2D.Common.Math.*; import Box2D.Collision.Shapes.*; import Box2D.Dynamics.Joints.*; import Box2D.Collision.*; import Box2D.Common.*; import Box2D.Dynamics.Contacts.*; public class b2World { public var m_inv_dt0:Number; public var m_boundaryListener:b2BoundaryListener; public var m_contactList:b2Contact; public var m_blockAllocator; public var m_contactListener:b2ContactListener; public var m_allowSleep:Boolean; public var m_broadPhase:b2BroadPhase; public var m_destructionListener:b2DestructionListener; public var m_jointCount:int; public var m_bodyCount:int; public var m_lock:Boolean; public var m_positionIterationCount:int; public var m_groundBody:b2Body; public var m_contactCount:int; public var m_debugDraw:b2DebugDraw; public var m_contactFilter:b2ContactFilter; public var m_bodyList:b2Body; public var m_stackAllocator; public var m_jointList:b2Joint; public var m_gravity:b2Vec2; public var m_contactManager:b2ContactManager; private static var s_jointColor:b2Color = new b2Color(0.5, 0.8, 0.8); public static var m_continuousPhysics:Boolean; public static var m_warmStarting:Boolean; private static var s_coreColor:b2Color = new b2Color(0.9, 0.6, 0.6); public static var m_positionCorrection:Boolean; private static var s_xf:b2XForm = new b2XForm(); public function b2World(_arg1:b2AABB, _arg2:b2Vec2, _arg3:Boolean){ var _local4:b2BodyDef; m_contactManager = new b2ContactManager(); super(); m_destructionListener = null; m_boundaryListener = null; m_contactFilter = b2ContactFilter.b2_defaultFilter; m_contactListener = null; m_debugDraw = null; m_bodyList = null; m_contactList = null; m_jointList = null; m_bodyCount = 0; m_contactCount = 0; m_jointCount = 0; m_positionCorrection = true; m_warmStarting = true; m_continuousPhysics = true; m_allowSleep = _arg3; m_gravity = _arg2; m_lock = false; m_inv_dt0 = 0; m_contactManager.m_world = this; m_broadPhase = new b2BroadPhase(_arg1, m_contactManager); _local4 = new b2BodyDef(); m_groundBody = CreateBody(_local4); } public function DrawJoint(_arg1:b2Joint):void{ var _local2:b2Body; var _local3:b2Body; var _local4:b2XForm; var _local5:b2XForm; var _local6:b2Vec2; var _local7:b2Vec2; var _local8:b2Vec2; var _local9:b2Vec2; var _local10:b2Color; var _local11:b2PulleyJoint; var _local12:b2Vec2; var _local13:b2Vec2; _local2 = _arg1.m_body1; _local3 = _arg1.m_body2; _local4 = _local2.m_xf; _local5 = _local3.m_xf; _local6 = _local4.position; _local7 = _local5.position; _local8 = _arg1.GetAnchor1(); _local9 = _arg1.GetAnchor2(); _local10 = s_jointColor; switch (_arg1.m_type){ case b2Joint.e_distanceJoint: m_debugDraw.DrawSegment(_local8, _local9, _local10); break; case b2Joint.e_pulleyJoint: _local11 = (_arg1 as b2PulleyJoint); _local12 = _local11.GetGroundAnchor1(); _local13 = _local11.GetGroundAnchor2(); m_debugDraw.DrawSegment(_local12, _local8, _local10); m_debugDraw.DrawSegment(_local13, _local9, _local10); m_debugDraw.DrawSegment(_local12, _local13, _local10); break; case b2Joint.e_mouseJoint: m_debugDraw.DrawSegment(_local8, _local9, _local10); break; default: if (_local2 != m_groundBody){ m_debugDraw.DrawSegment(_local6, _local8, _local10); }; m_debugDraw.DrawSegment(_local8, _local9, _local10); if (_local3 != m_groundBody){ m_debugDraw.DrawSegment(_local7, _local9, _local10); }; }; } public function Refilter(_arg1:b2Shape):void{ _arg1.RefilterProxy(m_broadPhase, _arg1.m_body.m_xf); } public function SetDebugDraw(_arg1:b2DebugDraw):void{ m_debugDraw = _arg1; } public function SetContinuousPhysics(_arg1:Boolean):void{ m_continuousPhysics = _arg1; } public function GetProxyCount():int{ return (m_broadPhase.m_proxyCount); } public function DrawDebugData():void{ var _local1:uint; var _local2:int; var _local3:b2Body; var _local4:b2Shape; var _local5:b2Joint; var _local6:b2BroadPhase; var _local7:b2Vec2; var _local8:b2Vec2; var _local9:b2Vec2; var _local10:b2Color; var _local11:b2XForm; var _local12:b2AABB; var _local13:b2AABB; var _local14:Array; var _local15:Boolean; var _local16:uint; var _local17:b2Pair; var _local18:b2Proxy; var _local19:b2Proxy; var _local20:b2Vec2; var _local21:b2Vec2; var _local22:b2Proxy; var _local23:b2PolygonShape; var _local24:b2OBB; var _local25:b2Vec2; var _local26:b2Mat22; var _local27:b2Vec2; var _local28:Number; if (m_debugDraw == null){ return; }; m_debugDraw.m_sprite.graphics.clear(); _local1 = m_debugDraw.GetFlags(); _local7 = new b2Vec2(); _local8 = new b2Vec2(); _local9 = new b2Vec2(); _local10 = new b2Color(0, 0, 0); _local12 = new b2AABB(); _local13 = new b2AABB(); _local14 = [new b2Vec2(), new b2Vec2(), new b2Vec2(), new b2Vec2()]; if ((_local1 & b2DebugDraw.e_shapeBit)){ _local15 = ((_local1 & b2DebugDraw.e_coreShapeBit) == b2DebugDraw.e_coreShapeBit); _local3 = m_bodyList; while (_local3) { _local11 = _local3.m_xf; _local4 = _local3.GetShapeList(); while (_local4) { if (_local3.IsStatic()){ DrawShape(_local4, _local11, new b2Color(0.5, 0.9, 0.5), _local15); } else { if (_local3.IsSleeping()){ DrawShape(_local4, _local11, new b2Color(0.5, 0.5, 0.9), _local15); } else { DrawShape(_local4, _local11, new b2Color(0.9, 0.9, 0.9), _local15); }; }; _local4 = _local4.m_next; }; _local3 = _local3.m_next; }; }; if ((_local1 & b2DebugDraw.e_jointBit)){ _local5 = m_jointList; while (_local5) { DrawJoint(_local5); _local5 = _local5.m_next; }; }; if ((_local1 & b2DebugDraw.e_pairBit)){ _local6 = m_broadPhase; _local7.Set((1 / _local6.m_quantizationFactor.x), (1 / _local6.m_quantizationFactor.y)); _local10.Set(0.9, 0.9, 0.3); _local2 = 0; while (_local2 < b2Pair.b2_tableCapacity) { _local16 = _local6.m_pairManager.m_hashTable[_local2]; while (_local16 != b2Pair.b2_nullPair) { _local17 = _local6.m_pairManager.m_pairs[_local16]; _local18 = _local6.m_proxyPool[_local17.proxyId1]; _local19 = _local6.m_proxyPool[_local17.proxyId2]; _local12.lowerBound.x = (_local6.m_worldAABB.lowerBound.x + (_local7.x * _local6.m_bounds[0][_local18.lowerBounds[0]].value)); _local12.lowerBound.y = (_local6.m_worldAABB.lowerBound.y + (_local7.y * _local6.m_bounds[1][_local18.lowerBounds[1]].value)); _local12.upperBound.x = (_local6.m_worldAABB.lowerBound.x + (_local7.x * _local6.m_bounds[0][_local18.upperBounds[0]].value)); _local12.upperBound.y = (_local6.m_worldAABB.lowerBound.y + (_local7.y * _local6.m_bounds[1][_local18.upperBounds[1]].value)); _local13.lowerBound.x = (_local6.m_worldAABB.lowerBound.x + (_local7.x * _local6.m_bounds[0][_local19.lowerBounds[0]].value)); _local13.lowerBound.y = (_local6.m_worldAABB.lowerBound.y + (_local7.y * _local6.m_bounds[1][_local19.lowerBounds[1]].value)); _local13.upperBound.x = (_local6.m_worldAABB.lowerBound.x + (_local7.x * _local6.m_bounds[0][_local19.upperBounds[0]].value)); _local13.upperBound.y = (_local6.m_worldAABB.lowerBound.y + (_local7.y * _local6.m_bounds[1][_local19.upperBounds[1]].value)); _local8.x = (0.5 * (_local12.lowerBound.x + _local12.upperBound.x)); _local8.y = (0.5 * (_local12.lowerBound.y + _local12.upperBound.y)); _local9.x = (0.5 * (_local13.lowerBound.x + _local13.upperBound.x)); _local9.y = (0.5 * (_local13.lowerBound.y + _local13.upperBound.y)); m_debugDraw.DrawSegment(_local8, _local9, _local10); _local16 = _local17.next; }; _local2++; }; }; if ((_local1 & b2DebugDraw.e_aabbBit)){ _local6 = m_broadPhase; _local20 = _local6.m_worldAABB.lowerBound; _local21 = _local6.m_worldAABB.upperBound; _local7.Set((1 / _local6.m_quantizationFactor.x), (1 / _local6.m_quantizationFactor.y)); _local10.Set(0.9, 0.3, 0.9); _local2 = 0; while (_local2 < b2Settings.b2_maxProxies) { _local22 = _local6.m_proxyPool[_local2]; if (_local22.IsValid() == false){ } else { _local12.lowerBound.x = (_local20.x + (_local7.x * _local6.m_bounds[0][_local22.lowerBounds[0]].value)); _local12.lowerBound.y = (_local20.y + (_local7.y * _local6.m_bounds[1][_local22.lowerBounds[1]].value)); _local12.upperBound.x = (_local20.x + (_local7.x * _local6.m_bounds[0][_local22.upperBounds[0]].value)); _local12.upperBound.y = (_local20.y + (_local7.y * _local6.m_bounds[1][_local22.upperBounds[1]].value)); _local14[0].Set(_local12.lowerBound.x, _local12.lowerBound.y); _local14[1].Set(_local12.upperBound.x, _local12.lowerBound.y); _local14[2].Set(_local12.upperBound.x, _local12.upperBound.y); _local14[3].Set(_local12.lowerBound.x, _local12.upperBound.y); m_debugDraw.DrawPolygon(_local14, 4, _local10); }; _local2++; }; _local14[0].Set(_local20.x, _local20.y); _local14[1].Set(_local21.x, _local20.y); _local14[2].Set(_local21.x, _local21.y); _local14[3].Set(_local20.x, _local21.y); m_debugDraw.DrawPolygon(_local14, 4, new b2Color(0.3, 0.9, 0.9)); }; if ((_local1 & b2DebugDraw.e_obbBit)){ _local10.Set(0.5, 0.3, 0.5); _local3 = m_bodyList; while (_local3) { _local11 = _local3.m_xf; _local4 = _local3.GetShapeList(); while (_local4) { if (_local4.m_type != b2Shape.e_polygonShape){ } else { _local23 = (_local4 as b2PolygonShape); _local24 = _local23.GetOBB(); _local25 = _local24.extents; _local14[0].Set(-(_local25.x), -(_local25.y)); _local14[1].Set(_local25.x, -(_local25.y)); _local14[2].Set(_local25.x, _local25.y); _local14[3].Set(-(_local25.x), _local25.y); _local2 = 0; while (_local2 < 4) { _local26 = _local24.R; _local27 = _local14[_local2]; _local28 = (_local24.center.x + ((_local26.col1.x * _local27.x) + (_local26.col2.x * _local27.y))); _local14[_local2].y = (_local24.center.y + ((_local26.col1.y * _local27.x) + (_local26.col2.y * _local27.y))); _local14[_local2].x = _local28; _local26 = _local11.R; _local28 = (_local11.position.x + ((_local26.col1.x * _local27.x) + (_local26.col2.x * _local27.y))); _local14[_local2].y = (_local11.position.y + ((_local26.col1.y * _local27.x) + (_local26.col2.y * _local27.y))); _local14[_local2].x = _local28; _local2++; }; m_debugDraw.DrawPolygon(_local14, 4, _local10); }; _local4 = _local4.m_next; }; _local3 = _local3.m_next; }; }; if ((_local1 & b2DebugDraw.e_centerOfMassBit)){ _local3 = m_bodyList; while (_local3) { _local11 = s_xf; _local11.R = _local3.m_xf.R; _local11.position = _local3.GetWorldCenter(); m_debugDraw.DrawXForm(_local11); _local3 = _local3.m_next; }; }; } public function DestroyBody(_arg1:b2Body):void{ var _local2:b2JointEdge; var _local3:b2Shape; var _local4:b2JointEdge; var _local5:b2Shape; if (m_lock == true){ return; }; _local2 = _arg1.m_jointList; while (_local2) { _local4 = _local2; _local2 = _local2.next; if (m_destructionListener){ m_destructionListener.SayGoodbyeJoint(_local4.joint); }; DestroyJoint(_local4.joint); }; _local3 = _arg1.m_shapeList; while (_local3) { _local5 = _local3; _local3 = _local3.m_next; if (m_destructionListener){ m_destructionListener.SayGoodbyeShape(_local5); }; _local5.DestroyProxy(m_broadPhase); b2Shape.Destroy(_local5, m_blockAllocator); }; if (_arg1.m_prev){ _arg1.m_prev.m_next = _arg1.m_next; }; if (_arg1.m_next){ _arg1.m_next.m_prev = _arg1.m_prev; }; if (_arg1 == m_bodyList){ m_bodyList = _arg1.m_next; }; m_bodyCount--; } public function SetContactFilter(_arg1:b2ContactFilter):void{ m_contactFilter = _arg1; } public function GetGroundBody():b2Body{ return (m_groundBody); } public function DrawShape(_arg1:b2Shape, _arg2:b2XForm, _arg3:b2Color, _arg4:Boolean):void{ var _local5:b2Color; var _local6:b2CircleShape; var _local7:b2Vec2; var _local8:Number; var _local9:b2Vec2; var _local10:int; var _local11:b2PolygonShape; var _local12:int; var _local13:Array; var _local14:Array; var _local15:Array; _local5 = s_coreColor; switch (_arg1.m_type){ case b2Shape.e_circleShape: _local6 = (_arg1 as b2CircleShape); _local7 = b2Math.b2MulX(_arg2, _local6.m_localPosition); _local8 = _local6.m_radius; _local9 = _arg2.R.col1; m_debugDraw.DrawSolidCircle(_local7, _local8, _local9, _arg3); if (_arg4){ m_debugDraw.DrawCircle(_local7, (_local8 - b2Settings.b2_toiSlop), _local5); }; break; case b2Shape.e_polygonShape: _local11 = (_arg1 as b2PolygonShape); _local12 = _local11.GetVertexCount(); _local13 = _local11.GetVertices(); _local14 = new Array(b2Settings.b2_maxPolygonVertices); _local10 = 0; while (_local10 < _local12) { _local14[_local10] = b2Math.b2MulX(_arg2, _local13[_local10]); _local10++; }; m_debugDraw.DrawSolidPolygon(_local14, _local12, _arg3); if (_arg4){ _local15 = _local11.GetCoreVertices(); _local10 = 0; while (_local10 < _local12) { _local14[_local10] = b2Math.b2MulX(_arg2, _local15[_local10]); _local10++; }; m_debugDraw.DrawPolygon(_local14, _local12, _local5); }; break; }; } public function GetContactCount():int{ return (m_contactCount); } public function Solve(_arg1:b2TimeStep):void{ var _local2:b2Body; var _local3:b2Island; var _local4:b2Contact; var _local5:b2Joint; var _local6:int; var _local7:Array; var _local8:b2Body; var _local9:int; var _local10:int; var _local11:b2Body; var _local12:b2ContactEdge; var _local13:b2JointEdge; var _local14:Boolean; m_positionIterationCount = 0; _local3 = new b2Island(m_bodyCount, m_contactCount, m_jointCount, m_stackAllocator, m_contactListener); _local2 = m_bodyList; while (_local2) { _local2.m_flags = (_local2.m_flags & ~(b2Body.e_islandFlag)); _local2 = _local2.m_next; }; _local4 = m_contactList; while (_local4) { _local4.m_flags = (_local4.m_flags & ~(b2Contact.e_islandFlag)); _local4 = _local4.m_next; }; _local5 = m_jointList; while (_local5) { _local5.m_islandFlag = false; _local5 = _local5.m_next; }; _local6 = m_bodyCount; _local7 = new Array(_local6); _local8 = m_bodyList; while (_local8) { if ((_local8.m_flags & ((b2Body.e_islandFlag | b2Body.e_sleepFlag) | b2Body.e_frozenFlag))){ } else { if (_local8.IsStatic()){ } else { _local3.Clear(); _local9 = 0; var _temp1 = _local9; _local9 = (_local9 + 1); var _local15 = _temp1; _local7[_local15] = _local8; _local8.m_flags = (_local8.m_flags | b2Body.e_islandFlag); while (_local9 > 0) { --_local9; _local2 = _local7[_local9]; _local3.AddBody(_local2); _local2.m_flags = (_local2.m_flags & ~(b2Body.e_sleepFlag)); if (_local2.IsStatic()){ } else { _local12 = _local2.m_contactList; while (_local12) { if ((_local12.contact.m_flags & (b2Contact.e_islandFlag | b2Contact.e_nonSolidFlag))){ } else { if (_local12.contact.m_manifoldCount == 0){ } else { _local3.AddContact(_local12.contact); _local12.contact.m_flags = (_local12.contact.m_flags | b2Contact.e_islandFlag); _local11 = _local12.other; if ((_local11.m_flags & b2Body.e_islandFlag)){ } else { var _temp2 = _local9; _local9 = (_local9 + 1); var _local16 = _temp2; _local7[_local16] = _local11; _local11.m_flags = (_local11.m_flags | b2Body.e_islandFlag); }; }; }; _local12 = _local12.next; }; _local13 = _local2.m_jointList; while (_local13) { if (_local13.joint.m_islandFlag == true){ } else { _local3.AddJoint(_local13.joint); _local13.joint.m_islandFlag = true; _local11 = _local13.other; if ((_local11.m_flags & b2Body.e_islandFlag)){ } else { var _temp3 = _local9; _local9 = (_local9 + 1); _local16 = _temp3; _local7[_local16] = _local11; _local11.m_flags = (_local11.m_flags | b2Body.e_islandFlag); }; }; _local13 = _local13.next; }; }; }; _local3.Solve(_arg1, m_gravity, m_positionCorrection, m_allowSleep); if (_local3.m_positionIterationCount > m_positionIterationCount){ m_positionIterationCount = _local3.m_positionIterationCount; }; _local10 = 0; while (_local10 < _local3.m_bodyCount) { _local2 = _local3.m_bodies[_local10]; if (_local2.IsStatic()){ _local2.m_flags = (_local2.m_flags & ~(b2Body.e_islandFlag)); }; _local10++; }; }; }; _local8 = _local8.m_next; }; _local2 = m_bodyList; while (_local2) { if ((_local2.m_flags & (b2Body.e_sleepFlag | b2Body.e_frozenFlag))){ } else { if (_local2.IsStatic()){ } else { _local14 = _local2.SynchronizeShapes(); if ((((_local14 == false)) && (!((m_boundaryListener == null))))){ m_boundaryListener.Violation(_local2); }; }; }; _local2 = _local2.m_next; }; m_broadPhase.Commit(); } public function Query(_arg1:b2AABB, _arg2:Array, _arg3:int):int{ var _local4:Array; var _local5:int; var _local6:int; _local4 = new Array(_arg3); _local5 = m_broadPhase.QueryAABB(_arg1, _local4, _arg3); _local6 = 0; while (_local6 < _local5) { _arg2[_local6] = _local4[_local6]; _local6++; }; return (_local5); } public function SetGravity(_arg1:b2Vec2):void{ m_gravity = _arg1; } public function SolveTOI(_arg1:b2TimeStep):void{ var _local2:b2Body; var _local3:b2Shape; var _local4:b2Shape; var _local5:b2Body; var _local6:b2Body; var _local7:b2ContactEdge; var _local8:b2Island; var _local9:int; var _local10:Array; var _local11:b2Contact; var _local12:b2Contact; var _local13:Number; var _local14:b2Body; var _local15:int; var _local16:b2TimeStep; var _local17:int; var _local18:Number; var _local19:Number; var _local20:b2Body; var _local21:Boolean; _local8 = new b2Island(m_bodyCount, b2Settings.b2_maxTOIContactsPerIsland, 0, m_stackAllocator, m_contactListener); _local9 = m_bodyCount; _local10 = new Array(_local9); _local2 = m_bodyList; while (_local2) { _local2.m_flags = (_local2.m_flags & ~(b2Body.e_islandFlag)); _local2.m_sweep.t0 = 0; _local2 = _local2.m_next; }; _local11 = m_contactList; while (_local11) { _local11.m_flags = (_local11.m_flags & ~((b2Contact.e_toiFlag | b2Contact.e_islandFlag))); _local11 = _local11.m_next; }; while (true) { _local12 = null; _local13 = 1; _local11 = m_contactList; for (;_local11;(_local11 = _local11.m_next)) { if ((_local11.m_flags & (b2Contact.e_slowFlag | b2Contact.e_nonSolidFlag))){ } else { _local18 = 1; if ((_local11.m_flags & b2Contact.e_toiFlag)){ _local18 = _local11.m_toi; } else { _local3 = _local11.m_shape1; _local4 = _local11.m_shape2; _local5 = _local3.m_body; _local6 = _local4.m_body; if (((((_local5.IsStatic()) || (_local5.IsSleeping()))) && (((_local6.IsStatic()) || (_local6.IsSleeping()))))){ continue; }; _local19 = _local5.m_sweep.t0; if (_local5.m_sweep.t0 < _local6.m_sweep.t0){ _local19 = _local6.m_sweep.t0; _local5.m_sweep.Advance(_local19); } else { if (_local6.m_sweep.t0 < _local5.m_sweep.t0){ _local19 = _local5.m_sweep.t0; _local6.m_sweep.Advance(_local19); }; }; _local18 = b2TimeOfImpact.TimeOfImpact(_local11.m_shape1, _local5.m_sweep, _local11.m_shape2, _local6.m_sweep); if ((((_local18 > 0)) && ((_local18 < 1)))){ _local18 = (((1 - _local18) * _local19) + _local18); if (_local18 > 1){ _local18 = 1; }; }; _local11.m_toi = _local18; _local11.m_flags = (_local11.m_flags | b2Contact.e_toiFlag); }; if ((((Number.MIN_VALUE < _local18)) && ((_local18 < _local13)))){ _local12 = _local11; _local13 = _local18; }; }; }; if ((((_local12 == null)) || (((1 - (100 * Number.MIN_VALUE)) < _local13)))){ break; }; _local3 = _local12.m_shape1; _local4 = _local12.m_shape2; _local5 = _local3.m_body; _local6 = _local4.m_body; _local5.Advance(_local13); _local6.Advance(_local13); _local12.Update(m_contactListener); _local12.m_flags = (_local12.m_flags & ~(b2Contact.e_toiFlag)); if (_local12.m_manifoldCount == 0){ } else { _local14 = _local5; if (_local14.IsStatic()){ _local14 = _local6; }; _local8.Clear(); _local15 = 0; var _temp1 = _local15; _local15 = (_local15 + 1); var _local22 = _temp1; _local10[_local22] = _local14; _local14.m_flags = (_local14.m_flags | b2Body.e_islandFlag); while (_local15 > 0) { --_local15; _local2 = _local10[_local15]; _local8.AddBody(_local2); _local2.m_flags = (_local2.m_flags & ~(b2Body.e_sleepFlag)); if (_local2.IsStatic()){ } else { _local7 = _local2.m_contactList; while (_local7) { if (_local8.m_contactCount == _local8.m_contactCapacity){ } else { if ((_local7.contact.m_flags & ((b2Contact.e_islandFlag | b2Contact.e_slowFlag) | b2Contact.e_nonSolidFlag))){ } else { if (_local7.contact.m_manifoldCount == 0){ } else { _local8.AddContact(_local7.contact); _local7.contact.m_flags = (_local7.contact.m_flags | b2Contact.e_islandFlag); _local20 = _local7.other; if ((_local20.m_flags & b2Body.e_islandFlag)){ } else { if (_local20.IsStatic() == false){ _local20.Advance(_local13); _local20.WakeUp(); }; var _temp2 = _local15; _local15 = (_local15 + 1); var _local23 = _temp2; _local10[_local23] = _local20; _local20.m_flags = (_local20.m_flags | b2Body.e_islandFlag); }; }; }; }; _local7 = _local7.next; }; }; }; _local16 = new b2TimeStep(); _local16.dt = ((1 - _local13) * _arg1.dt); _local16.inv_dt = (1 / _local16.dt); _local16.maxIterations = _arg1.maxIterations; _local8.SolveTOI(_local16); _local17 = 0; while (_local17 < _local8.m_bodyCount) { _local2 = _local8.m_bodies[_local17]; _local2.m_flags = (_local2.m_flags & ~(b2Body.e_islandFlag)); if ((_local2.m_flags & (b2Body.e_sleepFlag | b2Body.e_frozenFlag))){ } else { if (_local2.IsStatic()){ } else { _local21 = _local2.SynchronizeShapes(); if ((((_local21 == false)) && (!((m_boundaryListener == null))))){ m_boundaryListener.Violation(_local2); }; _local7 = _local2.m_contactList; while (_local7) { _local7.contact.m_flags = (_local7.contact.m_flags & ~(b2Contact.e_toiFlag)); _local7 = _local7.next; }; }; }; _local17++; }; _local17 = 0; while (_local17 < _local8.m_contactCount) { _local11 = _local8.m_contacts[_local17]; _local8.m_contacts[_local17].m_flags = (_local11.m_flags & ~((b2Contact.e_toiFlag | b2Contact.e_islandFlag))); _local17++; }; m_broadPhase.Commit(); }; }; } public function GetJointList():b2Joint{ return (m_jointList); } public function Validate():void{ m_broadPhase.Validate(); } public function GetPairCount():int{ return (m_broadPhase.m_pairManager.m_pairCount); } public function GetBodyList():b2Body{ return (m_bodyList); } public function SetWarmStarting(_arg1:Boolean):void{ m_warmStarting = _arg1; } public function SetPositionCorrection(_arg1:Boolean):void{ m_positionCorrection = _arg1; } public function CreateJoint(_arg1:b2JointDef):b2Joint{ var _local2:b2Joint; var _local3:b2Body; var _local4:b2Shape; _local2 = b2Joint.Create(_arg1, m_blockAllocator); _local2.m_prev = null; _local2.m_next = m_jointList; if (m_jointList){ m_jointList.m_prev = _local2; }; m_jointList = _local2; m_jointCount++; _local2.m_node1.joint = _local2; _local2.m_node1.other = _local2.m_body2; _local2.m_node1.prev = null; _local2.m_node1.next = _local2.m_body1.m_jointList; if (_local2.m_body1.m_jointList){ _local2.m_body1.m_jointList.prev = _local2.m_node1; }; _local2.m_body1.m_jointList = _local2.m_node1; _local2.m_node2.joint = _local2; _local2.m_node2.other = _local2.m_body1; _local2.m_node2.prev = null; _local2.m_node2.next = _local2.m_body2.m_jointList; if (_local2.m_body2.m_jointList){ _local2.m_body2.m_jointList.prev = _local2.m_node2; }; _local2.m_body2.m_jointList = _local2.m_node2; if (_arg1.collideConnected == false){ _local3 = ((_arg1.body1.m_shapeCount < _arg1.body2.m_shapeCount)) ? _arg1.body1 : _arg1.body2; _local4 = _local3.m_shapeList; while (_local4) { _local4.RefilterProxy(m_broadPhase, _local3.m_xf); _local4 = _local4.m_next; }; }; return (_local2); } public function DestroyJoint(_arg1:b2Joint):void{ var _local2:Boolean; var _local3:b2Body; var _local4:b2Body; var _local5:b2Body; var _local6:b2Shape; _local2 = _arg1.m_collideConnected; if (_arg1.m_prev){ _arg1.m_prev.m_next = _arg1.m_next; }; if (_arg1.m_next){ _arg1.m_next.m_prev = _arg1.m_prev; }; if (_arg1 == m_jointList){ m_jointList = _arg1.m_next; }; _local3 = _arg1.m_body1; _local4 = _arg1.m_body2; _local3.WakeUp(); _local4.WakeUp(); if (_arg1.m_node1.prev){ _arg1.m_node1.prev.next = _arg1.m_node1.next; }; if (_arg1.m_node1.next){ _arg1.m_node1.next.prev = _arg1.m_node1.prev; }; if (_arg1.m_node1 == _local3.m_jointList){ _local3.m_jointList = _arg1.m_node1.next; }; _arg1.m_node1.prev = null; _arg1.m_node1.next = null; if (_arg1.m_node2.prev){ _arg1.m_node2.prev.next = _arg1.m_node2.next; }; if (_arg1.m_node2.next){ _arg1.m_node2.next.prev = _arg1.m_node2.prev; }; if (_arg1.m_node2 == _local4.m_jointList){ _local4.m_jointList = _arg1.m_node2.next; }; _arg1.m_node2.prev = null; _arg1.m_node2.next = null; b2Joint.Destroy(_arg1, m_blockAllocator); m_jointCount--; if (_local2 == false){ _local5 = ((_local3.m_shapeCount < _local4.m_shapeCount)) ? _local3 : _local4; _local6 = _local5.m_shapeList; while (_local6) { _local6.RefilterProxy(m_broadPhase, _local5.m_xf); _local6 = _local6.m_next; }; }; } public function SetContactListener(_arg1:b2ContactListener):void{ m_contactListener = _arg1; } public function CreateBody(_arg1:b2BodyDef):b2Body{ var _local2:b2Body; if (m_lock == true){ return (null); }; _local2 = new b2Body(_arg1, this); _local2.m_prev = null; _local2.m_next = m_bodyList; if (m_bodyList){ m_bodyList.m_prev = _local2; }; m_bodyList = _local2; m_bodyCount++; return (_local2); } public function SetBoundaryListener(_arg1:b2BoundaryListener):void{ m_boundaryListener = _arg1; } public function SetDestructionListener(_arg1:b2DestructionListener):void{ m_destructionListener = _arg1; } public function Step(_arg1:Number, _arg2:int):void{ var _local3:b2TimeStep; m_lock = true; _local3 = new b2TimeStep(); _local3.dt = _arg1; _local3.maxIterations = _arg2; if (_arg1 > 0){ _local3.inv_dt = (1 / _arg1); } else { _local3.inv_dt = 0; }; _local3.dtRatio = (m_inv_dt0 * _arg1); _local3.positionCorrection = m_positionCorrection; _local3.warmStarting = m_warmStarting; m_contactManager.Collide(); if (_local3.dt > 0){ Solve(_local3); }; if (((m_continuousPhysics) && ((_local3.dt > 0)))){ SolveTOI(_local3); }; DrawDebugData(); m_inv_dt0 = _local3.inv_dt; m_lock = false; } public function GetBodyCount():int{ return (m_bodyCount); } public function GetJointCount():int{ return (m_jointCount); } } }//package Box2D.Dynamics
Section 75
//as3_shared_objects (classesAS3.as3_shared_objects) package classesAS3 { import flash.display.*; import flash.net.*; import flash.text.*; public class as3_shared_objects extends Sprite { var shared:SharedObject; public function as3_shared_objects(){ shared = SharedObject.getLocal("qfpreloaded2"); if (shared.data.visits == undefined){ shared.data.visits = 1; shared.data.levelNumber = 1; shared.data.score = 0; }; shared.close(); } public function show_text(_arg1){ var _local2:TextField; var _local3:TextFormat; _local2 = new TextField(); _local3 = new TextFormat(); _local3.font = "Lucida Console"; _local3.color = 0xFFFF00; _local2.width = 300; _local2.defaultTextFormat = _local3; _local2.x = 25; _local2.y = 15; addChild(_local2); _local2.appendText((("You visited this page " + _arg1) + " times")); } public function saveGameCookie(_arg1, _arg2){ shared = SharedObject.getLocal("qfpreloaded2"); shared.data.levelNumber = _arg2; shared.data.score = _arg1; shared.close(); } public function newGame(){ var _local1:Object; shared = SharedObject.getLocal("qfpreloaded2"); shared.data.visits++; shared.data.levelNumber = 1; shared.data.score = 0; _local1 = new Object(); _local1.visits = shared.data.visits; _local1.levelNumber = shared.data.levelNumber; _local1.score = shared.data.score; shared.close(); return (_local1); } public function loadOldGame(){ var _local1:Object; shared = SharedObject.getLocal("qfpreloaded2"); _local1 = new Object(); if (shared.data.visits != undefined){ _local1.visits = shared.data.visits; _local1.levelNumber = shared.data.levelNumber; _local1.score = shared.data.score; } else { _local1.visits++; _local1.levelNumber = 1; _local1.score = 0; }; shared.close(); return (_local1); } } }//package classesAS3
Section 76
//GameArcher1 (classesAS3.GameArcher1) package classesAS3 { import flash.display.*; public class GameArcher1 extends MovieClip { public var myType:String; public var goodBad:Boolean; public var myObject:Object; public var mySmoke; public var collisionWith:MovieClip; public var collisionWithS:MovieClip; public var collisionWithW:MovieClip; public var noRotation:Boolean; public var myShapeDef:Object; public var myParent:Object; public var rt:Object; public var soldier:MovieClip; public var energy:Number; public var filterData:Object; public var myBodyDef:Object; public var buildingBit:Boolean;// = false public function GameArcher1(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6){ buildingBit = false; super(); rt = _arg1; myBodyDef = _arg2; myShapeDef = _arg3; myType = _arg4; myParent = _arg5; mySmoke = null; goodBad = _arg6; energy = 100; noRotation = true; } function destroyMe(){ if (rt.bodyGrabbed == myBodyDef){ rt.bodyGrabbed = null; }; rt.m_world.DestroyBody(myBodyDef); removeMe(); } public function removeMe(){ myParent.removeChild(this); } public function checkOffScreen(){ if (this.x > 1700){ destroyMe(); } else { if (this.x < -250){ destroyMe(); }; }; if (this.y > 800){ destroyMe(); }; } public function setupPuffSmoke(){ if (mySmoke == null){ mySmoke = new GameHitFloorSmoke(rt, myParent, this); mySmoke.x = this.x; mySmoke.y = this.y; myParent.addChild(mySmoke); }; } } }//package classesAS3
Section 77
//GameBadArcher1 (classesAS3.GameBadArcher1) package classesAS3 { import flash.display.*; public class GameBadArcher1 extends MovieClip { public var myType:String; public var goodBad:Boolean; public var myObject:Object; public var mySmoke; public var collisionWith:MovieClip; public var collisionWithS:MovieClip; public var noRotation:Boolean; public var myShapeDef:Object; public var myParent:Object; public var rt:Object; public var energy:Number; public var filterData:Object; public var myBodyDef:Object; public var buildingBit:Boolean;// = false public function GameBadArcher1(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6){ buildingBit = false; super(); addFrameScript(0, frame1); rt = _arg1; myBodyDef = _arg2; myShapeDef = _arg3; myType = _arg4; myParent = _arg5; mySmoke = null; goodBad = _arg6; energy = 100; noRotation = true; } function destroyMe(){ if (rt.bodyGrabbed == myBodyDef){ rt.bodyGrabbed = null; }; rt.m_world.DestroyBody(myBodyDef); removeMe(); } public function removeMe(){ myObject.remove(); this.stop(); } function frame1(){ stop(); } public function checkOffScreen(){ if (this.x > 1700){ destroyMe(); } else { if (this.x < -50){ destroyMe(); }; }; if (this.y > 800){ destroyMe(); }; } public function decreaseEnergy(_arg1){ myObject.decreaseEnergy(_arg1); } public function setupPuffSmoke(){ if (mySmoke == null){ mySmoke = new GameHitFloorSmoke(rt, myParent, this); mySmoke.x = this.x; mySmoke.y = this.y; myParent.addChild(mySmoke); }; } } }//package classesAS3
Section 78
//GameBadArcher2 (classesAS3.GameBadArcher2) package classesAS3 { import flash.display.*; public class GameBadArcher2 extends MovieClip { public var goodBad:Boolean; public var myObject:Object; public var myType:String; public var mySmoke; public var collisionWith:MovieClip; public var collisionWithS:MovieClip; public var noRotation:Boolean; public var myShapeDef:Object; public var myParent:Object; public var rt:Object; public var archer:MovieClip; public var energy:Number; public var filterData:Object; public var myBodyDef:Object; public var buildingBit:Boolean;// = false public function GameBadArcher2(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6){ buildingBit = false; super(); addFrameScript(0, frame1); rt = _arg1; myBodyDef = _arg2; myShapeDef = _arg3; myType = _arg4; myParent = _arg5; mySmoke = null; goodBad = _arg6; energy = 100; noRotation = true; } function destroyMe(){ if (rt.bodyGrabbed == myBodyDef){ rt.bodyGrabbed = null; }; rt.m_world.DestroyBody(myBodyDef); removeMe(); } public function removeMe(){ myObject.remove(); this.stop(); } function frame1(){ stop(); } public function checkOffScreen(){ if (this.x > 1700){ destroyMe(); } else { if (this.x < -50){ destroyMe(); }; }; if (this.y > 800){ destroyMe(); }; } public function decreaseEnergy(_arg1){ myObject.decreaseEnergy(_arg1); } public function setupPuffSmoke(){ if (mySmoke == null){ mySmoke = new GameHitFloorSmoke(rt, myParent, this); mySmoke.x = this.x; mySmoke.y = this.y; myParent.addChild(mySmoke); }; } } }//package classesAS3
Section 79
//GameBadGuy (classesAS3.GameBadGuy) package classesAS3 { import flash.display.*; import Box2D.Common.Math.*; import flash.media.*; import classesAS3.*; import flash.filters.*; class GameBadGuy { var xVel:Number;// = 0 var myDamageDelay:Number; var hitVel; var yPos:Number;// = 0 var cArraylength:Number; var inToGround:Number; var myOldAnimationState:Number; var numberOfMissiles;// = 0 public var soldierState:int; var myDamage:Number; var range:Number; var energyMc:MovieClip; var rt:Object; var speed:Number;// = 0 var gravity:Number; var delayToMove:Number; var collisionArray:Array; var myName:String; var projectileMc:Object; var speedOld:Number; var energyBarMc:GameEnergyBar; var dead:Boolean; var yVel:Number;// = 0 var glowFilter:GlowFilter; var distanceArray:Array; var myParent:Object; var mC:Object; var energy:Number;// = 0 public var frozen:Boolean;// = false var myFireDelay:Number; var energyBarOn:Number; var Useful:GameUseful; var energyStart:Number;// = 0 var xPos:Number;// = 0 var headHitBlock:Object; var xOrigin:Number;// = 0 var myScoreValue:Number; var missileName:String; var delayToFireMissile:Number;// = 1 var targetX:Number; var targetY:Number; public var myCurrentSound:SoundChannel; var filterDelay:Number; var myRange:Number; var xDir:Number; var collisionCheck:Number; var yOrigin:Number;// = 0 public static const SOLDIER_STATE_DEFEND:int = 1; public static const SOLDIER_STATE_FALLING:int = 4; public static const SOLDIER_E_MOVE:int = 5; public static const SOLDIER_STATE_RETREAT:int = 3; public static const SOLDIER_E_STAND:int = 0; public static const SOLDIER_STATE_ATTACK:int = 0; public static const SOLDIER_E_BUILD:int = 2; public static const SOLDIER_STATE_MOVE:int = 5; public static const SOLDIER_STATE_FIGHTING:int = 2; function GameBadGuy(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9){ var _local10:Number; xOrigin = 0; yOrigin = 0; xPos = 0; yPos = 0; xVel = 0; yVel = 0; speed = 0; energyStart = 0; energy = 0; delayToFireMissile = 1; numberOfMissiles = 0; frozen = false; super(); mC = _arg5; mC.myObject = this; rt = _arg2; cArraylength = 4; myDamage = _arg9; if (mC.myType == "badArcher2"){ myFireDelay = _arg6.RandomNumber(20, 40); myRange = 450; } else { myFireDelay = _arg6.RandomNumber(80, 120); myRange = 380; }; Useful = _arg6; myScoreValue = _arg8; _local10 = Useful.RandomNumber(1, 10); _local10 = (_local10 - 10); collisionArray = new Array(); dead = false; inToGround = 0; xOrigin = _arg3; yOrigin = _arg4; xPos = 0; yPos = 0; xVel = 0; yVel = 0; myParent = mC.myParent; hitVel = 0; energyBarOn = 0; gravity = 0.1; _local10 = Useful.RandomNumber(1, 10); _local10 = (_local10 / 100); _arg7 = (_arg7 + _local10); speed = _arg7; speedOld = _arg7; xDir = 1; mC.scaleX = -1; distanceArray = new Array(); glowFilter = new GlowFilter(0xFFFFFF, 1, 3, 3, 3, 1); numberOfMissiles = 0; myDamageDelay = 8; energyStart = 100; energy = energyStart; soldierState = SOLDIER_STATE_ATTACK; filterDelay = 1; if (mC.myType == "badArcher2"){ mC.myType = "badArcher1"; myName = "badArcher2"; }; myName = _arg1; collisionCheck = 0; delayToMove = _arg9; if (myName == "bird"){ xVel = -(speed); updatePosition2(); } else { if (myName == "dragon"){ xVel = -(speed); updatePosition2(); } else { updatePosition(); }; }; targetX = mC.x; myOldAnimationState = mC.currentFrame; } function applyGravity(){ yVel = (yVel + gravity); } function updatePosition(){ var _local1:b2Vec2; if (frozen == false){ xVel = (xDir * speed); _local1 = mC.myBodyDef.GetLinearVelocity(); _local1.x = xVel; mC.myBodyDef.WakeUp(); mC.myBodyDef.SetLinearVelocity(_local1); }; } function checkIfInRange(){ var _local1:*; if (rt.movedOverHalf == true){ if (rt.inGameGoodGuysMc.numChildren > 0){ findEnemy(); if (distanceArray.length > 0){ _local1 = myRange; if (mC.x > distanceArray[0].distSprite.x){ xDir = -1; mC.scaleX = 1; } else { xDir = 1; mC.scaleX = -1; }; if (mC.currentFrame != 2){ speed = speedOld; mC.gotoAndStop("run"); }; soldierState = SOLDIER_STATE_ATTACK; }; updatePosition(); }; }; } function checkIfStuck(){ var _local1:Object; var _local2:Object; var _local3:Object; var _local4:b2Vec2; var _local5:b2Vec2; _local1 = new Object(); _local1.xPos = mC.x; _local1.yPos = mC.y; collisionArray.push(_local1); _local2 = collisionArray[0]; if (collisionArray.length >= cArraylength){ _local3 = collisionArray[(cArraylength - 1)]; if (_local2.xPos == mC.x){ if (_local2.yPos == mC.y){ _local4 = new b2Vec2(); xVel = (xDir * speed); _local4.x = xVel; _local4.y = (_local4.y - -50000); _local5 = mC.myBodyDef.GetPosition(); mC.myBodyDef.ApplyImpulse(_local4, _local5); }; }; if (collisionArray.length > cArraylength){ collisionArray.shift(); }; }; } function findEnemy(){ var _local1:Object; var _local2:MovieClip; var _local3:int; var _local4:Object; var _local5:Boolean; distanceArray = new Array(); _local1 = new Object(); _local3 = 0; while (_local3 < rt.inGameBuildingsMc.numChildren) { _local4 = new Object(); _local2 = rt.inGameBuildingsMc.getChildAt(_local3); if (_local2.myType != "wood"){ if (_local2.myType != "boulder"){ if (_local2.energy != null){ if (_local2.energy > 0){ _local5 = false; if (rt.Box2d.bodyGrabbed != null){ if (_local2 == rt.Box2d.bodyGrabbed.m_userData){ _local5 = true; }; }; if (_local5 == false){ _local4.distSprite = _local2; _local4.dist = Useful.getDistance(mC.x, mC.y, _local4.distSprite.x, _local4.distSprite.y); distanceArray.push(_local4); }; }; }; }; }; _local3++; }; _local3 = 0; while (_local3 < rt.inGameGoodGuysMc.numChildren) { _local4 = new Object(); if (rt.inGameGoodGuysMc.getChildAt(_local3).myType != "floor"){ if (rt.inGameGoodGuysMc.getChildAt(_local3).myType != "catapultBase"){ if (rt.inGameGoodGuysMc.getChildAt(_local3).myType != "catapultRod"){ if (rt.inGameGoodGuysMc.getChildAt(_local3).myType != "wood"){ if (rt.inGameGoodGuysMc.getChildAt(_local3).myType != "kingGood"){ if (rt.inGameGoodGuysMc.getChildAt(_local3).energy != null){ if (rt.inGameGoodGuysMc.getChildAt(_local3).energy > 0){ _local5 = false; if (rt.Box2d.bodyGrabbed != null){ if (rt.inGameGoodGuysMc.getChildAt(_local3) == rt.Box2d.bodyGrabbed.m_userData){ _local5 = true; }; }; if (_local5 == false){ _local4.distSprite = rt.inGameGoodGuysMc.getChildAt(_local3); _local4.dist = Useful.getDistance(mC.x, mC.y, _local4.distSprite.x, _local4.distSprite.y); distanceArray.push(_local4); }; }; }; } else { _local5 = false; if (rt.Box2d.bodyGrabbed != null){ if (rt.inGameGoodGuysMc.getChildAt(_local3) == rt.Box2d.bodyGrabbed.m_userData){ _local5 = true; }; }; if (_local5 == false){ _local1.distSprite = rt.inGameGoodGuysMc.getChildAt(_local3); _local1.dist = Useful.getDistance(mC.x, mC.y, _local1.distSprite.x, _local1.distSprite.y); }; }; }; }; }; }; _local3++; }; distanceArray.sortOn("dist", Array.NUMERIC); if (_local1.dist < 270){ distanceArray.splice(0, 0, _local1); } else { if (distanceArray.length > 0){ if (distanceArray[0].dist > myRange){ distanceArray.splice(0, 0, _local1); } else { distanceArray.push(_local1); }; } else { distanceArray.splice(0, 0, _local1); }; }; } function updatePosition2(){ var _local1:*; var _local2:*; xPos = (xPos + xVel); yPos = (yPos + yVel); _local1 = mC.x; _local2 = mC.y; mC.x = (xOrigin + xPos); mC.y = (yOrigin + yPos); } function checkForFire(){ var _local1:*; var _local2:Object; var _local3:Object; delayToFireMissile--; if (delayToFireMissile == 0){ _local1 = myFireDelay; delayToFireMissile = _local1; mC.gotoAndStop("attack"); _local2 = distanceArray[0].distSprite; if (_local2.x > mC.x){ xDir = 1; mC.scaleX = -1; } else { xDir = -1; mC.scaleX = 1; }; if (myName == "badArcher2"){ projectileMc = new evilWizardMissle(); } else { projectileMc = new GameArrow(); }; rt.inGameMissilesMc.addChild(projectileMc); _local3 = Useful.pointTowards(_local2.x, _local2.y, mC.x, mC.y); rt.missilesArray.push(new GameMissile(projectileMc, rt, mC.x, mC.y, "", Useful, _local3, 16, this, myDamage)); }; } public function remove(){ var _local1:int; var _local2:Number; var _local3:*; if (myCurrentSound != null){ myCurrentSound.stop(); }; _local1 = 0; while (_local1 < rt.inGameEnemyMc.numChildren) { if (rt.inGameEnemyMc.getChildAt(_local1) == mC){ rt.inGameEnemyMc.removeChild(mC); mC.stop(); }; _local1++; }; _local2 = -1; _local3 = 0; while (_local3 < rt.badGuysArray.length) { if (this == rt.badGuysArray[_local3]){ _local2 = _local3; }; _local3++; }; if (_local2 >= 0){ rt.badGuysArray.splice(_local2, 1); }; } function checkForFire2(){ var _local1:*; var _local2:Object; var _local3:Object; delayToFireMissile--; if (delayToFireMissile == 0){ _local1 = myFireDelay; delayToFireMissile = _local1; mC.gotoAndStop("attack"); _local2 = distanceArray[0].distSprite; if (myName == "bird"){ projectileMc = new GameRock(); } else { projectileMc = new GameFireBall(); }; rt.inGameMissilesMc.addChild(projectileMc); _local3 = Useful.pointTowards(_local2.x, _local2.y, mC.x, mC.y); rt.missilesArray.push(new GameMissile(projectileMc, rt, mC.x, mC.y, "", Useful, _local3, 16, this, myDamage)); }; } function swordAttack(){ var _local1:Object; delayToFireMissile--; if (delayToFireMissile == 0){ delayToFireMissile = 10; if (mC.currentFrame != 4){ mC.gotoAndStop("shoot"); }; _local1 = distanceArray[0].distSprite; if (_local1 == rt.Player){ rt.decreaseEnergy(1); } else { _local1.decreaseEnergy(mC.x, myDamage); }; }; } function decreaseEnergy(_arg1){ var _local2:Number; var _local3:*; if (mC.myType == "badArcher1"){ }; myDamageDelay--; if (myDamageDelay == 0){ myDamageDelay = 8; if (energy > 0){ energy = (energy - _arg1); if (energyBarOn == 0){ energyBarOn = 1; energyBarMc = new GameEnergyBar(this); mC.addChild(energyBarMc); }; energyBarMc.x = 0; energyBarMc.y = -35; _local2 = (energy / 10); energyBarMc.bar.bar.y = int((10 - _local2)); if (energy <= 0){ rt.increaseScore(myScoreValue); rt.increaseMoney(myScoreValue); _local3 = new GameRisingMoney(rt, rt.inGameScoreMc, myScoreValue); rt.inGameScoreMc.addChild(_local3); _local3.x = mC.x; _local3.y = (mC.y - 10); inToGround = 0; dead = true; myCurrentSound = rt.Sounds.playSoundFx("die_v1_Fx", 1, 0, 1); mC.gotoAndStop("die"); if (myName != "bird"){ if (myName != "dragon"){ rt.Box2d.m_world.DestroyBody(mC.myBodyDef); }; }; return (true); }; if (myName == "bird"){ updatePosition2(); } else { if (myName == "dragon"){ updatePosition2(); } else { updatePosition(); }; }; }; }; return (false); } function findEnemyTarget(){ var _local1:int; var _local2:Boolean; var _local3:Object; var _local4:*; distanceArray = new Array(); _local1 = 0; while (_local1 < rt.badGuysArray.length) { if (rt.badGuysArray[_local1].dead == false){ _local2 = false; _local3 = new Object(); _local3.distSprite = rt.badGuysArray[_local1]; _local3.dist = Useful.getDistanceQ(mC.x, mC.y, rt.badGuysArray[_local1].mC.x, rt.badGuysArray[_local1].mC.y); _local4 = myRange; if (_local3.dist < _local4){ if (myName == "grenader"){ distanceArray.push(_local3); } else { if (Useful.checkForLOS(mC.x, (mC.y - 5), _local3.distSprite.mC.x, (_local3.distSprite.mC.y - 25), _local3.distSprite.mC) == false){ distanceArray.push(_local3); }; }; }; }; _local1++; }; distanceArray.sortOn("dist", Array.NUMERIC); } function mainLoop(){ var _local1:Number; var _local2:Number; var _local3:Number; var _local4:Number; var _local5:b2Vec2; var _local6:Number; if (dead == false){ if (filterDelay > 1){ filterDelay--; if (filterDelay == 1){ mC.filters = []; }; }; if (delayToMove > 0){ delayToMove--; } else { if (frozen == false){ if (myName == "bird"){ if (rt.inGameGoodGuysMc.numChildren > 0){ findEnemy(); if (distanceArray.length > 0){ _local1 = (375 - mC.y); _local1 = int((_local1 / 10)); _local2 = (myRange + _local1); if (distanceArray[0].dist < _local2){ _local3 = 0; if (distanceArray[0].distSprite.y < mC.y){ _local3 = (mC.y - distanceArray[0].distSprite.y); } else { _local3 = (distanceArray[0].distSprite.y - mC.y); }; checkForFire2(); }; }; }; updatePosition2(); if (mC.x < -50){ remove(); }; } else { if (myName == "dragon"){ if (rt.inGameGoodGuysMc.numChildren > 0){ findEnemy(); if (distanceArray.length > 0){ _local1 = (375 - mC.y); _local1 = int((_local1 / 10)); _local2 = (myRange + _local1); if (distanceArray[0].dist < _local2){ _local3 = 0; if (distanceArray[0].distSprite.y < mC.y){ _local3 = (mC.y - distanceArray[0].distSprite.y); } else { _local3 = (distanceArray[0].distSprite.y - mC.y); }; checkForFire2(); }; }; }; updatePosition2(); if (mC.x < -50){ remove(); }; } else { if (mC.myType == "badArcher1"){ if (rt.Box2d.bodyGrabbed != mC.myBodyDef){ if (rt.inGameGoodGuysMc.numChildren > 0){ findEnemy(); if (distanceArray.length > 0){ _local1 = (375 - mC.y); _local1 = int((_local1 / 10)); _local2 = (myRange + _local1); if (distanceArray[0].dist < _local2){ _local3 = 0; if (distanceArray[0].distSprite.y < mC.y){ _local3 = (mC.y - distanceArray[0].distSprite.y); } else { _local3 = (distanceArray[0].distSprite.y - mC.y); }; if (_local3 < 20){ if (mC.x > distanceArray[0].distSprite.x){ xDir = -1; mC.scaleX = 1; } else { xDir = 1; mC.scaleX = -1; }; }; checkForFire(); }; }; }; }; } else { if (rt.Box2d.bodyGrabbed != mC.myBodyDef){ if (mC.collisionWith != null){ if (mC.collisionWith.energy > 0){ if (mC.collisionWith.myType == "block"){ _local4 = (mC.y - mC.collisionWith.y); if (_local4 > 10){ if (headHitBlock != mC.collisionWith){ headHitBlock = mC.collisionWith; collisionCheck = 10; decreaseEnergy(10); }; }; if (soldierState != SOLDIER_STATE_FIGHTING){ mC.gotoAndStop("attack"); soldierState = SOLDIER_STATE_FIGHTING; }; if (mC.collisionWith.decreaseEnergy(myDamage)){ soldierState = SOLDIER_STATE_ATTACK; mC.collisionWith = null; }; } else { if (mC.collisionWith.myType == "woodBlock"){ _local4 = (mC.y - mC.collisionWith.y); if (_local4 > 10){ if (headHitBlock != mC.collisionWith){ headHitBlock = mC.collisionWith; collisionCheck = 10; decreaseEnergy(10); }; }; if (soldierState != SOLDIER_STATE_FIGHTING){ mC.gotoAndStop("attack"); soldierState = SOLDIER_STATE_FIGHTING; }; if (mC.collisionWith.decreaseEnergy(myDamage)){ soldierState = SOLDIER_STATE_ATTACK; mC.collisionWith = null; }; } else { if (mC.collisionWith.myType == "blockEnemy"){ _local4 = (mC.collisionWith.y - mC.y); if (mC.collisionWith.y > mC.y){ soldierState = SOLDIER_STATE_ATTACK; mC.collisionWith = null; }; } else { if (mC.collisionWith.myType == "wood"){ if (soldierState != SOLDIER_STATE_FIGHTING){ mC.gotoAndStop("attack"); soldierState = SOLDIER_STATE_FIGHTING; }; if (mC.collisionWith.decreaseEnergy(myDamage)){ soldierState = SOLDIER_STATE_ATTACK; mC.collisionWith = null; }; } else { if (mC.collisionWith.myType == "boulder"){ if (mC.collisionWith == undefined){ soldierState = SOLDIER_STATE_ATTACK; mC.collisionWith = null; } else { if (mC.collisionWith.currentFrame > 4){ soldierState = SOLDIER_STATE_ATTACK; mC.collisionWith = null; } else { if (soldierState != SOLDIER_STATE_FIGHTING){ mC.gotoAndStop("attack"); soldierState = SOLDIER_STATE_FIGHTING; }; _local5 = mC.myBodyDef.GetLinearVelocity(); decreaseEnergy(25); if (mC.collisionWith.decreaseEnergy(myDamage)){ soldierState = SOLDIER_STATE_ATTACK; mC.collisionWith = null; }; }; }; } else { soldierState = SOLDIER_STATE_ATTACK; }; }; }; }; }; if (soldierState == SOLDIER_STATE_FIGHTING){ if (rt.Box2d.bodyGrabbed == null){ if (mC.x > mC.collisionWith.x){ xDir = -1; mC.scaleX = 1; } else { xDir = 1; mC.scaleX = -1; }; } else { if (mC.collisionWith == rt.Box2d.bodyGrabbed.m_userData){ mC.collisionWith = null; soldierState = SOLDIER_STATE_ATTACK; } else { if (mC.x > mC.collisionWith.x){ xDir = -1; mC.scaleX = 1; } else { xDir = 1; mC.scaleX = -1; }; }; }; }; } else { mC.collisionWith = null; mC.gotoAndStop("attack"); soldierState = SOLDIER_STATE_FIGHTING; }; }; if (mC.collisionWithS != null){ if (mC.collisionWithS.myType == "kingGood"){ if (soldierState != SOLDIER_STATE_FIGHTING){ mC.gotoAndStop("attack"); soldierState = SOLDIER_STATE_FIGHTING; }; if (rt.decreaseEnergy(myDamage)){ soldierState = SOLDIER_STATE_ATTACK; mC.collisionWithS.gotoAndStop("die"); mC.collisionWithS = null; } else { if (mC.collisionWithS.collisionWithS == null){ mC.collisionWithS.collisionWithS = mC; }; }; } else { if (mC.collisionWithS.soldier.currentFrame != 5){ if (mC.collisionWithS.collisionWithS == null){ mC.collisionWithS.collisionWithS = mC; }; _local6 = Useful.getDistance(mC.x, mC.y, mC.collisionWithS.x, mC.collisionWithS.y); if (_local6 > 40){ soldierState = SOLDIER_STATE_ATTACK; } else { if (mC.collisionWithS.myType == "knight"){ if (soldierState != SOLDIER_STATE_FIGHTING){ mC.gotoAndStop("attack"); soldierState = SOLDIER_STATE_FIGHTING; }; if (mC.collisionWithS.myObject.decreaseEnergy(myDamage)){ soldierState = SOLDIER_STATE_ATTACK; mC.collisionWithS = null; }; } else { if (mC.collisionWithS.myType == "archer"){ if (soldierState != SOLDIER_STATE_FIGHTING){ mC.gotoAndStop("attack"); soldierState = SOLDIER_STATE_FIGHTING; }; if (mC.collisionWithS.myObject.decreaseEnergy((myDamage + 2))){ soldierState = SOLDIER_STATE_ATTACK; mC.collisionWithS = null; }; } else { if (mC.collisionWithS.myType == "wizard"){ if (soldierState != SOLDIER_STATE_FIGHTING){ mC.gotoAndStop("attack"); soldierState = SOLDIER_STATE_FIGHTING; }; if (mC.collisionWithS.myObject.decreaseEnergy((myDamage + 2))){ soldierState = SOLDIER_STATE_ATTACK; mC.collisionWithS = null; }; } else { if (mC.collisionWithS.myType == "knight3"){ if (soldierState != SOLDIER_STATE_FIGHTING){ mC.gotoAndStop("attack"); soldierState = SOLDIER_STATE_FIGHTING; }; if (mC.collisionWithS.myObject.decreaseEnergy(myDamage)){ soldierState = SOLDIER_STATE_ATTACK; mC.collisionWithS = null; }; } else { if (mC.collisionWithS.myType == "knight4"){ if (soldierState != SOLDIER_STATE_FIGHTING){ mC.gotoAndStop("attack"); soldierState = SOLDIER_STATE_FIGHTING; }; if (mC.collisionWithS.myObject.decreaseEnergy(myDamage)){ soldierState = SOLDIER_STATE_ATTACK; mC.collisionWithS = null; }; }; }; }; }; }; }; } else { mC.collisionWithS = null; soldierState = SOLDIER_STATE_ATTACK; }; }; if (soldierState == SOLDIER_STATE_FIGHTING){ if (rt.Box2d.bodyGrabbed == null){ if (mC.x > mC.collisionWithS.x){ xDir = -1; mC.scaleX = 1; } else { xDir = 1; mC.scaleX = -1; }; } else { if (mC.collisionWithS == rt.Box2d.bodyGrabbed.m_userData){ mC.collisionWithS = null; soldierState = SOLDIER_STATE_ATTACK; } else { if (mC.x > mC.collisionWithS.x){ xDir = -1; mC.scaleX = 1; } else { xDir = 1; mC.scaleX = -1; }; }; }; }; }; if (soldierState == SOLDIER_STATE_ATTACK){ checkIfInRange(); } else { if (soldierState == SOLDIER_STATE_DEFEND){ if (mC.currentFrame != 1){ mC.gotoAndStop(1); }; if (mC.collisionWith != null){ if (mC.collisionWith.myType == "block"){ _local6 = Useful.getDistance(mC.x, mC.y, mC.collisionWith.x, mC.collisionWith.y); if (_local6 > 40){ soldierState = SOLDIER_STATE_ATTACK; }; }; }; } else { if (soldierState == SOLDIER_STATE_FIGHTING){ if (mC.collisionWithS == null){ if (mC.collisionWith == null){ soldierState = SOLDIER_STATE_ATTACK; }; }; }; }; }; if (mC.currentFrame == 2){ checkIfStuck(); }; } else { if (mC.currentFrame != 6){ mC.gotoAndStop("pickedUp"); }; }; }; }; }; }; }; } else { if (mC.currentFrame != 5){ remove(); }; }; } } }//package classesAS3
Section 80
//GameBadKnight1 (classesAS3.GameBadKnight1) package classesAS3 { import flash.display.*; public class GameBadKnight1 extends MovieClip { public var myType:String; public var goodBad:Boolean; public var myObject:Object; public var mySmoke; public var collisionWith:MovieClip; public var collisionWithS:MovieClip; public var noRotation:Boolean; public var myShapeDef:Object; public var myParent:Object; public var rt:Object; public var energy:Number; public var filterData:Object; public var myBodyDef:Object; public var buildingBit:Boolean;// = false public function GameBadKnight1(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6){ buildingBit = false; super(); addFrameScript(0, frame1); rt = _arg1; myBodyDef = _arg2; myShapeDef = _arg3; myType = _arg4; myParent = _arg5; mySmoke = null; goodBad = _arg6; energy = 100; noRotation = true; } function destroyMe(){ rt.m_world.DestroyBody(myBodyDef); removeMe(); } public function removeMe(){ myObject.remove(); this.stop(); } function frame1(){ stop(); } public function checkOffScreen(){ if (this.x > 1700){ destroyMe(); } else { if (this.x < -50){ destroyMe(); }; }; if (this.y > 800){ destroyMe(); }; } public function decreaseEnergy(_arg1){ myObject.decreaseEnergy(_arg1); } public function setupPuffSmoke(){ if (mySmoke == null){ mySmoke = new GameHitFloorSmoke(rt, myParent, this); mySmoke.x = this.x; mySmoke.y = this.y; myParent.addChild(mySmoke); }; } } }//package classesAS3
Section 81
//GameBadKnight2 (classesAS3.GameBadKnight2) package classesAS3 { import flash.display.*; public class GameBadKnight2 extends MovieClip { public var myType:String; public var goodBad:Boolean; public var myObject:Object; public var mySmoke; public var collisionWith:MovieClip; public var collisionWithS:MovieClip; public var noRotation:Boolean; public var myShapeDef:Object; public var myParent:Object; public var rt:Object; public var energy:Number; public var filterData:Object; public var myBodyDef:Object; public var buildingBit:Boolean;// = false public function GameBadKnight2(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6){ buildingBit = false; super(); addFrameScript(0, frame1); rt = _arg1; myBodyDef = _arg2; myShapeDef = _arg3; myType = _arg4; myParent = _arg5; mySmoke = null; goodBad = _arg6; energy = 100; noRotation = true; } function destroyMe(){ rt.m_world.DestroyBody(myBodyDef); removeMe(); } public function removeMe(){ myObject.remove(); this.stop(); } function frame1(){ stop(); } public function checkOffScreen(){ if (this.x > 1700){ destroyMe(); } else { if (this.x < -50){ destroyMe(); }; }; if (this.y > 800){ destroyMe(); }; } public function decreaseEnergy(_arg1){ myObject.decreaseEnergy(_arg1); } public function setupPuffSmoke(){ if (mySmoke == null){ mySmoke = new GameHitFloorSmoke(rt, myParent, this); mySmoke.x = this.x; mySmoke.y = this.y; myParent.addChild(mySmoke); }; } } }//package classesAS3
Section 82
//GameBadKnight3 (classesAS3.GameBadKnight3) package classesAS3 { import flash.display.*; public class GameBadKnight3 extends MovieClip { public var myType:String; public var goodBad:Boolean; public var myObject:Object; public var mySmoke; public var collisionWith:MovieClip; public var collisionWithS:MovieClip; public var noRotation:Boolean; public var myShapeDef:Object; public var myParent:Object; public var rt:Object; public var energy:Number; public var filterData:Object; public var myBodyDef:Object; public var buildingBit:Boolean;// = false public function GameBadKnight3(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6){ buildingBit = false; super(); addFrameScript(0, frame1); rt = _arg1; myBodyDef = _arg2; myShapeDef = _arg3; myType = _arg4; myParent = _arg5; mySmoke = null; goodBad = _arg6; energy = 100; noRotation = true; } function destroyMe(){ rt.m_world.DestroyBody(myBodyDef); removeMe(); } public function removeMe(){ myObject.remove(); this.stop(); } function frame1(){ stop(); } public function checkOffScreen(){ if (this.x > 1700){ destroyMe(); } else { if (this.x < -50){ destroyMe(); }; }; if (this.y > 800){ destroyMe(); }; } public function decreaseEnergy(_arg1){ myObject.decreaseEnergy(_arg1); } public function setupPuffSmoke(){ if (mySmoke == null){ mySmoke = new GameHitFloorSmoke(rt, myParent, this); mySmoke.x = this.x; mySmoke.y = this.y; myParent.addChild(mySmoke); }; } } }//package classesAS3
Section 83
//GameBlock (classesAS3.GameBlock) package classesAS3 { import flash.display.*; public class GameBlock extends MovieClip { public var myType:String; public var goodBad:Boolean; public var myObject:Object; public var mySmoke; public var collisionWith:MovieClip; var myDelay:Number;// = 5 public var noRotation:Boolean; public var myShapeDef:Object; public var myParent:Object; public var rt:Object; public var energy:Number; public var block:MovieClip; public var filterData:Object; public var myBodyDef:Object; public var buildingBit:Boolean;// = true public function GameBlock(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7){ buildingBit = true; myDelay = 5; super(); addFrameScript(0, frame1, 2, frame3); this.gotoAndStop(1); rt = _arg1; myBodyDef = _arg2; myShapeDef = _arg3; myType = _arg4; myParent = _arg5; mySmoke = null; goodBad = _arg7; noRotation = false; energy = _arg6; } function destroyMe(){ if (rt.bodyGrabbed == myBodyDef){ rt.bodyGrabbed = null; }; rt.m_world.DestroyBody(myBodyDef); removeMe(); } public function removeMe(){ myParent.removeChild(this); } function frame3(){ gotoAndStop(2); } function frame1(){ stop(); } public function checkOffScreen(){ if (this.x > 1700){ destroyMe(); } else { if (this.x < -250){ destroyMe(); }; }; if (this.y > 800){ destroyMe(); }; } public function decreaseEnergy(_arg1):Boolean{ var _local2:Number; myDelay--; if (myDelay == 0){ myDelay = 30; if (energy > 0){ energy = (energy - _arg1); if (energy <= 0){ rt.m_world.DestroyBody(myBodyDef); block.gotoAndPlay("blockBreak"); return (true); }; _local2 = int(((100 - energy) / 25)); block.gotoAndStop((_local2 + 1)); return (false); }; }; return (false); } public function setupPuffSmoke(){ if (mySmoke == null){ mySmoke = new GameHitFloorSmoke(rt, myParent, this); mySmoke.x = this.x; mySmoke.y = this.y; myParent.addChild(mySmoke); }; } } }//package classesAS3
Section 84
//GameBlockEnemy (classesAS3.GameBlockEnemy) package classesAS3 { import flash.display.*; public class GameBlockEnemy extends MovieClip { public var myType:String; public var goodBad:Boolean; public var myObject:Object; public var mySmoke; public var collisionWith:MovieClip; var myDelay:Number;// = 5 public var noRotation:Boolean; public var myShapeDef:Object; public var myParent:Object; public var rt:Object; public var energy:Number; public var block:MovieClip; public var filterData:Object; public var myBodyDef:Object; public var buildingBit:Boolean;// = true public function GameBlockEnemy(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7){ buildingBit = true; myDelay = 5; super(); addFrameScript(0, frame1, 2, frame3); this.gotoAndStop(1); rt = _arg1; myBodyDef = _arg2; myShapeDef = _arg3; myType = _arg4; myParent = _arg5; mySmoke = null; goodBad = _arg7; noRotation = false; energy = _arg6; } function destroyMe(){ rt.m_world.DestroyBody(myBodyDef); removeMe(); } public function removeMe(){ myParent.removeChild(this); } function frame3(){ gotoAndStop(2); } function frame1(){ stop(); } public function checkOffScreen(){ if (this.x > 1700){ destroyMe(); } else { if (this.x < -50){ destroyMe(); }; }; if (this.y > 800){ destroyMe(); }; } public function decreaseEnergy(_arg1):Boolean{ var _local2:Number; myDelay--; if (myDelay == 0){ myDelay = 5; if (energy > 0){ energy = (energy - _arg1); if (energy <= 0){ rt.m_world.DestroyBody(myBodyDef); block.gotoAndPlay("blockBreak"); return (true); }; _local2 = int(((100 - energy) / 25)); block.gotoAndStop((_local2 + 1)); return (false); }; }; return (false); } public function setupPuffSmoke(){ if (mySmoke == null){ mySmoke = new GameHitFloorSmoke(rt, myParent, this); mySmoke.x = this.x; mySmoke.y = this.y; myParent.addChild(mySmoke); decreaseEnergy(5); }; } } }//package classesAS3
Section 85
//GameBoulder (classesAS3.GameBoulder) package classesAS3 { import flash.display.*; public class GameBoulder extends MovieClip { public var myType:String; public var goodBad:Boolean; public var myObject:Object; public var mySmoke; public var collisionWith:MovieClip; public var noRotation:Boolean; public var myShapeDef:Object; public var myParent:Object; public var rt:Object; public var energy:Number; public var filterData:Object; public var myBodyDef:Object; public var buildingBit:Boolean;// = false public function GameBoulder(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6){ buildingBit = false; super(); addFrameScript(0, frame1, 6, frame7); rt = _arg1; myBodyDef = _arg2; myShapeDef = _arg3; myType = _arg4; myParent = _arg5; mySmoke = null; goodBad = _arg6; energy = 100; noRotation = false; } function destroyMe(){ if (rt.bodyGrabbed == myBodyDef){ rt.bodyGrabbed = null; }; rt.m_world.DestroyBody(myBodyDef); myBodyDef = null; removeMe(); } public function removeMe(){ var _local1:Number; var _local2:*; if (myParent != null){ _local1 = -1; _local2 = 0; while (_local2 < rt.rt.bouldersArray.length) { if (this == rt.rt.bouldersArray[_local2]){ _local1 = _local2; }; _local2++; }; if (_local1 != -1){ rt.rt.bouldersArray.splice(_local1, 1); myParent.removeChild(this); this.stop(); }; }; } function frame7(){ this.removeMe(); } function frame1(){ stop(); } function checkForFlying(){ var _local1:int; var _local2:*; _local1 = 0; while (_local1 < rt.rt.inGameEnemyMc.numChildren) { _local2 = rt.rt.inGameEnemyMc.getChildAt(_local1); if (_local2.myObject != null){ if (_local2.myType != "smoke"){ if (_local2.myObject.myName == "bird"){ if (this.hitTestObject(_local2.myObject.mC)){ _local2.myObject.decreaseEnergy(35); decreaseEnergy(100); }; } else { if (_local2.myObject.myName == "dragon"){ if (this.hitTestObject(_local2.myObject.mC)){ _local2.myObject.decreaseEnergy(15); decreaseEnergy(100); }; }; }; }; }; _local1++; }; } public function checkOffScreen(){ if (this.x > 1700){ destroyMe(); } else { if (this.x < -50){ destroyMe(); }; }; if (this.y > 800){ destroyMe(); }; } function checkForFrozen(_arg1){ var _local2:int; _local2 = 0; while (_local2 < rt.rt.frozenArray.length) { if (rt.rt.frozenArray[_local2].mC == _arg1){ return (true); }; _local2++; }; return (false); } public function decreaseEnergy(_arg1):Boolean{ var _local2:Number; if (energy > 0){ energy = (energy - _arg1); if (energy <= 0){ rt.rt.Sounds.playSoundFx("boulderHitFx", 1, 0, 1); rt.m_world.DestroyBody(myBodyDef); this.gotoAndPlay("blockBreak"); return (true); }; _local2 = int(((100 - energy) / 25)); this.gotoAndStop((_local2 + 1)); return (false); }; return (true); } public function setupPuffSmoke(){ if (mySmoke == null){ mySmoke = new GameHitFloorSmoke(rt.rt, myParent, this); mySmoke.x = this.x; mySmoke.y = this.y; myParent.addChild(mySmoke); }; } public function mainLoop(){ if (collisionWith != null){ if (collisionWith.myObject == null){ if (collisionWith.goodBad == true){ if (collisionWith.myType == "kingBad1"){ if (checkForFrozen(collisionWith)){ rt.rt.decreaseBadKingEnergy(25, collisionWith); } else { rt.rt.decreaseBadKingEnergy(15, collisionWith); }; } else { if (checkForFrozen(collisionWith)){ collisionWith.myDelay = 1; collisionWith.decreaseEnergy(45); } else { if (collisionWith.myType == "blockEnemy"){ collisionWith.myDelay = 1; collisionWith.decreaseEnergy(15); } else { collisionWith.myDelay = 1; collisionWith.decreaseEnergy(35); }; }; }; }; } else { if (collisionWith.goodBad == true){ if (checkForFrozen(collisionWith)){ collisionWith.myObject.myDamageDelay = 1; collisionWith.myObject.decreaseEnergy(45); } else { collisionWith.myObject.myDamageDelay = 1; collisionWith.myObject.decreaseEnergy(25); }; }; }; decreaseEnergy(100); collisionWith = null; } else { checkForFlying(); if (this.x < 80){ if (this.y > 260){ destroyMe(); }; } else { if (this.y < -100){ destroyMe(); }; }; }; } } }//package classesAS3
Section 86
//GameBoulderLarge (classesAS3.GameBoulderLarge) package classesAS3 { import flash.display.*; public class GameBoulderLarge extends MovieClip { public var myType:String; public var myShapeDef:Object; public var myParent:Object; public var rt:Object; public var myBodyDef:Object; public function GameBoulderLarge(_arg1, _arg2, _arg3, _arg4, _arg5){ rt = _arg1; myBodyDef = _arg2; myShapeDef = _arg3; myType = _arg4; myParent = _arg5; } } }//package classesAS3
Section 87
//GameBox2d (classesAS3.GameBox2d) package classesAS3 { import flash.display.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Collision.Shapes.*; import Box2D.Dynamics.Joints.*; import Box2D.Collision.*; public class GameBox2d { public var joint_added:b2RevoluteJoint; public var the_rev_joint:b2RevoluteJointDef; public var Useful:GameUseful; public var bodyGrabbed:b2Body;// = null public var the_joint:b2DistanceJointDef; public var real_y_mouse:Number; public var worldGravityVy:Number; public var rt:Object; public var worldGravityVx:Number; public var m_world:b2World; public var m_iterations:int;// = 10 public var mousePVec:b2Vec2; public var m_timeStep:Number;// = 0.0333333333333333 public var gravity:b2Vec2; public var BxScalingFactor:Number; public var pixels_in_a_meter;// = 30 public var mouseJoint:b2MouseJoint; public var worldAABB:b2AABB; public var real_x_mouse:Number; public static const BAD_FLAG:Boolean = true; public static const GOOD_FLAG:Boolean = false; public function GameBox2d(_arg1, _arg2, _arg3){ m_iterations = 10; m_timeStep = (1 / 30); mousePVec = new b2Vec2(); pixels_in_a_meter = 30; worldAABB = new b2AABB(); gravity = new b2Vec2(0, 10); bodyGrabbed = null; the_joint = new b2DistanceJointDef(); the_rev_joint = new b2RevoluteJointDef(); super(); rt = _arg1; Useful = _arg2; BxScalingFactor = _arg3; worldGravityVx = 0; worldGravityVy = 20; } public function setupBox2d(){ var _local1:b2AABB; var _local2:b2Vec2; var _local3:Boolean; var _local4:*; var _local5:b2Body; var _local6:b2BodyDef; var _local7:b2PolygonDef; var _local8:b2CircleDef; var _local9:Number; var _local10:Number; _local1 = new b2AABB(); _local1.lowerBound.Set(-100, -100); _local1.upperBound.Set(100, 100); _local2 = new b2Vec2(worldGravityVx, worldGravityVy); _local3 = true; m_world = new b2World(_local1, _local2, _local3); _local4 = new b2ContactListener(); m_world.SetContactListener(_local4); _local6 = new b2BodyDef(); _local6.position.Set(27, 15.3); _local7 = new b2PolygonDef(); _local7.SetAsBox(30, 3); _local7.friction = 0.3; _local7.density = 0; _local6.userData = new GameFloor(this, null, null, "floor", rt.inGameFloorMc, 100, GOOD_FLAG); rt.floorMc = _local6.userData; _local6.userData.width = ((40 * 2) * 30); _local6.userData.height = ((30 * 2) * 3); rt.inGameFloorMc.addChild(_local6.userData); rt.cliffMc = new goodCliff(); rt.inGameCliffMc.addChild(rt.cliffMc); rt.cliffMc.x = -25; rt.cliffMc.y = 330; rt.tentMc = new tent(); rt.inGameCliffMc.addChild(rt.tentMc); rt.tentMc.x = 120; rt.tentMc.y = 300; _local5 = m_world.CreateBody(_local6); _local5.CreateShape(_local7); _local5.SetMassFromShapes(); _local6 = new b2BodyDef(); _local6.position.Set(0.4, 12); _local7 = new b2PolygonDef(); _local9 = (Useful.bxConvertToMetres(rt.cliffMc.width, BxScalingFactor) / 2); _local10 = (Useful.bxConvertToMetres(rt.cliffMc.height, BxScalingFactor) / 2); _local7.SetAsBox(_local9, _local10); _local7.friction = 0.3; _local7.density = 0; _local5 = m_world.CreateBody(_local6); _local5.CreateShape(_local7); _local5.SetMassFromShapes(); rt.setupEnemyCastle(); rt.setupKingBad(); rt.setupKingGood(); } public function GetBodyAtMouse(_arg1:Boolean=false):b2Body{ var _local2:Number; var _local3:b2AABB; var _local4:int; var _local5:Array; var _local6:int; var _local7:b2Body; var _local8:int; var _local9:b2Shape; var _local10:Boolean; var _local11:*; _local2 = (rt.stage.mouseX - rt.spritesMc.x); if (rt.inGameZoomMc.scaleX == 1){ real_x_mouse = (_local2 / pixels_in_a_meter); real_y_mouse = (rt.stage.mouseY / pixels_in_a_meter); mousePVec.Set(real_x_mouse, real_y_mouse); _local3 = new b2AABB(); _local3.lowerBound.Set((real_x_mouse - 0.001), (real_y_mouse - 0.001)); _local3.upperBound.Set((real_x_mouse + 0.001), (real_y_mouse + 0.001)); _local4 = 10; _local5 = new Array(); _local6 = m_world.Query(_local3, _local5, _local4); _local7 = null; _local8 = 0; while (_local8 < _local6) { if ((((_local5[_local8].m_body.IsStatic() == false)) || (_arg1))){ _local9 = (_local5[_local8] as b2Shape); _local10 = (_local5[_local8] as b2Shape).TestPoint(_local9.m_body.GetXForm(), mousePVec); if (_local10){ if (_local9.m_body.m_userData.myType == "archer"){ _local7 = _local9.m_body; break; }; if (_local9.m_body.m_userData.myType == "wizard"){ _local7 = _local9.m_body; break; } else { if (_local9.m_body.m_userData.myType == "block"){ _local7 = _local9.m_body; break; }; }; if (_local9.m_body.m_userData.myType == "wood"){ _local7 = _local9.m_body; break; }; if (_local9.m_body.m_userData.myType == "woodBlock"){ _local7 = _local9.m_body; break; }; }; }; _local8++; }; } else { _local11 = getScaledPos2(); _local7 = null; if (_local11 != null){ _local7 = _local11; }; }; return (_local7); } public function setupGrabbedItem(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8){ var _local9:b2Body; var _local10:b2BodyDef; var _local11:b2PolygonDef; var _local12:b2CircleDef; var _local13:*; var _local14:Boolean; var _local15:Number; var _local16:Number; var _local17:*; var _local18:Number; var _local19:Number; var _local20:b2Shape; var _local21:*; var _local22:Number; var _local23:b2MassData; var _local24:b2Vec2; _local14 = false; if (_arg5 == "grab"){ _local15 = (rt.stage.mouseX - rt.spritesMc.x); _local16 = rt.stage.mouseY; if (_local16 > 500){ _local16 = 460; }; } else { if (_arg5 == "random"){ _local15 = Useful.RandomNumber(100, 700); _local16 = 0; } else { _local15 = _arg6; _local16 = _arg7; }; }; _local10 = new b2BodyDef(); _local10.position.x = Useful.bxConvertToMetres(_local15, BxScalingFactor); _local10.position.y = Useful.bxConvertToMetres(_local16, BxScalingFactor); if (_arg1 == "blockEnemy"){ _local17 = new GameBlockEnemy(this, null, null, _arg1, rt.inGameEnemyMc, 100, BAD_FLAG); _local17.gotoAndStop(_arg8); _local18 = (Useful.bxConvertToMetres(_local17.width, BxScalingFactor) / 2); _local19 = (Useful.bxConvertToMetres(_local17.height, BxScalingFactor) / 2); _local11 = new b2PolygonDef(); _local11.SetAsBox(_local18, _local19); _local11.density = _arg2; _local11.friction = _arg3; _local11.restitution = _arg4; _local10.userData = _local17; _local17.myShapeDef = _local11; _local9 = m_world.CreateBody(_local10); _local9.CreateShape(_local11); rt.inGameEnemyMc.addChild(_local10.userData); } else { if (_arg1 == "woodBlockEnemy"){ _local17 = new GameWoodBlockEn(this, null, null, _arg1, rt.inGameEnemyMc, 100, BAD_FLAG); _local17.gotoAndStop(_arg8); _local18 = (Useful.bxConvertToMetres(_local17.width, BxScalingFactor) / 2); _local19 = (Useful.bxConvertToMetres(_local17.height, BxScalingFactor) / 2); _local11 = new b2PolygonDef(); _local11.SetAsBox(_local18, _local19); _local11.density = _arg2; _local11.friction = _arg3; _local11.restitution = _arg4; _local10.userData = _local17; _local17.myShapeDef = _local11; _local9 = m_world.CreateBody(_local10); _local9.CreateShape(_local11); rt.inGameEnemyMc.addChild(_local10.userData); } else { if (_arg1 == "woodBlock"){ _local17 = new GameWoodBlock(this, null, null, _arg1, rt.inGameBuildingsMc, 100, GOOD_FLAG); _local18 = (Useful.bxConvertToMetres(_local17.width, BxScalingFactor) / 2); _local19 = (Useful.bxConvertToMetres(_local17.height, BxScalingFactor) / 2); _local11 = new b2PolygonDef(); _local11.SetAsBox(_local18, _local19); _local11.density = _arg2; _local11.friction = _arg3; _local11.restitution = _arg4; _local10.userData = _local17; _local17.myShapeDef = _local11; _local9 = m_world.CreateBody(_local10); _local9.CreateShape(_local11); rt.inGameBuildingsMc.addChild(_local10.userData); } else { if (_arg1 == "block"){ _local17 = new GameBlock(this, null, null, _arg1, rt.inGameBuildingsMc, 100, GOOD_FLAG); _local18 = (Useful.bxConvertToMetres(_local17.width, BxScalingFactor) / 2); _local19 = (Useful.bxConvertToMetres(_local17.height, BxScalingFactor) / 2); _local11 = new b2PolygonDef(); _local11.SetAsBox(_local18, _local19); _local11.density = _arg2; _local11.friction = _arg3; _local11.restitution = _arg4; _local10.userData = _local17; _local17.myShapeDef = _local11; _local9 = m_world.CreateBody(_local10); _local9.CreateShape(_local11); rt.inGameBuildingsMc.addChild(_local10.userData); } else { if (_arg1 == "badKnight2"){ _local17 = new GameBadKnight2(this, null, null, _arg1, rt.inGameEnemyMc, BAD_FLAG); _local18 = (Useful.bxConvertToMetres(22, BxScalingFactor) / 2); _local19 = (Useful.bxConvertToMetres(24, BxScalingFactor) / 2); _local11 = new b2PolygonDef(); _local11.SetAsBox(_local18, _local19); _local11.density = _arg2; _local11.friction = _arg3; _local11.restitution = _arg4; _local10.fixedRotation = true; _local10.userData = _local17; _local10.allowSleep = false; _local17.myShapeDef = _local11; _local9 = m_world.CreateBody(_local10); _local9.CreateShape(_local11); rt.inGameEnemyMc.addChild(_local10.userData); } else { if (_arg1 == "badArcher2"){ _local17 = new GameBadArcher2(this, null, null, _arg1, rt.inGameEnemyMc, BAD_FLAG); _local18 = (Useful.bxConvertToMetres(22, BxScalingFactor) / 2); _local19 = (Useful.bxConvertToMetres(24, BxScalingFactor) / 2); _local11 = new b2PolygonDef(); _local11.SetAsBox(_local18, _local19); _local11.density = _arg2; _local11.friction = _arg3; _local11.restitution = _arg4; _local10.fixedRotation = true; _local10.userData = _local17; _local10.allowSleep = false; _local17.myShapeDef = _local11; _local9 = m_world.CreateBody(_local10); _local9.CreateShape(_local11); rt.inGameEnemyMc.addChild(_local10.userData); } else { if (_arg1 == "badArcher1"){ _local17 = new GameBadArcher1(this, null, null, _arg1, rt.inGameEnemyMc, BAD_FLAG); _local18 = (Useful.bxConvertToMetres(22, BxScalingFactor) / 2); _local19 = (Useful.bxConvertToMetres(24, BxScalingFactor) / 2); _local11 = new b2PolygonDef(); _local11.SetAsBox(_local18, _local19); _local11.density = _arg2; _local11.friction = _arg3; _local11.restitution = _arg4; _local10.fixedRotation = true; _local10.userData = _local17; _local10.allowSleep = false; _local17.myShapeDef = _local11; _local9 = m_world.CreateBody(_local10); _local9.CreateShape(_local11); rt.inGameEnemyMc.addChild(_local10.userData); } else { if (_arg1 == "badKnight3"){ _local17 = new GameBadKnight3(this, null, null, _arg1, rt.inGameEnemyMc, BAD_FLAG); _local18 = (Useful.bxConvertToMetres(22, BxScalingFactor) / 2); _local19 = (Useful.bxConvertToMetres(24, BxScalingFactor) / 2); _local11 = new b2PolygonDef(); _local11.SetAsBox(_local18, _local19); _local11.density = _arg2; _local11.friction = _arg3; _local11.restitution = _arg4; _local10.fixedRotation = true; _local10.userData = _local17; _local10.allowSleep = false; _local17.myShapeDef = _local11; _local9 = m_world.CreateBody(_local10); _local9.CreateShape(_local11); rt.inGameEnemyMc.addChild(_local10.userData); } else { if (_arg1 == "badKnight1"){ _local17 = new GameBadKnight1(this, null, null, _arg1, rt.inGameEnemyMc, BAD_FLAG); _local18 = (Useful.bxConvertToMetres(22, BxScalingFactor) / 2); _local19 = (Useful.bxConvertToMetres(24, BxScalingFactor) / 2); _local11 = new b2PolygonDef(); _local11.SetAsBox(_local18, _local19); _local11.density = _arg2; _local11.friction = _arg3; _local11.restitution = _arg4; _local10.fixedRotation = true; _local10.userData = _local17; _local10.allowSleep = false; _local17.myShapeDef = _local11; _local9 = m_world.CreateBody(_local10); _local9.CreateShape(_local11); rt.inGameEnemyMc.addChild(_local10.userData); } else { if (_arg1 == "viking1"){ _arg1 = "badKnight1"; _local17 = new GameViking1(this, null, null, _arg1, rt.inGameEnemyMc, BAD_FLAG); _local18 = (Useful.bxConvertToMetres(22, BxScalingFactor) / 2); _local19 = (Useful.bxConvertToMetres(24, BxScalingFactor) / 2); _local11 = new b2PolygonDef(); _local11.SetAsBox(_local18, _local19); _local11.density = _arg2; _local11.friction = _arg3; _local11.restitution = _arg4; _local10.fixedRotation = true; _local10.userData = _local17; _local10.allowSleep = false; _local17.myShapeDef = _local11; _local9 = m_world.CreateBody(_local10); _local9.CreateShape(_local11); rt.inGameEnemyMc.addChild(_local10.userData); } else { if (_arg1 == "ram"){ _arg1 = "badKnight1"; _local17 = new GameRam1(this, null, null, _arg1, rt.inGameEnemyMc, BAD_FLAG); _local18 = (Useful.bxConvertToMetres(22, BxScalingFactor) / 2); _local19 = (Useful.bxConvertToMetres(24, BxScalingFactor) / 2); _local11 = new b2PolygonDef(); _local11.SetAsBox(_local18, _local19); _local11.density = _arg2; _local11.friction = _arg3; _local11.restitution = _arg4; _local10.fixedRotation = true; _local10.userData = _local17; _local10.allowSleep = false; _local17.myShapeDef = _local11; _local9 = m_world.CreateBody(_local10); _local9.CreateShape(_local11); rt.inGameEnemyMc.addChild(_local10.userData); } else { if (_arg1 == "kingGood"){ _local17 = new GameKingGood(this, null, null, _arg1, rt.inGameGoodGuysMc, GOOD_FLAG); _local18 = (Useful.bxConvertToMetres(26, BxScalingFactor) / 2); _local19 = (Useful.bxConvertToMetres(24, BxScalingFactor) / 2); _local11 = new b2PolygonDef(); _local11.SetAsBox(_local18, _local19); _local11.density = _arg2; _local11.friction = _arg3; _local11.restitution = _arg4; _local10.userData = _local17; _local17.myShapeDef = _local11; _local9 = m_world.CreateBody(_local10); _local9.CreateShape(_local11); rt.goodKingMc = _local17; rt.inGameGoodGuysMc.addChild(_local10.userData); } else { if (_arg1 == "archer"){ _local17 = new GameArcher1(this, null, null, _arg1, rt.inGameGoodGuysMc, GOOD_FLAG); _local18 = (Useful.bxConvertToMetres(26, BxScalingFactor) / 2); _local19 = (Useful.bxConvertToMetres(24, BxScalingFactor) / 2); _local11 = new b2PolygonDef(); _local11.SetAsBox(_local18, _local19); _local11.density = _arg2; _local11.friction = _arg3; _local11.restitution = _arg4; _local10.userData = _local17; _local10.allowSleep = false; _local17.myShapeDef = _local11; _local9 = m_world.CreateBody(_local10); _local9.CreateShape(_local11); rt.inGameGoodGuysMc.addChild(_local10.userData); } else { if (_arg1 == "wizard"){ _local17 = new GameWizard1(this, null, null, _arg1, rt.inGameGoodGuysMc, GOOD_FLAG); _local18 = (Useful.bxConvertToMetres(26, BxScalingFactor) / 2); _local19 = (Useful.bxConvertToMetres(24, BxScalingFactor) / 2); _local11 = new b2PolygonDef(); _local11.SetAsBox(_local18, _local19); _local11.density = _arg2; _local11.friction = _arg3; _local11.restitution = _arg4; _local10.userData = _local17; _local10.allowSleep = false; _local17.myShapeDef = _local11; _local9 = m_world.CreateBody(_local10); _local9.CreateShape(_local11); rt.inGameGoodGuysMc.addChild(_local10.userData); } else { if (_arg1 == "knight2"){ _local17 = new GameKnight2(this, null, null, _arg1, rt.inGameGoodGuysMc, GOOD_FLAG); _local18 = (Useful.bxConvertToMetres(26, BxScalingFactor) / 2); _local19 = (Useful.bxConvertToMetres(24, BxScalingFactor) / 2); _local11 = new b2PolygonDef(); _local11.SetAsBox(_local18, _local19); _local11.density = _arg2; _local11.friction = _arg3; _local11.restitution = _arg4; _local10.userData = _local17; _local10.allowSleep = false; _local17.myShapeDef = _local11; _local9 = m_world.CreateBody(_local10); _local9.CreateShape(_local11); rt.inGameGoodGuysMc.addChild(_local10.userData); rt.setupGoodGuy(_local17); } else { if (_arg1 == "knight"){ _local17 = new GameKnight1(this, null, null, _arg1, rt.inGameGoodGuysMc, GOOD_FLAG); _local18 = (Useful.bxConvertToMetres(26, BxScalingFactor) / 2); _local19 = (Useful.bxConvertToMetres(24, BxScalingFactor) / 2); _local11 = new b2PolygonDef(); _local11.SetAsBox(_local18, _local19); _local11.density = _arg2; _local11.friction = _arg3; _local11.restitution = _arg4; _local10.userData = _local17; _local10.allowSleep = false; _local17.myShapeDef = _local11; _local9 = m_world.CreateBody(_local10); _local9.CreateShape(_local11); rt.inGameGoodGuysMc.addChild(_local10.userData); rt.setupGoodGuy(_local17); } else { if (_arg1 == "knight4"){ _local17 = new GameKnight4(this, null, null, _arg1, rt.inGameGoodGuysMc, GOOD_FLAG); _local18 = (Useful.bxConvertToMetres(26, BxScalingFactor) / 2); _local19 = (Useful.bxConvertToMetres(24, BxScalingFactor) / 2); _local11 = new b2PolygonDef(); _local11.SetAsBox(_local18, _local19); _local11.density = _arg2; _local11.friction = _arg3; _local11.restitution = _arg4; _local10.userData = _local17; _local10.allowSleep = false; _local17.myShapeDef = _local11; _local9 = m_world.CreateBody(_local10); _local9.CreateShape(_local11); rt.inGameGoodGuysMc.addChild(_local10.userData); rt.setupGoodGuy(_local17); } else { if (_arg1 == "knight3"){ _local17 = new GameKnight3(this, null, null, _arg1, rt.inGameGoodGuysMc, GOOD_FLAG); _local18 = (Useful.bxConvertToMetres(26, BxScalingFactor) / 2); _local19 = (Useful.bxConvertToMetres(24, BxScalingFactor) / 2); _local11 = new b2PolygonDef(); _local11.SetAsBox(_local18, _local19); _local11.density = _arg2; _local11.friction = _arg3; _local11.restitution = _arg4; _local10.userData = _local17; _local10.allowSleep = false; _local17.myShapeDef = _local11; _local9 = m_world.CreateBody(_local10); _local9.CreateShape(_local11); rt.inGameGoodGuysMc.addChild(_local10.userData); rt.setupGoodGuy(_local17); } else { if (_arg1 == "wood"){ _local17 = new GamePlank(this, null, null, _arg1, rt.inGameBuildingsMc, GOOD_FLAG); _local18 = (Useful.bxConvertToMetres(_local17.width, BxScalingFactor) / 2); _local19 = (Useful.bxConvertToMetres(_local17.height, BxScalingFactor) / 2); _local11 = new b2PolygonDef(); _local11.SetAsBox(_local18, _local19); _local11.density = _arg2; _local11.friction = _arg3; _local11.restitution = _arg4; _local10.userData = _local17; _local17.myShapeDef = _local11; _local9 = m_world.CreateBody(_local10); _local9.CreateShape(_local11); rt.inGameBuildingsMc.addChild(_local10.userData); } else { if (_arg1 == "woodBad"){ _local17 = new GamePlank(this, null, null, _arg1, rt.inGameEnemyMc, BAD_FLAG); _local18 = (Useful.bxConvertToMetres(_local17.width, BxScalingFactor) / 2); _local19 = (Useful.bxConvertToMetres(_local17.height, BxScalingFactor) / 2); _local11 = new b2PolygonDef(); _local11.SetAsBox(_local18, _local19); _local11.density = _arg2; _local11.friction = _arg3; _local11.restitution = _arg4; _local10.userData = _local17; _local17.myShapeDef = _local11; _local9 = m_world.CreateBody(_local10); _local9.CreateShape(_local11); rt.inGameEnemyMc.addChild(_local10.userData); } else { if (_arg1 == "boulder"){ if (rt.catapultItem == null){ _local17 = new GameBoulder(this, null, null, _arg1, rt.inGameBuildingsMc, GOOD_FLAG); _local18 = (Useful.bxConvertToMetres(_local17.width, BxScalingFactor) / 2); _local19 = (Useful.bxConvertToMetres(_local17.height, BxScalingFactor) / 2); _local12 = new b2CircleDef(); _local12.radius = _local18; _local12.density = _arg2; _local12.friction = _arg3; _local12.restitution = _arg4; _local10.userData = _local17; _local17.myShapeDef = _local12; _local9 = m_world.CreateBody(_local10); _local9.CreateShape(_local12); rt.inGameBuildingsMc.addChild(_local10.userData); rt.bouldersArray.push(_local17); if (rt.catapultItem != null){ rt.catapultItem.destroyMe(); rt.catapultItem = null; } else { rt.catapultItem = _local17; }; } else { _local14 = true; }; } else { if (_arg1 == "cannonBall"){ if (rt.catapultItem == null){ _local17 = new GameCannonBall(this, null, null, _arg1, rt.inGameBuildingsMc, GOOD_FLAG); _local18 = (Useful.bxConvertToMetres(_local17.width, BxScalingFactor) / 2); _local19 = (Useful.bxConvertToMetres(_local17.height, BxScalingFactor) / 2); _local12 = new b2CircleDef(); _local12.radius = _local18; _local12.density = _arg2; _local12.friction = _arg3; _local12.restitution = _arg4; _local10.userData = _local17; _local17.myShapeDef = _local12; _local9 = m_world.CreateBody(_local10); _local9.CreateShape(_local12); rt.inGameBuildingsMc.addChild(_local10.userData); rt.bouldersArray.push(_local17); if (rt.catapultItem != null){ rt.catapultItem.destroyMe(); rt.catapultItem = null; } else { rt.catapultItem = _local17; }; } else { _local14 = true; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; if (_local14 == false){ _local17.myBodyDef = _local9; _local20 = _local9.GetShapeList(); _local17.filterData = _local20.GetFilterData(); if (_arg5 == "grab"){ _local21 = _local20.GetFilterData(); _local21.categoryBits = 0; _local20.SetFilterData(_local21); m_world.Refilter(_local20); }; _local9.SetMassFromShapes(); if (_arg5 == "grab"){ bodyGrabbed = _local9; rt.setupSelectionBox(bodyGrabbed.m_userData); bodyGrabbed.m_userData.myParent.setChildIndex(bodyGrabbed.m_userData, (bodyGrabbed.m_userData.myParent.numChildren - 1)); _local22 = bodyGrabbed.GetMass(); _local23 = new b2MassData(); _local23.mass = _local22; bodyGrabbed.SetMass(_local23); _local24 = new b2Vec2(); _local24 = bodyGrabbed.GetPosition(); bodyGrabbed.SetXForm(_local24, 0); setupMouseJoint(); }; return (_local17); //unresolved jump }; return (null); } public function runBox2d(){ var _local1:b2Body; var _local2:*; var _local3:*; var _local4:*; var _local5:*; var _local6:b2Vec2; var _local7:Boolean; var _local8:Boolean; m_world.Step(m_timeStep, m_iterations); if (mouseJoint){ _local2 = getScaledPosX(); _local3 = getScaledPosY(); _local4 = (_local2 / pixels_in_a_meter); _local5 = (_local3 / pixels_in_a_meter); _local6 = new b2Vec2(_local4, _local5); mouseJoint.SetTarget(_local6); }; rt.numPhysObjects = 0; _local1 = m_world.m_bodyList; while (_local1) { if ((_local1.m_userData is Sprite)){ rt.numPhysObjects++; _local7 = false; if (_local1.m_userData.myType == "boulder"){ if (_local1.m_userData.energy <= 0){ m_world.DestroyBody(_local1); _local7 = true; }; } else { if (_local1.m_userData.myType == "cannonBall"){ if (_local1.m_userData.energy <= 0){ m_world.DestroyBody(_local1); _local7 = true; }; }; }; if (_local7 == false){ _local1.m_userData.x = (_local1.GetPosition().x * 30); _local1.m_userData.y = (_local1.GetPosition().y * 30); if (_local1.m_userData.goodBad == false){ if (_local1.m_userData.myType != "floor"){ if (_local1.m_userData.myType != "catapultRod"){ if (_local1.m_userData.x > rt.flagMc.x){ _local8 = false; if (_local1.m_userData.buildingBit == true){ if (_local1.m_userData.x > (rt.flagMc.x + 20)){ if (bodyGrabbed != _local1){ _local1.m_userData.destroyMe(); _local8 = true; }; }; } else { if (_local1.m_userData.x > (rt.flagMc.x + 20)){ if (bodyGrabbed != _local1){ if (_local1.m_userData.myType == "archer"){ _local1.m_userData.destroyMe(); _local8 = true; }; }; }; }; if (_local8 == false){ rt.movedOverHalf = true; if (rt.selectionBoxMc != null){ if (_local1.m_userData == rt.selectionBoxMc.myParent){ rt.selectionBoxMc.myParent.removeChild(rt.selectionBoxMc); rt.selectionBoxMc = null; }; }; }; }; if (_local8 == false){ _local1.m_userData.checkOffScreen(); }; }; }; }; }; if (_local7 == false){ _local1.m_userData.y = (_local1.GetPosition().y * 30); if (_local1.m_userData.noRotation == false){ _local1.m_userData.rotation = ((_local1.GetAngle() * 180) / Math.PI); }; }; }; _local1 = _local1.m_next; }; } public function destroyEverything(){ var _local1:b2Body; if (m_world != undefined){ if (m_world != null){ _local1 = m_world.m_bodyList; while (_local1) { if ((_local1.m_userData is Sprite)){ _local1.m_userData.myBodyDef = null; m_world.DestroyBody(_local1); _local1.m_userData = null; } else { m_world.DestroyBody(_local1); }; _local1 = _local1.m_next; }; }; }; m_world = null; } public function setupMouseJoint(){ var _local1:b2MouseJointDef; var _local2:Number; _local1 = new b2MouseJointDef(); _local1.body1 = m_world.GetGroundBody(); _local1.body2 = bodyGrabbed; _local2 = (rt.stage.mouseX - rt.spritesMc.x); _local1.target.Set((_local2 / pixels_in_a_meter), (rt.mouseY / pixels_in_a_meter)); _local1.maxForce = 6000000; _local1.timeStep = m_timeStep; _local1.collideConnected = false; mouseJoint = (m_world.CreateJoint(_local1) as b2MouseJoint); } function getScaledPos2():Object{ var _local1:int; var _local2:Object; var _local3:*; _local1 = 0; while (_local1 < rt.inGameBuildingsMc.numChildren) { _local2 = new Object(); _local3 = rt.inGameBuildingsMc.getChildAt(_local1); if (_local3.myType != "smoke"){ if (_local3.goodBad == false){ if (_local3.energy != null){ if (_local3.energy > 0){ if (_local3.hitTestPoint(rt.stage.mouseX, rt.stage.mouseY, true)){ return (_local3.myBodyDef); }; }; }; }; }; _local1++; }; _local1 = 0; while (_local1 < rt.inGameGoodGuysMc.numChildren) { if (rt.inGameGoodGuysMc.getChildAt(_local1).myType == "archer"){ if (rt.inGameGoodGuysMc.getChildAt(_local1).hitTestPoint(rt.stage.mouseX, rt.stage.mouseY, true)){ _local3 = rt.inGameGoodGuysMc.getChildAt(_local1); return (_local3.myBodyDef); }; } else { if (rt.inGameGoodGuysMc.getChildAt(_local1).myType == "wizard"){ if (rt.inGameGoodGuysMc.getChildAt(_local1).hitTestPoint(rt.stage.mouseX, rt.stage.mouseY, true)){ _local3 = rt.inGameGoodGuysMc.getChildAt(_local1); return (_local3.myBodyDef); }; }; }; _local1++; }; return (null); } public function setupEnemyKings(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7){ var _local8:b2Body; var _local9:b2BodyDef; var _local10:b2PolygonDef; var _local11:b2CircleDef; var _local12:*; var _local13:Number; var _local14:Number; var _local15:*; var _local16:Number; var _local17:Number; var _local18:b2Shape; var _local19:*; _local13 = _arg6; _local14 = _arg7; _local9 = new b2BodyDef(); _local9.position.x = Useful.bxConvertToMetres(_local13, BxScalingFactor); _local9.position.y = Useful.bxConvertToMetres(_local14, BxScalingFactor); if (rt.levelNumber < 3){ _local15 = new GameKingBad1(this, null, null, _arg1, rt.inGameEnemyMc, BAD_FLAG); rt.badKingMc = _local15; } else { if (rt.levelNumber < 5){ _local15 = new GameKingBad2(this, null, null, _arg1, rt.inGameEnemyMc, BAD_FLAG); rt.badKingMc = _local15; } else { if (rt.levelNumber < 7){ _local15 = new GameKingBad3(this, null, null, _arg1, rt.inGameEnemyMc, BAD_FLAG); rt.badKingMc = _local15; } else { if (rt.levelNumber < 9){ _local15 = new GameKingBad4(this, null, null, _arg1, rt.inGameEnemyMc, BAD_FLAG); rt.badKingMc = _local15; } else { _local15 = new GameKingBad5(this, null, null, _arg1, rt.inGameEnemyMc, BAD_FLAG); rt.badKingMc = _local15; }; }; }; }; _local16 = (Useful.bxConvertToMetres(22, BxScalingFactor) / 2); _local17 = (Useful.bxConvertToMetres(24, BxScalingFactor) / 2); _local10 = new b2PolygonDef(); _local10.SetAsBox(_local16, _local17); _local10.density = _arg2; _local10.friction = _arg3; _local10.restitution = _arg4; _local9.userData = _local15; _local15.myShapeDef = _local10; _local8 = m_world.CreateBody(_local9); _local8.CreateShape(_local10); rt.inGameEnemyMc.addChild(_local9.userData); _local15.myBodyDef = _local8; _local18 = _local8.GetShapeList(); _local15.filterData = _local18.GetFilterData(); if (_arg5 == "grab"){ _local19 = _local18.GetFilterData(); _local19.categoryBits = 0; _local18.SetFilterData(_local19); m_world.Refilter(_local18); }; _local8.SetMassFromShapes(); if (_arg5 == "grab"){ rt.on_mouse_down(); }; return (_local15); } function getScaledPosX():Number{ var _local1:Number; var _local2:*; var _local3:*; var _local4:*; _local1 = (rt.stage.mouseX - rt.spritesMc.x); if (rt.inGameZoomMc.scaleX < 1){ if (rt.inGameZoomMc.scaleX < 0.7){ _local4 = 3; }; _local2 = (rt.stage.mouseX - 350); _local3 = (1 - rt.inGameZoomMc.scaleX); _local3 = (_local3 * 1.5); _local3 = (_local3 * _local2); _local1 = (_local1 + _local3); }; return (_local1); } function getScaledPosY():Number{ var _local1:Number; var _local2:*; var _local3:*; var _local4:*; _local1 = rt.stage.mouseY; if (rt.inGameZoomMc.scaleY < 1){ if (rt.inGameZoomMc.scaleY < 0.7){ _local4 = 3; }; _local2 = (rt.stage.mouseY - 270); _local3 = (1 - rt.inGameZoomMc.scaleY); _local3 = (_local3 * 1.5); _local3 = (_local3 * _local2); _local1 = (_local1 + _local3); }; return (_local1); } } }//package classesAS3
Section 88
//GameCannonBall (classesAS3.GameCannonBall) package classesAS3 { import flash.display.*; public class GameCannonBall extends MovieClip { public var myType:String; public var goodBad:Boolean; public var myObject:Object; public var mySmoke; public var collisionWith:MovieClip; public var noRotation:Boolean; public var myShapeDef:Object; public var myParent:Object; public var rt:Object; public var energy:Number; public var filterData:Object; public var myBodyDef:Object; public var buildingBit:Boolean;// = false public function GameCannonBall(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6){ buildingBit = false; super(); rt = _arg1; myBodyDef = _arg2; myShapeDef = _arg3; myType = _arg4; myParent = _arg5; mySmoke = null; goodBad = _arg6; energy = 100; noRotation = false; } function destroyMe(){ if (rt.bodyGrabbed == myBodyDef){ rt.bodyGrabbed = null; }; rt.m_world.DestroyBody(myBodyDef); myBodyDef = null; removeMe(); } public function removeMe(){ var _local1:Number; var _local2:*; if (myParent != null){ _local1 = -1; _local2 = 0; while (_local2 < rt.rt.bouldersArray.length) { if (this == rt.rt.bouldersArray[_local2]){ _local1 = _local2; }; _local2++; }; if (_local1 != -1){ rt.rt.bouldersArray.splice(_local1, 1); myParent.removeChild(this); this.stop(); }; }; } public function checkOffScreen(){ if (this.x > 1700){ destroyMe(); } else { if (this.x < -90){ destroyMe(); }; }; if (this.y > 800){ destroyMe(); }; } function checkForFrozen(_arg1){ var _local2:int; _local2 = 0; while (_local2 < rt.rt.frozenArray.length) { if (rt.rt.frozenArray[_local2].mC == _arg1){ return (true); }; _local2++; }; return (false); } public function decreaseEnergy(_arg1):Boolean{ if (energy > 0){ energy = (energy - _arg1); if (energy <= 0){ rt.rt.Sounds.playSoundFx("mainGunMissileHitFx", 1, 0, 1); rt.rt.explosionsArray.push(new GameExplosion(rt.rt, this.x, this.y, 1, rt.rt.Useful, 7, 1, 10, true, false, false, 8, 0)); rt.rt.explosionsArray.push(new GameExplosion(rt.rt, this.x, this.y, 2, rt.rt.Useful, 7, 1, 20, true, false, false, 8, 3)); removeMe(); return (true); }; return (false); }; return (true); } public function setupPuffSmoke(){ if (mySmoke == null){ mySmoke = new GameHitFloorSmoke(rt.rt, myParent, this); mySmoke.x = this.x; mySmoke.y = this.y; myParent.addChild(mySmoke); }; } public function mainLoop(){ if (collisionWith != null){ if (collisionWith.myObject == null){ if (collisionWith.goodBad == true){ if (collisionWith.myType == "kingBad1"){ if (checkForFrozen(collisionWith)){ rt.rt.decreaseBadKingEnergy(25, collisionWith); } else { rt.rt.decreaseBadKingEnergy(15, collisionWith); }; } else { if (checkForFrozen(collisionWith)){ collisionWith.myDelay = 1; collisionWith.decreaseEnergy(45); } else { if (collisionWith.myType == "blockEnemy"){ collisionWith.myDelay = 1; collisionWith.decreaseEnergy(15); } else { collisionWith.myDelay = 1; collisionWith.decreaseEnergy(35); }; }; }; }; } else { if (collisionWith.goodBad == true){ if (checkForFrozen(collisionWith)){ collisionWith.myObject.myDamageDelay = 1; collisionWith.myObject.decreaseEnergy(45); } else { collisionWith.myObject.myDamageDelay = 1; collisionWith.myObject.decreaseEnergy(25); }; }; }; decreaseEnergy(100); collisionWith = null; } else { if (this.x < 80){ if (this.y > 260){ destroyMe(); }; } else { if (this.y < -100){ destroyMe(); }; }; }; } } }//package classesAS3
Section 89
//GameCatapultBase (classesAS3.GameCatapultBase) package classesAS3 { import flash.display.*; public class GameCatapultBase extends MovieClip { public var myType:String; public var goodBad:Boolean; public var noRotation:Boolean;// = false public var myShapeDef:Object; public var rt:Object; public var myBodyDef:Object; public var buildingBit:Boolean;// = false public function GameCatapultBase(_arg1, _arg2, _arg3, _arg4){ noRotation = false; buildingBit = false; super(); rt = _arg1; myBodyDef = _arg2; myShapeDef = _arg3; myType = _arg4; goodBad = false; } } }//package classesAS3
Section 90
//GameCatapultCup (classesAS3.GameCatapultCup) package classesAS3 { import flash.display.*; public class GameCatapultCup extends MovieClip { public var myType:String; public var goodBad:Boolean; public var noRotation:Boolean;// = false public var myShapeDef:Object; public var rt:Object; public var myBodyDef:Object; public var buildingBit:Boolean;// = false public function GameCatapultCup(_arg1, _arg2, _arg3, _arg4){ noRotation = false; buildingBit = false; super(); rt = _arg1; myBodyDef = _arg2; myShapeDef = _arg3; myType = _arg4; goodBad = false; } } }//package classesAS3
Section 91
//GameCatapultRod (classesAS3.GameCatapultRod) package classesAS3 { import flash.display.*; public class GameCatapultRod extends MovieClip { public var myType:String; public var goodBad:Boolean; public var noRotation:Boolean;// = false public var myShapeDef:Object; public var rt:Object; public var setMc1:MovieClip; public var myBodyDef:Object; public var buildingBit:Boolean;// = false public function GameCatapultRod(_arg1, _arg2, _arg3, _arg4){ noRotation = false; buildingBit = false; super(); rt = _arg1; myBodyDef = _arg2; myShapeDef = _arg3; myType = _arg4; goodBad = false; } } }//package classesAS3
Section 92
//GameEnergyBar (classesAS3.GameEnergyBar) package classesAS3 { import flash.display.*; public class GameEnergyBar extends MovieClip { public var bar:energyBar; var enemy:Object; public function GameEnergyBar(_arg1){ addFrameScript(22, frame23); enemy = _arg1; } function frame23(){ this.enemy.energyBarOn = 0; MovieClip(this.parent).removeChild(this); stop(); } } }//package classesAS3
Section 93
//GameExplosion (classesAS3.GameExplosion) package classesAS3 { import classesAS3.*; class GameExplosion { var rt:Object; var xPos:Number;// = 0 var xVel:Number;// = 0 var artillary:Number; var explodeFrame:Number; var Count:Number; var myDamage:Number; var numberOfParticles:Number; var mType:Number; var Useful:GameUseful; var yPos:Number;// = 0 var gravity:Number; var speed:Number; var explodeDistance:Number; var yVel:Number;// = 0 var fullRange:Boolean; var numberOfLoops:Number; var mC:Object; var arrayIndex:Number; var xOrigin:Number;// = 0 var yOrigin:Number;// = 0 function GameExplosion(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10, _arg11, _arg12, _arg13){ xOrigin = 0; yOrigin = 0; xPos = 0; yPos = 0; xVel = 0; yVel = 0; super(); rt = _arg1; Useful = _arg5; myDamage = _arg13; fullRange = _arg11; numberOfParticles = _arg6; numberOfLoops = _arg7; explodeDistance = _arg8; gravity = _arg9; artillary = _arg10; speed = _arg12; xOrigin = _arg2; yOrigin = _arg3; xPos = 0; yPos = 0; Count = 0; mType = _arg4; } function remove(){ var _local1:Number; var _local2:*; _local1 = 0; _local2 = 0; while (_local2 < rt.explosionsArray.length) { if (this == rt.explosionsArray[_local2]){ _local1 = _local2; }; _local2++; }; rt.explosionsArray.splice(_local1, 1); delete ??getglobalscope [this]; } function mainLoop(){ var _local1:int; var _local2:Number; var _local3:Object; var _local4:GameParticle; _local1 = 0; while (_local1 < numberOfParticles) { if (fullRange == false){ _local2 = Useful.RandomNumber(1, 180); _local2 = (_local2 + 180); if (_local2 > 359){ _local2 = (_local2 - 359); }; } else { _local2 = Useful.RandomNumber(1, 360); }; _local3 = Useful.getVectorFromAngle(_local2); _local4 = new GameParticle(rt, Useful, xOrigin, yOrigin, mType, _local3.vx, _local3.vy, ((_local3.vx * explodeDistance) + xOrigin), ((_local3.vy * explodeDistance) + yOrigin), artillary, gravity, explodeDistance, speed, myDamage); rt.inGameExplosionsMc.addChild(_local4); rt.particlesArray.push(_local4); _local4.rotation = _local2; _local1++; }; Count++; if (Count > numberOfLoops){ remove(); }; } } }//package classesAS3
Section 94
//GameExplosionAnim (classesAS3.GameExplosionAnim) package classesAS3 { import flash.display.*; public class GameExplosionAnim extends MovieClip { public var myParent:Object; public var rt:Object; public var myIndex:Number; public function GameExplosionAnim(){ addFrameScript(5, frame6); } public function removeMe(){ } function frame6(){ this.removeMe(); stop(); } } }//package classesAS3
Section 95
//GameFloor (classesAS3.GameFloor) package classesAS3 { import flash.display.*; public class GameFloor extends MovieClip { public var myType:String; public var goodBad:Boolean; public var noRotation:Boolean;// = false public var myShapeDef:Object; public var myParent:Object; public var rt:Object; public var energy:Number; public var filterData:Object; public var myBodyDef:Object; public var buildingBit:Boolean;// = false public function GameFloor(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7){ noRotation = false; buildingBit = false; super(); rt = _arg1; myBodyDef = _arg2; myShapeDef = _arg3; myType = _arg4; myParent = _arg5; goodBad = _arg7; energy = _arg6; } public function removeMe(){ myParent.removeChild(this); } } }//package classesAS3
Section 96
//GameGame (classesAS3.GameGame) package classesAS3 { import flash.display.*; import Box2D.Common.Math.*; import flash.events.*; import Box2D.Collision.Shapes.*; import fl.motion.*; import flash.geom.*; import flash.filters.*; public class GameGame extends MovieClip { var left:Number; var inGameFloorMc:Sprite; var scaleLarge:Number; var StartTimer:Number; var badGuysArray:Array; var selectionArray:Array; var zoomSpeed:Number; public var cWordsMc:catapultWords; var bf:BlurFilter; var letterIndex:Number; var sec:Number; var playerMc:MovieClip; var inGameColourMc:Sprite; var bf2:BlurFilter; var levelTime:Number; var movieWidth:Number; var movieHeight:Number; var inGamePickupsMc:Sprite; var shift:Matrix; var inGameEnemyMc:Sprite; var baseGunType:String; var spritesMc:Sprite; var moneyMax:Number; var filterAlienDelay:Number; var inGameMissilesMc:Sprite; var moneyDelay:Number; var levelWidth:Number; var oldScore:Number; var wallCost:Number; var clickloc:Point; var zombiesLeft:Array; var money:Number; var levelWidthBlocks:Number; var gameOverMsgMc:GameOverMsgAnim; var pauseSwitch:Boolean; var levelChatStart:Array; var levelsRuler:Array; var oldUpgrade2:Boolean; var oldUpgrade3:Boolean; var inGameCliffMc:Sprite; var oldUpgrade5:Boolean; var oldUpgrade6:Boolean; var oldUpgrade1:Boolean; var minutes:Number; var filterDelay:Number; var catapultClicked:Boolean; var oldUpgrade4:Boolean; var letterDelay:Number; var lives:Number; var inGameScoreMc:Sprite; var groundArray:Array; var explosionsArray:Array; var planeMc:GamePlane; var energyAlien:Number; var freezeDelay:Number; var itemsToBuyMc:Sprite; var boulderBought:Boolean; var catapultAreaMc:catapultBtnMc; var cmf:ColorMatrixFilter; var upgradeCost1:Number; var upgradeCost2:Number; var upgradeCost3:Number; var upgradeCost5:Number; var upgradeCost6:Number; var timeBonus:Number; var top:Number; var oldMouseY:Number; var currentPickup:String; public var Box2d:GameBox2d; var oldMouseX:Number; var upgradeCost4:Number; var Sounds:GameSounds; var levelCompleteMsg:GameLevelComplete; var inGameGoodGuysMc:Sprite; var maxScrollSpeed:Number; var bmd:BitmapData; var currentPhrase:String; var upgrade1:Boolean; var upgrade2:Boolean; var gameExplosions:GameMultipleExplosion; var soundsSwitch:Boolean;// = true var upgrade5:Boolean; var upgrade6:Boolean; var inGameCWords:Sprite; var upgrade3:Boolean; var upgrade4:Boolean; var upgradeMc2:GameUpgrade2; var upgradeMc3:GameUpgrade3; var upgradeMc4:GameUpgrade4; var upgradeMc6:GameUpgrade6; var scrollScreen:String; var mineDamage:Number; var upgradeMc5:GameUpgrade5; var upgradeMc1:GameUpgrade; var musicSwitch:Boolean;// = true var marchingAntsMc:Sprite; var baseType:String; var bouldersArray:Array; var tilesArray:Array; var releaseloc:Point; var levelHeight:Number; var scaleSmall:Number; var levelsToRun:Array; var enemyCastles:Array; var fulltime:Number; var panelItemsData:Array; var backSkyMc:backgroundSkyMc; var MAX_BADGUYS:Number;// = 18 var startGameMsgMc:GameStartMsg; var badGuysLevels:Array; var waveDelay:Number; var spring:Number; var zombiesLeftC:Number; var minDisplay:String; var clockDelay:Number; var right:Number; var zoomScreen:String;// = "" var flagMc:halfWayFlag; var bottom:Number; var pauseMc:MovieClip; var blockSize:Number; var zombiePartsArray:Array; var numPhysObjects:Number; var levelChatEnd:Array; var inGameActionMc:Sprite; public var rt:Object; var levelsLocation:Array; var missilesArray:Array; public var scrollvx:Number; var presentationMc:Sprite; var inGameZoomMc:Sprite; var badGuyData1:Array; var inGameCatapultBtnMc:Sprite; var badGuyData5:Array; var badGuyData6:Array; var badGuyData7:Array; var badGuyData8:Array; var badGuyData3:Array; var badGuyData4:Array; public var cannonMove:String;// = "" var badGuyData9:Array; var badGuyData2:Array; var cDial:catapultDial; var goodGuysArray:Array; var itemsArray:Array; var energy:Number; var catapultCatchMc:catapultCatch; public var statsMc:GameWeaponsPanel; public var score:Number; var inGameExplosionsMc:Sprite; var selectionBoxMc:selectionBox; var antsbmp:antsMc; var inGameMc:Sprite; var goodKingMc:GameKingGood; var Useful:GameUseful; var inGameCatapultCatchMc:Sprite; var mineCost:Number; var floorMc:GameFloor; var marquee_mc:MovieClip; var oldMoney:Number; var backMcWidth:Number; var backMc2:backgroundP; var wave; var inGameBuildingsMc:Sprite; var Player:GamePlayer; var currentMoneyDelay:Number; var friction:Number; var bestScore:Number; var scrollxPos:Number; var movedOverHalf:Boolean; var pickupsArray:Array; var backgroundLevelMc:Sprite; var levelHeightBlocks:Number; var secDisplay:String; public var levelStart:Number; var levelMax:Number; var catapultItem:Object; var springLength:Number; var glowFilter:GlowFilter; var delayToWave; var waveDelayD:Number; var oldEnergy:Number; var inGameGraphicsMc:Sprite; public var frozenArray:Array; var numberOfStartItems:Number; var particlesArray:Array; var itemsCost:Array; var enemyArray:Array; var catapultFired:Boolean; var whosChattingIndex:Number; var inGameFlagMc:Sprite; var inGameBackgroundMc:Sprite; public var destroyedArray:Array; var cliffMc:goodCliff; var catapultMc:GameCatapultRod; var inGameBackgroundMc2:Sprite; var currentTimeBonus:Number; var timerStartY:Number; var pickupType:String; var inGameStatsMc:Sprite; var inGameMsgsMc:Sprite; var pickupAdded:Boolean; var timerStartY2:Number; var blockSizeY:Number; public var levelNumber:Number; var badKingMc:Object; public var maxLevels:Number; var tentMc:tent; public static const SOLDIER_STATE_DEFEND:int = 1; public static const SOLDIER_STATE_RETREAT:int = 3; public static const SOLDIER_E_MOVE:int = 5; public static const SOLDIER_STATE_CRYSTAL:int = 2; public static const BAD_FLAG:Boolean = true; public static const SOLDIER_E_STAND:int = 0; public static const GOOD_FLAG:Boolean = false; public static const SOLDIER_STATE_ATTACK:int = 0; public static const SOLDIER_STATE_MOVE:int = 5; public static const SOLDIER_E_BUILD:int = 2; public static const STATE_SYSTEM_END_MSG:int = 12; public static const SOLDIER_STATE_FALLING:int = 4; public function GameGame(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9){ var _local10:Array; var _local11:Array; var _local12:Array; var _local13:Array; var _local14:Array; var _local15:Array; var _local16:Array; var _local17:Array; var _local18:Array; var _local19:Array; var _local20:Array; var _local21:Array; var _local22:Array; var _local23:Array; var _local24:Array; var _local25:Array; var _local26:Array; var _local27:Array; var _local28:Array; var _local29:Array; var _local30:Array; var _local31:Array; var _local32:Array; var _local33:Array; var _local34:Array; var _local35:Array; var _local36:Array; var _local37:Array; var _local38:Array; var _local39:Array; var _local40:Array; var _local41:Array; var _local42:Array; var _local43:Array; var _local44:Array; var _local45:Array; var _local46:Array; var _local47:Array; var _local48:Array; var _local49:Array; var _local50:Array; var _local51:String; var _local52:String; var _local53:String; var _local54:String; var _local55:String; var _local56:String; var _local57:String; var _local58:String; var _local59:String; var _local60:String; var _local61:String; var _local62:String; var _local63:String; var _local64:String; var _local65:String; var _local66:String; var _local67:String; var _local68:String; var _local69:String; var _local70:String; var _local71:String; var _local72:String; var _local73:String; var _local74:String; var _local75:String; var _local76:String; var _local77:String; var _local78:String; var _local79:String; var _local80:String; var _local81:String; var _local82:String; var _local83:String; var _local84:String; var _local85:String; var _local86:String; var _local87:String; var _local88:String; var _local89:String; var _local90:String; var _local91:String; var _local92:String; var _local93:String; var _local94:String; var _local95:String; var _local96:String; var _local97:String; var _local98:String; var _local99:String; var _local100:String; var _local101:String; var _local102:String; var _local103:String; var _local104:String; var _local105:String; var _local106:String; var _local107:Array; var _local108:Array; var _local109:Array; var _local110:Array; var _local111:Array; var _local112:Array; var _local113:Array; var _local114:Array; var _local115:Array; var _local116:Array; var _local117:Array; var _local118:Array; var _local119:Array; var _local120:Array; var _local121:Array; var _local122:Array; var _local123:Array; var _local124:Array; var _local125:Array; var _local126:Array; var _local127:Array; var _local128:Array; var _local129:Array; var _local130:Array; var _local131:Array; var _local132:Array; var _local133:Array; var _local134:Array; soundsSwitch = true; musicSwitch = true; zoomScreen = ""; cannonMove = ""; MAX_BADGUYS = 18; super(); rt = _arg1; Useful = _arg7; Box2d = new GameBox2d(this, Useful, _arg9); upgrade1 = false; upgrade2 = false; upgrade3 = false; zoomSpeed = 0; scaleSmall = (72 / 100); scaleLarge = (100 / 100); movieWidth = _arg2; movieHeight = _arg3; backMcWidth = 1240; maxLevels = _arg8; mineDamage = 20; blockSize = 100; blockSizeY = 30; Sounds = new GameSounds(this); levelWidthBlocks = _arg4; levelHeightBlocks = _arg5; levelWidth = (levelWidthBlocks * blockSize); levelHeight = (levelHeightBlocks * blockSize); inGameMc = new Sprite(); addChild(inGameMc); presentationMc = new Sprite(); addChild(presentationMc); inGameActionMc = new Sprite(); inGameMc.addChild(inGameActionMc); inGameStatsMc = new Sprite(); inGameMc.addChild(inGameStatsMc); inGameZoomMc = new Sprite(); inGameActionMc.addChild(inGameZoomMc); inGameGraphicsMc = new Sprite(); inGameZoomMc.addChild(inGameGraphicsMc); inGameMsgsMc = new Sprite(); inGameMc.addChild(inGameMsgsMc); inGameBackgroundMc = new Sprite(); inGameGraphicsMc.addChild(inGameBackgroundMc); inGameBackgroundMc2 = new Sprite(); inGameGraphicsMc.addChild(inGameBackgroundMc2); spritesMc = new Sprite(); inGameGraphicsMc.addChild(spritesMc); backgroundLevelMc = new Sprite(); spritesMc.addChild(backgroundLevelMc); inGameCliffMc = new Sprite(); spritesMc.addChild(inGameCliffMc); inGameCatapultCatchMc = new Sprite(); spritesMc.addChild(inGameCatapultCatchMc); inGameFloorMc = new Sprite(); spritesMc.addChild(inGameFloorMc); inGameBuildingsMc = new Sprite(); spritesMc.addChild(inGameBuildingsMc); inGameFlagMc = new Sprite(); spritesMc.addChild(inGameFlagMc); playerMc = new MovieClip(); spritesMc.addChild(playerMc); inGameEnemyMc = new Sprite(); spritesMc.addChild(inGameEnemyMc); inGameGoodGuysMc = new Sprite(); spritesMc.addChild(inGameGoodGuysMc); inGameCatapultBtnMc = new Sprite(); spritesMc.addChild(inGameCatapultBtnMc); inGameColourMc = new Sprite(); spritesMc.addChild(inGameColourMc); inGamePickupsMc = new Sprite(); inGameColourMc.addChild(inGamePickupsMc); inGameMissilesMc = new Sprite(); inGameColourMc.addChild(inGameMissilesMc); inGameExplosionsMc = new Sprite(); inGameColourMc.addChild(inGameExplosionsMc); inGameScoreMc = new Sprite(); inGameColourMc.addChild(inGameScoreMc); inGameCWords = new Sprite(); inGameColourMc.addChild(inGameCWords); bf = new BlurFilter(2, 2, BitmapFilterQuality.LOW); bf2 = new BlurFilter(5, 5, BitmapFilterQuality.LOW); cmf = new ColorMatrixFilter([1.3, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, 0, 14, 20, 0, 0, 0, 0, 1, 0]); missilesArray = new Array(); enemyArray = new Array(); goodGuysArray = new Array(); missilesArray = new Array(); badGuysArray = new Array(); tilesArray = new Array(); explosionsArray = new Array(); particlesArray = new Array(); pickupsArray = new Array(); groundArray = new Array(); itemsArray = new Array(); selectionArray = new Array(); zombiePartsArray = new Array(); frozenArray = new Array(); upgradeCost1 = 60; upgradeCost2 = 70; upgradeCost3 = 80; panelItemsData = new Array("swordsman", 10, "10 Gold. Click to buy. Swordsman. Stout of heart but not to bright!", "knight", 25, "25 Gold. Click to buy. Knight. Well trained and fearsome in battle, fully armoured!", "archer", 30, "30 Gold. Drag onto game screen to buy. Archers don't move but fire deadly arrows!", "crossbowman", 35, "35 Gold. Click to buy. Knight on horse. Fast and deadly!", "wizard", 55, "55 Gold. Drag onto game screen to buy.Wizard. Fires freeze magic at enemy!", "Super Knight", 65, "65 Gold. Click to buy. Super knight! Fearsome in battle!", "Wooden block", 15, "15 Gold. Drag onto screen to buy. Basic wooden building block, can be used to build walls", "Wooden plank", 20, "20 Gold. Drag onto game screen to buy. Wooden plank, can be used as a floor, roof or slope.", "Stone Block", 25, "25 Gold. Drag onto game screen to buy. Stone block, builds strong walls and defenses.", "heal potion", 10, "10 Gold. Heal potion, adds 10 health to any soldiers or fortifications", "Explode potion", 40, "40 Gold. Throw at enemy. Explodes to cause fearsome damage on your enemy!", "Freeze potion", 40, "40 Gold. A magical potion that once dropped near the enemy causes them to cease their attack!", "restore", 1, "Drop on your soldiers to restore them to health! becareful not to drop on your enemies! for it will bestow the same benefits!"); itemsCost = new Array(10, 10, 10, 10, 10, 10, 10, 10, 10, 10); badGuyData1 = new Array("badKnight2", 405, 0.5, 0, "position", 1380, 350, 1, 1, 10, 1); badGuyData2 = new Array("badKnight3", 405, 0.5, 0, "position", 1380, 350, 1, 1, 13, 5); badGuyData3 = new Array("badArcher1", 405, 0.5, 0, "position", 1380, 350, 1, 1, 15, 6); badGuyData4 = new Array("badKnight1", 405, 0.5, 0, "position", 1380, 350, 1, 3, 17, 10); badGuyData5 = new Array("viking1", 405, 0.5, 0, "position", 1380, 350, 1, 3, 17, 15); badGuyData6 = new Array("ram", 405, 0.5, 0, "position", 1380, 350, 1, 3, 18, 15); badGuyData7 = new Array("badArcher2", 405, 0.5, 0, "position", 1380, 350, 1, 1, 16, 7); badGuyData8 = new Array("bird", 405, 0.5, 0, "position", 1380, 150, 1, 5, 20, 15); badGuyData9 = new Array("dragon", 405, 0.5, 0, "position", 1380, 150, 1, 5, 20, 25); _local10 = new Array(badGuyData1, badGuyData8); _local11 = new Array(badGuyData1, badGuyData1, badGuyData1); _local12 = new Array(badGuyData1, badGuyData2); _local13 = new Array(badGuyData2, badGuyData2, badGuyData8, badGuyData1, badGuyData8); _local14 = new Array(badGuyData2, badGuyData2, badGuyData2); _local15 = new Array(badGuyData5, badGuyData9); _local16 = new Array(badGuyData6, badGuyData2, badGuyData2, badGuyData2); _local17 = new Array(badGuyData1, badGuyData2); _local18 = new Array(badGuyData4); _local19 = new Array(badGuyData4, badGuyData4); _local20 = new Array(badGuyData2, badGuyData6, badGuyData2); _local21 = new Array(badGuyData5); _local22 = new Array(badGuyData9); _local23 = new Array(_local10); _local24 = new Array(_local11); _local25 = new Array(_local11, _local12); _local26 = new Array(_local12, _local13); _local27 = new Array(_local14, _local13); _local28 = new Array(_local14, _local14, _local15); _local29 = new Array(_local13, _local16, _local11); _local30 = new Array(_local16, _local17, _local18, _local11); _local31 = new Array(_local11, _local16, _local13); _local32 = new Array(_local12, _local18, _local19, _local22); _local33 = new Array(_local11, _local20); _local34 = new Array(_local11, _local19, _local19); _local35 = new Array(_local11, _local21, _local15); _local36 = new Array(_local12, _local12, _local21, _local21); badGuysLevels = new Array(_local23, _local24, _local25, _local26, _local27, _local28, _local29, _local30, _local31, _local32, _local33, _local34, _local35, _local36); _local37 = new Array(new Array(0, 0, 0, 0, 4, 3), new Array(0, 0, 0, 0, 1, 1), new Array(0, 0, 0, 0, 1, 1), new Array(0, 0, 0, 0, 1, 1), new Array(0, 0, 0, 0, 1, 1), new Array(0, 0, 0, 0, 3, 1)); _local38 = new Array(new Array(0, 0, 4, 3, 4, 3), new Array(0, 0, 2, 1, 0, 0), new Array(1, 1, 0, 0, 1, 1), new Array(1, 1, 0, 0, 1, 1), new Array(1, 1, 0, 0, 1, 1), new Array(1, 1, 0, 0, 1, 1)); _local39 = new Array(new Array(4, 3, 0, 0, 4, 3, 0, 0, 4, 3), new Array(1, 1, 0, 0, 1, 1, 0, 0, 1, 1), new Array(1, 1, 0, 0, 1, 1, 0, 0, 1, 1), new Array(3, 1, 0, 0, 3, 1, 0, 0, 3, 1)); _local40 = new Array(new Array(0, 0, 0, 0, 4, 3), new Array(0, 0, 0, 0, 3, 1), new Array(0, 0, 0, 0, 3, 1, 4, 3, 4, 3, 0, 0, 4, 3), new Array(0, 0, 0, 0, 3, 1, 0, 0, 2, 1, 0, 0, 0, 0, 2, 1), new Array(0, 0, 0, 0, 3, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1), new Array(0, 0, 0, 0, 3, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1)); _local41 = new Array(new Array(0, 0, 0, 0, 4, 7), new Array(0, 0, 0, 0, 1, 1), new Array(0, 0, 0, 0, 1, 1, 4, 3, 0, 0, 4, 3, 0, 0, 4, 3), new Array(0, 0, 0, 0, 1, 1, 0, 0, 2, 1, 0, 0, 0, 0, 2, 1), new Array(0, 0, 0, 0, 3, 1, 0, 0, 3, 1, 0, 0, 3, 1, 0, 0, 3, 1), new Array(0, 0, 0, 0, 3, 1, 0, 0, 3, 1, 0, 0, 3, 1, 0, 0, 3, 1)); _local42 = new Array(new Array(0, 0, 0, 0, 4, 7), new Array(0, 0, 0, 0, 1, 1), new Array(0, 0, 0, 0, 1, 1, 4, 7, 0, 0, 4, 7, 0, 0, 4, 7), new Array(1, 1, 0, 0, 1, 1, 0, 0, 2, 1, 0, 0, 0, 0, 2, 1), new Array(1, 1, 0, 0, 3, 1, 0, 0, 3, 1, 0, 0, 3, 1, 0, 0, 3, 1), new Array(1, 1, 0, 0, 3, 1, 0, 0, 3, 1, 0, 0, 3, 1, 0, 0, 3, 1)); _local43 = new Array(new Array(0, 0, 0, 0, 4, 7), new Array(0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 7, 0, 0, 0, 0, 4, 7), new Array(0, 0, 0, 0, 3, 1, 4, 3, 0, 0, 4, 3, 0, 0, 4, 3, 3, 1, 0, 0, 0, 0, 3, 1), new Array(0, 0, 0, 0, 3, 1, 0, 0, 2, 1, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0, 2, 1), new Array(3, 1, 0, 0, 3, 1, 3, 1, 0, 0, 3, 1, 3, 1, 0, 0, 3, 1, 0, 0, 0, 0, 3, 1), new Array(3, 1, 0, 0, 3, 1, 3, 1, 0, 0, 3, 1, 3, 1, 0, 0, 3, 1, 0, 0, 0, 0, 3, 1)); _local44 = new Array(new Array(0, 0, 0, 0, 4, 3), new Array(0, 0, 0, 0, 3, 1, 3, 1), new Array(0, 0, 0, 0, 3, 1, 3, 1), new Array(0, 0, 0, 0, 3, 1, 3, 1), new Array(0, 0, 0, 0, 3, 1, 3, 1), new Array(0, 0, 0, 0, 3, 1, 3, 1), new Array(0, 0, 0, 0, 3, 1, 3, 1)); _local45 = new Array(new Array(4, 7, 0, 0, 4, 7, 4, 3, 0, 0, 0, 0, 4, 3, 0, 0, 0, 0, 4, 3, 0, 0, 0, 0, 4, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), new Array(3, 1, 0, 0, 3, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 0, 0), new Array(3, 1, 0, 0, 3, 1, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0), new Array(3, 1, 0, 0, 3, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 0, 0), new Array(3, 1, 0, 0, 3, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 0, 0), new Array(3, 1, 0, 0, 3, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 3, 1)); _local46 = new Array(new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0), new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0), new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0), new Array(0, 0, 0, 0, 3, 1, 4, 3, 4, 3, 3, 1), new Array(0, 0, 0, 0, 3, 1, 3, 1, 3, 1, 3, 1), new Array(0, 0, 0, 0, 3, 1, 3, 1, 3, 1, 3, 1), new Array(0, 0, 0, 0, 3, 1, 3, 1, 3, 1, 3, 1)); _local47 = new Array(new Array(0, 0, 0, 0, 4, 7), new Array(0, 0, 0, 0, 1, 1), new Array(0, 0, 0, 0, 1, 1, 4, 3, 0, 0, 4, 3, 0, 0, 4, 3, 0, 0, 4, 3, 0, 0, 4, 3, 0, 0, 4, 3), new Array(0, 0, 0, 0, 1, 1, 0, 0, 2, 1, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 2, 1), new Array(0, 0, 0, 0, 3, 1, 0, 0, 3, 1, 0, 0, 3, 1, 0, 0, 3, 1, 0, 0, 3, 1, 0, 0, 3, 1, 0, 0, 3, 1), new Array(0, 0, 0, 0, 3, 1, 0, 0, 3, 1, 0, 0, 3, 1, 0, 0, 3, 1, 0, 0, 3, 1, 0, 0, 3, 1, 0, 0, 3, 1)); _local48 = new Array(new Array(0, 0, 0, 0, 4, 7), new Array(0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 7, 0, 0, 0, 0, 4, 7), new Array(0, 0, 0, 0, 3, 1, 4, 3, 0, 0, 4, 3, 0, 0, 4, 3, 3, 1, 0, 0, 0, 0, 3, 1, 0, 0, 4, 7), new Array(0, 0, 0, 0, 3, 1, 0, 0, 2, 1, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 2, 1), new Array(0, 0, 0, 0, 3, 1, 3, 1, 0, 0, 3, 1, 3, 1, 0, 0, 3, 1, 3, 1, 0, 0, 3, 1, 0, 0, 3, 1), new Array(0, 0, 0, 0, 3, 1, 3, 1, 0, 0, 3, 1, 3, 1, 0, 0, 3, 1, 3, 1, 0, 0, 3, 1, 0, 0, 3, 1)); _local49 = new Array(new Array(0, 0, 0, 0, 4, 3), new Array(0, 0, 0, 0, 3, 1), new Array(0, 0, 0, 0, 3, 1), new Array(0, 0, 0, 0, 3, 1), new Array(0, 0, 0, 0, 3, 1), new Array(0, 0, 0, 0, 3, 1, 3, 1)); _local50 = new Array(new Array(4, 3, 0, 0, 4, 3, 0, 0, 4, 3), new Array(3, 1, 0, 0, 0, 0), new Array(3, 1, 0, 0, 0, 0), new Array(3, 1, 0, 0, 3, 1, 0, 0, 3, 1, 0, 0, 3, 1), new Array(3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1), new Array(3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1)); enemyCastles = new Array(_local41, _local42, _local43, _local44, _local45, _local46, _local47, _local48, _local49, _local50); _local51 = "I am Arthur! Stand aside! You are not wanted here! "; _local52 = "We meet again! this will be the last time! "; _local53 = "Run away, but I will find you! "; _local54 = "You may have beaten me today, but I will be back! "; _local55 = "Your day has come! You cannot run any further! "; _local56 = "This is your final battle Arthur! "; _local57 = "You are defeated! "; _local58 = "Arrgggg! "; _local59 = "Hear me! You cannot unite this country only I can! "; _local60 = "I will be King and rule this land! "; _local61 = "You are defeated, why battle on? "; _local62 = "This land is mine!!! "; _local63 = "Even your fortress will fall! "; _local64 = "I will crush you! "; _local65 = "You are defeated! "; _local66 = "Arrgggg! "; _local67 = "Two have already fallen to me, you will be next! "; _local68 = "You are strong, but not strong enough! "; _local69 = "stand and fight! "; _local70 = "I retreat for now! "; _local71 = "I will chase you to your final destination! "; _local72 = "You will not survive the battle! "; _local73 = "You are defeated! "; _local74 = "Arrgggg! "; _local75 = "Today, your kingdom will be mine! "; _local76 = "You attack will fail against my fortress! "; _local77 = "Your walls have fallen! "; _local78 = "Arrrgggg "; _local79 = "Rhodri! You will be deated! "; _local80 = "Ha! I don't scare easily! "; _local81 = "You are defeated! "; _local82 = "Arrgggg! "; _local83 = "I am Arthur! You will not succeed! "; _local84 = "This is my domain, and will remain so! "; _local85 = "Do you give in! "; _local86 = "Never! "; _local87 = "It is your last day Morgan! "; _local88 = "Your weapons are nothing to me! "; _local89 = "You are defeated! "; _local90 = "Arrgggg! "; _local91 = "I will be your king! "; _local92 = "You have come far, but will go no further! "; _local93 = "Submit to my will and you will be spared! "; _local94 = "You win today, but you will not defeat me. "; _local95 = "Stand with me or I will stand on thee! "; _local96 = "Many have fallen, but the day will be mine! "; _local97 = "You are defeated! "; _local98 = "Arrgggg! "; _local99 = "I am Arthur! Vikings will never rule here! "; _local100 = "Haha! you will beg for mercy when we are done! "; _local101 = "Run viking! "; _local102 = "You cannot withstand us boy!! "; _local103 = "On this day all will be mine! "; _local104 = "Oden will strike you! "; _local105 = "I have fought my final battle! "; _local106 = "Arrgggg! "; levelsLocation = new Array("Cornwall", "Wessex", "Sussex", "Kent", "Anglia", "Mercia", "Luitcoyt", "Wales", "Elmet", "Lindsey"); levelsRuler = new Array("Egbert", "Egbert", "Caldron the Creepy", "Caldron the Creepy", "Anders the Smart", "Anders the Smart", "Rhodri the Great", "Rhodri the Great", "Morgan le Fay", "Morgan le Fay"); _local107 = new Array(_local51, _local52); _local108 = new Array(_local53, _local54); _local109 = new Array(_local55, _local56); _local110 = new Array(_local57, _local58); _local111 = new Array(_local59, _local60); _local112 = new Array(_local61, _local62); _local113 = new Array(_local63, _local64); _local114 = new Array(_local65, _local66); _local115 = new Array(_local67, _local68); _local116 = new Array(_local69, _local70); _local117 = new Array(_local71, _local72); _local118 = new Array(_local73, _local74); _local119 = new Array(_local75, _local76); _local120 = new Array(_local77, _local78); _local121 = new Array(_local79, _local80); _local122 = new Array(_local81, _local82); _local123 = new Array(_local83, _local84); _local124 = new Array(_local85, _local86); _local125 = new Array(_local87, _local88); _local126 = new Array(_local89, _local90); _local127 = new Array(_local91, _local92); _local128 = new Array(_local93, _local94); _local129 = new Array(_local95, _local96); _local130 = new Array(_local97, _local98); _local131 = new Array(_local99, _local100); _local132 = new Array(_local101, _local102); _local133 = new Array(_local103, _local104); _local134 = new Array(_local105, _local106); levelChatStart = new Array(_local107, _local109, _local111, _local113, _local115, _local117, _local119, _local121, _local123, _local125, _local127, _local129, _local131, _local133); levelChatEnd = new Array(_local108, _local110, _local112, _local114, _local116, _local118, _local120, _local122, _local124, _local126, _local128, _local130, _local132, _local134); levelsToRun = new Array(1, 3, 5, 7, 9, 23); letterIndex = 0; whosChattingIndex = 0; letterDelay = 10; glowFilter = new GlowFilter(6750054, 1, 8, 8, 3, 1); boulderBought = false; scrollvx = 0; score = 0; bestScore = 0; lives = _arg6; energy = 100; money = 0; energyAlien = 100; currentMoneyDelay = 40; moneyDelay = currentMoneyDelay; moneyMax = 100; spring = 0.01; friction = 0.8; springLength = 10; left = -20; right = (movieWidth - 20); top = 0; bottom = movieHeight; levelStart = 1; levelNumber = levelStart; levelMax = 10; wave = 0; delayToWave = 100; maxScrollSpeed = 24; scrollxPos = 0; secDisplay = "00"; minDisplay = "00"; StartTimer = 1; clockDelay = 10; minutes = StartTimer; sec = 0; fulltime = 0; numberOfStartItems = 3; pauseSwitch = false; antsbmp = new antsMc(0, 0); shift = new Matrix(); clickloc = new Point(-10, -10); releaseloc = new Point(-10, -10); filterDelay = 1; filterAlienDelay = 1; scrollScreen = ""; mineCost = 10; wallCost = 20; } function increaseMoney(_arg1:Number){ money = (money + _arg1); if (money > 10000){ money = 10000; }; setMoney(); checkForAfford(); } public function setupGame(){ newArrays(); cannonMove = ""; Box2d.setupBox2d(); setupCatapultDial(); catapultClicked = false; catapultFired = false; catapultItem = null; oldEnergy = energy; oldScore = score; oldUpgrade1 = upgrade1; oldUpgrade2 = upgrade2; oldUpgrade3 = upgrade3; oldUpgrade4 = upgrade4; oldUpgrade5 = upgrade5; oldUpgrade6 = upgrade6; movedOverHalf = true; levelTime = 0; waveDelayD = 1; energy = 100; wave = 0; freezeDelay = 2; waveDelay = (1020 - (levelNumber * 70)); delayToWave = 100; money = (9 + levelNumber); moneyDelay = currentMoneyDelay; moneyMax = (100 + ((levelNumber - 1) * 20)); setupPanel(); setupBackground(); soundFxBtn2(); musicBtn2(); setScore(); setLevel(); setMoney(); setupStartGameMsg(); checkForAfford(); rt.stage.focus = rt; } function endLevelStuff(){ oldUpgrade1 = false; oldUpgrade2 = false; oldUpgrade3 = false; upgrade1 = oldUpgrade1; upgrade2 = oldUpgrade2; upgrade3 = oldUpgrade3; rt.gameState = 6; killAllExplosions(); levelNumber++; inGameMsgsMc.removeChild(levelCompleteMsg); levelCompleteMsg = null; inGameBackgroundMc.removeChild(backSkyMc); backSkyMc.stop(); backSkyMc = null; spritesMc.x = 0; newLevelStuff(); destroyEverything(); rt.setupMapScreen(); } function setupBadSoldier(_arg1, _arg2, _arg3){ var _local4:String; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:*; _local4 = _arg1[0]; _local5 = _arg1[1]; _local6 = _arg1[2]; _local7 = _arg1[3]; _local8 = _arg2; _local9 = _arg3; _local10 = _arg1[8]; _local11 = _arg1[9]; _local12 = _arg1[10]; _local13 = Box2d.setupGrabbedItem(_local4, _local5, _local6, _local7, "position", _local8, _local9, 1); badGuysArray.push(new GameBadGuy(_local4, this, _local13.x, _local13.y, _local13, Useful, _local10, _local11, _local12)); } function runWave(){ var _local1:Array; var _local2:Number; if (movedOverHalf == true){ if (badGuysArray.length < MAX_BADGUYS){ delayToWave--; if (delayToWave == 0){ setupWave(wave); wave++; _local1 = badGuysLevels[(levelNumber - 1)]; if (wave >= _local1.length){ wave = 0; }; waveDelayD--; if (waveDelayD == 0){ waveDelayD = 1; _local2 = (levelNumber * 3); if (_local2 > 20){ _local2 = 20; }; waveDelay = (waveDelay - _local2); if (waveDelay < 50){ waveDelay = 50; }; }; delayToWave = waveDelay; }; }; }; } function setLevel(){ statsMc.levelTxt.text = String(levelNumber); } public function selectionBoxOff(){ if (selectionBoxMc != null){ selectionBoxMc.myParent.removeChild(selectionBoxMc); selectionBoxMc = null; Box2d.bodyGrabbed = null; }; } function soundFxBtn(){ if (statsMc.soundFxMc.currentFrame == 1){ statsMc.soundFxMc.gotoAndStop("off"); soundsSwitch = false; } else { statsMc.soundFxMc.gotoAndStop("on"); soundsSwitch = true; }; } function checkForAfford(){ var _local1:*; _local1 = 0; while (_local1 < 9) { if (panelItemsData[((_local1 * 3) + 1)] > money){ if (itemsArray[_local1].currentFrame != 2){ itemsArray[_local1].gotoAndStop("notBuy"); }; } else { if (itemsArray[_local1].currentFrame != 1){ itemsArray[_local1].gotoAndStop(1); }; }; _local1++; }; if (upgrade1 == false){ if (upgradeMc1.back.currentFrame == 1){ if (upgradeCost1 > money){ upgradeMc1.gotoAndStop("notAfford"); } else { upgradeMc1.gotoAndStop(1); }; }; }; if (upgrade2 == false){ if (upgradeMc2.back.currentFrame == 1){ if (upgradeCost2 > money){ upgradeMc2.gotoAndStop("notAfford"); } else { upgradeMc2.gotoAndStop(1); }; }; }; if (upgrade3 == false){ if (upgradeMc3.back.currentFrame == 1){ if (upgradeCost3 > money){ upgradeMc3.gotoAndStop("notAfford"); } else { upgradeMc3.gotoAndStop(1); }; }; }; } function setupSoldier(_arg1, _arg2, _arg3){ var _local4:*; _local4 = _arg1.myType; if (_local4 == "knight"){ goodGuysArray.push(new GameGoodGuy(this, _arg2, _arg3, _arg1, Useful, 200, 1, 5)); } else { if (_local4 == "knight2"){ goodGuysArray.push(new GameGoodGuy(this, _arg2, _arg3, _arg1, Useful, 200, 1, 7)); } else { if (_local4 == "archer"){ goodGuysArray.push(new GameGoodGuy(this, _arg2, _arg3, _arg1, Useful, 200, 0, 3)); } else { if (_local4 == "wizard"){ goodGuysArray.push(new GameGoodGuy(this, _arg2, _arg3, _arg1, Useful, 200, 0, 4)); } else { if (_local4 == "knight3"){ goodGuysArray.push(new GameGoodGuy(this, _arg2, _arg3, _arg1, Useful, 200, 2, 8)); } else { if (_local4 == "knight4"){ goodGuysArray.push(new GameGoodGuy(this, _arg2, _arg3, _arg1, Useful, 200, 1, 10)); }; }; }; }; }; }; } function doMoneyIncrease(){ moneyDelay--; if (moneyDelay == 0){ if (upgrade3 == true){ moneyDelay = 30; } else { moneyDelay = currentMoneyDelay; }; money++; if (money > moneyMax){ money = moneyMax; }; }; setMoney(); checkForAfford(); } function runStartChat(){ var _local1:Array; var _local2:String; var _local3:Number; Box2d.runBox2d(); letterDelay--; if (letterDelay == 0){ letterDelay = 2; _local1 = levelChatStart[(levelNumber - 1)]; _local2 = _local1[whosChattingIndex]; _local3 = int((whosChattingIndex / 2)); _local3 = (_local3 * 2); currentPhrase = _local2.slice(0, letterIndex); if (whosChattingIndex == _local3){ statsMc.leftSpeech.gotoAndStop(2); statsMc.kingGoodHead.expressions.gotoAndStop("talking"); statsMc.rightSpeech.gotoAndStop(1); statsMc.kingBadHead.expressions.gotoAndStop("static"); statsMc.rightSpeech.txt.text = ""; statsMc.leftSpeech.txt.text = currentPhrase; } else { statsMc.leftSpeech.gotoAndStop(1); statsMc.kingGoodHead.expressions.gotoAndStop("static"); statsMc.kingBadHead.expressions.gotoAndStop("talking"); statsMc.rightSpeech.gotoAndStop(2); statsMc.leftSpeech.txt.text = ""; statsMc.rightSpeech.txt.text = currentPhrase; }; letterIndex++; if (letterIndex == _local2.length){ letterIndex = 0; letterDelay = 10; whosChattingIndex++; if (whosChattingIndex == _local1.length){ statsMc.leftSpeech.gotoAndStop(1); statsMc.rightSpeech.gotoAndStop(1); statsMc.rightSpeech.txt.text = ""; statsMc.kingBadHead.expressions.gotoAndStop("static"); finishSetup(); }; }; }; } function decreaseScore(_arg1){ score = int((score - _arg1)); if (score >= 0){ setScore(); } else { score = 0; setScore(); }; } function resetKingBad(){ var _local1:Boolean; var _local2:int; var _local3:b2Vec2; var _local4:Number; _local1 = false; whosChattingIndex = 0; _local2 = 0; while (_local2 < levelsToRun.length) { if (levelNumber == levelsToRun[_local2]){ _local1 = true; break; }; _local2++; }; if (_local1 == false){ _local4 = badKingMc.myBodyDef.GetAngle(); _local3 = new b2Vec2(); _local3.x = (Useful.bxConvertToMetres(1500, Box2d.BxScalingFactor) / 2); _local3.y = (Useful.bxConvertToMetres(240, Box2d.BxScalingFactor) / 2); badKingMc.myBodyDef.SetXForm(_local3, _local4); } else { setupKingBad(); }; _local3 = badKingMc.myBodyDef.GetLinearVelocity(); _local3.x = 0; _local3.y = 0; badKingMc.myBodyDef.WakeUp(); badKingMc.myBodyDef.SetLinearVelocity(_local3); } public function cannonUp(){ cDial.needle.rotation++; } function setCannonRange(){ var _local1:Number; _local1 = cDial.needle.rotation; if (_local1 > 600){ _local1 = 600; }; } function decreaseEnergy(_arg1:Number){ var _local2:*; statsMc.timer.maskMc.x = (statsMc.timer.maskMc.x - (_arg1 / 8)); _local2 = new GameRisingScore(rt, inGameScoreMc, _arg1); inGameScoreMc.addChild(_local2); if (Player != null){ _local2.x = Player.mC.x; _local2.y = Player.mC.y; }; if (statsMc.timer.maskMc.x < -(statsMc.timer.maskMc.width)){ return (true); }; return (false); } function musicBtn2(){ if (musicSwitch == false){ statsMc.musicMc.gotoAndStop("off"); } else { statsMc.musicMc.gotoAndStop("on"); }; } function scrollBackRight(){ scrollxPos = (scrollxPos + scrollvx); if (scrollxPos > 0){ scrollxPos = 0; scrollvx = 0; spritesMc.x = 0; } else { spritesMc.x = (spritesMc.x + scrollvx); inGameBackgroundMc2.x = (inGameBackgroundMc2.x + (scrollvx / 2)); inGameBackgroundMc.x = (inGameBackgroundMc.x + (scrollvx / 4)); }; } function killAllGoodGuys(){ var _local1:Number; var _local2:int; var _local3:*; _local1 = inGameGoodGuysMc.numChildren; _local2 = 0; while (_local2 < _local1) { _local3 = inGameGoodGuysMc.getChildAt(0); if (_local3.myType != "catapultBase"){ if (_local3.myType != "catapultRod"){ if (_local3.myType != "catapultCup"){ if (_local3.myType != "kingGood"){ if (_local3.myObject == null){ if (_local3.myParent != null){ _local3.destroyMe(); }; }; }; }; }; }; _local2++; }; } function setMoney(){ statsMc.money.text = ((String(money) + "/") + moneyMax); } function increaseScore(_arg1){ score = int((score + _arg1)); if (score > 0){ setScore(); }; } function setEnergy(){ if (filterDelay > 1){ filterDelay--; if (filterDelay == 1){ Player.mC.filters = []; }; }; } function setupZoomBtns(){ if (inGameZoomMc.scaleX > 0.95){ statsMc.zoom1.gotoAndStop("on"); statsMc.zoom2.gotoAndStop("off"); statsMc.zoom3.gotoAndStop("off"); statsMc.zoom4.gotoAndStop("off"); } else { if (inGameZoomMc.scaleX > 0.85){ statsMc.zoom1.gotoAndStop("off"); statsMc.zoom2.gotoAndStop("on"); statsMc.zoom3.gotoAndStop("off"); statsMc.zoom4.gotoAndStop("off"); } else { if (inGameZoomMc.scaleX > 0.75){ statsMc.zoom1.gotoAndStop("off"); statsMc.zoom2.gotoAndStop("off"); statsMc.zoom3.gotoAndStop("on"); statsMc.zoom4.gotoAndStop("off"); } else { statsMc.zoom1.gotoAndStop("off"); statsMc.zoom2.gotoAndStop("off"); statsMc.zoom3.gotoAndStop("off"); statsMc.zoom4.gotoAndStop("on"); }; }; }; } function finishSetup(){ rt.finishSetup(); } public function setupPanel():void{ statsMc = new GameWeaponsPanel(this); inGameStatsMc.addChild(statsMc); timerStartY = statsMc.timer.maskMc.x; timerStartY2 = statsMc.timer2.maskMc.x; statsMc.y = (movieHeight - 77); statsMc.msg.text = "Welcome Arthur to your quest for power!"; statsMc.timer.maskMc.x = timerStartY; statsMc.timer2.maskMc.x = timerStartY2; statsMc.kingBadHead.gotoAndStop(levelNumber); statsMc.rightNamesTxt.text = levelsRuler[(levelNumber - 1)]; setupPanelItems(); setupZoomBtns(); } function checkForGameOver(){ if (energy == 0){ gameOver("game_over"); }; } function killAllExplosions(){ var _local1:*; _local1 = (explosionsArray.length - 1); while (_local1 >= 0) { explosionsArray[_local1].remove(); _local1--; }; _local1 = (particlesArray.length - 1); while (_local1 >= 0) { particlesArray[_local1].remove(); _local1--; }; } function setLives(){ var _local1:MovieClip; _local1 = inGameStatsMc["ingamestatsmc"]; _local1 = _local1["wg"]; _local1 = _local1["stats"]; _local1.lives.text = lives; } function checkPanel(){ var _local1:*; _local1 = 0; while (_local1 < itemsArray.length) { if (itemsArray[_local1].hitTestPoint(stage.mouseX, stage.mouseY, true)){ statsMc.msg.text = panelItemsData[((_local1 * 3) + 2)]; }; _local1++; }; if (upgradeMc1.hitTestPoint(stage.mouseX, stage.mouseY, true)){ statsMc.msg.text = "60 Gold. Click to buy. Upgrade Cannon!"; } else { if (upgradeMc2.hitTestPoint(stage.mouseX, stage.mouseY, true)){ statsMc.msg.text = "70 Gold. Click to buy. Magical shield for all your troops for limited time"; } else { if (upgradeMc3.hitTestPoint(stage.mouseX, stage.mouseY, true)){ statsMc.msg.text = "80 Gold. Click to buy. Speed up the rate your gold increases for the duration of the level"; } else { if (statsMc.quitBtn.hitTestPoint(stage.mouseX, stage.mouseY, true)){ statsMc.msg.text = "Click to Quit game"; } else { if (statsMc.musicBtn.hitTestPoint(stage.mouseX, stage.mouseY, true)){ statsMc.msg.text = "Click to turn music on/off"; } else { if (statsMc.soundFxBtn.hitTestPoint(stage.mouseX, stage.mouseY, true)){ statsMc.msg.text = "Click to turn sound effects on/off"; } else { if (statsMc.pausePanelBtn.hitTestPoint(stage.mouseX, stage.mouseY, true)){ statsMc.msg.text = "Click to pause/unpause game"; }; }; }; }; }; }; }; } function musicBtn(){ if (statsMc.musicMc.currentFrame == 1){ statsMc.musicMc.gotoAndStop("off"); rt.titleMusicChannel.stop(); musicSwitch = false; } else { statsMc.musicMc.gotoAndStop("on"); musicSwitch = true; rt.titleMusicChannel = rt.titleMusic.play(0, 10000); Sounds.setVolume(rt.titleMusicChannel, 0.1); }; } public function setupGoodGuy(_arg1):void{ var _local2:*; var _local3:*; if (_arg1.myObject == null){ _local2 = (stage.mouseX - spritesMc.x); _local3 = 100; setupSoldier(_arg1, _local2, _local3); }; } function removeCatapultDial(){ inGamePickupsMc.removeChild(cDial); cDial = null; catapultClicked = false; catapultFired = true; boulderBought = false; catapultItem = null; Sounds.playSoundFx("throwFx", 1, 0, 1); } public function on_mouse_down(){ var _local1:Boolean; var _local2:Number; var _local3:b2MassData; var _local4:b2Vec2; _local1 = false; if (Box2d.bodyGrabbed == null){ Box2d.bodyGrabbed = Box2d.GetBodyAtMouse(); if (Box2d.bodyGrabbed){ if (Box2d.bodyGrabbed.m_userData.goodBad == false){ if (Box2d.bodyGrabbed.m_userData.myType != "knight4"){ if (Box2d.bodyGrabbed.m_userData.myType != "knight3"){ if (Box2d.bodyGrabbed.m_userData.myType != "knight"){ if (Box2d.bodyGrabbed.m_userData.myType != "knight2"){ if (Box2d.bodyGrabbed.m_userData.myType != "cannonBall"){ if (Box2d.bodyGrabbed.m_userData.myType != "boulder"){ if (Box2d.bodyGrabbed.m_userData.myType != "kingGood"){ if (Box2d.bodyGrabbed.m_userData.myType != "catapultRod"){ setupSelectionBox(Box2d.bodyGrabbed.m_userData); Box2d.bodyGrabbed.m_userData.myParent.setChildIndex(Box2d.bodyGrabbed.m_userData, (Box2d.bodyGrabbed.m_userData.myParent.numChildren - 1)); _local2 = Box2d.bodyGrabbed.GetMass(); _local3 = new b2MassData(); _local3.mass = _local2; Box2d.bodyGrabbed.SetMass(_local3); _local4 = new b2Vec2(); _local4 = Box2d.bodyGrabbed.GetPosition(); Box2d.bodyGrabbed.SetXForm(_local4, 0); Box2d.setupMouseJoint(); } else { Box2d.bodyGrabbed = null; }; } else { Box2d.bodyGrabbed = null; }; } else { Box2d.bodyGrabbed = null; }; } else { Box2d.bodyGrabbed = null; }; } else { Box2d.bodyGrabbed = null; }; } else { Box2d.bodyGrabbed = null; }; } else { Box2d.bodyGrabbed = null; }; } else { Box2d.bodyGrabbed = null; }; } else { Box2d.bodyGrabbed = null; }; }; }; } function pauseOn(){ pauseSwitch = true; } public function destroyEverything(){ var _local1:Number; var _local2:int; goodGuysArray.splice(0); badGuysArray.splice(0); bouldersArray.splice(0); explosionsArray.splice(0); particlesArray.splice(0); missilesArray.splice(0); newArrays(); catapultClicked = false; catapultFired = false; boulderBought = false; catapultItem = null; _local1 = inGameBuildingsMc.numChildren; _local2 = 0; while (_local2 < _local1) { inGameBuildingsMc.removeChildAt(0); _local2++; }; _local1 = inGameEnemyMc.numChildren; _local2 = 0; while (_local2 < _local1) { inGameEnemyMc.removeChildAt(0); _local2++; }; _local1 = inGameGoodGuysMc.numChildren; _local2 = 0; while (_local2 < _local1) { inGameGoodGuysMc.removeChildAt(0); _local2++; }; _local1 = inGameMissilesMc.numChildren; _local2 = 0; while (_local2 < _local1) { inGameMissilesMc.removeChildAt(0); _local2++; }; _local1 = inGameExplosionsMc.numChildren; _local2 = 0; while (_local2 < _local1) { inGameExplosionsMc.removeChildAt(0); _local2++; }; floorMc.stop(); inGameFloorMc.removeChild(floorMc); floorMc.stop(); floorMc = null; cliffMc.stop(); inGameCliffMc.removeChild(cliffMc); cliffMc.stop(); cliffMc = null; catapultCatchMc = null; inGameCliffMc.removeChild(tentMc); tentMc.stop(); tentMc = null; if (cDial != null){ inGamePickupsMc.removeChild(cDial); }; goodKingMc = null; badKingMc = null; inGameStatsMc.removeChild(statsMc); statsMc = null; Box2d.destroyEverything(); } function setupStartGameMsg(){ var _local1:String; var _local2:String; startGameMsgMc = new GameStartMsg(this); inGameMsgsMc.addChild(startGameMsgMc); _local1 = ((String(levelNumber) + ": ") + String(levelsLocation[(levelNumber - 1)])); _local2 = String(levelsRuler[(levelNumber - 1)]); startGameMsgMc.textBox.titleTxt.text = ("Level " + _local1); startGameMsgMc.textBox.rulerTxt.text = ("Ruler: " + _local2); startGameMsgMc.x = 140; startGameMsgMc.y = 150; } function freezeMc(_arg1, _arg2, _arg3){ var _local4:Color; _local4 = new Color(); _local4.setTint(_arg2, _arg3); _arg1.transform.colorTransform = _local4; } function killAllMissiles(){ var _local1:*; _local1 = (missilesArray.length - 1); while (_local1 >= 0) { missilesArray[_local1].remove(); _local1--; }; } function setupPanelItems(){ var _local1:Number; var _local2:Number; var _local3:*; var _local4:*; var _local5:*; var _local6:*; var _local7:*; itemsToBuyMc = new Sprite(); statsMc.addChild(itemsToBuyMc); itemsToBuyMc.x = 8; itemsToBuyMc.y = 13; itemsArray = new Array(); _local1 = 0; _local2 = 0; _local3 = 0; while (_local3 < 9) { _local7 = new GamePanelBuyMc(this); itemsToBuyMc.addChild(_local7); if (panelItemsData[((_local3 * 3) + 1)] > money){ _local7.gotoAndStop("notBuy"); }; itemsCost[_local3] = panelItemsData[((_local3 * 3) + 1)]; _local7.itemsMc.gotoAndStop((_local3 + 1)); if (_local3 == 6){ _local1 = 9; }; _local7.x = (_local3 * 40); _local7.x = (_local7.x + _local1); _local7.x = (_local7.x + _local2); itemsArray.push(_local7); _local3++; }; _local4 = 405; _local5 = 31; _local6 = 41; upgradeMc1 = new GameUpgrade(this); statsMc.addChild(upgradeMc1); upgradeMc1.x = _local4; upgradeMc1.y = _local5; _local4 = (_local4 + _local6); if (upgrade1 == true){ upgradeMc1.gotoAndStop(3); upgradeMc1.back.gotoAndStop(3); }; upgradeMc2 = new GameUpgrade2(this); statsMc.addChild(upgradeMc2); upgradeMc2.x = _local4; upgradeMc2.y = _local5; _local4 = (_local4 + _local6); if (upgrade2 == true){ upgradeMc2.gotoAndStop(3); upgradeMc2.back.gotoAndStop(3); }; upgradeMc3 = new GameUpgrade3(this); statsMc.addChild(upgradeMc3); upgradeMc3.x = _local4; upgradeMc3.y = _local5; _local4 = (_local4 + _local6); if (upgrade3 == true){ upgradeMc3.gotoAndStop(3); upgradeMc3.back.gotoAndStop(3); }; } function newLevelStuff(){ wave = 0; } function setupKingGood(){ Box2d.setupGrabbedItem("kingGood", 405, 0.5, 0, "position", 150, 350, 1); } public function restartLevel(){ if (gameOverMsgMc != null){ inGameMsgsMc.removeChild(gameOverMsgMc); }; gameOverMsgMc = null; oldUpgrade1 = false; oldUpgrade2 = false; oldUpgrade3 = false; upgrade1 = oldUpgrade1; upgrade2 = oldUpgrade2; upgrade3 = oldUpgrade3; money = oldMoney; energy = oldEnergy; score = oldScore; rt.gameState = 6; if (levelCompleteMsg != null){ inGameMsgsMc.removeChild(levelCompleteMsg); levelCompleteMsg = null; }; inGameBackgroundMc.removeChild(backSkyMc); backSkyMc.stop(); backSkyMc = null; spritesMc.x = 0; newLevelStuff(); destroyEverything(); rt.setupMapScreen(); } function setupCatapultDial(){ var _local1:Number; _local1 = 30; catapultClicked = true; cDial = new catapultDial(); cDial.x = 20; cDial.y = 290; cDial.needle.rotation = 40; inGamePickupsMc.addChild(cDial); } function decreaseMoney(_arg1:Number){ money = (money - _arg1); if (money < 0){ money = 0; }; setMoney(); } public function on_mouse_up(){ var _local1:Boolean; var _local2:*; var _local3:b2Vec2; scrollScreen = ""; if (Box2d.mouseJoint){ if (Box2d.bodyGrabbed.m_userData.x < flagMc.x){ _local1 = false; if (Box2d.bodyGrabbed.m_userData.myType == "archer"){ if (Box2d.bodyGrabbed.m_userData.x < 130){ _local1 = true; }; if (Box2d.bodyGrabbed.m_userData.y > 460){ _local1 = true; }; }; if (Box2d.bodyGrabbed.m_userData.myType == "wizard"){ if (Box2d.bodyGrabbed.m_userData.x < 130){ _local1 = true; }; if (Box2d.bodyGrabbed.m_userData.y > 460){ _local1 = true; }; } else { if (Box2d.bodyGrabbed.m_userData.myType == "block"){ if (Box2d.bodyGrabbed.m_userData.x < 130){ _local1 = true; }; if (Box2d.bodyGrabbed.m_userData.y > 460){ _local1 = true; }; } else { if (Box2d.bodyGrabbed.m_userData.myType == "wood"){ if (Box2d.bodyGrabbed.m_userData.x < 130){ _local1 = true; }; if (Box2d.bodyGrabbed.m_userData.y > 460){ _local1 = true; }; } else { if (Box2d.bodyGrabbed.m_userData.myType == "woodBlock"){ if (Box2d.bodyGrabbed.m_userData.x < 130){ _local1 = true; }; if (Box2d.bodyGrabbed.m_userData.y > 460){ _local1 = true; }; }; }; }; }; if (_local1 == false){ Box2d.m_world.DestroyJoint(Box2d.mouseJoint); Box2d.mouseJoint = null; Box2d.bodyGrabbed.SetMassFromShapes(); _local2 = Box2d.bodyGrabbed.m_shapeList; _local2.SetFilterData(Box2d.bodyGrabbed.m_userData.filterData); if (Box2d.bodyGrabbed.m_userData.myType == "knight"){ setupGoodGuy(Box2d.bodyGrabbed.m_userData); } else { if (Box2d.bodyGrabbed.m_userData.myType == "knight2"){ setupGoodGuy(Box2d.bodyGrabbed.m_userData); } else { if (Box2d.bodyGrabbed.m_userData.myType == "archer"){ setupGoodGuy(Box2d.bodyGrabbed.m_userData); } else { if (Box2d.bodyGrabbed.m_userData.myType == "wizard"){ setupGoodGuy(Box2d.bodyGrabbed.m_userData); } else { if (Box2d.bodyGrabbed.m_userData.myType == "knight3"){ setupGoodGuy(Box2d.bodyGrabbed.m_userData); } else { if (Box2d.bodyGrabbed.m_userData.myType == "knight4"){ setupGoodGuy(Box2d.bodyGrabbed.m_userData); } else { if (Box2d.bodyGrabbed.m_userData.myType == "kingGood"){ setupPlayer(Box2d.bodyGrabbed.m_userData); }; }; }; }; }; }; }; _local3 = Box2d.bodyGrabbed.m_userData.myBodyDef.GetLinearVelocity(); _local3.x = 0; Box2d.bodyGrabbed.m_userData.myBodyDef.SetLinearVelocity(_local3); Box2d.bodyGrabbed = null; Box2d.m_world.Refilter(_local2); }; }; }; } public function fireCannon(){ var _local1:*; var _local2:Number; var _local3:Object; var _local4:*; var _local5:b2Vec2; var _local6:*; var _local7:Number; var _local8:b2Vec2; _local1 = money; _local2 = 2; if (upgrade1 == false){ _local1 = (_local1 - _local2); } else { _local2 = 4; _local1 = (_local1 - _local2); }; if (_local1 >= 0){ decreaseMoney(_local2); checkForAfford(); catapultItem = null; boulderBought = true; _local3 = Useful.localToGlobalXY(cDial.needle.endMc); _local3.newX = (_local3.newX - spritesMc.x); _local4 = new GameRisingMoney(this, inGameScoreMc, (("- " + _local2) + " Gold")); inGameScoreMc.addChild(_local4); _local4.x = _local3.newX; _local4.y = (_local3.newY - 10); if (upgrade1 == false){ Box2d.setupGrabbedItem("boulder", 805, 0.5, 0, "position", _local3.newX, _local3.newY, 1); Sounds.playSoundFx("explosionFx", 1, 0, 1); } else { Box2d.setupGrabbedItem("cannonBall", 805, 0.5, 0, "position", _local3.newX, _local3.newY, 1); Sounds.playSoundFx("mainGunMissileHitFx", 1, 0, 1); }; if (catapultItem != null){ _local5 = new b2Vec2(); _local5 = catapultItem.myBodyDef.GetPosition(); _local6 = Useful.getVectorFromAngle((cDial.needle.rotation - 90)); _local7 = (90 - cDial.needle.rotation); _local7 = (_local7 / 100); _local7 = (_local7 + 0.7); _local7 = (_local7 * 5000); _local8 = new b2Vec2(); _local8.x = (_local6.vx * _local7); _local8.y = (_local6.vy * _local7); catapultItem.myBodyDef.ApplyImpulse(_local8, _local5); }; }; } function killAllBuildingBits(){ var _local1:Number; var _local2:int; var _local3:*; _local1 = inGameBuildingsMc.numChildren; _local2 = 0; while (_local2 < _local1) { _local3 = inGameBuildingsMc.getChildAt(0); if (_local3.myObject == null){ if (_local3.myParent != null){ _local3.destroyMe(); }; }; _local2++; }; } public function quitGame(){ Sounds.playSoundFx("bellFx", 1, 0, 1); destroyEverything(); rt.gameState = 1; levelNumber = 1; inGameFlagMc.removeChild(flagMc); if (gameOverMsgMc != null){ inGameMsgsMc.removeChild(gameOverMsgMc); }; gameOverMsgMc = null; upgrade1 = false; upgrade2 = false; upgrade3 = false; inGameBackgroundMc.removeChild(backSkyMc); backSkyMc.stop(); backSkyMc = null; inGameBackgroundMc2.removeChild(backMc2); backMc2.stop(); backMc2 = null; Player = null; energy = 100; (energyAlien == 100); money = 0; score = 0; currentMoneyDelay = 40; moneyDelay = currentMoneyDelay; moneyMax = 100; spritesMc.x = 0; whosChattingIndex = 0; letterIndex = 0; rt.setupTitleScreen(); } function decreaseBadKingEnergy(_arg1:Number, _arg2):Boolean{ var _local3:Number; var _local4:Boolean; var _local5:int; _local3 = 10; _local3 = (_local3 + (levelNumber * 2)); statsMc.timer2.maskMc.x = (statsMc.timer2.maskMc.x - (_arg1 / _local3)); if (statsMc.timer2.maskMc.x < -(statsMc.timer2.maskMc.width)){ _local4 = false; whosChattingIndex = 0; _local5 = 0; while (_local5 < levelsToRun.length) { if (levelNumber == levelsToRun[_local5]){ _local4 = true; break; }; _local5++; }; if (_local4 == false){ _arg2.gotoAndStop("die"); gameOver("level_complete"); } else { _arg2.gotoAndStop("run"); rt.gameState = STATE_SYSTEM_END_MSG; Sounds.stopAllMySounds(); badKingMc.myBodyDef.WakeUp(); }; return (true); }; return (false); } function setFlag(){ var _local1:Number; _local1 = levelNumber; flagMc.flag1.flag2.flag3a.flag4a.gotoAndStop(_local1); flagMc.flag1.flag2.flag3a.flag4b.gotoAndStop(_local1); flagMc.flag1.flag2.flag3a.flag4c.gotoAndStop(_local1); flagMc.flag1.flag2.flag3a.flag4d.gotoAndStop(_local1); flagMc.flag1.flag2.flag3b.flag4a.gotoAndStop(_local1); flagMc.flag1.flag2.flag3b.flag4b.gotoAndStop(_local1); flagMc.flag1.flag2.flag3b.flag4c.gotoAndStop(_local1); flagMc.flag1.flag2.flag3b.flag4d.gotoAndStop(_local1); } function doFrozen(){ var _local1:*; freezeDelay--; if (freezeDelay == 0){ freezeDelay = 2; _local1 = 0; while (_local1 < frozenArray.length) { freezeMc(frozenArray[_local1].mC, frozenArray[_local1].colourValue, frozenArray[_local1].colourMult); if (frozenArray[_local1].defrost == false){ frozenArray[_local1].colourMult = (frozenArray[_local1].colourMult + 0.1); if (frozenArray[_local1].colourMult >= 0.8){ frozenArray[_local1].colourMult = 0.93; if (frozenArray[_local1].toDefrost == 0){ frozenArray[_local1].toDefrost = 50; } else { frozenArray[_local1].toDefrost--; if (frozenArray[_local1].toDefrost == 0){ frozenArray[_local1].defrost = true; }; }; }; } else { frozenArray[_local1].colourMult = (frozenArray[_local1].colourMult - 0.1); if (frozenArray[_local1].colourMult < 0){ frozenArray[_local1].colourMult = 0; if (frozenArray[_local1].mC.myObject != null){ frozenArray[_local1].mC.myObject.frozen = false; }; frozenArray.splice(_local1, 1); }; }; _local1++; }; }; } function setupWave(_arg1){ var _local2:Array; var _local3:Array; var _local4:*; var _local5:Array; var _local6:String; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:*; var _local14:Number; var _local15:Number; var _local16:MovieClip; _local2 = badGuysLevels[(levelNumber - 1)]; _local3 = _local2[_arg1]; _local4 = 0; while (_local4 < _local3.length) { _local5 = _local3[_local4]; _local6 = _local5[0]; _local7 = _local5[1]; _local8 = _local5[2]; _local9 = _local5[3]; _local10 = _local5[5]; _local11 = _local5[6]; _local12 = _local5[8]; _local13 = (levelNumber / 100); if (_local13 > 1){ _local13 = 1; }; _local13 = (_local13 + (_arg1 / (30 - levelNumber))); if (_local13 > 2){ _local13 = 2; }; _local12 = (_local12 + _local13); _local14 = _local5[9]; _local15 = _local5[10]; if (_local6 != "bird"){ if (_local6 != "dragon"){ _local16 = Box2d.setupGrabbedItem(_local6, _local7, _local8, _local9, "position", _local10, _local11, 1); badGuysArray.push(new GameBadGuy(_local6, this, _local16.x, _local16.y, _local16, Useful, _local12, _local14, _local15)); } else { _local16 = new GameDragon(); inGameEnemyMc.addChild(_local16); badGuysArray.push(new GameBadGuy(_local6, this, _local10, _local11, _local16, Useful, _local12, _local14, _local15)); _local16.myObject = badGuysArray[(badGuysArray.length - 1)]; }; } else { _local16 = new GameBird(); inGameEnemyMc.addChild(_local16); badGuysArray.push(new GameBadGuy(_local6, this, _local10, _local11, _local16, Useful, _local12, _local14, _local15)); _local16.myObject = badGuysArray[(badGuysArray.length - 1)]; }; _local4++; }; } function newArrays(){ missilesArray = new Array(); enemyArray = new Array(); goodGuysArray = new Array(); missilesArray = new Array(); badGuysArray = new Array(); tilesArray = new Array(); explosionsArray = new Array(); particlesArray = new Array(); pickupsArray = new Array(); zombiePartsArray = new Array(); frozenArray = new Array(); bouldersArray = new Array(); destroyedArray = new Array(); groundArray = new Array(); itemsArray = new Array(); selectionArray = new Array(); } function setupUpgrade3(){ upgrade3 = true; upgradeMc3.gotoAndStop(3); Sounds.playSoundFx("magicFx", 1, 0, 1); } function soundFxBtn2(){ if (soundsSwitch == false){ statsMc.soundFxMc.gotoAndStop("off"); } else { statsMc.soundFxMc.gotoAndStop("on"); }; } function setScore(){ if (score > 999999){ score = 999999; }; if (score < 10){ statsMc.score.text = ("00000" + String(score)); } else { if (score < 100){ statsMc.score.text = ("0000" + String(score)); } else { if (score < 1000){ statsMc.score.text = ("000" + String(score)); } else { if (score < 10000){ statsMc.score.text = ("00" + String(score)); } else { if (score < 100000){ statsMc.score.text = ("0" + String(score)); } else { statsMc.score.text = String(score); }; }; }; }; }; } function setupUpgrade2(){ var _local1:int; upgradeMc2.gotoAndStop(3); Sounds.playSoundFx("magicFx", 1, 0, 1); _local1 = 0; while (_local1 < goodGuysArray.length) { goodGuysArray[_local1].filterDelay = 300; goodGuysArray[_local1].mC.filters = [glowFilter]; _local1++; }; } public function cannonDown(){ cDial.needle.rotation--; } function killAllBadGuys(){ var _local1:Number; var _local2:int; var _local3:*; _local1 = inGameEnemyMc.numChildren; _local2 = 0; while (_local2 < _local1) { _local3 = inGameEnemyMc.getChildAt(0); if (_local3.myType != "kingBad1"){ if (_local3.myObject == null){ if (_local3.myParent != null){ _local3.destroyMe(); }; }; }; _local2++; }; } function setupUpgrade1(){ upgradeMc1.gotoAndStop(3); upgrade1 = true; Sounds.playSoundFx("magicFx", 1, 0, 1); } public function gameComplete(){ Sounds.stopAllMySounds(); if (levelCompleteMsg != null){ inGameMsgsMc.removeChild(levelCompleteMsg); levelCompleteMsg = null; }; rt.gameState = 5; gameOverMsgMc = new GameOverMsgAnim(this); inGameMsgsMc.addChild(gameOverMsgMc); gameOverMsgMc.m.gotoAndPlay("gameOver"); gameOverMsgMc.play(); gameOverMsgMc.x = (movieWidth / 2); gameOverMsgMc.y = (movieHeight / 2); } function resetKingGood(){ var _local1:Number; var _local2:b2Vec2; _local1 = goodKingMc.myBodyDef.GetAngle(); _local2 = new b2Vec2(); _local2.x = (Useful.bxConvertToMetres(270, Box2d.BxScalingFactor) / 2); _local2.y = (Useful.bxConvertToMetres(240, Box2d.BxScalingFactor) / 2); goodKingMc.myBodyDef.SetXForm(_local2, _local1); _local2 = badKingMc.myBodyDef.GetLinearVelocity(); _local2.x = 0; _local2.y = 0; badKingMc.myBodyDef.WakeUp(); badKingMc.myBodyDef.SetLinearVelocity(_local2); } function endGame(){ decreaseBadKingEnergy(100, badKingMc); } function increaseEnergy(_arg1:Number){ energy = (energy + _arg1); if (energy > 10000){ energy = 10000; }; setEnergy(); } function scrollBackLeft(){ scrollxPos = (scrollxPos + scrollvx); if (scrollxPos < -((backMcWidth - movieWidth))){ scrollxPos = -((backMcWidth - movieWidth)); scrollvx = 0; spritesMc.x = -((backMcWidth - movieWidth)); } else { spritesMc.x = (spritesMc.x + scrollvx); inGameBackgroundMc2.x = (inGameBackgroundMc2.x + (scrollvx / 2)); inGameBackgroundMc.x = (inGameBackgroundMc.x + (scrollvx / 4)); }; } function checkForPanelClick(){ var _local1:*; var _local2:Number; if (statsMc.quitBtn.hitTestPoint(stage.mouseX, stage.mouseY, true)){ gameOver("game_over"); } else { if (statsMc.musicBtn.hitTestPoint(stage.mouseX, stage.mouseY, true)){ musicBtn(); } else { if (statsMc.soundFxBtn.hitTestPoint(stage.mouseX, stage.mouseY, true)){ soundFxBtn(); } else { if (statsMc.pausePanelBtn.hitTestPoint(stage.mouseX, stage.mouseY, true)){ rt.pauseGame(); }; }; }; }; if (statsMc.currentFrame == 1){ _local1 = 0; while (_local1 < itemsArray.length) { if (itemsArray[_local1].hitTestPoint(stage.mouseX, stage.mouseY, true)){ _local2 = (money - itemsCost[_local1]); if (_local2 >= 0){ if (goodGuysArray.length < 60){ filterDelay = 1; if (_local1 == 6){ decreaseMoney(itemsCost[_local1]); Box2d.setupGrabbedItem("woodBlock", 10405, 0.5, 0, "grab", 0, 0, 1); } else { if (_local1 == 7){ decreaseMoney(itemsCost[_local1]); Box2d.setupGrabbedItem("wood", 1405, 0.5, 0, "grab", 0, 0, 1); } else { if (_local1 == 8){ decreaseMoney(itemsCost[_local1]); Box2d.setupGrabbedItem("block", 10405, 0.5, 0, "grab", 0, 0, 1); } else { if (_local1 == 0){ Sounds.playSoundFx("newSoldierFx", 0.5, 0, 1); decreaseMoney(itemsCost[_local1]); Box2d.setupGrabbedItem("knight", 405, 0.5, 0, "position", 120, 370, 1); } else { if (_local1 == 1){ Sounds.playSoundFx("newSoldierFx", 0.5, 0, 1); decreaseMoney(itemsCost[_local1]); Box2d.setupGrabbedItem("knight2", 405, 0.5, 0, "position", 120, 370, 1); } else { if (_local1 == 4){ Sounds.playSoundFx("newSoldierFx", 0.5, 0, 1); decreaseMoney(itemsCost[_local1]); Box2d.setupGrabbedItem("wizard", 405, 0.5, 0, "grab", 0, 0, 1); } else { if (_local1 == 5){ Sounds.playSoundFx("newSoldierFx", 0.5, 0, 1); decreaseMoney(itemsCost[_local1]); Box2d.setupGrabbedItem("knight4", 405, 0.5, 0, "position", 120, 370, 1); } else { if (_local1 == 2){ Sounds.playSoundFx("newSoldierFx", 0.5, 0, 1); decreaseMoney(itemsCost[_local1]); Box2d.setupGrabbedItem("archer", 405, 0.5, 0, "grab", 0, 0, 1); } else { if (_local1 == 3){ Sounds.playSoundFx("newSoldierFx", 0.5, 0, 1); decreaseMoney(itemsCost[_local1]); Box2d.setupGrabbedItem("knight3", 405, 0.5, 0, "position", 120, 370, 1); } else { if (_local1 == 7){ if (catapultCatchMc.hitTestObject(catapultMc.setMc1)){ boulderBought = true; decreaseMoney(itemsCost[_local1]); Box2d.setupGrabbedItem("potion3", 805, 0.5, 0, "position", 48, 200, 1); }; } else { if (_local1 == 8){ if (catapultCatchMc.hitTestObject(catapultMc.setMc1)){ boulderBought = true; decreaseMoney(itemsCost[_local1]); Box2d.setupGrabbedItem("potion1", 805, 0.5, 0, "position", 48, 200, 1); }; } else { if (_local1 == 9){ if (catapultCatchMc.hitTestObject(catapultMc.setMc1)){ boulderBought = true; decreaseMoney(itemsCost[_local1]); Box2d.setupGrabbedItem("potion2", 805, 0.5, 0, "position", 48, 200, 1); }; }; }; }; }; }; }; }; }; }; }; }; }; checkForAfford(); }; }; }; _local1++; }; if (upgradeMc1.back.hitTestPoint(stage.mouseX, stage.mouseY, true)){ if (upgrade1 == false){ if (upgradeMc1.back.currentFrame == 1){ _local2 = (money - upgradeCost1); if (_local2 >= 0){ decreaseMoney(upgradeCost1); setupUpgrade1(); }; }; }; } else { if (upgradeMc2.back.hitTestPoint(stage.mouseX, stage.mouseY, true)){ if (upgrade2 == false){ if (upgradeMc2.back.currentFrame == 1){ _local2 = (money - upgradeCost2); if (_local2 >= 0){ decreaseMoney(upgradeCost2); setupUpgrade2(); }; }; }; } else { if (upgradeMc3.back.hitTestPoint(stage.mouseX, stage.mouseY, true)){ if (upgrade3 == false){ if (upgradeMc3.back.currentFrame == 1){ _local2 = (money - upgradeCost3); if (_local2 >= 0){ decreaseMoney(upgradeCost3); setupUpgrade3(); }; }; }; }; }; }; }; } public function runEndMsgs(){ var _local1:Array; var _local2:String; var _local3:Number; letterDelay--; if (letterDelay == 0){ letterDelay = 2; _local1 = levelChatEnd[(levelNumber - 1)]; _local2 = _local1[whosChattingIndex]; _local3 = int((whosChattingIndex / 2)); _local3 = (_local3 * 2); currentPhrase = _local2.slice(0, letterIndex); if (whosChattingIndex == _local3){ statsMc.leftSpeech.gotoAndStop(2); statsMc.kingGoodHead.expressions.gotoAndStop("talking"); statsMc.rightSpeech.gotoAndStop(1); statsMc.kingBadHead.expressions.gotoAndStop("static"); statsMc.rightSpeech.txt.text = ""; statsMc.leftSpeech.txt.text = currentPhrase; } else { statsMc.leftSpeech.gotoAndStop(1); statsMc.kingGoodHead.expressions.gotoAndStop("static"); statsMc.kingBadHead.expressions.gotoAndStop("talking"); statsMc.rightSpeech.gotoAndStop(2); statsMc.leftSpeech.txt.text = ""; statsMc.rightSpeech.txt.text = currentPhrase; }; letterIndex++; if (letterIndex == _local2.length){ letterIndex = 0; letterDelay = 10; whosChattingIndex++; if (whosChattingIndex == _local1.length){ statsMc.leftSpeech.gotoAndStop(1); statsMc.rightSpeech.gotoAndStop(1); statsMc.rightSpeech.txt.text = ""; whosChattingIndex = 0; letterIndex = 0; statsMc.kingBadHead.expressions.gotoAndStop("static"); gameOver("level_complete"); }; }; }; Sounds.mainLoop(); Box2d.runBox2d(); if (badKingMc != null){ badKingMc.mainLoop(); }; } function setupBackground(){ if (levelNumber == levelStart){ flagMc = new halfWayFlag(); inGameFlagMc.addChild(flagMc); flagMc.x = 560; flagMc.y = 300; }; setFlag(); backSkyMc = new backgroundSkyMc(); backSkyMc.cacheAsBitmap = true; backSkyMc.filters = [bf2]; inGameBackgroundMc.addChild(backSkyMc); if (levelNumber == levelStart){ backMc2 = new backgroundP(); backMc2.cacheAsBitmap = true; inGameBackgroundMc2.addChild(backMc2); inGameBackgroundMc2.filters = [bf]; }; backSkyMc.gotoAndStop(levelNumber); backMc2.gotoAndStop(levelNumber); spritesMc.x = 0; backSkyMc.x = 0; inGameBackgroundMc.x = 0; inGameBackgroundMc2.x = 0; inGameBackgroundMc2.y = 200; scrollxPos = spritesMc.x; } function toBeDestroyed(){ var _local1:*; _local1 = (destroyedArray.length - 1); while (_local1 >= 0) { if (destroyedArray[_local1].energy <= 0){ Box2d.m_world.DestroyBody(destroyedArray[_local1].myBodyDef); destroyedArray.splice(_local1, 1); } else { destroyedArray.splice(_local1, 1); }; _local1--; }; } function pauseOff(){ pauseSwitch = false; rt.gameState = "play"; } public function gameOverLoop(){ } function setupPlayer(_arg1){ Player = new GamePlayer(_arg1, this, Useful); } function setupKingBad(){ Box2d.setupEnemyKings("kingBad1", 10405, 0.5, 0, "position", 1150, 240); } public function setupSelectionBox(_arg1){ var _local2:*; if (selectionBoxMc == null){ _local2 = new selectionBox(); _local2.myParent = _arg1; _arg1.addChild(_local2); selectionBoxMc = _local2; } else { selectionBoxMc.myParent.removeChild(selectionBoxMc); selectionBoxMc.myParent = _arg1; _arg1.addChild(selectionBoxMc); }; } function setupEnemyCastle(){ var _local1:*; var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:*; var _local7:*; var _local8:Number; var _local9:Number; _local1 = enemyCastles[(levelNumber - 1)]; _local2 = 375; _local3 = 32; _local4 = 0; _local5 = 600; _local6 = (_local1.length - 1); while (_local6 >= 0) { _local7 = 0; while (_local7 < (_local1[_local6].length / 2)) { _local8 = _local1[_local6][(_local7 * 2)]; _local9 = _local1[_local6][((_local7 * 2) + 1)]; if (_local8 == 1){ Box2d.setupGrabbedItem("woodBlockEnemy", 10405, 0.5, 0, "position", ((_local7 * 28) + _local5), (_local2 - (_local4 * _local3)), _local9); } else { if (_local8 == 2){ Box2d.setupGrabbedItem("woodBad", 10405, 0.5, 0, "position", ((_local7 * 28) + _local5), (_local2 - (_local4 * _local3)), _local9); } else { if (_local8 == 3){ Box2d.setupGrabbedItem("blockEnemy", 10405, 0.5, 0, "position", ((_local7 * 28) + _local5), (_local2 - (_local4 * _local3)), _local9); } else { if (_local9 == 1){ setupBadSoldier(badGuyData1, ((_local7 * 28) + _local5), (_local2 - (_local4 * _local3))); } else { if (_local9 == 2){ setupBadSoldier(badGuyData2, ((_local7 * 28) + _local5), (_local2 - (_local4 * _local3))); } else { if (_local9 == 3){ setupBadSoldier(badGuyData3, ((_local7 * 28) + _local5), (_local2 - (_local4 * _local3))); } else { if (_local9 == 4){ setupBadSoldier(badGuyData4, ((_local7 * 28) + _local5), (_local2 - (_local4 * _local3))); } else { if (_local9 == 5){ setupBadSoldier(badGuyData5, ((_local7 * 28) + _local5), (_local2 - (_local4 * _local3))); } else { if (_local9 == 7){ setupBadSoldier(badGuyData7, ((_local7 * 28) + _local5), (_local2 - (_local4 * _local3))); }; }; }; }; }; }; }; }; }; _local7++; }; _local4++; _local6--; }; } public function mainLoop(){ var _local1:int; var _local2:*; var _local3:Number; var _local4:Number; var _local5:Number; Box2d.runBox2d(); toBeDestroyed(); doMoneyIncrease(); checkPanel(); Sounds.mainLoop(); _local1 = 0; while (_local1 < bouldersArray.length) { bouldersArray[_local1].mainLoop(); _local1++; }; if (badKingMc != null){ badKingMc.mainLoop(); }; if (goodKingMc != null){ goodKingMc.mainLoop(); }; _local1 = 0; while (_local1 < badGuysArray.length) { badGuysArray[_local1].mainLoop(); _local1++; }; _local1 = 0; while (_local1 < goodGuysArray.length) { goodGuysArray[_local1].mainLoop(); _local1++; }; _local1 = 0; while (_local1 < missilesArray.length) { missilesArray[_local1].mainLoop(); _local1++; }; if (frozenArray.length > 0){ doFrozen(); }; _local1 = (missilesArray.length - 1); while (_local1 >= 0) { if (missilesArray[_local1].dead == true){ missilesArray.splice(_local1, 1); }; _local1--; }; _local1 = 0; while (_local1 < explosionsArray.length) { explosionsArray[_local1].mainLoop(); _local1++; }; _local2 = 0; while (_local2 < particlesArray.length) { particlesArray[_local2].mainLoop(); _local2++; }; runWave(); levelTime++; setScore(); if (cannonMove == "up"){ cannonUp(); } else { if (cannonMove == "down"){ cannonDown(); }; }; if (zoomScreen == "in"){ inGameGraphicsMc.x = -(350); inGameGraphicsMc.y = -270; inGameZoomMc.x = 350; inGameZoomMc.y = 270; _local3 = zoomSpeed; _local4 = (inGameZoomMc.scaleX + _local3); if (_local4 > scaleLarge){ _local3 = (_local4 - scaleLarge); _local3 = (zoomSpeed - _local3); }; inGameZoomMc.scaleX = (inGameZoomMc.scaleY = (inGameZoomMc.scaleY + _local3)); zoomSpeed = 0.1; zoomScreen = ""; setupZoomBtns(); } else { if (zoomScreen == "out"){ inGameGraphicsMc.x = -(350); inGameGraphicsMc.y = -270; inGameZoomMc.x = 350; inGameZoomMc.y = 270; _local3 = zoomSpeed; _local4 = (inGameZoomMc.scaleX - _local3); if (_local4 < scaleSmall){ _local3 = (scaleSmall - _local4); _local3 = (zoomSpeed - _local3); }; inGameZoomMc.scaleX = (inGameZoomMc.scaleY = (inGameZoomMc.scaleY - _local3)); zoomSpeed = 0.1; zoomScreen = ""; setupZoomBtns(); } else { if (zoomScreen == "allIn"){ inGameGraphicsMc.x = -(350); inGameGraphicsMc.y = -270; inGameZoomMc.x = 350; inGameZoomMc.y = 270; inGameZoomMc.scaleX = (inGameZoomMc.scaleY = scaleLarge); zoomScreen = ""; setupZoomBtns(); } else { if (zoomScreen == "allOut"){ inGameGraphicsMc.x = -(350); inGameGraphicsMc.y = -270; inGameZoomMc.x = 350; inGameZoomMc.y = 270; inGameZoomMc.scaleX = (inGameZoomMc.scaleY = scaleSmall); zoomScreen = ""; setupZoomBtns(); } else { zoomSpeed = 0.1; }; }; }; }; if (scrollScreen == "left"){ scrollvx = (scrollvx - 8); _local5 = -(maxScrollSpeed); if (scrollvx < _local5){ scrollvx = _local5; }; scrollBackLeft(); } else { if (scrollScreen == "right"){ scrollvx = (scrollvx + 8); if (scrollvx > maxScrollSpeed){ scrollvx = maxScrollSpeed; }; scrollBackRight(); } else { if (rt.keyPressDown == false){ if (scrollvx > 0){ scrollvx = (scrollvx - 2); if (scrollvx < 1){ scrollvx = 0; } else { scrollBackRight(); }; } else { if (scrollvx < 0){ scrollvx = (scrollvx + 2); if (scrollvx > -1){ scrollvx = 0; } else { scrollBackLeft(); }; }; }; }; }; }; } public function gameOver(_arg1){ Sounds.stopAllMySounds(); selectionBoxOff(); if (_arg1 == "game_over"){ rt.gameState = 5; Sounds.playSoundFx("gameOverFx", 1, 0, 1); increaseScore(money); gameOverMsgMc = new GameOverMsgAnim(this); inGameMsgsMc.addChild(gameOverMsgMc); gameOverMsgMc.play(); gameOverMsgMc.x = (movieWidth / 2); gameOverMsgMc.y = (movieHeight / 2); } else { Sounds.playSoundFx("levelCompleteFx", 1, 0, 1); increaseScore(money); rt.gameState = 5; levelCompleteMsg = new GameLevelComplete(this); inGameMsgsMc.addChild(levelCompleteMsg); levelCompleteMsg.x = (movieWidth / 2); levelCompleteMsg.y = ((movieHeight / 2) - 60); }; } } }//package classesAS3
Section 97
//GameGoodGuy (classesAS3.GameGoodGuy) package classesAS3 { import flash.display.*; import Box2D.Common.Math.*; import flash.media.*; import Box2D.Collision.Shapes.*; import flash.filters.*; public class GameGoodGuy { var xVel:Number;// = 0 var myDamageDelay:Number; var hitVel; var yPos:Number;// = 0 var inToGround:Number; var myOldAnimationState:Number; var numberOfMissiles;// = 0 public var soldierState:int; var myDamage:Number; var range:Number; var energyMc:MovieClip; var rt:Object; var myScore:Number; var speed:Number;// = 0 var gravity:Number; var delayToMove:Number; var myName:String; var projectileMc:Object; var speedOld:Number; var energyBarMc:GameEnergyBar; var dead:Boolean; var glowFilter:GlowFilter; var yVel:Number;// = 0 var distanceArray:Array; var knightPower:Boolean; var myParent:Object; var mC:Object; var animMc:Object; var energy:Number;// = 0 var myFireDelay:Number; var energyBarOn:Number; var Useful:GameUseful; var energyStart:Number;// = 0 var xPos:Number;// = 0 var headHitBlock:Object; var xOrigin:Number;// = 0 var missileName:String; var delayToFireMissile:Number;// = 1 var targetX:Number; var targetY:Number; public var myCurrentSound:SoundChannel; var filterDelay:Number; var myRange:Number; var xDir:Number; var collisionCheck:Number; var yOrigin:Number;// = 0 public static const SOLDIER_STATE_DEFEND:int = 1; public static const SOLDIER_STATE_FALLING:int = 4; public static const SOLDIER_E_MOVE:int = 5; public static const SOLDIER_STATE_RETREAT:int = 3; public static const SOLDIER_E_STAND:int = 0; public static const SOLDIER_STATE_ATTACK:int = 0; public static const SOLDIER_E_BUILD:int = 2; public static const SOLDIER_STATE_MOVE:int = 5; public static const SOLDIER_STATE_FIGHTING:int = 2; public function GameGoodGuy(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8){ var _local9:Number; xOrigin = 0; yOrigin = 0; xPos = 0; yPos = 0; xVel = 0; yVel = 0; speed = 0; energyStart = 0; energy = 0; delayToFireMissile = 1; numberOfMissiles = 0; super(); mC = _arg4; animMc = _arg4.soldier; mC.myObject = this; rt = _arg1; myDamage = _arg8; if (mC.myType == "archer"){ myFireDelay = 30; } else { myFireDelay = 100; }; Useful = _arg5; _local9 = Useful.RandomNumber(1, 10); _local9 = (_local9 - 10); myRange = _arg6; dead = false; inToGround = 0; xOrigin = _arg2; yOrigin = _arg3; xPos = 0; yPos = 0; xVel = 0; yVel = 0; myParent = mC.myParent; hitVel = 0; energyBarOn = 0; gravity = 0.1; _local9 = Useful.RandomNumber(1, 10); _local9 = (_local9 / 50); speed = (_arg7 + _local9); speedOld = (_arg7 + _local9); xDir = 1; mC.scaleX = -1; distanceArray = new Array(); glowFilter = new GlowFilter(0xFFFFFF, 1, 3, 3, 3, 1); numberOfMissiles = 0; energyStart = 100; energy = energyStart; myDamageDelay = 8; soldierState = SOLDIER_STATE_ATTACK; filterDelay = 1; knightPower = false; if (mC.myType == "knight2"){ knightPower = true; mC.myType = "knight"; } else { if (mC.myType == "knight3"){ knightPower = true; mC.myType = "knight"; } else { if (mC.myType == "knight4"){ knightPower = true; mC.myType = "knight"; }; }; }; myName = mC.myType; collisionCheck = 0; delayToMove = 5; targetX = mC.x; } function applyGravity(){ yVel = (yVel + gravity); } function updatePosition(){ var _local1:b2Vec2; if (mC.myBodyDef.IsSleeping()){ mC.myBodyDef.WakeUp(); }; xVel = (xDir * speed); _local1 = mC.myBodyDef.GetLinearVelocity(); _local1.x = xVel; mC.myBodyDef.SetLinearVelocity(_local1); } function findEnemy(){ var _local1:Object; var _local2:int; var _local3:Object; var _local4:MovieClip; var _local5:Number; var _local6:Number; var _local7:Number; distanceArray = new Array(); _local1 = new Object(); _local2 = 0; while (_local2 < rt.inGameEnemyMc.numChildren) { _local3 = new Object(); _local4 = rt.inGameEnemyMc.getChildAt(_local2); if (rt.inGameEnemyMc.getChildAt(_local2).myType != "kingBad1"){ if (rt.inGameEnemyMc.getChildAt(_local2).myType != "smoke"){ if (rt.inGameEnemyMc.getChildAt(_local2).buildingBit == false){ _local3.distSprite = rt.inGameEnemyMc.getChildAt(_local2); if (mC.myType != "archer"){ if (mC.myType != "wizard"){ _local5 = (mC.y - _local3.distSprite.y); if (_local5 < 0){ _local5 = ((_local5 - _local5) - _local5); }; if (_local5 < 20){ _local3.dist = Useful.getDistance(mC.x, mC.y, _local3.distSprite.x, _local3.distSprite.y); distanceArray.push(_local3); }; } else { _local3.dist = Useful.getDistance(mC.x, mC.y, _local3.distSprite.x, _local3.distSprite.y); distanceArray.push(_local3); }; } else { _local3.dist = Useful.getDistance(mC.x, mC.y, _local3.distSprite.x, _local3.distSprite.y); distanceArray.push(_local3); }; }; }; } else { _local1.distSprite = rt.inGameEnemyMc.getChildAt(_local2); _local1.dist = Useful.getDistance(mC.x, mC.y, _local1.distSprite.x, _local1.distSprite.y); }; _local2++; }; distanceArray.sortOn("dist", Array.NUMERIC); if (_local1.dist < 70){ distanceArray.splice(0, 0, _local1); } else { if (distanceArray.length > 0){ _local6 = (375 - mC.y); _local6 = int((_local6 / 5)); _local7 = (myRange + _local6); if (distanceArray[0].dist > _local7){ if (mC.myType != "archer"){ distanceArray.splice(0, 0, _local1); }; } else { distanceArray.push(_local1); }; } else { if (mC.myType != "archer"){ distanceArray.splice(0, 0, _local1); }; }; }; } function checkForFire(){ var _local1:*; var _local2:Object; var _local3:Object; delayToFireMissile--; if (delayToFireMissile == 0){ _local1 = myFireDelay; delayToFireMissile = _local1; animMc.gotoAndStop("attack"); _local2 = distanceArray[0].distSprite; if (_local2.x > mC.x){ xDir = 1; mC.scaleX = -1; } else { xDir = -1; mC.scaleX = 1; }; if (mC.myType == "wizard"){ projectileMc = new GameIceBolt(); } else { projectileMc = new GameArrow(); }; rt.inGameMissilesMc.addChild(projectileMc); _local3 = Useful.pointTowards(_local2.x, _local2.y, mC.x, mC.y); rt.missilesArray.push(new GameMissile(projectileMc, rt, mC.x, mC.y, "", Useful, _local3, 16, this, myDamage)); }; } function remove(){ var _local1:int; var _local2:Number; var _local3:*; if (myCurrentSound != null){ myCurrentSound.stop(); }; _local1 = 0; while (_local1 < mC.myParent.numChildren) { if (mC.myParent.getChildAt(_local1) == mC){ mC.myParent.removeChild(mC); mC.stop(); }; _local1++; }; _local2 = 0; _local3 = 0; while (_local3 < rt.goodGuysArray.length) { if (this == rt.goodGuysArray[_local3]){ _local2 = _local3; }; _local3++; }; rt.goodGuysArray.splice(_local2, 1); } function decreaseEnergy(_arg1){ var _local2:Number; myDamageDelay--; if (myDamageDelay == 0){ myDamageDelay = 8; if (energy > 0){ if (filterDelay > 1){ _arg1 = int((_arg1 / 2)); }; if (knightPower == true){ _arg1 = (_arg1 - 3); if (_arg1 < 1){ _arg1 = 1; }; }; energy = (energy - _arg1); if (energyBarOn == 0){ energyBarOn = 1; energyBarMc = new GameEnergyBar(this); mC.addChild(energyBarMc); }; energyBarMc.x = 0; energyBarMc.y = -35; _local2 = (energy / 10); energyBarMc.bar.bar.y = int((10 - _local2)); if (energy <= 0){ inToGround = 0; dead = true; if (myCurrentSound != null){ myCurrentSound.stop(); }; myCurrentSound = rt.Sounds.playSoundFx("die_v1_Fx", 1, 0, 1); animMc.gotoAndStop("die"); rt.Box2d.m_world.DestroyBody(mC.myBodyDef); return (true); }; updatePosition(); }; }; return (false); } function mainLoop(){ var _local1:Number; var _local2:b2Vec2; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:b2Shape; if (dead == false){ if (filterDelay > 1){ filterDelay--; if (filterDelay == 1){ mC.filters = []; rt.upgrade2 = false; }; }; _local1 = 1; if (knightPower == true){ _local1 = 2; }; if (mC.myType == "archer"){ if (rt.Box2d.bodyGrabbed != mC.myBodyDef){ if (rt.inGameEnemyMc.numChildren > 0){ findEnemy(); if (distanceArray.length > 0){ _local3 = (375 - mC.y); _local3 = int((_local3 / 5)); _local4 = (myRange + _local3); if (distanceArray[0].dist < _local4){ _local5 = 0; if (distanceArray[0].distSprite.y < mC.y){ _local5 = (mC.y - distanceArray[0].distSprite.y); } else { _local5 = (distanceArray[0].distSprite.y - mC.y); }; if (_local5 < 20){ if (mC.x > distanceArray[0].distSprite.x){ xDir = -1; mC.scaleX = 1; } else { xDir = 1; mC.scaleX = -1; }; }; checkForFire(); }; }; }; }; _local2 = mC.myBodyDef.GetLinearVelocity(); _local2.x = 0; mC.myBodyDef.SetLinearVelocity(_local2); } else { if (mC.myType == "wizard"){ if (rt.Box2d.bodyGrabbed != mC.myBodyDef){ if (rt.inGameEnemyMc.numChildren > 0){ findEnemy(); if (distanceArray.length > 0){ _local3 = (375 - mC.y); _local3 = int((_local3 / 5)); _local4 = (myRange + _local3); if (distanceArray[0].dist < _local4){ _local5 = 0; if (distanceArray[0].distSprite.y < mC.y){ _local5 = (mC.y - distanceArray[0].distSprite.y); } else { _local5 = (distanceArray[0].distSprite.y - mC.y); }; if (_local5 < 20){ if (mC.x > distanceArray[0].distSprite.x){ xDir = -1; mC.scaleX = 1; } else { xDir = 1; mC.scaleX = -1; }; }; checkForFire(); }; }; }; }; _local2 = mC.myBodyDef.GetLinearVelocity(); _local2.x = 0; mC.myBodyDef.SetLinearVelocity(_local2); } else { if (rt.Box2d.bodyGrabbed != mC.myBodyDef){ if (mC.collisionWithW != null){ if (mC.collisionWithW.myType == "woodBad"){ if (mC.collisionWithW.energy > 0){ if (soldierState != SOLDIER_STATE_FIGHTING){ animMc.gotoAndStop("attack"); soldierState = SOLDIER_STATE_FIGHTING; }; if (mC.collisionWithW.decreaseEnergy((_local1 + 4))){ soldierState = SOLDIER_STATE_ATTACK; mC.collisionWithW = null; }; } else { soldierState = SOLDIER_STATE_ATTACK; mC.collisionWithW = null; }; }; }; if (mC.collisionWith != null){ _local1 = 1; if (knightPower == true){ _local1 = 2; }; if (mC.collisionWith.collisionWith == null){ mC.collisionWith.collisionWith = mC; }; if (mC.collisionWith.myType == "blockEnemy"){ if (mC.collisionWith.energy > 0){ _local6 = (mC.y - mC.collisionWith.y); if (_local6 > 10){ if (headHitBlock != mC.collisionWith){ mC.collisionWith.decreaseEnergy(100); collisionCheck = 10; decreaseEnergy(10); }; }; if (soldierState != SOLDIER_STATE_FIGHTING){ animMc.gotoAndStop("attack"); soldierState = SOLDIER_STATE_FIGHTING; }; if (mC.collisionWith.decreaseEnergy((_local1 / 2))){ soldierState = SOLDIER_STATE_ATTACK; mC.collisionWith = null; }; } else { soldierState = SOLDIER_STATE_ATTACK; mC.collisionWith = null; }; } else { if (mC.collisionWith.myType == "block"){ _local6 = (mC.collisionWith.y - mC.y); if (_local6 > 10){ soldierState = SOLDIER_STATE_ATTACK; mC.collisionWith = null; }; if (_local6 < -10){ mC.collisionWith.decreaseEnergy(100); } else { soldierState = SOLDIER_STATE_DEFEND; }; } else { if (mC.collisionWith.myType == "woodBlockEnemy"){ if (mC.collisionWith.energy > 0){ if (soldierState != SOLDIER_STATE_FIGHTING){ animMc.gotoAndStop("attack"); soldierState = SOLDIER_STATE_FIGHTING; }; if (mC.collisionWith.decreaseEnergy((_local1 + 4))){ soldierState = SOLDIER_STATE_ATTACK; mC.collisionWith = null; }; } else { soldierState = SOLDIER_STATE_ATTACK; mC.collisionWith = null; }; }; }; }; if (soldierState == SOLDIER_STATE_FIGHTING){ if (mC.x > mC.collisionWith.x){ xDir = -1; mC.scaleX = 1; } else { xDir = 1; mC.scaleX = -1; }; }; }; if (mC.collisionWithS != null){ if (mC.collisionWithS.currentFrame != 5){ if (mC.collisionWithS.collisionWithS == null){ mC.collisionWithS.collisionWithS = mC; }; _local1 = 1; if (knightPower == true){ _local1 = 2; }; _local7 = Useful.getDistance(mC.x, mC.y, mC.collisionWithS.x, mC.collisionWithS.y); if (_local7 > 40){ soldierState = SOLDIER_STATE_ATTACK; } else { if (mC.collisionWithS.myType == "badKnight1"){ if (soldierState != SOLDIER_STATE_FIGHTING){ myCurrentSound = rt.Sounds.playSoundFx("swordFightFx", 1, 0, 10); animMc.gotoAndStop("attack"); soldierState = SOLDIER_STATE_FIGHTING; }; if (mC.collisionWithS.myObject.decreaseEnergy(_local1)){ soldierState = SOLDIER_STATE_ATTACK; if (myCurrentSound != null){ myCurrentSound.stop(); }; mC.collisionWithS = null; }; } else { if (mC.collisionWithS.myType == "badKnight2"){ if (soldierState != SOLDIER_STATE_FIGHTING){ myCurrentSound = rt.Sounds.playSoundFx("swordFightFx", 1, 0, 10); animMc.gotoAndStop("attack"); soldierState = SOLDIER_STATE_FIGHTING; }; if (mC.collisionWithS.myObject.decreaseEnergy((_local1 + 0.5))){ if (myCurrentSound != null){ myCurrentSound.stop(); }; soldierState = SOLDIER_STATE_ATTACK; mC.collisionWithS = null; }; } else { if (mC.collisionWithS.myType == "badKnight3"){ if (soldierState != SOLDIER_STATE_FIGHTING){ myCurrentSound = rt.Sounds.playSoundFx("swordFightFx", 1, 0, 10); animMc.gotoAndStop("attack"); soldierState = SOLDIER_STATE_FIGHTING; }; if (mC.collisionWithS.myObject.decreaseEnergy((_local1 + 0.5))){ if (myCurrentSound != null){ myCurrentSound.stop(); }; soldierState = SOLDIER_STATE_ATTACK; mC.collisionWithS = null; }; } else { if (mC.collisionWithS.myType == "viking1"){ if (soldierState != SOLDIER_STATE_FIGHTING){ myCurrentSound = rt.Sounds.playSoundFx("swordFightFx", 1, 0, 10); animMc.gotoAndStop("attack"); soldierState = SOLDIER_STATE_FIGHTING; }; if (mC.collisionWithS.myObject.decreaseEnergy((_local1 + 0.5))){ if (myCurrentSound != null){ myCurrentSound.stop(); }; soldierState = SOLDIER_STATE_ATTACK; mC.collisionWithS = null; }; } else { if (mC.collisionWithS.myType == "ram"){ if (soldierState != SOLDIER_STATE_FIGHTING){ myCurrentSound = rt.Sounds.playSoundFx("swordFightFx", 1, 0, 10); animMc.gotoAndStop("attack"); soldierState = SOLDIER_STATE_FIGHTING; }; if (mC.collisionWithS.myObject.decreaseEnergy((_local1 + 0.5))){ if (myCurrentSound != null){ myCurrentSound.stop(); }; soldierState = SOLDIER_STATE_ATTACK; mC.collisionWithS = null; }; } else { if (mC.collisionWithS.myType == "badArcher1"){ if (soldierState != SOLDIER_STATE_FIGHTING){ myCurrentSound = rt.Sounds.playSoundFx("swordFightFx", 1, 0, 10); animMc.gotoAndStop("attack"); soldierState = SOLDIER_STATE_FIGHTING; }; if (mC.collisionWithS.myObject.decreaseEnergy((_local1 + 0.5))){ if (myCurrentSound != null){ myCurrentSound.stop(); }; soldierState = SOLDIER_STATE_ATTACK; mC.collisionWithS = null; }; } else { if (mC.collisionWithS.myType == "badArcher2"){ if (soldierState != SOLDIER_STATE_FIGHTING){ myCurrentSound = rt.Sounds.playSoundFx("swordFightFx", 1, 0, 10); animMc.gotoAndStop("attack"); soldierState = SOLDIER_STATE_FIGHTING; }; if (mC.collisionWithS.myObject.decreaseEnergy((_local1 + 0.5))){ if (myCurrentSound != null){ myCurrentSound.stop(); }; soldierState = SOLDIER_STATE_ATTACK; mC.collisionWithS = null; }; } else { if (mC.collisionWithS.myType == "kingBad1"){ if (soldierState != SOLDIER_STATE_FIGHTING){ myCurrentSound = rt.Sounds.playSoundFx("swordFightFx", 1, 0, 10); animMc.gotoAndStop("attack"); soldierState = SOLDIER_STATE_FIGHTING; }; if (mC.collisionWithS.soldierState != SOLDIER_STATE_FIGHTING){ mC.collisionWithS.gotoAndStop("attack"); mC.collisionWithS.soldierState = SOLDIER_STATE_FIGHTING; }; if (rt.decreaseBadKingEnergy((_local1 + 3), mC.collisionWithS)){ if (myCurrentSound != null){ myCurrentSound.stop(); }; soldierState = SOLDIER_STATE_DEFEND; mC.collisionWithS = null; }; }; }; }; }; }; }; }; }; }; } else { if (myCurrentSound != null){ myCurrentSound.stop(); }; mC.collisionWithS = null; soldierState = SOLDIER_STATE_ATTACK; }; if (soldierState == SOLDIER_STATE_FIGHTING){ if (mC.x > mC.collisionWithS.x){ xDir = -1; mC.scaleX = 1; } else { xDir = 1; mC.scaleX = -1; }; }; }; if (soldierState == SOLDIER_STATE_ATTACK){ if (myCurrentSound != null){ myCurrentSound.stop(); myCurrentSound = null; }; if (rt.inGameEnemyMc.numChildren > 0){ findEnemy(); if (distanceArray.length > 0){ _local4 = myRange; if (mC.x > distanceArray[0].distSprite.x){ xDir = -1; mC.scaleX = 1; } else { xDir = 1; mC.scaleX = -1; }; if (animMc.currentFrame != 2){ animMc.gotoAndStop("run"); speed = speedOld; }; }; updatePosition(); }; }; if (soldierState == SOLDIER_STATE_DEFEND){ speed = 0; if (animMc.currentFrame != 1){ animMc.gotoAndStop(1); }; if (mC.collisionWith != null){ if (mC.collisionWith.myType == "block"){ if (mC.collisionWith.currentFrame != 2){ _local7 = Useful.getDistance(mC.x, mC.y, mC.collisionWith.x, mC.collisionWith.y); if (_local7 > 40){ soldierState = SOLDIER_STATE_ATTACK; mC.collisionWith = null; _local8 = mC.myBodyDef.GetShapeList(); rt.m_world.Refilter(_local8); mC.myBodyDef.WakeUp(); }; } else { soldierState = SOLDIER_STATE_ATTACK; mC.collisionWith = null; _local8 = mC.myBodyDef.GetShapeList(); rt.m_world.Refilter(_local8); mC.myBodyDef.WakeUp(); }; }; }; }; } else { if (animMc.currentFrame != 6){ animMc.gotoAndStop("pickedUp"); }; }; }; }; //unresolved jump }; } } }//package classesAS3
Section 98
//GameHitFloorSmoke (classesAS3.GameHitFloorSmoke) package classesAS3 { import flash.display.*; public class GameHitFloorSmoke extends MovieClip { public var myType:String; public var myObject:Object; public var myShapeDef:Object; public var myParent:Object; public var rt:Object; public var energy:Number; public var filterData:Object; public var myBodyDef:Object; public function GameHitFloorSmoke(_arg1, _arg2, _arg3){ addFrameScript(5, frame6); myObject = _arg3; rt = _arg1; myParent = _arg2; myType = "smoke"; } public function removeMe(){ if (myObject != null){ myObject.mySmoke = null; if (this.parent != null){ myParent.removeChild(this); }; }; } function frame6(){ this.removeMe(); } } }//package classesAS3
Section 99
//GameIntroAnim (classesAS3.GameIntroAnim) package classesAS3 { import flash.display.*; import flash.events.*; import flash.net.*; public class GameIntroAnim extends MovieClip { var rt:Object; public var link_btn3:SimpleButton; public function GameIntroAnim(_arg1){ addFrameScript(0, frame1, 121, frame122); rt = _arg1; this.play(); } public function gotoArc3(_arg1:MouseEvent):void{ navigateToURL(new URLRequest("http://www.arcadebomb.com"), "_blank"); } function frame1(){ link_btn3.addEventListener(MouseEvent.MOUSE_DOWN, gotoArc3, false); } function frame122(){ this.rt.introFinished(); stop(); } } }//package classesAS3
Section 100
//GameKingBad1 (classesAS3.GameKingBad1) package classesAS3 { import flash.display.*; import Box2D.Common.Math.*; import Box2D.Collision.Shapes.*; public class GameKingBad1 extends MovieClip { public var myType:String; public var goodBad:Boolean; public var myObject:Object; public var mySmoke; public var collisionWith:MovieClip; var soldierState:Number; public var collisionWithS:MovieClip; public var noRotation:Boolean; public var myShapeDef:Object; public var myParent:Object; public var rt:Object; public var energy:Number; public var filterData:Object; public var myBodyDef:Object; public var buildingBit:Boolean;// = false public static const SOLDIER_STATE_DEFEND:int = 1; public static const SOLDIER_STATE_ATTACK:int = 0; public static const SOLDIER_STATE_FIGHTING:int = 2; public function GameKingBad1(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6){ buildingBit = false; super(); addFrameScript(0, frame1); rt = _arg1; myBodyDef = _arg2; myShapeDef = _arg3; myType = _arg4; myParent = _arg5; mySmoke = null; goodBad = _arg6; energy = 100; noRotation = true; } function destroyMe(){ rt.m_world.DestroyBody(myBodyDef); myBodyDef = null; removeMe(); } public function removeMe(){ if (myParent != null){ myParent.removeChild(this); this.stop(); } else { if (this.parent != null){ this.parent.removeChild(this); this.stop(); }; }; } function frame1(){ stop(); } public function checkOffScreen(){ if (this.x > 1700){ destroyMe(); } else { if (this.x < -50){ destroyMe(); }; }; if (this.y > 800){ destroyMe(); }; } public function decreaseEnergy(_arg1){ rt.rt.decreaseBadKingEnergy(_arg1, this); } public function setupPuffSmoke(){ if (mySmoke == null){ mySmoke = new GameHitFloorSmoke(rt, myParent, this); mySmoke.x = this.x; mySmoke.y = this.y; myParent.addChild(mySmoke); }; } public function mainLoop(){ var _local1:b2Vec2; var _local2:Number; if (rt.rt.rt.gameState == 12){ collisionWithS = null; if (this.x > 1420){ } else { scaleX = -1; _local1 = myBodyDef.GetLinearVelocity(); _local1.x = 4; myBodyDef.SetLinearVelocity(_local1); }; } else { if (collisionWithS != null){ if (collisionWithS.currentFrame != 5){ _local2 = rt.Useful.getDistance(x, y, collisionWithS.x, collisionWithS.y); if (_local2 > 40){ gotoAndStop("stand"); } else { if (collisionWithS.myType == "knight"){ if (soldierState != SOLDIER_STATE_FIGHTING){ gotoAndStop("attack"); soldierState = SOLDIER_STATE_FIGHTING; }; if (collisionWithS.myObject.decreaseEnergy(5)){ soldierState = SOLDIER_STATE_ATTACK; collisionWithS = null; gotoAndStop("stand"); }; }; if (collisionWithS != null){ if (x > collisionWithS.x){ scaleX = 1; } else { scaleX = -1; }; if (collisionWithS.myObject != null){ if (collisionWithS.myObject.energy <= 0){ collisionWithS = null; soldierState = SOLDIER_STATE_DEFEND; gotoAndStop("stand"); }; }; }; }; } else { collisionWithS = null; soldierState = SOLDIER_STATE_DEFEND; gotoAndStop("stand"); }; } else { soldierState = SOLDIER_STATE_DEFEND; gotoAndStop("stand"); }; }; } } }//package classesAS3
Section 101
//GameKingBad2 (classesAS3.GameKingBad2) package classesAS3 { import flash.display.*; import Box2D.Common.Math.*; import Box2D.Collision.Shapes.*; public class GameKingBad2 extends MovieClip { public var myType:String; public var goodBad:Boolean; public var myObject:Object; public var mySmoke; public var collisionWith:MovieClip; var soldierState:Number; public var collisionWithS:MovieClip; public var noRotation:Boolean; public var myShapeDef:Object; public var myParent:Object; public var rt:Object; public var energy:Number; public var filterData:Object; public var myBodyDef:Object; public var buildingBit:Boolean;// = false public static const SOLDIER_STATE_DEFEND:int = 1; public static const SOLDIER_STATE_ATTACK:int = 0; public static const SOLDIER_STATE_FIGHTING:int = 2; public function GameKingBad2(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6){ buildingBit = false; super(); addFrameScript(0, frame1); rt = _arg1; myBodyDef = _arg2; myShapeDef = _arg3; myType = _arg4; myParent = _arg5; mySmoke = null; goodBad = _arg6; energy = 100; noRotation = true; } function destroyMe(){ rt.m_world.DestroyBody(myBodyDef); removeMe(); } public function removeMe(){ myParent.removeChild(this); this.stop(); } function frame1(){ stop(); } public function checkOffScreen(){ if (this.x > 1700){ destroyMe(); } else { if (this.x < -50){ destroyMe(); }; }; if (this.y > 800){ destroyMe(); }; } public function decreaseEnergy(_arg1){ rt.rt.decreaseBadKingEnergy(_arg1, this); } public function setupPuffSmoke(){ if (mySmoke == null){ mySmoke = new GameHitFloorSmoke(rt, myParent, this); mySmoke.x = this.x; mySmoke.y = this.y; myParent.addChild(mySmoke); }; } public function mainLoop(){ var _local1:b2Vec2; var _local2:Number; if (rt.rt.rt.gameState == 12){ collisionWithS = null; if (this.x > 1420){ } else { scaleX = -1; _local1 = myBodyDef.GetLinearVelocity(); _local1.x = 4; myBodyDef.SetLinearVelocity(_local1); }; } else { if (collisionWithS != null){ if (collisionWithS.currentFrame != 5){ _local2 = rt.Useful.getDistance(x, y, collisionWithS.x, collisionWithS.y); if (_local2 > 40){ gotoAndStop("stand"); } else { if (collisionWithS.myType == "knight"){ if (soldierState != SOLDIER_STATE_FIGHTING){ gotoAndStop("attack"); soldierState = SOLDIER_STATE_FIGHTING; }; if (collisionWithS.myObject.decreaseEnergy(5)){ soldierState = SOLDIER_STATE_ATTACK; collisionWithS = null; gotoAndStop("stand"); }; }; if (collisionWithS != null){ if (x > collisionWithS.x){ scaleX = 1; } else { scaleX = -1; }; }; }; } else { collisionWithS = null; soldierState = SOLDIER_STATE_ATTACK; }; }; }; } } }//package classesAS3
Section 102
//GameKingBad3 (classesAS3.GameKingBad3) package classesAS3 { import flash.display.*; import Box2D.Common.Math.*; import Box2D.Collision.Shapes.*; public class GameKingBad3 extends MovieClip { public var myType:String; public var goodBad:Boolean; public var myObject:Object; public var mySmoke; public var collisionWith:MovieClip; var soldierState:Number; public var collisionWithS:MovieClip; public var noRotation:Boolean; public var myShapeDef:Object; public var myParent:Object; public var rt:Object; public var energy:Number; public var filterData:Object; public var myBodyDef:Object; public var buildingBit:Boolean;// = false public static const SOLDIER_STATE_DEFEND:int = 1; public static const SOLDIER_STATE_ATTACK:int = 0; public static const SOLDIER_STATE_FIGHTING:int = 2; public function GameKingBad3(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6){ buildingBit = false; super(); addFrameScript(0, frame1); rt = _arg1; myBodyDef = _arg2; myShapeDef = _arg3; myType = _arg4; myParent = _arg5; mySmoke = null; goodBad = _arg6; energy = 100; noRotation = true; } function destroyMe(){ rt.m_world.DestroyBody(myBodyDef); removeMe(); } public function removeMe(){ myParent.removeChild(this); this.stop(); } function frame1(){ stop(); } public function checkOffScreen(){ if (this.x > 1700){ destroyMe(); } else { if (this.x < -50){ destroyMe(); }; }; if (this.y > 800){ destroyMe(); }; } public function decreaseEnergy(_arg1){ rt.rt.decreaseBadKingEnergy(_arg1, this); } public function setupPuffSmoke(){ if (mySmoke == null){ mySmoke = new GameHitFloorSmoke(rt, myParent, this); mySmoke.x = this.x; mySmoke.y = this.y; myParent.addChild(mySmoke); }; } public function mainLoop(){ var _local1:b2Vec2; var _local2:Number; if (rt.rt.rt.gameState == 12){ collisionWithS = null; if (this.x > 1420){ } else { scaleX = -1; _local1 = myBodyDef.GetLinearVelocity(); _local1.x = 4; myBodyDef.SetLinearVelocity(_local1); }; } else { if (collisionWithS != null){ if (collisionWithS.currentFrame != 5){ _local2 = rt.Useful.getDistance(x, y, collisionWithS.x, collisionWithS.y); if (_local2 > 40){ gotoAndStop("stand"); } else { if (collisionWithS.myType == "knight"){ if (soldierState != SOLDIER_STATE_FIGHTING){ gotoAndStop("attack"); soldierState = SOLDIER_STATE_FIGHTING; }; if (collisionWithS.myObject.decreaseEnergy(5)){ soldierState = SOLDIER_STATE_ATTACK; collisionWithS = null; gotoAndStop("stand"); }; }; if (collisionWithS != null){ if (x > collisionWithS.x){ scaleX = 1; } else { scaleX = -1; }; }; }; } else { collisionWithS = null; soldierState = SOLDIER_STATE_ATTACK; }; }; }; } } }//package classesAS3
Section 103
//GameKingBad4 (classesAS3.GameKingBad4) package classesAS3 { import flash.display.*; import Box2D.Common.Math.*; import Box2D.Collision.Shapes.*; public class GameKingBad4 extends MovieClip { public var myType:String; public var goodBad:Boolean; public var myObject:Object; public var mySmoke; public var collisionWith:MovieClip; var soldierState:Number; public var collisionWithS:MovieClip; public var noRotation:Boolean; public var myShapeDef:Object; public var myParent:Object; public var rt:Object; public var energy:Number; public var filterData:Object; public var myBodyDef:Object; public var buildingBit:Boolean;// = false public static const SOLDIER_STATE_DEFEND:int = 1; public static const SOLDIER_STATE_ATTACK:int = 0; public static const SOLDIER_STATE_FIGHTING:int = 2; public function GameKingBad4(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6){ buildingBit = false; super(); addFrameScript(0, frame1); rt = _arg1; myBodyDef = _arg2; myShapeDef = _arg3; myType = _arg4; myParent = _arg5; mySmoke = null; goodBad = _arg6; energy = 100; noRotation = true; } function destroyMe(){ rt.m_world.DestroyBody(myBodyDef); removeMe(); } public function removeMe(){ myParent.removeChild(this); this.stop(); } function frame1(){ stop(); } public function checkOffScreen(){ if (this.x > 1700){ destroyMe(); } else { if (this.x < -50){ destroyMe(); }; }; if (this.y > 800){ destroyMe(); }; } public function decreaseEnergy(_arg1){ rt.rt.decreaseBadKingEnergy(_arg1, this); } public function setupPuffSmoke(){ if (mySmoke == null){ mySmoke = new GameHitFloorSmoke(rt, myParent, this); mySmoke.x = this.x; mySmoke.y = this.y; myParent.addChild(mySmoke); }; } public function mainLoop(){ var _local1:b2Vec2; var _local2:Number; if (rt.rt.rt.gameState == 12){ collisionWithS = null; if (this.x > 1420){ } else { scaleX = -1; _local1 = myBodyDef.GetLinearVelocity(); _local1.x = 4; myBodyDef.SetLinearVelocity(_local1); }; } else { if (collisionWithS != null){ if (collisionWithS.currentFrame != 5){ _local2 = rt.Useful.getDistance(x, y, collisionWithS.x, collisionWithS.y); if (_local2 > 40){ gotoAndStop("stand"); } else { if (collisionWithS.myType == "knight"){ if (soldierState != SOLDIER_STATE_FIGHTING){ gotoAndStop("attack"); soldierState = SOLDIER_STATE_FIGHTING; }; if (collisionWithS.myObject.decreaseEnergy(5)){ soldierState = SOLDIER_STATE_ATTACK; collisionWithS = null; gotoAndStop("stand"); }; }; if (collisionWithS != null){ if (x > collisionWithS.x){ scaleX = 1; } else { scaleX = -1; }; }; }; } else { collisionWithS = null; soldierState = SOLDIER_STATE_ATTACK; }; }; }; } } }//package classesAS3
Section 104
//GameKingBad5 (classesAS3.GameKingBad5) package classesAS3 { import flash.display.*; import Box2D.Common.Math.*; import Box2D.Collision.Shapes.*; public class GameKingBad5 extends MovieClip { public var myType:String; public var goodBad:Boolean; public var myObject:Object; public var mySmoke; public var collisionWith:MovieClip; var soldierState:Number; public var collisionWithS:MovieClip; public var noRotation:Boolean; public var myShapeDef:Object; public var myParent:Object; public var rt:Object; public var energy:Number; public var filterData:Object; public var myBodyDef:Object; public var buildingBit:Boolean;// = false public static const SOLDIER_STATE_DEFEND:int = 1; public static const SOLDIER_STATE_ATTACK:int = 0; public static const SOLDIER_STATE_FIGHTING:int = 2; public function GameKingBad5(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6){ buildingBit = false; super(); addFrameScript(0, frame1); rt = _arg1; myBodyDef = _arg2; myShapeDef = _arg3; myType = _arg4; myParent = _arg5; mySmoke = null; goodBad = _arg6; energy = 100; noRotation = true; } function destroyMe(){ rt.m_world.DestroyBody(myBodyDef); removeMe(); } public function removeMe(){ myParent.removeChild(this); this.stop(); } function frame1(){ stop(); } public function checkOffScreen(){ if (this.x > 1700){ destroyMe(); } else { if (this.x < -50){ destroyMe(); }; }; if (this.y > 800){ destroyMe(); }; } public function decreaseEnergy(_arg1){ rt.rt.decreaseBadKingEnergy(_arg1, this); } public function setupPuffSmoke(){ if (mySmoke == null){ mySmoke = new GameHitFloorSmoke(rt, myParent, this); mySmoke.x = this.x; mySmoke.y = this.y; myParent.addChild(mySmoke); }; } public function mainLoop(){ var _local1:b2Vec2; var _local2:Number; if (rt.rt.rt.gameState == 12){ collisionWithS = null; if (this.x > 1420){ } else { scaleX = -1; _local1 = myBodyDef.GetLinearVelocity(); _local1.x = 4; myBodyDef.SetLinearVelocity(_local1); }; } else { if (collisionWithS != null){ if (collisionWithS.currentFrame != 5){ _local2 = rt.Useful.getDistance(x, y, collisionWithS.x, collisionWithS.y); if (_local2 > 40){ gotoAndStop("stand"); } else { if (collisionWithS.myType == "knight"){ if (soldierState != SOLDIER_STATE_FIGHTING){ gotoAndStop("attack"); soldierState = SOLDIER_STATE_FIGHTING; }; if (collisionWithS.myObject.decreaseEnergy(5)){ soldierState = SOLDIER_STATE_ATTACK; collisionWithS = null; gotoAndStop("stand"); }; }; if (collisionWithS != null){ if (x > collisionWithS.x){ scaleX = 1; } else { scaleX = -1; }; }; }; } else { collisionWithS = null; soldierState = SOLDIER_STATE_ATTACK; }; }; }; } } }//package classesAS3
Section 105
//GameKingBad6 (classesAS3.GameKingBad6) package classesAS3 { import flash.display.*; import Box2D.Common.Math.*; import Box2D.Collision.Shapes.*; public class GameKingBad6 extends MovieClip { public var myType:String; public var goodBad:Boolean; public var myObject:Object; public var mySmoke; public var collisionWith:MovieClip; var soldierState:Number; public var collisionWithS:MovieClip; public var noRotation:Boolean; public var myShapeDef:Object; public var myParent:Object; public var rt:Object; public var energy:Number; public var filterData:Object; public var myBodyDef:Object; public var buildingBit:Boolean;// = false public static const SOLDIER_STATE_DEFEND:int = 1; public static const SOLDIER_STATE_ATTACK:int = 0; public static const SOLDIER_STATE_FIGHTING:int = 2; public function GameKingBad6(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6){ buildingBit = false; super(); addFrameScript(0, frame1); rt = _arg1; myBodyDef = _arg2; myShapeDef = _arg3; myType = _arg4; myParent = _arg5; mySmoke = null; goodBad = _arg6; energy = 100; noRotation = true; } function destroyMe(){ rt.m_world.DestroyBody(myBodyDef); removeMe(); } public function removeMe(){ myParent.removeChild(this); this.stop(); } function frame1(){ stop(); } public function checkOffScreen(){ if (this.x > 1700){ destroyMe(); } else { if (this.x < -50){ destroyMe(); }; }; if (this.y > 800){ destroyMe(); }; } public function decreaseEnergy(_arg1){ rt.rt.decreaseBadKingEnergy(_arg1, this); } public function setupPuffSmoke(){ if (mySmoke == null){ mySmoke = new GameHitFloorSmoke(rt, myParent, this); mySmoke.x = this.x; mySmoke.y = this.y; myParent.addChild(mySmoke); }; } public function mainLoop(){ var _local1:b2Vec2; var _local2:Number; if (rt.rt.rt.gameState == 12){ collisionWithS = null; if (this.x > 1420){ } else { scaleX = -1; _local1 = myBodyDef.GetLinearVelocity(); _local1.x = 4; myBodyDef.SetLinearVelocity(_local1); }; } else { if (collisionWithS != null){ if (collisionWithS.currentFrame != 5){ _local2 = rt.Useful.getDistance(x, y, collisionWithS.x, collisionWithS.y); if (_local2 > 40){ gotoAndStop("stand"); } else { if (collisionWithS.myType == "knight"){ if (soldierState != SOLDIER_STATE_FIGHTING){ gotoAndStop("attack"); soldierState = SOLDIER_STATE_FIGHTING; }; if (collisionWithS.myObject.decreaseEnergy(5)){ soldierState = SOLDIER_STATE_ATTACK; collisionWithS = null; gotoAndStop("stand"); }; }; if (collisionWithS != null){ if (x > collisionWithS.x){ scaleX = 1; } else { scaleX = -1; }; }; }; } else { collisionWithS = null; soldierState = SOLDIER_STATE_ATTACK; }; }; }; } } }//package classesAS3
Section 106
//GameKingBad7 (classesAS3.GameKingBad7) package classesAS3 { import flash.display.*; import Box2D.Common.Math.*; import Box2D.Collision.Shapes.*; public class GameKingBad7 extends MovieClip { public var myType:String; public var goodBad:Boolean; public var myObject:Object; public var mySmoke; public var collisionWith:MovieClip; var soldierState:Number; public var collisionWithS:MovieClip; public var noRotation:Boolean; public var myShapeDef:Object; public var myParent:Object; public var rt:Object; public var energy:Number; public var filterData:Object; public var myBodyDef:Object; public var buildingBit:Boolean;// = false public static const SOLDIER_STATE_DEFEND:int = 1; public static const SOLDIER_STATE_ATTACK:int = 0; public static const SOLDIER_STATE_FIGHTING:int = 2; public function GameKingBad7(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6){ buildingBit = false; super(); addFrameScript(0, frame1); rt = _arg1; myBodyDef = _arg2; myShapeDef = _arg3; myType = _arg4; myParent = _arg5; mySmoke = null; goodBad = _arg6; energy = 100; noRotation = true; } function destroyMe(){ rt.m_world.DestroyBody(myBodyDef); removeMe(); } public function removeMe(){ myParent.removeChild(this); this.stop(); } function frame1(){ stop(); } public function checkOffScreen(){ if (this.x > 1700){ destroyMe(); } else { if (this.x < -50){ destroyMe(); }; }; if (this.y > 800){ destroyMe(); }; } public function decreaseEnergy(_arg1){ rt.rt.decreaseBadKingEnergy(_arg1, this); } public function setupPuffSmoke(){ if (mySmoke == null){ mySmoke = new GameHitFloorSmoke(rt, myParent, this); mySmoke.x = this.x; mySmoke.y = this.y; myParent.addChild(mySmoke); }; } public function mainLoop(){ var _local1:b2Vec2; var _local2:Number; if (rt.rt.rt.gameState == 12){ collisionWithS = null; if (this.x > 1420){ } else { scaleX = -1; _local1 = myBodyDef.GetLinearVelocity(); _local1.x = 4; myBodyDef.SetLinearVelocity(_local1); }; } else { if (collisionWithS != null){ if (collisionWithS.currentFrame != 5){ _local2 = rt.Useful.getDistance(x, y, collisionWithS.x, collisionWithS.y); if (_local2 > 40){ gotoAndStop("stand"); } else { if (collisionWithS.myType == "knight"){ if (soldierState != SOLDIER_STATE_FIGHTING){ gotoAndStop("attack"); soldierState = SOLDIER_STATE_FIGHTING; }; if (collisionWithS.myObject.decreaseEnergy(5)){ soldierState = SOLDIER_STATE_ATTACK; collisionWithS = null; gotoAndStop("stand"); }; }; if (collisionWithS != null){ if (x > collisionWithS.x){ scaleX = 1; } else { scaleX = -1; }; }; }; } else { collisionWithS = null; soldierState = SOLDIER_STATE_ATTACK; }; }; }; } } }//package classesAS3
Section 107
//GameKingGood (classesAS3.GameKingGood) package classesAS3 { import flash.display.*; public class GameKingGood extends MovieClip { public var myType:String; public var goodBad:Boolean; public var myObject:Object; public var mySmoke; public var collisionWith:MovieClip; var soldierState:Number; public var collisionWithS:MovieClip; public var noRotation:Boolean; public var myShapeDef:Object; public var myParent:Object; public var rt:Object; public var energy:Number; public var filterData:Object; public var myBodyDef:Object; public var buildingBit:Boolean;// = false public static const SOLDIER_STATE_DEFEND:int = 1; public static const SOLDIER_STATE_ATTACK:int = 0; public static const SOLDIER_STATE_FIGHTING:int = 2; public function GameKingGood(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6){ buildingBit = false; super(); addFrameScript(0, frame1); rt = _arg1; myBodyDef = _arg2; myShapeDef = _arg3; myType = _arg4; myParent = _arg5; mySmoke = null; goodBad = _arg6; energy = 100; noRotation = true; } function destroyMe(){ if (rt.bodyGrabbed == myBodyDef){ rt.bodyGrabbed = null; }; rt.m_world.DestroyBody(myBodyDef); removeMe(); } public function removeMe(){ myParent.removeChild(this); this.stop(); } function frame1(){ stop(); } public function checkOffScreen(){ if (this.x > 1700){ destroyMe(); } else { if (this.x < -50){ destroyMe(); }; }; if (this.y > 800){ destroyMe(); }; } public function setupPuffSmoke(){ if (mySmoke == null){ mySmoke = new GameHitFloorSmoke(rt.rt, myParent, this); mySmoke.x = this.x; mySmoke.y = this.y; myParent.addChild(mySmoke); }; } public function mainLoop(){ var _local1:Number; if (collisionWithS != null){ if (collisionWithS.currentFrame != 5){ _local1 = rt.Useful.getDistance(x, y, collisionWithS.x, collisionWithS.y); if (_local1 > 40){ gotoAndStop("stand"); } else { if (soldierState != SOLDIER_STATE_FIGHTING){ gotoAndStop("attack"); soldierState = SOLDIER_STATE_FIGHTING; }; if (collisionWithS.myObject.decreaseEnergy(8)){ soldierState = SOLDIER_STATE_ATTACK; collisionWithS = null; gotoAndStop("stand"); }; if (collisionWithS != null){ if (x > collisionWithS.x){ scaleX = 1; } else { scaleX = -1; }; }; }; } else { collisionWithS = null; soldierState = SOLDIER_STATE_ATTACK; }; }; } } }//package classesAS3
Section 108
//GameKnight1 (classesAS3.GameKnight1) package classesAS3 { import flash.display.*; public class GameKnight1 extends MovieClip { public var myType:String; public var goodBad:Boolean; public var myObject:Object; public var mySmoke; public var collisionWith:MovieClip; public var collisionWithS:MovieClip; public var collisionWithW:MovieClip; public var noRotation:Boolean; public var myShapeDef:Object; public var myParent:Object; public var rt:Object; public var soldier:MovieClip; public var energy:Number; public var filterData:Object; public var myBodyDef:Object; public var buildingBit:Boolean;// = false public function GameKnight1(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6){ buildingBit = false; super(); rt = _arg1; myBodyDef = _arg2; myShapeDef = _arg3; myType = _arg4; myParent = _arg5; mySmoke = null; goodBad = _arg6; energy = 70; noRotation = true; } function destroyMe(){ if (rt.bodyGrabbed == myBodyDef){ rt.bodyGrabbed = null; }; rt.m_world.DestroyBody(myBodyDef); removeMe(); } public function removeMe(){ myObject.remove(); this.stop(); } public function checkOffScreen(){ if (this.x > 1700){ destroyMe(); } else { if (this.x < -50){ destroyMe(); }; }; if (this.y > 800){ destroyMe(); }; } public function setupPuffSmoke(){ if (mySmoke == null){ mySmoke = new GameHitFloorSmoke(rt, myParent, this); mySmoke.x = this.x; mySmoke.y = this.y; myParent.addChild(mySmoke); }; } } }//package classesAS3
Section 109
//GameKnight2 (classesAS3.GameKnight2) package classesAS3 { import flash.display.*; public class GameKnight2 extends MovieClip { public var myType:String; public var goodBad:Boolean; public var myObject:Object; public var mySmoke; public var collisionWith:MovieClip; public var collisionWithS:MovieClip; public var collisionWithW:MovieClip; public var noRotation:Boolean; public var myShapeDef:Object; public var myParent:Object; public var rt:Object; public var soldier:MovieClip; public var energy:Number; public var filterData:Object; public var myBodyDef:Object; public var buildingBit:Boolean;// = false public function GameKnight2(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6){ buildingBit = false; super(); rt = _arg1; myBodyDef = _arg2; myShapeDef = _arg3; myType = _arg4; myParent = _arg5; mySmoke = null; goodBad = _arg6; energy = 100; noRotation = true; } function destroyMe(){ if (rt.bodyGrabbed == myBodyDef){ rt.bodyGrabbed = null; }; rt.m_world.DestroyBody(myBodyDef); removeMe(); } public function removeMe(){ myObject.remove(); this.stop(); } public function checkOffScreen(){ if (this.x > 1700){ destroyMe(); } else { if (this.x < -50){ destroyMe(); }; }; if (this.y > 800){ destroyMe(); }; } public function setupPuffSmoke(){ if (mySmoke == null){ mySmoke = new GameHitFloorSmoke(rt, myParent, this); mySmoke.x = this.x; mySmoke.y = this.y; myParent.addChild(mySmoke); }; } } }//package classesAS3
Section 110
//GameKnight3 (classesAS3.GameKnight3) package classesAS3 { import flash.display.*; public class GameKnight3 extends MovieClip { public var myType:String; public var goodBad:Boolean; public var myObject:Object; public var mySmoke; public var collisionWith:MovieClip; public var collisionWithS:MovieClip; public var collisionWithW:MovieClip; public var noRotation:Boolean; public var myShapeDef:Object; public var myParent:Object; public var rt:Object; public var soldier:MovieClip; public var energy:Number; public var filterData:Object; public var myBodyDef:Object; public var buildingBit:Boolean;// = false public function GameKnight3(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6){ buildingBit = false; super(); rt = _arg1; myBodyDef = _arg2; myShapeDef = _arg3; myType = _arg4; myParent = _arg5; mySmoke = null; goodBad = _arg6; energy = 100; noRotation = true; } function destroyMe(){ if (rt.bodyGrabbed == myBodyDef){ rt.bodyGrabbed = null; }; rt.m_world.DestroyBody(myBodyDef); removeMe(); } public function removeMe(){ myObject.remove(); this.stop(); } public function checkOffScreen(){ if (this.x > 1700){ destroyMe(); } else { if (this.x < -50){ destroyMe(); }; }; if (this.y > 800){ destroyMe(); }; } public function setupPuffSmoke(){ if (mySmoke == null){ mySmoke = new GameHitFloorSmoke(rt, myParent, this); mySmoke.x = this.x; mySmoke.y = this.y; myParent.addChild(mySmoke); }; } } }//package classesAS3
Section 111
//GameKnight4 (classesAS3.GameKnight4) package classesAS3 { import flash.display.*; public class GameKnight4 extends MovieClip { public var myType:String; public var goodBad:Boolean; public var myObject:Object; public var mySmoke; public var collisionWith:MovieClip; public var collisionWithS:MovieClip; public var collisionWithW:MovieClip; public var noRotation:Boolean; public var myShapeDef:Object; public var myParent:Object; public var rt:Object; public var soldier:MovieClip; public var energy:Number; public var filterData:Object; public var myBodyDef:Object; public var buildingBit:Boolean;// = false public function GameKnight4(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6){ buildingBit = false; super(); rt = _arg1; myBodyDef = _arg2; myShapeDef = _arg3; myType = _arg4; myParent = _arg5; mySmoke = null; goodBad = _arg6; energy = 100; noRotation = true; } function destroyMe(){ if (rt.bodyGrabbed == myBodyDef){ rt.bodyGrabbed = null; }; rt.m_world.DestroyBody(myBodyDef); removeMe(); } public function removeMe(){ myObject.remove(); this.stop(); } public function checkOffScreen(){ if (this.x > 1700){ destroyMe(); } else { if (this.x < -50){ destroyMe(); }; }; if (this.y > 800){ destroyMe(); }; } public function setupPuffSmoke(){ if (mySmoke == null){ mySmoke = new GameHitFloorSmoke(rt, myParent, this); mySmoke.x = this.x; mySmoke.y = this.y; myParent.addChild(mySmoke); }; } } }//package classesAS3
Section 112
//GameLevelComplete (classesAS3.GameLevelComplete) package classesAS3 { import flash.display.*; public class GameLevelComplete extends MovieClip { public var rt:Object; public var msg:MovieClip; public var howWellDone:Number; public var levelNumber:Number; public function GameLevelComplete(_arg1){ addFrameScript(0, frame1, 14, frame15, 30, frame31, 118, frame119, 128, frame129); rt = _arg1; howWellDone = 1; this.play(); } function frame15(){ msg.scoreBonus.text = String(this.rt.money); if (this.rt.levelTime < 3000){ msg.timeBonus.text = String((1000 * (this.rt.levelNumber / 10))); } else { if (this.rt.levelTime < 4500){ msg.timeBonus.text = String((800 * (this.rt.levelNumber / 10))); } else { if (this.rt.levelTime < 5500){ msg.timeBonus.text = String((600 * (this.rt.levelNumber / 10))); } else { if (this.rt.levelTime < 7000){ msg.timeBonus.text = String((400 * (this.rt.levelNumber / 10))); } else { if (this.rt.levelTime < 8000){ msg.timeBonus.text = String((200 * (this.rt.levelNumber / 10))); } else { if (this.rt.levelTime < 10000){ msg.timeBonus.text = String((100 * (this.rt.levelNumber / 10))); } else { msg.timeBonus.text = "0"; }; }; }; }; }; }; this.rt.score = (this.rt.score + Number(msg.timeBonus.text)); msg.totalScore.text = String(this.rt.score); levelNumber = this.rt.levelNumber; if (levelNumber < 10){ levelNumber++; }; this.rt.rt.Cookie.saveGameCookie(this.rt.score, levelNumber); if (this.rt.levelNumber == this.rt.levelMax){ msg.titleMc.gotoAndStop("gameComplete"); }; } function frame1(){ play(); } function frame31(){ } function frame119(){ if (this.rt.levelNumber == this.rt.levelMax){ stop(); msg.gotoAndStop(2); } else { play(); }; } function frame129(){ if (this.rt.levelNumber == this.rt.levelMax){ this.rt.gameComplete(); } else { this.rt.endLevelStuff(); }; stop(); } } }//package classesAS3
Section 113
//GameLoop (classesAS3.GameLoop) package classesAS3 { import flash.display.*; import flash.events.*; import flash.media.*; import flash.net.*; import flash.text.*; import flash.utils.*; import flash.system.*; import flash.ui.*; import mochi.as3.*; public dynamic class GameLoop extends MovieClip { public var gperc2:Number;// = 0 public var pauseScreen:pauseMc; public var mouseNumberDown:Number; public var cookieData:Object; public var mapScreen2:GameMapScreen; var fadeOutArray:Array; public var gskip:Number;// = 0 public var mochiId:String;// = "51e699f268133cf2" public var MindJolt_Site:Boolean;// = false public var introAnim:GameIntroAnim; public var box2dDone:Boolean;// = false public var Cookie:as3_shared_objects; public var titleMusic:SoundMusic1; public var percentLoaded:int; public var Useful:GameUseful; public var domain:String; var FPS:TextField; public var titleScreen:GameTitleScreen; public var GameMain:GameGame; public var loaderStarted:Boolean;// = false public var loadingBox:LoadingBox; public var titleStarted:Boolean;// = false public var mochiScoreId:String;// = "dc04996c7964cc2d" var Memory:TextField; public var Kongregate_Site:Boolean;// = false public var mouseDownClicked:Boolean;// = false public var mochiOn:Boolean;// = false public var mainBtnsSetup; public var ArcadeBomb_Site:Boolean;// = false public var titleMusicChannel:SoundChannel; public var allowed_site:String;// = "arcadebomb.com" var Instructions:TextField; public var gperc:Number;// = 0 public var gameState:int;// = 2 public var policyLoaded:Boolean;// = false var currentTime:int;// = 0 public var keyPressDown:Boolean;// = false public static const STATE_SYSTEM_PLAY:int = 3; public static const STATE_SYSTEM_INTRO:int = 9; public static const STATE_SYSTEM_PAUSE:int = 4; public static const STATE_SYSTEM_LOADER:int = 0; public static const STATE_SYSTEM_SETUP_GAME:int = 8; public static const STATE_SYSTEM_CHAT:int = 10; public static const STATE_SYSTEM_END_MSG:int = 12; public static const STATE_SYSTEM_MOCHI:int = 2; public static const STATE_SYSTEM_NEW_LEVEL:int = 7; public static const STATE_SYSTEM_GAME_COMPLETE:int = 6; public static const STATE_SYSTEM_START_MSG:int = 11; public static const STATE_SYSTEM_TITLE:int = 1; public static const STATE_SYSTEM_GAME_OVER:int = 5; public function GameLoop():void{ var _local1:Number; var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; policyLoaded = false; mochiOn = false; mochiId = "51e699f268133cf2"; mochiScoreId = "dc04996c7964cc2d"; gameState = STATE_SYSTEM_MOCHI; loaderStarted = false; titleStarted = false; gperc = 0; gperc2 = 0; gskip = 0; currentTime = 0; FPS = new TextField(); Instructions = new TextField(); Memory = new TextField(); allowed_site = "arcadebomb.com"; MindJolt_Site = false; Kongregate_Site = false; ArcadeBomb_Site = false; keyPressDown = false; mouseDownClicked = false; box2dDone = false; super(); addFrameScript(0, frame1, 2, frame3); MochiBot.track(this, "1ac8439f"); mouseNumberDown = 0; mainBtnsSetup = false; fadeOutArray = new Array(); Useful = new GameUseful(root); Cookie = new as3_shared_objects(); _local1 = 700; _local2 = 500; _local3 = 200; _local4 = 500; _local5 = 3; _local6 = 10; _local7 = 30; GameMain = new GameGame(root, _local1, _local2, _local3, _local4, _local5, Useful, _local6, _local7); addChild(GameMain); addEventListener(Event.ENTER_FRAME, runGame, false, 0, true); stage.addEventListener(KeyboardEvent.KEY_UP, keyListener); stage.addEventListener(KeyboardEvent.KEY_DOWN, keyListenerDown); } public function doTitleScreenStuff(){ if (titleMusicChannel == null){ if (GameMain.musicSwitch == true){ titleMusicChannel = titleMusic.play(0, 10000); }; }; titleScreen.playBtn.addEventListener(MouseEvent.MOUSE_UP, doMapScreen); titleScreen.loadGameBtn.addEventListener(MouseEvent.MOUSE_UP, doMapScreenOld); mainBtnsSetup = true; titleScreen.instructionsBtn.addEventListener(MouseEvent.MOUSE_UP, doInstScreen); titleScreen.controlsBtn.addEventListener(MouseEvent.MOUSE_UP, doControlsScreen); titleScreen.musicBtn.addEventListener(MouseEvent.MOUSE_UP, doSoundBtn); } public function setupTitleScreen(){ titleScreen = new GameTitleScreen(this); titleScreen.x = 0; addChild(titleScreen); titleScreen.playBtn.addEventListener(MouseEvent.MOUSE_UP, doMapScreen); titleScreen.loadGameBtn.addEventListener(MouseEvent.MOUSE_UP, doMapScreenOld); if (GameMain.musicSwitch == false){ titleMusic = new SoundMusic1(); titleMusicChannel = null; } else { if (titleMusic == null){ titleMusic = new SoundMusic1(); titleMusicChannel = null; }; }; if (titleMusicChannel != null){ GameMain.Sounds.setVolume(titleMusicChannel, 1); }; } public function doControlsScreen(_arg1:MouseEvent):void{ titleScreen.gotoAndStop("controls"); } public function doScoresBtns(){ fadeOutArray.push(titleMusicChannel); if (GameMain.musicSwitch == true){ fadeOutArray.push(titleMusicChannel); GameMain.Sounds.playSoundFx("mapScreenFx", 1, 0, 1); }; titleScreen.backBtn.addEventListener(MouseEvent.MOUSE_UP, doLastScoreScreen); } public function showLeaderboard(_arg1){ } public function doMapScreenOld(_arg1:MouseEvent):void{ cookieData = Cookie.loadOldGame(); if (cookieData.visits == -1){ GameMain.levelNumber = 1; GameMain.levelStart = 1; GameMain.score = 0; } else { GameMain.levelNumber = cookieData.levelNumber; GameMain.levelStart = cookieData.levelNumber; GameMain.score = cookieData.score; }; removeChild(titleScreen); setupMapScreen(); } public function mouseMoveHandler(_arg1:Event):void{ } public function keyListener(_arg1:KeyboardEvent):void{ keyPressDown = false; GameMain.scrollScreen = ""; GameMain.zoomScreen = ""; if (_arg1.keyCode == 80){ if (gameState != STATE_SYSTEM_PAUSE){ if (gameState == STATE_SYSTEM_PLAY){ gameState = STATE_SYSTEM_PAUSE; pauseScreen = new pauseMc(); addChild(pauseScreen); }; } else { gameState = STATE_SYSTEM_PLAY; removeChild(this.pauseScreen); }; }; if (_arg1.keyCode == 67){ if (gameState == STATE_SYSTEM_PLAY){ }; }; if (_arg1.keyCode == 90){ if (gameState == STATE_SYSTEM_PLAY){ }; } else { if (_arg1.keyCode == 69){ if (gameState == STATE_SYSTEM_PLAY){ }; } else { if (_arg1.keyCode == 82){ if (gameState == STATE_SYSTEM_PLAY){ }; } else { if (_arg1.keyCode == 78){ if (gameState == STATE_SYSTEM_PLAY){ }; } else { if (_arg1.keyCode == 77){ if (gameState == STATE_SYSTEM_PLAY){ }; } else { if (_arg1.keyCode == Keyboard.UP){ keyPressDown = true; GameMain.cannonMove = ""; } else { if (_arg1.keyCode == Keyboard.DOWN){ keyPressDown = true; GameMain.cannonMove = ""; }; }; }; }; }; }; }; } public function doInstrBtns(){ fadeOutArray.push(titleMusicChannel); if (GameMain.musicSwitch == true){ fadeOutArray.push(titleMusicChannel); GameMain.Sounds.playSoundFx("mapScreenFx", 1, 0, 1); }; titleScreen.backBtn.addEventListener(MouseEvent.MOUSE_UP, doLastInstScreen); } function frame1(){ stop(); } function frame3(){ stop(); } public function doMainScreen(_arg1:MouseEvent):void{ titleScreen.gotoAndStop("mainScreen"); } public function doPlay():void{ GameMain.mainLoop(); } public function doSoundBtn(_arg1:MouseEvent):void{ if (titleScreen.musicMc.currentFrame == 1){ titleScreen.musicMc.gotoAndStop("off"); GameMain.musicSwitch = false; titleMusicChannel.stop(); } else { titleScreen.musicMc.gotoAndStop("on"); GameMain.musicSwitch = true; titleMusicChannel = titleMusic.play(0, 10000); }; } function doBackBtn2(_arg1:MouseEvent):void{ titleScreen.gotoAndStop("mainScreen"); } public function mouseLeftClick(_arg1:Event):void{ if (gameState == STATE_SYSTEM_PLAY){ if (this.mouseY < 400){ GameMain.on_mouse_down(); } else { if (mouseDownClicked == false){ mouseDownClicked = true; GameMain.checkForPanelClick(); }; }; }; } public function doMapScreen(_arg1:MouseEvent):void{ cookieData = Cookie.newGame(); removeChild(titleScreen); setupMapScreen(); } public function loadingComplete(){ this.loaderInfo.removeEventListener(Event.ENTER_FRAME, loadingUpdater, false); removeChild(loadingBox); loadingBox = null; this.loaderInfo.removeEventListener(Event.INIT, loadingComplete); this.loaderInfo.removeEventListener(ProgressEvent.PROGRESS, loadingProgress); finishPreload(); } public function doSetup(_arg1:MouseEvent):void{ removeChild(mapScreen2); if (GameMain.musicSwitch == true){ GameMain.Sounds.setupFadeOut(); titleMusicChannel = titleMusic.play(0, 10000); GameMain.Sounds.setVolume(titleMusicChannel, 0.1); }; GameMain.setupGame(); gameState = STATE_SYSTEM_START_MSG; } public function showHUD():void{ FPS.text = "FPS"; FPS.textColor = 0xFFFFFF; Memory.text = "mem"; Memory.x = 200; stage.addChild(FPS); stage.addChild(Memory); } public function openURL(_arg1:String){ var _local2:String; var _local3:URLRequest; _local2 = _arg1; _local3 = new URLRequest(_local2); navigateToURL(_local3, "_blank"); } public function startChat(){ gameState = STATE_SYSTEM_CHAT; } function doLastContScreen(_arg1:MouseEvent):void{ fadeOutArray.push(GameMain.Sounds.currentChannel); if (GameMain.musicSwitch == true){ titleMusicChannel = titleMusic.play(0, 10000); GameMain.Sounds.setVolume(titleMusicChannel, 1); }; titleScreen.gotoAndStop("mainScreen"); } public function doContrBtns(){ fadeOutArray.push(titleMusicChannel); if (GameMain.musicSwitch == true){ fadeOutArray.push(titleMusicChannel); GameMain.Sounds.playSoundFx("mapScreenFx", 1, 0, 1); }; titleScreen.backBtn.addEventListener(MouseEvent.MOUSE_UP, doLastContScreen); } public function introFinished(){ removeChild(introAnim); gameState = STATE_SYSTEM_TITLE; } function setupMapScreen(){ mapScreen2 = new GameMapScreen(this); mapScreen2.x = 0; addChild(mapScreen2); fadeOutArray.push(titleMusicChannel); if (GameMain.musicSwitch == true){ GameMain.Sounds.playSoundFx("mapScreenFx", 1, 0, 1); }; } function doNextInstScreen(_arg1:MouseEvent):void{ if (titleScreen.currentFrame < 4){ titleScreen.nextFrame(); } else { titleScreen.gotoAndStop("mainScreen"); }; } public function FadeOut(_arg1){ var _local2:SoundTransform; var _local3:Number; var _local4:*; _local2 = _arg1.soundTransform; _local3 = _local2.volume; _local3 = (_local3 - 0.1); GameMain.Sounds.setVolume(_arg1, _local3); if (_local3 <= 0){ _arg1.stop(); _local4 = 0; while (_local4 < fadeOutArray.length) { if (fadeOutArray[_local4] == _arg1){ fadeOutArray.splice(_local4, 1); }; _local4++; }; }; } function doNextContScreen(_arg1:MouseEvent):void{ if (titleScreen.currentFrame < 7){ titleScreen.nextFrame(); } else { titleScreen.gotoAndStop("mainScreen"); }; } function doLastInstScreen(_arg1:MouseEvent):void{ fadeOutArray.push(GameMain.Sounds.currentChannel); if (GameMain.musicSwitch == true){ titleMusicChannel = titleMusic.play(0, 10000); GameMain.Sounds.setVolume(titleMusicChannel, 1); }; titleScreen.gotoAndStop("mainScreen"); } function pauseGame(){ if (gameState != 4){ if (gameState == 3){ gameState = 4; pauseScreen = new pauseMc(); addChild(pauseScreen); }; } else { gameState = 3; removeChild(pauseScreen); }; } public function runGame(_arg1:Event):void{ var _local2:*; switch (gameState){ case STATE_SYSTEM_INTRO: break; case STATE_SYSTEM_MOCHI: doMochi(); break; case STATE_SYSTEM_LOADER: doLoadScreen(); break; case STATE_SYSTEM_TITLE: doTitleScreen(); break; case STATE_SYSTEM_PLAY: doPlay(); break; case STATE_SYSTEM_GAME_OVER: GameMain.gameOverLoop(); break; case STATE_SYSTEM_GAME_COMPLETE: GameMain.Sounds.mainLoop(); _local2 = 0; while (_local2 < fadeOutArray.length) { FadeOut(fadeOutArray[_local2]); _local2++; }; break; case STATE_SYSTEM_NEW_LEVEL: GameMain.gameOver("level_complete"); break; case STATE_SYSTEM_CHAT: GameMain.runStartChat(); break; case STATE_SYSTEM_START_MSG: GameMain.Sounds.mainLoop(); GameMain.Box2d.runBox2d(); break; case STATE_SYSTEM_END_MSG: GameMain.runEndMsgs(); break; case STATE_SYSTEM_PAUSE: break; }; } public function doInstScreen(_arg1:MouseEvent):void{ titleScreen.gotoAndStop("instructions"); } function doLastScoreScreen(_arg1:MouseEvent):void{ titleScreen.gotoAndStop("mainScreen"); } public function doMapScreenStuff(){ mapScreen2.playBtn.addEventListener(MouseEvent.MOUSE_UP, doSetup); if (GameMain.levelNumber > 1){ mapScreen2.youarehereMc.gotoAndStop(GameMain.levelNumber); mapScreen2.mapFlags.gotoAndStop(GameMain.levelNumber); } else { mapScreen2.youarehereMc.gotoAndStop(1); mapScreen2.mapFlags.gotoAndStop(1); }; } public function updateHUD():void{ var _local1:Number; _local1 = (1 / ((getTimer() - currentTime) / 1000)); currentTime = getTimer(); FPS.text = ("FPS: " + Math.round(_local1).toString()); Memory.text = (("Mem :" + (Math.round(((System.totalMemory / 0x100000) * 10)) / 10).toString()) + " MB"); } public function doTitleScreen():void{ var _local1:*; if (((!(titleStarted)) && ((currentFrame == 3)))){ setupTitleScreen(); titleStarted = true; }; if (GameMain.musicSwitch == true){ _local1 = 0; while (_local1 < fadeOutArray.length) { FadeOut(fadeOutArray[_local1]); _local1++; }; }; } public function keyListenerDown(_arg1:KeyboardEvent):void{ if (gameState == STATE_SYSTEM_PLAY){ if (_arg1.keyCode == Keyboard.SPACE){ GameMain.fireCannon(); } else { if (_arg1.keyCode == 187){ keyPressDown = true; GameMain.zoomScreen = "in"; } else { if (_arg1.keyCode == 189){ keyPressDown = true; GameMain.zoomScreen = "out"; } else { if (_arg1.keyCode == 57){ keyPressDown = true; GameMain.zoomScreen = "allIn"; } else { if (_arg1.keyCode == 48){ keyPressDown = true; GameMain.zoomScreen = "allOut"; } else { if (_arg1.keyCode == 65){ keyPressDown = true; GameMain.scrollScreen = "right"; } else { if (_arg1.keyCode == 68){ keyPressDown = true; GameMain.scrollScreen = "left"; } else { if (_arg1.keyCode == 83){ keyPressDown = true; GameMain.scrollScreen = "left"; } else { if (_arg1.keyCode == Keyboard.RIGHT){ keyPressDown = true; GameMain.scrollScreen = "left"; } else { if (_arg1.keyCode == Keyboard.LEFT){ keyPressDown = true; GameMain.scrollScreen = "right"; } else { if (_arg1.keyCode == Keyboard.UP){ keyPressDown = true; GameMain.cannonMove = "down"; } else { if (_arg1.keyCode == Keyboard.DOWN){ keyPressDown = true; GameMain.cannonMove = "up"; }; }; }; }; }; }; }; }; }; }; }; }; }; } public function loadingProgress(_arg1:Event):void{ percentLoaded = ((this.loaderInfo.bytesLoaded / this.loaderInfo.bytesTotal) * 100); gperc2 = int(percentLoaded); } public function finishSetup(){ gameState = STATE_SYSTEM_PLAY; stage.addEventListener(MouseEvent.MOUSE_DOWN, mouseLeftClick); stage.addEventListener(MouseEvent.MOUSE_UP, mouseLeftUpClick); } public function adFinished(){ mochiOn = false; gameState = STATE_SYSTEM_LOADER; } public function mouseLeftUpClick(_arg1:Event):void{ mouseDownClicked = false; if (gameState == STATE_SYSTEM_PLAY){ GameMain.on_mouse_up(); } else { mouseNumberDown++; if (mouseNumberDown > 1){ mouseNumberDown = 0; if (gameState == 4){ pauseGame(); }; }; }; } public function doMainScreen2(_arg1:MouseEvent):void{ removeChild(mapScreen2); addChild(titleScreen); titleScreen.gotoAndStop("mainScreen"); titleScreen.playBtn.addEventListener(MouseEvent.MOUSE_UP, doMapScreen); } public function doLoadScreen():void{ if (!loaderStarted){ if (this.loaderInfo.bytesLoaded == this.loaderInfo.bytesTotal){ finishPreload(); } else { loadingBox = new LoadingBox(); loadingBox.addEventListener(Event.ENTER_FRAME, loadingUpdater); loaderStarted = true; loadingBox.x = 350; loadingBox.y = 250; addChild(loadingBox); }; }; } public function checkDomain(){ domain = this.root.loaderInfo.url.split("/")[2]; if (domain.indexOf(allowed_site) == (domain.length - allowed_site.length)){ ArcadeBomb_Site = true; } else { ArcadeBomb_Site = false; }; } public function loadingUpdater(_arg1:Event):void{ percentLoaded = ((this.loaderInfo.bytesLoaded / this.loaderInfo.bytesTotal) * 100); gperc2 = int(percentLoaded); if (gskip < 2){ gskip++; return; }; gskip = 0; gperc = (gperc + 1); if (gperc < gperc2){ gperc++; loadingBox.loaderbar.gotoAndStop(gperc); }; if (gperc >= 100){ loadingComplete(); }; loadingBox.update(percentLoaded); } public function doMochi():void{ if (!mochiOn){ MochiAd.showPreGameAd({clip:root, id:mochiId, res:"700x500", ad_finished:this.adFinished}); mochiOn = true; }; } public function finishPreload():void{ this.play(); gameState = STATE_SYSTEM_INTRO; introAnim = new GameIntroAnim(this); addChild(introAnim); introAnim.x = 350; introAnim.y = 238; } } var _local1:* = Security.allowDomain("*"); return (_local1); }//package classesAS3
Section 114
//GameMapScreen (classesAS3.GameMapScreen) package classesAS3 { import flash.display.*; import flash.events.*; import flash.net.*; import flash.text.*; public class GameMapScreen extends MovieClip { public var backBtn:SimpleButton; public var levelNumberTxt:TextField; public var btn3:SimpleButton; public var btn7:SimpleButton; public var btn2:SimpleButton; public var btn4:SimpleButton; public var btn8:SimpleButton; public var btn6:SimpleButton; public var map:MovieClip; public var btn1:SimpleButton; public var btn5:SimpleButton; public var btn9:SimpleButton; public var link_btn2:SimpleButton; public var btn10:SimpleButton; public var placeNames:MovieClip; public var playBtn:SimpleButton; public var mapFlags:MovieClip; public var youarehereMc:MovieClip; var levelsDefenses:Array; var levelsRuler:Array; var rt:Object; public function GameMapScreen(_arg1){ addFrameScript(22, frame23, 31, frame32); this.mapFlags.gotoAndStop(1); rt = _arg1; btn1.addEventListener(MouseEvent.MOUSE_OVER, displayName1); btn2.addEventListener(MouseEvent.MOUSE_OVER, displayName2); btn3.addEventListener(MouseEvent.MOUSE_OVER, displayName3); btn4.addEventListener(MouseEvent.MOUSE_OVER, displayName4); btn5.addEventListener(MouseEvent.MOUSE_OVER, displayName5); btn6.addEventListener(MouseEvent.MOUSE_OVER, displayName6); btn7.addEventListener(MouseEvent.MOUSE_OVER, displayName7); btn8.addEventListener(MouseEvent.MOUSE_OVER, displayName8); btn9.addEventListener(MouseEvent.MOUSE_OVER, displayName9); btn10.addEventListener(MouseEvent.MOUSE_OVER, displayName10); btn1.addEventListener(MouseEvent.MOUSE_OUT, displayCurrentName); btn2.addEventListener(MouseEvent.MOUSE_OUT, displayCurrentName); btn3.addEventListener(MouseEvent.MOUSE_OUT, displayCurrentName); btn4.addEventListener(MouseEvent.MOUSE_OUT, displayCurrentName); btn5.addEventListener(MouseEvent.MOUSE_OUT, displayCurrentName); btn6.addEventListener(MouseEvent.MOUSE_OUT, displayCurrentName); btn7.addEventListener(MouseEvent.MOUSE_OUT, displayCurrentName); btn8.addEventListener(MouseEvent.MOUSE_OUT, displayCurrentName); btn9.addEventListener(MouseEvent.MOUSE_OUT, displayCurrentName); btn10.addEventListener(MouseEvent.MOUSE_OUT, displayCurrentName); levelsRuler = new Array("Egbert", "Egbert", "Caldron the Creepy", "Caldron the Creepy", "Anders the Smart", "Anders the Smart", "Rhodri the Great", "Rhodri the Great", "Morgan le Fay", "Morgan le Fay"); levelsDefenses = new Array("Low defenses", "Wooden Towers", "Low defenses", "Fort", "medium defenses", "Fort", "Fort", "Stone Tower", "Strong defenses", "Stone defenses", "Strong defenses", "Castle", "Vikings!", "Viking Hordes!"); } public function gotoArc2(_arg1:MouseEvent):void{ navigateToURL(new URLRequest("http://www.arcadebomb.com"), "_blank"); } function displayName10(_arg1:MouseEvent):void{ if (rt.GameMain.levelNumber > 10){ placeNames.rulerTxt.text = "Arthur rules this land!"; placeNames.defenseTxt.text = "Strong defenses"; placeNames.kingBadHead.gotoAndStop("arthur"); } else { placeNames.rulerTxt.text = levelsRuler[9]; placeNames.defenseTxt.text = levelsDefenses[9]; placeNames.kingBadHead.gotoAndStop(10); levelNumberTxt.text = "Level 10"; }; } function displayName14(_arg1:MouseEvent):void{ if (rt.GameMain.levelNumber > 14){ placeNames.rulerTxt.text = "Arthur rules this land!"; placeNames.defenseTxt.text = "Strong defenses"; placeNames.kingBadHead.gotoAndStop("arthur"); } else { placeNames.rulerTxt.text = levelsRuler[13]; placeNames.defenseTxt.text = levelsDefenses[13]; placeNames.kingBadHead.gotoAndStop(14); levelNumberTxt.text = "Level 14"; }; } function displayName3(_arg1:MouseEvent):void{ if (rt.GameMain.levelNumber > 3){ placeNames.rulerTxt.text = "Arthur rules this land!"; placeNames.defenseTxt.text = "Strong defenses"; placeNames.kingBadHead.gotoAndStop("arthur"); } else { placeNames.rulerTxt.text = levelsRuler[2]; placeNames.defenseTxt.text = levelsDefenses[2]; placeNames.kingBadHead.gotoAndStop(3); levelNumberTxt.text = "Level 3"; }; } function displayName7(_arg1:MouseEvent):void{ if (rt.GameMain.levelNumber > 7){ placeNames.rulerTxt.text = "Arthur rules this land!"; placeNames.defenseTxt.text = "Strong defenses"; placeNames.kingBadHead.gotoAndStop("arthur"); } else { placeNames.rulerTxt.text = levelsRuler[6]; placeNames.defenseTxt.text = levelsDefenses[6]; placeNames.kingBadHead.gotoAndStop(7); levelNumberTxt.text = "Level 7"; }; } function displayName6(_arg1:MouseEvent):void{ if (rt.GameMain.levelNumber > 6){ placeNames.rulerTxt.text = "Arthur rules this land!"; placeNames.defenseTxt.text = "Strong defenses"; placeNames.kingBadHead.gotoAndStop("arthur"); } else { placeNames.rulerTxt.text = levelsRuler[5]; placeNames.defenseTxt.text = levelsDefenses[5]; placeNames.kingBadHead.gotoAndStop(6); levelNumberTxt.text = "Level 6"; }; } function displayName5(_arg1:MouseEvent):void{ if (rt.GameMain.levelNumber > 5){ placeNames.rulerTxt.text = "Arthur rules this land!"; placeNames.defenseTxt.text = "Strong defenses"; placeNames.kingBadHead.gotoAndStop("arthur"); } else { placeNames.rulerTxt.text = levelsRuler[4]; placeNames.defenseTxt.text = levelsDefenses[4]; placeNames.kingBadHead.gotoAndStop(5); levelNumberTxt.text = "Level 5"; }; } function displayName1(_arg1:MouseEvent):void{ if (rt.GameMain.levelNumber > 1){ placeNames.rulerTxt.text = "Arthur rules this land!"; placeNames.defenseTxt.text = "Strong defenses"; placeNames.kingBadHead.gotoAndStop("arthur"); } else { placeNames.rulerTxt.text = levelsRuler[0]; placeNames.defenseTxt.text = levelsDefenses[0]; placeNames.kingBadHead.gotoAndStop(1); }; levelNumberTxt.text = "Level 1"; } function displayName4(_arg1:MouseEvent):void{ if (rt.GameMain.levelNumber > 4){ placeNames.rulerTxt.text = "Arthur rules this land!"; placeNames.defenseTxt.text = "Strong defenses"; placeNames.kingBadHead.gotoAndStop("arthur"); } else { placeNames.rulerTxt.text = levelsRuler[3]; placeNames.defenseTxt.text = levelsDefenses[3]; placeNames.kingBadHead.gotoAndStop(4); levelNumberTxt.text = "Level 4"; }; } function displayName8(_arg1:MouseEvent):void{ if (rt.GameMain.levelNumber > 8){ placeNames.rulerTxt.text = "Arthur rules this land!"; placeNames.defenseTxt.text = "Strong defenses"; placeNames.kingBadHead.gotoAndStop("arthur"); } else { placeNames.rulerTxt.text = levelsRuler[7]; placeNames.defenseTxt.text = levelsDefenses[7]; placeNames.kingBadHead.gotoAndStop(8); levelNumberTxt.text = "Level 8"; }; } function displayCurrentName(_arg1:MouseEvent):void{ placeNames.rulerTxt.text = levelsRuler[(rt.GameMain.levelNumber - 1)]; placeNames.defenseTxt.text = levelsDefenses[(rt.GameMain.levelNumber - 1)]; placeNames.kingBadHead.gotoAndStop(rt.GameMain.levelNumber); levelNumberTxt.text = ("Level " + String(rt.GameMain.levelNumber)); } function displayName9(_arg1:MouseEvent):void{ if (rt.GameMain.levelNumber > 9){ placeNames.rulerTxt.text = "Arthur rules this land!"; placeNames.defenseTxt.text = "Strong defenses"; placeNames.kingBadHead.gotoAndStop("arthur"); } else { placeNames.rulerTxt.text = levelsRuler[8]; placeNames.defenseTxt.text = levelsDefenses[8]; placeNames.kingBadHead.gotoAndStop(9); levelNumberTxt.text = "Level 9"; }; } function displayName11(_arg1:MouseEvent):void{ if (rt.GameMain.levelNumber > 11){ placeNames.rulerTxt.text = "Arthur rules this land!"; placeNames.defenseTxt.text = "Strong defenses"; placeNames.kingBadHead.gotoAndStop("arthur"); } else { placeNames.rulerTxt.text = levelsRuler[10]; placeNames.defenseTxt.text = levelsDefenses[10]; placeNames.kingBadHead.gotoAndStop(11); levelNumberTxt.text = "Level 11"; }; } function frame23(){ placeNames.rulerTxt.text = this.levelsRuler[(this.rt.GameMain.levelNumber - 1)]; placeNames.defenseTxt.text = this.levelsDefenses[(this.rt.GameMain.levelNumber - 1)]; placeNames.kingBadHead.gotoAndStop(this.rt.GameMain.levelNumber); } function displayName12(_arg1:MouseEvent):void{ if (rt.GameMain.levelNumber > 12){ placeNames.rulerTxt.text = "Arthur rules this land!"; placeNames.defenseTxt.text = "Strong defenses"; placeNames.kingBadHead.gotoAndStop("arthur"); } else { placeNames.rulerTxt.text = levelsRuler[11]; placeNames.defenseTxt.text = levelsDefenses[11]; placeNames.kingBadHead.gotoAndStop(12); levelNumberTxt.text = "Level 12"; }; } function frame32(){ rt.doMapScreenStuff(); link_btn2.addEventListener(MouseEvent.MOUSE_DOWN, gotoArc2, false); stop(); } function displayName13(_arg1:MouseEvent):void{ if (rt.GameMain.levelNumber > 13){ placeNames.rulerTxt.text = "Arthur rules this land!"; placeNames.defenseTxt.text = "Strong defenses"; placeNames.kingBadHead.gotoAndStop("arthur"); } else { placeNames.rulerTxt.text = levelsRuler[12]; placeNames.defenseTxt.text = levelsDefenses[12]; placeNames.kingBadHead.gotoAndStop(13); levelNumberTxt.text = "Level 13"; }; } function displayName2(_arg1:MouseEvent):void{ if (rt.GameMain.levelNumber > 2){ placeNames.rulerTxt.text = "Arthur rules this land!"; placeNames.defenseTxt.text = "Strong defenses"; placeNames.kingBadHead.gotoAndStop("arthur"); } else { placeNames.rulerTxt.text = levelsRuler[1]; placeNames.defenseTxt.text = levelsDefenses[1]; placeNames.kingBadHead.gotoAndStop(2); levelNumberTxt.text = "Level 2"; }; } } }//package classesAS3
Section 115
//GameMissile (classesAS3.GameMissile) package classesAS3 { import classesAS3.*; class GameMissile { var rt:Object; var xPos:Number;// = 0 var xVel:Number;// = 0 var myDamage:Number; var mType:String; var yPos:Number;// = 0 var trailDelay:Number; var speed:Number; var Useful:GameUseful; var yVel:Number;// = 0 var dead:Boolean; var myParent:Object; var mC:Object; var arrayIndex:Number; var velocities:Object; var xOrigin:Number;// = 0 var yOrigin:Number;// = 0 function GameMissile(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10){ xOrigin = 0; yOrigin = 0; xPos = 0; yPos = 0; xVel = 0; yVel = 0; super(); rt = _arg2; Useful = _arg6; myParent = _arg9; myDamage = _arg10; xOrigin = _arg3; yOrigin = _arg4; xPos = 0; yPos = 0; xVel = 0; yVel = 0; speed = _arg8; dead = false; mC = _arg1; mType = _arg5; trailDelay = 2; updatePosition(); velocities = new Object(); velocities.gravity = _arg7.gravity; xVel = (_arg7.vx * speed); yVel = (_arg7.vy * speed); } function applyGravity(){ yVel = (yVel + velocities.gravity); } function mainLoop(){ if (dead == true){ remove(); } else { checkForOffStage(); collisionDetection(); updatePosition(); }; } function checkForOffStage(){ if (mC.x < 0){ remove(); }; if (mC.y < -1000){ remove(); }; if (mC.x > 1700){ remove(); }; } function updatePosition(){ var _local1:*; var _local2:*; var _local3:Number; var _local4:Number; var _local5:Number; xPos = (xPos + xVel); yPos = (yPos + yVel); _local1 = mC.x; _local2 = mC.y; mC.x = (xOrigin + xPos); mC.y = (yOrigin + yPos); _local3 = (mC.x - _local1); _local4 = (mC.y - _local2); _local5 = Math.atan2(_local4, _local3); mC.rotation = ((_local5 * 180) / Math.PI); } function remove(){ var _local1:Number; var _local2:*; if (dead == false){ _local1 = -1; _local2 = 0; while (_local2 < rt.missilesArray.length) { if (this == rt.missilesArray[_local2]){ _local1 = _local2; }; _local2++; }; if (_local1 >= 0){ if (mC != null){ if (mC.parent != null){ rt.inGameMissilesMc.removeChild(mC); }; }; }; dead = true; }; } function mCDeath(){ } function collisionDetection(){ var _local1:int; var _local2:*; var _local3:*; if (myParent.mC.goodBad == false){ _local1 = 0; while (_local1 < rt.inGameEnemyMc.numChildren) { if (mC.hitTestObject(rt.inGameEnemyMc.getChildAt(_local1))){ if (rt.inGameEnemyMc.getChildAt(_local1).myObject != null){ rt.inGameEnemyMc.getChildAt(_local1).myObject.myDamageDelay = 1; rt.inGameEnemyMc.getChildAt(_local1).myObject.decreaseEnergy(myDamage); } else { if (rt.inGameEnemyMc.getChildAt(_local1).myType == "blockEnemy"){ rt.inGameEnemyMc.getChildAt(_local1).decreaseEnergy((myDamage / 2)); } else { rt.inGameEnemyMc.getChildAt(_local1).decreaseEnergy(myDamage); }; }; if (myParent.mC.myType == "wizard"){ rt.explosionsArray.push(new GameExplosion(rt, mC.x, mC.y, 3, rt.Useful, 14, 2, 20, true, false, false, 8, 0)); }; rt.Sounds.playSoundFx("hitEnemyFx", 1, 0, 1); remove(); dead = true; }; _local1++; }; } else { _local1 = 0; while (_local1 < rt.inGameGoodGuysMc.numChildren) { if (rt.inGameGoodGuysMc.getChildAt(_local1) != rt.Box2d.bodyGrabbed){ if (rt.inGameGoodGuysMc.getChildAt(_local1).myType != "catapultRod"){ _local2 = rt.inGameGoodGuysMc.getChildAt(_local1); if (mC.hitTestObject(rt.inGameGoodGuysMc.getChildAt(_local1))){ if (rt.inGameGoodGuysMc.getChildAt(_local1).myType == "floor"){ rt.Sounds.playSoundFx("hitEnemyFx", 1, 0, 1); remove(); dead = true; } else { if (rt.inGameGoodGuysMc.getChildAt(_local1).myObject != null){ if (rt.inGameGoodGuysMc.getChildAt(_local1).myType == "kingGood"){ rt.decreaseEnergy(int((myDamage / 4))); } else { rt.inGameGoodGuysMc.getChildAt(_local1).myObject.myDamageDelay = 1; rt.inGameGoodGuysMc.getChildAt(_local1).myObject.decreaseEnergy(myDamage); }; } else { if (rt.inGameGoodGuysMc.getChildAt(_local1).myType == "kingGood"){ rt.decreaseEnergy(int((myDamage / 4))); } else { rt.inGameGoodGuysMc.getChildAt(_local1).decreaseEnergy(myDamage); }; }; rt.Sounds.playSoundFx("hitEnemyFx", 1, 0, 1); remove(); dead = true; }; }; }; }; _local1++; }; _local1 = 0; while (_local1 < rt.inGameBuildingsMc.numChildren) { _local3 = rt.inGameBuildingsMc.getChildAt(_local1); if (_local3 != RangeError){ if (_local1 < rt.inGameBuildingsMc.numChildren){ if (rt.inGameBuildingsMc.getChildAt(_local1) != rt.Box2d.bodyGrabbed){ if (mC.hitTestObject(rt.inGameBuildingsMc.getChildAt(_local1))){ if (rt.inGameBuildingsMc.getChildAt(_local1).myObject == null){ if (rt.inGameBuildingsMc.getChildAt(_local1).myType == "block"){ rt.inGameBuildingsMc.getChildAt(_local1).decreaseEnergy((myDamage / 2)); } else { rt.inGameBuildingsMc.getChildAt(_local1).decreaseEnergy(myDamage); }; rt.Sounds.playSoundFx("hitEnemyFx", 1, 0, 1); remove(); dead = true; }; }; }; }; }; _local1++; }; }; } function doTrail(){ var _local1:*; trailDelay--; if (trailDelay == 0){ trailDelay = 2; _local1 = new GameRocketSmoke(rt.inGameExplosionsMc); rt.inGameExplosionsMc.addChild(_local1); _local1.x = mC.x; _local1.y = mC.y; }; } } }//package classesAS3
Section 116
//GameMultipleExplosion (classesAS3.GameMultipleExplosion) package classesAS3 { import flash.display.*; public class GameMultipleExplosion extends MovieClip { public var yPos:Number; public var numberOfExplosions:Number; public var areaWidth:Number; var delayToExplosion:Number; var mType:Number; public var rt:Object; var Useful:GameUseful; public var xPos:Number; public function GameMultipleExplosion(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8){ rt = _arg1; mType = _arg8; numberOfExplosions = _arg3; xPos = _arg4; yPos = _arg5; areaWidth = _arg6; Useful = _arg2; delayToExplosion = _arg7; } function mainLoop(){ var _local1:Number; var _local2:Number; delayToExplosion--; if (delayToExplosion == 0){ delayToExplosion = Useful.RandomNumber(1, 8); _local1 = (xPos + Useful.RandomNumber(1, areaWidth)); _local2 = (rt.alienBaseMc.y + Useful.RandomNumber(1, areaWidth)); rt.explosionsArray.push(new GameExplosion(rt, _local1, _local2, mType, Useful, 8, 5, 76, false, false, true, 8, 0)); }; } } }//package classesAS3
Section 117
//GameOverMsgAnim (classesAS3.GameOverMsgAnim) package classesAS3 { import flash.display.*; import flash.events.*; import com.adobe.crypto.*; import flash.net.*; import flash.text.*; import flash.system.*; public class GameOverMsgAnim extends MovieClip { public var m:MovieClip; public var rt:Object; public function GameOverMsgAnim(_arg1){ addFrameScript(9, frame10, 22, frame23); rt = _arg1; this.play(); } function frame10(){ stop(); } function frame23(){ stop(); } public function buttonPressed(_arg1, _arg2){ var _local3:URLVariables; var _local4:URLRequest; var _local5:URLLoader; if (rt.rt.policyLoaded == false){ rt.rt.policyLoaded = true; Security.loadPolicyFile("http://hiscore.arcadebomb.com/crossdomain.xml"); }; _local3 = new URLVariables(); _local3.n = _arg1; _local3.s = _arg2; _local3.t = new Date().getTime(); _local3.k = Math.floor((Math.random() * 100)); _local3.m = MD5.hash(("" + ((_arg2 + _local3.k) * 6061))); _local4 = new URLRequest("http://hiscore.arcadebomb.com/questpower2_submit.php"); _local4.method = "POST"; _local4.data = _local3; _local5 = new URLLoader(); _local5.load(_local4); _local5.addEventListener(Event.COMPLETE, goodjob); } function goodjob(_arg1:Event):void{ } } }//package classesAS3
Section 118
//GamePanelBuyMc (classesAS3.GamePanelBuyMc) package classesAS3 { import flash.display.*; public class GamePanelBuyMc extends MovieClip { var buildFinished:Boolean; public var itemsMc:panelItems; public var rt:Object; public var back:panelManBack; public function GamePanelBuyMc(_arg1){ addFrameScript(0, frame1); rt = _arg1; buildFinished = false; } function frame1(){ stop(); } } }//package classesAS3
Section 119
//GameParticle (classesAS3.GameParticle) package classesAS3 { import flash.display.*; public class GameParticle extends MovieClip { var bounces:Number; var yPos:Number;// = 0 var xVel:Number;// = 0 var myDamage:Number; var gravity:Boolean; var mType:Number; var speed:Number; var yVel:Number;// = 0 var mC:Object; var rt:Object; var dead:Boolean; var artillary:Boolean; var Useful:GameUseful; var xOrigin:Number;// = 0 var xPos:Number;// = 0 var gravityValue:Number; var endX:Number; var endY:Number; var arrayIndex:Number; var explodeDistance:Number; var yOrigin:Number;// = 0 public function GameParticle(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10, _arg11, _arg12, _arg13, _arg14){ xOrigin = 0; yOrigin = 0; xPos = 0; yPos = 0; xVel = 0; yVel = 0; super(); rt = _arg1; Useful = _arg2; artillary = _arg10; gravity = _arg11; myDamage = _arg14; explodeDistance = _arg12; xOrigin = _arg3; yOrigin = _arg4; gravityValue = 0; endX = _arg8; endY = _arg9; xPos = 0; yPos = 0; bounces = 0; dead = false; xVel = (_arg6 * _arg13); yVel = (_arg7 * _arg13); mC = this; mType = _arg5; mC.gotoAndStop(mType); updatePosition(); } function updatePosition(){ var _local1:Number; var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; xPos = (xPos + xVel); yPos = (yPos + yVel); _local1 = x; _local2 = y; x = (xOrigin + xPos); y = (yOrigin + yPos); _local3 = (x - _local1); _local4 = (y - _local2); _local5 = Math.atan2(_local4, _local3); rotation = ((_local5 * 180) / Math.PI); } function mainLoop(){ var _local1:Number; if (dead == false){ _local1 = Useful.getDistance(x, y, endX, endY); if (artillary == true){ if (_local1 > (explodeDistance / 2)){ scaleX = (scaleX + 40); scaleY = scaleX; } else { scaleX = (scaleX - 35); scaleY = scaleX; }; }; if (gravity == true){ gravityValue = (gravityValue + 0.2); yVel = (yVel + gravityValue); }; if (_local1 > (explodeDistance + 10)){ if (this.parent != null){ remove(); }; }; collisionDetection(); updatePosition(); }; } function checkForOffStage(){ if (mC.x < 0){ remove(); }; if (mC.y < 0){ remove(); }; if (mC.x > 1700){ remove(); }; } function collisionDetection(){ var _local1:Boolean; var _local2:int; var _local3:Object; var _local4:Boolean; var _local5:int; _local1 = false; _local2 = 0; while (_local2 < rt.inGameEnemyMc.numChildren) { if (mC.hitTestObject(rt.inGameEnemyMc.getChildAt(_local2))){ if (rt.inGameEnemyMc.getChildAt(_local2).myObject != null){ if (this.currentFrame == 3){ _local3 = new Object(); _local3.mC = rt.inGameEnemyMc.getChildAt(_local2); _local3.colourValue = 14540287; _local3.colourMult = 0; _local3.toDefrost = 0; _local3.defrost = false; _local4 = false; _local5 = 0; while (_local5 < rt.frozenArray.length) { if (rt.frozenArray[_local5].mC == rt.inGameEnemyMc.getChildAt(_local2)){ _local4 = true; break; }; _local5++; }; if (_local4 == false){ rt.frozenArray.push(_local3); }; rt.inGameEnemyMc.getChildAt(_local2).myObject.frozen = true; } else { rt.inGameEnemyMc.getChildAt(_local2).myObject.myDamageDelay = 1; rt.inGameEnemyMc.getChildAt(_local2).myObject.decreaseEnergy(myDamage); }; } else { if (this.currentFrame == 3){ _local3 = new Object(); _local3.mC = rt.inGameEnemyMc.getChildAt(_local2); _local3.colourValue = 5592575; _local3.colourMult = 0; _local3.toDefrost = 0; _local3.defrost = false; _local5 = 0; while (_local5 < rt.frozenArray.length) { if (rt.frozenArray[_local5].mC == rt.inGameEnemyMc.getChildAt(_local2)){ _local4 = true; break; }; _local5++; }; if (_local4 == false){ rt.frozenArray.push(_local3); }; } else { rt.inGameEnemyMc.getChildAt(_local2).decreaseEnergy(myDamage); }; }; _local1 = true; }; _local2++; }; if (_local1 == true){ remove(); }; } function mCDeath(){ } function remove(){ var _local1:Number; var _local2:*; _local1 = -1; _local2 = 0; while (_local2 < rt.particlesArray.length) { if (this == rt.particlesArray[_local2]){ _local1 = _local2; }; _local2++; }; if (this.parent != null){ this.parent.removeChild(this); }; if (_local1 != -1){ rt.particlesArray.splice(_local1, 1); }; this.stop(); delete ??getglobalscope [this]; } } }//package classesAS3
Section 120
//GamePlane (classesAS3.GamePlane) package classesAS3 { import flash.display.*; public class GamePlane extends MovieClip { public var soldierStart:Number; public var xVel:Number; public var soldierType:Array; public var myObject:Object; public var soldierDone:Number; public var myParent:Object; public var rt:Object; public function GamePlane(_arg1, _arg2){ myParent = _arg1; rt = _arg2; xVel = 0; soldierDone = 0; soldierType = new Array(); } function updatePosition(){ this.x = (this.x + xVel); } function dropNow(){ rt.setupSoldier(soldierType[0], this.x, this.y); soldierType.shift(); if (this.x < 200){ soldierStart = rt.Useful.RandomNumber(((this.x / 2) + 100), this.x); } else { soldierStart = rt.Useful.RandomNumber(((this.x / 2) + 100), 200); }; } public function mainLoop(){ updatePosition(); if (this.x < -100){ myParent.removeChild(this); rt.planeMc = null; this.stop(); }; if (soldierType.length > 0){ if (this.x < soldierStart){ rt.setupSoldier(soldierType[0], this.x, this.y); soldierType.shift(); if (this.x < 200){ soldierStart = rt.Useful.RandomNumber(((this.x / 2) + 130), this.x); } else { soldierStart = rt.Useful.RandomNumber(((this.x / 2) + 130), 200); }; }; }; } } }//package classesAS3
Section 121
//GamePlank (classesAS3.GamePlank) package classesAS3 { import flash.display.*; public class GamePlank extends MovieClip { public var myType:String; public var goodBad:Boolean; public var myObject:Object; public var mySmoke; public var collisionWith:MovieClip; var myDelay:Number;// = 5 public var noRotation:Boolean; public var myShapeDef:Object; public var myParent:Object; public var rt:Object; public var energy:Number; public var filterData:Object; public var myBodyDef:Object; public var buildingBit:Boolean;// = true public function GamePlank(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6){ buildingBit = true; myDelay = 5; super(); addFrameScript(0, frame1, 6, frame7); rt = _arg1; myBodyDef = _arg2; myShapeDef = _arg3; myType = _arg4; myParent = _arg5; mySmoke = null; goodBad = _arg6; energy = 100; noRotation = false; } function destroyMe(){ if (rt.bodyGrabbed == myBodyDef){ rt.bodyGrabbed = null; }; rt.m_world.DestroyBody(myBodyDef); removeMe(); } public function removeMe(){ myParent.removeChild(this); } function frame7(){ this.removeMe(); } function frame1(){ stop(); } public function checkOffScreen(){ if (this.x > 1700){ destroyMe(); } else { if (this.x < -250){ destroyMe(); }; }; if (this.y > 800){ destroyMe(); }; } public function decreaseEnergy(_arg1):Boolean{ var _local2:Number; myDelay--; if (myDelay == 0){ myDelay = 5; if (energy > 0){ energy = (energy - _arg1); if (energy <= 0){ rt.m_world.DestroyBody(myBodyDef); this.gotoAndPlay("blockBreak"); return (true); }; _local2 = int(((100 - energy) / 25)); this.gotoAndStop((_local2 + 1)); return (false); }; }; return (false); } public function setupPuffSmoke(){ if (mySmoke == null){ mySmoke = new GameHitFloorSmoke(rt, myParent, this); mySmoke.x = this.x; mySmoke.y = this.y; myParent.addChild(mySmoke); }; } } }//package classesAS3
Section 122
//GamePlayer (classesAS3.GamePlayer) package classesAS3 { import flash.display.*; public class GamePlayer { var playerdown:Number;// = 0 var xVel:Number;// = 0 var moveplayerup:Number;// = 0 var multidirectional:Number;// = 0 var yPos:Number;// = 0 var santaspeed:Number;// = 2 var yVelOld:Number;// = 0 var rotateGunDown:Boolean; var jumpTime:Number; var numberOfMissiles:Number; var jump:Number;// = 0 var mouseButton:Number; var playerup:Number;// = 0 var myinstance:Object; var rt:Object; var Oldplayerup:Number;// = 0 var keypress:Number; var Oldplayerdown:Number;// = 0 var shotStrength:Number; var rotateGunUp:Boolean; var yVel:Number;// = 0 var playerleft:Number;// = 0 var levelDir:Number; var n:Number; var s:Number;// = 0 var Oldplayerright:Number;// = 0 var mC:MovieClip; var scrollSpeed:Number; var shotsLimit:Number; var vectorData:Object; var gunFired:Boolean; var dy:Number;// = 0 var dx:Number;// = 0 var missileDistFromGun:Number; var Oldplayerleft:Number;// = 0 var shotsFired:Number; var xOrigin:Number;// = 0 var xPos:Number;// = 0 var Useful:GameUseful; var mygraphic:Object; var angle:Number;// = 0 var playerright:Number;// = 0 var gunRotation:Number; var xVelOld:Number;// = 0 var energyLevel:Boolean; var fireDelay:Number; var turret:turretMc; var yOrigin:Number;// = 0 public function GamePlayer(_arg1, _arg2, _arg3){ xOrigin = 0; yOrigin = 0; xPos = 0; yPos = 0; s = 0; playerleft = 0; playerright = 0; jump = 0; moveplayerup = 0; playerdown = 0; playerup = 0; Oldplayerup = 0; Oldplayerdown = 0; Oldplayerright = 0; Oldplayerleft = 0; xVel = 0; yVel = 0; xVelOld = 0; yVelOld = 0; santaspeed = 2; multidirectional = 0; dx = 0; dy = 0; angle = 0; super(); mC = _arg1; rt = _arg2; Useful = _arg3; missileDistFromGun = 40; xOrigin = mC.x; yOrigin = mC.y; dx = 0; dy = 0; angle = 0; shotsFired = 0; shotsLimit = 2; gunFired = false; xPos = 0; yPos = 0; xVel = 0; yVel = 0; xVelOld = 0; numberOfMissiles = 0; yVelOld = 0; scrollSpeed = 10; keypress = 0; jump = 0; jumpTime = 10; mouseButton = 0; shotStrength = 6; gunRotation = 180; rotateGunUp = false; rotateGunDown = false; vectorData = new Object(); energyLevel = false; levelDir = 1; fireDelay = 0; updatePosition(); } function updatePosition(){ } function decreaseEnergy(_arg1){ } function mainLoop(){ } } }//package classesAS3
Section 123
//GamePotion1 (classesAS3.GamePotion1) package classesAS3 { import flash.display.*; public class GamePotion1 extends MovieClip { public var myType:String; public var goodBad:Boolean; public var myObject:Object; public var mySmoke; public var collisionWith:MovieClip; public var noRotation:Boolean; public var myShapeDef:Object; public var myParent:Object; public var rt:Object; public var energy:Number; public var filterData:Object; public var myBodyDef:Object; public var buildingBit:Boolean;// = false public function GamePotion1(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6){ buildingBit = false; super(); rt = _arg1; myBodyDef = _arg2; myShapeDef = _arg3; myType = _arg4; myParent = _arg5; mySmoke = null; goodBad = _arg6; energy = 100; noRotation = false; } function destroyMe(){ if (rt.bodyGrabbed == myBodyDef){ rt.bodyGrabbed = null; }; rt.m_world.DestroyBody(myBodyDef); removeMe(); } public function removeMe(){ var _local1:Number; var _local2:*; if (myParent != null){ _local1 = -1; _local2 = 0; while (_local2 < rt.bouldersArray.length) { if (this == rt.bouldersArray[_local2]){ _local1 = _local2; }; _local2++; }; if (_local1 != -1){ rt.bouldersArray.splice(_local1, 1); myParent.removeChild(this); this.stop(); }; }; } public function checkOffScreen(){ if (this.x > 1700){ destroyMe(); } else { if (this.x < -50){ destroyMe(); }; }; if (this.y > 800){ destroyMe(); }; } public function decreaseEnergy(_arg1):Boolean{ if (energy > 0){ energy = (energy - _arg1); if (energy <= 0){ rt.Sounds.playSoundFx("mainGunMissileHitFx", 1, 0, 1); rt.explosionsArray.push(new GameExplosion(rt, this.x, this.y, 1, rt.Useful, 7, 1, 10, true, false, false, 8, 0)); rt.explosionsArray.push(new GameExplosion(rt, this.x, this.y, 2, rt.Useful, 7, 1, 20, true, false, false, 8, 20)); rt.m_world.DestroyBody(myBodyDef); removeMe(); return (true); }; return (false); }; return (true); } public function setupPuffSmoke(){ if (mySmoke == null){ mySmoke = new GameHitFloorSmoke(rt, myParent, this); mySmoke.x = this.x; mySmoke.y = this.y; myParent.addChild(mySmoke); }; } public function mainLoop(){ if (collisionWith != null){ if (collisionWith.myObject == null){ if (collisionWith.goodBad == true){ if (collisionWith.myType == "kingBad1"){ rt.decreaseBadKingEnergy(30, collisionWith); } else { collisionWith.myDelay = 1; collisionWith.decreaseEnergy(50); }; }; } else { if (collisionWith.goodBad == true){ collisionWith.myObject.myDamageDelay = 1; collisionWith.myObject.decreaseEnergy(100); }; }; decreaseEnergy(100); collisionWith = null; }; } } }//package classesAS3
Section 124
//GamePotion2 (classesAS3.GamePotion2) package classesAS3 { import flash.display.*; public class GamePotion2 extends MovieClip { public var myType:String; public var goodBad:Boolean; public var myObject:Object; public var mySmoke; public var collisionWith:MovieClip; public var noRotation:Boolean; public var myShapeDef:Object; public var myParent:Object; public var rt:Object; public var energy:Number; public var filterData:Object; public var myBodyDef:Object; public var buildingBit:Boolean;// = false public function GamePotion2(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6){ buildingBit = false; super(); rt = _arg1; myBodyDef = _arg2; myShapeDef = _arg3; myType = _arg4; myParent = _arg5; mySmoke = null; goodBad = _arg6; energy = 100; noRotation = false; } function destroyMe(){ if (rt.bodyGrabbed == myBodyDef){ rt.bodyGrabbed = null; }; rt.m_world.DestroyBody(myBodyDef); removeMe(); } public function removeMe(){ var _local1:Number; var _local2:*; if (myParent != null){ _local1 = -1; _local2 = 0; while (_local2 < rt.bouldersArray.length) { if (this == rt.bouldersArray[_local2]){ _local1 = _local2; }; _local2++; }; if (_local1 != -1){ rt.bouldersArray.splice(_local1, 1); myParent.removeChild(this); this.stop(); }; }; } public function checkOffScreen(){ if (this.x > 1700){ destroyMe(); } else { if (this.x < -50){ destroyMe(); }; }; if (this.y > 800){ destroyMe(); }; } public function decreaseEnergy(_arg1):Boolean{ if (energy > 0){ energy = (energy - _arg1); if (energy <= 0){ rt.m_world.DestroyBody(myBodyDef); rt.explosionsArray.push(new GameExplosion(rt, this.x, this.y, 3, rt.Useful, 14, 2, 20, true, false, false, 8, 0)); removeMe(); return (true); }; return (false); }; return (true); } public function setupPuffSmoke(){ if (mySmoke == null){ mySmoke = new GameHitFloorSmoke(rt, myParent, this); mySmoke.x = this.x; mySmoke.y = this.y; myParent.addChild(mySmoke); }; } public function mainLoop(){ if (collisionWith != null){ decreaseEnergy(100); collisionWith = null; }; } } }//package classesAS3
Section 125
//GamePotion3 (classesAS3.GamePotion3) package classesAS3 { import flash.display.*; public class GamePotion3 extends MovieClip { public var myType:String; public var goodBad:Boolean; public var myObject:Object; public var mySmoke; public var collisionWith:MovieClip; public var noRotation:Boolean; public var myShapeDef:Object; public var myParent:Object; public var rt:Object; public var energy:Number; public var filterData:Object; public var myBodyDef:Object; public var buildingBit:Boolean;// = false public function GamePotion3(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6){ buildingBit = false; super(); rt = _arg1; myBodyDef = _arg2; myShapeDef = _arg3; myType = _arg4; myParent = _arg5; mySmoke = null; goodBad = _arg6; energy = 100; noRotation = false; } function destroyMe(){ if (rt.bodyGrabbed == myBodyDef){ rt.bodyGrabbed = null; }; rt.m_world.DestroyBody(myBodyDef); removeMe(); } public function removeMe(){ var _local1:Number; var _local2:*; if (myParent != null){ _local1 = -1; _local2 = 0; while (_local2 < rt.bouldersArray.length) { if (this == rt.bouldersArray[_local2]){ _local1 = _local2; }; _local2++; }; if (_local1 != -1){ rt.bouldersArray.splice(_local1, 1); myParent.removeChild(this); this.stop(); }; }; } public function checkOffScreen(){ if (this.x > 1700){ destroyMe(); } else { if (this.x < -50){ destroyMe(); }; }; if (this.y > 800){ destroyMe(); }; } public function decreaseEnergy(_arg1):Boolean{ var _local2:*; if (energy > 0){ energy = (energy - _arg1); if (energy <= 0){ rt.m_world.DestroyBody(myBodyDef); if (collisionWith != null){ if (collisionWith.myObject == null){ _local2 = new GameRisingScore(rt, rt.inGameScoreMc, 20); rt.inGameScoreMc.addChild(_local2); _local2.x = collisionWith.x; _local2.y = (collisionWith.y - 10); collisionWith.energy = (collisionWith.energy + 30); if (collisionWith.energy > 100){ collisionWith.energy = 100; }; } else { _local2 = new GameRisingScore(rt, rt.inGameScoreMc, 20); rt.inGameScoreMc.addChild(_local2); _local2.x = collisionWith.x; _local2.y = (collisionWith.y - 10); collisionWith.myObject.energy = (collisionWith.myObject.energy + 20); if (collisionWith.myObject.energy > 100){ collisionWith.myObject.energy = 100; }; }; }; removeMe(); return (true); } else { return (false); }; }; return (true); } public function setupPuffSmoke(){ if (mySmoke == null){ mySmoke = new GameHitFloorSmoke(rt, myParent, this); mySmoke.x = this.x; mySmoke.y = this.y; myParent.addChild(mySmoke); }; } public function mainLoop(){ if (collisionWith != null){ decreaseEnergy(100); collisionWith = null; }; } } }//package classesAS3
Section 126
//GameRam1 (classesAS3.GameRam1) package classesAS3 { import flash.display.*; public class GameRam1 extends MovieClip { public var myType:String; public var goodBad:Boolean; public var myObject:Object; public var mySmoke; public var collisionWith:MovieClip; public var collisionWithS:MovieClip; public var noRotation:Boolean; public var myShapeDef:Object; public var myParent:Object; public var rt:Object; public var energy:Number; public var filterData:Object; public var myBodyDef:Object; public var buildingBit:Boolean;// = false public function GameRam1(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6){ buildingBit = false; super(); addFrameScript(0, frame1); rt = _arg1; myBodyDef = _arg2; myShapeDef = _arg3; myType = _arg4; myParent = _arg5; mySmoke = null; goodBad = _arg6; energy = 100; noRotation = true; } function destroyMe(){ rt.m_world.DestroyBody(myBodyDef); removeMe(); } public function removeMe(){ myObject.remove(); this.stop(); } function frame1(){ stop(); } public function checkOffScreen(){ if (this.x > 1700){ destroyMe(); } else { if (this.x < -50){ destroyMe(); }; }; if (this.y > 800){ destroyMe(); }; } public function decreaseEnergy(_arg1){ myObject.decreaseEnergy(_arg1); } public function setupPuffSmoke(){ if (mySmoke == null){ mySmoke = new GameHitFloorSmoke(rt, myParent, this); mySmoke.x = this.x; mySmoke.y = this.y; myParent.addChild(mySmoke); }; } } }//package classesAS3
Section 127
//GameRisingMoney (classesAS3.GameRisingMoney) package classesAS3 { import flash.display.*; public class GameRisingMoney extends MovieClip { public var inGameScoreMc:Sprite; public var txt:risingMoneyTxt; public var scoreNumber:Number; public var rt:Object; public function GameRisingMoney(_arg1, _arg2, _arg3){ addFrameScript(22, frame23); rt = _arg1; inGameScoreMc = _arg2; scoreNumber = _arg3; txt.moneyTxt.text = String(_arg3); } function frame23(){ this.inGameScoreMc.removeChild(this); stop(); } } }//package classesAS3
Section 128
//GameRisingScore (classesAS3.GameRisingScore) package classesAS3 { import flash.display.*; public class GameRisingScore extends MovieClip { public var inGameScoreMc:Sprite; public var txt:MovieClip; public var scoreNumber:Number; public var rt:Object; public function GameRisingScore(_arg1, _arg2, _arg3){ addFrameScript(15, frame16); rt = _arg1; inGameScoreMc = _arg2; scoreNumber = _arg3; txt.scoreTxt.text = ("+" + String(scoreNumber)); } function frame16(){ this.inGameScoreMc.removeChild(this); stop(); } } }//package classesAS3
Section 129
//GameRocketSmoke (classesAS3.GameRocketSmoke) package classesAS3 { import flash.display.*; public class GameRocketSmoke extends MovieClip { public var rt:Sprite; public function GameRocketSmoke(_arg1){ addFrameScript(7, frame8); rt = _arg1; } function removeMe(){ rt.removeChild(this); this.stop(); } function frame8(){ this.removeMe(); stop(); } } }//package classesAS3
Section 130
//GameSounds (classesAS3.GameSounds) package classesAS3 { import flash.media.*; import flash.utils.*; public class GameSounds { var rt:Object; var currentChannel:SoundChannel; var soundsArray:Array; var fadeOutArray:Array; public function GameSounds(_arg1){ rt = _arg1; fadeOutArray = new Array(); soundsArray = new Array(); } public function playSoundFx(_arg1:String, _arg2:Number, _arg3:Number, _arg4:Number):SoundChannel{ var _local5:Class; var _local6:*; if (rt.soundsSwitch == true){ _local5 = Class(getDefinitionByName(_arg1)); _local6 = new (_local5); currentChannel = _local6.play(_arg3, _arg4); setVolume(currentChannel, _arg2); return (currentChannel); }; return (null); } public function FadeOut(_arg1){ var _local2:SoundTransform; var _local3:Number; var _local4:*; _local2 = _arg1.soundTransform; _local3 = _local2.volume; _local3 = (_local3 - 0.1); setVolume(_arg1, _local3); if (_local3 <= 0){ _local4 = 0; while (_local4 < fadeOutArray.length) { if (fadeOutArray[_local4] == _arg1){ fadeOutArray.splice(_local4, 1); }; _local4++; }; }; } public function setupFadeOut(){ fadeOutArray.push(currentChannel); } public function setVolume(_arg1:SoundChannel, _arg2:Number):void{ var _local3:SoundTransform; _local3 = _arg1.soundTransform; _local3.volume = _arg2; _arg1.soundTransform = _local3; } public function mainLoop(){ var _local1:*; _local1 = 0; while (_local1 < fadeOutArray.length) { FadeOut(fadeOutArray[_local1]); _local1++; }; } public function stopAllMySounds(){ SoundMixer.stopAll(); } } }//package classesAS3
Section 131
//GameStartMsg (classesAS3.GameStartMsg) package classesAS3 { import flash.display.*; import flash.events.*; public class GameStartMsg extends MovieClip { public var textBox:startGameMsg; public var rt:Object; public var startBtn:startGameButton; public function GameStartMsg(_arg1){ addFrameScript(909, frame910); rt = _arg1; startBtn.addEventListener(MouseEvent.MOUSE_UP, finishStuff); } function finishStuff(_arg1:MouseEvent):void{ this.gotoAndStop("startGame"); } public function removeMe(){ rt.rt.startChat(); rt.inGameMsgsMc.removeChild(this); stop(); } function frame910(){ this.removeMe(); stop(); } } }//package classesAS3
Section 132
//GameTitleScreen (classesAS3.GameTitleScreen) package classesAS3 { import flash.display.*; import flash.events.*; import flash.net.*; import flash.text.*; import flash.system.*; public class GameTitleScreen extends MovieClip { public var score1:TextField; public var name11:TextField; public var backBtn:SimpleButton; public var name20:TextField; public var name21:TextField; public var name22:TextField; public var name24:TextField; public var name26:TextField; public var name23:TextField; public var name27:TextField; public var name25:TextField; public var anim:MovieClip; public var name29:TextField; public var score2:TextField; public var name30:TextField; public var name28:TextField; public var name19:TextField; public var score10:TextField; public var score11:TextField; public var score12:TextField; public var score13:TextField; public var score14:TextField; public var score15:TextField; public var score16:TextField; public var score17:TextField; public var name10:TextField; public var score18:TextField; public var score19:TextField; public var vid:MovieClip; public var score22:TextField; public var score20:TextField; public var score21:TextField; public var score29:TextField; public var score24:TextField; public var score26:TextField; public var score28:TextField; public var pos4:TextField; public var pos5:TextField; public var pos7:TextField; public var pos9:TextField; public var pos6:TextField; public var pos8:TextField; public var score25:TextField; public var score30:TextField; public var txt:MovieClip; public var score23:TextField; public var pos2:TextField; public var instructionsBtn:SimpleButton; public var score27:TextField; public var pos3:TextField; public var pos1:TextField; public var link_btn:SimpleButton; public var musicMc:MovieClip; var rt:Object; public var moreGamesBtn:SimpleButton; public var playBtn:PlayGameBtn; public var highScoresBtn:SimpleButton; public var addThisBtn:SimpleButton; public var name1:TextField; public var name3:TextField; public var name4:TextField; public var name6:TextField; public var name8:TextField; public var name2:TextField; public var fgmBtn:MovieClip; public var name7:TextField; public var name9:TextField; public var name5:TextField; public var loadGameBtn:SimpleButton; public var vidBtns:MovieClip; public var pos10:TextField; public var pos12:TextField; public var pos13:TextField; public var pos14:TextField; public var pos15:TextField; public var pos16:TextField; public var pos17:TextField; public var pos11:TextField; public var pos19:TextField; public var pos18:TextField; public var pos20:TextField; public var pos23:TextField; public var pos25:TextField; public var pos26:TextField; public var pos27:TextField; public var pos21:TextField; public var pos22:TextField; public var pos24:TextField; public var pos28:TextField; public var pos29:TextField; public var pos30:TextField; public var controlsBtn:SimpleButton; public var score3:TextField; public var score5:TextField; public var score6:TextField; public var score7:TextField; public var score8:TextField; public var score4:TextField; public var name12:TextField; public var name13:TextField; public var name14:TextField; public var name15:TextField; public var name16:TextField; public var name17:TextField; public var name18:TextField; public var musicBtn:SimpleButton; public var score9:TextField; public function GameTitleScreen(_arg1){ addFrameScript(0, frame1, 1, frame2, 5, frame6, 8, frame9); rt = _arg1; } public function gotoArc(_arg1:MouseEvent):void{ navigateToURL(new URLRequest("http://www.arcadebomb.com"), "_blank"); } function frame1(){ link_btn.addEventListener(MouseEvent.MOUSE_DOWN, gotoArc, false); addThisBtn.addEventListener(MouseEvent.MOUSE_DOWN, gotoArcD, false); moreGamesBtn.addEventListener(MouseEvent.MOUSE_DOWN, gotoArc, false); highScoresBtn.addEventListener(MouseEvent.MOUSE_DOWN, doHighScores, false); fgmBtn.addEventListener(MouseEvent.MOUSE_DOWN, gotoFGM, false); rt.doTitleScreenStuff(); anim.play(); stop(); } public function gotoArcD(_arg1:MouseEvent):void{ navigateToURL(new URLRequest("http://www.arcadebomb.com/free_website_games.html"), "_blank"); } function frame9(){ anim.gotoAndStop(1); rt.doContrBtns(); this.getScores(); } function frame2(){ anim.gotoAndStop(1); rt.doInstrBtns(); } function frame6(){ anim.gotoAndStop(1); rt.doContrBtns(); } public function getScores(){ var request:URLRequest; var loader:URLLoader; var handleComplete:Function; var onIOError:Function; handleComplete = function (_arg1:Event):void{ var _local2:URLLoader; _local2 = URLLoader(_arg1.target); if (_local2.data.name1 != null){ name1.text = _local2.data.name1; score1.text = _local2.data.score1; }; if (_local2.data.name2 != null){ name2.text = _local2.data.name2; score2.text = _local2.data.score2; }; if (_local2.data.name3 != null){ name3.text = _local2.data.name3; score3.text = _local2.data.score3; }; if (_local2.data.name4 != null){ name4.text = _local2.data.name4; score4.text = _local2.data.score4; }; if (_local2.data.name5 != null){ name5.text = _local2.data.name5; score5.text = _local2.data.score5; }; if (_local2.data.name6 != null){ name6.text = _local2.data.name6; score6.text = _local2.data.score6; }; if (_local2.data.name7 != null){ name7.text = _local2.data.name7; score7.text = _local2.data.score7; }; if (_local2.data.name8 != null){ name8.text = _local2.data.name8; score8.text = _local2.data.score8; }; if (_local2.data.name9 != null){ name9.text = _local2.data.name9; score9.text = _local2.data.score9; }; if (_local2.data.name10 != null){ name10.text = _local2.data.name10; score10.text = _local2.data.score10; }; if (_local2.data.name11 != null){ name11.text = _local2.data.name11; score11.text = _local2.data.score11; }; if (_local2.data.name12 != null){ name12.text = _local2.data.name12; score12.text = _local2.data.score12; }; if (_local2.data.name13 != null){ name13.text = _local2.data.name13; score13.text = _local2.data.score13; }; if (_local2.data.name14 != null){ name14.text = _local2.data.name14; score14.text = _local2.data.score14; }; if (_local2.data.name15 != null){ name15.text = _local2.data.name15; score15.text = _local2.data.score15; }; if (_local2.data.name16 != null){ name16.text = _local2.data.name16; score16.text = _local2.data.score16; }; if (_local2.data.name17 != null){ name17.text = _local2.data.name17; score17.text = _local2.data.score17; }; if (_local2.data.name18 != null){ name18.text = _local2.data.name18; score18.text = _local2.data.score18; }; if (_local2.data.name19 != null){ name19.text = _local2.data.name19; score19.text = _local2.data.score9; }; if (_local2.data.name20 != null){ name20.text = _local2.data.name20; score20.text = _local2.data.score20; }; if (_local2.data.name21 != null){ name21.text = _local2.data.name21; score21.text = _local2.data.score21; }; if (_local2.data.name22 != null){ name22.text = _local2.data.name22; score22.text = _local2.data.score22; }; if (_local2.data.name23 != null){ name23.text = _local2.data.name23; score23.text = _local2.data.score23; }; if (_local2.data.name24 != null){ name24.text = _local2.data.name24; score24.text = _local2.data.score24; }; if (_local2.data.name25 != null){ name25.text = _local2.data.name25; score25.text = _local2.data.score25; }; if (_local2.data.name26 != null){ name26.text = _local2.data.name26; score26.text = _local2.data.score26; }; if (_local2.data.name27 != null){ name27.text = _local2.data.name27; score27.text = _local2.data.score27; }; if (_local2.data.name28 != null){ name28.text = _local2.data.name28; score28.text = _local2.data.score28; }; if (_local2.data.name29 != null){ name29.text = _local2.data.name29; score29.text = _local2.data.score29; }; if (_local2.data.name30 != null){ name30.text = _local2.data.name30; score30.text = _local2.data.score30; }; }; onIOError = function (_arg1:IOErrorEvent):void{ }; if (rt.policyLoaded == false){ rt.policyLoaded = true; Security.loadPolicyFile("http://hiscore.arcadebomb.com/crossdomain.xml"); }; request = new URLRequest("http://hiscore.arcadebomb.com/questpower2_get.php"); loader = new URLLoader(); loader.dataFormat = URLLoaderDataFormat.VARIABLES; request.method = URLRequestMethod.POST; loader.addEventListener(Event.COMPLETE, handleComplete); loader.addEventListener(IOErrorEvent.IO_ERROR, onIOError); loader.load(request); } public function doHighScores(_arg1:MouseEvent):void{ gotoAndStop("highscores"); } public function gotoFGM(_arg1:MouseEvent):void{ navigateToURL(new URLRequest("http://www.flashgamemaker.com"), "_blank"); } } }//package classesAS3
Section 133
//GameUpgrade (classesAS3.GameUpgrade) package classesAS3 { import flash.display.*; public class GameUpgrade extends MovieClip { var buildFinished:Boolean; public var rt:Object; public var upgradeBtn:SimpleButton; public var back:MovieClip; public function GameUpgrade(_arg1){ addFrameScript(0, frame1); this.stop(); rt = _arg1; buildFinished = false; } function frame1(){ back.gotoAndStop(1); stop(); } public function setupUpgrade(){ rt.setupUpgrade1(); } } }//package classesAS3
Section 134
//GameUpgrade10 (classesAS3.GameUpgrade10) package classesAS3 { import flash.display.*; public class GameUpgrade10 extends MovieClip { var buildFinished:Boolean; public var rt:Object; public var upgradeBtn:SimpleButton; public var back:MovieClip; public function GameUpgrade10(_arg1){ this.stop(); rt = _arg1; buildFinished = false; } public function setupUpgrade(){ rt.setupUpgrade10(); } } }//package classesAS3
Section 135
//GameUpgrade2 (classesAS3.GameUpgrade2) package classesAS3 { import flash.display.*; public class GameUpgrade2 extends MovieClip { var buildFinished:Boolean; public var rt:Object; public var upgradeBtn:SimpleButton; public var back:MovieClip; public function GameUpgrade2(_arg1){ addFrameScript(0, frame1); this.stop(); rt = _arg1; buildFinished = false; } function frame1(){ stop(); } public function setupUpgrade(){ rt.setupUpgrade2(); } } }//package classesAS3
Section 136
//GameUpgrade3 (classesAS3.GameUpgrade3) package classesAS3 { import flash.display.*; public class GameUpgrade3 extends MovieClip { var buildFinished:Boolean; public var rt:Object; public var upgradeBtn:SimpleButton; public var back:MovieClip; public function GameUpgrade3(_arg1){ this.stop(); rt = _arg1; buildFinished = false; } public function setupUpgrade(){ rt.setupUpgrade3(); } } }//package classesAS3
Section 137
//GameUpgrade4 (classesAS3.GameUpgrade4) package classesAS3 { import flash.display.*; public class GameUpgrade4 extends MovieClip { var buildFinished:Boolean; public var rt:Object; public var upgradeBtn:SimpleButton; public var back:MovieClip; public function GameUpgrade4(_arg1){ addFrameScript(0, frame1); this.stop(); rt = _arg1; buildFinished = false; } function frame1(){ stop(); } public function setupUpgrade(){ rt.setupUpgrade4(); } } }//package classesAS3
Section 138
//GameUpgrade5 (classesAS3.GameUpgrade5) package classesAS3 { import flash.display.*; public class GameUpgrade5 extends MovieClip { var buildFinished:Boolean; public var rt:Object; public var upgradeBtn:SimpleButton; public var back:MovieClip; public function GameUpgrade5(_arg1){ addFrameScript(0, frame1); this.stop(); rt = _arg1; buildFinished = false; } function frame1(){ stop(); } public function setupUpgrade(){ rt.setupUpgrade5(); } } }//package classesAS3
Section 139
//GameUpgrade6 (classesAS3.GameUpgrade6) package classesAS3 { import flash.display.*; public class GameUpgrade6 extends MovieClip { var buildFinished:Boolean; public var rt:Object; public var upgradeBtn:SimpleButton; public var back:MovieClip; public function GameUpgrade6(_arg1){ addFrameScript(0, frame1); this.stop(); rt = _arg1; buildFinished = false; } function frame1(){ stop(); } public function setupUpgrade(){ rt.setupUpgrade6(); } } }//package classesAS3
Section 140
//GameUpgrade7 (classesAS3.GameUpgrade7) package classesAS3 { import flash.display.*; public class GameUpgrade7 extends MovieClip { var buildFinished:Boolean; public var rt:Object; public var upgradeBtn:SimpleButton; public var back:MovieClip; public function GameUpgrade7(_arg1){ this.stop(); rt = _arg1; buildFinished = false; } public function setupUpgrade(){ rt.setupUpgrade7(); } } }//package classesAS3
Section 141
//GameUpgrade8 (classesAS3.GameUpgrade8) package classesAS3 { import flash.display.*; public class GameUpgrade8 extends MovieClip { var buildFinished:Boolean; public var rt:Object; public var upgradeBtn:SimpleButton; public var back:MovieClip; public function GameUpgrade8(_arg1){ this.stop(); rt = _arg1; buildFinished = false; } public function setupUpgrade(){ rt.setupUpgrade8(); } } }//package classesAS3
Section 142
//GameUpgrade9 (classesAS3.GameUpgrade9) package classesAS3 { import flash.display.*; public class GameUpgrade9 extends MovieClip { var buildFinished:Boolean; public var rt:Object; public var upgradeBtn:SimpleButton; public var back:MovieClip; public function GameUpgrade9(_arg1){ this.stop(); rt = _arg1; buildFinished = false; } public function setupUpgrade(){ rt.setupUpgrade9(); } } }//package classesAS3
Section 143
//GameUseful (classesAS3.GameUseful) package classesAS3 { import flash.display.*; public class GameUseful { public var rt:Object; public function GameUseful(_arg1){ rt = _arg1; } function addThrust(_arg1, _arg2){ var _local3:Object; _local3 = new Object(); _local3.xVel = (Math.cos(radian(_arg1)) * _arg2); _local3.yVel = (Math.sin(radian(_arg1)) * _arg2); return (_local3); } function rotateXY(_arg1, _arg2, _arg3, _arg4){ var _local5:Number; var _local6:Object; _local5 = ((Math.PI * _arg4) / 180); _local6 = new Object(); _local6.xPos = (_arg1 + (Math.cos(_local5) * _arg3)); _local6.yPos = (_arg2 + (Math.sin(_local5) * _arg3)); return (_local6); } public function getDistanceQ(_arg1, _arg2, _arg3, _arg4){ var _local5:Number; _local5 = (_arg3 - _arg1); _local5 = Math.abs(_local5); return (_local5); } function localToGlobalXY2(_arg1:MovieClip):Object{ var _local2:Object; var _local3:*; var _local4:*; var _local5:*; var _local6:*; _local2 = new Object(); _local2.newX = 0; _local2.newY = 0; _local3 = _arg1; while (_local3 != rt.parent) { _local4 = (_local2.newX * (_local3.scaleX / 1)); _local5 = (_local2.newY * (_local3.scaleY / 1)); _local6 = (_local3.rotation * (Math.PI / 180)); _local2.newX = ((_local4 * Math.cos(_local6)) - (_local5 * Math.sin(_local6))); _local2.newY = ((_local4 * Math.sin(_local6)) + (_local5 * Math.cos(_local6))); _local2.newX = (_local2.newX + _local3.x); _local2.newY = (_local2.newY + _local3.y); _local3 = _local3.parent; }; return (_local2); } function localToGlobalXY(_arg1:MovieClip):Object{ var _local2:Object; var _local3:*; var _local4:*; var _local5:*; var _local6:*; _local2 = new Object(); _local2.newX = 0; _local2.newY = 0; _local3 = _arg1; while (_local3 != rt.parent) { _local4 = _local2.newX; _local5 = _local2.newY; _local6 = (_local3.rotation * (Math.PI / 180)); _local2.newX = ((_local4 * Math.cos(_local6)) - (_local5 * Math.sin(_local6))); _local2.newY = ((_local4 * Math.sin(_local6)) + (_local5 * Math.cos(_local6))); _local2.newX = (_local2.newX + _local3.x); _local2.newY = (_local2.newY + _local3.y); _local3 = _local3.parent; }; return (_local2); } public function getDistance(_arg1, _arg2, _arg3, _arg4){ var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; _local5 = _arg1; _local6 = _arg2; _local7 = _arg3; _local8 = _arg4; _local7 = (_local5 - _local7); _local8 = (_local6 - _local8); return (Math.sqrt(((_local7 * _local7) + (_local8 * _local8)))); } public function RandomNumber(_arg1, _arg2):Number{ return ((Math.floor((Math.random() * ((1 + _arg2) - _arg1))) + _arg1)); } function countMcs(_arg1):Array{ var _local2:Array; var _local3:*; _local2 = new Array(); _local3 = 0; for (_local3 in _arg1) { if (typeof(_arg1[_local3]) == "movieclip"){ _local2.push(_arg1[_local3]); }; }; return (_local2); } public function orientateToGround(_arg1, _arg2){ var _local3:Number; var _local4:Number; var _local5:*; var _local6:*; var _local7:Number; var _local8:Number; var _local9:Object; _local3 = (_arg2.x - (_arg2.width / 2)); _local4 = (_arg2.x + (_arg2.width / 2)); _local5 = int(_local3); _local6 = (_arg2.y + _arg1.spritesMc.y); _local7 = _arg1.groundArray[_local5]; _local5 = int(_local4); _local8 = _arg1.groundArray[_local5]; _local9 = pointTowards(_local3, _local7, _local4, _local8); return ((_local9.spriteRotation - 180)); } function radian(_arg1){ return (((_arg1 * Math.PI) / 180)); } function capVectorSpeed(_arg1, _arg2, _arg3):Object{ var _local4:Object; var _local5:*; _local4 = new Object(); _local5 = Math.sqrt(((_arg1 * _arg1) + (_arg2 * _arg2))); if (_local5 > _arg3){ _arg1 = (_arg1 * (_arg3 / _local5)); _arg2 = (_arg2 * (_arg3 / _local5)); }; _local4.vx = _arg1; _local4.vy = _arg2; return (_local4); } function argbtohex(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number){ return (((((_arg1 << 24) | (_arg2 << 16)) | (_arg3 << 8)) | _arg4)); } function getVectorFromAngle(_arg1):Object{ var _local2:Object; var _local3:Number; _local2 = new Object(); _local3 = ((_arg1 * Math.PI) / 180); _local2.vx = Math.cos(_local3); _local2.vy = Math.sin(_local3); return (_local2); } public function getArcVelocity(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number):Object{ var _local7:Object; var _local8:*; var _local9:*; var _local10:*; var _local11:*; _local7 = new Object(); _local8 = (_arg5 - _arg3); _local9 = (_arg6 - _arg4); _local10 = Math.sqrt(((_local8 * _local8) + (_local9 * _local9))); _local11 = Math.ceil((_local10 / _arg2)); _local7.gravity = _arg1; _local7.steps = _local11; _local7.xStep = (_local8 / _local11); _local7.yStep = (_local9 / _local11); if (_arg1 > 0){ _local7.yStep = (_local7.yStep - ((_local11 * _arg1) / 2)); }; return (_local7); } function pointTowards(_arg1, _arg2, _arg3, _arg4):Object{ var _local5:Object; var _local6:*; var _local7:*; _local5 = new Object(); _local6 = (_arg1 - _arg3); _local7 = (_arg2 - _arg4); _local5.spriteAngle = Math.atan2(_local7, _local6); _local5.spriteRotation = ((_local5.spriteAngle * 180) / Math.PI); _local5.vx = Math.cos(_local5.spriteAngle); _local5.vy = Math.sin(_local5.spriteAngle); return (_local5); } function bxConvertToMetres(_arg1:Number, _arg2:Number){ return ((_arg1 / _arg2)); } function checkForLOS(_arg1, _arg2, _arg3, _arg4, _arg5){ var _local6:Number; var _local7:Object; var _local8:Number; var _local9:*; _local6 = int(getDistance(_arg1, _arg2, _arg3, _arg4)); _local7 = pointTowards(_arg1, _arg2, _arg3, _arg4); _local9 = 0; while (_local9 < _local6) { _local8 = rt.GameMain.groundArray[int(_arg1)]; if (int(_arg2) > _local8){ return (true); }; _arg1 = (_arg1 - _local7.vx); _arg2 = (_arg2 - _local7.vy); _local9++; }; return (false); } } }//package classesAS3
Section 144
//GameWall (classesAS3.GameWall) package classesAS3 { import flash.display.*; public class GameWall extends MovieClip { public var mySoldier:Object; public var rt:Object; public var energy:Number; public function GameWall(_arg1, _arg2, _arg3){ addFrameScript(39, frame40); rt = _arg1; energy = _arg2; mySoldier = _arg3; } function frame40(){ this.mySoldier.soldierState = 5; stop(); } } }//package classesAS3
Section 145
//GameWeaponsPanel (classesAS3.GameWeaponsPanel) package classesAS3 { import flash.display.*; import flash.events.*; import flash.text.*; public class GameWeaponsPanel extends MovieClip { public var musicBtn:SimpleButton; public var leftScrollBtn:SimpleButton; public var zb1:SimpleButton; public var zb3:SimpleButton; public var rightSpeech:MovieClip; public var zb2:SimpleButton; public var zb4:SimpleButton; public var rightNamesTxt:TextField; public var timer:MovieClip; public var kingGoodHead:MovieClip; public var levelTxt:TextField; public var soundFxBtn:SimpleButton; public var rt:Object; public var msg:TextField; public var score:TextField; public var rightScrollBtn:SimpleButton; public var quitBtn:SimpleButton; public var musicMc:MovieClip; public var soundFxMc:MovieClip; public var timer2:MovieClip; public var zoom4:MovieClip; public var zoom1:MovieClip; public var leftSpeech:leftSpeedBubble; public var pausePanelBtn:SimpleButton; public var money:TextField; public var zoom2:MovieClip; public var zoom3:MovieClip; public var kingBadHead:MovieClip; public function GameWeaponsPanel(_arg1){ addFrameScript(0, frame1); rt = _arg1; } public function doZoom3(_arg1:MouseEvent):void{ rt.inGameGraphicsMc.x = -(350); rt.inGameGraphicsMc.y = -270; rt.inGameZoomMc.x = 350; rt.inGameZoomMc.y = 270; rt.inGameZoomMc.scaleX = (rt.inGameZoomMc.scaleY = 0.8); rt.setupZoomBtns(); } public function doZoom4(_arg1:MouseEvent):void{ rt.inGameGraphicsMc.x = -(350); rt.inGameGraphicsMc.y = -270; rt.inGameZoomMc.x = 350; rt.inGameZoomMc.y = 270; rt.inGameZoomMc.scaleX = (rt.inGameZoomMc.scaleY = 0.7); rt.setupZoomBtns(); } public function doZoom1(_arg1:MouseEvent):void{ rt.inGameGraphicsMc.x = -(350); rt.inGameGraphicsMc.y = -270; rt.inGameZoomMc.x = 350; rt.inGameZoomMc.y = 270; rt.inGameZoomMc.scaleX = (rt.inGameZoomMc.scaleY = 1); rt.setupZoomBtns(); } public function doZoom2(_arg1:MouseEvent):void{ rt.inGameGraphicsMc.x = -(350); rt.inGameGraphicsMc.y = -270; rt.inGameZoomMc.x = 350; rt.inGameZoomMc.y = 270; rt.inGameZoomMc.scaleX = (rt.inGameZoomMc.scaleY = 0.9); rt.setupZoomBtns(); } public function doLeft(_arg1:MouseEvent):void{ rt.scrollScreen = "left"; } public function doRight(_arg1:MouseEvent):void{ rt.scrollScreen = "right"; } function frame1(){ zb1.addEventListener(MouseEvent.MOUSE_UP, doZoom1); zb2.addEventListener(MouseEvent.MOUSE_UP, doZoom2); zb3.addEventListener(MouseEvent.MOUSE_UP, doZoom3); zb4.addEventListener(MouseEvent.MOUSE_UP, doZoom4); stop(); leftScrollBtn.addEventListener(MouseEvent.MOUSE_DOWN, doLeft); rightScrollBtn.addEventListener(MouseEvent.MOUSE_DOWN, doRight); } } }//package classesAS3
Section 146
//GameViking1 (classesAS3.GameViking1) package classesAS3 { import flash.display.*; public class GameViking1 extends MovieClip { public var myType:String; public var goodBad:Boolean; public var myObject:Object; public var mySmoke; public var collisionWith:MovieClip; public var collisionWithS:MovieClip; public var noRotation:Boolean; public var myShapeDef:Object; public var myParent:Object; public var rt:Object; public var energy:Number; public var filterData:Object; public var myBodyDef:Object; public var buildingBit:Boolean;// = false public function GameViking1(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6){ buildingBit = false; super(); addFrameScript(0, frame1); rt = _arg1; myBodyDef = _arg2; myShapeDef = _arg3; myType = _arg4; myParent = _arg5; mySmoke = null; goodBad = _arg6; energy = 100; noRotation = true; } function destroyMe(){ rt.m_world.DestroyBody(myBodyDef); removeMe(); } public function removeMe(){ myObject.remove(); this.stop(); } function frame1(){ stop(); } public function checkOffScreen(){ if (this.x > 1700){ destroyMe(); } else { if (this.x < -50){ destroyMe(); }; }; if (this.y > 800){ destroyMe(); }; } public function decreaseEnergy(_arg1){ myObject.decreaseEnergy(_arg1); } public function setupPuffSmoke(){ if (mySmoke == null){ mySmoke = new GameHitFloorSmoke(rt, myParent, this); mySmoke.x = this.x; mySmoke.y = this.y; myParent.addChild(mySmoke); }; } } }//package classesAS3
Section 147
//GameWizard1 (classesAS3.GameWizard1) package classesAS3 { import flash.display.*; public class GameWizard1 extends MovieClip { public var myType:String; public var goodBad:Boolean; public var myObject:Object; public var mySmoke; public var collisionWith:MovieClip; public var collisionWithS:MovieClip; public var collisionWithW:MovieClip; public var noRotation:Boolean; public var myShapeDef:Object; public var myParent:Object; public var rt:Object; public var soldier:MovieClip; public var energy:Number; public var filterData:Object; public var myBodyDef:Object; public var buildingBit:Boolean;// = false public function GameWizard1(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6){ buildingBit = false; super(); rt = _arg1; myBodyDef = _arg2; myShapeDef = _arg3; myType = _arg4; myParent = _arg5; mySmoke = null; goodBad = _arg6; energy = 100; noRotation = true; } function destroyMe(){ if (rt.bodyGrabbed == myBodyDef){ rt.bodyGrabbed = null; }; rt.m_world.DestroyBody(myBodyDef); removeMe(); } public function removeMe(){ myParent.removeChild(this); } public function checkOffScreen(){ if (this.x > 1700){ destroyMe(); } else { if (this.x < -250){ destroyMe(); }; }; if (this.y > 800){ destroyMe(); }; } public function setupPuffSmoke(){ if (mySmoke == null){ mySmoke = new GameHitFloorSmoke(rt, myParent, this); mySmoke.x = this.x; mySmoke.y = this.y; myParent.addChild(mySmoke); }; } } }//package classesAS3
Section 148
//GameWoodBlock (classesAS3.GameWoodBlock) package classesAS3 { import flash.display.*; public class GameWoodBlock extends MovieClip { public var myType:String; public var goodBad:Boolean; public var myObject:Object; public var mySmoke; public var collisionWith:MovieClip; var myDelay:Number;// = 5 public var noRotation:Boolean; public var myShapeDef:Object; public var myParent:Object; public var rt:Object; public var energy:Number; public var block:MovieClip; public var filterData:Object; public var myBodyDef:Object; public var buildingBit:Boolean;// = true public function GameWoodBlock(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7){ buildingBit = true; myDelay = 5; super(); this.gotoAndStop(1); rt = _arg1; myBodyDef = _arg2; myShapeDef = _arg3; myType = _arg4; myParent = _arg5; mySmoke = null; goodBad = _arg7; noRotation = false; energy = _arg6; } function destroyMe(){ if (rt.bodyGrabbed == myBodyDef){ rt.bodyGrabbed = null; }; rt.m_world.DestroyBody(myBodyDef); removeMe(); } public function removeMe(){ myParent.removeChild(this); } public function checkOffScreen(){ if (this.x > 1700){ destroyMe(); } else { if (this.x < -250){ destroyMe(); }; }; if (this.y > 800){ destroyMe(); }; } public function decreaseEnergy(_arg1):Boolean{ var _local2:Number; myDelay--; if (myDelay == 0){ myDelay = 25; if (energy > 0){ energy = (energy - _arg1); if (energy <= 0){ rt.m_world.DestroyBody(myBodyDef); block.gotoAndPlay("blockBreak"); return (true); }; _local2 = int(((100 - energy) / 25)); block.gotoAndStop((_local2 + 1)); return (false); }; }; return (false); } public function setupPuffSmoke(){ if (mySmoke == null){ mySmoke = new GameHitFloorSmoke(rt, myParent, this); mySmoke.x = this.x; mySmoke.y = this.y; myParent.addChild(mySmoke); }; } } }//package classesAS3
Section 149
//GameWoodBlockEn (classesAS3.GameWoodBlockEn) package classesAS3 { import flash.display.*; public class GameWoodBlockEn extends MovieClip { public var myType:String; public var goodBad:Boolean; public var myObject:Object; public var mySmoke; public var collisionWith:MovieClip; var myDelay:Number;// = 5 public var noRotation:Boolean; public var myShapeDef:Object; public var myParent:Object; public var rt:Object; public var energy:Number; public var block:MovieClip; public var filterData:Object; public var myBodyDef:Object; public var buildingBit:Boolean;// = true public function GameWoodBlockEn(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7){ buildingBit = true; myDelay = 5; super(); this.gotoAndStop(1); rt = _arg1; myBodyDef = _arg2; myShapeDef = _arg3; myType = _arg4; myParent = _arg5; mySmoke = null; goodBad = _arg7; noRotation = false; energy = _arg6; } function destroyMe(){ if (rt.bodyGrabbed == myBodyDef){ rt.bodyGrabbed = null; }; rt.m_world.DestroyBody(myBodyDef); removeMe(); } public function removeMe(){ myParent.removeChild(this); } public function checkOffScreen(){ if (this.x > 1700){ destroyMe(); } else { if (this.x < -50){ destroyMe(); }; }; if (this.y > 800){ destroyMe(); }; } public function decreaseEnergy(_arg1):Boolean{ var _local2:Number; myDelay--; if (myDelay == 0){ myDelay = 5; if (energy > 0){ energy = (energy - _arg1); if (energy <= 0){ rt.m_world.DestroyBody(myBodyDef); block.gotoAndPlay("blockBreak"); return (true); }; _local2 = int(((100 - energy) / 25)); block.gotoAndStop((_local2 + 1)); return (false); }; }; return (false); } public function setupPuffSmoke(){ if (mySmoke == null){ mySmoke = new GameHitFloorSmoke(rt, myParent, this); mySmoke.x = this.x; mySmoke.y = this.y; myParent.addChild(mySmoke); }; } } }//package classesAS3
Section 150
//GameZombie (classesAS3.GameZombie) package classesAS3 { import flash.display.*; public class GameZombie extends MovieClip { public var myObject:Object; public var myParent:Object; public var rt:Object; public function GameZombie(_arg1, _arg2){ myParent = _arg1; rt = _arg2; } } }//package classesAS3
Section 151
//MD5 (com.adobe.crypto.MD5) package com.adobe.crypto { import com.adobe.utils.*; public class MD5 { private static function ff(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{ return (transform(f, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7)); } private static function createBlocks(_arg1:String):Array{ var _local2:Array; var _local3:int; var _local4:int; var _local5:int; _local2 = new Array(); _local3 = (_arg1.length * 8); _local4 = 0xFF; _local5 = 0; while (_local5 < _local3) { _local2[(_local5 >> 5)] = (_local2[(_local5 >> 5)] | ((_arg1.charCodeAt((_local5 / 8)) & _local4) << (_local5 % 32))); _local5 = (_local5 + 8); }; _local2[(_local3 >> 5)] = (_local2[(_local3 >> 5)] | (128 << (_local3 % 32))); _local2[((((_local3 + 64) >>> 9) << 4) + 14)] = _local3; return (_local2); } private static function ii(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{ return (transform(i, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7)); } private static function f(_arg1:int, _arg2:int, _arg3:int):int{ return (((_arg1 & _arg2) | (~(_arg1) & _arg3))); } private static function g(_arg1:int, _arg2:int, _arg3:int):int{ return (((_arg1 & _arg3) | (_arg2 & ~(_arg3)))); } private static function h(_arg1:int, _arg2:int, _arg3:int):int{ return (((_arg1 ^ _arg2) ^ _arg3)); } private static function i(_arg1:int, _arg2:int, _arg3:int):int{ return ((_arg2 ^ (_arg1 | ~(_arg3)))); } private static function transform(_arg1:Function, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int, _arg8:int):int{ var _local9:int; _local9 = (((_arg2 + int(_arg1(_arg3, _arg4, _arg5))) + _arg6) + _arg8); return ((IntUtil.rol(_local9, _arg7) + _arg3)); } private static function hh(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{ return (transform(h, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7)); } public static function hash(_arg1:String):String{ var _local2:int; var _local3:int; var _local4:int; var _local5:int; var _local6:int; var _local7:int; var _local8:int; var _local9:int; var _local10:Array; var _local11:int; var _local12:int; _local2 = 1732584193; _local3 = -271733879; _local4 = -1732584194; _local5 = 271733878; _local10 = createBlocks(_arg1); _local11 = _local10.length; _local12 = 0; while (_local12 < _local11) { _local6 = _local2; _local7 = _local3; _local8 = _local4; _local9 = _local5; _local2 = ff(_local2, _local3, _local4, _local5, _local10[(_local12 + 0)], 7, -680876936); _local5 = ff(_local5, _local2, _local3, _local4, _local10[(_local12 + 1)], 12, -389564586); _local4 = ff(_local4, _local5, _local2, _local3, _local10[(_local12 + 2)], 17, 606105819); _local3 = ff(_local3, _local4, _local5, _local2, _local10[(_local12 + 3)], 22, -1044525330); _local2 = ff(_local2, _local3, _local4, _local5, _local10[(_local12 + 4)], 7, -176418897); _local5 = ff(_local5, _local2, _local3, _local4, _local10[(_local12 + 5)], 12, 1200080426); _local4 = ff(_local4, _local5, _local2, _local3, _local10[(_local12 + 6)], 17, -1473231341); _local3 = ff(_local3, _local4, _local5, _local2, _local10[(_local12 + 7)], 22, -45705983); _local2 = ff(_local2, _local3, _local4, _local5, _local10[(_local12 + 8)], 7, 1770035416); _local5 = ff(_local5, _local2, _local3, _local4, _local10[(_local12 + 9)], 12, -1958414417); _local4 = ff(_local4, _local5, _local2, _local3, _local10[(_local12 + 10)], 17, -42063); _local3 = ff(_local3, _local4, _local5, _local2, _local10[(_local12 + 11)], 22, -1990404162); _local2 = ff(_local2, _local3, _local4, _local5, _local10[(_local12 + 12)], 7, 1804603682); _local5 = ff(_local5, _local2, _local3, _local4, _local10[(_local12 + 13)], 12, -40341101); _local4 = ff(_local4, _local5, _local2, _local3, _local10[(_local12 + 14)], 17, -1502002290); _local3 = ff(_local3, _local4, _local5, _local2, _local10[(_local12 + 15)], 22, 1236535329); _local2 = gg(_local2, _local3, _local4, _local5, _local10[(_local12 + 1)], 5, -165796510); _local5 = gg(_local5, _local2, _local3, _local4, _local10[(_local12 + 6)], 9, -1069501632); _local4 = gg(_local4, _local5, _local2, _local3, _local10[(_local12 + 11)], 14, 643717713); _local3 = gg(_local3, _local4, _local5, _local2, _local10[(_local12 + 0)], 20, -373897302); _local2 = gg(_local2, _local3, _local4, _local5, _local10[(_local12 + 5)], 5, -701558691); _local5 = gg(_local5, _local2, _local3, _local4, _local10[(_local12 + 10)], 9, 38016083); _local4 = gg(_local4, _local5, _local2, _local3, _local10[(_local12 + 15)], 14, -660478335); _local3 = gg(_local3, _local4, _local5, _local2, _local10[(_local12 + 4)], 20, -405537848); _local2 = gg(_local2, _local3, _local4, _local5, _local10[(_local12 + 9)], 5, 568446438); _local5 = gg(_local5, _local2, _local3, _local4, _local10[(_local12 + 14)], 9, -1019803690); _local4 = gg(_local4, _local5, _local2, _local3, _local10[(_local12 + 3)], 14, -187363961); _local3 = gg(_local3, _local4, _local5, _local2, _local10[(_local12 + 8)], 20, 1163531501); _local2 = gg(_local2, _local3, _local4, _local5, _local10[(_local12 + 13)], 5, -1444681467); _local5 = gg(_local5, _local2, _local3, _local4, _local10[(_local12 + 2)], 9, -51403784); _local4 = gg(_local4, _local5, _local2, _local3, _local10[(_local12 + 7)], 14, 1735328473); _local3 = gg(_local3, _local4, _local5, _local2, _local10[(_local12 + 12)], 20, -1926607734); _local2 = hh(_local2, _local3, _local4, _local5, _local10[(_local12 + 5)], 4, -378558); _local5 = hh(_local5, _local2, _local3, _local4, _local10[(_local12 + 8)], 11, -2022574463); _local4 = hh(_local4, _local5, _local2, _local3, _local10[(_local12 + 11)], 16, 1839030562); _local3 = hh(_local3, _local4, _local5, _local2, _local10[(_local12 + 14)], 23, -35309556); _local2 = hh(_local2, _local3, _local4, _local5, _local10[(_local12 + 1)], 4, -1530992060); _local5 = hh(_local5, _local2, _local3, _local4, _local10[(_local12 + 4)], 11, 1272893353); _local4 = hh(_local4, _local5, _local2, _local3, _local10[(_local12 + 7)], 16, -155497632); _local3 = hh(_local3, _local4, _local5, _local2, _local10[(_local12 + 10)], 23, -1094730640); _local2 = hh(_local2, _local3, _local4, _local5, _local10[(_local12 + 13)], 4, 681279174); _local5 = hh(_local5, _local2, _local3, _local4, _local10[(_local12 + 0)], 11, -358537222); _local4 = hh(_local4, _local5, _local2, _local3, _local10[(_local12 + 3)], 16, -722521979); _local3 = hh(_local3, _local4, _local5, _local2, _local10[(_local12 + 6)], 23, 76029189); _local2 = hh(_local2, _local3, _local4, _local5, _local10[(_local12 + 9)], 4, -640364487); _local5 = hh(_local5, _local2, _local3, _local4, _local10[(_local12 + 12)], 11, -421815835); _local4 = hh(_local4, _local5, _local2, _local3, _local10[(_local12 + 15)], 16, 530742520); _local3 = hh(_local3, _local4, _local5, _local2, _local10[(_local12 + 2)], 23, -995338651); _local2 = ii(_local2, _local3, _local4, _local5, _local10[(_local12 + 0)], 6, -198630844); _local5 = ii(_local5, _local2, _local3, _local4, _local10[(_local12 + 7)], 10, 1126891415); _local4 = ii(_local4, _local5, _local2, _local3, _local10[(_local12 + 14)], 15, -1416354905); _local3 = ii(_local3, _local4, _local5, _local2, _local10[(_local12 + 5)], 21, -57434055); _local2 = ii(_local2, _local3, _local4, _local5, _local10[(_local12 + 12)], 6, 1700485571); _local5 = ii(_local5, _local2, _local3, _local4, _local10[(_local12 + 3)], 10, -1894986606); _local4 = ii(_local4, _local5, _local2, _local3, _local10[(_local12 + 10)], 15, -1051523); _local3 = ii(_local3, _local4, _local5, _local2, _local10[(_local12 + 1)], 21, -2054922799); _local2 = ii(_local2, _local3, _local4, _local5, _local10[(_local12 + 8)], 6, 1873313359); _local5 = ii(_local5, _local2, _local3, _local4, _local10[(_local12 + 15)], 10, -30611744); _local4 = ii(_local4, _local5, _local2, _local3, _local10[(_local12 + 6)], 15, -1560198380); _local3 = ii(_local3, _local4, _local5, _local2, _local10[(_local12 + 13)], 21, 1309151649); _local2 = ii(_local2, _local3, _local4, _local5, _local10[(_local12 + 4)], 6, -145523070); _local5 = ii(_local5, _local2, _local3, _local4, _local10[(_local12 + 11)], 10, -1120210379); _local4 = ii(_local4, _local5, _local2, _local3, _local10[(_local12 + 2)], 15, 718787259); _local3 = ii(_local3, _local4, _local5, _local2, _local10[(_local12 + 9)], 21, -343485551); _local2 = (_local2 + _local6); _local3 = (_local3 + _local7); _local4 = (_local4 + _local8); _local5 = (_local5 + _local9); _local12 = (_local12 + 16); }; return ((((IntUtil.toHex(_local2) + IntUtil.toHex(_local3)) + IntUtil.toHex(_local4)) + IntUtil.toHex(_local5))); } private static function gg(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{ return (transform(g, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7)); } } }//package com.adobe.crypto
Section 152
//IntUtil (com.adobe.utils.IntUtil) package com.adobe.utils { public class IntUtil { private static var hexChars:String = "0123456789abcdef"; public static function toHex(_arg1:int, _arg2:Boolean=false):String{ var _local3:String; var _local4:int; var _local5:int; _local3 = ""; if (_arg2){ _local4 = 0; while (_local4 < 4) { _local3 = (_local3 + (hexChars.charAt(((_arg1 >> (((3 - _local4) * 8) + 4)) & 15)) + hexChars.charAt(((_arg1 >> ((3 - _local4) * 8)) & 15)))); _local4++; }; } else { _local5 = 0; while (_local5 < 4) { _local3 = (_local3 + (hexChars.charAt(((_arg1 >> ((_local5 * 8) + 4)) & 15)) + hexChars.charAt(((_arg1 >> (_local5 * 8)) & 15)))); _local5++; }; }; return (_local3); } public static function ror(_arg1:int, _arg2:int):uint{ var _local3:int; _local3 = (32 - _arg2); return (((_arg1 << _local3) | (_arg1 >>> (32 - _local3)))); } public static function rol(_arg1:int, _arg2:int):int{ return (((_arg1 << _arg2) | (_arg1 >>> (32 - _arg2)))); } } }//package com.adobe.utils
Section 153
//Color (fl.motion.Color) package fl.motion { import flash.display.*; import flash.geom.*; public class Color extends ColorTransform { private var _tintMultiplier:Number;// = 0 private var _tintColor:Number;// = 0 public function Color(_arg1:Number=1, _arg2:Number=1, _arg3:Number=1, _arg4:Number=1, _arg5:Number=0, _arg6:Number=0, _arg7:Number=0, _arg8:Number=0){ _tintColor = 0; _tintMultiplier = 0; super(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8); } public function setTint(_arg1:uint, _arg2:Number):void{ var _local3:uint; var _local4:uint; var _local5:uint; this._tintColor = _arg1; this._tintMultiplier = _arg2; this.redMultiplier = (this.greenMultiplier = (this.blueMultiplier = (1 - _arg2))); _local3 = ((_arg1 >> 16) & 0xFF); _local4 = ((_arg1 >> 8) & 0xFF); _local5 = (_arg1 & 0xFF); this.redOffset = Math.round((_local3 * _arg2)); this.greenOffset = Math.round((_local4 * _arg2)); this.blueOffset = Math.round((_local5 * _arg2)); } public function set tintColor(_arg1:uint):void{ this.setTint(_arg1, this.tintMultiplier); } public function get brightness():Number{ return ((this.redOffset) ? (1 - this.redMultiplier) : (this.redMultiplier - 1)); } private function deriveTintColor():uint{ var _local1:Number; var _local2:uint; var _local3:uint; var _local4:uint; var _local5:uint; _local1 = (1 / this.tintMultiplier); _local2 = Math.round((this.redOffset * _local1)); _local3 = Math.round((this.greenOffset * _local1)); _local4 = Math.round((this.blueOffset * _local1)); _local5 = (((_local2 << 16) | (_local3 << 8)) | _local4); return (_local5); } public function get tintMultiplier():Number{ return (this._tintMultiplier); } public function get tintColor():uint{ return (this._tintColor); } public function set brightness(_arg1:Number):void{ var _local2:Number; var _local3:Number; if (_arg1 > 1){ _arg1 = 1; } else { if (_arg1 < -1){ _arg1 = -1; }; }; _local2 = (1 - Math.abs(_arg1)); _local3 = 0; if (_arg1 > 0){ _local3 = (_arg1 * 0xFF); }; this.redMultiplier = (this.greenMultiplier = (this.blueMultiplier = _local2)); this.redOffset = (this.greenOffset = (this.blueOffset = _local3)); } public function set tintMultiplier(_arg1:Number):void{ this.setTint(this.tintColor, _arg1); } private function parseXML(_arg1:XML=null):Color{ var _local2:XML; var _local3:XML; var _local4:String; var _local5:uint; if (!_arg1){ return (this); }; _local2 = _arg1.elements()[0]; if (!_local2){ return (this); }; for each (_local3 in _local2.attributes()) { _local4 = _local3.localName(); if (_local4 == "tintColor"){ _local5 = (Number(_local3.toString()) as uint); this.tintColor = _local5; } else { this[_local4] = Number(_local3.toString()); }; }; return (this); } public static function interpolateColor(_arg1:uint, _arg2:uint, _arg3:Number):uint{ var _local4:Number; var _local5:uint; var _local6:uint; var _local7:uint; var _local8:uint; var _local9:uint; var _local10:uint; var _local11:uint; var _local12:uint; var _local13:uint; var _local14:uint; var _local15:uint; var _local16:uint; var _local17:uint; _local4 = (1 - _arg3); _local5 = ((_arg1 >> 24) & 0xFF); _local6 = ((_arg1 >> 16) & 0xFF); _local7 = ((_arg1 >> 8) & 0xFF); _local8 = (_arg1 & 0xFF); _local9 = ((_arg2 >> 24) & 0xFF); _local10 = ((_arg2 >> 16) & 0xFF); _local11 = ((_arg2 >> 8) & 0xFF); _local12 = (_arg2 & 0xFF); _local13 = ((_local5 * _local4) + (_local9 * _arg3)); _local14 = ((_local6 * _local4) + (_local10 * _arg3)); _local15 = ((_local7 * _local4) + (_local11 * _arg3)); _local16 = ((_local8 * _local4) + (_local12 * _arg3)); _local17 = ((((_local13 << 24) | (_local14 << 16)) | (_local15 << 8)) | _local16); return (_local17); } public static function interpolateTransform(_arg1:ColorTransform, _arg2:ColorTransform, _arg3:Number):ColorTransform{ var _local4:Number; var _local5:ColorTransform; _local4 = (1 - _arg3); _local5 = new ColorTransform(((_arg1.redMultiplier * _local4) + (_arg2.redMultiplier * _arg3)), ((_arg1.greenMultiplier * _local4) + (_arg2.greenMultiplier * _arg3)), ((_arg1.blueMultiplier * _local4) + (_arg2.blueMultiplier * _arg3)), ((_arg1.alphaMultiplier * _local4) + (_arg2.alphaMultiplier * _arg3)), ((_arg1.redOffset * _local4) + (_arg2.redOffset * _arg3)), ((_arg1.greenOffset * _local4) + (_arg2.greenOffset * _arg3)), ((_arg1.blueOffset * _local4) + (_arg2.blueOffset * _arg3)), ((_arg1.alphaOffset * _local4) + (_arg2.alphaOffset * _arg3))); return (_local5); } public static function fromXML(_arg1:XML):Color{ return (Color(new (Color).parseXML(_arg1))); } } }//package fl.motion
Section 154
//alt_intro_holder_369 (QFP2_AB_v31_fla.alt_intro_holder_369) package QFP2_AB_v31_fla { import flash.display.*; public dynamic class alt_intro_holder_369 extends MovieClip { public function alt_intro_holder_369(){ addFrameScript(114, frame115); } function frame115(){ stop(); } } }//package QFP2_AB_v31_fla
Section 155
//archerDie1_92 (QFP2_AB_v31_fla.archerDie1_92) package QFP2_AB_v31_fla { import flash.display.*; import flash.events.*; import flash.media.*; import flash.geom.*; import flash.filters.*; import flash.net.*; import flash.text.*; import flash.utils.*; import flash.system.*; import adobe.utils.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.printing.*; import flash.ui.*; import flash.xml.*; public dynamic class archerDie1_92 extends MovieClip { public function archerDie1_92(){ addFrameScript(19, frame20); } function frame20(){ MovieClip(this.parent.parent).removeMe(); stop(); } } }//package QFP2_AB_v31_fla
Section 156
//assetHolder_1 (QFP2_AB_v31_fla.assetHolder_1) package QFP2_AB_v31_fla { import flash.display.*; public dynamic class assetHolder_1 extends MovieClip { public function assetHolder_1(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package QFP2_AB_v31_fla
Section 157
//badArcherAttack1_168 (QFP2_AB_v31_fla.badArcherAttack1_168) package QFP2_AB_v31_fla { import flash.display.*; public dynamic class badArcherAttack1_168 extends MovieClip { public function badArcherAttack1_168(){ addFrameScript(9, frame10); } function frame10(){ stop(); } } }//package QFP2_AB_v31_fla
Section 158
//badArcherDie1_169 (QFP2_AB_v31_fla.badArcherDie1_169) package QFP2_AB_v31_fla { import flash.display.*; import flash.events.*; import flash.media.*; import flash.geom.*; import flash.filters.*; import flash.net.*; import flash.text.*; import flash.utils.*; import flash.system.*; import adobe.utils.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.printing.*; import flash.ui.*; import flash.xml.*; public dynamic class badArcherDie1_169 extends MovieClip { public function badArcherDie1_169(){ addFrameScript(20, frame21); } function frame21(){ MovieClip(this.parent).removeMe(); stop(); } } }//package QFP2_AB_v31_fla
Section 159
//badArcherSide1_166 (QFP2_AB_v31_fla.badArcherSide1_166) package QFP2_AB_v31_fla { import flash.display.*; public dynamic class badArcherSide1_166 extends MovieClip { public function badArcherSide1_166(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package QFP2_AB_v31_fla
Section 160
//badKing1Expressions_530 (QFP2_AB_v31_fla.badKing1Expressions_530) package QFP2_AB_v31_fla { import flash.display.*; public dynamic class badKing1Expressions_530 extends MovieClip { public function badKing1Expressions_530(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package QFP2_AB_v31_fla
Section 161
//badKing1PanelBack_410 (QFP2_AB_v31_fla.badKing1PanelBack_410) package QFP2_AB_v31_fla { import flash.display.*; public dynamic class badKing1PanelBack_410 extends MovieClip { public function badKing1PanelBack_410(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package QFP2_AB_v31_fla
Section 162
//badKing1PanelBack_529 (QFP2_AB_v31_fla.badKing1PanelBack_529) package QFP2_AB_v31_fla { import flash.display.*; public dynamic class badKing1PanelBack_529 extends MovieClip { public var expressions:MovieClip; public function badKing1PanelBack_529(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package QFP2_AB_v31_fla
Section 163
//badKing2Expressions_533 (QFP2_AB_v31_fla.badKing2Expressions_533) package QFP2_AB_v31_fla { import flash.display.*; public dynamic class badKing2Expressions_533 extends MovieClip { public function badKing2Expressions_533(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package QFP2_AB_v31_fla
Section 164
//badKing4Expressions_539 (QFP2_AB_v31_fla.badKing4Expressions_539) package QFP2_AB_v31_fla { import flash.display.*; public dynamic class badKing4Expressions_539 extends MovieClip { public function badKing4Expressions_539(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package QFP2_AB_v31_fla
Section 165
//badKing6Expressions_542 (QFP2_AB_v31_fla.badKing6Expressions_542) package QFP2_AB_v31_fla { import flash.display.*; public dynamic class badKing6Expressions_542 extends MovieClip { public function badKing6Expressions_542(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package QFP2_AB_v31_fla
Section 166
//badKingDie1_147 (QFP2_AB_v31_fla.badKingDie1_147) package QFP2_AB_v31_fla { import flash.display.*; import flash.events.*; import flash.media.*; import flash.geom.*; import flash.filters.*; import flash.net.*; import flash.text.*; import flash.utils.*; import flash.system.*; import adobe.utils.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.printing.*; import flash.ui.*; import flash.xml.*; public dynamic class badKingDie1_147 extends MovieClip { public function badKingDie1_147(){ addFrameScript(19, frame20); } function frame20(){ MovieClip(this.parent).removeMe(); stop(); } } }//package QFP2_AB_v31_fla
Section 167
//badKingDie2_228 (QFP2_AB_v31_fla.badKingDie2_228) package QFP2_AB_v31_fla { import flash.display.*; import flash.events.*; import flash.media.*; import flash.geom.*; import flash.filters.*; import flash.net.*; import flash.text.*; import flash.utils.*; import flash.system.*; import adobe.utils.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.printing.*; import flash.ui.*; import flash.xml.*; public dynamic class badKingDie2_228 extends MovieClip { public function badKingDie2_228(){ addFrameScript(19, frame20); } function frame20(){ MovieClip(this.parent).removeMe(); stop(); } } }//package QFP2_AB_v31_fla
Section 168
//badKingDie3_239 (QFP2_AB_v31_fla.badKingDie3_239) package QFP2_AB_v31_fla { import flash.display.*; import flash.events.*; import flash.media.*; import flash.geom.*; import flash.filters.*; import flash.net.*; import flash.text.*; import flash.utils.*; import flash.system.*; import adobe.utils.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.printing.*; import flash.ui.*; import flash.xml.*; public dynamic class badKingDie3_239 extends MovieClip { public function badKingDie3_239(){ addFrameScript(19, frame20); } function frame20(){ MovieClip(this.parent).removeMe(); stop(); } } }//package QFP2_AB_v31_fla
Section 169
//badKingDie4_251 (QFP2_AB_v31_fla.badKingDie4_251) package QFP2_AB_v31_fla { import flash.display.*; import flash.events.*; import flash.media.*; import flash.geom.*; import flash.filters.*; import flash.net.*; import flash.text.*; import flash.utils.*; import flash.system.*; import adobe.utils.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.printing.*; import flash.ui.*; import flash.xml.*; public dynamic class badKingDie4_251 extends MovieClip { public function badKingDie4_251(){ addFrameScript(19, frame20); } function frame20(){ MovieClip(this.parent).removeMe(); stop(); } } }//package QFP2_AB_v31_fla
Section 170
//badKingDie5_264 (QFP2_AB_v31_fla.badKingDie5_264) package QFP2_AB_v31_fla { import flash.display.*; import flash.events.*; import flash.media.*; import flash.geom.*; import flash.filters.*; import flash.net.*; import flash.text.*; import flash.utils.*; import flash.system.*; import adobe.utils.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.printing.*; import flash.ui.*; import flash.xml.*; public dynamic class badKingDie5_264 extends MovieClip { public function badKingDie5_264(){ addFrameScript(19, frame20); } function frame20(){ MovieClip(this.parent).removeMe(); stop(); } } }//package QFP2_AB_v31_fla
Section 171
//badKingDie6_269 (QFP2_AB_v31_fla.badKingDie6_269) package QFP2_AB_v31_fla { import flash.display.*; import flash.events.*; import flash.media.*; import flash.geom.*; import flash.filters.*; import flash.net.*; import flash.text.*; import flash.utils.*; import flash.system.*; import adobe.utils.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.printing.*; import flash.ui.*; import flash.xml.*; public dynamic class badKingDie6_269 extends MovieClip { public function badKingDie6_269(){ addFrameScript(12, frame13); } function frame13(){ MovieClip(this.parent).removeMe(); stop(); } } }//package QFP2_AB_v31_fla
Section 172
//badKingDie7_275 (QFP2_AB_v31_fla.badKingDie7_275) package QFP2_AB_v31_fla { import flash.display.*; import flash.events.*; import flash.media.*; import flash.geom.*; import flash.filters.*; import flash.net.*; import flash.text.*; import flash.utils.*; import flash.system.*; import adobe.utils.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.printing.*; import flash.ui.*; import flash.xml.*; public dynamic class badKingDie7_275 extends MovieClip { public function badKingDie7_275(){ addFrameScript(13, frame14); } function frame14(){ MovieClip(this.parent).removeMe(); stop(); } } }//package QFP2_AB_v31_fla
Section 173
//badKnightDie2_124 (QFP2_AB_v31_fla.badKnightDie2_124) package QFP2_AB_v31_fla { import flash.display.*; import flash.events.*; import flash.media.*; import flash.geom.*; import flash.filters.*; import flash.net.*; import flash.text.*; import flash.utils.*; import flash.system.*; import adobe.utils.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.printing.*; import flash.ui.*; import flash.xml.*; public dynamic class badKnightDie2_124 extends MovieClip { public function badKnightDie2_124(){ addFrameScript(20, frame21); } function frame21(){ MovieClip(this.parent).removeMe(); stop(); } } }//package QFP2_AB_v31_fla
Section 174
//badKnightDie3_178 (QFP2_AB_v31_fla.badKnightDie3_178) package QFP2_AB_v31_fla { import flash.display.*; import flash.events.*; import flash.media.*; import flash.geom.*; import flash.filters.*; import flash.net.*; import flash.text.*; import flash.utils.*; import flash.system.*; import adobe.utils.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.printing.*; import flash.ui.*; import flash.xml.*; public dynamic class badKnightDie3_178 extends MovieClip { public function badKnightDie3_178(){ addFrameScript(21, frame22); } function frame22(){ MovieClip(this.parent).removeMe(); stop(); } } }//package QFP2_AB_v31_fla
Section 175
//badKnightDie3b_158 (QFP2_AB_v31_fla.badKnightDie3b_158) package QFP2_AB_v31_fla { import flash.display.*; import flash.events.*; import flash.media.*; import flash.geom.*; import flash.filters.*; import flash.net.*; import flash.text.*; import flash.utils.*; import flash.system.*; import adobe.utils.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.printing.*; import flash.ui.*; import flash.xml.*; public dynamic class badKnightDie3b_158 extends MovieClip { public function badKnightDie3b_158(){ addFrameScript(20, frame21); } function frame21(){ MovieClip(this.parent).removeMe(); stop(); } } }//package QFP2_AB_v31_fla
Section 176
//basicFlag_397 (QFP2_AB_v31_fla.basicFlag_397) package QFP2_AB_v31_fla { import flash.display.*; public dynamic class basicFlag_397 extends MovieClip { public function basicFlag_397(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package QFP2_AB_v31_fla
Section 177
//basicFlag2_396 (QFP2_AB_v31_fla.basicFlag2_396) package QFP2_AB_v31_fla { import flash.display.*; public dynamic class basicFlag2_396 extends MovieClip { public var flag4b:MovieClip; public var flag4c:MovieClip; public var flag4d:MovieClip; public var flag4a:MovieClip; } }//package QFP2_AB_v31_fla
Section 178
//basicFlag3_395 (QFP2_AB_v31_fla.basicFlag3_395) package QFP2_AB_v31_fla { import flash.display.*; public dynamic class basicFlag3_395 extends MovieClip { public var flag3a:MovieClip; public var flag3b:MovieClip; } }//package QFP2_AB_v31_fla
Section 179
//bird_die_328 (QFP2_AB_v31_fla.bird_die_328) package QFP2_AB_v31_fla { import flash.display.*; import flash.events.*; import flash.media.*; import flash.geom.*; import flash.filters.*; import flash.net.*; import flash.text.*; import flash.utils.*; import flash.system.*; import adobe.utils.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.printing.*; import flash.ui.*; import flash.xml.*; public dynamic class bird_die_328 extends MovieClip { public function bird_die_328(){ addFrameScript(19, frame20); } function frame20(){ MovieClip(this.parent).myObject.remove(); stop(); } } }//package QFP2_AB_v31_fla
Section 180
//bird_fly_322 (QFP2_AB_v31_fla.bird_fly_322) package QFP2_AB_v31_fla { import flash.display.*; public dynamic class bird_fly_322 extends MovieClip { public var rock:GameRock; } }//package QFP2_AB_v31_fla
Section 181
//bottomPanelKingsPicBack_525 (QFP2_AB_v31_fla.bottomPanelKingsPicBack_525) package QFP2_AB_v31_fla { import flash.display.*; public dynamic class bottomPanelKingsPicBack_525 extends MovieClip { public var expressions:MovieClip; } }//package QFP2_AB_v31_fla
Section 182
//castleBlock_38 (QFP2_AB_v31_fla.castleBlock_38) package QFP2_AB_v31_fla { import flash.display.*; import flash.events.*; import flash.media.*; import flash.geom.*; import flash.filters.*; import flash.net.*; import flash.text.*; import flash.utils.*; import flash.system.*; import adobe.utils.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.printing.*; import flash.ui.*; import flash.xml.*; public dynamic class castleBlock_38 extends MovieClip { public function castleBlock_38(){ addFrameScript(0, frame1, 7, frame8); } function frame1(){ stop(); } function frame8(){ MovieClip(this.parent).removeMe(); } } }//package QFP2_AB_v31_fla
Section 183
//catapultNeedle_348 (QFP2_AB_v31_fla.catapultNeedle_348) package QFP2_AB_v31_fla { import flash.display.*; public dynamic class catapultNeedle_348 extends MovieClip { public var endMc:MovieClip; } }//package QFP2_AB_v31_fla
Section 184
//clockAnim_355 (QFP2_AB_v31_fla.clockAnim_355) package QFP2_AB_v31_fla { import flash.display.*; import flash.events.*; import flash.media.*; import flash.geom.*; import flash.filters.*; import flash.net.*; import flash.text.*; import flash.utils.*; import flash.system.*; import adobe.utils.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.printing.*; import flash.ui.*; import flash.xml.*; public dynamic class clockAnim_355 extends MovieClip { public function clockAnim_355(){ addFrameScript(44, frame45); } function frame45(){ MovieClip(this.parent.parent).rt.setupGoodGuy(this); if (MovieClip(this.parent).numberOrdered.text != 0){ gotoAndPlay(1); } else { MovieClip(this.parent).gotoAndStop(1); }; } } }//package QFP2_AB_v31_fla
Section 185
//clockAnim2_357 (QFP2_AB_v31_fla.clockAnim2_357) package QFP2_AB_v31_fla { import flash.display.*; import flash.events.*; import flash.media.*; import flash.geom.*; import flash.filters.*; import flash.net.*; import flash.text.*; import flash.utils.*; import flash.system.*; import adobe.utils.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.printing.*; import flash.ui.*; import flash.xml.*; public dynamic class clockAnim2_357 extends MovieClip { public function clockAnim2_357(){ addFrameScript(17, frame18); } function frame18(){ MovieClip(this.parent.parent).rt.setupGoodGuy(this); if (MovieClip(this.parent).numberOrdered.text != 0){ gotoAndPlay(1); } else { MovieClip(this.parent).gotoAndStop(1); }; } } }//package QFP2_AB_v31_fla
Section 186
//crossbowManAttack1_106 (QFP2_AB_v31_fla.crossbowManAttack1_106) package QFP2_AB_v31_fla { import flash.display.*; public dynamic class crossbowManAttack1_106 extends MovieClip { public function crossbowManAttack1_106(){ addFrameScript(10, frame11); } function frame11(){ stop(); } } }//package QFP2_AB_v31_fla
Section 187
//crossbowManDie1_110 (QFP2_AB_v31_fla.crossbowManDie1_110) package QFP2_AB_v31_fla { import flash.display.*; import flash.events.*; import flash.media.*; import flash.geom.*; import flash.filters.*; import flash.net.*; import flash.text.*; import flash.utils.*; import flash.system.*; import adobe.utils.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.printing.*; import flash.ui.*; import flash.xml.*; public dynamic class crossbowManDie1_110 extends MovieClip { public function crossbowManDie1_110(){ addFrameScript(20, frame21); } function frame21(){ MovieClip(this.parent).removeMe(); stop(); } } }//package QFP2_AB_v31_fla
Section 188
//dragon_die_337 (QFP2_AB_v31_fla.dragon_die_337) package QFP2_AB_v31_fla { import flash.display.*; import flash.events.*; import flash.media.*; import flash.geom.*; import flash.filters.*; import flash.net.*; import flash.text.*; import flash.utils.*; import flash.system.*; import adobe.utils.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.printing.*; import flash.ui.*; import flash.xml.*; public dynamic class dragon_die_337 extends MovieClip { public function dragon_die_337(){ addFrameScript(19, frame20); } function frame20(){ MovieClip(this.parent).myObject.remove(); stop(); } } }//package QFP2_AB_v31_fla
Section 189
//Endtitle_577 (QFP2_AB_v31_fla.Endtitle_577) package QFP2_AB_v31_fla { import flash.display.*; public dynamic class Endtitle_577 extends MovieClip { public function Endtitle_577(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package QFP2_AB_v31_fla
Section 190
//enemyBlock_205 (QFP2_AB_v31_fla.enemyBlock_205) package QFP2_AB_v31_fla { import flash.display.*; import flash.events.*; import flash.media.*; import flash.geom.*; import flash.filters.*; import flash.net.*; import flash.text.*; import flash.utils.*; import flash.system.*; import adobe.utils.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.printing.*; import flash.ui.*; import flash.xml.*; public dynamic class enemyBlock_205 extends MovieClip { public function enemyBlock_205(){ addFrameScript(0, frame1, 7, frame8); } function frame1(){ stop(); } function frame8(){ MovieClip(this.parent).removeMe(); } } }//package QFP2_AB_v31_fla
Section 191
//EnglandMap2_398 (QFP2_AB_v31_fla.EnglandMap2_398) package QFP2_AB_v31_fla { import flash.display.*; public dynamic class EnglandMap2_398 extends MovieClip { public function EnglandMap2_398(){ addFrameScript(23, frame24); } function frame24(){ stop(); } } }//package QFP2_AB_v31_fla
Section 192
//explodeBullet_623 (QFP2_AB_v31_fla.explodeBullet_623) package QFP2_AB_v31_fla { import flash.display.*; public dynamic class explodeBullet_623 extends MovieClip { public function explodeBullet_623(){ addFrameScript(4, frame5); } function frame5(){ } } }//package QFP2_AB_v31_fla
Section 193
//frontScreenAnim_586 (QFP2_AB_v31_fla.frontScreenAnim_586) package QFP2_AB_v31_fla { import flash.display.*; public dynamic class frontScreenAnim_586 extends MovieClip { public var soldier:MovieClip; public var bird:MovieClip; } }//package QFP2_AB_v31_fla
Section 194
//gameCompleteAnim_563 (QFP2_AB_v31_fla.gameCompleteAnim_563) package QFP2_AB_v31_fla { import flash.display.*; import flash.events.*; import flash.media.*; import flash.geom.*; import flash.filters.*; import flash.net.*; import flash.text.*; import flash.utils.*; import flash.system.*; import adobe.utils.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.printing.*; import flash.ui.*; import flash.xml.*; public dynamic class gameCompleteAnim_563 extends MovieClip { public function gameCompleteAnim_563(){ addFrameScript(241, frame242); } function frame242(){ MovieClip(parent.parent).rt.gameComplete(); stop(); } } }//package QFP2_AB_v31_fla
Section 195
//gameoverFilter_578 (QFP2_AB_v31_fla.gameoverFilter_578) package QFP2_AB_v31_fla { import flash.display.*; import flash.events.*; import flash.media.*; import flash.geom.*; import flash.filters.*; import flash.net.*; import flash.text.*; import flash.utils.*; import flash.system.*; import adobe.utils.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.printing.*; import flash.ui.*; import flash.xml.*; public dynamic class gameoverFilter_578 extends MovieClip { public var submitBtn:SimpleButton; public var moreGamesBtn:SimpleButton; public var score:TextField; public var quitBtn:SimpleButton; public var nameTxt:TextField; public function gameoverFilter_578(){ addFrameScript(0, frame1, 1, frame2); } public function doRestart(_arg1:MouseEvent):void{ MovieClip(this.parent.parent).rt.restartLevel(); } public function doViewScores(_arg1:MouseEvent):void{ } public function doMoreGames(_arg1:MouseEvent):void{ navigateToURL(new URLRequest("http://www.arcadebomb.com"), "_blank"); } function frame1(){ score.text = MovieClip(this.parent.parent).rt.score; submitBtn.addEventListener(MouseEvent.MOUSE_UP, doSubmit); moreGamesBtn.addEventListener(MouseEvent.MOUSE_UP, doMoreGames); quitBtn.addEventListener(MouseEvent.MOUSE_UP, doQuit); stop(); } public function doSubmit(_arg1:MouseEvent):void{ if (nameTxt.text != ""){ MovieClip(this.parent.parent).buttonPressed(nameTxt.text, MovieClip(this.parent.parent).rt.score); gotoAndStop(2); }; } function frame2(){ score.text = MovieClip(this.parent.parent).rt.score; moreGamesBtn.addEventListener(MouseEvent.MOUSE_UP, doMoreGames); quitBtn.addEventListener(MouseEvent.MOUSE_UP, doQuit); stop(); } public function doQuit(_arg1:MouseEvent):void{ MovieClip(this.parent.parent).rt.quitGame(); } } }//package QFP2_AB_v31_fla
Section 196
//gameOverMsg_568 (QFP2_AB_v31_fla.gameOverMsg_568) package QFP2_AB_v31_fla { import flash.display.*; import flash.events.*; import flash.media.*; import flash.geom.*; import flash.filters.*; import flash.net.*; import flash.text.*; import flash.utils.*; import flash.system.*; import adobe.utils.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.printing.*; import flash.ui.*; import flash.xml.*; public dynamic class gameOverMsg_568 extends MovieClip { public var endTitle:MovieClip; public var msg:MovieClip; public function gameOverMsg_568(){ addFrameScript(0, frame1, 9, frame10, 13, frame14); } function frame10(){ if (MovieClip(this.parent).rt.levelNumber >= MovieClip(this.parent).rt.maxLevels){ endTitle.gotoAndStop(2); }; if (MovieClip(this.parent).rt.rt.mindJolt == true){ msg.gotoAndStop(3); }; } function frame14(){ stop(); } function frame1(){ stop(); } } }//package QFP2_AB_v31_fla
Section 197
//gameSolderWizard_305 (QFP2_AB_v31_fla.gameSolderWizard_305) package QFP2_AB_v31_fla { import flash.display.*; public dynamic class gameSolderWizard_305 extends MovieClip { public function gameSolderWizard_305(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package QFP2_AB_v31_fla
Section 198
//gameSoldier1_50 (QFP2_AB_v31_fla.gameSoldier1_50) package QFP2_AB_v31_fla { import flash.display.*; public dynamic class gameSoldier1_50 extends MovieClip { public function gameSoldier1_50(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package QFP2_AB_v31_fla
Section 199
//gameSoldier2_65 (QFP2_AB_v31_fla.gameSoldier2_65) package QFP2_AB_v31_fla { import flash.display.*; public dynamic class gameSoldier2_65 extends MovieClip { public function gameSoldier2_65(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package QFP2_AB_v31_fla
Section 200
//gameSoldier3_81 (QFP2_AB_v31_fla.gameSoldier3_81) package QFP2_AB_v31_fla { import flash.display.*; public dynamic class gameSoldier3_81 extends MovieClip { public var archer:MovieClip; public function gameSoldier3_81(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package QFP2_AB_v31_fla
Section 201
//GameSoldier5_277 (QFP2_AB_v31_fla.GameSoldier5_277) package QFP2_AB_v31_fla { import flash.display.*; public dynamic class GameSoldier5_277 extends MovieClip { public function GameSoldier5_277(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package QFP2_AB_v31_fla
Section 202
//goodKingDie_134 (QFP2_AB_v31_fla.goodKingDie_134) package QFP2_AB_v31_fla { import flash.display.*; import flash.events.*; import flash.media.*; import flash.geom.*; import flash.filters.*; import flash.net.*; import flash.text.*; import flash.utils.*; import flash.system.*; import adobe.utils.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.printing.*; import flash.ui.*; import flash.xml.*; public dynamic class goodKingDie_134 extends MovieClip { public function goodKingDie_134(){ addFrameScript(19, frame20); } function frame20(){ MovieClip(this.parent).rt.rt.gameOver("game_over"); stop(); } } }//package QFP2_AB_v31_fla
Section 203
//goodKingExpressions_526 (QFP2_AB_v31_fla.goodKingExpressions_526) package QFP2_AB_v31_fla { import flash.display.*; public dynamic class goodKingExpressions_526 extends MovieClip { public function goodKingExpressions_526(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package QFP2_AB_v31_fla
Section 204
//halfWayFlag_393 (QFP2_AB_v31_fla.halfWayFlag_393) package QFP2_AB_v31_fla { import flash.display.*; public dynamic class halfWayFlag_393 extends MovieClip { public var flag2:MovieClip; } }//package QFP2_AB_v31_fla
Section 205
//instructionsBtns_630 (QFP2_AB_v31_fla.instructionsBtns_630) package QFP2_AB_v31_fla { import flash.display.*; import flash.events.*; import flash.media.*; import flash.geom.*; import flash.filters.*; import flash.net.*; import flash.text.*; import flash.utils.*; import flash.system.*; import adobe.utils.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.printing.*; import flash.ui.*; import flash.xml.*; public dynamic class instructionsBtns_630 extends MovieClip { public var backBtn:SimpleButton; public var nextBtn:SimpleButton; public var endBtn:SimpleButton; public var startBtn:SimpleButton; public function instructionsBtns_630(){ addFrameScript(0, frame1); } function frame1(){ startBtn.addEventListener(MouseEvent.MOUSE_DOWN, gotoStart, false); endBtn.addEventListener(MouseEvent.MOUSE_DOWN, gotoEnd, false); backBtn.addEventListener(MouseEvent.MOUSE_DOWN, gotoBack, false); nextBtn.addEventListener(MouseEvent.MOUSE_DOWN, gotoNext, false); } public function gotoEnd(_arg1:MouseEvent):void{ MovieClip(parent).vid.gotoAndStop(MovieClip(parent).vid.totalFrames); MovieClip(parent).txt.gotoAndStop(MovieClip(parent).txt.totalFrames); } public function gotoStart(_arg1:MouseEvent):void{ MovieClip(parent).vid.gotoAndStop(1); MovieClip(parent).txt.gotoAndStop(1); } public function gotoBack(_arg1:MouseEvent):void{ if (MovieClip(parent).vid.currentFrame == 1){ MovieClip(parent).vid.gotoAndStop(MovieClip(parent).vid.totalFrames); } else { MovieClip(parent).vid.gotoAndStop((MovieClip(parent).vid.currentFrame - 1)); }; if (MovieClip(parent).txt.currentFrame == 1){ MovieClip(parent).txt.gotoAndStop(MovieClip(parent).txt.totalFrames); } else { MovieClip(parent).txt.gotoAndStop((MovieClip(parent).txt.currentFrame - 1)); }; } public function gotoNext(_arg1:MouseEvent):void{ if (MovieClip(parent).vid.currentFrame == MovieClip(parent).vid.totalFrames){ MovieClip(parent).vid.gotoAndStop(1); } else { MovieClip(parent).vid.gotoAndStop((MovieClip(parent).vid.currentFrame + 1)); }; if (MovieClip(parent).txt.currentFrame == MovieClip(parent).txt.totalFrames){ MovieClip(parent).txt.gotoAndStop(1); } else { MovieClip(parent).txt.gotoAndStop((MovieClip(parent).txt.currentFrame + 1)); }; } } }//package QFP2_AB_v31_fla
Section 206
//instructionsTxtScreens_629 (QFP2_AB_v31_fla.instructionsTxtScreens_629) package QFP2_AB_v31_fla { import flash.display.*; public dynamic class instructionsTxtScreens_629 extends MovieClip { public function instructionsTxtScreens_629(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package QFP2_AB_v31_fla
Section 207
//instructionsVidPanel_637 (QFP2_AB_v31_fla.instructionsVidPanel_637) package QFP2_AB_v31_fla { import flash.display.*; public dynamic class instructionsVidPanel_637 extends MovieClip { public var soldier:MovieClip; public function instructionsVidPanel_637(){ addFrameScript(0, frame1); } function frame1(){ gotoAndStop(1); } } }//package QFP2_AB_v31_fla
Section 208
//king3Expressions_536 (QFP2_AB_v31_fla.king3Expressions_536) package QFP2_AB_v31_fla { import flash.display.*; public dynamic class king3Expressions_536 extends MovieClip { public function king3Expressions_536(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package QFP2_AB_v31_fla
Section 209
//knight4_310 (QFP2_AB_v31_fla.knight4_310) package QFP2_AB_v31_fla { import flash.display.*; public dynamic class knight4_310 extends MovieClip { public function knight4_310(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package QFP2_AB_v31_fla
Section 210
//knightDie1_62 (QFP2_AB_v31_fla.knightDie1_62) package QFP2_AB_v31_fla { import flash.display.*; import flash.events.*; import flash.media.*; import flash.geom.*; import flash.filters.*; import flash.net.*; import flash.text.*; import flash.utils.*; import flash.system.*; import adobe.utils.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.printing.*; import flash.ui.*; import flash.xml.*; public dynamic class knightDie1_62 extends MovieClip { public function knightDie1_62(){ addFrameScript(19, frame20); } function frame20(){ MovieClip(this.parent.parent).removeMe(); stop(); } } }//package QFP2_AB_v31_fla
Section 211
//knightDie2_79 (QFP2_AB_v31_fla.knightDie2_79) package QFP2_AB_v31_fla { import flash.display.*; import flash.events.*; import flash.media.*; import flash.geom.*; import flash.filters.*; import flash.net.*; import flash.text.*; import flash.utils.*; import flash.system.*; import adobe.utils.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.printing.*; import flash.ui.*; import flash.xml.*; public dynamic class knightDie2_79 extends MovieClip { public function knightDie2_79(){ addFrameScript(19, frame20); } function frame20(){ MovieClip(this.parent.parent).removeMe(); stop(); } } }//package QFP2_AB_v31_fla
Section 212
//knightDie4_296 (QFP2_AB_v31_fla.knightDie4_296) package QFP2_AB_v31_fla { import flash.display.*; import flash.events.*; import flash.media.*; import flash.geom.*; import flash.filters.*; import flash.net.*; import flash.text.*; import flash.utils.*; import flash.system.*; import adobe.utils.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.printing.*; import flash.ui.*; import flash.xml.*; public dynamic class knightDie4_296 extends MovieClip { public function knightDie4_296(){ addFrameScript(12, frame13); } function frame13(){ MovieClip(this.parent.parent).removeMe(); stop(); } } }//package QFP2_AB_v31_fla
Section 213
//knightDie5_320 (QFP2_AB_v31_fla.knightDie5_320) package QFP2_AB_v31_fla { import flash.display.*; import flash.events.*; import flash.media.*; import flash.geom.*; import flash.filters.*; import flash.net.*; import flash.text.*; import flash.utils.*; import flash.system.*; import adobe.utils.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.printing.*; import flash.ui.*; import flash.xml.*; public dynamic class knightDie5_320 extends MovieClip { public function knightDie5_320(){ addFrameScript(19, frame20); } function frame20(){ MovieClip(this.parent.parent).removeMe(); stop(); } } }//package QFP2_AB_v31_fla
Section 214
//levelCompleteMsg_561 (QFP2_AB_v31_fla.levelCompleteMsg_561) package QFP2_AB_v31_fla { import flash.display.*; import flash.text.*; public dynamic class levelCompleteMsg_561 extends MovieClip { public var titleMc:levelCompleteMsgs; public var timeBonus:TextField; public var scoreBonus:TextField; public var totalScore:TextField; public function levelCompleteMsg_561(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package QFP2_AB_v31_fla
Section 215
//manStoneHitBack_477 (QFP2_AB_v31_fla.manStoneHitBack_477) package QFP2_AB_v31_fla { import flash.display.*; public dynamic class manStoneHitBack_477 extends MovieClip { public function manStoneHitBack_477(){ addFrameScript(9, frame10); } function frame10(){ MovieClip(this.parent).gotoAndStop("walk"); } } }//package QFP2_AB_v31_fla
Section 216
//mapScreenFlags_391 (QFP2_AB_v31_fla.mapScreenFlags_391) package QFP2_AB_v31_fla { import flash.display.*; import flash.events.*; import flash.media.*; import flash.geom.*; import flash.filters.*; import flash.net.*; import flash.text.*; import flash.utils.*; import flash.system.*; import adobe.utils.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.printing.*; import flash.ui.*; import flash.xml.*; public dynamic class mapScreenFlags_391 extends MovieClip { public var flagMc:halfWayFlag; public var flagNumber:Number; public function mapScreenFlags_391(){ addFrameScript(0, frame1); } function frame1(){ flagNumber = 15; flagMc.flag1.flag2.flag3a.flag4a.gotoAndStop(flagNumber); flagMc.flag1.flag2.flag3a.flag4b.gotoAndStop(flagNumber); flagMc.flag1.flag2.flag3a.flag4c.gotoAndStop(flagNumber); flagMc.flag1.flag2.flag3a.flag4d.gotoAndStop(flagNumber); flagMc.flag1.flag2.flag3b.flag4a.gotoAndStop(flagNumber); flagMc.flag1.flag2.flag3b.flag4b.gotoAndStop(flagNumber); flagMc.flag1.flag2.flag3b.flag4c.gotoAndStop(flagNumber); flagMc.flag1.flag2.flag3b.flag4d.gotoAndStop(flagNumber); } } }//package QFP2_AB_v31_fla
Section 217
//mapScreenFlags2_390 (QFP2_AB_v31_fla.mapScreenFlags2_390) package QFP2_AB_v31_fla { import flash.display.*; public dynamic class mapScreenFlags2_390 extends MovieClip { public function mapScreenFlags2_390(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package QFP2_AB_v31_fla
Section 218
//mapScreenScene_407 (QFP2_AB_v31_fla.mapScreenScene_407) package QFP2_AB_v31_fla { import flash.display.*; import flash.text.*; public dynamic class mapScreenScene_407 extends MovieClip { public var defenseTxt:TextField; public var rulerTxt:TextField; public var kingBadHead:MovieClip; } }//package QFP2_AB_v31_fla
Section 219
//merlinAnim_575 (QFP2_AB_v31_fla.merlinAnim_575) package QFP2_AB_v31_fla { import flash.display.*; public dynamic class merlinAnim_575 extends MovieClip { public function merlinAnim_575(){ addFrameScript(160, frame161); } function frame161(){ MovieClip(parent.parent).play(); stop(); } } }//package QFP2_AB_v31_fla
Section 220
//musicBtn2_513 (QFP2_AB_v31_fla.musicBtn2_513) package QFP2_AB_v31_fla { import flash.display.*; public dynamic class musicBtn2_513 extends MovieClip { public function musicBtn2_513(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package QFP2_AB_v31_fla
Section 221
//musicBtnMc_614 (QFP2_AB_v31_fla.musicBtnMc_614) package QFP2_AB_v31_fla { import flash.display.*; public dynamic class musicBtnMc_614 extends MovieClip { public function musicBtnMc_614(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package QFP2_AB_v31_fla
Section 222
//QFP_Title_Anim_604 (QFP2_AB_v31_fla.QFP_Title_Anim_604) package QFP2_AB_v31_fla { import flash.display.*; public dynamic class QFP_Title_Anim_604 extends MovieClip { public function QFP_Title_Anim_604(){ addFrameScript(770, frame771); } function frame771(){ stop(); } } }//package QFP2_AB_v31_fla
Section 223
//ramDie1_36 (QFP2_AB_v31_fla.ramDie1_36) package QFP2_AB_v31_fla { import flash.display.*; import flash.events.*; import flash.media.*; import flash.geom.*; import flash.filters.*; import flash.net.*; import flash.text.*; import flash.utils.*; import flash.system.*; import adobe.utils.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.printing.*; import flash.ui.*; import flash.xml.*; public dynamic class ramDie1_36 extends MovieClip { public function ramDie1_36(){ addFrameScript(20, frame21); } function frame21(){ MovieClip(this.parent).removeMe(); stop(); } } }//package QFP2_AB_v31_fla
Section 224
//righgSpeechBubble_551 (QFP2_AB_v31_fla.righgSpeechBubble_551) package QFP2_AB_v31_fla { import flash.display.*; import flash.text.*; public dynamic class righgSpeechBubble_551 extends MovieClip { public var txt:TextField; public function righgSpeechBubble_551(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package QFP2_AB_v31_fla
Section 225
//risingScoreTxt_489 (QFP2_AB_v31_fla.risingScoreTxt_489) package QFP2_AB_v31_fla { import flash.display.*; import flash.text.*; public dynamic class risingScoreTxt_489 extends MovieClip { public var scoreTxt:TextField; } }//package QFP2_AB_v31_fla
Section 226
//soldierDeath_466 (QFP2_AB_v31_fla.soldierDeath_466) package QFP2_AB_v31_fla { import flash.display.*; public dynamic class soldierDeath_466 extends MovieClip { public function soldierDeath_466(){ addFrameScript(12, frame13); } function frame13(){ stop(); } } }//package QFP2_AB_v31_fla
Section 227
//soldierHit_465 (QFP2_AB_v31_fla.soldierHit_465) package QFP2_AB_v31_fla { import flash.display.*; public dynamic class soldierHit_465 extends MovieClip { public function soldierHit_465(){ addFrameScript(8, frame9); } function frame9(){ MovieClip(this.parent).gotoAndStop("gunStand"); } } }//package QFP2_AB_v31_fla
Section 228
//soundFxBtn2_511 (QFP2_AB_v31_fla.soundFxBtn2_511) package QFP2_AB_v31_fla { import flash.display.*; public dynamic class soundFxBtn2_511 extends MovieClip { public function soundFxBtn2_511(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package QFP2_AB_v31_fla
Section 229
//sparker_randomizer_625 (QFP2_AB_v31_fla.sparker_randomizer_625) package QFP2_AB_v31_fla { import flash.display.*; public dynamic class sparker_randomizer_625 extends MovieClip { public function sparker_randomizer_625(){ addFrameScript(54, frame55); } function frame55(){ stop(); } } }//package QFP2_AB_v31_fla
Section 230
//splarkler_particle_627 (QFP2_AB_v31_fla.splarkler_particle_627) package QFP2_AB_v31_fla { import flash.display.*; public dynamic class splarkler_particle_627 extends MovieClip { public function splarkler_particle_627(){ addFrameScript(27, frame28); } function frame28(){ stop(); } } }//package QFP2_AB_v31_fla
Section 231
//timerAnimMc_553 (QFP2_AB_v31_fla.timerAnimMc_553) package QFP2_AB_v31_fla { import flash.display.*; public dynamic class timerAnimMc_553 extends MovieClip { public var timer:MovieClip; public var numberOfBubbles:Number; public var delay:Number; public var maskMc:MovieClip; public var bubbleCounter:Number; public function timerAnimMc_553(){ addFrameScript(0, frame1); } function frame1(){ numberOfBubbles = 10; bubbleCounter = 0; delay = 10; } } }//package QFP2_AB_v31_fla
Section 232
//upgradeBack_652 (QFP2_AB_v31_fla.upgradeBack_652) package QFP2_AB_v31_fla { import flash.display.*; public dynamic class upgradeBack_652 extends MovieClip { public function upgradeBack_652(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package QFP2_AB_v31_fla
Section 233
//upgradeClock_653 (QFP2_AB_v31_fla.upgradeClock_653) package QFP2_AB_v31_fla { import flash.display.*; import flash.events.*; import flash.media.*; import flash.geom.*; import flash.filters.*; import flash.net.*; import flash.text.*; import flash.utils.*; import flash.system.*; import adobe.utils.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.printing.*; import flash.ui.*; import flash.xml.*; public dynamic class upgradeClock_653 extends MovieClip { public function upgradeClock_653(){ addFrameScript(35, frame36); } function frame36(){ MovieClip(this.parent.parent).setupUpgrade(); MovieClip(this.parent).gotoAndStop(3); } } }//package QFP2_AB_v31_fla
Section 234
//weapons_470 (QFP2_AB_v31_fla.weapons_470) package QFP2_AB_v31_fla { import flash.display.*; public dynamic class weapons_470 extends MovieClip { public function weapons_470(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package QFP2_AB_v31_fla
Section 235
//vikingDie1_195 (QFP2_AB_v31_fla.vikingDie1_195) package QFP2_AB_v31_fla { import flash.display.*; import flash.events.*; import flash.media.*; import flash.geom.*; import flash.filters.*; import flash.net.*; import flash.text.*; import flash.utils.*; import flash.system.*; import adobe.utils.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.printing.*; import flash.ui.*; import flash.xml.*; public dynamic class vikingDie1_195 extends MovieClip { public function vikingDie1_195(){ addFrameScript(20, frame21); } function frame21(){ MovieClip(this.parent).removeMe(); stop(); } } }//package QFP2_AB_v31_fla
Section 236
//wizardDie_308 (QFP2_AB_v31_fla.wizardDie_308) package QFP2_AB_v31_fla { import flash.display.*; import flash.events.*; import flash.media.*; import flash.geom.*; import flash.filters.*; import flash.net.*; import flash.text.*; import flash.utils.*; import flash.system.*; import adobe.utils.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.printing.*; import flash.ui.*; import flash.xml.*; public dynamic class wizardDie_308 extends MovieClip { public function wizardDie_308(){ addFrameScript(19, frame20); } function frame20(){ MovieClip(this.parent.parent).removeMe(); stop(); } } }//package QFP2_AB_v31_fla
Section 237
//wizardSide_306 (QFP2_AB_v31_fla.wizardSide_306) package QFP2_AB_v31_fla { import flash.display.*; public dynamic class wizardSide_306 extends MovieClip { public function wizardSide_306(){ addFrameScript(9, frame10); } function frame10(){ stop(); } } }//package QFP2_AB_v31_fla
Section 238
//woodBlockEnemy_218 (QFP2_AB_v31_fla.woodBlockEnemy_218) package QFP2_AB_v31_fla { import flash.display.*; import flash.events.*; import flash.media.*; import flash.geom.*; import flash.filters.*; import flash.net.*; import flash.text.*; import flash.utils.*; import flash.system.*; import adobe.utils.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.printing.*; import flash.ui.*; import flash.xml.*; public dynamic class woodBlockEnemy_218 extends MovieClip { public function woodBlockEnemy_218(){ addFrameScript(0, frame1, 7, frame8); } function frame1(){ stop(); } function frame8(){ MovieClip(this.parent).removeMe(); } } }//package QFP2_AB_v31_fla
Section 239
//woodenBlock2_209 (QFP2_AB_v31_fla.woodenBlock2_209) package QFP2_AB_v31_fla { import flash.display.*; import flash.events.*; import flash.media.*; import flash.geom.*; import flash.filters.*; import flash.net.*; import flash.text.*; import flash.utils.*; import flash.system.*; import adobe.utils.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.printing.*; import flash.ui.*; import flash.xml.*; public dynamic class woodenBlock2_209 extends MovieClip { public function woodenBlock2_209(){ addFrameScript(0, frame1, 7, frame8); } function frame1(){ stop(); } function frame8(){ MovieClip(this.parent).removeMe(); } } }//package QFP2_AB_v31_fla
Section 240
//yuoarehereAnim_420 (QFP2_AB_v31_fla.yuoarehereAnim_420) package QFP2_AB_v31_fla { import flash.display.*; public dynamic class yuoarehereAnim_420 extends MovieClip { public var youarehere:youarehereMc; public function yuoarehereAnim_420(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package QFP2_AB_v31_fla
Section 241
//zoom1_545 (QFP2_AB_v31_fla.zoom1_545) package QFP2_AB_v31_fla { import flash.display.*; public dynamic class zoom1_545 extends MovieClip { public function zoom1_545(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package QFP2_AB_v31_fla
Section 242
//zoom2_547 (QFP2_AB_v31_fla.zoom2_547) package QFP2_AB_v31_fla { import flash.display.*; public dynamic class zoom2_547 extends MovieClip { public function zoom2_547(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package QFP2_AB_v31_fla
Section 243
//zoom3_548 (QFP2_AB_v31_fla.zoom3_548) package QFP2_AB_v31_fla { import flash.display.*; public dynamic class zoom3_548 extends MovieClip { public function zoom3_548(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package QFP2_AB_v31_fla
Section 244
//zoom4_549 (QFP2_AB_v31_fla.zoom4_549) package QFP2_AB_v31_fla { import flash.display.*; public dynamic class zoom4_549 extends MovieClip { public function zoom4_549(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package QFP2_AB_v31_fla
Section 245
//antsMc (antsMc) package { import flash.display.*; public dynamic class antsMc extends BitmapData { public function antsMc(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 246
//backgroundP (backgroundP) package { import flash.display.*; public dynamic class backgroundP extends MovieClip { public function backgroundP(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 247
//backgroundSkyMc (backgroundSkyMc) package { import flash.display.*; public dynamic class backgroundSkyMc extends MovieClip { public function backgroundSkyMc(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 248
//BadGuyRun (BadGuyRun) package { import flash.display.*; public dynamic class BadGuyRun extends MovieClip { public var w:MovieClip; } }//package
Section 249
//batFx (batFx) package { import flash.media.*; public dynamic class batFx extends Sound { } }//package
Section 250
//bellFx (bellFx) package { import flash.media.*; public dynamic class bellFx extends Sound { } }//package
Section 251
//boulderHitFx (boulderHitFx) package { import flash.media.*; public dynamic class boulderHitFx extends Sound { } }//package
Section 252
//bullet (bullet) package { import flash.display.*; public dynamic class bullet extends MovieClip { } }//package
Section 253
//catapultBtnMc (catapultBtnMc) package { import flash.display.*; public dynamic class catapultBtnMc extends MovieClip { } }//package
Section 254
//catapultCatch (catapultCatch) package { import flash.display.*; public dynamic class catapultCatch extends MovieClip { } }//package
Section 255
//catapultDial (catapultDial) package { import flash.display.*; public dynamic class catapultDial extends MovieClip { public var needle:MovieClip; } }//package
Section 256
//catapultWords (catapultWords) package { import flash.display.*; import flash.text.*; public dynamic class catapultWords extends MovieClip { public var rangeTxt:TextField; public function catapultWords(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 257
//clickBtnFx (clickBtnFx) package { import flash.media.*; public dynamic class clickBtnFx extends Sound { } }//package
Section 258
//death1 (death1) package { import flash.display.*; public dynamic class death1 extends MovieClip { public function death1(){ addFrameScript(12, frame13); } function frame13(){ stop(); } } }//package
Section 259
//die_v1_Fx (die_v1_Fx) package { import flash.media.*; public dynamic class die_v1_Fx extends Sound { } }//package
Section 260
//enemyBomb (enemyBomb) package { import flash.display.*; public dynamic class enemyBomb extends MovieClip { } }//package
Section 261
//enemyBullet (enemyBullet) package { import flash.display.*; public dynamic class enemyBullet extends MovieClip { } }//package
Section 262
//enemyPhoton (enemyPhoton) package { import flash.display.*; public dynamic class enemyPhoton extends MovieClip { } }//package
Section 263
//enemyShell (enemyShell) package { import flash.display.*; public dynamic class enemyShell extends MovieClip { } }//package
Section 264
//energyBar (energyBar) package { import flash.display.*; public dynamic class energyBar extends MovieClip { public var bar:MovieClip; } }//package
Section 265
//evilWizardMissle (evilWizardMissle) package { import flash.display.*; public dynamic class evilWizardMissle extends MovieClip { } }//package
Section 266
//explosion (explosion) package { import flash.display.*; public dynamic class explosion extends MovieClip { } }//package
Section 267
//explosionFx (explosionFx) package { import flash.media.*; public dynamic class explosionFx extends Sound { } }//package
Section 268
//fireMissileFx (fireMissileFx) package { import flash.media.*; public dynamic class fireMissileFx extends Sound { } }//package
Section 269
//GameArrow (GameArrow) package { import flash.display.*; public dynamic class GameArrow extends MovieClip { } }//package
Section 270
//GameBird (GameBird) package { import flash.display.*; public dynamic class GameBird extends MovieClip { public var bird:MovieClip; public function GameBird(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 271
//GameDragon (GameDragon) package { import flash.display.*; public dynamic class GameDragon extends MovieClip { public function GameDragon(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 272
//GameFireBall (GameFireBall) package { import flash.display.*; public dynamic class GameFireBall extends MovieClip { } }//package
Section 273
//GameIceBolt (GameIceBolt) package { import flash.display.*; public dynamic class GameIceBolt extends MovieClip { } }//package
Section 274
//gameOverFx (gameOverFx) package { import flash.media.*; public dynamic class gameOverFx extends Sound { } }//package
Section 275
//GameRock (GameRock) package { import flash.display.*; public dynamic class GameRock extends MovieClip { } }//package
Section 276
//getReadyMsg (getReadyMsg) package { import flash.display.*; import flash.text.*; public dynamic class getReadyMsg extends MovieClip { public var levelText:TextField; } }//package
Section 277
//getReadyMsgAnim (getReadyMsgAnim) package { import flash.display.*; import flash.events.*; import flash.media.*; import flash.geom.*; import flash.filters.*; import flash.net.*; import flash.text.*; import flash.utils.*; import flash.system.*; import adobe.utils.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.printing.*; import flash.ui.*; import flash.xml.*; public dynamic class getReadyMsgAnim extends MovieClip { public var msg:getReadyMsg; public function getReadyMsgAnim(){ addFrameScript(10, frame11, 73, frame74); } function frame74(){ MovieClip(parent).rt.gameState = "play"; MovieClip(parent).removeChild(this); stop(); } function frame11(){ msg.levelText.text = ("Level " + MovieClip(parent).rt.levelNumber); } } }//package
Section 278
//goodCliff (goodCliff) package { import flash.display.*; public dynamic class goodCliff extends MovieClip { } }//package
Section 279
//grenadeMc (grenadeMc) package { import flash.display.*; public dynamic class grenadeMc extends MovieClip { } }//package
Section 280
//gunEnergy (gunEnergy) package { import flash.display.*; public dynamic class gunEnergy extends MovieClip { } }//package
Section 281
//gunEnergyLevel (gunEnergyLevel) package { import flash.display.*; public dynamic class gunEnergyLevel extends MovieClip { public var energyLevelMc:gunEnergy; public function gunEnergyLevel(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 282
//halfWayFlag (halfWayFlag) package { import flash.display.*; public dynamic class halfWayFlag extends MovieClip { public var flag1:MovieClip; } }//package
Section 283
//heavyGunnerGun (heavyGunnerGun) package { import flash.display.*; public dynamic class heavyGunnerGun extends MovieClip { } }//package
Section 284
//heavyGunnerWalk (heavyGunnerWalk) package { import flash.display.*; public dynamic class heavyGunnerWalk extends MovieClip { } }//package
Section 285
//hitEnemyFx (hitEnemyFx) package { import flash.media.*; public dynamic class hitEnemyFx extends Sound { } }//package
Section 286
//knight2 (knight2) package { import flash.display.*; public dynamic class knight2 extends MovieClip { } }//package
Section 287
//knightPickedUp (knightPickedUp) package { import flash.display.*; public dynamic class knightPickedUp extends MovieClip { } }//package
Section 288
//leftSpeedBubble (leftSpeedBubble) package { import flash.display.*; import flash.text.*; public dynamic class leftSpeedBubble extends MovieClip { public var txt:TextField; public function leftSpeedBubble(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 289
//levelCompleteFx (levelCompleteFx) package { import flash.media.*; public dynamic class levelCompleteFx extends Sound { } }//package
Section 290
//levelCompleteMsgs (levelCompleteMsgs) package { import flash.display.*; public dynamic class levelCompleteMsgs extends MovieClip { public function levelCompleteMsgs(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 291
//LoadingBox (LoadingBox) package { import flash.display.*; public class LoadingBox extends MovieClip { public var loaderbar:MovieClip; public function LoadingBox(){ addFrameScript(0, frame1); } function frame1(){ } public function update(_arg1:int):void{ } } }//package
Section 292
//magicFx (magicFx) package { import flash.media.*; public dynamic class magicFx extends Sound { } }//package
Section 293
//mainGunBullet (mainGunBullet) package { import flash.display.*; public dynamic class mainGunBullet extends MovieClip { public function mainGunBullet(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 294
//mainGunMissileHitFx (mainGunMissileHitFx) package { import flash.media.*; public dynamic class mainGunMissileHitFx extends Sound { } }//package
Section 295
//mainGunSound (mainGunSound) package { import flash.media.*; public dynamic class mainGunSound extends Sound { } }//package
Section 296
//man (man) package { import flash.display.*; public dynamic class man extends MovieClip { public var selectionMc:manSelectionSquare; } }//package
Section 297
//manGunStand (manGunStand) package { import flash.display.*; public dynamic class manGunStand extends MovieClip { public var w:MovieClip; } }//package
Section 298
//manSelectionSquare (manSelectionSquare) package { import flash.display.*; public dynamic class manSelectionSquare extends MovieClip { public function manSelectionSquare(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 299
//mapScreenFx (mapScreenFx) package { import flash.media.*; public dynamic class mapScreenFx extends Sound { } }//package
Section 300
//marineEngineer (marineEngineer) package { import flash.display.*; public dynamic class marineEngineer extends MovieClip { } }//package
Section 301
//mcTest (mcTest) package { import flash.display.*; public dynamic class mcTest extends MovieClip { } }//package
Section 302
//mine (mine) package { import flash.display.*; public dynamic class mine extends MovieClip { } }//package
Section 303
//moanFx (moanFx) package { import flash.media.*; public dynamic class moanFx extends Sound { } }//package
Section 304
//MochiAd (MochiAd) package { import flash.display.*; import flash.events.*; import flash.net.*; import flash.utils.*; import flash.system.*; public class MochiAd { public static function getVersion():String{ return ("2.7"); } public static function showClickAwayAd(_arg1:Object):void{ var DEFAULTS:Object; var clip:Object; var ad_timeout:Number; var mc:MovieClip; var wh:Array; var w:Number; var h:Number; var chk:MovieClip; var sendHostProgress:Boolean; var options = _arg1; DEFAULTS = {ad_timeout:2000, regpt:"o", method:"showClickAwayAd", res:"300x250", no_bg:true, ad_started:function ():void{ }, ad_finished:function ():void{ }, ad_loaded:function (_arg1:Number, _arg2:Number):void{ }, ad_failed:function ():void{ }, ad_skipped:function ():void{ }}; options = MochiAd._parseOptions(options, DEFAULTS); clip = options.clip; ad_timeout = options.ad_timeout; delete options.ad_timeout; if (!MochiAd.load(options)){ options.ad_failed(); options.ad_finished(); return; }; options.ad_started(); mc = clip._mochiad; mc["onUnload"] = function ():void{ MochiAd._cleanup(mc); options.ad_finished(); }; wh = MochiAd._getRes(options, clip); w = wh[0]; h = wh[1]; mc.x = (w * 0.5); mc.y = (h * 0.5); chk = createEmptyMovieClip(mc, "_mochiad_wait", 3); chk.ad_timeout = ad_timeout; chk.started = getTimer(); chk.showing = false; mc.unloadAd = function ():void{ MochiAd.unload(clip); }; mc.adLoaded = options.ad_loaded; mc.adSkipped = options.ad_skipped; mc.rpc = function (_arg1:Number, _arg2:Object):void{ MochiAd.rpc(clip, _arg1, _arg2); }; sendHostProgress = false; mc.regContLC = function (_arg1:String):void{ mc._containerLCName = _arg1; }; chk["onEnterFrame"] = function ():void{ var _local1:Object; var _local2:Number; var _local3:Boolean; var _local4:Number; if (!this.parent){ delete this.onEnterFrame; return; }; _local1 = this.parent._mochiad_ctr; _local2 = (getTimer() - this.started); _local3 = false; if (!chk.showing){ _local4 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal; if (_local4 > 0){ chk.showing = true; _local3 = true; chk.started = getTimer(); } else { if (_local2 > chk.ad_timeout){ options.ad_failed(); _local3 = true; }; }; }; if (this.root == null){ _local3 = true; }; if (_local3){ delete this.onEnterFrame; }; }; doOnEnterFrame(chk); } public static function _isNetworkAvailable():Boolean{ return (!((Security.sandboxType == "localWithFile"))); } public static function _allowDomains(_arg1:String):String{ var _local2:String; _local2 = _arg1.split("/")[2].split(":")[0]; Security.allowDomain("*"); Security.allowDomain(_local2); Security.allowInsecureDomain("*"); Security.allowInsecureDomain(_local2); return (_local2); } public static function unload(_arg1:Object):Boolean{ if (((_arg1.clip) && (_arg1.clip._mochiad))){ _arg1 = _arg1.clip; }; if (_arg1.origFrameRate != undefined){ _arg1.stage.frameRate = _arg1.origFrameRate; }; if (!_arg1._mochiad){ return (false); }; if (_arg1._mochiad._containerLCName != undefined){ _arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "notify", {id:"unload"}); }; if (_arg1._mochiad.onUnload){ _arg1._mochiad.onUnload(); }; delete _arg1._mochiad_loaded; delete _arg1._mochiad; return (true); } public static function showInterLevelAd(_arg1:Object):void{ var DEFAULTS:Object; var clip:Object; var ad_msec:Number; var ad_timeout:Number; var fadeout_time:Number; var mc:MovieClip; var wh:Array; var w:Number; var h:Number; var chk:MovieClip; var options = _arg1; DEFAULTS = {ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function ():void{ if ((this.clip is MovieClip)){ this.clip.stop(); } else { throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers.")); }; }, ad_finished:function ():void{ if ((this.clip is MovieClip)){ this.clip.play(); } else { throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers.")); }; }, ad_loaded:function (_arg1:Number, _arg2:Number):void{ }, ad_failed:function ():void{ }, ad_skipped:function ():void{ }}; options = MochiAd._parseOptions(options, DEFAULTS); clip = options.clip; ad_msec = 11000; ad_timeout = options.ad_timeout; delete options.ad_timeout; fadeout_time = options.fadeout_time; delete options.fadeout_time; if (!MochiAd.load(options)){ options.ad_failed(); options.ad_finished(); return; }; options.ad_started(); mc = clip._mochiad; mc["onUnload"] = function ():void{ MochiAd._cleanup(mc); options.ad_finished(); }; wh = MochiAd._getRes(options, clip); w = wh[0]; h = wh[1]; mc.x = (w * 0.5); mc.y = (h * 0.5); chk = createEmptyMovieClip(mc, "_mochiad_wait", 3); chk.ad_msec = ad_msec; chk.ad_timeout = ad_timeout; chk.started = getTimer(); chk.showing = false; chk.fadeout_time = fadeout_time; chk.fadeFunction = function ():void{ var _local1:Number; if (!this.parent){ delete this.onEnterFrame; delete this.fadeFunction; return; }; _local1 = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time))); if (_local1 > 0){ this.parent.alpha = (_local1 * 0.01); } else { MochiAd.unload(clip); delete this["onEnterFrame"]; }; }; mc.unloadAd = function ():void{ MochiAd.unload(clip); }; mc.adLoaded = options.ad_loaded; mc.adSkipped = options.ad_skipped; mc.adjustProgress = function (_arg1:Number):void{ var _local2:Object; _local2 = mc._mochiad_wait; _local2.server_control = true; _local2.showing = true; _local2.started = getTimer(); _local2.ad_msec = (_arg1 - 250); }; mc.rpc = function (_arg1:Number, _arg2:Object):void{ MochiAd.rpc(clip, _arg1, _arg2); }; chk["onEnterFrame"] = function ():void{ var _local1:Object; var _local2:Number; var _local3:Boolean; var _local4:Number; if (!this.parent){ delete this.onEnterFrame; delete this.fadeFunction; return; }; _local1 = this.parent._mochiad_ctr; _local2 = (getTimer() - this.started); _local3 = false; if (!chk.showing){ _local4 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal; if (_local4 > 0){ chk.showing = true; chk.started = getTimer(); MochiAd.adShowing(clip); } else { if (_local2 > chk.ad_timeout){ options.ad_failed(); _local3 = true; }; }; }; if (_local2 > chk.ad_msec){ _local3 = true; }; if (_local3){ if (this.server_control){ delete this.onEnterFrame; } else { this.fadeout_start = getTimer(); this.onEnterFrame = this.fadeFunction; }; }; }; doOnEnterFrame(chk); } public static function _parseOptions(_arg1:Object, _arg2:Object):Object{ var _local3:Object; var _local4:String; var _local5:Array; var _local6:Number; var _local7:Array; _local3 = {}; for (_local4 in _arg2) { _local3[_local4] = _arg2[_local4]; }; if (_arg1){ for (_local4 in _arg1) { _local3[_local4] = _arg1[_local4]; }; }; if (_local3.clip == undefined){ throw (new Error("MochiAd is missing the 'clip' parameter. This should be a MovieClip, Sprite or an instance of a class that extends MovieClip or Sprite.")); }; _arg1 = _local3.clip.loaderInfo.parameters.mochiad_options; if (_arg1){ _local5 = _arg1.split("&"); _local6 = 0; while (_local6 < _local5.length) { _local7 = _local5[_local6].split("="); _local3[unescape(_local7[0])] = unescape(_local7[1]); _local6++; }; }; if (_local3.id == "test"){ }; return (_local3); } public static function _cleanup(_arg1:Object):void{ var idx:Number; var k:String; var lc:LocalConnection; var f:Function; var mc = _arg1; if (("lc" in mc)){ lc = mc.lc; f = function ():void{ try { lc.client = null; lc.close(); } catch(e:Error) { }; }; setTimeout(f, 0); }; idx = DisplayObjectContainer(mc).numChildren; while (idx > 0) { idx = (idx - 1); DisplayObjectContainer(mc).removeChildAt(idx); }; for (k in mc) { delete mc[k]; }; } public static function load(_arg1:Object):MovieClip{ var DEFAULTS:Object; var clip:Object; var depth:Number; var mc:MovieClip; var wh:Array; var lv:URLVariables; var k:String; var server:String; var hostname:String; var lc:LocalConnection; var name:String; var loader:Loader; var g:Function; var req:URLRequest; var v:Object; var options = _arg1; DEFAULTS = {server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"}; options = MochiAd._parseOptions(options, DEFAULTS); options.swfv = 9; options.mav = MochiAd.getVersion(); clip = options.clip; if (!MochiAd._isNetworkAvailable()){ return (null); }; try { if (clip._mochiad_loaded){ return (null); }; } catch(e:Error) { throw (new Error("MochiAd requires a clip that is an instance of a dynamic class. If your class extends Sprite or MovieClip, you must make it dynamic.")); }; depth = options.depth; delete options.depth; mc = createEmptyMovieClip(clip, "_mochiad", depth); wh = MochiAd._getRes(options, clip); options.res = ((wh[0] + "x") + wh[1]); options.server = (options.server + options.id); delete options.id; clip._mochiad_loaded = true; if (clip.loaderInfo.loaderURL.indexOf("http") == 0){ options.as3_swf = clip.loaderInfo.loaderURL; }; lv = new URLVariables(); for (k in options) { v = options[k]; if (!(v is Function)){ lv[k] = v; }; }; server = lv.server; delete lv.server; hostname = _allowDomains(server); lc = new LocalConnection(); lc.client = mc; name = ["", Math.floor(new Date().getTime()), Math.floor((Math.random() * 999999))].join("_"); lc.allowDomain("*", "localhost"); lc.allowInsecureDomain("*", "localhost"); lc.connect(name); mc.lc = lc; mc.lcName = name; lv.lc = name; lv.st = getTimer(); loader = new Loader(); g = function (_arg1:Object):void{ _arg1.target.removeEventListener(_arg1.type, arguments.callee); MochiAd.unload(clip); }; loader.contentLoaderInfo.addEventListener(Event.UNLOAD, g); req = new URLRequest(((server + ".swf?cacheBust=") + new Date().getTime())); req.contentType = "application/x-www-form-urlencoded"; req.method = URLRequestMethod.POST; req.data = lv; loader.load(req); mc.addChild(loader); mc._mochiad_ctr = loader; return (mc); } public static function runMethod(_arg1:Object, _arg2:String, _arg3:Array):Object{ var _local4:Array; var _local5:Number; _local4 = _arg2.split("."); _local5 = 0; while (_local5 < (_local4.length - 1)) { if ((((_arg1[_local4[_local5]] == undefined)) || ((_arg1[_local4[_local5]] == null)))){ return (undefined); }; _arg1 = _arg1[_local4[_local5]]; _local5++; }; if (typeof(_arg1[_local4[_local5]]) == "function"){ return (_arg1[_local4[_local5]].apply(_arg1, _arg3)); }; return (undefined); } public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number):MovieClip{ var _local4:MovieClip; _local4 = new MovieClip(); if (((false) && (_arg3))){ _arg1.addChildAt(_local4, _arg3); } else { _arg1.addChild(_local4); }; _arg1[_arg2] = _local4; _local4["_name"] = _arg2; return (_local4); } public static function _getRes(_arg1:Object, _arg2:Object):Array{ var _local3:Object; var _local4:Number; var _local5:Number; var _local6:Array; _local3 = _arg2.getBounds(_arg2.root); _local4 = 0; _local5 = 0; if (typeof(_arg1.res) != "undefined"){ _local6 = _arg1.res.split("x"); _local4 = parseFloat(_local6[0]); _local5 = parseFloat(_local6[1]); } else { _local4 = (_local3.xMax - _local3.xMin); _local5 = (_local3.yMax - _local3.yMin); }; if ((((_local4 == 0)) || ((_local5 == 0)))){ _local4 = _arg2.stage.stageWidth; _local5 = _arg2.stage.stageHeight; }; return ([_local4, _local5]); } public static function adShowing(_arg1:Object):void{ _arg1.origFrameRate = _arg1.stage.frameRate; _arg1.stage.frameRate = 30; } public static function getValue(_arg1:Object, _arg2:String):Object{ var _local3:Array; var _local4:Number; _local3 = _arg2.split("."); _local4 = 0; while (_local4 < (_local3.length - 1)) { if ((((_arg1[_local3[_local4]] == undefined)) || ((_arg1[_local3[_local4]] == null)))){ return (undefined); }; _arg1 = _arg1[_local3[_local4]]; _local4++; }; return (_arg1[_local3[_local4]]); } public static function rpc(_arg1:Object, _arg2:Number, _arg3:Object):void{ var _local4:Object; var _local5:Object; switch (_arg3.id){ case "setValue": MochiAd.setValue(_arg1, _arg3.objectName, _arg3.value); break; case "getValue": _local4 = MochiAd.getValue(_arg1, _arg3.objectName); _arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "rpcResult", _arg2, _local4); break; case "runMethod": _local5 = MochiAd.runMethod(_arg1, _arg3.method, _arg3.args); _arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "rpcResult", _arg2, _local5); break; }; } public static function setValue(_arg1:Object, _arg2:String, _arg3:Object):void{ var _local4:Array; var _local5:Number; _local4 = _arg2.split("."); _local5 = 0; while (_local5 < (_local4.length - 1)) { if ((((_arg1[_local4[_local5]] == undefined)) || ((_arg1[_local4[_local5]] == null)))){ return; }; _arg1 = _arg1[_local4[_local5]]; _local5++; }; _arg1[_local4[_local5]] = _arg3; } public static function showPreGameAd(_arg1:Object):void{ var DEFAULTS:Object; var clip:Object; var ad_msec:Number; var ad_timeout:Number; var fadeout_time:Number; var mc:MovieClip; var wh:Array; var w:Number; var h:Number; var chk:MovieClip; var bar:MovieClip; var bar_color:Number; var bar_background:Number; var bar_outline:Number; var backing_mc:MovieClip; var backing:Object; var inside_mc:MovieClip; var inside:Object; var outline_mc:MovieClip; var outline:Object; var complete:Boolean; var unloaded:Boolean; var f:Function; var sendHostProgress:Boolean; var fn:Function; var r:MovieClip; var options = _arg1; DEFAULTS = {ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:0xFF8A00, background:16777161, outline:13994812, no_progress_bar:false, ad_started:function ():void{ if ((this.clip is MovieClip)){ this.clip.stop(); } else { throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers.")); }; }, ad_finished:function ():void{ if ((this.clip is MovieClip)){ this.clip.play(); } else { throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers.")); }; }, ad_loaded:function (_arg1:Number, _arg2:Number):void{ }, ad_failed:function ():void{ }, ad_skipped:function ():void{ }, ad_progress:function (_arg1:Number):void{ }}; options = MochiAd._parseOptions(options, DEFAULTS); if ("c862232051e0a94e1c3609b3916ddb17".substr(0) == "dfeada81ac97cde83665f81c12da7def"){ options.ad_started(); fn = function ():void{ options.ad_finished(); }; setTimeout(fn, 100); return; }; clip = options.clip; ad_msec = 11000; ad_timeout = options.ad_timeout; delete options.ad_timeout; fadeout_time = options.fadeout_time; delete options.fadeout_time; if (!MochiAd.load(options)){ options.ad_failed(); options.ad_finished(); return; }; options.ad_started(); mc = clip._mochiad; mc["onUnload"] = function ():void{ var fn:Function; MochiAd._cleanup(mc); fn = function ():void{ options.ad_finished(); }; setTimeout(fn, 100); }; wh = MochiAd._getRes(options, clip); w = wh[0]; h = wh[1]; mc.x = (w * 0.5); mc.y = (h * 0.5); chk = createEmptyMovieClip(mc, "_mochiad_wait", 3); chk.x = (w * -0.5); chk.y = (h * -0.5); bar = createEmptyMovieClip(chk, "_mochiad_bar", 4); if (options.no_progress_bar){ bar.visible = false; delete options.no_progress_bar; } else { bar.x = 10; bar.y = (h - 20); }; bar_color = options.color; delete options.color; bar_background = options.background; delete options.background; bar_outline = options.outline; delete options.outline; backing_mc = createEmptyMovieClip(bar, "_outline", 1); backing = backing_mc.graphics; backing.beginFill(bar_background); backing.moveTo(0, 0); backing.lineTo((w - 20), 0); backing.lineTo((w - 20), 10); backing.lineTo(0, 10); backing.lineTo(0, 0); backing.endFill(); inside_mc = createEmptyMovieClip(bar, "_inside", 2); inside = inside_mc.graphics; inside.beginFill(bar_color); inside.moveTo(0, 0); inside.lineTo((w - 20), 0); inside.lineTo((w - 20), 10); inside.lineTo(0, 10); inside.lineTo(0, 0); inside.endFill(); inside_mc.scaleX = 0; outline_mc = createEmptyMovieClip(bar, "_outline", 3); outline = outline_mc.graphics; outline.lineStyle(0, bar_outline, 100); outline.moveTo(0, 0); outline.lineTo((w - 20), 0); outline.lineTo((w - 20), 10); outline.lineTo(0, 10); outline.lineTo(0, 0); chk.ad_msec = ad_msec; chk.ad_timeout = ad_timeout; chk.started = getTimer(); chk.showing = false; chk.last_pcnt = 0; chk.fadeout_time = fadeout_time; chk.fadeFunction = function ():void{ var _local1:Number; _local1 = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time))); if (_local1 > 0){ this.parent.alpha = (_local1 * 0.01); } else { MochiAd.unload(clip); delete this["onEnterFrame"]; }; }; complete = false; unloaded = false; f = function (_arg1:Event):void{ _arg1.target.removeEventListener(_arg1.type, arguments.callee); complete = true; if (unloaded){ MochiAd.unload(clip); }; }; clip.loaderInfo.addEventListener(Event.COMPLETE, f); if ((clip.root is MovieClip)){ r = (clip.root as MovieClip); if (r.framesLoaded >= r.totalFrames){ complete = true; }; }; mc.unloadAd = function ():void{ unloaded = true; if (complete){ MochiAd.unload(clip); }; }; mc.adLoaded = options.ad_loaded; mc.adSkipped = options.ad_skipped; mc.adjustProgress = function (_arg1:Number):void{ var _local2:Object; _local2 = mc._mochiad_wait; _local2.server_control = true; _local2.showing = true; _local2.started = getTimer(); _local2.ad_msec = _arg1; }; mc.rpc = function (_arg1:Number, _arg2:Object):void{ MochiAd.rpc(clip, _arg1, _arg2); }; mc.rpcTestFn = function (_arg1:String):Object{ return (_arg1); }; mc.regContLC = function (_arg1:String):void{ mc._containerLCName = _arg1; }; sendHostProgress = false; mc.sendHostLoadProgress = function (_arg1:String):void{ sendHostProgress = true; }; chk["onEnterFrame"] = function ():void{ var _local1:Object; var _local2:Object; var _local3:Number; var _local4:Boolean; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Object; var _local10:Number; var _local11:Number; if (((!(this.parent)) || (!(this.parent.parent)))){ delete this["onEnterFrame"]; return; }; _local1 = this.parent.parent.root; _local2 = this.parent._mochiad_ctr; _local3 = (getTimer() - this.started); _local4 = false; _local5 = _local1.loaderInfo.bytesTotal; _local6 = _local1.loaderInfo.bytesLoaded; if (complete){ _local6 = Math.max(1, _local6); _local5 = _local6; }; _local7 = ((100 * _local6) / _local5); _local8 = ((100 * _local3) / chk.ad_msec); _local9 = this._mochiad_bar._inside; _local10 = Math.min(100, Math.min(((_local7) || (0)), _local8)); _local10 = Math.max(this.last_pcnt, _local10); this.last_pcnt = _local10; _local9.scaleX = (_local10 * 0.01); options.ad_progress(_local10); if (sendHostProgress){ clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"hostLoadPcnt", pcnt:_local7}); if (_local7 == 100){ sendHostProgress = false; }; }; if (!chk.showing){ _local11 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal; if (_local11 > 0){ chk.showing = true; chk.started = getTimer(); MochiAd.adShowing(clip); } else { if ((((_local3 > chk.ad_timeout)) && ((_local7 == 100)))){ options.ad_failed(); _local4 = true; }; }; }; if (_local3 > chk.ad_msec){ _local4 = true; }; if (((complete) && (_local4))){ if (this.server_control){ delete this.onEnterFrame; } else { this.fadeout_start = getTimer(); this.onEnterFrame = chk.fadeFunction; }; }; }; doOnEnterFrame(chk); } public static function showPreloaderAd(_arg1:Object):void{ MochiAd.showPreGameAd(_arg1); } public static function showTimedAd(_arg1:Object):void{ MochiAd.showInterLevelAd(_arg1); } public static function doOnEnterFrame(_arg1:MovieClip):void{ var f:Function; var mc = _arg1; f = function (_arg1:Object):void{ if (((("onEnterFrame" in mc)) && (mc.onEnterFrame))){ mc.onEnterFrame(); } else { _arg1.target.removeEventListener(_arg1.type, arguments.callee); }; }; mc.addEventListener(Event.ENTER_FRAME, f); } } }//package
Section 305
//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 306
//newSoldierFx (newSoldierFx) package { import flash.media.*; public dynamic class newSoldierFx extends Sound { } }//package
Section 307
//panelItems (panelItems) package { import flash.display.*; public dynamic class panelItems extends MovieClip { public function panelItems(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 308
//panelManBack (panelManBack) package { import flash.display.*; public dynamic class panelManBack extends MovieClip { public var clock:MovieClip; public function panelManBack(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 309
//pauseMc (pauseMc) package { import flash.display.*; public dynamic class pauseMc extends MovieClip { } }//package
Section 310
//Photon (Photon) package { import flash.display.*; public dynamic class Photon extends MovieClip { } }//package
Section 311
//PlayGameBtn (PlayGameBtn) package { import flash.display.*; public dynamic class PlayGameBtn extends SimpleButton { } }//package
Section 312
//projectiles (projectiles) package { import flash.display.*; public dynamic class projectiles extends MovieClip { } }//package
Section 313
//risingMoneyTxt (risingMoneyTxt) package { import flash.display.*; import flash.text.*; public dynamic class risingMoneyTxt extends MovieClip { public var moneyTxt:TextField; } }//package
Section 314
//rocket (rocket) package { import flash.display.*; public dynamic class rocket extends MovieClip { } }//package
Section 315
//rocketLauncher (rocketLauncher) package { import flash.display.*; public dynamic class rocketLauncher extends MovieClip { public var selectionMc:manSelectionSquare; } }//package
Section 316
//rocketLauncherShoot (rocketLauncherShoot) package { import flash.display.*; public dynamic class rocketLauncherShoot extends MovieClip { public function rocketLauncherShoot(){ addFrameScript(4, frame5); } function frame5(){ MovieClip(this.parent).gotoAndStop("gunStand"); } } }//package
Section 317
//rocketStand (rocketStand) package { import flash.display.*; public dynamic class rocketStand extends MovieClip { } }//package
Section 318
//selectionBox (selectionBox) package { import flash.display.*; public dynamic class selectionBox extends MovieClip { } }//package
Section 319
//SoundMusic1 (SoundMusic1) package { import flash.media.*; public dynamic class SoundMusic1 extends Sound { } }//package
Section 320
//startGameButton (startGameButton) package { import flash.display.*; public dynamic class startGameButton extends SimpleButton { } }//package
Section 321
//startGameMsg (startGameMsg) package { import flash.display.*; import flash.text.*; public dynamic class startGameMsg extends MovieClip { public var rulerTxt:TextField; public var titleTxt:TextField; } }//package
Section 322
//startScreenInstr (startScreenInstr) package { import flash.display.*; public dynamic class startScreenInstr extends MovieClip { } }//package
Section 323
//swordFightFx (swordFightFx) package { import flash.media.*; public dynamic class swordFightFx extends Sound { } }//package
Section 324
//tent (tent) package { import flash.display.*; import flash.events.*; import flash.media.*; import flash.geom.*; import flash.filters.*; import flash.net.*; import flash.text.*; import flash.utils.*; import flash.system.*; import adobe.utils.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.printing.*; import flash.ui.*; import flash.xml.*; public dynamic class tent extends MovieClip { public var flagMc:halfWayFlag; public var flagNumber:String; public function tent(){ addFrameScript(0, frame1); } function frame1(){ flagNumber = "arthur"; flagMc.flag1.flag2.flag3a.flag4a.gotoAndStop(flagNumber); flagMc.flag1.flag2.flag3a.flag4b.gotoAndStop(flagNumber); flagMc.flag1.flag2.flag3a.flag4c.gotoAndStop(flagNumber); flagMc.flag1.flag2.flag3a.flag4d.gotoAndStop(flagNumber); flagMc.flag1.flag2.flag3b.flag4a.gotoAndStop(flagNumber); flagMc.flag1.flag2.flag3b.flag4b.gotoAndStop(flagNumber); flagMc.flag1.flag2.flag3b.flag4c.gotoAndStop(flagNumber); flagMc.flag1.flag2.flag3b.flag4d.gotoAndStop(flagNumber); } } }//package
Section 325
//throwFx (throwFx) package { import flash.media.*; public dynamic class throwFx extends Sound { } }//package
Section 326
//turretMc (turretMc) package { import flash.display.*; import flash.events.*; import flash.media.*; import flash.geom.*; import flash.filters.*; import flash.net.*; import flash.text.*; import flash.utils.*; import flash.system.*; import adobe.utils.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.printing.*; import flash.ui.*; import flash.xml.*; public dynamic class turretMc extends MovieClip { public var firePoint:MovieClip; public function turretMc(){ addFrameScript(0, frame1, 1, frame2); } function frame1(){ stop(); } function frame2(){ MovieClip(this.parent).body.play(); } } }//package
Section 327
//woodBlock (woodBlock) package { import flash.display.*; public dynamic class woodBlock extends MovieClip { } }//package
Section 328
//youarehereMc (youarehereMc) package { import flash.display.*; public dynamic class youarehereMc extends MovieClip { } }//package

Library Items

Symbol 1 Sound {mainGunSound}
Symbol 2 Sound {levelCompleteFx}
Symbol 3 Sound {moanFx}
Symbol 4 Sound {clickBtnFx}
Symbol 5 Sound {mapScreenFx}
Symbol 6 Sound {magicFx}
Symbol 7 Sound {fireMissileFx}
Symbol 8 Sound {hitEnemyFx}
Symbol 9 Sound {die_v1_Fx}
Symbol 10 Sound {throwFx}
Symbol 11 Sound {gameOverFx}
Symbol 12 Sound {swordFightFx}
Symbol 13 Sound {newSoldierFx}
Symbol 14 Sound {explosionFx}
Symbol 15 Sound {mainGunMissileHitFx}
Symbol 16 Sound {boulderHitFx}
Symbol 17 Sound {bellFx}
Symbol 18 Sound {batFx}
Symbol 19 FontUsed by:20 154 276 344 345 1028 1029 1030 1031 1032 1490 1491 1493 1494 1496 1497 1499 1500 1504 1519 1521 1524 1526 1555 1561 1568 1570 1572 1620 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1683
Symbol 20 EditableTextUses:19Used by:22
Symbol 21 GraphicUsed by:22
Symbol 22 MovieClip {leftSpeedBubble}Uses:20 21Used by:1535
Symbol 23 GraphicUsed by:24
Symbol 24 MovieClipUses:23Used by:36 1681 1777
Symbol 25 GraphicUsed by:36
Symbol 26 GraphicUsed by:36
Symbol 27 GraphicUsed by:36
Symbol 28 GraphicUsed by:29
Symbol 29 MovieClipUses:28Used by:36
Symbol 30 GraphicUsed by:31
Symbol 31 MovieClipUses:30Used by:36
Symbol 32 GraphicUsed by:33
Symbol 33 MovieClipUses:32Used by:36
Symbol 34 GraphicUsed by:35
Symbol 35 MovieClipUses:34Used by:36
Symbol 36 MovieClip {classesAS3.GameBoulder}Uses:24 25 26 27 29 31 33 35
Symbol 37 GraphicUsed by:38
Symbol 38 MovieClipUses:37Used by:39
Symbol 39 MovieClip {classesAS3.GameFloor}Uses:38
Symbol 40 GraphicUsed by:41
Symbol 41 MovieClipUses:40Used by:59
Symbol 42 GraphicUsed by:43 1096
Symbol 43 MovieClipUses:42Used by:59
Symbol 44 GraphicUsed by:59
Symbol 45 GraphicUsed by:46
Symbol 46 MovieClipUses:45Used by:59 1251
Symbol 47 GraphicUsed by:48
Symbol 48 MovieClipUses:47Used by:59 1251
Symbol 49 GraphicUsed by:50
Symbol 50 MovieClipUses:49Used by:59 1251
Symbol 51 GraphicUsed by:52
Symbol 52 MovieClipUses:51Used by:59 1251
Symbol 53 GraphicUsed by:54
Symbol 54 MovieClipUses:53Used by:59 1251
Symbol 55 GraphicUsed by:56
Symbol 56 MovieClipUses:55Used by:59 1251
Symbol 57 GraphicUsed by:58
Symbol 58 MovieClipUses:57Used by:59 1251 1266 1280 1285 1293 1295 1302 1342
Symbol 59 MovieClip {turretMc}Uses:41 43 44 46 48 50 52 54 56 58
Symbol 60 GraphicUsed by:63 304
Symbol 61 FontUsed by:62 281 282 285 286 290 291 292 296 297 300 301 302 306 307 308 309 342 343 1099 1105 1109 1159 1162 1163 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1180 1181 1196 1197 1487 1502 1536 1537 1538 1539 1540 1541 1548 1550 1599 1600 1603 1604 1606 1607 1609 1610 1612 1613 1615 1616 1673 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775
Symbol 62 TextUses:61Used by:63
Symbol 63 MovieClip {pauseMc}Uses:60 62
Symbol 64 FontUsed by:65 66
Symbol 65 TextUses:64Used by:67
Symbol 66 EditableTextUses:64Used by:67
Symbol 67 MovieClip {getReadyMsg}Uses:65 66Used by:68
Symbol 68 MovieClip {getReadyMsgAnim}Uses:67
Symbol 69 GraphicUsed by:70
Symbol 70 MovieClipUses:69Used by:77 1776
Symbol 71 GraphicUsed by:74
Symbol 72 GraphicUsed by:73 377 1605 1608 1611 1614 1617
Symbol 73 MovieClipUses:72Used by:74
Symbol 74 MovieClipUses:71 73Used by:77
Symbol 75 FontUsed by:76 1452
Symbol 76 TextUses:75Used by:77
Symbol 77 MovieClip {LoadingBox}Uses:70 74 76
Symbol 78 GraphicUsed by:79
Symbol 79 MovieClipUses:78Used by:98 1297 1324 1328 1333 1334
Symbol 80 GraphicUsed by:98
Symbol 81 GraphicUsed by:98 1297 1310 1311 1324 1328 1333 1334
Symbol 82 GraphicUsed by:98 1297 1310 1311 1324 1328 1333 1334
Symbol 83 GraphicUsed by:84
Symbol 84 MovieClipUses:83Used by:87
Symbol 85 GraphicUsed by:86 98 106 1297 1310 1311 1324 1328 1333 1334
Symbol 86 MovieClipUses:85Used by:87 1310 1311 1777
Symbol 87 MovieClip {QFP2_AB_v31_fla.weapons_470}Uses:84 86Used by:98 1297
Symbol 88 GraphicUsed by:98 1297 1310 1311 1324 1328 1333 1334
Symbol 89 GraphicUsed by:98
Symbol 90 GraphicUsed by:98
Symbol 91 GraphicUsed by:98
Symbol 92 GraphicUsed by:98
Symbol 93 GraphicUsed by:98
Symbol 94 GraphicUsed by:98
Symbol 95 GraphicUsed by:98
Symbol 96 GraphicUsed by:98
Symbol 97 GraphicUsed by:98
Symbol 98 MovieClip {BadGuyRun}Uses:79 80 81 82 87 85 88 89 90 91 92 93 94 95 96 97
Symbol 99 MovieClip {mcTest}
Symbol 100 GraphicUsed by:101 1776
Symbol 101 MovieClipUses:100Used by:104
Symbol 102 GraphicUsed by:103
Symbol 103 MovieClipUses:102Used by:104
Symbol 104 MovieClipUses:101 103Used by:144 1093
Symbol 105 GraphicUsed by:144
Symbol 106 MovieClipUses:85Used by:142 1091 1092
Symbol 107 GraphicUsed by:142
Symbol 108 GraphicUsed by:142 1092
Symbol 109 GraphicUsed by:142
Symbol 110 GraphicUsed by:142 1091 1092
Symbol 111 GraphicUsed by:142
Symbol 112 GraphicUsed by:142 1092
Symbol 113 GraphicUsed by:142
Symbol 114 GraphicUsed by:142 1091 1092
Symbol 115 GraphicUsed by:142
Symbol 116 GraphicUsed by:142 1092
Symbol 117 GraphicUsed by:142
Symbol 118 GraphicUsed by:142 1091 1092
Symbol 119 GraphicUsed by:142
Symbol 120 GraphicUsed by:142 1092
Symbol 121 GraphicUsed by:142
Symbol 122 GraphicUsed by:142 1091 1092
Symbol 123 GraphicUsed by:142
Symbol 124 GraphicUsed by:142 1092
Symbol 125 GraphicUsed by:142
Symbol 126 GraphicUsed by:142 1091 1092
Symbol 127 GraphicUsed by:142
Symbol 128 GraphicUsed by:142 1092
Symbol 129 GraphicUsed by:142
Symbol 130 GraphicUsed by:142 1091 1092
Symbol 131 GraphicUsed by:142
Symbol 132 GraphicUsed by:142 1092
Symbol 133 GraphicUsed by:142
Symbol 134 GraphicUsed by:142 1091 1092
Symbol 135 GraphicUsed by:142
Symbol 136 GraphicUsed by:142 1092
Symbol 137 GraphicUsed by:142
Symbol 138 GraphicUsed by:142 1091 1092
Symbol 139 GraphicUsed by:142
Symbol 140 GraphicUsed by:142 1092
Symbol 141 GraphicUsed by:142 1091
Symbol 142 MovieClip {QFP2_AB_v31_fla.upgradeClock_653}Uses:106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141Used by:144
Symbol 143 GraphicUsed by:144
Symbol 144 MovieClip {QFP2_AB_v31_fla.upgradeBack_652}Uses:104 105 142 143Used by:152 153 155 159 165 167 192 195 198 201
Symbol 145 GraphicUsed by:146
Symbol 146 MovieClipUses:145Used by:147
Symbol 147 MovieClipUses:146Used by:152 153 155 1681
Symbol 148 GraphicUsed by:150 1096
Symbol 149 GraphicUsed by:150
Symbol 150 ButtonUses:148 149Used by:152 153 155 159 165 167 192 195 198 201
Symbol 151 GraphicUsed by:152 153 155
Symbol 152 MovieClip {classesAS3.GameUpgrade}Uses:144 147 150 151
Symbol 153 MovieClip {classesAS3.GameUpgrade2}Uses:144 147 150 151
Symbol 154 TextUses:19Used by:155 1681
Symbol 155 MovieClip {classesAS3.GameUpgrade3}Uses:144 147 154 150 151
Symbol 156 GraphicUsed by:157 698
Symbol 157 MovieClipUses:156Used by:159 165 167 181 1095
Symbol 158 GraphicUsed by:159 165 167 192 195 198 201
Symbol 159 MovieClip {classesAS3.GameUpgrade4}Uses:144 157 150 158
Symbol 160 GraphicUsed by:165 190
Symbol 161 GraphicUsed by:165 190
Symbol 162 GraphicUsed by:165 190 707
Symbol 163 GraphicUsed by:164
Symbol 164 MovieClipUses:163Used by:165 190 707
Symbol 165 MovieClip {classesAS3.GameUpgrade5}Uses:144 157 160 161 162 164 150 158
Symbol 166 GraphicUsed by:167
Symbol 167 MovieClip {classesAS3.GameUpgrade6}Uses:144 157 166 150 158
Symbol 168 GraphicUsed by:181 699
Symbol 169 GraphicUsed by:181 699
Symbol 170 GraphicUsed by:181 699
Symbol 171 GraphicUsed by:172
Symbol 172 MovieClipUses:171Used by:181 699
Symbol 173 GraphicUsed by:174
Symbol 174 MovieClipUses:173Used by:181 699
Symbol 175 GraphicUsed by:176
Symbol 176 MovieClipUses:175Used by:181 699
Symbol 177 GraphicUsed by:178
Symbol 178 MovieClipUses:177Used by:181 699
Symbol 179 GraphicUsed by:180
Symbol 180 MovieClipUses:179Used by:181 699
Symbol 181 MovieClip {QFP2_AB_v31_fla.castleBlock_38}Uses:157 168 169 170 172 174 176 178 180Used by:190
Symbol 182 GraphicUsed by:190
Symbol 183 GraphicUsed by:190
Symbol 184 GraphicUsed by:190
Symbol 185 GraphicUsed by:189
Symbol 186 GraphicUsed by:187
Symbol 187 MovieClipUses:186Used by:189
Symbol 188 GraphicUsed by:189
Symbol 189 MovieClipUses:185 187 188Used by:190 707
Symbol 190 MovieClip {classesAS3.GameBlock}Uses:181 182 183 184 160 161 162 164 189Used by:192 1777
Symbol 191 GraphicUsed by:192
Symbol 192 MovieClip {classesAS3.GameUpgrade7}Uses:144 190 191 150 158
Symbol 193 GraphicUsed by:195
Symbol 194 GraphicUsed by:195
Symbol 195 MovieClip {classesAS3.GameUpgrade8}Uses:144 193 150 158 194
Symbol 196 GraphicUsed by:198
Symbol 197 GraphicUsed by:198
Symbol 198 MovieClip {classesAS3.GameUpgrade9}Uses:144 196 150 158 197
Symbol 199 GraphicUsed by:201
Symbol 200 GraphicUsed by:201
Symbol 201 MovieClip {classesAS3.GameUpgrade10}Uses:144 199 150 158 200
Symbol 202 GraphicUsed by:206
Symbol 203 GraphicUsed by:206
Symbol 204 GraphicUsed by:206
Symbol 205 GraphicUsed by:206
Symbol 206 MovieClip {classesAS3.GameWall}Uses:202 203 204 205
Symbol 207 GraphicUsed by:209
Symbol 208 GraphicUsed by:209
Symbol 209 MovieClip {mine}Uses:207 208
Symbol 210 GraphicUsed by:211
Symbol 211 MovieClip {classesAS3.GameBoulderLarge}Uses:210
Symbol 212 GraphicUsed by:232
Symbol 213 GraphicUsed by:214
Symbol 214 MovieClipUses:213Used by:215
Symbol 215 MovieClipUses:214Used by:232 516 527 547 563 569 576 584 599 733 801 839 913
Symbol 216 GraphicUsed by:217
Symbol 217 MovieClipUses:216Used by:232 516 527 547 563 569 576 584 599 733 801 839 879 913 947
Symbol 218 GraphicUsed by:219
Symbol 219 MovieClipUses:218Used by:232
Symbol 220 GraphicUsed by:221
Symbol 221 MovieClipUses:220Used by:228 516 733 839
Symbol 222 GraphicUsed by:223 1456
Symbol 223 MovieClipUses:222Used by:228 569 576 584 599 913
Symbol 224 GraphicUsed by:225
Symbol 225 MovieClipUses:224Used by:228
Symbol 226 GraphicUsed by:227
Symbol 227 MovieClipUses:226Used by:228
Symbol 228 MovieClipUses:221 223 225 227Used by:232
Symbol 229 GraphicUsed by:230
Symbol 230 MovieClipUses:229Used by:232 576 584 879 947 987 1095
Symbol 231 GraphicUsed by:232
Symbol 232 MovieClip {knightPickedUp}Uses:212 215 217 219 228 230 231
Symbol 233 GraphicUsed by:236
Symbol 234 GraphicUsed by:235
Symbol 235 ButtonUses:234Used by:236
Symbol 236 MovieClip {catapultBtnMc}Uses:233 235
Symbol 237 GraphicUsed by:280
Symbol 238 GraphicUsed by:280
Symbol 239 GraphicUsed by:240
Symbol 240 MovieClipUses:239Used by:280 1681
Symbol 241 GraphicUsed by:242
Symbol 242 MovieClipUses:241Used by:243
Symbol 243 MovieClipUses:242Used by:244
Symbol 244 MovieClipUses:243Used by:280
Symbol 245 GraphicUsed by:278 280
Symbol 246 GraphicUsed by:247
Symbol 247 MovieClipUses:246Used by:248
Symbol 248 MovieClipUses:247Used by:260 1048 1051 1053 1193 1456
Symbol 249 GraphicUsed by:250
Symbol 250 MovieClipUses:249Used by:260 808 811 812 863 866 867 868 1048 1051 1053 1187 1193 1456 1462 1466
Symbol 251 GraphicUsed by:252
Symbol 252 MovieClipUses:251Used by:260 668 671 672 673 863 866 867 868 1048 1051 1053 1187 1189 1193 1456 1462 1466 1469 1472
Symbol 253 GraphicUsed by:254 950
Symbol 254 MovieClipUses:253Used by:260 808 811 812 1048 1051 1053 1193 1456
Symbol 255 GraphicUsed by:256
Symbol 256 MovieClipUses:255Used by:260 1048 1051 1053 1193 1456
Symbol 257 GraphicUsed by:258
Symbol 258 MovieClipUses:257Used by:260 482 497 503 508 618 620 621 638 639 640 655 656 657 671 672 673 866 867 868 1051 1053
Symbol 259 GraphicUsed by:260
Symbol 260 MovieClipUses:248 250 252 254 256 258 259Used by:280
Symbol 261 ShapeTweeningUsed by:278
Symbol 262 GraphicUsed by:263
Symbol 263 MovieClipUses:262Used by:274 446 451 454 455 462 463 482 497 503 508 633 638 639 640 650 655 656 657 787 794 808 811 812 820 826 829 831 848 851 852 892 895 896 908 918 919 931 934 936 957 958 959 978 983 985 986 1008 1011 1012 1190 1191 1474 1476 1478 1480
Symbol 264 GraphicUsed by:265
Symbol 265 MovieClipUses:264Used by:274 462 463
Symbol 266 GraphicUsed by:267
Symbol 267 MovieClipUses:266Used by:274 462 463
Symbol 268 GraphicUsed by:269
Symbol 269 MovieClipUses:268Used by:274
Symbol 270 GraphicUsed by:271
Symbol 271 MovieClipUses:270Used by:274 462 463
Symbol 272 GraphicUsed by:273
Symbol 273 MovieClipUses:272Used by:274 462 463
Symbol 274 MovieClipUses:263 265 267 269 271 273Used by:275 464 1095
Symbol 275 MovieClipUses:274Used by:278 1777
Symbol 276 TextUses:19Used by:277
Symbol 277 MovieClipUses:276Used by:278
Symbol 278 MovieClip {QFP2_AB_v31_fla.merlinAnim_575}Uses:261 275 245 277Used by:280
Symbol 279 GraphicUsed by:280
Symbol 280 MovieClipUses:237 238 240 244 245 260 278 279Used by:304
Symbol 281 TextUses:61Used by:283
Symbol 282 TextUses:61Used by:283
Symbol 283 MovieClip {QFP2_AB_v31_fla.Endtitle_577}Uses:281 282Used by:304
Symbol 284 GraphicUsed by:303
Symbol 285 EditableTextUses:61Used by:303
Symbol 286 TextUses:61Used by:287 289
Symbol 287 MovieClipUses:286Used by:289
Symbol 288 GraphicUsed by:289
Symbol 289 ButtonUses:286 287 288Used by:303
Symbol 290 TextUses:61Used by:303
Symbol 291 EditableTextUses:61Used by:303
Symbol 292 TextUses:61Used by:293 295
Symbol 293 MovieClipUses:292Used by:295
Symbol 294 GraphicUsed by:295
Symbol 295 ButtonUses:292 293 294Used by:303
Symbol 296 TextUses:61Used by:299
Symbol 297 TextUses:61Used by:299
Symbol 298 GraphicUsed by:299 1598 1681
Symbol 299 ButtonUses:296 297 298Used by:303
Symbol 300 TextUses:61Used by:303
Symbol 301 TextUses:61Used by:303
Symbol 302 EditableTextUses:61Used by:303
Symbol 303 MovieClip {QFP2_AB_v31_fla.gameoverFilter_578}Uses:284 285 289 290 291 295 299 300 301 302Used by:304
Symbol 304 MovieClip {QFP2_AB_v31_fla.gameOverMsg_568}Uses:60 280 283 303Used by:305
Symbol 305 MovieClip {classesAS3.GameOverMsgAnim}Uses:304Used by:1777
Symbol 306 TextUses:61Used by:310
Symbol 307 TextUses:61Used by:310
Symbol 308 TextUses:61Used by:310
Symbol 309 TextUses:61Used by:310
Symbol 310 MovieClip {levelCompleteMsgs}Uses:306 307 308 309Used by:1553
Symbol 311 GraphicUsed by:312
Symbol 312 MovieClipUses:311Used by:314 316
Symbol 313 GraphicUsed by:314
Symbol 314 MovieClipUses:313 312Used by:316
Symbol 315 GraphicUsed by:316
Symbol 316 MovieClip {energyBar}Uses:312 314 315Used by:1223
Symbol 317 GraphicUsed by:318
Symbol 318 MovieClip {explosion}Uses:317Used by:319
Symbol 319 MovieClip {classesAS3.GameExplosionAnim}Uses:318Used by:1214
Symbol 320 GraphicUsed by:321
Symbol 321 MovieClipUses:320Used by:333
Symbol 322 GraphicUsed by:330
Symbol 323 GraphicUsed by:330
Symbol 324 GraphicUsed by:330
Symbol 325 GraphicUsed by:330
Symbol 326 GraphicUsed by:330
Symbol 327 GraphicUsed by:330
Symbol 328 GraphicUsed by:330
Symbol 329 GraphicUsed by:330
Symbol 330 MovieClip {QFP2_AB_v31_fla.basicFlag_397}Uses:322 323 324 325 326 327 328 329Used by:331
Symbol 331 MovieClip {QFP2_AB_v31_fla.basicFlag2_396}Uses:330Used by:332
Symbol 332 MovieClip {QFP2_AB_v31_fla.basicFlag3_395}Uses:331Used by:333
Symbol 333 MovieClip {QFP2_AB_v31_fla.halfWayFlag_393}Uses:321 332Used by:335
Symbol 334 GraphicUsed by:335
Symbol 335 MovieClip {halfWayFlag}Uses:333 334Used by:1015 1138 1681 1777
Symbol 336 GraphicUsed by:340
Symbol 337 GraphicUsed by:338
Symbol 338 MovieClipUses:337Used by:340
Symbol 339 GraphicUsed by:340
Symbol 340 MovieClipUses:336 338 339Used by:341 1681
Symbol 341 MovieClip {startScreenInstr}Uses:340Used by:346
Symbol 342 TextUses:61Used by:346
Symbol 343 TextUses:61Used by:346
Symbol 344 EditableTextUses:19Used by:346
Symbol 345 EditableTextUses:19Used by:346
Symbol 346 MovieClip {startGameMsg}Uses:341 342 343 344 345Used by:1102
Symbol 347 GraphicUsed by:353 354 1201 1314 1552
Symbol 348 GraphicUsed by:351
Symbol 349 FontUsed by:350
Symbol 350 TextUses:349Used by:351
Symbol 351 MovieClipUses:348 350Used by:352
Symbol 352 MovieClip {QFP2_AB_v31_fla.alt_intro_holder_369}Uses:351Used by:354
Symbol 353 ButtonUses:347Used by:354
Symbol 354 MovieClip {classesAS3.GameIntroAnim}Uses:347 352 353Used by:1777
Symbol 355 GraphicUsed by:356
Symbol 356 MovieClip {classesAS3.GameCannonBall}Uses:355Used by:1777
Symbol 357 GraphicUsed by:358
Symbol 358 MovieClipUses:357Used by:359 1095
Symbol 359 MovieClip {classesAS3.GamePotion3}Uses:358Used by:1777
Symbol 360 GraphicUsed by:361
Symbol 361 MovieClipUses:360Used by:362 1095
Symbol 362 MovieClip {classesAS3.GamePotion1}Uses:361Used by:1777
Symbol 363 GraphicUsed by:364
Symbol 364 MovieClipUses:363Used by:365 1095
Symbol 365 MovieClip {classesAS3.GamePotion2}Uses:364Used by:1777
Symbol 366 GraphicUsed by:369
Symbol 367 GraphicUsed by:368
Symbol 368 MovieClipUses:367Used by:369
Symbol 369 MovieClip {QFP2_AB_v31_fla.catapultNeedle_348}Uses:366 368Used by:370 1681
Symbol 370 MovieClip {catapultDial}Uses:369Used by:1777
Symbol 371 GraphicUsed by:372
Symbol 372 MovieClip {classesAS3.GameCatapultCup}Uses:371Used by:1777
Symbol 373 GraphicUsed by:376
Symbol 374 GraphicUsed by:375
Symbol 375 MovieClipUses:374Used by:376
Symbol 376 MovieClip {classesAS3.GameCatapultRod}Uses:373 375Used by:1777
Symbol 377 MovieClip {classesAS3.GameCatapultBase}Uses:72Used by:1777
Symbol 378 GraphicUsed by:379
Symbol 379 MovieClipUses:378Used by:380
Symbol 380 MovieClipUses:379Used by:381
Symbol 381 MovieClip {evilWizardMissle}Uses:380Used by:1777
Symbol 382 GraphicUsed by:385
Symbol 383 GraphicUsed by:385
Symbol 384 GraphicUsed by:385
Symbol 385 MovieClipUses:382 383 384Used by:386
Symbol 386 MovieClip {GameFireBall}Uses:385Used by:392
Symbol 387 GraphicUsed by:388
Symbol 388 MovieClipUses:387Used by:389 395 410
Symbol 389 MovieClipUses:388Used by:392
Symbol 390 GraphicUsed by:391
Symbol 391 MovieClipUses:390Used by:392
Symbol 392 MovieClipUses:389 391 386Used by:411
Symbol 393 GraphicUsed by:394
Symbol 394 MovieClipUses:393Used by:395
Symbol 395 MovieClipUses:388 394Used by:410
Symbol 396 GraphicUsed by:410
Symbol 397 GraphicUsed by:410
Symbol 398 GraphicUsed by:410
Symbol 399 GraphicUsed by:410
Symbol 400 GraphicUsed by:410
Symbol 401 GraphicUsed by:410
Symbol 402 GraphicUsed by:410
Symbol 403 GraphicUsed by:410
Symbol 404 GraphicUsed by:410
Symbol 405 GraphicUsed by:410
Symbol 406 GraphicUsed by:410
Symbol 407 GraphicUsed by:410
Symbol 408 GraphicUsed by:410
Symbol 409 GraphicUsed by:410
Symbol 410 MovieClip {QFP2_AB_v31_fla.dragon_die_337}Uses:395 388 396 397 398 399 400 401 402 403 404 405 406 407 408 409Used by:411
Symbol 411 MovieClip {GameDragon}Uses:392 410Used by:1777
Symbol 412 GraphicUsed by:413
Symbol 413 MovieClipUses:412Used by:414
Symbol 414 MovieClip {GameRock}Uses:413Used by:420
Symbol 415 GraphicUsed by:416
Symbol 416 MovieClipUses:415Used by:417 421 430
Symbol 417 MovieClipUses:416Used by:420
Symbol 418 GraphicUsed by:419
Symbol 419 MovieClipUses:418Used by:420 421
Symbol 420 MovieClip {QFP2_AB_v31_fla.bird_fly_322}Uses:414 417 419Used by:431 1582
Symbol 421 MovieClipUses:416 419Used by:430
Symbol 422 GraphicUsed by:430
Symbol 423 GraphicUsed by:430
Symbol 424 GraphicUsed by:430
Symbol 425 GraphicUsed by:430
Symbol 426 GraphicUsed by:430
Symbol 427 GraphicUsed by:430
Symbol 428 GraphicUsed by:430
Symbol 429 GraphicUsed by:430
Symbol 430 MovieClip {QFP2_AB_v31_fla.bird_die_328}Uses:421 416 422 423 424 425 426 427 428 429Used by:431
Symbol 431 MovieClip {GameBird}Uses:420 430Used by:1777
Symbol 432 GraphicUsed by:433
Symbol 433 MovieClipUses:432Used by:457 465 510 564 600 622 641 658 674 795 813 832 853 869 897 920 938 961 988 1054 1681
Symbol 434 GraphicUsed by:435
Symbol 435 MovieClipUses:434Used by:446 451 454 455
Symbol 436 GraphicUsed by:437
Symbol 437 MovieClipUses:436Used by:446 451 454 455
Symbol 438 GraphicUsed by:439
Symbol 439 MovieClipUses:438Used by:446 451 454 455
Symbol 440 GraphicUsed by:441
Symbol 441 MovieClipUses:440Used by:446 482
Symbol 442 GraphicUsed by:443
Symbol 443 MovieClipUses:442Used by:446 451 454 455
Symbol 444 GraphicUsed by:445
Symbol 445 MovieClipUses:444Used by:446
Symbol 446 MovieClipUses:435 263 437 439 441 443 445Used by:456 1095
Symbol 447 GraphicUsed by:448
Symbol 448 MovieClipUses:447Used by:451 454 455
Symbol 449 GraphicUsed by:450
Symbol 450 MovieClipUses:449Used by:451 454 455 497 503 508
Symbol 451 MovieClipUses:435 263 448 437 439 450 443Used by:456
Symbol 452 GraphicUsed by:454 1053
Symbol 453 GraphicUsed by:454
Symbol 454 MovieClipUses:435 263 448 437 439 450 443 452 453Used by:456
Symbol 455 MovieClip {QFP2_AB_v31_fla.knightDie5_320}Uses:435 263 448 437 439 450 443Used by:456
Symbol 456 MovieClip {QFP2_AB_v31_fla.knight4_310}Uses:446 451 454 455Used by:457 1681
Symbol 457 MovieClip {classesAS3.GameKnight4}Uses:433 456Used by:1777
Symbol 458 GraphicUsed by:459
Symbol 459 MovieClipUses:458Used by:462 463
Symbol 460 GraphicUsed by:461
Symbol 461 MovieClipUses:460Used by:462 918
Symbol 462 MovieClip {QFP2_AB_v31_fla.wizardSide_306}Uses:263 265 267 459 273 271 461Used by:464
Symbol 463 MovieClip {QFP2_AB_v31_fla.wizardDie_308}Uses:263 265 267 459 273 271Used by:464
Symbol 464 MovieClip {QFP2_AB_v31_fla.gameSolderWizard_305}Uses:274 462 463Used by:465 1681
Symbol 465 MovieClip {classesAS3.GameWizard1}Uses:433 464Used by:1777
Symbol 466 GraphicUsed by:467
Symbol 467 MovieClipUses:466Used by:482 497 503 508 787 794
Symbol 468 GraphicUsed by:469
Symbol 469 MovieClipUses:468Used by:482 497 503 508
Symbol 470 GraphicUsed by:471
Symbol 471 MovieClipUses:470Used by:482 497 503 508
Symbol 472 GraphicUsed by:473
Symbol 473 MovieClipUses:472Used by:482 497 503 508
Symbol 474 GraphicUsed by:475
Symbol 475 MovieClipUses:474Used by:482 497 503 508
Symbol 476 GraphicUsed by:477
Symbol 477 MovieClipUses:476Used by:482
Symbol 478 GraphicUsed by:479
Symbol 479 MovieClipUses:478Used by:482
Symbol 480 GraphicUsed by:481
Symbol 481 MovieClipUses:480Used by:482
Symbol 482 MovieClipUses:467 263 469 471 441 258 473 475 477 479 481Used by:509 1095
Symbol 483 GraphicUsed by:484
Symbol 484 MovieClipUses:483Used by:497 503 508
Symbol 485 GraphicUsed by:486
Symbol 486 MovieClipUses:485Used by:497 503 508
Symbol 487 GraphicUsed by:488
Symbol 488 MovieClipUses:487Used by:497 503 508
Symbol 489 GraphicUsed by:490
Symbol 490 MovieClipUses:489Used by:497 503 508
Symbol 491 GraphicUsed by:492
Symbol 492 MovieClipUses:491Used by:497 503 508
Symbol 493 GraphicUsed by:497
Symbol 494 GraphicUsed by:497 503 508
Symbol 495 GraphicUsed by:497
Symbol 496 GraphicUsed by:497
Symbol 497 MovieClipUses:484 475 486 488 490 492 473 263 467 469 471 450 493 258 494 495 496Used by:509
Symbol 498 GraphicUsed by:499
Symbol 499 MovieClipUses:498Used by:503 508
Symbol 500 GraphicUsed by:503
Symbol 501 GraphicUsed by:503
Symbol 502 GraphicUsed by:503
Symbol 503 MovieClipUses:484 475 486 488 490 492 473 263 467 469 471 450 494 258 499 500 501 502Used by:509
Symbol 504 GraphicUsed by:508
Symbol 505 GraphicUsed by:508
Symbol 506 GraphicUsed by:508
Symbol 507 GraphicUsed by:508
Symbol 508 MovieClip {QFP2_AB_v31_fla.knightDie4_296}Uses:484 475 486 488 490 492 473 263 467 469 471 450 494 258 499 504 505 506 507Used by:509
Symbol 509 MovieClip {QFP2_AB_v31_fla.GameSoldier5_277}Uses:482 497 503 508Used by:510 1582 1681
Symbol 510 MovieClip {classesAS3.GameKnight3}Uses:433 509Used by:1777
Symbol 511 GraphicUsed by:516
Symbol 512 GraphicUsed by:516
Symbol 513 GraphicUsed by:516
Symbol 514 GraphicUsed by:515
Symbol 515 MovieClipUses:514Used by:516 527 547 563
Symbol 516 MovieClipUses:511 215 217 512 221 513 515Used by:564
Symbol 517 GraphicUsed by:527
Symbol 518 GraphicUsed by:527
Symbol 519 GraphicUsed by:527
Symbol 520 GraphicUsed by:527
Symbol 521 GraphicUsed by:527
Symbol 522 GraphicUsed by:527
Symbol 523 GraphicUsed by:527
Symbol 524 GraphicUsed by:527
Symbol 525 GraphicUsed by:527
Symbol 526 GraphicUsed by:527
Symbol 527 MovieClipUses:517 215 518 515 519 520 217 521 522 523 524 525 526Used by:564
Symbol 528 GraphicUsed by:547
Symbol 529 GraphicUsed by:547
Symbol 530 GraphicUsed by:547
Symbol 531 GraphicUsed by:547
Symbol 532 GraphicUsed by:533
Symbol 533 MovieClipUses:532Used by:547 563 733
Symbol 534 GraphicUsed by:547
Symbol 535 GraphicUsed by:547
Symbol 536 GraphicUsed by:547
Symbol 537 GraphicUsed by:547
Symbol 538 GraphicUsed by:547
Symbol 539 GraphicUsed by:547
Symbol 540 GraphicUsed by:547
Symbol 541 GraphicUsed by:547
Symbol 542 GraphicUsed by:547
Symbol 543 GraphicUsed by:547
Symbol 544 GraphicUsed by:547
Symbol 545 GraphicUsed by:547
Symbol 546 GraphicUsed by:547
Symbol 547 MovieClipUses:528 215 529 515 530 531 217 533 534 535 536 537 538 539 540 541 542 543 544 545 546Used by:564
Symbol 548 GraphicUsed by:563
Symbol 549 GraphicUsed by:563
Symbol 550 GraphicUsed by:563
Symbol 551 GraphicUsed by:563
Symbol 552 GraphicUsed by:563
Symbol 553 GraphicUsed by:563
Symbol 554 GraphicUsed by:563
Symbol 555 GraphicUsed by:563
Symbol 556 GraphicUsed by:563
Symbol 557 GraphicUsed by:563
Symbol 558 GraphicUsed by:563
Symbol 559 GraphicUsed by:563
Symbol 560 GraphicUsed by:563
Symbol 561 GraphicUsed by:563
Symbol 562 GraphicUsed by:563
Symbol 563 MovieClip {QFP2_AB_v31_fla.badKingDie7_275}Uses:548 215 549 515 550 217 533 551 552 553 554 555 556 557 558 559 560 561 562Used by:564
Symbol 564 MovieClip {classesAS3.GameKingBad7}Uses:433 516 527 547 563Used by:1777
Symbol 565 GraphicUsed by:569
Symbol 566 GraphicUsed by:569
Symbol 567 GraphicUsed by:569
Symbol 568 GraphicUsed by:569
Symbol 569 MovieClipUses:565 215 217 566 223 567 568Used by:600
Symbol 570 GraphicUsed by:576
Symbol 571 GraphicUsed by:576 584
Symbol 572 GraphicUsed by:576 584
Symbol 573 GraphicUsed by:576 584
Symbol 574 GraphicUsed by:576
Symbol 575 GraphicUsed by:576
Symbol 576 MovieClipUses:570 217 571 223 572 230 215 573 574 575Used by:600
Symbol 577 GraphicUsed by:584
Symbol 578 GraphicUsed by:584
Symbol 579 GraphicUsed by:584
Symbol 580 GraphicUsed by:584
Symbol 581 GraphicUsed by:584
Symbol 582 GraphicUsed by:584
Symbol 583 GraphicUsed by:584
Symbol 584 MovieClipUses:577 217 571 223 572 215 578 230 573 579 580 581 582 583Used by:600
Symbol 585 GraphicUsed by:599
Symbol 586 GraphicUsed by:599
Symbol 587 GraphicUsed by:599
Symbol 588 GraphicUsed by:599
Symbol 589 GraphicUsed by:599
Symbol 590 GraphicUsed by:599
Symbol 591 GraphicUsed by:599
Symbol 592 GraphicUsed by:599
Symbol 593 GraphicUsed by:599
Symbol 594 GraphicUsed by:599
Symbol 595 GraphicUsed by:599
Symbol 596 GraphicUsed by:599
Symbol 597 GraphicUsed by:599
Symbol 598 GraphicUsed by:599
Symbol 599 MovieClip {QFP2_AB_v31_fla.badKingDie6_269}Uses:585 217 586 223 215 587 588 589 590 591 592 593 594 595 596 597 598Used by:600
Symbol 600 MovieClip {classesAS3.GameKingBad6}Uses:433 569 576 584 599Used by:1777
Symbol 601 GraphicUsed by:602
Symbol 602 MovieClipUses:601Used by:611 618 620 621 1192 1482 1484
Symbol 603 GraphicUsed by:604
Symbol 604 MovieClipUses:603Used by:611 1192 1482 1484
Symbol 605 GraphicUsed by:606
Symbol 606 MovieClipUses:605Used by:611 618 620 621 1192 1482 1484
Symbol 607 GraphicUsed by:608
Symbol 608 MovieClipUses:607Used by:611 1192 1482 1484
Symbol 609 GraphicUsed by:610
Symbol 610 MovieClipUses:609Used by:611 1192 1482 1484
Symbol 611 MovieClipUses:602 604 606 608 610Used by:622 1681
Symbol 612 GraphicUsed by:613
Symbol 613 MovieClipUses:612Used by:618 620 621
Symbol 614 GraphicUsed by:615
Symbol 615 MovieClipUses:614Used by:618 620 621
Symbol 616 GraphicUsed by:617
Symbol 617 MovieClipUses:616Used by:618 620 621
Symbol 618 MovieClipUses:258 602 613 606 615 617Used by:622
Symbol 619 GraphicUsed by:620 639 656 672 867
Symbol 620 MovieClipUses:258 602 613 606 615 617 619Used by:622
Symbol 621 MovieClip {QFP2_AB_v31_fla.badKingDie5_264}Uses:258 602 613 606 615 617Used by:622
Symbol 622 MovieClip {classesAS3.GameKingBad5}Uses:433 611 618 620 621Used by:1777
Symbol 623 GraphicUsed by:624
Symbol 624 MovieClipUses:623Used by:633 638 639 640 1191 1478 1480
Symbol 625 GraphicUsed by:626
Symbol 626 MovieClipUses:625Used by:633 638 639 640 1191 1478 1480
Symbol 627 GraphicUsed by:628
Symbol 628 MovieClipUses:627Used by:633 1191 1478 1480
Symbol 629 GraphicUsed by:630
Symbol 630 MovieClipUses:629Used by:633 638 639 640 1191 1478 1480
Symbol 631 GraphicUsed by:632
Symbol 632 MovieClipUses:631Used by:633 1191 1478 1480
Symbol 633 MovieClipUses:624 626 263 628 630 632Used by:641 1681
Symbol 634 GraphicUsed by:635
Symbol 635 MovieClipUses:634Used by:638 639 640
Symbol 636 GraphicUsed by:637
Symbol 637 MovieClipUses:636Used by:638 639 640
Symbol 638 MovieClipUses:624 626 263 630 635 637 258Used by:641
Symbol 639 MovieClipUses:624 626 263 630 635 258 637 619Used by:641
Symbol 640 MovieClip {QFP2_AB_v31_fla.badKingDie4_251}Uses:258 624 626 263 630 635 637Used by:641
Symbol 641 MovieClip {classesAS3.GameKingBad4}Uses:433 633 638 639 640Used by:1777
Symbol 642 GraphicUsed by:643
Symbol 643 MovieClipUses:642Used by:650 655 656 657 1190 1474 1476
Symbol 644 GraphicUsed by:645
Symbol 645 MovieClipUses:644Used by:650 655 656 657 1190 1474 1476
Symbol 646 GraphicUsed by:647
Symbol 647 MovieClipUses:646Used by:650 1190 1474 1476
Symbol 648 GraphicUsed by:649
Symbol 649 MovieClipUses:648Used by:650 1190 1474 1476
Symbol 650 MovieClipUses:263 643 645 647 649Used by:658 1681
Symbol 651 GraphicUsed by:652
Symbol 652 MovieClipUses:651Used by:655 656 657
Symbol 653 GraphicUsed by:654
Symbol 654 MovieClipUses:653Used by:655 656 657
Symbol 655 MovieClipUses:263 643 645 652 258 654Used by:658
Symbol 656 MovieClipUses:263 643 645 652 258 654 619Used by:658
Symbol 657 MovieClip {QFP2_AB_v31_fla.badKingDie3_239}Uses:263 643 645 652 258 654Used by:658
Symbol 658 MovieClip {classesAS3.GameKingBad3}Uses:433 650 655 656 657Used by:1777
Symbol 659 GraphicUsed by:668
Symbol 660 GraphicUsed by:661
Symbol 661 MovieClipUses:660Used by:668 671 672 673 1189 1469 1472
Symbol 662 GraphicUsed by:663
Symbol 663 MovieClipUses:662Used by:668 671 672 673 1189 1469 1472
Symbol 664 GraphicUsed by:665
Symbol 665 MovieClipUses:664Used by:668 671 672 673 1189 1469 1472
Symbol 666 GraphicUsed by:667
Symbol 667 MovieClipUses:666Used by:668 1189
Symbol 668 MovieClipUses:659 661 252 663 665 667Used by:674 1681
Symbol 669 GraphicUsed by:670
Symbol 670 MovieClipUses:669Used by:671 672 673
Symbol 671 MovieClipUses:661 252 665 663 258 670Used by:674
Symbol 672 MovieClipUses:661 252 665 663 258 670 619Used by:674
Symbol 673 MovieClip {QFP2_AB_v31_fla.badKingDie2_228}Uses:661 252 665 663 258 670Used by:674
Symbol 674 MovieClip {classesAS3.GameKingBad2}Uses:433 668 671 672 673Used by:1777
Symbol 675 GraphicUsed by:676
Symbol 676 MovieClip {woodBlock}Uses:675Used by:692 695 1095 1681
Symbol 677 GraphicUsed by:692 695
Symbol 678 GraphicUsed by:692 695
Symbol 679 GraphicUsed by:692
Symbol 680 GraphicUsed by:681
Symbol 681 MovieClipUses:680Used by:692 695
Symbol 682 GraphicUsed by:683
Symbol 683 MovieClipUses:682Used by:692 695
Symbol 684 GraphicUsed by:685
Symbol 685 MovieClipUses:684Used by:692 695
Symbol 686 GraphicUsed by:687
Symbol 687 MovieClipUses:686Used by:692 695
Symbol 688 GraphicUsed by:689
Symbol 689 MovieClipUses:688Used by:692 695
Symbol 690 GraphicUsed by:691
Symbol 691 MovieClipUses:690Used by:692 695
Symbol 692 MovieClip {QFP2_AB_v31_fla.woodBlockEnemy_218}Uses:676 677 678 679 681 683 685 687 689 691Used by:693
Symbol 693 MovieClip {classesAS3.GameWoodBlockEn}Uses:692Used by:1777
Symbol 694 GraphicUsed by:695
Symbol 695 MovieClip {QFP2_AB_v31_fla.woodenBlock2_209}Uses:676 677 678 694 681 683 685 687 689 691Used by:696
Symbol 696 MovieClip {classesAS3.GameWoodBlock}Uses:695Used by:1777
Symbol 697 GraphicUsed by:699
Symbol 698 MovieClipUses:156Used by:699 1681
Symbol 699 MovieClip {QFP2_AB_v31_fla.enemyBlock_205}Uses:697 698 168 169 170 172 174 176 178 180Used by:707
Symbol 700 GraphicUsed by:707
Symbol 701 GraphicUsed by:702
Symbol 702 MovieClipUses:701Used by:707
Symbol 703 GraphicUsed by:707
Symbol 704 GraphicUsed by:707
Symbol 705 GraphicUsed by:707
Symbol 706 GraphicUsed by:707
Symbol 707 MovieClip {classesAS3.GameBlockEnemy}Uses:699 700 702 703 704 705 706 162 164 189Used by:1777
Symbol 708 GraphicUsed by:709
Symbol 709 MovieClipUses:708Used by:723 1095
Symbol 710 GraphicUsed by:723
Symbol 711 GraphicUsed by:712
Symbol 712 MovieClipUses:711Used by:723
Symbol 713 GraphicUsed by:714
Symbol 714 MovieClipUses:713Used by:723
Symbol 715 GraphicUsed by:716
Symbol 716 MovieClipUses:715Used by:723
Symbol 717 GraphicUsed by:718
Symbol 718 MovieClipUses:717Used by:723
Symbol 719 GraphicUsed by:720
Symbol 720 MovieClipUses:719Used by:723
Symbol 721 GraphicUsed by:722
Symbol 722 MovieClipUses:721Used by:723
Symbol 723 MovieClip {classesAS3.GamePlank}Uses:709 710 712 714 716 718 720 722Used by:1777
Symbol 724 GraphicUsed by:733
Symbol 725 GraphicUsed by:733
Symbol 726 GraphicUsed by:733
Symbol 727 GraphicUsed by:728
Symbol 728 MovieClipUses:727Used by:730
Symbol 729 GraphicUsed by:730
Symbol 730 MovieClipUses:728 729Used by:733
Symbol 731 GraphicUsed by:732
Symbol 732 MovieClipUses:731Used by:733
Symbol 733 MovieClipUses:724 215 217 725 221 726 730 533 732Used by:795
Symbol 734 GraphicUsed by:741 743
Symbol 735 GraphicUsed by:741 743
Symbol 736 GraphicUsed by:741 743 794
Symbol 737 GraphicUsed by:741 743 794
Symbol 738 GraphicUsed by:741 743
Symbol 739 GraphicUsed by:741 743
Symbol 740 GraphicUsed by:741
Symbol 741 MovieClipUses:734 735 736 737 738 739 740Used by:787 794
Symbol 742 GraphicUsed by:743
Symbol 743 MovieClipUses:737 738 739 742 734 735 736Used by:787 794
Symbol 744 GraphicUsed by:745
Symbol 745 MovieClipUses:744Used by:787 794
Symbol 746 GraphicUsed by:754
Symbol 747 GraphicUsed by:754 794
Symbol 748 GraphicUsed by:754
Symbol 749 GraphicUsed by:754
Symbol 750 GraphicUsed by:754
Symbol 751 GraphicUsed by:754
Symbol 752 GraphicUsed by:754
Symbol 753 GraphicUsed by:754
Symbol 754 MovieClipUses:746 747 748 749 750 751 752 753Used by:787 794
Symbol 755 GraphicUsed by:757
Symbol 756 GraphicUsed by:757
Symbol 757 MovieClipUses:755 756Used by:787 794
Symbol 758 GraphicUsed by:765 794
Symbol 759 GraphicUsed by:765
Symbol 760 GraphicUsed by:765
Symbol 761 GraphicUsed by:765
Symbol 762 GraphicUsed by:765
Symbol 763 GraphicUsed by:765
Symbol 764 GraphicUsed by:765
Symbol 765 MovieClipUses:758 759 760 761 762 763 764Used by:787 794
Symbol 766 GraphicUsed by:773
Symbol 767 GraphicUsed by:773
Symbol 768 GraphicUsed by:773 794
Symbol 769 GraphicUsed by:773
Symbol 770 GraphicUsed by:773
Symbol 771 GraphicUsed by:773
Symbol 772 GraphicUsed by:773
Symbol 773 MovieClipUses:766 767 768 769 770 771 772Used by:787 794
Symbol 774 GraphicUsed by:787 794
Symbol 775 GraphicUsed by:776
Symbol 776 MovieClipUses:775Used by:787 794 820 826 829 831
Symbol 777 GraphicUsed by:778
Symbol 778 MovieClipUses:777Used by:787 794 848 851 852
Symbol 779 GraphicUsed by:780
Symbol 780 MovieClipUses:779Used by:787 794 820 826 829 831
Symbol 781 GraphicUsed by:782
Symbol 782 MovieClipUses:781Used by:787 794
Symbol 783 GraphicUsed by:784
Symbol 784 MovieClipUses:783Used by:787 794 820 826 829 831 931 934 936
Symbol 785 GraphicUsed by:786
Symbol 786 MovieClipUses:785Used by:787 794 820 826 829 831 931 934 936
Symbol 787 MovieClipUses:741 743 745 754 757 765 773 774 776 467 778 263 780 782 784 786Used by:795
Symbol 788 GraphicUsed by:794
Symbol 789 GraphicUsed by:794
Symbol 790 GraphicUsed by:794
Symbol 791 GraphicUsed by:794
Symbol 792 GraphicUsed by:794
Symbol 793 GraphicUsed by:794
Symbol 794 MovieClip {QFP2_AB_v31_fla.vikingDie1_195}Uses:741 743 745 754 757 765 773 774 776 467 778 263 780 782 784 786 736 737 758 768 788 789 747 790 791 792 793Used by:795
Symbol 795 MovieClip {classesAS3.GameViking1}Uses:433 733 787 794Used by:1777
Symbol 796 GraphicUsed by:801
Symbol 797 GraphicUsed by:801
Symbol 798 GraphicUsed by:801
Symbol 799 GraphicUsed by:800
Symbol 800 MovieClipUses:799Used by:801
Symbol 801 MovieClipUses:796 215 217 797 798 800Used by:813
Symbol 802 GraphicUsed by:803
Symbol 803 MovieClipUses:802Used by:808 811 812
Symbol 804 GraphicUsed by:805
Symbol 805 MovieClipUses:804Used by:808 811 812
Symbol 806 GraphicUsed by:807
Symbol 807 MovieClipUses:806Used by:808 811 812
Symbol 808 MovieClipUses:250 263 254 803 805 807Used by:813
Symbol 809 GraphicUsed by:811 958
Symbol 810 GraphicUsed by:811 958
Symbol 811 MovieClipUses:250 263 254 803 805 807 809 810Used by:813
Symbol 812 MovieClip {QFP2_AB_v31_fla.badKnightDie3_178}Uses:250 263 254 803 805 807Used by:813
Symbol 813 MovieClip {classesAS3.GameBadKnight3}Uses:433 801 808 811 812Used by:1777
Symbol 814 GraphicUsed by:815
Symbol 815 MovieClipUses:814Used by:820 826 829 831
Symbol 816 GraphicUsed by:817
Symbol 817 MovieClipUses:816Used by:820 826 829 831
Symbol 818 GraphicUsed by:819
Symbol 819 MovieClipUses:818Used by:820
Symbol 820 MovieClipUses:776 815 263 817 819 780 784 786Used by:832
Symbol 821 GraphicUsed by:822
Symbol 822 MovieClipUses:821Used by:826 829 831
Symbol 823 GraphicUsed by:826
Symbol 824 GraphicUsed by:826
Symbol 825 GraphicUsed by:826 829
Symbol 826 MovieClip {QFP2_AB_v31_fla.badArcherSide1_166}Uses:776 815 263 817 822 780 784 786 823 824 825Used by:832
Symbol 827 GraphicUsed by:829
Symbol 828 GraphicUsed by:829
Symbol 829 MovieClip {QFP2_AB_v31_fla.badArcherAttack1_168}Uses:776 815 263 817 822 780 784 786 827 828 825Used by:832
Symbol 830 GraphicUsed by:831
Symbol 831 MovieClip {QFP2_AB_v31_fla.badArcherDie1_169}Uses:776 815 263 817 822 780 784 786 830Used by:832
Symbol 832 MovieClip {classesAS3.GameBadArcher1}Uses:433 820 826 829 831Used by:1777
Symbol 833 GraphicUsed by:839
Symbol 834 GraphicUsed by:839
Symbol 835 GraphicUsed by:839
Symbol 836 GraphicUsed by:839 912
Symbol 837 GraphicUsed by:838
Symbol 838 MovieClipUses:837Used by:839 913
Symbol 839 MovieClipUses:833 215 217 834 221 835 836 838Used by:853
Symbol 840 GraphicUsed by:841
Symbol 841 MovieClipUses:840Used by:848 851 852
Symbol 842 GraphicUsed by:843
Symbol 843 MovieClipUses:842Used by:848 851 852
Symbol 844 GraphicUsed by:845
Symbol 845 MovieClipUses:844Used by:848 851 852
Symbol 846 GraphicUsed by:847
Symbol 847 MovieClipUses:846Used by:848 851 852
Symbol 848 MovieClipUses:841 843 263 778 845 847Used by:853
Symbol 849 GraphicUsed by:851
Symbol 850 GraphicUsed by:851
Symbol 851 MovieClipUses:841 843 263 778 845 847 849 850Used by:853
Symbol 852 MovieClip {QFP2_AB_v31_fla.badKnightDie3b_158}Uses:841 843 263 778 845 847Used by:853
Symbol 853 MovieClip {classesAS3.GameBadKnight2}Uses:433 839 848 851 852Used by:1777
Symbol 854 GraphicUsed by:863
Symbol 855 GraphicUsed by:856
Symbol 856 MovieClipUses:855Used by:863 866 867 868 1187 1462 1466
Symbol 857 GraphicUsed by:858
Symbol 858 MovieClipUses:857Used by:863 866 867 868 1187 1462 1466
Symbol 859 GraphicUsed by:860
Symbol 860 MovieClipUses:859Used by:863 866 867 868 1187 1462 1466
Symbol 861 GraphicUsed by:862
Symbol 862 MovieClipUses:861Used by:863 1187 1462 1466
Symbol 863 MovieClipUses:854 856 250 252 858 860 862Used by:869 1681
Symbol 864 GraphicUsed by:865
Symbol 865 MovieClipUses:864Used by:866 867 868
Symbol 866 MovieClipUses:856 250 252 858 258 860 865Used by:869
Symbol 867 MovieClipUses:856 250 252 858 258 860 865 619Used by:869
Symbol 868 MovieClip {QFP2_AB_v31_fla.badKingDie1_147}Uses:856 250 252 858 258 860 865Used by:869
Symbol 869 MovieClip {classesAS3.GameKingBad1}Uses:433 863 866 867 868Used by:1777
Symbol 870 GraphicUsed by:879
Symbol 871 GraphicUsed by:872
Symbol 872 MovieClipUses:871Used by:879 947
Symbol 873 GraphicUsed by:874
Symbol 874 MovieClipUses:873Used by:879
Symbol 875 GraphicUsed by:876
Symbol 876 MovieClipUses:875Used by:879
Symbol 877 GraphicUsed by:878
Symbol 878 MovieClipUses:877Used by:879
Symbol 879 MovieClipUses:870 872 217 874 876 230 878Used by:897
Symbol 880 GraphicUsed by:881
Symbol 881 MovieClipUses:880Used by:892 895 896
Symbol 882 GraphicUsed by:883
Symbol 883 MovieClipUses:882Used by:892 895 896
Symbol 884 GraphicUsed by:885
Symbol 885 MovieClipUses:884Used by:892 895 896
Symbol 886 GraphicUsed by:887
Symbol 887 MovieClipUses:886Used by:892 895 896
Symbol 888 GraphicUsed by:889
Symbol 889 MovieClipUses:888Used by:892 895 896
Symbol 890 GraphicUsed by:891
Symbol 891 MovieClipUses:890Used by:892 895 896
Symbol 892 MovieClipUses:881 883 263 885 887 889 891Used by:897
Symbol 893 GraphicUsed by:895
Symbol 894 GraphicUsed by:895
Symbol 895 MovieClipUses:881 883 263 885 887 889 891 893 894Used by:897
Symbol 896 MovieClip {QFP2_AB_v31_fla.badKnightDie2_124}Uses:881 883 263 885 887 889 891Used by:897
Symbol 897 MovieClip {classesAS3.GameBadKnight1}Uses:433 879 892 895 896Used by:1777
Symbol 898 GraphicUsed by:899
Symbol 899 MovieClipUses:898Used by:908
Symbol 900 GraphicUsed by:901
Symbol 901 MovieClipUses:900Used by:908 918 919
Symbol 902 GraphicUsed by:903
Symbol 903 MovieClipUses:902Used by:908
Symbol 904 GraphicUsed by:905
Symbol 905 MovieClipUses:904Used by:908 918 919
Symbol 906 GraphicUsed by:907
Symbol 907 MovieClipUses:906Used by:908 918 919
Symbol 908 MovieClipUses:263 899 901 903 905 907Used by:920
Symbol 909 GraphicUsed by:913
Symbol 910 GraphicUsed by:913
Symbol 911 GraphicUsed by:913
Symbol 912 MovieClipUses:836Used by:913
Symbol 913 MovieClipUses:909 217 910 223 215 911 912 838Used by:920
Symbol 914 GraphicUsed by:915
Symbol 915 MovieClipUses:914Used by:918 919
Symbol 916 GraphicUsed by:917
Symbol 917 MovieClipUses:916Used by:918 919
Symbol 918 MovieClip {QFP2_AB_v31_fla.crossbowManAttack1_106}Uses:905 263 915 901 917 907 461Used by:920
Symbol 919 MovieClip {QFP2_AB_v31_fla.crossbowManDie1_110}Uses:905 263 915 901 917 907Used by:920
Symbol 920 MovieClip {classesAS3.GameBadArcher2}Uses:433 908 913 918 919Used by:1777
Symbol 921 GraphicUsed by:922
Symbol 922 MovieClipUses:921Used by:931 934 936
Symbol 923 GraphicUsed by:924
Symbol 924 MovieClipUses:923Used by:931 934 936
Symbol 925 GraphicUsed by:926
Symbol 926 MovieClipUses:925Used by:931 934 936
Symbol 927 GraphicUsed by:928
Symbol 928 MovieClipUses:927Used by:931 934 936
Symbol 929 GraphicUsed by:930
Symbol 930 MovieClipUses:929Used by:931
Symbol 931 MovieClipUses:922 263 924 926 928 930 784 786Used by:937 1095
Symbol 932 GraphicUsed by:933
Symbol 933 MovieClipUses:932Used by:934 936
Symbol 934 MovieClipUses:924 922 263 928 926 933 784 786Used by:937
Symbol 935 GraphicUsed by:936
Symbol 936 MovieClip {QFP2_AB_v31_fla.archerDie1_92}Uses:924 922 263 928 926 933 784 786 935Used by:937
Symbol 937 MovieClip {QFP2_AB_v31_fla.gameSoldier3_81}Uses:931 934 936Used by:938 1582 1681
Symbol 938 MovieClip {classesAS3.GameArcher1}Uses:433 937Used by:1777
Symbol 939 GraphicUsed by:947
Symbol 940 GraphicUsed by:947
Symbol 941 GraphicUsed by:942
Symbol 942 MovieClipUses:941Used by:947
Symbol 943 GraphicUsed by:944
Symbol 944 MovieClipUses:943Used by:947
Symbol 945 GraphicUsed by:946
Symbol 946 MovieClipUses:945Used by:947 957 958 959
Symbol 947 MovieClip {knight2}Uses:939 872 217 940 942 944 230 946Used by:960 1095
Symbol 948 GraphicUsed by:949
Symbol 949 MovieClipUses:948Used by:957 958 959
Symbol 950 MovieClipUses:253Used by:957 958 959
Symbol 951 GraphicUsed by:952
Symbol 952 MovieClipUses:951Used by:957 958 959
Symbol 953 GraphicUsed by:954
Symbol 954 MovieClipUses:953Used by:957 958 959
Symbol 955 GraphicUsed by:956
Symbol 956 MovieClipUses:955Used by:957 958 959
Symbol 957 MovieClipUses:949 263 950 952 954 956 946Used by:960
Symbol 958 MovieClipUses:949 263 950 952 954 956 946 809 810Used by:960
Symbol 959 MovieClip {QFP2_AB_v31_fla.knightDie2_79}Uses:949 263 950 952 954 956 946Used by:960
Symbol 960 MovieClip {QFP2_AB_v31_fla.gameSoldier2_65}Uses:947 957 958 959Used by:961 1582 1681
Symbol 961 MovieClip {classesAS3.GameKnight2}Uses:433 960Used by:1777
Symbol 962 GraphicUsed by:967
Symbol 963 GraphicUsed by:967
Symbol 964 GraphicUsed by:967
Symbol 965 GraphicUsed by:967
Symbol 966 GraphicUsed by:967
Symbol 967 MovieClip {classesAS3.GameHitFloorSmoke}Uses:962 963 964 965 966Used by:1777
Symbol 968 GraphicUsed by:969
Symbol 969 MovieClipUses:968Used by:978 983 985 986
Symbol 970 GraphicUsed by:971
Symbol 971 MovieClipUses:970Used by:978 983 985 986
Symbol 972 GraphicUsed by:973
Symbol 973 MovieClipUses:972Used by:978
Symbol 974 GraphicUsed by:975
Symbol 975 MovieClipUses:974Used by:978
Symbol 976 GraphicUsed by:977
Symbol 977 MovieClipUses:976Used by:978 983 985 986
Symbol 978 MovieClipUses:969 263 971 973 975 977Used by:987 1095
Symbol 979 GraphicUsed by:980
Symbol 980 MovieClipUses:979Used by:983 985 986
Symbol 981 GraphicUsed by:982
Symbol 982 MovieClipUses:981Used by:983 985 986
Symbol 983 MovieClipUses:969 263 977 971 980 982Used by:987
Symbol 984 GraphicUsed by:985
Symbol 985 MovieClipUses:969 263 977 971 980 982 984Used by:987
Symbol 986 MovieClip {QFP2_AB_v31_fla.knightDie1_62}Uses:969 263 977 971 980 982Used by:987
Symbol 987 MovieClip {QFP2_AB_v31_fla.gameSoldier1_50}Uses:978 230 983 985 986Used by:988 1582 1681
Symbol 988 MovieClip {classesAS3.GameKnight1}Uses:433 987Used by:1777
Symbol 989 GraphicUsed by:997
Symbol 990 GraphicUsed by:991
Symbol 991 MovieClipUses:990Used by:997
Symbol 992 GraphicUsed by:997
Symbol 993 GraphicUsed by:994
Symbol 994 MovieClipUses:993Used by:997
Symbol 995 GraphicUsed by:996
Symbol 996 MovieClipUses:995Used by:997
Symbol 997 MovieClipUses:989 991 992 994 996Used by:1013
Symbol 998 GraphicUsed by:999
Symbol 999 MovieClipUses:998Used by:1008 1011 1012
Symbol 1000 GraphicUsed by:1001
Symbol 1001 MovieClipUses:1000Used by:1008 1011 1012
Symbol 1002 GraphicUsed by:1003
Symbol 1003 MovieClipUses:1002Used by:1008 1011 1012
Symbol 1004 GraphicUsed by:1005
Symbol 1005 MovieClipUses:1004Used by:1008 1011 1012
Symbol 1006 GraphicUsed by:1007
Symbol 1007 MovieClipUses:1006Used by:1008 1011 1012
Symbol 1008 MovieClipUses:999 263 1001 1003 1005 1007Used by:1013 1582
Symbol 1009 GraphicUsed by:1011
Symbol 1010 GraphicUsed by:1011
Symbol 1011 MovieClipUses:999 263 1001 1003 1005 1007 1009 1010Used by:1013
Symbol 1012 MovieClip {QFP2_AB_v31_fla.ramDie1_36}Uses:999 263 1001 1003 1005 1007Used by:1013
Symbol 1013 MovieClip {classesAS3.GameRam1}Uses:997 1008 1011 1012Used by:1777
Symbol 1014 GraphicUsed by:1015
Symbol 1015 MovieClip {tent}Uses:335 1014Used by:1777
Symbol 1016 GraphicUsed by:1017
Symbol 1017 MovieClip {GameIceBolt}Uses:1016Used by:1777
Symbol 1018 GraphicUsed by:1019
Symbol 1019 MovieClipUses:1018Used by:1024
Symbol 1020 GraphicUsed by:1021
Symbol 1021 MovieClipUses:1020Used by:1024
Symbol 1022 GraphicUsed by:1023
Symbol 1023 MovieClipUses:1022Used by:1024
Symbol 1024 MovieClipUses:1019 1021 1023Used by:1025
Symbol 1025 MovieClip {GameArrow}Uses:1024Used by:1777
Symbol 1026 GraphicUsed by:1027
Symbol 1027 MovieClip {catapultCatch}Uses:1026Used by:1777
Symbol 1028 TextUses:19Used by:1033
Symbol 1029 EditableTextUses:19Used by:1033
Symbol 1030 TextUses:19Used by:1033
Symbol 1031 TextUses:19Used by:1033
Symbol 1032 EditableTextUses:19Used by:1033
Symbol 1033 MovieClip {catapultWords}Uses:1028 1029 1030 1031 1032Used by:1777
Symbol 1034 GraphicUsed by:1035
Symbol 1035 MovieClipUses:1034Used by:1036
Symbol 1036 MovieClipUses:1035Used by:1038
Symbol 1037 GraphicUsed by:1038
Symbol 1038 MovieClip {goodCliff}Uses:1036 1037Used by:1777
Symbol 1039 Bitmap {antsMc}Used by:1777
Symbol 1040 GraphicUsed by:1041
Symbol 1041 MovieClip {selectionBox}Uses:1040Used by:1777
Symbol 1042 GraphicUsed by:1777
Symbol 1043 GraphicUsed by:1044
Symbol 1044 MovieClipUses:1043Used by:1045 1225 1295
Symbol 1045 MovieClip {grenadeMc}Uses:1044Used by:1777
Symbol 1046 GraphicUsed by:1047
Symbol 1047 MovieClipUses:1046Used by:1048 1193 1456
Symbol 1048 MovieClipUses:248 250 252 256 254 1047Used by:1054 1453 1581
Symbol 1049 GraphicUsed by:1050
Symbol 1050 MovieClipUses:1049Used by:1051 1053
Symbol 1051 MovieClip {QFP2_AB_v31_fla.goodKingDie_134}Uses:248 250 252 254 256 1050 258Used by:1054
Symbol 1052 GraphicUsed by:1053
Symbol 1053 MovieClipUses:248 250 252 254 256 1050 258 452 1052Used by:1054
Symbol 1054 MovieClip {classesAS3.GameKingGood}Uses:433 1048 1051 1053Used by:1777
Symbol 1055 GraphicUsed by:1093
Symbol 1056 GraphicUsed by:1091
Symbol 1057 GraphicUsed by:1091
Symbol 1058 GraphicUsed by:1091
Symbol 1059 GraphicUsed by:1091
Symbol 1060 GraphicUsed by:1091
Symbol 1061 GraphicUsed by:1091
Symbol 1062 GraphicUsed by:1091
Symbol 1063 GraphicUsed by:1091
Symbol 1064 GraphicUsed by:1091
Symbol 1065 GraphicUsed by:1091
Symbol 1066 GraphicUsed by:1091
Symbol 1067 GraphicUsed by:1091
Symbol 1068 GraphicUsed by:1091
Symbol 1069 GraphicUsed by:1091
Symbol 1070 GraphicUsed by:1091
Symbol 1071 GraphicUsed by:1091
Symbol 1072 GraphicUsed by:1091
Symbol 1073 GraphicUsed by:1091
Symbol 1074 GraphicUsed by:1091
Symbol 1075 GraphicUsed by:1091
Symbol 1076 GraphicUsed by:1091
Symbol 1077 GraphicUsed by:1091
Symbol 1078 GraphicUsed by:1091
Symbol 1079 GraphicUsed by:1091
Symbol 1080 GraphicUsed by:1091
Symbol 1081 GraphicUsed by:1091
Symbol 1082 GraphicUsed by:1091
Symbol 1083 GraphicUsed by:1091
Symbol 1084 GraphicUsed by:1091
Symbol 1085 GraphicUsed by:1091
Symbol 1086 GraphicUsed by:1091
Symbol 1087 GraphicUsed by:1091
Symbol 1088 GraphicUsed by:1091
Symbol 1089 GraphicUsed by:1091
Symbol 1090 GraphicUsed by:1091
Symbol 1091 MovieClip {QFP2_AB_v31_fla.clockAnim_355}Uses:106 1056 1057 1058 1059 110 1060 1061 1062 1063 114 1064 1065 1066 1067 118 1068 1069 1070 1071 122 1072 1073 1074 1075 126 1076 1077 1078 1079 130 1080 1081 1082 1083 134 1084 1085 1086 1087 138 1088 1089 1090 141Used by:1093
Symbol 1092 MovieClip {QFP2_AB_v31_fla.clockAnim2_357}Uses:106 108 110 112 114 116 118 120 122 124 126 128 130 132 134 136 138 140Used by:1093
Symbol 1093 MovieClip {panelManBack}Uses:104 1055 1091 1092Used by:1097
Symbol 1094 GraphicUsed by:1097
Symbol 1095 MovieClip {panelItems}Uses:978 230 947 931 482 274 446 676 709 157 358 361 364Used by:1097
Symbol 1096 ButtonUses:148 42Used by:1097
Symbol 1097 MovieClip {classesAS3.GamePanelBuyMc}Uses:1093 1094 1095 1096Used by:1777
Symbol 1098 Sound {SoundMusic1}Used by:1777
Symbol 1099 TextUses:61Used by:1101
Symbol 1100 GraphicUsed by:1101
Symbol 1101 Button {startGameButton}Uses:1099 1100Used by:1102
Symbol 1102 MovieClip {classesAS3.GameStartMsg}Uses:346 1101Used by:1777
Symbol 1103 GraphicUsed by:1206
Symbol 1104 GraphicUsed by:1107
Symbol 1105 TextUses:61Used by:1107
Symbol 1106 GraphicUsed by:1107
Symbol 1107 ButtonUses:1104 1105 1106Used by:1206
Symbol 1108 GraphicUsed by:1113
Symbol 1109 TextUses:61Used by:1113
Symbol 1110 GraphicUsed by:1111
Symbol 1111 MovieClipUses:1110Used by:1113 1131 1198
Symbol 1112 GraphicUsed by:1113
Symbol 1113 ButtonUses:1108 1109 1111 1112Used by:1206
Symbol 1114 GraphicUsed by:1116
Symbol 1115 GraphicUsed by:1116
Symbol 1116 ButtonUses:1114 1115Used by:1206
Symbol 1117 GraphicUsed by:1119
Symbol 1118 GraphicUsed by:1119
Symbol 1119 ButtonUses:1117 1118Used by:1206
Symbol 1120 GraphicUsed by:1122
Symbol 1121 GraphicUsed by:1122
Symbol 1122 ButtonUses:1120 1121Used by:1206
Symbol 1123 GraphicUsed by:1125
Symbol 1124 GraphicUsed by:1125
Symbol 1125 ButtonUses:1123 1124Used by:1206
Symbol 1126 GraphicUsed by:1128
Symbol 1127 GraphicUsed by:1128
Symbol 1128 ButtonUses:1126 1127Used by:1206
Symbol 1129 GraphicUsed by:1131
Symbol 1130 GraphicUsed by:1131
Symbol 1131 ButtonUses:1129 1111 1130Used by:1206
Symbol 1132 GraphicUsed by:1134
Symbol 1133 GraphicUsed by:1134
Symbol 1134 ButtonUses:1132 1133Used by:1206
Symbol 1135 GraphicUsed by:1137
Symbol 1136 GraphicUsed by:1137
Symbol 1137 ButtonUses:1135 1136Used by:1206
Symbol 1138 MovieClip {QFP2_AB_v31_fla.mapScreenFlags_391}Uses:335Used by:1139
Symbol 1139 MovieClip {QFP2_AB_v31_fla.mapScreenFlags2_390}Uses:1138Used by:1206
Symbol 1140 ShapeTweeningUsed by:1150
Symbol 1141 GraphicUsed by:1150
Symbol 1142 GraphicUsed by:1145
Symbol 1143 GraphicUsed by:1145
Symbol 1144 GraphicUsed by:1145
Symbol 1145 MovieClipUses:1142 1143 1144Used by:1150
Symbol 1146 SoundUsed by:1150
Symbol 1147 GraphicUsed by:1150
Symbol 1148 GraphicUsed by:1149
Symbol 1149 MovieClipUses:1148Used by:1150
Symbol 1150 MovieClip {QFP2_AB_v31_fla.EnglandMap2_398}Uses:1140 1141 1145 1146 1147 1149Used by:1206
Symbol 1151 GraphicUsed by:1152
Symbol 1152 MovieClipUses:1151Used by:1206
Symbol 1153 GraphicUsed by:1157
Symbol 1154 GraphicUsed by:1157 1449 1586
Symbol 1155 GraphicUsed by:1156
Symbol 1156 MovieClipUses:1155Used by:1157
Symbol 1157 MovieClipUses:1153 1154 1156Used by:1158
Symbol 1158 MovieClipUses:1157Used by:1206
Symbol 1159 TextUses:61Used by:1161
Symbol 1160 GraphicUsed by:1161
Symbol 1161 ButtonUses:1159 1160Used by:1206
Symbol 1162 TextUses:61Used by:1165 1682
Symbol 1163 TextUses:61Used by:1165 1682
Symbol 1164 GraphicUsed by:1165 1682
Symbol 1165 ButtonUses:1162 1163 1164Used by:1206
Symbol 1166 TextUses:61Used by:1206
Symbol 1167 EditableTextUses:61Used by:1206
Symbol 1168 TextUses:61Used by:1198
Symbol 1169 TextUses:61Used by:1198
Symbol 1170 TextUses:61Used by:1198
Symbol 1171 TextUses:61Used by:1198
Symbol 1172 TextUses:61Used by:1198
Symbol 1173 TextUses:61Used by:1198
Symbol 1174 TextUses:61Used by:1198
Symbol 1175 TextUses:61Used by:1198
Symbol 1176 TextUses:61Used by:1198
Symbol 1177 TextUses:61Used by:1198
Symbol 1178 GraphicUsed by:1179
Symbol 1179 MovieClipUses:1178Used by:1198
Symbol 1180 EditableTextUses:61Used by:1198
Symbol 1181 EditableTextUses:61Used by:1198
Symbol 1182 GraphicUsed by:1183
Symbol 1183 MovieClipUses:1182Used by:1198
Symbol 1184 GraphicUsed by:1195 1459 1486
Symbol 1185 GraphicUsed by:1195 1459 1486
Symbol 1186 GraphicUsed by:1187
Symbol 1187 MovieClipUses:1186 856 250 252 858 860 862Used by:1195
Symbol 1188 GraphicUsed by:1189
Symbol 1189 MovieClipUses:1188 661 252 663 665 667Used by:1195
Symbol 1190 MovieClipUses:263 643 645 647 649Used by:1195
Symbol 1191 MovieClipUses:624 626 263 628 630 632Used by:1195
Symbol 1192 MovieClipUses:602 604 606 608 610Used by:1195
Symbol 1193 MovieClipUses:248 250 252 256 254 1047Used by:1194
Symbol 1194 MovieClipUses:1193Used by:1195 1203
Symbol 1195 MovieClip {QFP2_AB_v31_fla.badKing1PanelBack_410}Uses:1184 1185 1187 1189 1190 1191 1192 1194Used by:1198
Symbol 1196 TextUses:61Used by:1198
Symbol 1197 TextUses:61Used by:1198
Symbol 1198 MovieClip {QFP2_AB_v31_fla.mapScreenScene_407}Uses:1168 1169 1170 1171 1172 1173 1174 1175 1111 1176 1177 1179 1180 1181 1183 1195 1196 1197Used by:1206
Symbol 1199 GraphicUsed by:1200
Symbol 1200 MovieClipUses:1199Used by:1201
Symbol 1201 ButtonUses:1200 347Used by:1206
Symbol 1202 GraphicUsed by:1204
Symbol 1203 MovieClipUses:1194Used by:1204 1205
Symbol 1204 MovieClip {youarehereMc}Uses:1202 1203Used by:1205
Symbol 1205 MovieClip {QFP2_AB_v31_fla.yuoarehereAnim_420}Uses:1204 1203Used by:1206
Symbol 1206 MovieClip {classesAS3.GameMapScreen}Uses:1103 1107 1113 1116 1119 1122 1125 1128 1131 1134 1137 1139 1150 1152 1158 1161 1165 1166 1167 1198 1201 1205Used by:1777
Symbol 1207 GraphicUsed by:1211
Symbol 1208 GraphicUsed by:1211
Symbol 1209 GraphicUsed by:1210
Symbol 1210 MovieClip {gunEnergy}Uses:1209Used by:1211
Symbol 1211 MovieClip {gunEnergyLevel}Uses:1207 1208 1210Used by:1777
Symbol 1212 GraphicUsed by:1214
Symbol 1213 GraphicUsed by:1214
Symbol 1214 MovieClip {classesAS3.GameParticle}Uses:1212 319 1213Used by:1777
Symbol 1215 GraphicUsed by:1218
Symbol 1216 GraphicUsed by:1218
Symbol 1217 GraphicUsed by:1218
Symbol 1218 MovieClip {mainGunBullet}Uses:1215 1216 1217Used by:1777
Symbol 1219 GraphicUsed by:1220
Symbol 1220 MovieClip {enemyPhoton}Uses:1219Used by:1777
Symbol 1221 GraphicUsed by:1222
Symbol 1222 MovieClip {Photon}Uses:1221Used by:1777
Symbol 1223 MovieClip {classesAS3.GameEnergyBar}Uses:316Used by:1777
Symbol 1224 GraphicUsed by:1225
Symbol 1225 MovieClip {projectiles}Uses:1044 1224Used by:1777
Symbol 1226 GraphicUsed by:1227
Symbol 1227 MovieClip {bullet}Uses:1226Used by:1777
Symbol 1228 GraphicUsed by:1229
Symbol 1229 MovieClip {rocket}Uses:1228Used by:1777
Symbol 1230 GraphicUsed by:1231
Symbol 1231 MovieClip {enemyBullet}Uses:1230Used by:1777
Symbol 1232 GraphicUsed by:1233
Symbol 1233 MovieClip {enemyBomb}Uses:1232Used by:1777
Symbol 1234 GraphicUsed by:1235
Symbol 1235 MovieClip {enemyShell}Uses:1234Used by:1777
Symbol 1236 GraphicUsed by:1251
Symbol 1237 GraphicUsed by:1251
Symbol 1238 GraphicUsed by:1251
Symbol 1239 GraphicUsed by:1251
Symbol 1240 GraphicUsed by:1251
Symbol 1241 GraphicUsed by:1251
Symbol 1242 GraphicUsed by:1251
Symbol 1243 GraphicUsed by:1251
Symbol 1244 GraphicUsed by:1251
Symbol 1245 GraphicUsed by:1251
Symbol 1246 GraphicUsed by:1251
Symbol 1247 GraphicUsed by:1251
Symbol 1248 GraphicUsed by:1251
Symbol 1249 GraphicUsed by:1251
Symbol 1250 GraphicUsed by:1251
Symbol 1251 MovieClipUses:48 50 52 46 54 56 58 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250Used by:1303
Symbol 1252 GraphicUsed by:1253
Symbol 1253 MovieClip {manSelectionSquare}Uses:1252Used by:1303 1343
Symbol 1254 GraphicUsed by:1255
Symbol 1255 MovieClipUses:1254Used by:1266 1295 1302
Symbol 1256 GraphicUsed by:1257
Symbol 1257 MovieClipUses:1256Used by:1266 1295 1302
Symbol 1258 GraphicUsed by:1259
Symbol 1259 MovieClipUses:1258Used by:1266 1295 1302
Symbol 1260 GraphicUsed by:1261
Symbol 1261 MovieClipUses:1260Used by:1266 1280 1285 1293 1302 1342
Symbol 1262 GraphicUsed by:1263
Symbol 1263 MovieClipUses:1262Used by:1266 1302
Symbol 1264 GraphicUsed by:1265
Symbol 1265 MovieClipUses:1264Used by:1266 1302
Symbol 1266 MovieClipUses:1255 1257 1259 1261 1263 1265 58Used by:1303
Symbol 1267 GraphicUsed by:1280
Symbol 1268 GraphicUsed by:1269
Symbol 1269 MovieClipUses:1268Used by:1280 1285 1293 1342
Symbol 1270 GraphicUsed by:1271
Symbol 1271 MovieClipUses:1270Used by:1280 1285 1293 1342
Symbol 1272 GraphicUsed by:1273
Symbol 1273 MovieClipUses:1272Used by:1280 1285 1293 1342
Symbol 1274 GraphicUsed by:1275
Symbol 1275 MovieClipUses:1274Used by:1280 1285 1293 1295 1342
Symbol 1276 GraphicUsed by:1277
Symbol 1277 MovieClipUses:1276Used by:1280
Symbol 1278 GraphicUsed by:1279
Symbol 1279 MovieClipUses:1278Used by:1280 1285 1293 1342
Symbol 1280 MovieClipUses:1267 1269 1271 1273 1275 58 1277 1261 1279Used by:1303
Symbol 1281 GraphicUsed by:1285
Symbol 1282 GraphicUsed by:1285
Symbol 1283 GraphicUsed by:1285
Symbol 1284 GraphicUsed by:1285
Symbol 1285 MovieClip {QFP2_AB_v31_fla.soldierHit_465}Uses:1281 1269 1271 1273 1275 58 1261 1279 1282 1283 1284Used by:1303
Symbol 1286 GraphicUsed by:1293
Symbol 1287 GraphicUsed by:1293
Symbol 1288 GraphicUsed by:1293
Symbol 1289 GraphicUsed by:1293
Symbol 1290 GraphicUsed by:1293
Symbol 1291 GraphicUsed by:1293
Symbol 1292 GraphicUsed by:1293
Symbol 1293 MovieClip {QFP2_AB_v31_fla.soldierDeath_466}Uses:1286 1269 1271 1273 1275 58 1261 1279 1287 1288 1289 1290 1291 1292Used by:1303
Symbol 1294 GraphicUsed by:1295
Symbol 1295 MovieClipUses:1294 1255 1257 1259 1275 58 1044Used by:1303
Symbol 1296 GraphicUsed by:1297
Symbol 1297 MovieClip {manGunStand}Uses:1296 79 81 87 85 88 82Used by:1303
Symbol 1298 GraphicUsed by:1299
Symbol 1299 MovieClipUses:1298Used by:1302
Symbol 1300 GraphicUsed by:1301
Symbol 1301 MovieClipUses:1300Used by:1302
Symbol 1302 MovieClipUses:1255 1257 1259 1261 1263 1265 1299 1301 58Used by:1303
Symbol 1303 MovieClip {man}Uses:1251 1253 1266 1280 1285 1293 1295 1297 1302Used by:1777
Symbol 1304 GraphicUsed by:1312
Symbol 1305 GraphicUsed by:1310 1311
Symbol 1306 GraphicUsed by:1310 1311
Symbol 1307 GraphicUsed by:1310
Symbol 1308 GraphicUsed by:1310
Symbol 1309 GraphicUsed by:1310
Symbol 1310 MovieClip {QFP2_AB_v31_fla.manStoneHitBack_477}Uses:1305 81 1306 82 86 85 88 1307 1308 1309Used by:1312
Symbol 1311 MovieClipUses:1305 1306 81 82 86 85 88Used by:1312
Symbol 1312 MovieClip {classesAS3.GameZombie}Uses:1304 1310 1311Used by:1777
Symbol 1313 GraphicUsed by:1324
Symbol 1314 MovieClip {heavyGunnerGun}Uses:347Used by:1324 1328 1333 1334
Symbol 1315 GraphicUsed by:1324
Symbol 1316 GraphicUsed by:1324
Symbol 1317 GraphicUsed by:1324
Symbol 1318 GraphicUsed by:1324
Symbol 1319 GraphicUsed by:1324
Symbol 1320 GraphicUsed by:1324
Symbol 1321 GraphicUsed by:1324
Symbol 1322 GraphicUsed by:1324
Symbol 1323 GraphicUsed by:1324
Symbol 1324 MovieClip {heavyGunnerWalk}Uses:79 1313 81 82 1314 85 88 1315 1316 1317 1318 1319 1320 1321 1322 1323Used by:1343
Symbol 1325 GraphicUsed by:1326
Symbol 1326 MovieClipUses:1325Used by:1328 1333 1334
Symbol 1327 GraphicUsed by:1328
Symbol 1328 MovieClip {marineEngineer}Uses:1326 79 1327 81 82 85 88 1314Used by:1343
Symbol 1329 GraphicUsed by:1333 1334
Symbol 1330 GraphicUsed by:1333
Symbol 1331 ShapeTweeningUsed by:1333
Symbol 1332 GraphicUsed by:1333
Symbol 1333 MovieClip {rocketLauncherShoot}Uses:1326 79 1329 81 82 85 88 1314 1330 1331 1332Used by:1343
Symbol 1334 MovieClip {rocketStand}Uses:1326 79 1329 81 82 85 88 1314Used by:1343
Symbol 1335 GraphicUsed by:1342
Symbol 1336 GraphicUsed by:1342
Symbol 1337 GraphicUsed by:1342
Symbol 1338 GraphicUsed by:1342
Symbol 1339 GraphicUsed by:1342
Symbol 1340 GraphicUsed by:1342
Symbol 1341 GraphicUsed by:1342
Symbol 1342 MovieClip {death1}Uses:1335 1269 1271 1273 1275 58 1261 1279 1336 1337 1338 1339 1340 1341Used by:1343
Symbol 1343 MovieClip {rocketLauncher}Uses:1324 1253 1328 1333 1334 1342Used by:1777
Symbol 1344 GraphicUsed by:1348
Symbol 1345 GraphicUsed by:1348
Symbol 1346 GraphicUsed by:1348
Symbol 1347 GraphicUsed by:1348
Symbol 1348 MovieClip {classesAS3.GameRocketSmoke}Uses:1344 1345 1346 1347Used by:1777
Symbol 1349 FontUsed by:1350 1596 1597 1652
Symbol 1350 EditableTextUses:1349Used by:1351
Symbol 1351 MovieClip {QFP2_AB_v31_fla.risingScoreTxt_489}Uses:1350Used by:1352
Symbol 1352 MovieClip {classesAS3.GameRisingScore}Uses:1351Used by:1777
Symbol 1353 FontUsed by:1354
Symbol 1354 EditableTextUses:1353Used by:1355
Symbol 1355 MovieClip {risingMoneyTxt}Uses:1354Used by:1356
Symbol 1356 MovieClip {classesAS3.GameRisingMoney}Uses:1355Used by:1777
Symbol 1357 GraphicUsed by:1379
Symbol 1358 GraphicUsed by:1379
Symbol 1359 GraphicUsed by:1360
Symbol 1360 MovieClipUses:1359Used by:1379 1414 1567
Symbol 1361 GraphicUsed by:1379
Symbol 1362 GraphicUsed by:1379
Symbol 1363 GraphicUsed by:1379
Symbol 1364 GraphicUsed by:1379
Symbol 1365 GraphicUsed by:1379
Symbol 1366 GraphicUsed by:1379
Symbol 1367 GraphicUsed by:1379
Symbol 1368 GraphicUsed by:1379
Symbol 1369 GraphicUsed by:1370
Symbol 1370 MovieClipUses:1369Used by:1379
Symbol 1371 GraphicUsed by:1372
Symbol 1372 MovieClipUses:1371Used by:1379
Symbol 1373 GraphicUsed by:1376
Symbol 1374 GraphicUsed by:1375
Symbol 1375 MovieClipUses:1374Used by:1376
Symbol 1376 MovieClipUses:1373 1375Used by:1379 1582
Symbol 1377 GraphicUsed by:1379
Symbol 1378 GraphicUsed by:1379
Symbol 1379 MovieClip {backgroundSkyMc}Uses:1357 1358 1360 1361 1362 1363 1364 1365 1366 1367 1368 1370 1372 1376 1377 1378Used by:1777
Symbol 1380 GraphicUsed by:1414
Symbol 1381 BitmapUsed by:1382
Symbol 1382 GraphicUses:1381Used by:1414
Symbol 1383 GraphicUsed by:1414
Symbol 1384 GraphicUsed by:1414
Symbol 1385 GraphicUsed by:1414
Symbol 1386 GraphicUsed by:1414
Symbol 1387 GraphicUsed by:1414
Symbol 1388 GraphicUsed by:1414
Symbol 1389 GraphicUsed by:1390
Symbol 1390 MovieClipUses:1389Used by:1414 1566
Symbol 1391 GraphicUsed by:1392
Symbol 1392 MovieClipUses:1391Used by:1414 1566
Symbol 1393 GraphicUsed by:1394
Symbol 1394 MovieClipUses:1393Used by:1414 1566
Symbol 1395 GraphicUsed by:1396
Symbol 1396 MovieClipUses:1395Used by:1414 1566
Symbol 1397 GraphicUsed by:1414
Symbol 1398 GraphicUsed by:1414
Symbol 1399 GraphicUsed by:1414
Symbol 1400 GraphicUsed by:1414
Symbol 1401 GraphicUsed by:1402
Symbol 1402 MovieClipUses:1401Used by:1414
Symbol 1403 GraphicUsed by:1404
Symbol 1404 MovieClipUses:1403Used by:1414
Symbol 1405 GraphicUsed by:1414
Symbol 1406 GraphicUsed by:1409
Symbol 1407 GraphicUsed by:1408
Symbol 1408 MovieClipUses:1407Used by:1409 1414
Symbol 1409 MovieClipUses:1406 1408Used by:1414
Symbol 1410 BitmapUsed by:1411
Symbol 1411 GraphicUses:1410Used by:1412
Symbol 1412 MovieClipUses:1411Used by:1414
Symbol 1413 GraphicUsed by:1414
Symbol 1414 MovieClip {backgroundP}Uses:1380 1382 1383 1384 1385 1386 1387 1388 1390 1392 1394 1396 1397 1360 1398 1399 1400 1402 1404 1405 1409 1408 1412 1413Used by:1777
Symbol 1415 GraphicUsed by:1416
Symbol 1416 MovieClipUses:1415Used by:1535
Symbol 1417 GraphicUsed by:1535
Symbol 1418 GraphicUsed by:1419
Symbol 1419 MovieClipUses:1418Used by:1535
Symbol 1420 GraphicUsed by:1423
Symbol 1421 GraphicUsed by:1422
Symbol 1422 MovieClipUses:1421Used by:1423
Symbol 1423 MovieClip {QFP2_AB_v31_fla.soundFxBtn2_511}Uses:1420 1422Used by:1535
Symbol 1424 GraphicUsed by:1427
Symbol 1425 GraphicUsed by:1426
Symbol 1426 MovieClipUses:1425Used by:1427
Symbol 1427 MovieClip {QFP2_AB_v31_fla.musicBtn2_513}Uses:1424 1426Used by:1535
Symbol 1428 GraphicUsed by:1429 1431
Symbol 1429 MovieClipUses:1428Used by:1535
Symbol 1430 GraphicUsed by:1431
Symbol 1431 ButtonUses:1430 1428Used by:1535
Symbol 1432 GraphicUsed by:1434
Symbol 1433 GraphicUsed by:1434
Symbol 1434 ButtonUses:1432 1433Used by:1535
Symbol 1435 GraphicUsed by:1437
Symbol 1436 GraphicUsed by:1437
Symbol 1437 ButtonUses:1435 1436Used by:1535
Symbol 1438 GraphicUsed by:1440
Symbol 1439 GraphicUsed by:1440
Symbol 1440 ButtonUses:1438 1439Used by:1535
Symbol 1441 GraphicUsed by:1444
Symbol 1442 GraphicUsed by:1443 1444
Symbol 1443 MovieClipUses:1442Used by:1444
Symbol 1444 ButtonUses:1441 1443 1442Used by:1535
Symbol 1445 GraphicUsed by:1535
Symbol 1446 GraphicUsed by:1449
Symbol 1447 GraphicUsed by:1448
Symbol 1448 MovieClipUses:1447Used by:1449
Symbol 1449 MovieClipUses:1446 1154 1448Used by:1535
Symbol 1450 GraphicUsed by:1451
Symbol 1451 MovieClipUses:1450Used by:1535
Symbol 1452 EditableTextUses:75Used by:1535
Symbol 1453 MovieClipUses:1048Used by:1457
Symbol 1454 GraphicUsed by:1456
Symbol 1455 GraphicUsed by:1456
Symbol 1456 MovieClipUses:248 250 252 256 254 1047 1454 222 1455Used by:1457
Symbol 1457 MovieClip {QFP2_AB_v31_fla.goodKingExpressions_526}Uses:1453 1456Used by:1459
Symbol 1458 GraphicUsed by:1459 1486
Symbol 1459 MovieClip {QFP2_AB_v31_fla.bottomPanelKingsPicBack_525}Uses:1184 1185 1457 1458Used by:1535
Symbol 1460 GraphicUsed by:1462
Symbol 1461 GraphicUsed by:1462
Symbol 1462 MovieClipUses:1460 856 250 252 858 860 862 1461Used by:1467
Symbol 1463 GraphicUsed by:1466 1469
Symbol 1464 GraphicUsed by:1466 1472 1476 1480 1484
Symbol 1465 GraphicUsed by:1466 1472 1476 1480 1484
Symbol 1466 MovieClipUses:1463 856 250 252 858 860 862 1464 1465Used by:1467
Symbol 1467 MovieClip {QFP2_AB_v31_fla.badKing1Expressions_530}Uses:1462 1466Used by:1486
Symbol 1468 GraphicUsed by:1469
Symbol 1469 MovieClipUses:1463 661 252 663 665 1468Used by:1473
Symbol 1470 GraphicUsed by:1472
Symbol 1471 GraphicUsed by:1472
Symbol 1472 MovieClipUses:661 252 663 665 1470 1464 1471 1465Used by:1473
Symbol 1473 MovieClip {QFP2_AB_v31_fla.badKing2Expressions_533}Uses:1469 1472Used by:1486
Symbol 1474 MovieClipUses:263 643 645 647 649Used by:1477
Symbol 1475 GraphicUsed by:1476
Symbol 1476 MovieClipUses:263 643 645 647 649 1475 1464 1465Used by:1477
Symbol 1477 MovieClip {QFP2_AB_v31_fla.king3Expressions_536}Uses:1474 1476Used by:1486
Symbol 1478 MovieClipUses:624 626 263 628 630 632Used by:1481
Symbol 1479 GraphicUsed by:1480
Symbol 1480 MovieClipUses:624 626 263 628 630 632 1479 1464 1465Used by:1481
Symbol 1481 MovieClip {QFP2_AB_v31_fla.badKing4Expressions_539}Uses:1478 1480Used by:1486
Symbol 1482 MovieClipUses:602 604 606 608 610Used by:1485
Symbol 1483 GraphicUsed by:1484
Symbol 1484 MovieClipUses:602 604 606 608 610 1483 1464 1465Used by:1485
Symbol 1485 MovieClip {QFP2_AB_v31_fla.badKing6Expressions_542}Uses:1482 1484Used by:1486
Symbol 1486 MovieClip {QFP2_AB_v31_fla.badKing1PanelBack_529}Uses:1184 1185 1467 1458 1473 1477 1481 1485Used by:1535
Symbol 1487 TextUses:61Used by:1535
Symbol 1488 GraphicUsed by:1489 1525 1527
Symbol 1489 MovieClipUses:1488Used by:1492 1495 1498 1501 1520 1523 1525 1527
Symbol 1490 TextUses:19Used by:1492
Symbol 1491 TextUses:19Used by:1492
Symbol 1492 MovieClip {QFP2_AB_v31_fla.zoom1_545}Uses:1489 1490 1491Used by:1535
Symbol 1493 TextUses:19Used by:1495
Symbol 1494 TextUses:19Used by:1495
Symbol 1495 MovieClip {QFP2_AB_v31_fla.zoom2_547}Uses:1489 1493 1494Used by:1535
Symbol 1496 TextUses:19Used by:1498
Symbol 1497 TextUses:19Used by:1498
Symbol 1498 MovieClip {QFP2_AB_v31_fla.zoom3_548}Uses:1489 1496 1497Used by:1535
Symbol 1499 TextUses:19Used by:1501
Symbol 1500 TextUses:19Used by:1501
Symbol 1501 MovieClip {QFP2_AB_v31_fla.zoom4_549}Uses:1489 1499 1500Used by:1535
Symbol 1502 EditableTextUses:61Used by:1535
Symbol 1503 GraphicUsed by:1505
Symbol 1504 EditableTextUses:19Used by:1505
Symbol 1505 MovieClip {QFP2_AB_v31_fla.righgSpeechBubble_551}Uses:1503 1504Used by:1535
Symbol 1506 GraphicUsed by:1507
Symbol 1507 MovieClipUses:1506Used by:1535
Symbol 1508 GraphicUsed by:1509
Symbol 1509 MovieClipUses:1508Used by:1511
Symbol 1510 GraphicUsed by:1511
Symbol 1511 MovieClip {QFP2_AB_v31_fla.timerAnimMc_553}Uses:1509 1510Used by:1535
Symbol 1512 FontUsed by:1513 1514 1515 1533 1534 1589 1590
Symbol 1513 TextUses:1512Used by:1535
Symbol 1514 TextUses:1512Used by:1535
Symbol 1515 TextUses:1512Used by:1535
Symbol 1516 GraphicUsed by:1517
Symbol 1517 MovieClipUses:1516Used by:1535
Symbol 1518 GraphicUsed by:1520
Symbol 1519 TextUses:19Used by:1520
Symbol 1520 ButtonUses:1518 1489 1519Used by:1535
Symbol 1521 TextUses:19Used by:1523
Symbol 1522 GraphicUsed by:1523
Symbol 1523 ButtonUses:1489 1521 1522Used by:1535
Symbol 1524 TextUses:19Used by:1525
Symbol 1525 ButtonUses:1489 1524 1488Used by:1535
Symbol 1526 TextUses:19Used by:1527
Symbol 1527 ButtonUses:1489 1526 1488Used by:1535
Symbol 1528 FontUsed by:1529 1530 1531 1532
Symbol 1529 TextUses:1528Used by:1535
Symbol 1530 TextUses:1528Used by:1535
Symbol 1531 EditableTextUses:1528Used by:1535
Symbol 1532 EditableTextUses:1528Used by:1535
Symbol 1533 TextUses:1512Used by:1535
Symbol 1534 EditableTextUses:1512Used by:1535
Symbol 1535 MovieClip {classesAS3.GameWeaponsPanel}Uses:1416 1417 1419 1423 1427 1429 1431 1434 1437 1440 1444 1445 1449 1451 1452 1459 1486 1487 1492 1495 1498 1501 1502 22 1505 1507 1511 1513 1514 1515 1517 1520 1523 1525 1527 1529 1530 1531 1532 1533 1534Used by:1777
Symbol 1536 TextUses:61Used by:1553
Symbol 1537 TextUses:61Used by:1553
Symbol 1538 EditableTextUses:61Used by:1553
Symbol 1539 EditableTextUses:61Used by:1553
Symbol 1540 TextUses:61Used by:1553
Symbol 1541 EditableTextUses:61Used by:1553
Symbol 1542 ShapeTweeningUsed by:1552
Symbol 1543 BitmapUsed by:1544
Symbol 1544 GraphicUses:1543Used by:1545
Symbol 1545 MovieClipUses:1544Used by:1552
Symbol 1546 ShapeTweeningUsed by:1552
Symbol 1547 GraphicUsed by:1552
Symbol 1548 TextUses:61Used by:1549
Symbol 1549 MovieClipUses:1548Used by:1552
Symbol 1550 TextUses:61Used by:1551
Symbol 1551 MovieClipUses:1550Used by:1552
Symbol 1552 MovieClip {QFP2_AB_v31_fla.gameCompleteAnim_563}Uses:1542 347 1545 1546 1547 1549 1551Used by:1553
Symbol 1553 MovieClip {QFP2_AB_v31_fla.levelCompleteMsg_561}Uses:1536 1537 1538 1539 310 1540 1541 1552Used by:1554
Symbol 1554 MovieClip {classesAS3.GameLevelComplete}Uses:1553Used by:1777
Symbol 1555 TextUses:19Used by:1556
Symbol 1556 MovieClipUses:1555Used by:1582
Symbol 1557 GraphicUsed by:1560
Symbol 1558 GraphicUsed by:1559
Symbol 1559 MovieClipUses:1558Used by:1560
Symbol 1560 MovieClipUses:1557 1559Used by:1582
Symbol 1561 TextUses:19Used by:1562
Symbol 1562 MovieClipUses:1561Used by:1582
Symbol 1563 GraphicUsed by:1567
Symbol 1564 GraphicUsed by:1567
Symbol 1565 GraphicUsed by:1566
Symbol 1566 MovieClipUses:1565 1390 1392 1394 1396Used by:1567
Symbol 1567 MovieClipUses:1563 1360 1564 1566Used by:1582
Symbol 1568 TextUses:19Used by:1569
Symbol 1569 MovieClipUses:1568Used by:1582
Symbol 1570 TextUses:19Used by:1571
Symbol 1571 MovieClipUses:1570Used by:1582
Symbol 1572 TextUses:19Used by:1573
Symbol 1573 MovieClipUses:1572Used by:1582
Symbol 1574 GraphicUsed by:1575
Symbol 1575 MovieClipUses:1574Used by:1582
Symbol 1576 GraphicUsed by:1577
Symbol 1577 MovieClipUses:1576Used by:1578
Symbol 1578 MovieClipUses:1577Used by:1582
Symbol 1579 GraphicUsed by:1580
Symbol 1580 MovieClipUses:1579Used by:1582
Symbol 1581 MovieClipUses:1048Used by:1582 1681
Symbol 1582 MovieClip {QFP2_AB_v31_fla.frontScreenAnim_586}Uses:1556 1560 1562 1567 1569 420 1008 1571 1376 1573 1575 1578 1580 509 937 960 987 1581Used by:1776
Symbol 1583 GraphicUsed by:1586
Symbol 1584 GraphicUsed by:1585
Symbol 1585 MovieClipUses:1584Used by:1586
Symbol 1586 MovieClipUses:1583 1154 1585Used by:1587
Symbol 1587 MovieClipUses:1586Used by:1776
Symbol 1588 GraphicUsed by:1594
Symbol 1589 TextUses:1512Used by:1594
Symbol 1590 TextUses:1512Used by:1594
Symbol 1591 GraphicUsed by:1594
Symbol 1592 GraphicUsed by:1593
Symbol 1593 MovieClipUses:1592Used by:1594
Symbol 1594 MovieClipUses:1588 1589 1590 1591 1593Used by:1595
Symbol 1595 MovieClip {QFP2_AB_v31_fla.QFP_Title_Anim_604}Uses:1594Used by:1776
Symbol 1596 TextUses:1349Used by:1776
Symbol 1597 TextUses:1349Used by:1598
Symbol 1598 ButtonUses:1597 298Used by:1776
Symbol 1599 TextUses:61Used by:1602
Symbol 1600 TextUses:61Used by:1602
Symbol 1601 GraphicUsed by:1602
Symbol 1602 Button {PlayGameBtn}Uses:1599 1600 1601Used by:1776
Symbol 1603 TextUses:61Used by:1605
Symbol 1604 TextUses:61Used by:1605
Symbol 1605 ButtonUses:1603 1604 72Used by:1776
Symbol 1606 TextUses:61Used by:1608
Symbol 1607 TextUses:61Used by:1608
Symbol 1608 ButtonUses:1606 1607 72Used by:1776
Symbol 1609 TextUses:61Used by:1611
Symbol 1610 TextUses:61Used by:1611
Symbol 1611 ButtonUses:1609 1610 72Used by:1776
Symbol 1612 TextUses:61Used by:1614
Symbol 1613 TextUses:61Used by:1614
Symbol 1614 ButtonUses:1612 1613 72Used by:1776
Symbol 1615 TextUses:61Used by:1617
Symbol 1616 TextUses:61Used by:1617
Symbol 1617 ButtonUses:1615 1616 72Used by:1776
Symbol 1618 GraphicUsed by:1619
Symbol 1619 MovieClipUses:1618Used by:1622
Symbol 1620 TextUses:19Used by:1622
Symbol 1621 GraphicUsed by:1622
Symbol 1622 MovieClip {QFP2_AB_v31_fla.musicBtnMc_614}Uses:1619 1620 1621Used by:1776
Symbol 1623 GraphicUsed by:1624
Symbol 1624 ButtonUses:1623Used by:1776
Symbol 1625 GraphicUsed by:1626
Symbol 1626 MovieClipUses:1625Used by:1633
Symbol 1627 FontUsed by:1628 1629
Symbol 1628 TextUses:1627Used by:1630
Symbol 1629 TextUses:1627Used by:1630
Symbol 1630 MovieClipUses:1628 1629Used by:1633
Symbol 1631 GraphicUsed by:1632
Symbol 1632 ButtonUses:1631Used by:1633
Symbol 1633 MovieClipUses:1626 1630 1632Used by:1776
Symbol 1634 GraphicUsed by:1651
Symbol 1635 FontUsed by:1636 1642
Symbol 1636 TextUses:1635Used by:1651
Symbol 1637 GraphicUsed by:1641
Symbol 1638 GraphicUsed by:1639
Symbol 1639 MovieClip {QFP2_AB_v31_fla.explodeBullet_623}Uses:1638Used by:1641
Symbol 1640 GraphicUsed by:1641
Symbol 1641 MovieClipUses:1637 1639 1640Used by:1651
Symbol 1642 TextUses:1635Used by:1651
Symbol 1643 GraphicUsed by:1644
Symbol 1644 MovieClipUses:1643Used by:1651
Symbol 1645 GraphicUsed by:1646
Symbol 1646 MovieClipUses:1645Used by:1647
Symbol 1647 MovieClip {QFP2_AB_v31_fla.splarkler_particle_627}Uses:1646Used by:1648
Symbol 1648 MovieClipUses:1647Used by:1649
Symbol 1649 MovieClip {QFP2_AB_v31_fla.sparker_randomizer_625}Uses:1648Used by:1651
Symbol 1650 GraphicUsed by:1651
Symbol 1651 ButtonUses:1634 1636 1641 1642 1644 1649 1650Used by:1776
Symbol 1652 TextUses:1349Used by:1776
Symbol 1653 TextUses:19Used by:1663
Symbol 1654 TextUses:19Used by:1663
Symbol 1655 TextUses:19Used by:1663
Symbol 1656 TextUses:19Used by:1663
Symbol 1657 TextUses:19Used by:1663
Symbol 1658 TextUses:19Used by:1663
Symbol 1659 TextUses:19Used by:1663
Symbol 1660 TextUses:19Used by:1663
Symbol 1661 TextUses:19Used by:1663
Symbol 1662 TextUses:19Used by:1663
Symbol 1663 MovieClip {QFP2_AB_v31_fla.instructionsTxtScreens_629}Uses:1653 1654 1655 1656 1657 1658 1659 1660 1661 1662Used by:1776
Symbol 1664 GraphicUsed by:1665 1667 1668 1671
Symbol 1665 MovieClipUses:1664Used by:1666
Symbol 1666 MovieClipUses:1665Used by:1667 1668 1670
Symbol 1667 ButtonUses:1666 1664Used by:1672
Symbol 1668 ButtonUses:1666 1664Used by:1672
Symbol 1669 GraphicUsed by:1670 1671
Symbol 1670 MovieClipUses:1666 1669Used by:1671
Symbol 1671 ButtonUses:1670 1664 1669Used by:1672
Symbol 1672 MovieClip {QFP2_AB_v31_fla.instructionsBtns_630}Uses:1667 1668 1671Used by:1776
Symbol 1673 TextUses:61Used by:1776
Symbol 1674 GraphicUsed by:1681
Symbol 1675 GraphicUsed by:1681
Symbol 1676 GraphicUsed by:1681
Symbol 1677 GraphicUsed by:1681
Symbol 1678 GraphicUsed by:1681
Symbol 1679 GraphicUsed by:1681
Symbol 1680 GraphicUsed by:1681
Symbol 1681 MovieClip {QFP2_AB_v31_fla.instructionsVidPanel_637}Uses:340 298 240 1674 1581 1675 369 433 987 960 937 509 464 456 1676 698 676 335 1677 24 1678 1679 147 154 1680 863 668 650 633 611Used by:1776
Symbol 1682 ButtonUses:1162 1163 1164Used by:1776
Symbol 1683 TextUses:19Used by:1776
Symbol 1684 TextUses:61Used by:1776
Symbol 1685 TextUses:61Used by:1776
Symbol 1686 EditableTextUses:61Used by:1776
Symbol 1687 EditableTextUses:61Used by:1776
Symbol 1688 EditableTextUses:61Used by:1776
Symbol 1689 EditableTextUses:61Used by:1776
Symbol 1690 EditableTextUses:61Used by:1776
Symbol 1691 EditableTextUses:61Used by:1776
Symbol 1692 EditableTextUses:61Used by:1776
Symbol 1693 EditableTextUses:61Used by:1776
Symbol 1694 EditableTextUses:61Used by:1776
Symbol 1695 EditableTextUses:61Used by:1776
Symbol 1696 EditableTextUses:61Used by:1776
Symbol 1697 EditableTextUses:61Used by:1776
Symbol 1698 EditableTextUses:61Used by:1776
Symbol 1699 EditableTextUses:61Used by:1776
Symbol 1700 EditableTextUses:61Used by:1776
Symbol 1701 EditableTextUses:61Used by:1776
Symbol 1702 EditableTextUses:61Used by:1776
Symbol 1703 EditableTextUses:61Used by:1776
Symbol 1704 EditableTextUses:61Used by:1776
Symbol 1705 EditableTextUses:61Used by:1776
Symbol 1706 EditableTextUses:61Used by:1776
Symbol 1707 EditableTextUses:61Used by:1776
Symbol 1708 EditableTextUses:61Used by:1776
Symbol 1709 EditableTextUses:61Used by:1776
Symbol 1710 EditableTextUses:61Used by:1776
Symbol 1711 EditableTextUses:61Used by:1776
Symbol 1712 EditableTextUses:61Used by:1776
Symbol 1713 EditableTextUses:61Used by:1776
Symbol 1714 EditableTextUses:61Used by:1776
Symbol 1715 EditableTextUses:61Used by:1776
Symbol 1716 EditableTextUses:61Used by:1776
Symbol 1717 EditableTextUses:61Used by:1776
Symbol 1718 EditableTextUses:61Used by:1776
Symbol 1719 EditableTextUses:61Used by:1776
Symbol 1720 EditableTextUses:61Used by:1776
Symbol 1721 EditableTextUses:61Used by:1776
Symbol 1722 EditableTextUses:61Used by:1776
Symbol 1723 EditableTextUses:61Used by:1776
Symbol 1724 EditableTextUses:61Used by:1776
Symbol 1725 EditableTextUses:61Used by:1776
Symbol 1726 EditableTextUses:61Used by:1776
Symbol 1727 EditableTextUses:61Used by:1776
Symbol 1728 EditableTextUses:61Used by:1776
Symbol 1729 EditableTextUses:61Used by:1776
Symbol 1730 EditableTextUses:61Used by:1776
Symbol 1731 EditableTextUses:61Used by:1776
Symbol 1732 EditableTextUses:61Used by:1776
Symbol 1733 EditableTextUses:61Used by:1776
Symbol 1734 EditableTextUses:61Used by:1776
Symbol 1735 EditableTextUses:61Used by:1776
Symbol 1736 EditableTextUses:61Used by:1776
Symbol 1737 EditableTextUses:61Used by:1776
Symbol 1738 EditableTextUses:61Used by:1776
Symbol 1739 EditableTextUses:61Used by:1776
Symbol 1740 EditableTextUses:61Used by:1776
Symbol 1741 EditableTextUses:61Used by:1776
Symbol 1742 EditableTextUses:61Used by:1776
Symbol 1743 EditableTextUses:61Used by:1776
Symbol 1744 EditableTextUses:61Used by:1776
Symbol 1745 EditableTextUses:61Used by:1776
Symbol 1746 EditableTextUses:61Used by:1776
Symbol 1747 EditableTextUses:61Used by:1776
Symbol 1748 EditableTextUses:61Used by:1776
Symbol 1749 EditableTextUses:61Used by:1776
Symbol 1750 EditableTextUses:61Used by:1776
Symbol 1751 EditableTextUses:61Used by:1776
Symbol 1752 EditableTextUses:61Used by:1776
Symbol 1753 EditableTextUses:61Used by:1776
Symbol 1754 EditableTextUses:61Used by:1776
Symbol 1755 EditableTextUses:61Used by:1776
Symbol 1756 EditableTextUses:61Used by:1776
Symbol 1757 EditableTextUses:61Used by:1776
Symbol 1758 EditableTextUses:61Used by:1776
Symbol 1759 EditableTextUses:61Used by:1776
Symbol 1760 EditableTextUses:61Used by:1776
Symbol 1761 EditableTextUses:61Used by:1776
Symbol 1762 EditableTextUses:61Used by:1776
Symbol 1763 EditableTextUses:61Used by:1776
Symbol 1764 EditableTextUses:61Used by:1776
Symbol 1765 EditableTextUses:61Used by:1776
Symbol 1766 EditableTextUses:61Used by:1776
Symbol 1767 EditableTextUses:61Used by:1776
Symbol 1768 EditableTextUses:61Used by:1776
Symbol 1769 EditableTextUses:61Used by:1776
Symbol 1770 EditableTextUses:61Used by:1776
Symbol 1771 EditableTextUses:61Used by:1776
Symbol 1772 EditableTextUses:61Used by:1776
Symbol 1773 EditableTextUses:61Used by:1776
Symbol 1774 EditableTextUses:61Used by:1776
Symbol 1775 EditableTextUses:61Used by:1776
Symbol 1776 MovieClip {classesAS3.GameTitleScreen}Uses:70 1582 100 1587 1595 1596 1598 1602 1605 1608 1611 1614 1617 1622 1624 1633 1651 1652 1663 1672 1673 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775Used by:1777
Symbol 1777 MovieClip {QFP2_AB_v31_fla.assetHolder_1}Uses:1041 1042 1039 1038 1033 1027 1045 1025 1017 1015 1013 190 988 967 961 938 920 897 1054 869 335 853 832 813 795 723 707 696 693 674 658 641 622 600 564 510 275 465 457 431 411 381 377 376 372 370 1097 365 362 24 359 356 1098 354 1102 1206 1211 1214 1218 1220 1222 1223 1225 1227 1229 1231 1233 1235 1303 1312 1343 1348 86 1352 1356 1379 1414 1535 1554 305 1776Used by:Timeline

Instance Names

"txt"Symbol 22 MovieClip {leftSpeedBubble} Frame 1Symbol 20 EditableText
"firePoint"Symbol 59 MovieClip {turretMc} Frame 1Symbol 43 MovieClip
"levelText"Symbol 67 MovieClip {getReadyMsg} Frame 1Symbol 66 EditableText
"msg"Symbol 68 MovieClip {getReadyMsgAnim} Frame 1Symbol 67 MovieClip {getReadyMsg}
"loaderbar"Symbol 77 MovieClip {LoadingBox} Frame 1Symbol 74 MovieClip
"w"Symbol 98 MovieClip {BadGuyRun} Frame 1Symbol 87 MovieClip {QFP2_AB_v31_fla.weapons_470}
"back"Symbol 152 MovieClip {classesAS3.GameUpgrade} Frame 1Symbol 144 MovieClip {QFP2_AB_v31_fla.upgradeBack_652}
"upgradeBtn"Symbol 152 MovieClip {classesAS3.GameUpgrade} Frame 1Symbol 150 Button
"back"Symbol 153 MovieClip {classesAS3.GameUpgrade2} Frame 1Symbol 144 MovieClip {QFP2_AB_v31_fla.upgradeBack_652}
"upgradeBtn"Symbol 153 MovieClip {classesAS3.GameUpgrade2} Frame 1Symbol 150 Button
"back"Symbol 155 MovieClip {classesAS3.GameUpgrade3} Frame 1Symbol 144 MovieClip {QFP2_AB_v31_fla.upgradeBack_652}
"upgradeBtn"Symbol 155 MovieClip {classesAS3.GameUpgrade3} Frame 1Symbol 150 Button
"back"Symbol 159 MovieClip {classesAS3.GameUpgrade4} Frame 1Symbol 144 MovieClip {QFP2_AB_v31_fla.upgradeBack_652}
"upgradeBtn"Symbol 159 MovieClip {classesAS3.GameUpgrade4} Frame 1Symbol 150 Button
"back"Symbol 165 MovieClip {classesAS3.GameUpgrade5} Frame 1Symbol 144 MovieClip {QFP2_AB_v31_fla.upgradeBack_652}
"upgradeBtn"Symbol 165 MovieClip {classesAS3.GameUpgrade5} Frame 1Symbol 150 Button
"back"Symbol 167 MovieClip {classesAS3.GameUpgrade6} Frame 1Symbol 144 MovieClip {QFP2_AB_v31_fla.upgradeBack_652}
"upgradeBtn"Symbol 167 MovieClip {classesAS3.GameUpgrade6} Frame 1Symbol 150 Button
"block"Symbol 190 MovieClip {classesAS3.GameBlock} Frame 1Symbol 181 MovieClip {QFP2_AB_v31_fla.castleBlock_38}
"back"Symbol 192 MovieClip {classesAS3.GameUpgrade7} Frame 1Symbol 144 MovieClip {QFP2_AB_v31_fla.upgradeBack_652}
"upgradeBtn"Symbol 192 MovieClip {classesAS3.GameUpgrade7} Frame 1Symbol 150 Button
"back"Symbol 195 MovieClip {classesAS3.GameUpgrade8} Frame 1Symbol 144 MovieClip {QFP2_AB_v31_fla.upgradeBack_652}
"upgradeBtn"Symbol 195 MovieClip {classesAS3.GameUpgrade8} Frame 1Symbol 150 Button
"back"Symbol 198 MovieClip {classesAS3.GameUpgrade9} Frame 1Symbol 144 MovieClip {QFP2_AB_v31_fla.upgradeBack_652}
"upgradeBtn"Symbol 198 MovieClip {classesAS3.GameUpgrade9} Frame 1Symbol 150 Button
"back"Symbol 201 MovieClip {classesAS3.GameUpgrade10} Frame 1Symbol 144 MovieClip {QFP2_AB_v31_fla.upgradeBack_652}
"upgradeBtn"Symbol 201 MovieClip {classesAS3.GameUpgrade10} Frame 1Symbol 150 Button
"score"Symbol 303 MovieClip {QFP2_AB_v31_fla.gameoverFilter_578} Frame 1Symbol 285 EditableText
"submitBtn"Symbol 303 MovieClip {QFP2_AB_v31_fla.gameoverFilter_578} Frame 1Symbol 289 Button
"nameTxt"Symbol 303 MovieClip {QFP2_AB_v31_fla.gameoverFilter_578} Frame 1Symbol 291 EditableText
"moreGamesBtn"Symbol 303 MovieClip {QFP2_AB_v31_fla.gameoverFilter_578} Frame 1Symbol 295 Button
"quitBtn"Symbol 303 MovieClip {QFP2_AB_v31_fla.gameoverFilter_578} Frame 1Symbol 299 Button
"score"Symbol 303 MovieClip {QFP2_AB_v31_fla.gameoverFilter_578} Frame 3Symbol 302 EditableText
"endTitle"Symbol 304 MovieClip {QFP2_AB_v31_fla.gameOverMsg_568} Frame 1Symbol 283 MovieClip {QFP2_AB_v31_fla.Endtitle_577}
"msg"Symbol 304 MovieClip {QFP2_AB_v31_fla.gameOverMsg_568} Frame 10Symbol 303 MovieClip {QFP2_AB_v31_fla.gameoverFilter_578}
"m"Symbol 305 MovieClip {classesAS3.GameOverMsgAnim} Frame 1Symbol 304 MovieClip {QFP2_AB_v31_fla.gameOverMsg_568}
"bar"Symbol 316 MovieClip {energyBar} Frame 1Symbol 314 MovieClip
"flag4a"Symbol 331 MovieClip {QFP2_AB_v31_fla.basicFlag2_396} Frame 1Symbol 330 MovieClip {QFP2_AB_v31_fla.basicFlag_397}
"flag4b"Symbol 331 MovieClip {QFP2_AB_v31_fla.basicFlag2_396} Frame 1Symbol 330 MovieClip {QFP2_AB_v31_fla.basicFlag_397}
"flag4c"Symbol 331 MovieClip {QFP2_AB_v31_fla.basicFlag2_396} Frame 1Symbol 330 MovieClip {QFP2_AB_v31_fla.basicFlag_397}
"flag4d"Symbol 331 MovieClip {QFP2_AB_v31_fla.basicFlag2_396} Frame 1Symbol 330 MovieClip {QFP2_AB_v31_fla.basicFlag_397}
"flag3a"Symbol 332 MovieClip {QFP2_AB_v31_fla.basicFlag3_395} Frame 1Symbol 331 MovieClip {QFP2_AB_v31_fla.basicFlag2_396}
"flag3b"Symbol 332 MovieClip {QFP2_AB_v31_fla.basicFlag3_395} Frame 1Symbol 331 MovieClip {QFP2_AB_v31_fla.basicFlag2_396}
"flag2"Symbol 333 MovieClip {QFP2_AB_v31_fla.halfWayFlag_393} Frame 1Symbol 332 MovieClip {QFP2_AB_v31_fla.basicFlag3_395}
"flag1"Symbol 335 MovieClip {halfWayFlag} Frame 1Symbol 333 MovieClip {QFP2_AB_v31_fla.halfWayFlag_393}
"titleTxt"Symbol 346 MovieClip {startGameMsg} Frame 1Symbol 344 EditableText
"rulerTxt"Symbol 346 MovieClip {startGameMsg} Frame 1Symbol 345 EditableText
"link_btn3"Symbol 354 MovieClip {classesAS3.GameIntroAnim} Frame 1Symbol 353 Button
"endMc"Symbol 369 MovieClip {QFP2_AB_v31_fla.catapultNeedle_348} Frame 1Symbol 368 MovieClip
"needle"Symbol 370 MovieClip {catapultDial} Frame 1Symbol 369 MovieClip {QFP2_AB_v31_fla.catapultNeedle_348}
"setMc1"Symbol 376 MovieClip {classesAS3.GameCatapultRod} Frame 1Symbol 375 MovieClip
"rock"Symbol 420 MovieClip {QFP2_AB_v31_fla.bird_fly_322} Frame 1Symbol 414 MovieClip {GameRock}
"bird"Symbol 431 MovieClip {GameBird} Frame 1Symbol 420 MovieClip {QFP2_AB_v31_fla.bird_fly_322}
"soldier"Symbol 457 MovieClip {classesAS3.GameKnight4} Frame 1Symbol 456 MovieClip {QFP2_AB_v31_fla.knight4_310}
"soldier"Symbol 465 MovieClip {classesAS3.GameWizard1} Frame 1Symbol 464 MovieClip {QFP2_AB_v31_fla.gameSolderWizard_305}
"soldier"Symbol 510 MovieClip {classesAS3.GameKnight3} Frame 1Symbol 509 MovieClip {QFP2_AB_v31_fla.GameSoldier5_277}
"block"Symbol 693 MovieClip {classesAS3.GameWoodBlockEn} Frame 1Symbol 692 MovieClip {QFP2_AB_v31_fla.woodBlockEnemy_218}
"block"Symbol 696 MovieClip {classesAS3.GameWoodBlock} Frame 1Symbol 695 MovieClip {QFP2_AB_v31_fla.woodenBlock2_209}
"block"Symbol 707 MovieClip {classesAS3.GameBlockEnemy} Frame 1Symbol 699 MovieClip {QFP2_AB_v31_fla.enemyBlock_205}
"archer"Symbol 920 MovieClip {classesAS3.GameBadArcher2} Frame 3Symbol 918 MovieClip {QFP2_AB_v31_fla.crossbowManAttack1_106}
"archer"Symbol 937 MovieClip {QFP2_AB_v31_fla.gameSoldier3_81} Frame 3Symbol 934 MovieClip
"soldier"Symbol 938 MovieClip {classesAS3.GameArcher1} Frame 1Symbol 937 MovieClip {QFP2_AB_v31_fla.gameSoldier3_81}
"soldier"Symbol 961 MovieClip {classesAS3.GameKnight2} Frame 1Symbol 960 MovieClip {QFP2_AB_v31_fla.gameSoldier2_65}
"soldier"Symbol 988 MovieClip {classesAS3.GameKnight1} Frame 1Symbol 987 MovieClip {QFP2_AB_v31_fla.gameSoldier1_50}
"flagMc"Symbol 1015 MovieClip {tent} Frame 1Symbol 335 MovieClip {halfWayFlag}
"rangeTxt"Symbol 1033 MovieClip {catapultWords} Frame 1Symbol 1029 EditableText
"rangeTxt"Symbol 1033 MovieClip {catapultWords} Frame 3Symbol 1032 EditableText
"clock"Symbol 1093 MovieClip {panelManBack} Frame 2Symbol 1091 MovieClip {QFP2_AB_v31_fla.clockAnim_355}
"clock"Symbol 1093 MovieClip {panelManBack} Frame 3Symbol 1092 MovieClip {QFP2_AB_v31_fla.clockAnim2_357}
"back"Symbol 1097 MovieClip {classesAS3.GamePanelBuyMc} Frame 1Symbol 1093 MovieClip {panelManBack}
"itemsMc"Symbol 1097 MovieClip {classesAS3.GamePanelBuyMc} Frame 1Symbol 1095 MovieClip {panelItems}
"textBox"Symbol 1102 MovieClip {classesAS3.GameStartMsg} Frame 1Symbol 346 MovieClip {startGameMsg}
"startBtn"Symbol 1102 MovieClip {classesAS3.GameStartMsg} Frame 1Symbol 1101 Button {startGameButton}
"flagMc"Symbol 1138 MovieClip {QFP2_AB_v31_fla.mapScreenFlags_391} Frame 1Symbol 335 MovieClip {halfWayFlag}
"flagMc"Symbol 1138 MovieClip {QFP2_AB_v31_fla.mapScreenFlags_391} Frame 1Symbol 335 MovieClip {halfWayFlag}
"defenseTxt"Symbol 1198 MovieClip {QFP2_AB_v31_fla.mapScreenScene_407} Frame 1Symbol 1180 EditableText
"rulerTxt"Symbol 1198 MovieClip {QFP2_AB_v31_fla.mapScreenScene_407} Frame 1Symbol 1181 EditableText
"kingBadHead"Symbol 1198 MovieClip {QFP2_AB_v31_fla.mapScreenScene_407} Frame 1Symbol 1195 MovieClip {QFP2_AB_v31_fla.badKing1PanelBack_410}
"youarehere"Symbol 1205 MovieClip {QFP2_AB_v31_fla.yuoarehereAnim_420} Frame 1Symbol 1204 MovieClip {youarehereMc}
"youarehere"Symbol 1205 MovieClip {QFP2_AB_v31_fla.yuoarehereAnim_420} Frame 9Symbol 1204 MovieClip {youarehereMc}
"youarehere"Symbol 1205 MovieClip {QFP2_AB_v31_fla.yuoarehereAnim_420} Frame 11Symbol 1204 MovieClip {youarehereMc}
"btn9"Symbol 1206 MovieClip {classesAS3.GameMapScreen} Frame 1Symbol 1107 Button
"btn10"Symbol 1206 MovieClip {classesAS3.GameMapScreen} Frame 1Symbol 1113 Button
"btn7"Symbol 1206 MovieClip {classesAS3.GameMapScreen} Frame 1Symbol 1116 Button
"btn8"Symbol 1206 MovieClip {classesAS3.GameMapScreen} Frame 1Symbol 1119 Button
"btn2"Symbol 1206 MovieClip {classesAS3.GameMapScreen} Frame 1Symbol 1122 Button
"btn1"Symbol 1206 MovieClip {classesAS3.GameMapScreen} Frame 1Symbol 1125 Button
"btn3"Symbol 1206 MovieClip {classesAS3.GameMapScreen} Frame 1Symbol 1128 Button
"btn4"Symbol 1206 MovieClip {classesAS3.GameMapScreen} Frame 1Symbol 1131 Button
"btn5"Symbol 1206 MovieClip {classesAS3.GameMapScreen} Frame 1Symbol 1134 Button
"btn6"Symbol 1206 MovieClip {classesAS3.GameMapScreen} Frame 1Symbol 1137 Button
"mapFlags"Symbol 1206 MovieClip {classesAS3.GameMapScreen} Frame 1Symbol 1139 MovieClip {QFP2_AB_v31_fla.mapScreenFlags2_390}
"map"Symbol 1206 MovieClip {classesAS3.GameMapScreen} Frame 1Symbol 1150 MovieClip {QFP2_AB_v31_fla.EnglandMap2_398}
"map"Symbol 1206 MovieClip {classesAS3.GameMapScreen} Frame 23Symbol 1152 MovieClip
"playBtn"Symbol 1206 MovieClip {classesAS3.GameMapScreen} Frame 23Symbol 1161 Button
"backBtn"Symbol 1206 MovieClip {classesAS3.GameMapScreen} Frame 23Symbol 1165 Button
"levelNumberTxt"Symbol 1206 MovieClip {classesAS3.GameMapScreen} Frame 23Symbol 1167 EditableText
"placeNames"Symbol 1206 MovieClip {classesAS3.GameMapScreen} Frame 23Symbol 1198 MovieClip {QFP2_AB_v31_fla.mapScreenScene_407}
"link_btn2"Symbol 1206 MovieClip {classesAS3.GameMapScreen} Frame 23Symbol 1201 Button
"youarehereMc"Symbol 1206 MovieClip {classesAS3.GameMapScreen} Frame 32Symbol 1205 MovieClip {QFP2_AB_v31_fla.yuoarehereAnim_420}
"energyLevelMc"Symbol 1211 MovieClip {gunEnergyLevel} Frame 1Symbol 1210 MovieClip {gunEnergy}
"bar"Symbol 1223 MovieClip {classesAS3.GameEnergyBar} Frame 1Symbol 316 MovieClip {energyBar}
"w"Symbol 1297 MovieClip {manGunStand} Frame 1Symbol 87 MovieClip {QFP2_AB_v31_fla.weapons_470}
"selectionMc"Symbol 1303 MovieClip {man} Frame 1Symbol 1253 MovieClip {manSelectionSquare}
"selectionMc"Symbol 1343 MovieClip {rocketLauncher} Frame 1Symbol 1253 MovieClip {manSelectionSquare}
"scoreTxt"Symbol 1351 MovieClip {QFP2_AB_v31_fla.risingScoreTxt_489} Frame 1Symbol 1350 EditableText
"txt"Symbol 1352 MovieClip {classesAS3.GameRisingScore} Frame 1Symbol 1351 MovieClip {QFP2_AB_v31_fla.risingScoreTxt_489}
"moneyTxt"Symbol 1355 MovieClip {risingMoneyTxt} Frame 1Symbol 1354 EditableText
"txt"Symbol 1356 MovieClip {classesAS3.GameRisingMoney} Frame 1Symbol 1355 MovieClip {risingMoneyTxt}
"expressions"Symbol 1459 MovieClip {QFP2_AB_v31_fla.bottomPanelKingsPicBack_525} Frame 1Symbol 1457 MovieClip {QFP2_AB_v31_fla.goodKingExpressions_526}
"expressions"Symbol 1486 MovieClip {QFP2_AB_v31_fla.badKing1PanelBack_529} Frame 1Symbol 1467 MovieClip {QFP2_AB_v31_fla.badKing1Expressions_530}
"expressions"Symbol 1486 MovieClip {QFP2_AB_v31_fla.badKing1PanelBack_529} Frame 3Symbol 1473 MovieClip {QFP2_AB_v31_fla.badKing2Expressions_533}
"expressions"Symbol 1486 MovieClip {QFP2_AB_v31_fla.badKing1PanelBack_529} Frame 5Symbol 1477 MovieClip {QFP2_AB_v31_fla.king3Expressions_536}
"expressions"Symbol 1486 MovieClip {QFP2_AB_v31_fla.badKing1PanelBack_529} Frame 7Symbol 1481 MovieClip {QFP2_AB_v31_fla.badKing4Expressions_539}
"expressions"Symbol 1486 MovieClip {QFP2_AB_v31_fla.badKing1PanelBack_529} Frame 9Symbol 1485 MovieClip {QFP2_AB_v31_fla.badKing6Expressions_542}
"txt"Symbol 1505 MovieClip {QFP2_AB_v31_fla.righgSpeechBubble_551} Frame 2Symbol 1504 EditableText
"maskMc"Symbol 1511 MovieClip {QFP2_AB_v31_fla.timerAnimMc_553} Frame 1Symbol 1509 MovieClip
"timer"Symbol 1511 MovieClip {QFP2_AB_v31_fla.timerAnimMc_553} Frame 1Symbol 1509 MovieClip
"soundFxMc"Symbol 1535 MovieClip {classesAS3.GameWeaponsPanel} Frame 1Symbol 1423 MovieClip {QFP2_AB_v31_fla.soundFxBtn2_511}
"musicMc"Symbol 1535 MovieClip {classesAS3.GameWeaponsPanel} Frame 1Symbol 1427 MovieClip {QFP2_AB_v31_fla.musicBtn2_513}
"pausePanelBtn"Symbol 1535 MovieClip {classesAS3.GameWeaponsPanel} Frame 1Symbol 1431 Button
"musicBtn"Symbol 1535 MovieClip {classesAS3.GameWeaponsPanel} Frame 1Symbol 1434 Button
"soundFxBtn"Symbol 1535 MovieClip {classesAS3.GameWeaponsPanel} Frame 1Symbol 1437 Button
"quitBtn"Symbol 1535 MovieClip {classesAS3.GameWeaponsPanel} Frame 1Symbol 1440 Button
"leftScrollBtn"Symbol 1535 MovieClip {classesAS3.GameWeaponsPanel} Frame 1Symbol 1444 Button
"rightScrollBtn"Symbol 1535 MovieClip {classesAS3.GameWeaponsPanel} Frame 1Symbol 1444 Button
"msg"Symbol 1535 MovieClip {classesAS3.GameWeaponsPanel} Frame 1Symbol 1452 EditableText
"kingGoodHead"Symbol 1535 MovieClip {classesAS3.GameWeaponsPanel} Frame 1Symbol 1459 MovieClip {QFP2_AB_v31_fla.bottomPanelKingsPicBack_525}
"kingBadHead"Symbol 1535 MovieClip {classesAS3.GameWeaponsPanel} Frame 1Symbol 1486 MovieClip {QFP2_AB_v31_fla.badKing1PanelBack_529}
"zoom1"Symbol 1535 MovieClip {classesAS3.GameWeaponsPanel} Frame 1Symbol 1492 MovieClip {QFP2_AB_v31_fla.zoom1_545}
"zoom2"Symbol 1535 MovieClip {classesAS3.GameWeaponsPanel} Frame 1Symbol 1495 MovieClip {QFP2_AB_v31_fla.zoom2_547}
"zoom3"Symbol 1535 MovieClip {classesAS3.GameWeaponsPanel} Frame 1Symbol 1498 MovieClip {QFP2_AB_v31_fla.zoom3_548}
"zoom4"Symbol 1535 MovieClip {classesAS3.GameWeaponsPanel} Frame 1Symbol 1501 MovieClip {QFP2_AB_v31_fla.zoom4_549}
"rightNamesTxt"Symbol 1535 MovieClip {classesAS3.GameWeaponsPanel} Frame 1Symbol 1502 EditableText
"leftSpeech"Symbol 1535 MovieClip {classesAS3.GameWeaponsPanel} Frame 1Symbol 22 MovieClip {leftSpeedBubble}
"rightSpeech"Symbol 1535 MovieClip {classesAS3.GameWeaponsPanel} Frame 1Symbol 1505 MovieClip {QFP2_AB_v31_fla.righgSpeechBubble_551}
"timer2"Symbol 1535 MovieClip {classesAS3.GameWeaponsPanel} Frame 1Symbol 1511 MovieClip {QFP2_AB_v31_fla.timerAnimMc_553}
"timer"Symbol 1535 MovieClip {classesAS3.GameWeaponsPanel} Frame 1Symbol 1511 MovieClip {QFP2_AB_v31_fla.timerAnimMc_553}
"zb1"Symbol 1535 MovieClip {classesAS3.GameWeaponsPanel} Frame 1Symbol 1520 Button
"zb2"Symbol 1535 MovieClip {classesAS3.GameWeaponsPanel} Frame 1Symbol 1523 Button
"zb3"Symbol 1535 MovieClip {classesAS3.GameWeaponsPanel} Frame 1Symbol 1525 Button
"zb4"Symbol 1535 MovieClip {classesAS3.GameWeaponsPanel} Frame 1Symbol 1527 Button
"levelTxt"Symbol 1535 MovieClip {classesAS3.GameWeaponsPanel} Frame 1Symbol 1531 EditableText
"score"Symbol 1535 MovieClip {classesAS3.GameWeaponsPanel} Frame 1Symbol 1532 EditableText
"money"Symbol 1535 MovieClip {classesAS3.GameWeaponsPanel} Frame 1Symbol 1534 EditableText
"scoreBonus"Symbol 1553 MovieClip {QFP2_AB_v31_fla.levelCompleteMsg_561} Frame 1Symbol 1538 EditableText
"totalScore"Symbol 1553 MovieClip {QFP2_AB_v31_fla.levelCompleteMsg_561} Frame 1Symbol 1539 EditableText
"titleMc"Symbol 1553 MovieClip {QFP2_AB_v31_fla.levelCompleteMsg_561} Frame 1Symbol 310 MovieClip {levelCompleteMsgs}
"timeBonus"Symbol 1553 MovieClip {QFP2_AB_v31_fla.levelCompleteMsg_561} Frame 1Symbol 1541 EditableText
"msg"Symbol 1554 MovieClip {classesAS3.GameLevelComplete} Frame 15Symbol 1553 MovieClip {QFP2_AB_v31_fla.levelCompleteMsg_561}
"bird"Symbol 1582 MovieClip {QFP2_AB_v31_fla.frontScreenAnim_586} Frame 477Symbol 420 MovieClip {QFP2_AB_v31_fla.bird_fly_322}
"soldier"Symbol 1582 MovieClip {QFP2_AB_v31_fla.frontScreenAnim_586} Frame 780Symbol 509 MovieClip {QFP2_AB_v31_fla.GameSoldier5_277}
"soldier"Symbol 1582 MovieClip {QFP2_AB_v31_fla.frontScreenAnim_586} Frame 780Symbol 937 MovieClip {QFP2_AB_v31_fla.gameSoldier3_81}
"soldier"Symbol 1582 MovieClip {QFP2_AB_v31_fla.frontScreenAnim_586} Frame 780Symbol 960 MovieClip {QFP2_AB_v31_fla.gameSoldier2_65}
"soldier"Symbol 1582 MovieClip {QFP2_AB_v31_fla.frontScreenAnim_586} Frame 780Symbol 987 MovieClip {QFP2_AB_v31_fla.gameSoldier1_50}
"backBtn"Symbol 1672 MovieClip {QFP2_AB_v31_fla.instructionsBtns_630} Frame 1Symbol 1667 Button
"nextBtn"Symbol 1672 MovieClip {QFP2_AB_v31_fla.instructionsBtns_630} Frame 1Symbol 1668 Button
"endBtn"Symbol 1672 MovieClip {QFP2_AB_v31_fla.instructionsBtns_630} Frame 1Symbol 1671 Button
"startBtn"Symbol 1672 MovieClip {QFP2_AB_v31_fla.instructionsBtns_630} Frame 1Symbol 1671 Button
"soldier"Symbol 1681 MovieClip {QFP2_AB_v31_fla.instructionsVidPanel_637} Frame 5Symbol 987 MovieClip {QFP2_AB_v31_fla.gameSoldier1_50}
"soldier"Symbol 1681 MovieClip {QFP2_AB_v31_fla.instructionsVidPanel_637} Frame 5Symbol 960 MovieClip {QFP2_AB_v31_fla.gameSoldier2_65}
"soldier"Symbol 1681 MovieClip {QFP2_AB_v31_fla.instructionsVidPanel_637} Frame 5Symbol 937 MovieClip {QFP2_AB_v31_fla.gameSoldier3_81}
"soldier"Symbol 1681 MovieClip {QFP2_AB_v31_fla.instructionsVidPanel_637} Frame 5Symbol 509 MovieClip {QFP2_AB_v31_fla.GameSoldier5_277}
"soldier"Symbol 1681 MovieClip {QFP2_AB_v31_fla.instructionsVidPanel_637} Frame 5Symbol 464 MovieClip {QFP2_AB_v31_fla.gameSolderWizard_305}
"soldier"Symbol 1681 MovieClip {QFP2_AB_v31_fla.instructionsVidPanel_637} Frame 5Symbol 456 MovieClip {QFP2_AB_v31_fla.knight4_310}
"anim"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 1Symbol 1582 MovieClip {QFP2_AB_v31_fla.frontScreenAnim_586}
"addThisBtn"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 1Symbol 1598 Button
"playBtn"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 1Symbol 1602 Button {PlayGameBtn}
"instructionsBtn"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 1Symbol 1605 Button
"controlsBtn"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 1Symbol 1608 Button
"highScoresBtn"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 1Symbol 1611 Button
"moreGamesBtn"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 1Symbol 1614 Button
"loadGameBtn"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 1Symbol 1617 Button
"musicMc"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 1Symbol 1622 MovieClip {QFP2_AB_v31_fla.musicBtnMc_614}
"musicBtn"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 1Symbol 1624 Button
"fgmBtn"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 1Symbol 1633 MovieClip
"link_btn"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 1Symbol 1651 Button
"txt"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 2Symbol 1663 MovieClip {QFP2_AB_v31_fla.instructionsTxtScreens_629}
"vidBtns"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 2Symbol 1672 MovieClip {QFP2_AB_v31_fla.instructionsBtns_630}
"vid"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 2Symbol 1681 MovieClip {QFP2_AB_v31_fla.instructionsVidPanel_637}
"backBtn"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 2Symbol 1682 Button
"name1"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1686 EditableText
"score1"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1687 EditableText
"pos1"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1688 EditableText
"name2"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1689 EditableText
"score2"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1690 EditableText
"pos2"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1691 EditableText
"name3"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1692 EditableText
"score3"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1693 EditableText
"pos3"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1694 EditableText
"name4"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1695 EditableText
"score4"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1696 EditableText
"pos4"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1697 EditableText
"name5"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1698 EditableText
"score5"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1699 EditableText
"pos5"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1700 EditableText
"name6"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1701 EditableText
"score6"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1702 EditableText
"pos6"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1703 EditableText
"name7"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1704 EditableText
"score7"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1705 EditableText
"pos7"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1706 EditableText
"name8"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1707 EditableText
"score8"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1708 EditableText
"pos8"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1709 EditableText
"name9"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1710 EditableText
"score9"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1711 EditableText
"pos9"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1712 EditableText
"name10"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1713 EditableText
"score10"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1714 EditableText
"pos10"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1715 EditableText
"name11"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1716 EditableText
"score11"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1717 EditableText
"pos11"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1718 EditableText
"name12"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1719 EditableText
"score12"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1720 EditableText
"pos12"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1721 EditableText
"name13"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1722 EditableText
"score13"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1723 EditableText
"pos13"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1724 EditableText
"name14"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1725 EditableText
"score14"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1726 EditableText
"pos14"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1727 EditableText
"name15"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1728 EditableText
"score15"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1729 EditableText
"pos15"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1730 EditableText
"name16"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1731 EditableText
"score16"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1732 EditableText
"pos16"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1733 EditableText
"name17"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1734 EditableText
"score17"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1735 EditableText
"pos17"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1736 EditableText
"name18"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1737 EditableText
"score18"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1738 EditableText
"pos18"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1739 EditableText
"name19"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1740 EditableText
"score19"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1741 EditableText
"pos19"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1742 EditableText
"name20"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1743 EditableText
"score20"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1744 EditableText
"pos20"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1745 EditableText
"name21"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1746 EditableText
"score21"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1747 EditableText
"pos21"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1748 EditableText
"name22"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1749 EditableText
"score22"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1750 EditableText
"pos22"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1751 EditableText
"name23"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1752 EditableText
"score23"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1753 EditableText
"pos23"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1754 EditableText
"name24"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1755 EditableText
"score24"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1756 EditableText
"pos24"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1757 EditableText
"name25"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1758 EditableText
"score25"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1759 EditableText
"pos25"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1760 EditableText
"name26"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1761 EditableText
"score26"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1762 EditableText
"pos26"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1763 EditableText
"name27"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1764 EditableText
"score27"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1765 EditableText
"pos27"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1766 EditableText
"name28"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1767 EditableText
"score28"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1768 EditableText
"pos28"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1769 EditableText
"name29"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1770 EditableText
"score29"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1771 EditableText
"pos29"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1772 EditableText
"name30"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1773 EditableText
"score30"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1774 EditableText
"pos30"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9Symbol 1775 EditableText

Special Tags

FileAttributes (69)Timeline Frame 1Access network only, Metadata not present, AS3.
Protect (24)Timeline Frame 10 bytes ""

Labels

"blockBreak"Symbol 36 MovieClip {classesAS3.GameBoulder} Frame 5
"sword"Symbol 87 MovieClip {QFP2_AB_v31_fla.weapons_470} Frame 1
"rock"Symbol 87 MovieClip {QFP2_AB_v31_fla.weapons_470} Frame 2
"notAfford"Symbol 152 MovieClip {classesAS3.GameUpgrade} Frame 2
"notAfford"Symbol 153 MovieClip {classesAS3.GameUpgrade2} Frame 2
"notAfford"Symbol 155 MovieClip {classesAS3.GameUpgrade3} Frame 2
"notAfford"Symbol 159 MovieClip {classesAS3.GameUpgrade4} Frame 2
"notAfford"Symbol 165 MovieClip {classesAS3.GameUpgrade5} Frame 2
"notAfford"Symbol 167 MovieClip {classesAS3.GameUpgrade6} Frame 2
"blockBreak"Symbol 181 MovieClip {QFP2_AB_v31_fla.castleBlock_38} Frame 5
"block"Symbol 190 MovieClip {classesAS3.GameBlock} Frame 1
"door"Symbol 190 MovieClip {classesAS3.GameBlock} Frame 2
"window"Symbol 190 MovieClip {classesAS3.GameBlock} Frame 4
"notAfford"Symbol 192 MovieClip {classesAS3.GameUpgrade7} Frame 2
"notAfford"Symbol 195 MovieClip {classesAS3.GameUpgrade8} Frame 2
"notAfford"Symbol 198 MovieClip {classesAS3.GameUpgrade9} Frame 2
"notAfford"Symbol 201 MovieClip {classesAS3.GameUpgrade10} Frame 2
"c1"Symbol 280 MovieClip Frame 1
"submit"Symbol 303 MovieClip {QFP2_AB_v31_fla.gameoverFilter_578} Frame 2
"gameOver"Symbol 304 MovieClip {QFP2_AB_v31_fla.gameOverMsg_568} Frame 10
"levelComplete"Symbol 310 MovieClip {levelCompleteMsgs} Frame 1
"landDefeated"Symbol 310 MovieClip {levelCompleteMsgs} Frame 2
"gameCompleted"Symbol 310 MovieClip {levelCompleteMsgs} Frame 3
"robinDefeated"Symbol 310 MovieClip {levelCompleteMsgs} Frame 4
"arthur"Symbol 330 MovieClip {QFP2_AB_v31_fla.basicFlag_397} Frame 15
"wait_for_splash"Symbol 354 MovieClip {classesAS3.GameIntroAnim} Frame 1
"continue_to_menu"Symbol 354 MovieClip {classesAS3.GameIntroAnim} Frame 121
"stand"Symbol 411 MovieClip {GameDragon} Frame 1
"run"Symbol 411 MovieClip {GameDragon} Frame 2
"attack"Symbol 411 MovieClip {GameDragon} Frame 3
"hurt"Symbol 411 MovieClip {GameDragon} Frame 4
"die"Symbol 411 MovieClip {GameDragon} Frame 5
"stand"Symbol 431 MovieClip {GameBird} Frame 1
"run"Symbol 431 MovieClip {GameBird} Frame 2
"attack"Symbol 431 MovieClip {GameBird} Frame 3
"hurt"Symbol 431 MovieClip {GameBird} Frame 4
"die"Symbol 431 MovieClip {GameBird} Frame 5
"stand"Symbol 456 MovieClip {QFP2_AB_v31_fla.knight4_310} Frame 1
"run"Symbol 456 MovieClip {QFP2_AB_v31_fla.knight4_310} Frame 2
"attack"Symbol 456 MovieClip {QFP2_AB_v31_fla.knight4_310} Frame 3
"hurt"Symbol 456 MovieClip {QFP2_AB_v31_fla.knight4_310} Frame 4
"die"Symbol 456 MovieClip {QFP2_AB_v31_fla.knight4_310} Frame 5
"stand"Symbol 464 MovieClip {QFP2_AB_v31_fla.gameSolderWizard_305} Frame 1
"run"Symbol 464 MovieClip {QFP2_AB_v31_fla.gameSolderWizard_305} Frame 2
"attack"Symbol 464 MovieClip {QFP2_AB_v31_fla.gameSolderWizard_305} Frame 3
"hurt"Symbol 464 MovieClip {QFP2_AB_v31_fla.gameSolderWizard_305} Frame 4
"die"Symbol 464 MovieClip {QFP2_AB_v31_fla.gameSolderWizard_305} Frame 5
"stand"Symbol 509 MovieClip {QFP2_AB_v31_fla.GameSoldier5_277} Frame 1
"run"Symbol 509 MovieClip {QFP2_AB_v31_fla.GameSoldier5_277} Frame 2
"attack"Symbol 509 MovieClip {QFP2_AB_v31_fla.GameSoldier5_277} Frame 3
"hurt"Symbol 509 MovieClip {QFP2_AB_v31_fla.GameSoldier5_277} Frame 4
"die"Symbol 509 MovieClip {QFP2_AB_v31_fla.GameSoldier5_277} Frame 5
"stand"Symbol 564 MovieClip {classesAS3.GameKingBad7} Frame 1
"run"Symbol 564 MovieClip {classesAS3.GameKingBad7} Frame 2
"attack"Symbol 564 MovieClip {classesAS3.GameKingBad7} Frame 3
"die"Symbol 564 MovieClip {classesAS3.GameKingBad7} Frame 5
"stand"Symbol 600 MovieClip {classesAS3.GameKingBad6} Frame 1
"run"Symbol 600 MovieClip {classesAS3.GameKingBad6} Frame 2
"attack"Symbol 600 MovieClip {classesAS3.GameKingBad6} Frame 3
"die"Symbol 600 MovieClip {classesAS3.GameKingBad6} Frame 5
"stand"Symbol 622 MovieClip {classesAS3.GameKingBad5} Frame 1
"run"Symbol 622 MovieClip {classesAS3.GameKingBad5} Frame 2
"attack"Symbol 622 MovieClip {classesAS3.GameKingBad5} Frame 3
"die"Symbol 622 MovieClip {classesAS3.GameKingBad5} Frame 5
"stand"Symbol 641 MovieClip {classesAS3.GameKingBad4} Frame 1
"run"Symbol 641 MovieClip {classesAS3.GameKingBad4} Frame 2
"attack"Symbol 641 MovieClip {classesAS3.GameKingBad4} Frame 3
"die"Symbol 641 MovieClip {classesAS3.GameKingBad4} Frame 5
"stand"Symbol 658 MovieClip {classesAS3.GameKingBad3} Frame 1
"run"Symbol 658 MovieClip {classesAS3.GameKingBad3} Frame 2
"attack"Symbol 658 MovieClip {classesAS3.GameKingBad3} Frame 3
"die"Symbol 658 MovieClip {classesAS3.GameKingBad3} Frame 5
"stand"Symbol 674 MovieClip {classesAS3.GameKingBad2} Frame 1
"run"Symbol 674 MovieClip {classesAS3.GameKingBad2} Frame 2
"attack"Symbol 674 MovieClip {classesAS3.GameKingBad2} Frame 3
"die"Symbol 674 MovieClip {classesAS3.GameKingBad2} Frame 5
"blockBreak"Symbol 692 MovieClip {QFP2_AB_v31_fla.woodBlockEnemy_218} Frame 5
"blockBreak"Symbol 695 MovieClip {QFP2_AB_v31_fla.woodenBlock2_209} Frame 5
"blockBreak"Symbol 699 MovieClip {QFP2_AB_v31_fla.enemyBlock_205} Frame 5
"block"Symbol 707 MovieClip {classesAS3.GameBlockEnemy} Frame 1
"door"Symbol 707 MovieClip {classesAS3.GameBlockEnemy} Frame 2
"window"Symbol 707 MovieClip {classesAS3.GameBlockEnemy} Frame 4
"blockBreak"Symbol 723 MovieClip {classesAS3.GamePlank} Frame 5
"stand"Symbol 795 MovieClip {classesAS3.GameViking1} Frame 1
"run"Symbol 795 MovieClip {classesAS3.GameViking1} Frame 2
"attack"Symbol 795 MovieClip {classesAS3.GameViking1} Frame 3
"hurt"Symbol 795 MovieClip {classesAS3.GameViking1} Frame 4
"die"Symbol 795 MovieClip {classesAS3.GameViking1} Frame 5
"stand"Symbol 813 MovieClip {classesAS3.GameBadKnight3} Frame 1
"run"Symbol 813 MovieClip {classesAS3.GameBadKnight3} Frame 2
"attack"Symbol 813 MovieClip {classesAS3.GameBadKnight3} Frame 3
"hurt"Symbol 813 MovieClip {classesAS3.GameBadKnight3} Frame 4
"die"Symbol 813 MovieClip {classesAS3.GameBadKnight3} Frame 5
"stand"Symbol 832 MovieClip {classesAS3.GameBadArcher1} Frame 1
"run"Symbol 832 MovieClip {classesAS3.GameBadArcher1} Frame 2
"attack"Symbol 832 MovieClip {classesAS3.GameBadArcher1} Frame 3
"hurt"Symbol 832 MovieClip {classesAS3.GameBadArcher1} Frame 4
"die"Symbol 832 MovieClip {classesAS3.GameBadArcher1} Frame 5
"stand"Symbol 853 MovieClip {classesAS3.GameBadKnight2} Frame 1
"run"Symbol 853 MovieClip {classesAS3.GameBadKnight2} Frame 2
"attack"Symbol 853 MovieClip {classesAS3.GameBadKnight2} Frame 3
"hurt"Symbol 853 MovieClip {classesAS3.GameBadKnight2} Frame 4
"die"Symbol 853 MovieClip {classesAS3.GameBadKnight2} Frame 5
"stand"Symbol 869 MovieClip {classesAS3.GameKingBad1} Frame 1
"run"Symbol 869 MovieClip {classesAS3.GameKingBad1} Frame 2
"attack"Symbol 869 MovieClip {classesAS3.GameKingBad1} Frame 3
"die"Symbol 869 MovieClip {classesAS3.GameKingBad1} Frame 5
"stand"Symbol 897 MovieClip {classesAS3.GameBadKnight1} Frame 1
"run"Symbol 897 MovieClip {classesAS3.GameBadKnight1} Frame 2
"attack"Symbol 897 MovieClip {classesAS3.GameBadKnight1} Frame 3
"hurt"Symbol 897 MovieClip {classesAS3.GameBadKnight1} Frame 4
"die"Symbol 897 MovieClip {classesAS3.GameBadKnight1} Frame 5
"stand"Symbol 920 MovieClip {classesAS3.GameBadArcher2} Frame 1
"run"Symbol 920 MovieClip {classesAS3.GameBadArcher2} Frame 2
"attack"Symbol 920 MovieClip {classesAS3.GameBadArcher2} Frame 3
"hurt"Symbol 920 MovieClip {classesAS3.GameBadArcher2} Frame 4
"die"Symbol 920 MovieClip {classesAS3.GameBadArcher2} Frame 5
"stand"Symbol 937 MovieClip {QFP2_AB_v31_fla.gameSoldier3_81} Frame 1
"run"Symbol 937 MovieClip {QFP2_AB_v31_fla.gameSoldier3_81} Frame 2
"attack"Symbol 937 MovieClip {QFP2_AB_v31_fla.gameSoldier3_81} Frame 3
"hurt"Symbol 937 MovieClip {QFP2_AB_v31_fla.gameSoldier3_81} Frame 4
"die"Symbol 937 MovieClip {QFP2_AB_v31_fla.gameSoldier3_81} Frame 5
"stand"Symbol 960 MovieClip {QFP2_AB_v31_fla.gameSoldier2_65} Frame 1
"run"Symbol 960 MovieClip {QFP2_AB_v31_fla.gameSoldier2_65} Frame 2
"attack"Symbol 960 MovieClip {QFP2_AB_v31_fla.gameSoldier2_65} Frame 3
"hurt"Symbol 960 MovieClip {QFP2_AB_v31_fla.gameSoldier2_65} Frame 4
"die"Symbol 960 MovieClip {QFP2_AB_v31_fla.gameSoldier2_65} Frame 5
"stand"Symbol 987 MovieClip {QFP2_AB_v31_fla.gameSoldier1_50} Frame 1
"run"Symbol 987 MovieClip {QFP2_AB_v31_fla.gameSoldier1_50} Frame 2
"attack"Symbol 987 MovieClip {QFP2_AB_v31_fla.gameSoldier1_50} Frame 3
"hurt"Symbol 987 MovieClip {QFP2_AB_v31_fla.gameSoldier1_50} Frame 4
"die"Symbol 987 MovieClip {QFP2_AB_v31_fla.gameSoldier1_50} Frame 5
"stand"Symbol 1013 MovieClip {classesAS3.GameRam1} Frame 1
"run"Symbol 1013 MovieClip {classesAS3.GameRam1} Frame 2
"attack"Symbol 1013 MovieClip {classesAS3.GameRam1} Frame 3
"hurt"Symbol 1013 MovieClip {classesAS3.GameRam1} Frame 4
"die"Symbol 1013 MovieClip {classesAS3.GameRam1} Frame 5
"empty"Symbol 1033 MovieClip {catapultWords} Frame 1
"loaded"Symbol 1033 MovieClip {catapultWords} Frame 2
"range"Symbol 1033 MovieClip {catapultWords} Frame 3
"stand"Symbol 1054 MovieClip {classesAS3.GameKingGood} Frame 1
"die"Symbol 1054 MovieClip {classesAS3.GameKingGood} Frame 2
"attack"Symbol 1054 MovieClip {classesAS3.GameKingGood} Frame 3
"castleBlock"Symbol 1095 MovieClip {panelItems} Frame 1
"wood"Symbol 1095 MovieClip {panelItems} Frame 2
"boulder"Symbol 1095 MovieClip {panelItems} Frame 3
"swordsman"Symbol 1095 MovieClip {panelItems} Frame 4
"knight"Symbol 1095 MovieClip {panelItems} Frame 5
"archer"Symbol 1095 MovieClip {panelItems} Frame 6
"freezePotion"Symbol 1095 MovieClip {panelItems} Frame 7
"explosivePotion"Symbol 1095 MovieClip {panelItems} Frame 8
"restorePotion"Symbol 1095 MovieClip {panelItems} Frame 9
"betterArmour"Symbol 1095 MovieClip {panelItems} Frame 10
"faster"Symbol 1095 MovieClip {panelItems} Frame 11
"fireyArrows"Symbol 1095 MovieClip {panelItems} Frame 12
"buy"Symbol 1097 MovieClip {classesAS3.GamePanelBuyMc} Frame 1
"notBuy"Symbol 1097 MovieClip {classesAS3.GamePanelBuyMc} Frame 2
"startGame"Symbol 1102 MovieClip {classesAS3.GameStartMsg} Frame 910
"arthur"Symbol 1195 MovieClip {QFP2_AB_v31_fla.badKing1PanelBack_410} Frame 11
"rifle"Symbol 1218 MovieClip {mainGunBullet} Frame 1
"machineGun"Symbol 1218 MovieClip {mainGunBullet} Frame 2
"artillery"Symbol 1218 MovieClip {mainGunBullet} Frame 3
"walk"Symbol 1303 MovieClip {man} Frame 1
"stand"Symbol 1303 MovieClip {man} Frame 2
"shoot"Symbol 1303 MovieClip {man} Frame 3
"hit"Symbol 1303 MovieClip {man} Frame 4
"hit2"Symbol 1303 MovieClip {man} Frame 5
"deathBack"Symbol 1303 MovieClip {man} Frame 6
"throw"Symbol 1303 MovieClip {man} Frame 7
"gunStand"Symbol 1303 MovieClip {man} Frame 8
"falling"Symbol 1303 MovieClip {man} Frame 10
"zombieStart"Symbol 1312 MovieClip {classesAS3.GameZombie} Frame 1
"walkSlow1"Symbol 1312 MovieClip {classesAS3.GameZombie} Frame 2
"walkFast"Symbol 1312 MovieClip {classesAS3.GameZombie} Frame 3
"shoot"Symbol 1312 MovieClip {classesAS3.GameZombie} Frame 4
"hit"Symbol 1312 MovieClip {classesAS3.GameZombie} Frame 5
"hit2"Symbol 1312 MovieClip {classesAS3.GameZombie} Frame 6
"deathBack"Symbol 1312 MovieClip {classesAS3.GameZombie} Frame 7
"stand"Symbol 1312 MovieClip {classesAS3.GameZombie} Frame 8
"walkSlow2"Symbol 1312 MovieClip {classesAS3.GameZombie} Frame 9
"walkSlow3"Symbol 1312 MovieClip {classesAS3.GameZombie} Frame 10
"walk"Symbol 1343 MovieClip {rocketLauncher} Frame 1
"stand"Symbol 1343 MovieClip {rocketLauncher} Frame 2
"shoot"Symbol 1343 MovieClip {rocketLauncher} Frame 3
"gunStand"Symbol 1343 MovieClip {rocketLauncher} Frame 4
"deathBack"Symbol 1343 MovieClip {rocketLauncher} Frame 5
"on"Symbol 1423 MovieClip {QFP2_AB_v31_fla.soundFxBtn2_511} Frame 1
"off"Symbol 1423 MovieClip {QFP2_AB_v31_fla.soundFxBtn2_511} Frame 2
"on"Symbol 1427 MovieClip {QFP2_AB_v31_fla.musicBtn2_513} Frame 1
"off"Symbol 1427 MovieClip {QFP2_AB_v31_fla.musicBtn2_513} Frame 2
"static"Symbol 1457 MovieClip {QFP2_AB_v31_fla.goodKingExpressions_526} Frame 1
"talking"Symbol 1457 MovieClip {QFP2_AB_v31_fla.goodKingExpressions_526} Frame 2
"hurt"Symbol 1457 MovieClip {QFP2_AB_v31_fla.goodKingExpressions_526} Frame 3
"happy"Symbol 1457 MovieClip {QFP2_AB_v31_fla.goodKingExpressions_526} Frame 4
"static"Symbol 1467 MovieClip {QFP2_AB_v31_fla.badKing1Expressions_530} Frame 1
"talking"Symbol 1467 MovieClip {QFP2_AB_v31_fla.badKing1Expressions_530} Frame 2
"static"Symbol 1473 MovieClip {QFP2_AB_v31_fla.badKing2Expressions_533} Frame 1
"talking"Symbol 1473 MovieClip {QFP2_AB_v31_fla.badKing2Expressions_533} Frame 2
"static"Symbol 1477 MovieClip {QFP2_AB_v31_fla.king3Expressions_536} Frame 1
"talking"Symbol 1477 MovieClip {QFP2_AB_v31_fla.king3Expressions_536} Frame 2
"static"Symbol 1481 MovieClip {QFP2_AB_v31_fla.badKing4Expressions_539} Frame 1
"talking"Symbol 1481 MovieClip {QFP2_AB_v31_fla.badKing4Expressions_539} Frame 2
"static"Symbol 1485 MovieClip {QFP2_AB_v31_fla.badKing6Expressions_542} Frame 1
"talking"Symbol 1485 MovieClip {QFP2_AB_v31_fla.badKing6Expressions_542} Frame 2
"off"Symbol 1492 MovieClip {QFP2_AB_v31_fla.zoom1_545} Frame 1
"on"Symbol 1492 MovieClip {QFP2_AB_v31_fla.zoom1_545} Frame 2
"off"Symbol 1495 MovieClip {QFP2_AB_v31_fla.zoom2_547} Frame 1
"on"Symbol 1495 MovieClip {QFP2_AB_v31_fla.zoom2_547} Frame 2
"off"Symbol 1498 MovieClip {QFP2_AB_v31_fla.zoom3_548} Frame 1
"on"Symbol 1498 MovieClip {QFP2_AB_v31_fla.zoom3_548} Frame 2
"off"Symbol 1501 MovieClip {QFP2_AB_v31_fla.zoom4_549} Frame 1
"on"Symbol 1501 MovieClip {QFP2_AB_v31_fla.zoom4_549} Frame 2
"fade_to_black"Symbol 1552 MovieClip {QFP2_AB_v31_fla.gameCompleteAnim_563} Frame 1
"anim"Symbol 1552 MovieClip {QFP2_AB_v31_fla.gameCompleteAnim_563} Frame 14
"scoreFrame"Symbol 1553 MovieClip {QFP2_AB_v31_fla.levelCompleteMsg_561} Frame 1
"animFrame"Symbol 1553 MovieClip {QFP2_AB_v31_fla.levelCompleteMsg_561} Frame 2
"on"Symbol 1622 MovieClip {QFP2_AB_v31_fla.musicBtnMc_614} Frame 1
"off"Symbol 1622 MovieClip {QFP2_AB_v31_fla.musicBtnMc_614} Frame 2
"mainScreen"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 1
"instructions"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 2
"controls"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 6
"highscores"Symbol 1776 MovieClip {classesAS3.GameTitleScreen} Frame 9




http://swfchan.com/19/90807/info.shtml
Created: 28/3 -2019 05:51:48 Last modified: 28/3 -2019 05:51:48 Server time: 22/12 -2024 13:25:43