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

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

Eric the Circle - play fun physics based drawing game online.swf

This is the info page for
Flash #90948

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


Text
Name

The name of the level

Par Time

The Par Time
for the level in
seconds

Continue

Continue

Continue

Eric the Circle

The Game

AS3.0 TypeError: Error #1009: Cannot access a property or method of a null object reference. at Main/initMenu()

loading

Eric the Circle...

Guitar Legend

Contestant

Eric

Best Jump

Score

Height

Sk8 Ramp

<p align="center"><font face="MS SPAZ" size="20" color="#000000" letterSpacing="0.000000" kerning="1">Level 3</font></p>

<p align="center"><font face="MS SPAZ" size="20" color="#000000" letterSpacing="0.000000" kerning="1">Level 1</font></p>

<p align="center"><font face="MS SPAZ" size="20" color="#000000" letterSpacing="0.000000" kerning="1">Level 2</font></p>

Eric was a strong believer in heliocentrism. He knew the universe really did revolve around him

Eric had an annoying habit of finishing other people's sentences

Draw your own cartoon
at
www.EricTheCircle.c m

Time Bonus:

01

30

Best Score:

Best Score:

. . . . . . . .

Reset

Reset

Reset

Bonus Level!

Bonus Level!

Bonus Level!

Submit

Submit

Submit

High Scores

High Scores

High Scores

Select a Level:

Costume:

Total Score

. . . . . . . .

Level 6 Complete

Time Bonus

Pic Bonus

Score

. . . . . . . .

. . . . . . . .

Unlocked every
25,000 pts

Each time you complete a level,
the next is unlocked.

Score 120,000pts for bonus level

Paused

Music

Jump into the frame and move Eric into the right spot to complete the picture. A caption will appear when you have found the right spot

jump in

Thanks for Playing!

Eric the Cicle
created by Ashton Bishop

programming
Shane Houstein

Special Thanks
Scott Callaghan, Simon Rutherford and Aaron Dormer

<p align="left"></p>

moveable box

exit

ink

static box
(ground)

Options

select / transform

joint / motor

(place over
the top of
two existing
boxes)

clear level

delete selected

Back

Back

Quit

Quit

Test

Test

start

start

start

1

Gallery

Gallery

Gallery

Web

Web

Hint

Hint

Mute

Mute

<p align="center"><font face="Arial_9pt_st" size="9" color="#777777" letterSpacing="0.000000" kerning="0"><a href="http://www.ericthecircle.com" target = "_parent">www.EricTheCircle.com</a></font></p>

The Game

LITE EDITION

ActionScript [AS3]

Section 1
//ColDetect (application.ColDetect) package application { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Collision.*; import Box2D.Common.*; import flash.events.*; import Box2D.Dynamics.Contacts.*; public class ColDetect extends b2ContactListener implements IEventDispatcher { public var total:int;// = 0 protected var jumps:Object; public var num:int;// = 0 public var exits; private var dispatcher:EventDispatcher; public var collectables; public var totals:Object; public var sensors; public function ColDetect(){ jumps = {}; num = 0; total = 0; totals = {}; collectables = {}; sensors = {}; exits = {}; super(); dispatcher = new EventDispatcher(this); } public function dispatchEvent(_arg1:Event):Boolean{ return (dispatcher.dispatchEvent(_arg1)); } override public function Add(_arg1:b2ContactPoint):void{ var _local2:*; var _local3:*; var _local4:*; var _local5:String; var _local6:String; var _local7:*; var _local8:b2Vec2; var _local9:*; _local2 = _arg1.shape1.GetBody(); _local3 = _arg1.shape2.GetBody(); _local5 = _local2.GetUserData().name; _local6 = _local3.GetUserData().name; if ((((_local5 == "player")) || ((_local6 == "player")))){ if (_local5 == "player"){ _local7 = _local6; _local4 = _local3; } else { if (_local6 == "player"){ _local7 = _local5; _local4 = _local2; }; }; if (_local4.m_userData.props.isExit){ if (exits[_local7] == null){ dispatchEvent(new LevelEvent(LevelEvent.PLAYER_EXIT, _local4)); exits[_local7] = true; }; }; if (_local4.m_userData.props.isCollectable){ if (collectables[_local7] == null){ dispatchEvent(new LevelEvent(LevelEvent.PLAYER_COLLECT_OBJECT, _local4)); collectables[_local7] = _local4; }; }; if (_local4.m_userData.props.isSensor){ if (sensors[_local7] == null){ dispatchEvent(new LevelEvent(LevelEvent.PLAYER_HIT_SENSOR, _local4)); sensors[_local7] = true; }; }; if ((((totals[_local7] == null)) && (!(_local4.m_userData.props.isSensor)))){ totals[_local7] = true; total++; }; if ((((jumps[_local7] == null)) && (!(_local4.m_userData.props.isSensor)))){ _local8 = _arg1.normal; if (_local8.x != 0){ _local9 = (_local8.y / _local8.x); } else { _local9 = Number.POSITIVE_INFINITY; }; if ((((_local9 >= 1)) || ((_local9 <= -1)))){ jumps[_local7] = _local9; num++; }; }; }; } public function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{ dispatcher.addEventListener(_arg1, _arg2, _arg3, _arg4); } public function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{ dispatcher.removeEventListener(_arg1, _arg2, _arg3); } public function reset():void{ var _local1:*; var _local2:*; var _local3:*; var _local4:*; var _local5:*; for (_local1 in jumps) { delete jumps[_local1]; }; for (_local2 in totals) { delete totals[_local2]; }; for (_local3 in sensors) { delete sensors[_local3]; }; for (_local4 in exits) { delete exits[_local4]; }; for (_local5 in collectables) { delete collectables[_local5]; }; total = 0; num = 0; } override public function Remove(_arg1:b2ContactPoint):void{ var _local2:*; var _local3:*; var _local4:*; var _local5:String; var _local6:String; var _local7:*; _local2 = _arg1.shape1.GetBody(); _local3 = _arg1.shape2.GetBody(); _local5 = _local2.GetUserData().name; _local6 = _local3.GetUserData().name; if ((((_local5 == "player")) || ((_local6 == "player")))){ if (_local5 == "player"){ _local7 = _local6; _local4 = _local3; } else { if (_local6 == "player"){ _local7 = _local5; _local4 = _local2; }; }; deleteTag(_local7); }; } public function willTrigger(_arg1:String):Boolean{ return (dispatcher.willTrigger(_arg1)); } override public function Persist(_arg1:b2ContactPoint):void{ Add(_arg1); } public function hasEventListener(_arg1:String):Boolean{ return (dispatcher.hasEventListener(_arg1)); } override public function Result(_arg1:b2ContactResult):void{ } public function deleteTag(_arg1:String){ delete collectables[_arg1]; delete sensors[_arg1]; delete exits[_arg1]; if (totals[_arg1] != null){ delete totals[_arg1]; total--; }; if (jumps[_arg1] != null){ delete jumps[_arg1]; num--; }; } } }//package application
Section 2
//GameLevel (application.GameLevel) package application { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; import Box2D.Dynamics.Joints.*; import Box2D.Dynamics.*; import flash.display.*; import Box2D.Collision.*; import utils.*; import flash.utils.*; import b2MovieClips.*; import sprites.*; public class GameLevel extends Sprite implements iPhysicsContainer { public var bodyDef:b2BodyDef; public var tags:Object; public var dyns:Array; public var circleDef:b2CircleDef; public var playerBody:b2Body; public var boxDef:b2PolygonDef; public var staticCircleSprite:Class; public var m_iterations:int;// = 10 public var m_world:b2World; public var jprops:Object; public var body:b2Body; public var linearDamp:Number;// = 0.1 public var staticBoxSprite:Class; public var dynamicCircleSprite:Class; public var colHandle:ColDetect; public var m_timeStep:Number;// = 0.04 public var rest:Number;// = 0.1 protected var _physScale;// = 30 public var sprops:Object; public var player:Player; public var fric:Number;// = 2 public var angularDamp:Number;// = 0.5 public var keyboard:KeyTracker; public var dynamicBoxSprite:Class; public function GameLevel(_arg1:KeyTracker){ var _local2:b2AABB; var _local3:b2Vec2; var _local4:Boolean; m_iterations = 10; m_timeStep = (1 / 25); linearDamp = 0.1; angularDamp = 0.5; fric = 2; rest = 0.1; _physScale = 30; tags = {}; sprops = {density:1, friction:1, restitution:0, userData:null, isDynamic:false, isSensor:false, isExit:false, score:0, isCollectable:false, visible:true}; jprops = {EnableMotor:false, MotorSpeed:1, MaxMotorTorque:1, userData:null, visible:true}; dynamicBoxSprite = PhysBox; staticBoxSprite = PhysBoxFill; dynamicCircleSprite = PhysCircle; staticCircleSprite = PhysCircleFill; super(); dyns = new Array(); keyboard = _arg1; _local2 = new b2AABB(); _local2.lowerBound.Set(-100, -100); _local2.upperBound.Set(100, 100); _local3 = new b2Vec2(0, 10); _local4 = true; m_world = new b2World(_local2, _local3, _local4); } public function Update(){ var _local1:*; var _local2:*; m_world.Step(m_timeStep, m_iterations); _local1 = 0; while (_local1 < dyns.length) { _local2 = dyns[_local1]; if ((_local2.m_userData is Sprite)){ _local2.m_userData.x = (_local2.GetPosition().x * _physScale); _local2.m_userData.y = (_local2.GetPosition().y * _physScale); _local2.m_userData.rotation = ((_local2.GetAngle() * (180 / Math.PI)) % 360); }; _local1++; }; } public function onMouseD(){ } public function onMouseU(){ } public function addSnapJoint(_arg1, _arg2, _arg3:Object=null, _arg4:String=null):b2RevoluteJoint{ var _local5:*; var _local6:*; var _local7:*; var _local8:Array; var _local9:b2RevoluteJointDef; var _local10:*; var _local11:*; var _local12:*; var _local13:Class; if (_arg3 == null){ trace("no props"); _arg3 = jprops; }; _local5 = physScale; _local6 = m_world; _local8 = GetBodiesAtPoint(_arg1, _arg2, true); if (_local8.length >= 2){ _local9 = new b2RevoluteJointDef(); if (_arg3.userData != null){ _local13 = (getDefinitionByName(_arg3.userData) as Class); if (_local13 != null){ _local9.userData = new (_local13); addChild(_local9.userData); _local9.userData.props = copyProps(_arg3); _local9.userData.visible = _arg3.visible; }; } else { _local9.userData = new PhysCircle(5); addChild(_local9.userData); _local9.userData.visible = _arg3.visible; _local9.userData.props = copyProps(_arg3); }; _local9.userData.x = _arg1; _local9.userData.y = _arg2; _local10 = _local8[0]; _local11 = _local8[1]; _local12 = new b2Vec2((_arg1 / _local5), (_arg2 / _local5)); _local9.Initialize(_local10, _local11, _local12); _local7 = _local6.CreateJoint(_local9); }; if (_arg3.EnableMotor){ _local7.EnableMotor(true); _local7.SetMotorSpeed(_arg3.MotorSpeed); _local7.SetMaxMotorTorque(_arg3.MaxMotorTorque); }; if (_arg4 != null){ if (tags[_arg4] != null){ trace(("more than one object with tag:" + _arg4)); } else { _local7.m_userData.name = _arg4; tags[_arg4] = _local7; }; }; return (_local7); } public function get physics():b2World{ return (m_world); } public function get physScale():Number{ return (_physScale); } public function addBox(_arg1, _arg2, _arg3, _arg4, _arg5:Number=0, _arg6:Object=null, _arg7:String=null):b2Body{ var _local8:Class; var _local9:Class; if (_arg6 == null){ _arg6 = sprops; }; bodyDef = new b2BodyDef(); boxDef = new b2PolygonDef(); boxDef.SetAsBox(((_arg3 / _physScale) / 2), ((_arg4 / _physScale) / 2)); boxDef.density = _arg6.density; boxDef.friction = _arg6.friction; boxDef.restitution = _arg6.restitution; if (_arg6.isSensor){ boxDef.isSensor = true; }; if (_arg6.userData != null){ _local8 = (getDefinitionByName(_arg6.userData) as Class); if (_local8 != null){ bodyDef.userData = new (_local8); bodyDef.userData.width = _arg3; bodyDef.userData.height = _arg4; bodyDef.userData.props = copyProps(_arg6); addChild(bodyDef.userData); bodyDef.userData.visible = _arg6.visible; }; } else { if (_arg6.isDynamic){ _local9 = dynamicBoxSprite; } else { _local9 = staticBoxSprite; }; bodyDef.userData = new _local9(_arg3, _arg4); addChild(bodyDef.userData); bodyDef.userData.visible = _arg6.visible; bodyDef.userData.props = copyProps(_arg6); }; body = m_world.CreateBody(bodyDef); body.CreateShape(boxDef); if (_arg6.isDynamic){ body.SetMassFromShapes(); dyns.push(body); } else { bodyDef.userData.cacheAsBitmap = true; }; body.SetXForm(new b2Vec2((_arg1 / _physScale), (_arg2 / _physScale)), _arg5); body.m_userData.x = _arg1; body.m_userData.y = _arg2; body.m_userData.rotation = (_arg5 * (180 / Math.PI)); if (_arg7 != null){ if (tags[_arg7] != null){ trace(("more than one object with tag:" + _arg7)); } else { tags[_arg7] = body; body.m_userData.name = _arg7; }; }; return (body); } public function copyProps(_arg1:Object):Object{ var _local2:Object; var _local3:*; _local2 = {}; for (_local3 in _arg1) { _local2[_local3] = _arg1[_local3]; }; return (_local2); } public function reset():void{ var _local1:*; var _local2:b2Body; var _local3:b2Body; dyns = new Array(); colHandle.reset(); for (_local1 in tags) { delete tags[_local1]; }; while (numChildren > 0) { removeChild(getChildAt(0)); }; _local2 = m_world.GetBodyList(); while (_local2) { _local3 = _local2; _local2 = _local2.GetNext(); m_world.DestroyBody(_local3); }; construct(); } public function start():void{ } public function addDecor(_arg1:MovieClip, _arg2:String=null):void{ addChild(_arg1); _arg1.stop(); _arg1.cacheAsBitmap = true; } public function destruct():void{ var _local1:*; var _local2:b2Body; var _local3:b2Body; dyns = null; colHandle.reset(); colHandle = null; for (_local1 in tags) { delete tags[_local1]; }; while (numChildren > 0) { removeChild(getChildAt(0)); }; _local2 = m_world.GetBodyList(); while (_local2) { _local3 = _local2; _local2 = _local2.GetNext(); m_world.DestroyBody(_local3); }; m_world.SetContactListener(null); m_world = null; player = null; playerBody = null; keyboard = null; } public function GetBodiesAtPoint(_arg1:Number, _arg2:Number, _arg3:Boolean=false):Array{ var _local4:*; var _local5:*; var _local6:b2Vec2; var _local7:b2AABB; var _local8:int; var _local9:Array; var _local10:int; var _local11:Array; var _local12:int; var _local13:b2Shape; var _local14:Boolean; _local4 = (_arg1 / _physScale); _local5 = (_arg2 / _physScale); _local6 = new b2Vec2(); _local6.Set(_local4, _local5); _local7 = new b2AABB(); _local7.lowerBound.Set((_local4 - 0.001), (_local5 - 0.001)); _local7.upperBound.Set((_local4 + 0.001), (_local5 + 0.001)); _local8 = 10; _local9 = new Array(); _local10 = m_world.Query(_local7, _local9, _local8); _local11 = new Array(); _local12 = 0; while (_local12 < _local10) { if ((((_local9[_local12].m_body.IsStatic() == false)) || (_arg3))){ _local13 = (_local9[_local12] as b2Shape); _local14 = (_local9[_local12] as b2Shape).TestPoint(_local13.m_body.GetXForm(), _local6); if (_local14){ _local11.push(_local13.m_body); }; }; _local12++; }; return (_local11); } public function removeBody(_arg1:b2Body){ delete tags[_arg1.m_userData.name]; colHandle.deleteTag(_arg1.m_userData.name); m_world.DestroyBody(_arg1); removeChild(_arg1.m_userData); } public function addCircle(_arg1, _arg2, _arg3, _arg4:Object=null, _arg5:String=null):b2Body{ var _local6:Class; var _local7:Class; if (_arg4 == null){ _arg4 = sprops; }; bodyDef = new b2BodyDef(); circleDef = new b2CircleDef(); circleDef.radius = ((_arg3 / 2) / _physScale); circleDef.density = _arg4.density; circleDef.friction = _arg4.friction; circleDef.restitution = _arg4.restitution; if (_arg4.isSensor){ circleDef.isSensor = true; }; if (_arg4.userData != null){ _local6 = (getDefinitionByName(_arg4.userData) as Class); if (_local6 != null){ bodyDef.userData = new (_local6); addChild(bodyDef.userData); bodyDef.userData.width = _arg3; bodyDef.userData.height = _arg3; bodyDef.userData.props = copyProps(_arg4); bodyDef.userData.visible = _arg4.visible; }; } else { if (_arg4.isDynamic){ _local7 = dynamicCircleSprite; } else { _local7 = staticCircleSprite; }; bodyDef.userData = new _local7(_arg3); addChild(bodyDef.userData); bodyDef.userData.visible = _arg4.visible; bodyDef.userData.props = copyProps(_arg4); }; body = m_world.CreateBody(bodyDef); body.CreateShape(circleDef); if (_arg4.isDynamic){ body.SetMassFromShapes(); dyns.push(body); }; body.SetXForm(new b2Vec2((_arg1 / _physScale), (_arg2 / _physScale)), 0); bodyDef.userData.x = _arg1; bodyDef.userData.y = _arg2; if (_arg5 != null){ if (tags[_arg5] != null){ trace(("more than one object with tag:" + _arg5)); } else { tags[_arg5] = body; body.m_userData.name = _arg5; }; }; return (body); } public function construct():void{ } public function createPlayer(_arg1, _arg2):b2Body{ bodyDef = new b2BodyDef(); bodyDef.position.x = (_arg1 / _physScale); bodyDef.position.y = (_arg2 / _physScale); bodyDef.linearDamping = linearDamp; bodyDef.angularDamping = angularDamp; bodyDef.isBullet = true; circleDef = new b2CircleDef(); circleDef.radius = ((30 / 2) / _physScale); circleDef.density = 1; circleDef.friction = fric; circleDef.restitution = rest; player = new Player(); player.x = _arg1; player.y = _arg2; addChild(player); bodyDef.userData = player; bodyDef.userData.name = "player"; body = m_world.CreateBody(bodyDef); body.CreateShape(circleDef); body.SetMassFromShapes(); playerBody = body; dyns.push(body); return (playerBody); } } }//package application
Section 3
//LevelEvent (application.LevelEvent) package application { import flash.events.*; public dynamic class LevelEvent extends Event { public var content; public static var RESET_SCORES:String = "resetscores"; public static var SELECT_LEVEL:String = "selectlevel"; public static var PLAYER_DEAD:String = "dead"; public static var MUSIC_LEVEL:String = "musiclevel"; public static var LEVEL_READY:String = "levelready"; public static var PLAYER_COLLECT_OBJECT:String = "collectobject"; public static var PLAYER_HIT_SENSOR:String = "hitsensor"; public static var LEVEL_COMPLETE:String = "levelcomplete"; public static var PICTURE_COMPLETE:String = "picturecomplete"; public static var PLAYER_EXIT:String = "playerexit"; public function LevelEvent(_arg1:String, _arg2=null, _arg3:Boolean=false, _arg4:Boolean=false){ super(_arg1, _arg3, _arg4); this.content = _arg2; } } }//package application
Section 4
//b2CircleMC (b2MovieClips.b2CircleMC) package b2MovieClips { public class b2CircleMC extends PhysicsShape { public function b2CircleMC(){ _shapeType = "circle"; } } }//package b2MovieClips
Section 5
//b2CompoundFrame (b2MovieClips.b2CompoundFrame) package b2MovieClips { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; import Box2D.Dynamics.Joints.*; import Box2D.Dynamics.*; import flash.display.*; import Box2D.Collision.*; import Box2D.Common.*; import flash.events.*; import Box2D.Dynamics.Contacts.*; import flash.utils.*; import flash.text.*; public class b2CompoundFrame extends MovieClip { public var titleDecor:titlecopy; public var pic4:PictureFrameGFX; public var p1fg:Decor2FG; public var picGallery:PictureFrameGFX; public var p10:Decor10; public var pGallery:DecorGallery; public var continue_btn:CotinueDecorButton; public var picGallery2:PictureFrameGFX; public var s8a:TalkArea; public var s8b:TalkArea; public var s8c:TalkArea; public var s8d:TalkArea; public var s11a:TalkArea; public var s11d:TalkArea; public var s11e:TalkArea; public var web_btn:WebsiteButton; public var j3:b2JointMC; public var _container:iPhysicsContainer; public var exit:ExitGFX; public var pic10:PictureFrameGFX; public var p5fg:Decor5fg; public var ericade_mc:Ericade; public var ready:Boolean;// = false public var pGallery2:DecorGallery2; public var pGallery3:DecorGallery3; public var pGallery4:DecorGallery4; public var p1:PictureFrameGFX; public var p2:Decor2; public var p3:Decor3; public var p5:Decor5; public var p7:Decor7; public var level8ScoreBoard:Decor8Pic; public var p6:PictureFrameGFX; public var p4:Decor4; public var pole:segment; public var pic2:PictureFrameGFX; public var pic5:PictureFrameGFX; public var pic6:Decor6Tet; public var pic7:PictureFrameGFX; public var pic1:Decor1; public var pic3:PictureFrameGFX; public var a2:TalkArea; public var a3:TalkArea; public var a4:TalkArea; public var a5:TalkArea; public var titleFrame:PictureFrameGFX; public var a1:TalkArea; public var a6:TalkArea; public var p3fg:Decor3FG; public function b2CompoundFrame(){ ready = false; super(); addEventListener(Event.ENTER_FRAME, onInit, false, 0, true); } public function CreateRectObject(_arg1:PhysicsClip):b2Body{ var _local2:String; var _local3:*; var _local4:b2Body; _local2 = null; if ((((_arg1.name.indexOf("instance") == -1)) && ((_arg1.name.indexOf("__") == -1)))){ _local2 = _arg1.name; }; _local3 = (_arg1.rotation / (180 / Math.PI)); _local4 = _container.addBox(_arg1.x, _arg1.y, (_arg1.scaleX * 100), (_arg1.scaleY * 100), _local3, _arg1.props, _local2); return (_local4); } public function CreatePlayer(_arg1):b2Body{ var _local2:*; _local2 = _container.createPlayer(_arg1.x, _arg1.y); return (_local2); } public function copyNow(){ var _local1:Object; var _local2:*; var _local3:*; var _local4:*; var _local5:TextField; var _local6:String; _local1 = {}; _local2 = numChildren; _local3 = 0; while (_local3 < _local2) { _local4 = getChildAt(_local3); if ((_local4 is PhysicsClip)){ _local6 = (_local4 as PhysicsClip).shapeType; if (_local6 == "rectangle"){ CreateRectObject(_local4); } else { if (_local6 == "circle"){ CreateCircObject(_local4); } else { if (_local6 == "joint"){ _local1[_local4.name] = _local4; } else { if (_local6 == "player"){ CreatePlayer(_local4); } else { if (_local6 == "decor"){ CreateDecor(_local4); }; }; }; }; }; }; _local3++; }; for (_local3 in _local1) { CreateJointObject(_local1[_local3]); }; dispatchEvent(new Event(Event.COMPLETE)); } public function CreateCircObject(_arg1:PhysicsClip):b2Body{ var _local2:String; var _local3:*; var _local4:b2Body; _local2 = null; if ((((_arg1.name.indexOf("instance") == -1)) && ((_arg1.name.indexOf("__") == -1)))){ _local2 = _arg1.name; }; _local3 = (_arg1.rotation / (180 / Math.PI)); _local4 = _container.addCircle(_arg1.x, _arg1.y, (_arg1.scaleX * 100), _arg1.props, _local2); return (_local4); } public function copyToContainer(_arg1:iPhysicsContainer){ _container = _arg1; if (ready){ copyNow(); }; } public function onInit(_arg1:Event):void{ if (_container != null){ copyNow(); }; ready = true; removeEventListener(Event.ENTER_FRAME, onInit); } public function CreateDecor(_arg1:PhysicsClip):void{ var _local2:Class; var _local3:*; var _local4:String; _local2 = getClass(_arg1); _local3 = new (_local2); _local3.scaleX = _arg1.scaleX; _local3.scaleY = _arg1.scaleY; _local3.x = _arg1.x; _local3.y = _arg1.y; _local3.rotation = _arg1.rotation; _local3.name = _arg1.name; if ((((_arg1.name.indexOf("instance") == -1)) && ((_arg1.name.indexOf("__") == -1)))){ _local4 = _arg1.name; }; _container.addDecor(_local3, _local4); } public function CreateJointObject(_arg1:PhysicsClip):b2RevoluteJoint{ var _local2:String; var _local3:*; _local2 = null; if ((((_arg1.name.indexOf("instance") == -1)) && ((_arg1.name.indexOf("__") == -1)))){ _local2 = _arg1.name; }; _local3 = _container.addSnapJoint(_arg1.x, _arg1.y, _arg1.props, _local2); return (_local3); } static function getClass(_arg1:Object):Class{ return (Class(getDefinitionByName(getQualifiedClassName(_arg1)))); } public static function copyProps(_arg1:Object):Object{ var _local2:Object; var _local3:*; _local2 = {}; for (_local3 in _arg1) { _local2[_local3] = _arg1[_local3]; }; return (_local2); } } }//package b2MovieClips
Section 6
//b2JointMC (b2MovieClips.b2JointMC) package b2MovieClips { import flash.display.*; public class b2JointMC extends PhysicsClip { public function b2JointMC(){ _shapeType = "joint"; props.EnableMotor = false; props.MotorSpeed = 1; props.MaxMotorTorque = 100; } public function set MotorSpeed(_arg1:Number){ _props.MotorSpeed = _arg1; } public function set EnableMotor(_arg1:Boolean){ _props.EnableMotor = _arg1; } public function get MaxMotorTorque():Number{ return (_props.MaxMotorTorque); } public function get EnableMotor():Boolean{ return (_props.EnableMotor); } public function get MotorSpeed():Number{ return (_props.MotorSpeed); } public function set MaxMotorTorque(_arg1:Number){ _props.MaxMotorTorque = _arg1; } } }//package b2MovieClips
Section 7
//b2PlayerMC (b2MovieClips.b2PlayerMC) package b2MovieClips { public class b2PlayerMC extends PhysicsClip { public function b2PlayerMC(){ _shapeType = "player"; } } }//package b2MovieClips
Section 8
//b2RectangleMC (b2MovieClips.b2RectangleMC) package b2MovieClips { public class b2RectangleMC extends PhysicsShape { public function b2RectangleMC(){ _shapeType = "rectangle"; _props.isDyanmic = true; } } }//package b2MovieClips
Section 9
//b2StaticRectangleMC (b2MovieClips.b2StaticRectangleMC) package b2MovieClips { public class b2StaticRectangleMC extends PhysicsShape { public function b2StaticRectangleMC(){ _shapeType = "rectangle"; _props.isDynamic = false; } } }//package b2MovieClips
Section 10
//DecorButton (b2MovieClips.DecorButton) package b2MovieClips { import flash.events.*; public class DecorButton extends DecorGFX { protected var _enabled:Boolean;// = true protected var _hover:Boolean;// = false public function DecorButton(){ _enabled = true; _hover = false; super(); stop(); buttonMode = true; addEventListener(Event.REMOVED_FROM_STAGE, onRemove, false, 0, true); addEventListener(Event.ADDED_TO_STAGE, onAdded, false, 0, true); } protected function onClick(_arg1:MouseEvent){ if (!enabled){ _arg1.stopPropagation(); _arg1.stopImmediatePropagation(); }; } protected function onMove(_arg1:MouseEvent){ if (hitTestPoint(parent.mouseX, parent.mouseY)){ if (((!(_hover)) && (enabled))){ _hover = true; gotoAndStop("over"); }; } else { if (((_hover) && (enabled))){ _hover = false; gotoAndStop("up"); }; }; } protected function onRemove(_arg1:Event):void{ removeEventListener(Event.REMOVED_FROM_STAGE, onRemove); removeEventListener(Event.ADDED_TO_STAGE, onAdded); stage.removeEventListener(MouseEvent.MOUSE_MOVE, onMove); stage.removeEventListener(MouseEvent.MOUSE_DOWN, onDown); } protected function onOver(_arg1:MouseEvent){ gotoAndStop("over"); } protected function onDown(_arg1:MouseEvent){ if (((hitTestPoint(parent.mouseX, parent.mouseY)) && (enabled))){ dispatchEvent(new MouseEvent(MouseEvent.CLICK)); }; } override public function set enabled(_arg1:Boolean):void{ super.enabled = _arg1; _enabled = _arg1; if (!_arg1){ gotoAndStop("disabled"); } else { gotoAndStop("up"); }; } protected function onAdded(_arg1:Event):void{ stage.addEventListener(MouseEvent.MOUSE_DOWN, onDown, false, 0, true); stage.addEventListener(MouseEvent.MOUSE_MOVE, onMove, false, 0, true); } protected function onOut(_arg1:MouseEvent){ if (_enabled){ gotoAndStop("up"); } else { gotoAndStop("disabled"); }; } } }//package b2MovieClips
Section 11
//DecorGFX (b2MovieClips.DecorGFX) package b2MovieClips { import flash.display.*; import flash.text.*; public class DecorGFX extends PhysicsClip { public var time_txt:TextField; public var score_txt:TextField; public var height_txt:TextField; public var best_txt:TextField; public function DecorGFX(){ _shapeType = "decor"; _props.autoStart = false; } } }//package b2MovieClips
Section 12
//ExitGFX (b2MovieClips.ExitGFX) package b2MovieClips { public class ExitGFX extends PhysicsClip { public function ExitGFX(){ _shapeType = "rectangle"; _props.density = 1; _props.friction = 0.7; _props.restitution = 0.2; _props.isSensor = true; _props.isDynamic = false; _props.isExit = true; _props.score = 0; _props.isCollectable = false; _props.speech = null; _props.userData = "Exit"; } } }//package b2MovieClips
Section 13
//InkGFX (b2MovieClips.InkGFX) package b2MovieClips { public class InkGFX extends PhysicsClip { public function InkGFX(){ _shapeType = "rectangle"; _props.density = 1; _props.friction = 0.7; _props.restitution = 0.2; _props.isSensor = true; _props.isDynamic = false; _props.isExit = false; _props.score = 25; _props.isCollectable = true; _props.speech = null; _props.userData = "Ink"; } public function set ink(_arg1:Number){ _props.score = _arg1; } public function get ink():Number{ return (_props.score); } } }//package b2MovieClips
Section 14
//iPhysicsClip (b2MovieClips.iPhysicsClip) package b2MovieClips { public interface iPhysicsClip { function get props():Object; function get shapeType():String; } }//package b2MovieClips
Section 15
//iPhysicsContainer (b2MovieClips.iPhysicsContainer) package b2MovieClips { import Box2D.Dynamics.Joints.*; import Box2D.Dynamics.*; import flash.display.*; public interface iPhysicsContainer { function addDecor(_arg1:MovieClip, _arg2:String=null):void; function get physics():b2World; function addBox(_arg1, _arg2, _arg3, _arg4, _arg5:Number=0, _arg6:Object=null, _arg7:String=null):b2Body; function get physScale():Number; function addCircle(_arg1, _arg2, _arg3, _arg4:Object=null, _arg5:String=null):b2Body; function removeChild(_arg1:DisplayObject):DisplayObject; function addChild(_arg1:DisplayObject):DisplayObject; function createPlayer(_arg1, _arg2):b2Body; function addSnapJoint(_arg1, _arg2, _arg3:Object=null, _arg4:String=null):b2RevoluteJoint; } }//package b2MovieClips
Section 16
//PhysicsClip (b2MovieClips.PhysicsClip) package b2MovieClips { import flash.display.*; public class PhysicsClip extends MovieClip implements iPhysicsClip { protected var _shapeType:String;// = "none" protected var _props:Object; public function PhysicsClip(){ _shapeType = "none"; _props = {}; super(); _props.userData = null; _props.visible = true; } public function get userData():String{ return (_props.userData); } public function set userData(_arg1:String){ if (((!((_arg1 == ""))) && (!((_arg1 == null))))){ _props.userData = _arg1; }; } public function get props():Object{ return (_props); } public function get shapeType():String{ return (_shapeType); } public function get isDynamic():Boolean{ return (_props.isDynamic); } public function set isVisible(_arg1:Boolean){ _props.visible = _arg1; } public function set props(_arg1:Object){ _props = _arg1; } public function get isVisible():Boolean{ return (_props.visible); } } }//package b2MovieClips
Section 17
//PhysicsShape (b2MovieClips.PhysicsShape) package b2MovieClips { public class PhysicsShape extends PhysicsClip { public function PhysicsShape(){ _props.density = 1; _props.friction = 0.7; _props.restitution = 0.2; _props.isSensor = false; _props.isDynamic = true; _props.isExit = false; _props.score = 0; _props.isCollectable = false; } public function get friction():Number{ return (_props.friction); } public function set isSensor(_arg1:Boolean){ _props.isSensor = _arg1; } public function set friction(_arg1:Number){ _props.friction = _arg1; } public function get restitution():Number{ return (_props.restitution); } public function get isSensor():Boolean{ return (_props.isSensor); } public function set restitution(_arg1:Number){ _props.restitution = _arg1; } public function set density(_arg1:Number){ _props.density = _arg1; } public function get density():Number{ return (_props.density); } } }//package b2MovieClips
Section 18
//PictureFrameGFX (b2MovieClips.PictureFrameGFX) package b2MovieClips { public class PictureFrameGFX extends PhysicsClip { public function PictureFrameGFX(){ _shapeType = "rectangle"; _props.density = 1; _props.friction = 0.7; _props.restitution = 0.2; _props.isSensor = true; _props.isDynamic = false; _props.isExit = false; _props.score = 0; _props.isCollectable = false; _props.speech = null; _props.isFrame = true; _props.picture = ""; _props.targetX = 0; _props.targetY = 0; _props.scaleEric = 0.5; _props.visible = false; _props.complete = false; _props.time = 0; _props.hintTime = (30 * 30); } public function get scaleEric():Number{ return (_props.scaleEric); } public function get picture():String{ return (_props.picture); } public function set picture(_arg1:String){ _props.picture = _arg1; } public function set targetX(_arg1:Number){ _props.targetX = _arg1; } public function set targetY(_arg1:Number){ _props.targetY = _arg1; } public function get targetX():Number{ return (_props.targetX); } public function get targetY():Number{ return (_props.targetY); } public function set scaleEric(_arg1:Number){ _props.scaleEric = _arg1; } } }//package b2MovieClips
Section 19
//TalkArea (b2MovieClips.TalkArea) package b2MovieClips { public class TalkArea extends PhysicsClip { public function TalkArea(){ _shapeType = "rectangle"; _props.density = 1; _props.friction = 0.7; _props.restitution = 0.2; _props.isSensor = true; _props.isDynamic = false; _props.isExit = false; _props.score = 0; _props.isCollectable = false; _props.speech = ""; _props.visible = false; _props.hintLevel = 0; _props.showHint = false; _props.kills = false; _props.noDraw = false; } public function get showHint():Boolean{ return (_props.showHint); } public function set repeat(_arg1:Number){ _props.score = _arg1; } public function get hintLevel():Number{ return (_props.hintLevel); } public function set showHint(_arg1:Boolean){ _props.showHint = _arg1; } public function set noDraw(_arg1:Boolean){ _props.noDraw = _arg1; } public function set hintLevel(_arg1:Number){ _props.hintLevel = _arg1; } public function get noDraw():Boolean{ return (_props.noDraw); } public function set kills(_arg1:Boolean){ _props.kills = _arg1; } public function get repeat():Number{ return (_props.score); } public function set speech(_arg1:String){ _props.speech = _arg1; } public function get kills():Boolean{ return (_props.kills); } public function get speech():String{ return (_props.speech); } } }//package b2MovieClips
Section 20
//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 21
//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 22
//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 23
//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 24
//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 25
//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 26
//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 27
//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 28
//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 29
//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 30
//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 31
//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 = 0xFFFF; public static const b2_invalid:uint = 0xFFFF; 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 32
//b2BufferedPair (Box2D.Collision.b2BufferedPair) package Box2D.Collision { public class b2BufferedPair { public var proxyId1:uint; public var proxyId2:uint; } }//package Box2D.Collision
Section 33
//b2Collision (Box2D.Collision.b2Collision) package Box2D.Collision { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; 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 34
//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 35
//b2ContactPoint (Box2D.Collision.b2ContactPoint) package Box2D.Collision { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; 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 36
//b2Distance (Box2D.Collision.b2Distance) package Box2D.Collision { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; 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 37
//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 38
//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 39
//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 40
//b2Pair (Box2D.Collision.b2Pair) package Box2D.Collision { 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 = 0xFFFF; public static var e_pairBuffered:uint = 1; public static var b2_nullProxy:uint = 0xFFFF; public static var b2_tableCapacity:int = 4096; 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 41
//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 42
//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 43
//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 44
//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 45
//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 46
//b2TimeOfImpact (Box2D.Collision.b2TimeOfImpact) package Box2D.Collision { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; 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 47
//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 48
//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 49
//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 50
//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 51
//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 52
//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 53
//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 54
//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 55
//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 56
//b2CircleContact (Box2D.Dynamics.Contacts.b2CircleContact) package Box2D.Dynamics.Contacts { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; 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 57
//b2Contact (Box2D.Dynamics.Contacts.b2Contact) package Box2D.Dynamics.Contacts { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; 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 58
//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 59
//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 60
//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 61
//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 62
//b2ContactResult (Box2D.Dynamics.Contacts.b2ContactResult) package Box2D.Dynamics.Contacts { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; 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 63
//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 64
//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 65
//b2PolyAndCircleContact (Box2D.Dynamics.Contacts.b2PolyAndCircleContact) package Box2D.Dynamics.Contacts { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; 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 66
//b2PolygonContact (Box2D.Dynamics.Contacts.b2PolygonContact) package Box2D.Dynamics.Contacts { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; 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 67
//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 68
//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 69
//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 70
//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 71
//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 72
//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 73
//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 74
//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 75
//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 76
//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 77
//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 78
//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 79
//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 80
//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 81
//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 82
//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 83
//b2Body (Box2D.Dynamics.b2Body) package Box2D.Dynamics { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; 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 84
//b2BodyDef (Box2D.Dynamics.b2BodyDef) package Box2D.Dynamics { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; 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 85
//b2BoundaryListener (Box2D.Dynamics.b2BoundaryListener) package Box2D.Dynamics { public class b2BoundaryListener { public function Violation(_arg1:b2Body):void{ } } }//package Box2D.Dynamics
Section 86
//b2ContactFilter (Box2D.Dynamics.b2ContactFilter) package Box2D.Dynamics { import Box2D.Collision.Shapes.*; public class b2ContactFilter { public static var b2_defaultFilter:b2ContactFilter = new (b2ContactFilter); ; public function ShouldCollide(_arg1:b2Shape, _arg2:b2Shape):Boolean{ var _local3:b2FilterData; var _local4:b2FilterData; var _local5:Boolean; _local3 = _arg1.GetFilterData(); _local4 = _arg2.GetFilterData(); if ((((_local3.groupIndex == _local4.groupIndex)) && (!((_local3.groupIndex == 0))))){ return ((_local3.groupIndex > 0)); }; _local5 = ((!(((_local3.maskBits & _local4.categoryBits) == 0))) && (!(((_local3.categoryBits & _local4.maskBits) == 0)))); return (_local5); } } }//package Box2D.Dynamics
Section 87
//b2ContactListener (Box2D.Dynamics.b2ContactListener) package Box2D.Dynamics { import Box2D.Collision.*; import Box2D.Dynamics.Contacts.*; public class b2ContactListener { public function Add(_arg1:b2ContactPoint):void{ } public function Remove(_arg1:b2ContactPoint):void{ } public function Persist(_arg1:b2ContactPoint):void{ } public function Result(_arg1:b2ContactResult):void{ } } }//package Box2D.Dynamics
Section 88
//b2ContactManager (Box2D.Dynamics.b2ContactManager) package Box2D.Dynamics { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; 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 89
//b2DebugDraw (Box2D.Dynamics.b2DebugDraw) package Box2D.Dynamics { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; import flash.display.*; 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 90
//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 91
//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 92
//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 93
//b2World (Box2D.Dynamics.b2World) package Box2D.Dynamics { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; 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 94
//ClearTool (levelEditor.ClearTool) package levelEditor { import flash.events.*; public class ClearTool extends Tool { public function ClearTool(){ selectable = false; _button = new ClearButton(); } override public function onSelect(_arg1:MouseEvent=null){ editor.clear(); editor.insertPlayer(); } } }//package levelEditor
Section 95
//Control (levelEditor.Control) package levelEditor { import flash.display.*; public class Control extends MovieClip { protected var _path:String; protected var _type:String; protected var _value; public function get path():String{ return (_path); } public function get value(){ return (_value); } public function blur():void{ } public function get type():String{ return (_type); } public function set prop(_arg1){ _type = _arg1.type; if (_arg1.path != null){ _path = _arg1.path; } else { _path = _arg1.name; }; this.name = _arg1.name; } public function set value(_arg1):void{ _value = _arg1; } } }//package levelEditor
Section 96
//ControlEvent (levelEditor.ControlEvent) package levelEditor { import flash.events.*; public class ControlEvent extends Event { public var content; public static var CHANGE:String = "controlchange"; public function ControlEvent(_arg1:String, _arg2=null, _arg3:Boolean=false, _arg4:Boolean=false){ super(_arg1, _arg3, _arg4); this.content = _arg2; } } }//package levelEditor
Section 97
//DeleteTool (levelEditor.DeleteTool) package levelEditor { import flash.events.*; public class DeleteTool extends Tool { public function DeleteTool(){ selectable = false; _button = new DeleteButton(); } override public function onSelect(_arg1:MouseEvent=null){ trace("delete"); editor.destroyCurrent(); } } }//package levelEditor
Section 98
//DropDownControl (levelEditor.DropDownControl) package levelEditor { import flash.display.*; import flash.events.*; import flash.text.*; public class DropDownControl extends Control { public var arrow_btn:SimpleButton; var ypos;// = 0 public var bg:MovieClip; public var value_txt:TextField; public var label_txt:TextField; var maxWidth:Number;// = 0 var marg:Number;// = 0 var rows:Sprite; public function DropDownControl(){ maxWidth = 0; ypos = 0; marg = 0; super(); rows = new Sprite(); addChild(rows); rows.visible = false; arrow_btn.addEventListener(MouseEvent.CLICK, onArrow, false, 0, true); label_txt.autoSize = TextFieldAutoSize.LEFT; } protected function draw(){ var _local1:*; if (marg > 0){ _local1 = 0; while (_local1 < rows.numChildren) { rows.getChildAt(_local1).width = (maxWidth + arrow_btn.width); _local1++; }; value_txt.x = (marg + 2); value_txt.width = maxWidth; arrow_btn.x = (maxWidth + marg); rows.y = (value_txt.height + 2); rows.x = marg; bg.width = (((arrow_btn.x + arrow_btn.width) + 4) - marg); bg.x = marg; }; } protected function onArrow(_arg1:MouseEvent){ rows.visible = !(rows.visible); } override public function blur():void{ rows.visible = false; } protected function onRow(_arg1:MouseEvent){ var _local2:DropDownRow; var _local3:*; rows.visible = false; _local2 = (_arg1.currentTarget as DropDownRow); _local3 = _local2.value; if (value != _local3){ value_txt.text = _local2.label; value = _local3; dispatchEvent(new ControlEvent(ControlEvent.CHANGE)); }; } public function addRow(_arg1:String, _arg2):void{ var _local3:DropDownRow; _local3 = new DropDownRow(); _local3.addEventListener(MouseEvent.CLICK, onRow, false, 0, true); _local3.label = _arg1; _local3.value = _arg2; _local3.y = ypos; ypos = (ypos + _local3.height); rows.addChild(_local3); if (_local3.width > maxWidth){ maxWidth = _local3.width; }; draw(); } override public function set prop(_arg1){ super.prop = _arg1; label_txt.text = _arg1.name; marg = label_txt.width; draw(); } override public function set value(_arg1):void{ var _local2:*; var _local3:DropDownRow; _local2 = 0; while (_local2 < rows.numChildren) { _local3 = (rows.getChildAt(_local2) as DropDownRow); if (_local3.value == _arg1){ value_txt.text = _local3.label; break; }; _local2++; }; super.value = _arg1; } } }//package levelEditor
Section 99
//DropDownRow (levelEditor.DropDownRow) package levelEditor { import flash.display.*; import flash.events.*; import flash.text.*; public class DropDownRow extends MovieClip { public var b2:MovieClip; public var b1:MovieClip; public var txt:TextField; public var value; public function DropDownRow(){ txt.autoSize = TextFieldAutoSize.LEFT; txt.mouseEnabled = false; addEventListener(MouseEvent.MOUSE_OVER, onOver); addEventListener(MouseEvent.MOUSE_OUT, onOut); b1.visible = true; b2.visible = false; } public function get label():String{ return (txt.text); } public function onOver(_arg1:MouseEvent){ b1.visible = false; b2.visible = true; } override public function set width(_arg1:Number):void{ txt.autoSize = TextFieldAutoSize.NONE; b1.width = _arg1; b2.width = _arg1; txt.width = (_arg1 - 4); } public function set label(_arg1:String):void{ txt.text = _arg1; b1.width = (txt.width + 4); b2.width = (txt.width + 4); } public function onOut(_arg1:MouseEvent){ b2.visible = false; b1.visible = true; } } }//package levelEditor
Section 100
//DynamicRectMatrixObject (levelEditor.DynamicRectMatrixObject) package levelEditor { public class DynamicRectMatrixObject extends MatrixShape { public function DynamicRectMatrixObject(){ editFields.push({name:"density", type:"number", path:"props.density"}); type = "DynamicRectangle"; props.isDynamic = true; } } }//package levelEditor
Section 101
//DynamicRectTool (levelEditor.DynamicRectTool) package levelEditor { import flash.display.*; import flash.events.*; import flash.geom.*; public class DynamicRectTool extends Tool { var startPos:Point; public function DynamicRectTool(){ _button = new DynamicButton(); } override public function onDown(_arg1:MouseEvent){ startPos = new Point(editor.mouseX, editor.mouseY); editor.addEventListener(Event.ENTER_FRAME, onFrame, false, 0, true); } override public function onUp(_arg1:MouseEvent){ var _local2:Graphics; var _local3:DynamicRectMatrixObject; var _local4:Point; _local2 = editor.preview.graphics; _local2.clear(); editor.removeEventListener(Event.ENTER_FRAME, onFrame); _local3 = new DynamicRectMatrixObject(); _local4 = new Point((editor.mouseX - startPos.x), (editor.mouseY - startPos.y)); _local3.x = (startPos.x + (_local4.x / 2)); _local3.y = (startPos.y + (_local4.y / 2)); _local3.scaleX = (_local4.x / 100); _local3.scaleY = (_local4.y / 100); editor.create(_local3); } public function onFrame(_arg1:Event){ var _local2:Graphics; _local2 = editor.preview.graphics; _local2.clear(); _local2.lineStyle(1, 0xCCCCCC); _local2.beginFill(0xCCCCCC); _local2.drawRect(startPos.x, startPos.y, (editor.mouseX - startPos.x), (editor.mouseY - startPos.y)); _local2.endFill(); } override public function dispose():void{ super.dispose(); editor.removeEventListener(Event.ENTER_FRAME, onFrame); } } }//package levelEditor
Section 102
//ExitMatrixObject (levelEditor.ExitMatrixObject) package levelEditor { public class ExitMatrixObject extends MatrixObject { public function ExitMatrixObject(){ type = "rectangle"; props.userData = "Exit"; } } }//package levelEditor
Section 103
//ExitTool (levelEditor.ExitTool) package levelEditor { import flash.events.*; public class ExitTool extends Tool { public function ExitTool(){ _button = new ExitButton(); } override public function onDown(_arg1:MouseEvent){ var _local2:ExitMatrixObject; _local2 = new ExitMatrixObject(); _local2.x = editor.mouseX; _local2.y = editor.mouseY; editor.create(_local2); } } }//package levelEditor
Section 104
//InkMatrixObject (levelEditor.InkMatrixObject) package levelEditor { public class InkMatrixObject extends MatrixObject { public function InkMatrixObject(){ editFields.push({name:"ink", type:"number", path:"props.score"}); type = "rectangle"; props.isCollectable = true; props.score = 25; props.userData = "Ink"; } } }//package levelEditor
Section 105
//InkTool (levelEditor.InkTool) package levelEditor { import flash.events.*; public class InkTool extends Tool { public function InkTool(){ _button = new InkButton(); } override public function onDown(_arg1:MouseEvent){ var _local2:InkMatrixObject; _local2 = new InkMatrixObject(); _local2.x = editor.mouseX; _local2.y = editor.mouseY; editor.create(_local2); } } }//package levelEditor
Section 106
//JointMatrixObject (levelEditor.JointMatrixObject) package levelEditor { public class JointMatrixObject extends MatrixObject { public function JointMatrixObject(){ editFields.push({name:"motor", type:"boolean", path:"props.EnableMotor"}); editFields.push({name:"speed", type:"number", path:"props.MotorSpeed"}); editFields.push({name:"torque", type:"number", path:"props.MaxMotorTorque"}); type = "joint"; props.EnableMotor = false; props.MotorSpeed = 1; props.MaxMotorTorque = 100; } } }//package levelEditor
Section 107
//JointTool (levelEditor.JointTool) package levelEditor { import flash.events.*; public class JointTool extends Tool { public function JointTool(){ _button = new JointButton(); } override public function onDown(_arg1:MouseEvent){ var _local2:JointMatrixObject; _local2 = new JointMatrixObject(); _local2.x = editor.mouseX; _local2.y = editor.mouseY; editor.create(_local2); } } }//package levelEditor
Section 108
//LevelEditor (levelEditor.LevelEditor) package levelEditor { import flash.display.*; import flash.events.*; import ui.*; import Levels.*; import application.*; public class LevelEditor extends MovieClip { var objects:Sprite; var controller2:ObjectController; var bg:Sprite; var cp:OptionsPanel; var buttons:Sprite; public var current:MatrixObject; var tool:Tool; var controller:OutterController; public var preview:Sprite; var tools:Array; protected static var sprops = {density:1, friction:1, restitution:0, userData:null, isDynamic:false, isSensor:false, isExit:false, score:0, isCollectable:false, visible:true}; public function LevelEditor(){ var _local1:*; var _local2:*; var _local3:*; var _local4:*; var _local5:*; var _local6:*; var _local7:*; var _local8:*; var _local9:*; var _local10:*; super(); cp = new OptionsPanel(); cp.y = 50; objects = new Sprite(); addChild(objects); preview = new Sprite(); addChild(preview); tools = new Array(); controller = new OutterController(); addChild(controller); controller2 = new ObjectController(); addChild(controller2); addChild(cp); buttons = new Sprite(); addChild(buttons); _local1 = new SelectTool(); addTool(_local1); _local2 = new StaticRectTool(); addTool(_local2); _local3 = new DynamicRectTool(); addTool(_local3); _local4 = new InkTool(); addTool(_local4); _local5 = new ExitTool(); addTool(_local5); _local6 = new JointTool(); addTool(_local6); _local7 = new DeleteTool(); addTool(_local7); _local8 = new ClearTool(); addTool(_local8); _local9 = new ParTimeTool(); addTool(_local9); _local10 = new LevelNameTool(); addTool(_local10); selectTool(_local1); } public function destroy(_arg1:MatrixObject){ if (current == _arg1){ select(null); current = null; }; objects.removeChild(_arg1); _arg1.removeEventListener(MouseEvent.MOUSE_DOWN, onDownObject); } public function create(_arg1:MatrixObject){ if ((((_arg1.scaleX == 0)) || ((_arg1.scaleY == 0)))){ return; }; objects.addChild(_arg1); _arg1.addEventListener(MouseEvent.MOUSE_DOWN, onDownObject, false, 0, true); } public function insertPlayer(){ var _local1:*; _local1 = new PlayerMatrixObject(); _local1.x = 300; _local1.y = 200; create(_local1); } protected function onTool(_arg1:MouseEvent){ var _local2:int; var _local3:*; _local2 = parseInt(_arg1.target.name); _local3 = tools[_local2]; selectTool(_local3); select(null); } public function select(_arg1:MatrixObject=null){ if (_arg1 != current){ controller.visible = false; controller2.visible = false; controller.setModelView(null); controller2.setModelView(null); current = _arg1; if (_arg1 != null){ if ((_arg1 is MatrixShape)){ controller.setModelView(_arg1); controller.visible = true; } else { controller2.setModelView(_arg1); controller2.visible = true; }; }; cp.select(_arg1); }; } public function onDownBG(_arg1:MouseEvent){ if (tool != null){ tool.onDown(_arg1); }; stage.removeEventListener(MouseEvent.MOUSE_UP, onUpBG); stage.addEventListener(MouseEvent.MOUSE_UP, onUpBG, false, 0, true); } public function encode():String{ var _local1:String; var _local2:String; var _local3:String; var _local4:MatrixShape; var _local5:int; var _local6:MatrixObject; _local1 = ""; _local2 = ""; _local3 = ""; _local5 = 0; while (_local5 < tools.length) { if ((tools[_local5] is ParTimeTool)){ _local1 = (_local1 + ((ObjectTypes.PAR_TIME + ",") + tools[_local5]["parTime"])); break; }; _local5++; }; _local3 = "|"; _local5 = 0; while (_local5 < objects.numChildren) { _local6 = (objects.getChildAt(_local5) as MatrixObject); if ((_local6 is DynamicRectMatrixObject)){ _local4 = (_local6 as MatrixShape); _local2 = ((_local3 + ObjectTypes.DYNAMIC_RECTANGLE) + ","); _local2 = (_local2 + ("x:" + round(_local4.x))); _local2 = (_local2 + (",y:" + round(_local4.y))); if (_local4.rotRadian != 0){ _local2 = (_local2 + (",r:" + round(_local4.rotRadian))); }; _local2 = (_local2 + (",w:" + round(_local4.scaleX))); _local2 = (_local2 + (",h:" + round(_local4.scaleY))); if (_local4.props.friction != 0.7){ _local2 = (_local2 + (",f:" + round(_local4.props.friction))); }; if (_local4.props.restitution != 0.2){ _local2 = (_local2 + (",b:" + round(_local4.props.restitution))); }; if (_local4.props.density != 1){ _local2 = (_local2 + (",d:" + round(_local4.props.density))); }; _local1 = (_local1 + _local2); } else { if ((_local6 is StaticRectMatrixObject)){ _local4 = (_local6 as MatrixShape); _local2 = ((_local3 + ObjectTypes.STATIC_RECTANGLE) + ","); _local2 = (_local2 + ("x:" + round(_local4.x))); _local2 = (_local2 + (",y:" + round(_local4.y))); if (_local4.rotRadian != 0){ _local2 = (_local2 + (",r:" + round(_local4.rotRadian))); }; _local2 = (_local2 + (",w:" + round(_local4.scaleX))); _local2 = (_local2 + (",h:" + round(_local4.scaleY))); if (_local4.props.friction != 0.7){ _local2 = (_local2 + (",f:" + round(_local4.props.friction))); }; if (_local4.props.restitution != 0.2){ _local2 = (_local2 + (",b:" + round(_local4.props.restitution))); }; _local1 = (_local1 + _local2); } else { if ((_local6 is PlayerMatrixObject)){ _local2 = ((_local3 + ObjectTypes.PLAYER) + ","); _local2 = (_local2 + ("x:" + round(_local6.x))); _local2 = (_local2 + (",y:" + round(_local6.y))); _local1 = (_local1 + _local2); } else { if ((_local6 is InkMatrixObject)){ _local2 = ((_local3 + ObjectTypes.INK) + ","); _local2 = (_local2 + ("x:" + round(_local6.x))); _local2 = (_local2 + (",y:" + round(_local6.y))); if (_local6.props.score != 25){ _local2 = (_local2 + (",s:" + round(_local6.props.score))); }; _local1 = (_local1 + _local2); } else { if ((_local6 is ExitMatrixObject)){ _local2 = ((_local3 + ObjectTypes.EXIT) + ","); _local2 = (_local2 + ("x:" + round(_local6.x))); _local2 = (_local2 + (",y:" + round(_local6.y))); _local1 = (_local1 + _local2); } else { if ((_local6 is JointMatrixObject)){ _local2 = ((_local3 + ObjectTypes.JOINT) + ","); _local2 = (_local2 + ("x:" + round(_local6.x))); _local2 = (_local2 + (",y:" + round(_local6.y))); if (_local6.props.EnableMotor){ _local2 = (_local2 + ",me:1"); _local2 = (_local2 + (",ms:" + round(_local6.props.MotorSpeed))); _local2 = (_local2 + (",mt:" + round(_local6.props.MaxMotorTorque))); }; _local1 = (_local1 + _local2); }; }; }; }; }; }; _local5++; }; trace(_local1); return (_local1); } public function destroyCurrent(){ if ((current is PlayerMatrixObject)){ return; }; if (current != null){ destroy(current); }; } protected function round(_arg1:Number):Number{ _arg1 = (_arg1 * 1000); _arg1 = Math.round(_arg1); _arg1 = (_arg1 / 1000); return (_arg1); } public function onUpBG(_arg1:MouseEvent){ if (tool != null){ tool.onUp(_arg1); }; stage.removeEventListener(MouseEvent.MOUSE_UP, onUpBG); } public function clear(){ while (objects.numChildren > 0) { destroy((objects.getChildAt(0) as MatrixObject)); }; select(null); } public function dispose(){ stage.removeEventListener(MouseEvent.MOUSE_UP, onUpBG); clear(); removeTools(); } protected function removeTools(){ var _local1:*; while (buttons.numChildren > 0) { _local1 = buttons.getChildAt(0); _local1.removeEventListener(MouseEvent.CLICK, onTool); buttons.removeChild(_local1); }; } public function selectTool(_arg1:Tool){ if (tool != _arg1){ if (_arg1.selectable){ if (tool != null){ tool.button.enabled = true; }; tool = _arg1; tool.button.enabled = false; }; _arg1.onSelect(); }; } public function addTool(_arg1:Tool){ var _local2:*; var _local3:BasicButton; var _local4:*; if (buttons.numChildren > 0){ _local4 = buttons.getChildAt((buttons.numChildren - 1)); _local2 = ((_local4.x + _local4.width) + 5); } else { _local2 = 0; }; _local3 = _arg1.button; _local3.name = (tools.length + ""); tools.push(_arg1); buttons.addChild(_local3); _local3.x = _local2; _arg1.editor = this; _local3.addEventListener(MouseEvent.CLICK, onTool, false, 0, true); } protected function onDownObject(_arg1:MouseEvent){ onDownBG(_arg1); } public function decode(_arg1:String){ var _local2:*; var _local3:Array; var _local4:*; var _local5:Array; var _local6:*; var _local7:*; var _local8:*; var _local9:*; var _local10:*; if ((((_arg1 == null)) || ((_arg1 == "")))){ return; }; clear(); if (_arg1.indexOf("|") == -1){ _local3 = [_arg1]; } else { _local3 = _arg1.split("|"); }; _local4 = 0; while (_local4 < _local3.length) { _local5 = _local3[_local4].split(","); _local6 = _local5.shift(); if (_local6 == ObjectTypes.DYNAMIC_RECTANGLE){ _local2 = new DynamicRectMatrixObject(); } else { if (_local6 == ObjectTypes.PLAYER){ _local2 = new PlayerMatrixObject(); } else { if (_local6 == ObjectTypes.STATIC_RECTANGLE){ _local2 = new StaticRectMatrixObject(); } else { if (_local6 == ObjectTypes.INK){ _local2 = new InkMatrixObject(); } else { if (_local6 == ObjectTypes.EXIT){ _local2 = new ExitMatrixObject(); } else { if (_local6 == ObjectTypes.JOINT){ _local2 = new JointMatrixObject(); } else { if (_local6 == ObjectTypes.PAR_TIME){ _local7 = 0; while (_local4 < tools.length) { if ((tools[_local7] is ParTimeTool)){ tools[_local7]["parTime"] = parseInt(_local5[0]); break; }; _local7++; }; }; }; }; }; }; }; }; if (_local2 != null){ _local8 = 0; while (_local8 < _local5.length) { _local9 = _local5[_local8].split(":"); _local10 = _local9[0]; _arg1 = _local9[1]; if (_local10 == "x"){ _local2.x = parseFloat(_arg1); } else { if (_local10 == "y"){ _local2.y = parseFloat(_arg1); } else { if (_local10 == "w"){ _local2.scaleX = parseFloat(_arg1); } else { if (_local10 == "h"){ _local2.scaleY = parseFloat(_arg1); } else { if (_local10 == "f"){ _local2.props.friction = parseFloat(_arg1); } else { if (_local10 == "b"){ _local2.props.restitution = parseFloat(_arg1); } else { if (_local10 == "d"){ _local2.props.density = parseFloat(_arg1); } else { if (_local10 == "r"){ _local2.rotRadian = parseFloat(_arg1); } else { if (_local10 == "s"){ _local2.props.score = parseFloat(_arg1); } else { if (_local10 == "me"){ _local2.props.EnableMotor = (_arg1 == "1"); } else { if (_local10 == "ms"){ _local2.props.MotorSpeed = parseFloat(_arg1); } else { if (_local10 == "mt"){ _local2.props.MaxMotorTorque = parseFloat(_arg1); }; }; }; }; }; }; }; }; }; }; }; }; _local8++; }; create(_local2); }; _local4++; }; } protected static function copyProps(_arg1:Object):Object{ var _local2:Object; var _local3:*; _local2 = {}; for (_local3 in _arg1) { _local2[_local3] = _arg1[_local3]; }; return (_local2); } } }//package levelEditor
Section 109
//LevelFactory (levelEditor.LevelFactory) package levelEditor { import flash.events.*; import Levels.*; public class LevelFactory extends EventDispatcher { protected static var sprops = {density:1, friction:0.7, restitution:0.2, userData:null, isDynamic:false, isSensor:false, isExit:false, score:0, isCollectable:false, visible:true}; protected function transfer(_arg1:EricLevel, _arg2:Object):void{ if (_arg2.shapeType == "rectangle"){ _arg1.addBox(_arg2.x, _arg2.y, (_arg2.scaleX * 100), (_arg2.scaleY * 100), _arg2.rotRadian, _arg2.props); } else { if (_arg2.shapeType == "player"){ _arg1.createPlayer(_arg2.x, _arg2.y); } else { if (_arg2.shapeType == "joint"){ _arg1.addSnapJoint(_arg2.x, _arg2.y, _arg2.props); }; }; }; } public function constructFromString(_arg1:String, _arg2:EricLevel){ var _local3:*; var _local4:Array; var _local5:*; var _local6:Array; var _local7:*; var _local8:*; var _local9:*; var _local10:*; var _local11:*; if (_arg1.indexOf("|") == -1){ _local4 = [_arg1]; } else { _local4 = _arg1.split("|"); }; _local5 = 0; while (_local5 < _local4.length) { _local3 = {x:0, y:0, rotRadian:0, scaleX:1, scaleY:1}; _local3.props = copyProps(sprops); _local6 = _local4[_local5].split(","); _local7 = _local6.shift(); if (_local7 == ObjectTypes.DYNAMIC_RECTANGLE){ _local3.shapeType = "rectangle"; _local3.props.isDynamic = true; } else { if (_local7 == ObjectTypes.PLAYER){ _local3.shapeType = "player"; _local3.props.isDynamic = true; } else { if (_local7 == ObjectTypes.STATIC_RECTANGLE){ _local3.shapeType = "rectangle"; _local3.props.isDynamic = false; } else { if (_local7 == ObjectTypes.INK){ _local3.shapeType = "rectangle"; _local3.props.score = 25; _local3.props.userData = "Ink"; _local3.props.isCollectable = true; _local3.props.isSensor = true; _local3.props.isDynamic = false; _local3.scaleX = 0.3; _local3.scaleY = 0.3; } else { if (_local7 == ObjectTypes.EXIT){ _local3.shapeType = "rectangle"; _local3.props.userData = "Exit"; _local3.props.isSensor = true; _local3.props.isDynamic = false; _local3.props.isExit = true; _local3.scaleX = 0.5; _local3.scaleY = 0.5; } else { if (_local7 == ObjectTypes.JOINT){ _local3.shapeType = "joint"; _local6.EnableMotor = false; _local6.MotorSpeed = 1; _local6.MaxMotorTorque = 100; _local3.scaleX = 1; _local3.scaleY = 1; } else { if (_local7 == ObjectTypes.PAR_TIME){ _local9 = parseInt(_local6[0].toString()); _local3.shapeType = "none"; _arg2.parTime = _local9; }; }; }; }; }; }; }; _local8 = 0; while (_local8 < _local6.length) { _local10 = _local6[_local8].split(":"); _local11 = _local10[0]; _arg1 = _local10[1]; if (_local11 == "x"){ _local3.x = parseFloat(_arg1); } else { if (_local11 == "y"){ _local3.y = parseFloat(_arg1); } else { if (_local11 == "w"){ _local3.scaleX = parseFloat(_arg1); } else { if (_local11 == "h"){ _local3.scaleY = parseFloat(_arg1); } else { if (_local11 == "f"){ _local3.props.friction = parseFloat(_arg1); } else { if (_local11 == "b"){ _local3.props.restitution = parseFloat(_arg1); } else { if (_local11 == "d"){ _local3.props.density = parseFloat(_arg1); } else { if (_local11 == "r"){ _local3.rotRadian = parseFloat(_arg1); } else { if (_local11 == "s"){ _local3.props.score = parseFloat(_arg1); } else { if (_local11 == "me"){ _local3.props.EnableMotor = (_arg1 == "1"); } else { if (_local11 == "ms"){ _local3.props.MotorSpeed = parseFloat(_arg1); } else { if (_local11 == "mt"){ _local3.props.MaxMotorTorque = parseFloat(_arg1); }; }; }; }; }; }; }; }; }; }; }; }; _local8++; }; transfer(_arg2, _local3); _local5++; }; } protected static function copyProps(_arg1:Object):Object{ var _local2:Object; var _local3:*; _local2 = {}; for (_local3 in _arg1) { _local2[_local3] = _arg1[_local3]; }; return (_local2); } } }//package levelEditor
Section 110
//LevelNameTool (levelEditor.LevelNameTool) package levelEditor { public class LevelNameTool extends Tool { public function LevelNameTool(){ selectable = false; _button = new LevelNameButton(); } } }//package levelEditor
Section 111
//MatrixObject (levelEditor.MatrixObject) package levelEditor { import flash.display.*; import flash.geom.*; public class MatrixObject extends Sprite { public var type:String; public var editFields:Array; protected var _centerX:Number;// = 0 public var props:Object; protected var _centerY:Number;// = 0 public function MatrixObject(){ _centerX = 0; _centerY = 0; super(); props = {}; props.density = 1; props.friction = 0.7; props.restitution = 0.2; props.isSensor = false; props.isDynamic = true; props.isExit = false; props.score = 0; props.isCollectable = false; props.visible = true; editFields = [{name:"x", type:"number"}, {name:"y", type:"number"}]; } public function set centerY(_arg1:Number){ _centerY = _arg1; dispatchMatrixChange(); } public function set centerX(_arg1:Number){ _centerX = _arg1; dispatchMatrixChange(); } protected function dispatchMatrixChange(){ dispatchEvent(new ModelEvent(ModelEvent.MATRIX_CHANGE)); } public function get centerY():Number{ return (_centerY); } public function get centerX():Number{ return (_centerX); } public function get matrix():Matrix{ return (transform.matrix); } public function getProp(_arg1:String){ var _local2:Array; var _local3:*; if (_arg1.indexOf(".") == -1){ _local2 = [_arg1]; } else { _local2 = _arg1.split("."); }; _local3 = this; while (_local2.length > 1) { _arg1 = _local2.shift(); _local3 = _local3[_arg1]; }; return (_local3[_local2.shift()]); } public function setProp(_arg1:String, _arg2){ var _local3:Array; var _local4:*; if (_arg1.indexOf(".") == -1){ _local3 = [_arg1]; } else { _local3 = _arg1.split("."); }; _local4 = this; while (_local3.length > 1) { _arg1 = _local3.shift(); _local4 = _local4[_arg1]; }; _local4[_local3.shift()] = _arg2; dispatchMatrixChange(); } override public function set x(_arg1:Number):void{ super.x = _arg1; dispatchMatrixChange(); } override public function set y(_arg1:Number):void{ super.y = _arg1; dispatchMatrixChange(); } } }//package levelEditor
Section 112
//MatrixShape (levelEditor.MatrixShape) package levelEditor { public class MatrixShape extends MatrixObject { public function MatrixShape(){ editFields.push({name:"w", type:"number", path:"scaleX"}); editFields.push({name:"h", type:"number", path:"scaleY"}); editFields.push({name:"rotation", type:"number"}); editFields.push({name:"friction", type:"number", path:"props.friction"}); editFields.push({name:"bounce", type:"number", path:"props.restitution"}); } override public function set height(_arg1:Number):void{ super.height = _arg1; dispatchMatrixChange(); } override public function set width(_arg1:Number):void{ super.width = _arg1; dispatchMatrixChange(); } override public function set scaleX(_arg1:Number):void{ super.scaleX = _arg1; dispatchMatrixChange(); } override public function set scaleY(_arg1:Number):void{ super.scaleY = _arg1; dispatchMatrixChange(); } public function set rotRadian(_arg1:Number):void{ var _local2:*; _local2 = ((180 * _arg1) / Math.PI); super.rotation = _local2; dispatchMatrixChange(); } public function get rotRadian():Number{ var _local1:Number; _local1 = ((super.rotation * Math.PI) / 180); return (_local1); } override public function set rotation(_arg1:Number):void{ super.rotation = _arg1; dispatchMatrixChange(); } } }//package levelEditor
Section 113
//ModelEvent (levelEditor.ModelEvent) package levelEditor { import flash.events.*; public dynamic class ModelEvent extends Event { public var content; public static var ADD_MODEL:String = "addmodel"; public static var STYLE_CHANGE:String = "stylechange"; public static var SHAPE_CHANGE:String = "changeshape"; public static var MODEL_CREATED:String = "modelcreated"; public static var NUM_POINTS_CHANGE:String = "numpointschange"; public static var MATRIX_CHANGE:String = "changematrix"; public static var LINE_CHANGE:String = "linechange"; public static var REMOVE_MODEL:String = "removemodel"; public static var POINT_CHANGE:String = "change"; public function ModelEvent(_arg1:String, _arg2=null, _arg3:Boolean=false, _arg4:Boolean=false){ super(_arg1, _arg3, _arg4); this.content = _arg2; } } }//package levelEditor
Section 114
//NameValueControl (levelEditor.NameValueControl) package levelEditor { import flash.events.*; import flash.text.*; public class NameValueControl extends Control { public var label:TextField; public var tf:TextField; public function NameValueControl(){ tf.addEventListener(KeyboardEvent.KEY_DOWN, onTf); tf.addEventListener(FocusEvent.FOCUS_OUT, onTfc); label.autoSize = TextFieldAutoSize.LEFT; } protected function round(_arg1:Number):Number{ _arg1 = (_arg1 * 1000); _arg1 = Math.round(_arg1); _arg1 = (_arg1 / 1000); return (_arg1); } private function onTf(_arg1:KeyboardEvent){ if (_arg1.charCode == 13){ getValue(); }; } protected function getValue(){ if (_type == "string"){ _value = tf.text; } else { if (type == "number"){ _value = parseFloat(tf.text); } else { if (type == "boolean"){ _value = (((tf.text.toLowerCase() == "true")) || ((tf.text == "1"))); }; }; }; dispatchEvent(new ControlEvent(ControlEvent.CHANGE)); } override public function set prop(_arg1){ super.prop = _arg1; label.text = _arg1.name; tf.x = label.width; } private function onTfc(_arg1:Event):void{ getValue(); } override public function set value(_arg1):void{ super.value = _arg1; if ((_arg1 is Number)){ _arg1 = round(_arg1); }; tf.text = (_arg1 + ""); } } }//package levelEditor
Section 115
//ObjectController (levelEditor.ObjectController) package levelEditor { import flash.display.*; import flash.events.*; import flash.geom.*; public class ObjectController extends Sprite { public var model:MatrixObject; private var dragX:Boolean;// = true private var dragY:Boolean;// = true private var mousePoint:Point; public var lineContainer:Sprite; public function ObjectController(_arg1:MatrixObject=null){ dragX = true; dragY = true; super(); lineContainer = new Sprite(); addChild(lineContainer); if (_arg1 != null){ setModelView(_arg1); }; } public function dispose():void{ if (model){ model.removeEventListener(ModelEvent.MATRIX_CHANGE, onShapeChange); }; removeChild(lineContainer); model = null; lineContainer = null; } public function setModelView(_arg1){ var _local2:MatrixObject; _local2 = (_arg1 as MatrixObject); if (model){ model.removeEventListener(ModelEvent.MATRIX_CHANGE, onShapeChange); model.removeEventListener(MouseEvent.MOUSE_DOWN, onModelDown); }; model = _local2; if (_local2 != null){ model.addEventListener(ModelEvent.MATRIX_CHANGE, onShapeChange, false, 0, true); model.addEventListener(MouseEvent.MOUSE_DOWN, onModelDown, false, 0, true); draw(); }; } public function draw(_arg1:Matrix=null){ lineContainer.graphics.clear(); drawBoundSquare(lineContainer.graphics); lineContainer.transform.matrix = model.matrix; } private function onModelDown(_arg1:MouseEvent){ mousePoint = new Point((model.parent.mouseX - model.x), (model.parent.mouseY - model.y)); stage.addEventListener(MouseEvent.MOUSE_UP, onModelUp, false, 0, true); addEventListener(Event.ENTER_FRAME, dragModel, false, 0, true); } private function drawBoundSquare(_arg1:Graphics){ var _local2:Rectangle; _local2 = model.getBounds(model); _arg1.lineStyle(0, 0xFF, 1); _arg1.drawRect(_local2.x, _local2.y, _local2.width, _local2.height); } protected function onShapeChange(_arg1:Event):void{ draw(); } private function dragModel(_arg1:Event){ model.x = (model.parent.mouseX - mousePoint.x); model.y = (model.parent.mouseY - mousePoint.y); } private function onModelUp(_arg1:MouseEvent){ stage.removeEventListener(MouseEvent.MOUSE_UP, onModelUp); removeEventListener(Event.ENTER_FRAME, dragModel); draw(); } } }//package levelEditor
Section 116
//ObjectTypes (levelEditor.ObjectTypes) package levelEditor { public class ObjectTypes { public static var PLAYER:String = "0"; public static var EXIT = "4"; public static var INK = "3"; public static var JOINT = "5"; public static var PAR_TIME = "pt"; public static var STATIC_RECTANGLE:String = "1"; public static var DYNAMIC_RECTANGLE:String = "2"; public static var DENISTY = "d"; public static var RESTITUTION = "b"; public static var LEVEL_NAME = "ln"; public static var FRICTION = "f"; } }//package levelEditor
Section 117
//OptionsPanel (levelEditor.OptionsPanel) package levelEditor { import flash.display.*; import flash.events.*; import flash.geom.*; import flash.text.*; public class OptionsPanel extends MovieClip { public var resize_mc:MovieClip; var panel:Sprite; public var title_txt:TextField; var cx:Number;// = 0 var cy:Number;// = 0 public var w:Number; public var h:Number; var current:MatrixObject; public var bg2_mc:MovieClip; var con:Control; var update:Boolean;// = true public var bg_mc:MovieClip; public function OptionsPanel(){ cx = 0; cy = 0; update = true; super(); w = width; h = (height - 20); panel = new Sprite(); addChild(panel); panel.y = 20; bg_mc.addEventListener(MouseEvent.MOUSE_DOWN, onBGDown, false, 0, true); resize_mc.addEventListener(MouseEvent.MOUSE_DOWN, onResizeDown, false, 0, true); panel.mask = bg2_mc; } public function select(_arg1:MatrixObject){ if (((!((current == null))) && (!((_arg1 == current))))){ current.removeEventListener(ModelEvent.MATRIX_CHANGE, onChange); }; if (_arg1 != current){ title_txt.text = "options"; current = _arg1; if (_arg1 == null){ panel.visible = false; } else { panel.visible = true; _arg1.addEventListener(ModelEvent.MATRIX_CHANGE, onChange, false, 0, true); if ((_arg1 is StaticRectMatrixObject)){ title_txt.text = "static box"; } else { if ((_arg1 is DynamicRectMatrixObject)){ title_txt.text = "moveable box"; } else { if ((_arg1 is PlayerMatrixObject)){ title_txt.text = "player"; } else { if ((_arg1 is JointMatrixObject)){ title_txt.text = "joint/motor"; } else { if ((_arg1 is ExitMatrixObject)){ title_txt.text = "exit"; } else { if ((_arg1 is InkMatrixObject)){ title_txt.text = "ink"; }; }; }; }; }; }; initPanel(); }; }; } protected function onBGDown(_arg1:MouseEvent){ stage.addEventListener(MouseEvent.MOUSE_UP, onBGUp, false, 0, true); startDrag(false); } protected function doResize(_arg1:MouseEvent){ bg_mc.scaleX = (resize_mc.x / 100); bg_mc.scaleY = (resize_mc.y / 100); bg2_mc.scaleX = (resize_mc.x / 100); bg2_mc.scaleY = (resize_mc.y / 100); w = resize_mc.x; h = (resize_mc.y - 20); if (current != null){ initPanel(); }; } public function dispose():void{ } protected function disposeControl(_arg1){ _arg1.removeEventListener(ControlEvent.CHANGE, onControl); _arg1.removeEventListener(MouseEvent.MOUSE_DOWN, zControl); } protected function onBGUp(_arg1:MouseEvent){ stage.removeEventListener(MouseEvent.MOUSE_UP, onBGUp); stopDrag(); } protected function updateValues(){ var _local1:*; var _local2:Control; update = false; if (panel.numChildren > 0){ _local1 = 0; while (_local1 < panel.numChildren) { _local2 = (panel.getChildAt(_local1) as Control); current.setProp(_local2.path, _local2.value); _local1++; }; }; update = true; } protected function addControl(_arg1){ _arg1.addEventListener(ControlEvent.CHANGE, onControl, false, 0, true); _arg1.addEventListener(MouseEvent.MOUSE_DOWN, zControl, false, 0, true); } protected function zControl(_arg1:MouseEvent){ var _local2:*; _local2 = (_arg1.currentTarget as Control); if (_local2 != con){ if (con != null){ con.blur(); }; panel.swapChildren(panel.getChildAt((panel.numChildren - 1)), _local2); con = _local2; }; } protected function onChange(_arg1:Event){ updateFields(); } protected function onResizeUp(_arg1:MouseEvent){ stage.removeEventListener(MouseEvent.MOUSE_MOVE, doResize); stage.removeEventListener(MouseEvent.MOUSE_UP, onResizeUp); resize_mc.stopDrag(); } protected function onResizeDown(_arg1:MouseEvent){ var _local2:Rectangle; stage.addEventListener(MouseEvent.MOUSE_MOVE, doResize, false, 0, true); stage.addEventListener(MouseEvent.MOUSE_UP, onResizeUp, false, 0, true); _local2 = new Rectangle(50, 20, 500, 500); resize_mc.startDrag(false, _local2); } protected function onControl(_arg1:ControlEvent){ updateValues(); } protected function initPanel(){ var _local1:*; var _local2:*; var _local3:*; cx = 0; cy = 0; while (panel.numChildren > 0) { _local2 = panel.getChildAt(0); disposeControl(_local2); panel.removeChild(_local2); }; _local1 = 0; while (_local1 < current.editFields.length) { _local3 = current.editFields[_local1]; if (_local3.type == "boolean"){ _local2 = new DropDownControl(); _local2.addRow("true", true); _local2.addRow("false", false); } else { _local2 = new NameValueControl(); }; _local2.prop = _local3; if (_local2.width > (w - cx)){ cx = 0; cy = (cy + 24); }; _local2.x = cx; _local2.y = cy; cx = (cx + (_local2.width + 2)); panel.addChild(_local2); addControl(_local2); _local1++; }; updateFields(); } protected function updateFields(){ var _local1:*; var _local2:Control; if (update){ if (panel.numChildren > 0){ _local1 = 0; while (_local1 < panel.numChildren) { _local2 = (panel.getChildAt(_local1) as Control); _local2.value = current.getProp(_local2.path); _local1++; }; }; }; } } }//package levelEditor
Section 118
//OutterController (levelEditor.OutterController) package levelEditor { import flash.display.*; import flash.events.*; import flash.geom.*; public class OutterController extends Sprite { private var boundPoints:Array; public var model:MatrixShape; private var startAng:Number; private var origBounds:Rectangle; private var lastM:Matrix; private var center:Point; private var rotateSprites:Array; private var dragX:Boolean;// = true private var centerSprite:Sprite; private var pointSprites:Array; private var curScaleY:Number; private var curScaleX:Number; private var dragY:Boolean;// = true private var pointContainer:Sprite; private var curRotation:Number; private var mousePoint:Point; private var lineContainer:Sprite; public function OutterController(_arg1:MatrixShape=null){ var _local2:Sprite; var _local3:*; dragX = true; dragY = true; super(); pointContainer = new Sprite(); lineContainer = new Sprite(); pointSprites = new Array(); rotateSprites = new Array(); _local3 = 0; while (_local3 < 4) { _local2 = new Sprite(); rotateSprites.push(_local2); _local2.name = ("r" + (rotateSprites.length - 1)); _local2.alpha = 0; drawSquare(_local2.graphics, 30); _local2.addEventListener(MouseEvent.MOUSE_DOWN, onRotateClick, false, 0, true); pointContainer.addChild(_local2); _local3++; }; _local3 = 0; while (_local3 < 8) { _local2 = new Sprite(); pointSprites.push(_local2); _local2.name = ((pointSprites.length - 1) + ""); drawSquare(_local2.graphics, 10); _local2.addEventListener(MouseEvent.MOUSE_DOWN, onControlClick, false, 0, true); pointContainer.addChild(_local2); _local3++; }; centerSprite = new Sprite(); drawSquare(centerSprite.graphics, 10); pointSprites.push(centerSprite); centerSprite.name = ((pointSprites.length - 1) + ""); centerSprite.addEventListener(MouseEvent.MOUSE_DOWN, onControlClick, false, 0, true); pointContainer.addChild(centerSprite); addChild(lineContainer); addChild(pointContainer); if (_arg1 != null){ setModelView(_arg1); }; } private function doRotateDrag(_arg1:Event){ var _local2:Number; var _local3:Number; var _local4:*; var _local5:Matrix; var _local6:Point; _local2 = (center.x - model.parent.mouseX); _local3 = (center.y - model.parent.mouseY); _local4 = (Math.atan2(_local3, _local2) - startAng); curRotation = (model.rotRadian + _local4); _local5 = new Matrix(); _local5.scale(model.scaleX, model.scaleY); _local5.rotate(curRotation); _local6 = new Point(model.centerX, model.centerY); var _temp1 = _local5.transformPoint(_local6); _local6 = _local5.transformPoint(_local6); _temp1.x = (_local6.x - center.x); _local6.y = (_local6.y - center.y); _local5.translate(-(_local6.x), -(_local6.y)); lineContainer.transform.matrix = _local5; draw(_local5); } public function dispose():void{ if (model){ model.removeEventListener(ModelEvent.MATRIX_CHANGE, onShapeChange); }; model = null; pointSprites = null; centerSprite = null; pointContainer = null; lineContainer = null; } private function startCenterDrag(){ mousePoint = new Point(model.centerX, model.centerY); mousePoint = model.matrix.transformPoint(mousePoint); addEventListener(Event.ENTER_FRAME, doDragCenter, false, 0, true); stage.addEventListener(MouseEvent.MOUSE_UP, stopDragCenter, false, 0, true); } public function setModelView(_arg1){ var _local2:MatrixShape; _local2 = (_arg1 as MatrixShape); if (model){ model.removeEventListener(ModelEvent.MATRIX_CHANGE, onShapeChange); model.removeEventListener(MouseEvent.MOUSE_DOWN, onModelDown); }; model = _local2; if (_local2 != null){ model.addEventListener(ModelEvent.MATRIX_CHANGE, onShapeChange, false, 0, true); model.addEventListener(MouseEvent.MOUSE_DOWN, onModelDown, false, 0, true); curRotation = model.rotRadian; draw(); }; } private function startRotateDrag(_arg1, _arg2){ mousePoint = new Point(_arg1, _arg2); mousePoint = model.matrix.transformPoint(mousePoint); center = new Point(model.centerX, model.centerY); center = model.matrix.transformPoint(center); mousePoint.x = (center.x - mousePoint.x); mousePoint.y = (center.y - mousePoint.y); startAng = Math.atan2(mousePoint.y, mousePoint.x); addEventListener(Event.ENTER_FRAME, doRotateDrag, false, 0, true); stage.addEventListener(MouseEvent.MOUSE_UP, stopRotateDrag, false, 0, true); } public function draw(_arg1:Matrix=null){ var _local2:int; var _local3:Point; updateFromModel(); lineContainer.graphics.clear(); drawBoundSquare(lineContainer.graphics); if (_arg1 == null){ _arg1 = model.matrix; }; _local2 = 0; while (_local2 < 4) { _local3 = _arg1.transformPoint(boundPoints[_local2]); rotateSprites[_local2].x = _local3.x; rotateSprites[_local2].y = _local3.y; rotateSprites[_local2].rotation = ((curRotation * 180) / Math.PI); _local2++; }; _local2 = 0; while (_local2 < 8) { _local3 = _arg1.transformPoint(boundPoints[_local2]); pointSprites[_local2].x = _local3.x; pointSprites[_local2].y = _local3.y; pointSprites[_local2].rotation = ((curRotation * 180) / Math.PI); _local2++; }; _local3 = model.matrix.transformPoint(new Point(model.centerX, model.centerY)); centerSprite.x = _local3.x; centerSprite.y = _local3.y; lineContainer.transform.matrix = _arg1; } private function onModelDown(_arg1:MouseEvent){ mousePoint = new Point((model.parent.mouseX - model.x), (model.parent.mouseY - model.y)); stage.addEventListener(MouseEvent.MOUSE_UP, onModelUp, false, 0, true); addEventListener(Event.ENTER_FRAME, dragModel, false, 0, true); } private function drawBoundSquare(_arg1:Graphics){ var _local2:Rectangle; _local2 = model.getBounds(model); _arg1.lineStyle(0, 0xFF, 1); _arg1.drawRect(_local2.x, _local2.y, _local2.width, _local2.height); } private function onShapeChange(_arg1:ModelEvent){ draw(); } private function doDragPoint(_arg1:Event){ dragPoint(mousePoint.x, mousePoint.y); } private function stopDragCenter(_arg1:MouseEvent){ var _local2:Number; var _local3:Number; removeEventListener(Event.ENTER_FRAME, doDragCenter); stage.removeEventListener(MouseEvent.MOUSE_UP, stopDragCenter); _local2 = model.mouseX; _local3 = model.mouseY; model.centerX = _local2; model.centerY = _local3; draw(); } protected function drawSquare(_arg1:Graphics, _arg2:Number, _arg3:Number=0xFFFFFF, _arg4:Number=0.5, _arg5:Number=0, _arg6:Number=1){ _arg1.beginFill(_arg3, _arg4); _arg1.lineStyle(0, _arg5, _arg6); _arg1.drawRect((-(_arg2) / 2), (-(_arg2) / 2), _arg2, _arg2); _arg1.endFill(); } private function onRotateClick(_arg1:MouseEvent){ switch (_arg1.target.name){ case "r0": startRotateDrag(origBounds.x, origBounds.y); break; case "r1": startRotateDrag((origBounds.x + origBounds.width), origBounds.y); break; case "r2": startRotateDrag((origBounds.x + origBounds.width), (origBounds.y + origBounds.height)); break; case "r3": startRotateDrag(origBounds.x, (origBounds.y + origBounds.height)); break; }; } private function onControlClick(_arg1:MouseEvent){ switch (_arg1.target.name){ case "0": startPointDrag(origBounds.x, origBounds.y); break; case "1": startPointDrag((origBounds.x + origBounds.width), origBounds.y); break; case "2": startPointDrag((origBounds.x + origBounds.width), (origBounds.y + origBounds.height)); break; case "3": startPointDrag(origBounds.x, (origBounds.y + origBounds.height)); break; case "4": startPointDrag((origBounds.x + (origBounds.width / 2)), origBounds.y, false, true); break; case "5": startPointDrag((origBounds.x + origBounds.width), (origBounds.y + (origBounds.height / 2)), true, false); break; case "6": startPointDrag((origBounds.x + (origBounds.width / 2)), (origBounds.y + origBounds.height), false, true); break; case "7": startPointDrag(origBounds.x, (origBounds.y + (origBounds.height / 2)), true, false); break; case "8": startCenterDrag(); break; }; } private function startPointDrag(_arg1:Number, _arg2:Number, _arg3:Boolean=true, _arg4:Boolean=true){ dragX = _arg3; dragY = _arg4; addEventListener(Event.ENTER_FRAME, doDragPoint, false, 0, true); stage.addEventListener(MouseEvent.MOUSE_UP, stopDragPoint, false, 0, true); mousePoint = new Point(_arg1, _arg2); center = new Point(model.centerX, model.centerY); center = model.matrix.transformPoint(center); } private function doDragCenter(_arg1:Event){ centerSprite.x = centerSprite.parent.mouseX; centerSprite.y = centerSprite.parent.mouseY; } private function onModelUp(_arg1:MouseEvent){ stage.removeEventListener(MouseEvent.MOUSE_UP, onModelUp); removeEventListener(Event.ENTER_FRAME, dragModel); draw(); } private function dragModel(_arg1:Event){ model.x = (model.parent.mouseX - mousePoint.x); model.y = (model.parent.mouseY - mousePoint.y); } private function dragPoint(_arg1:Number, _arg2:Number){ var _local3:Number; var _local4:Number; var _local5:Matrix; var _local6:Point; var _local7:*; var _local8:*; var _local9:*; var _local10:*; _local3 = model.mouseX; _local4 = model.mouseY; if (dragX){ _local7 = ((_arg1 - model.centerX) / model.scaleX); _local8 = (_local3 - model.centerX); curScaleX = (_local8 / _local7); } else { curScaleX = model.scaleX; }; if (dragY){ _local9 = ((_arg2 - model.centerY) / model.scaleY); _local10 = (_local4 - model.centerY); curScaleY = (_local10 / _local9); } else { curScaleY = model.scaleY; }; _local5 = new Matrix(); _local5.scale(curScaleX, curScaleY); _local5.rotate(model.rotRadian); curRotation = model.rotRadian; _local6 = new Point(model.centerX, model.centerY); var _temp1 = _local5.transformPoint(_local6); _local6 = _local5.transformPoint(_local6); _temp1.x = (_local6.x - center.x); _local6.y = (_local6.y - center.y); _local5.translate(-(_local6.x), -(_local6.y)); lineContainer.transform.matrix = _local5; draw(_local5); } private function updateFromModel(){ var _local1:Rectangle; origBounds = model.getBounds(model); _local1 = origBounds; boundPoints = new Array(); boundPoints[0] = new Point(_local1.x, _local1.y); boundPoints[1] = new Point((_local1.x + _local1.width), _local1.y); boundPoints[2] = new Point((_local1.x + _local1.width), (_local1.y + _local1.height)); boundPoints[3] = new Point(_local1.x, (_local1.y + _local1.height)); boundPoints[4] = new Point((_local1.x + (_local1.width / 2)), _local1.y); boundPoints[5] = new Point((_local1.x + _local1.width), (_local1.y + (_local1.height / 2))); boundPoints[6] = new Point((_local1.x + (_local1.width / 2)), (_local1.y + _local1.height)); boundPoints[7] = new Point(_local1.x, (_local1.y + (_local1.height / 2))); } private function stopRotateDrag(_arg1:MouseEvent){ var _local2:Point; removeEventListener(Event.ENTER_FRAME, doRotateDrag); stage.removeEventListener(MouseEvent.MOUSE_UP, stopRotateDrag); model.rotRadian = curRotation; _local2 = new Point(model.centerX, model.centerY); _local2 = model.matrix.transformPoint(_local2); _local2.x = (_local2.x - center.x); _local2.y = (_local2.y - center.y); model.x = (model.x - _local2.x); model.y = (model.y - _local2.y); draw(); } private function stopDragPoint(_arg1:MouseEvent){ var _local2:Point; removeEventListener(Event.ENTER_FRAME, doDragPoint); stage.removeEventListener(MouseEvent.MOUSE_UP, stopDragPoint); model.scaleX = curScaleX; model.scaleY = curScaleY; _local2 = new Point(model.centerX, model.centerY); _local2 = model.matrix.transformPoint(_local2); _local2.x = (_local2.x - center.x); _local2.y = (_local2.y - center.y); model.x = (model.x - _local2.x); model.y = (model.y - _local2.y); draw(); } } }//package levelEditor
Section 119
//ParTimeTool (levelEditor.ParTimeTool) package levelEditor { import flash.text.*; public class ParTimeTool extends Tool { public function ParTimeTool(){ selectable = false; _button = new ParTimeButton(); } public function get parTime():int{ var _local1:TextField; _local1 = (_button.getChildByName("input_txt") as TextField); return (parseInt(_local1.text)); } public function set parTime(_arg1:int){ var _local2:TextField; _local2 = (_button.getChildByName("input_txt") as TextField); _local2.text = (_arg1 + ""); } } }//package levelEditor
Section 120
//PlayerMatrixObject (levelEditor.PlayerMatrixObject) package levelEditor { public class PlayerMatrixObject extends MatrixObject { public function PlayerMatrixObject(){ type = "player"; } } }//package levelEditor
Section 121
//SelectTool (levelEditor.SelectTool) package levelEditor { import flash.events.*; public class SelectTool extends Tool { public function SelectTool(){ _button = new TransformButton(); } override public function onUp(_arg1:MouseEvent){ editor.select((_arg1.target as MatrixObject)); } } }//package levelEditor
Section 122
//StaticRectMatrixObject (levelEditor.StaticRectMatrixObject) package levelEditor { public class StaticRectMatrixObject extends MatrixShape { public function StaticRectMatrixObject(){ type = "StaticRectangle"; props.isDynamic = false; } } }//package levelEditor
Section 123
//StaticRectTool (levelEditor.StaticRectTool) package levelEditor { import flash.display.*; import flash.events.*; import flash.geom.*; public class StaticRectTool extends Tool { var startPos:Point; public function StaticRectTool(){ _button = new StaticButton(); } override public function onDown(_arg1:MouseEvent){ startPos = new Point(editor.mouseX, editor.mouseY); editor.addEventListener(Event.ENTER_FRAME, onFrame, false, 0, true); } override public function onUp(_arg1:MouseEvent){ var _local2:Graphics; var _local3:StaticRectMatrixObject; var _local4:Point; _local2 = editor.preview.graphics; _local2.clear(); editor.removeEventListener(Event.ENTER_FRAME, onFrame); _local3 = new StaticRectMatrixObject(); _local4 = new Point((editor.mouseX - startPos.x), (editor.mouseY - startPos.y)); _local3.x = (startPos.x + (_local4.x / 2)); _local3.y = (startPos.y + (_local4.y / 2)); _local3.scaleX = (_local4.x / 100); _local3.scaleY = (_local4.y / 100); editor.create(_local3); } public function onFrame(_arg1:Event){ var _local2:Graphics; _local2 = editor.preview.graphics; _local2.clear(); _local2.lineStyle(1, 0xCCCCCC); _local2.beginFill(0x666666); _local2.drawRect(startPos.x, startPos.y, (editor.mouseX - startPos.x), (editor.mouseY - startPos.y)); _local2.endFill(); } override public function dispose():void{ super.dispose(); editor.removeEventListener(Event.ENTER_FRAME, onFrame); } } }//package levelEditor
Section 124
//Tool (levelEditor.Tool) package levelEditor { import flash.events.*; import ui.*; public class Tool { public var name:String; public var editor:LevelEditor; protected var _button:BasicButton; public var selectable:Boolean;// = true public function Tool(){ selectable = true; super(); } public function onDown(_arg1:MouseEvent){ } public function onUp(_arg1:MouseEvent){ } public function get button():BasicButton{ return (_button); } public function onSelect(_arg1:MouseEvent=null){ } public function dispose():void{ editor = null; } } }//package levelEditor
Section 125
//Eric11ColDetect (Levels.Eric11ColDetect) package Levels { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; import Box2D.Dynamics.*; import Box2D.Collision.*; import Box2D.Common.*; import Box2D.Dynamics.Contacts.*; import application.*; public class Eric11ColDetect extends ColDetect { public var bricks:Object; public function Eric11ColDetect(){ bricks = {}; } override public function Add(_arg1:b2ContactPoint):void{ var _local2:*; var _local3:*; var _local4:b2Body; var _local5:String; var _local6:String; var _local7:String; super.Add(_arg1); _local2 = _arg1.shape1.GetBody(); _local3 = _arg1.shape2.GetBody(); _local5 = _local2.GetUserData().name; _local6 = _local3.GetUserData().name; if ((((_local5 == "player")) || ((_local6 == "player")))){ if (_local5 == "player"){ _local7 = _local6; _local4 = _local3; } else { if (_local6 == "player"){ _local7 = _local5; _local4 = _local2; }; }; if ((_local4.m_userData is WhiteBrick)){ bricks[_local4.m_userData.name] = _local4; }; }; } override public function reset():void{ super.reset(); bricks = {}; } override public function deleteTag(_arg1:String){ delete bricks[_arg1]; super.deleteTag(_arg1); } } }//package Levels
Section 126
//EricColDetect (Levels.EricColDetect) package Levels { import application.*; public class EricColDetect extends ColDetect { } }//package Levels
Section 127
//EricLevel (Levels.EricLevel) package Levels { import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; import Box2D.Dynamics.Joints.*; import Box2D.Dynamics.*; import flash.display.*; import Box2D.Collision.*; import flash.events.*; import ui.*; import utils.*; import flash.geom.*; import application.*; import b2MovieClips.*; import sprites.*; import flash.ui.*; public class EricLevel extends GameLevel implements iPhysicsContainer { public var clock:Clock; public var pics:Object; public var jump:Number;// = -5.5 public var levelName:String; public var totalTime:Number;// = 0 public var mouseD:Point; public var startPoint:b2Vec2; public var isComplete:Boolean;// = false public var killed:Boolean;// = false public var hint:int; public var inkPot:InkPot; public var bubble:SpeechBubble; public var score:Number;// = 0 protected var sketching:Boolean;// = false public var hints:Array; public var inkNumber:int;// = 0 public var speaking:Boolean;// = false public var exit:Boolean;// = false public var picScore:Number;// = 0 public var tor:Number;// = 3 public var pic; public var mode:String; public var _parTime:Number;// = 3600 public var airForce:Number;// = 0.15 public var upDown:Boolean;// = false public var costume:MovieClip; public var demo:MovieClip; public var ov:b2Vec2; public var ant_gravity:b2Vec2; public function EricLevel(_arg1:KeyTracker){ tor = 3; jump = -5.5; airForce = 0.15; upDown = false; isComplete = false; exit = false; speaking = false; _parTime = (120 * 30); totalTime = 0; score = 0; picScore = 0; ov = new b2Vec2(0, 0); killed = false; inkNumber = 0; sketching = false; super(_arg1); hints = []; mouseD = new Point(); inkPot = new InkPot(); bubble = new SpeechBubble(); clock = new Clock(); bubble.cacheAsBitmap = true; bubble.addEventListener(Event.COMPLETE, onBubbleComplete, false, 0, true); colHandle.addEventListener(LevelEvent.PLAYER_EXIT, onExit, false, 0, true); colHandle.addEventListener(LevelEvent.PLAYER_HIT_SENSOR, onSensor, false, 0, true); } public function doSketch(_arg1:Event){ var _local2:Point; var _local3:Number; var _local4:Point; var _local5:Array; var _local6:Number; var _local7:*; if (mode == "draw"){ _local2 = new Point((mouseX - mouseD.x), (mouseY - mouseD.y)); _local3 = _local2.length; if ((((_local3 > 5)) && ((inkPot.percent > (_local3 / 10))))){ _local4 = new Point(((mouseD.x + mouseX) / 2), ((mouseD.y + mouseY) / 2)); _local5 = GetBodiesAtPoint(_local4.x, _local4.y, true); if (!checkBods(_local5)){ onMouseU(); return; }; inkPot.changeBy((-(_local3) / 10)); _local6 = Math.atan2(_local2.y, _local2.x); addBox(((mouseD.x + mouseX) / 2), ((mouseD.y + mouseY) / 2), _local3, 5, _local6, null, ("ink" + inkNumber)); inkNumber++; mouseD.x = mouseX; mouseD.y = mouseY; }; if (inkPot.percent == 0){ onMouseU(); }; } else { _local5 = GetBodiesAtPoint(mouseX, mouseY, true); while (_local5.length > 0) { _local7 = _local5.pop(); if (_local7.m_userData.name.indexOf("ink") != -1){ removeBody(_local7); }; }; }; } public function set parTime(_arg1:Number){ _parTime = (_arg1 * 30); } override public function start():void{ var _local1:*; mode = "draw"; inkNumber = 0; totalTime = _parTime; ant_gravity = new b2Vec2(0, (-10 * playerBody.GetMass())); hint = 0; pics = {}; pic = null; exit = false; isComplete = false; speaking = false; parent.addChildAt(inkPot, 1); addChild(bubble); parent.addChildAt(clock, 2); clock.x = 310; inkPot.x = 40; inkPot.percent = 0; for (_local1 in tags) { if (tags[_local1].m_userData.props.isFrame){ pics[_local1] = tags[_local1].m_userData; }; }; startPoint = playerBody.GetPosition().Copy(); killed = false; score = 0; picScore = 0; } public function collectInk(){ var _local1:*; var _local2:b2Body; if (inkPot.percent < 100){ for (_local1 in colHandle.collectables) { _local2 = colHandle.collectables[_local1]; inkPot.changeBy(_local2.m_userData.props.score); removeBody(_local2); }; }; } public function onDemo(_arg1:Event){ demo.removeEventListener(Event.COMPLETE, onDemo); stopHint(); } public function onSensor(_arg1:LevelEvent){ var _local2:Number; if (_arg1.content.m_userData.props.speech != null){ if (_arg1.content.m_userData.props.score > 0){ say(_arg1.content.m_userData.props.speech); _arg1.content.m_userData.props.score--; }; }; if (_arg1.content.m_userData.props.hintLevel != null){ _local2 = _arg1.content.m_userData.props.hintLevel; if ((((_local2 > 0)) && ((hint < _local2)))){ hint = _local2; }; if (_arg1.content.m_userData.props.showHint){ showHint(); }; }; if (_arg1.content.m_userData.props.kills){ killed = true; }; } protected function checkBods(_arg1:Array):Boolean{ var _local2:Boolean; var _local3:*; _local2 = true; _local3 = 0; while (_local3 < _arg1.length) { if (_arg1[_local3].m_userData.props.isFrame){ _local2 = false; }; if (_arg1[_local3].m_userData == player){ _local2 = false; }; if (_arg1[_local3].m_userData.props.isExit){ _local2 = false; }; if ((((_arg1[_local3].m_userData is PhysBoxFill)) && (_arg1[_local3].m_userData.visible))){ _local2 = false; }; if (_arg1[_local3].m_userData.props.noDraw){ _local2 = false; }; _local3++; }; return (_local2); } override public function Update(){ var _local1:Boolean; var _local2:*; var _local3:*; var _local4:MovieClip; var _local5:Number; var _local6:String; var _local7:*; if (killed){ killEric(); }; _local1 = false; playerBody.WakeUp(); if (playerBody.m_contactList == null){ if (pic != null){ exitPic(); }; colHandle.reset(); } else { if (pic == null){ _local2 = playerBody.m_contactList; while (_local2) { if (((((_local2.other.m_userData.props.isFrame) && (!(_local2.other.m_userData.props.complete)))) && (!(_local2.other.m_userData.props.deactivated)))){ enterPic(_local2.other.m_userData); break; }; _local2 = _local2.next; }; } else { _local3 = false; _local2 = playerBody.m_contactList; while (_local2) { if (_local2.other.m_userData.props.isFrame){ _local3 = true; break; }; _local2 = _local2.next; }; if (!_local3){ exitPic(); }; }; }; if (pic != null){ playerBody.ApplyForce(ant_gravity, playerBody.GetPosition()); if (keyboard.isDown(Keyboard.UP)){ playerBody.ApplyImpulse(new b2Vec2(0, (-1 * airForce)), playerBody.GetPosition()); }; if (keyboard.isDown(Keyboard.DOWN)){ playerBody.ApplyImpulse(new b2Vec2(0, airForce), playerBody.GetPosition()); }; if (keyboard.isDown(Keyboard.LEFT)){ playerBody.ApplyImpulse(new b2Vec2((-1 * airForce), 0), playerBody.GetPosition()); }; if (keyboard.isDown(Keyboard.RIGHT)){ playerBody.ApplyImpulse(new b2Vec2(airForce, 0), playerBody.GetPosition()); }; _local4 = (getChildByName(pic.props.picture) as MovieClip); _local5 = Math.max(0, (Math.round((((pic.props.hintTime / 30) - (pic.props.time / 30)) * 10)) / 10)); _local6 = (_local5 + ""); if (_local6.indexOf(".") == -1){ _local6 = (_local6 + ".0"); }; if (_local4 != null){ _local4["time_txt"].text = _local6; }; if (!pic.props.complete){ pic.props.time++; if (pic.props.time > pic.props.hintTime){ showPicHint(); }; _local7 = ((((pic.x + pic.props.targetX) - player.x) * ((pic.x + pic.props.targetX) - player.x)) + (((pic.y + pic.props.targetY) - player.y) * ((pic.y + pic.props.targetY) - player.y))); if (_local7 < 25){ pic.props.complete = true; if (_local4 != null){ _local4.play(); }; }; } else { if (((!((_local4 == null))) && ((_local4.currentFrame == _local4.totalFrames)))){ _local4.stop(); completePic(); exitPic(); } else { if (_local4 == null){ completePic(); exitPic(); }; }; }; } else { if (((keyboard.isDown(Keyboard.UP)) && (!(upDown)))){ upDown = true; if ((((colHandle.num > 0)) && (!((playerBody.m_contactList == null))))){ playerBody.ApplyImpulse(new b2Vec2(0, jump), playerBody.GetPosition()); }; } else { if (!keyboard.isDown(Keyboard.UP)){ upDown = false; }; }; if (keyboard.isDown(Keyboard.LEFT)){ if (colHandle.total == 0){ playerBody.ApplyImpulse(new b2Vec2((-1 * airForce), 0), playerBody.GetPosition()); } else { playerBody.ApplyImpulse(new b2Vec2((-0.1 * airForce), 0), playerBody.GetPosition()); playerBody.ApplyTorque(-(tor)); }; }; if (keyboard.isDown(Keyboard.RIGHT)){ if (colHandle.total == 0){ playerBody.ApplyImpulse(new b2Vec2(airForce, 0), playerBody.GetPosition()); } else { playerBody.ApplyImpulse(new b2Vec2((0.1 * airForce), 0), playerBody.GetPosition()); playerBody.ApplyTorque(tor); }; }; }; collectInk(); super.Update(); if (speaking){ bubble.setPos(player.x, player.y); }; if (costume != null){ costume.x = player.x; costume.y = player.y; if (playerBody.m_linearVelocity.x > 0){ costume.scaleX = 1; } else { costume.scaleX = -1; }; }; if (((exit) && (!(isComplete)))){ trace("level complete"); calcScore(); isComplete = true; dispatchEvent(new LevelEvent(LevelEvent.LEVEL_COMPLETE)); }; totalTime--; clock.time = (totalTime / 30); } override public function onMouseD(){ var _local1:Array; var _local2:*; var _local3:*; mouseD.x = mouseX; mouseD.y = mouseY; _local1 = GetBodiesAtPoint(mouseX, mouseY, true); if (mode == "draw"){ if ((((inkPot.percent > 0)) && (checkBods(_local1)))){ sketching = true; inkPot.changeBy(-1); _local2 = addCircle(mouseX, mouseY, 5, null, ("ink" + inkNumber)); inkNumber++; removeEventListener(Event.ENTER_FRAME, doSketch); addEventListener(Event.ENTER_FRAME, doSketch, false, 0, true); }; } else { if (mode == "erase"){ _local1 = GetBodiesAtPoint(mouseX, mouseY, true); while (_local1.length > 0) { _local3 = _local1.pop(); if (_local3.m_userData.name.indexOf("ink") != -1){ removeBody(_local3); }; }; removeEventListener(Event.ENTER_FRAME, doSketch); addEventListener(Event.ENTER_FRAME, doSketch, false, 0, true); }; }; } override public function onMouseU(){ var _local1:Point; var _local2:Number; var _local3:Number; if ((((inkPot.percent > 0)) && (sketching))){ _local1 = new Point((mouseX - mouseD.x), (mouseY - mouseD.y)); _local2 = _local1.length; _local3 = Math.atan2(_local1.y, _local1.x); if ((((_local2 > 5)) && ((_local2 < 10)))){ addBox(((mouseD.x + mouseX) / 2), ((mouseD.y + mouseY) / 2), _local2, 10, _local3, null, ("ink" + inkNumber)); inkNumber++; addCircle(mouseD.x, mouseD.y, 5, null, ("ink" + inkNumber)); inkNumber++; } else { addCircle(mouseD.x, mouseD.y, 5, null, ("ink" + inkNumber)); inkNumber++; }; }; removeEventListener(Event.ENTER_FRAME, doSketch); sketching = false; } public function get parTime():Number{ return ((_parTime / 30)); } public function killEric(){ totalTime = (totalTime - 300); trace(((startPoint.x + ":") + startPoint.y)); playerBody.SetXForm(startPoint, 0); playerBody.SetLinearVelocity(ov); playerBody.SetAngularVelocity(0); killed = false; } public function showHint(){ if (hint == 0){ return; }; if (demo == null){ if (hints.length >= hint){ if (hints[(hint - 1)][0] != null){ demo = new (hints[(hint - 1)][0]); demo.addEventListener(Event.COMPLETE, onDemo, false, 0, true); addChildAt(demo, (getChildIndex(bubble) - 1)); }; if (hints[(hint - 1)][1] != null){ say(hints[(hint - 1)][1]); }; }; }; } public function setCostume(_arg1:String){ if (costume != null){ removeChild(costume); }; costume = null; if (_arg1 == "SuperEric"){ costume = new SuperEricCostume(); addChildAt(costume, (getChildIndex(player) + 1)); } else { if (_arg1 == "AngelEric"){ costume = new AngelEricCostume(); addChildAt(costume, (getChildIndex(player) + 1)); } else { if (_arg1 == "SantaEric"){ costume = new SantaEricCostume(); addChildAt(costume, (getChildIndex(player) + 1)); } else { if (_arg1 == "HeadPhonesEric"){ costume = new HeadPhonesEricCostume(); addChildAt(costume, (getChildIndex(player) + 1)); } else { if (_arg1 == "PartyEric"){ costume = new PartyEricCostume(); addChildAt(costume, (getChildIndex(player) + 1)); }; }; }; }; }; } protected function calcScore(){ var _local1:*; picScore = 0; score = (Math.round(((totalTime / 30) * 10)) * 10); if (score < 0){ score = 0; }; trace(("score:" + score)); for (_local1 in pics) { picScore = (picScore + pics[_local1].props.score); delete pics[_local1]; }; if (picScore < 0){ picScore = 0; }; trace(("pic score:" + picScore)); } override public function reset():void{ if (costume != null){ removeChild(costume); }; costume = null; super.reset(); } public function showPicHint(){ var _local1:*; var _local2:*; if (pic != null){ if (pic.props.hintShown){ return; }; pic.props.hintShown = true; trace("showhint2"); _local1 = new PlayerClip(); _local1.scaleX = pic.props.scaleEric; _local1.scaleY = pic.props.scaleEric; _local1.x = (pic.props.targetX + pic.x); _local1.y = (pic.props.targetY + pic.y); pic.props.picHint = _local1; _local2 = getChildIndex(player); addChildAt(_local1, (_local2 - 1)); }; } public function completePic(){ pic.props.complete = true; dispatchEvent(new LevelEvent(LevelEvent.PICTURE_COMPLETE, pic.name)); if (pic.props.picHint != null){ removeChild(pic.props.picHint); pic.props.picHint = null; }; } public function enterPic(_arg1){ pic = _arg1; player.mask = _arg1; player.scaleX = _arg1.props.scaleEric; player.scaleY = _arg1.props.scaleEric; playerBody.m_linearDamping = 5; if (costume != null){ costume.visible = false; }; } override public function destruct():void{ var _local1:*; parent.removeChild(inkPot); removeChild(bubble); parent.removeChild(clock); for (_local1 in pics) { delete pics[_local1]; }; removeEventListener(Event.ENTER_FRAME, doSketch); inkPot = null; bubble.removeEventListener(Event.COMPLETE, onBubbleComplete); say("_CLEAR"); bubble = null; clock = null; if (costume != null){ removeChild(costume); }; costume = null; colHandle.removeEventListener(LevelEvent.PLAYER_EXIT, onExit); colHandle.removeEventListener(LevelEvent.PLAYER_HIT_SENSOR, onSensor); stopHint(); super.destruct(); } public function onExit(_arg1:Event){ var _local2:*; var _local3:*; trace("on exit"); _local2 = 0; for (_local3 in pics) { if (!pics[_local3].props.complete){ _local2++; }; }; if (_local2 == 0){ exit = true; colHandle.removeEventListener(LevelEvent.PLAYER_EXIT, onExit); } else { if (_local2 == 1){ say("I still have a picture to finish"); } else { say((("I still have " + _local2) + " pictures to finish")); }; }; } public function stopHint(){ if (demo != null){ demo.removeEventListener(Event.COMPLETE, onDemo); removeChild(demo); }; demo = null; } public function onBubbleComplete(_arg1:Event){ speaking = false; } public function exitPic(){ if (costume != null){ costume.visible = true; }; player.mask = null; player.scaleX = 1; player.scaleY = 1; pic.props.score = ((100 * Math.round((((pic.props.hintTime / 30) - (pic.props.time / 30)) * 10))) / 10); pic = null; playerBody.m_linearDamping = linearDamp; } public function say(_arg1:String){ bubble.text = _arg1; speaking = true; if (_arg1 != "_CLEAR"){ bubble.setPos(player.x, player.y); if (numChildren > 1){ swapChildren(getChildAt((numChildren - 1)), bubble); }; }; } } }//package Levels
Section 128
//Level0 (Levels.Level0) package Levels { import utils.*; import levelEditor.*; import application.*; public class Level0 extends EricLevel { var levelStr:String;// = "" var factory:LevelFactory; public function Level0(_arg1:KeyTracker){ levelStr = ""; factory = new LevelFactory(); colHandle = new EricColDetect(); super(_arg1); m_world.SetContactListener(colHandle); } public function decode(_arg1:String){ levelStr = _arg1; } override public function construct():void{ factory.constructFromString(levelStr, this); dispatchEvent(new LevelEvent(LevelEvent.LEVEL_READY)); } } }//package Levels
Section 129
//Level1 (Levels.Level1) package Levels { import flash.events.*; import utils.*; import flash.utils.*; import application.*; public class Level1 extends EricLevel { var layout; var timer:Timer; var gotInk:Boolean;// = false public function Level1(_arg1:KeyTracker){ gotInk = false; colHandle = new EricColDetect(); super(_arg1); hints = [[null, "let's start by collecting the ink"], [Demo, "use the MOUSE to DRAW<br>a ramp, so I can get up.<br> <br>User the ERASER if you make a mistake!"], [null, "I need to jump into the picture!"]]; m_world.SetContactListener(colHandle); addEventListener(LevelEvent.PICTURE_COMPLETE, onPic); } override public function onSensor(_arg1:LevelEvent){ super.onSensor(_arg1); if ((((_arg1.content.m_userData.name == "a4")) && (!(gotInk)))){ gotInk = true; tags["a3"].m_userData.props.score = 0; }; } function onTimer(_arg1:Event){ timer.removeEventListener("timer", onTimer); if (parent != null){ say("Well Done! Now... to the EXIT"); }; } public function onPic(_arg1:Event){ say("_CLEAR"); timer = new Timer(3500); timer.start(); timer.addEventListener("timer", onTimer, false, 0, true); } override public function construct():void{ layout = new Lv1Layout(); layout.copyToContainer(this); layout.addEventListener(Event.COMPLETE, onLayout, false, 0, true); gotInk = false; } public function onLayout(_arg1:Event){ layout.removeEventListener(Event.COMPLETE, onLayout); layout = null; dispatchEvent(new LevelEvent(LevelEvent.LEVEL_READY)); } } }//package Levels
Section 130
//Level10 (Levels.Level10) package Levels { import flash.events.*; import utils.*; import application.*; public class Level10 extends EricLevel { var layout; public function Level10(_arg1:KeyTracker){ colHandle = new EricColDetect(); super(_arg1); hints = [[null, "Collect the ink and draw a line for me to land on"], [Demo10a, "Draw lines over the spikes so I can reach the top"], [Demo10b, "Push the larger box down the chute."], [Demo10c, "Draw a line to support the ramp,<br>then push the smaller box down to the exit"], [null, "Draw a step so<br>I can reach the exit"]]; m_world.SetContactListener(colHandle); _parTime = (180 * 30); } override public function construct():void{ layout = new Lv10Layout(); layout.copyToContainer(this); layout.addEventListener(Event.COMPLETE, onLayout, false, 0, true); } public function onLayout(_arg1:Event){ layout.removeEventListener(Event.COMPLETE, onLayout); layout = null; dispatchEvent(new LevelEvent(LevelEvent.LEVEL_READY)); } } }//package Levels
Section 131
//Level11 (Levels.Level11) package Levels { import Box2D.Common.Math.*; import Box2D.Dynamics.*; import flash.events.*; import ui.*; import utils.*; import application.*; import flash.ui.*; public class Level11 extends EricLevel { public var score_mc:Lvl11Score; var multCounter:int;// = 0 var brickScore:int;// = 0 var ant_gravity2:b2Vec2; var layout; var mult:int;// = 0 var boost:Number;// = 1.5 public function Level11(_arg1:KeyTracker){ boost = 1.5; brickScore = 0; mult = 0; multCounter = 0; colHandle = new Eric11ColDetect(); super(_arg1); m_world.SetContactListener(colHandle); hints = [[null, "Jump up using the BOOST pads and break the bricks.<br>Score combos by bouncing off one brick and onto another."]]; _parTime = 0; airForce = 0.2; angularDamp = 0.8; } override public function start():void{ super.start(); score_mc = new Lvl11Score(); parent.addChild(score_mc); score_mc.text_txt.text = "123456"; score_mc.y = (400 - score_mc.height); brickScore = 0; } override public function onSensor(_arg1:LevelEvent){ super.onSensor(_arg1); if ((((((((_arg1.content.m_userData.name == "s11a")) || ((_arg1.content.m_userData.name == "s11b")))) || ((_arg1.content.m_userData.name == "s11d")))) || ((_arg1.content.m_userData.name == "s11e")))){ if (keyboard.isDown(Keyboard.UP)){ playerBody.ApplyForce(new b2Vec2(0, ((jump * 8) * boost)), playerBody.GetPosition()); }; mult = 0; }; } override public function Update(){ if (multCounter > 0){ multCounter--; }; if (multCounter == 0){ mult = 0; }; if (player.y < 250){ y = (-(player.y) + 250); } else { y = 0; }; smashBricks(); score_mc.text_txt.text = ("score:" + brickScore); super.Update(); } override protected function calcScore(){ score = brickScore; picScore = 0; } override public function reset():void{ parent.removeChild(score_mc); score_mc = null; super.reset(); } public function smashBricks(){ var _local1:*; var _local2:b2Body; var _local3:FloatingText; for (_local1 in colHandle["bricks"]) { mult++; multCounter = 50; brickScore = (brickScore + (100 * mult)); if (mult > 1){ _local3 = new FloatingText(); _local3.text_txt.text = (mult + "X"); addChild(_local3); _local3.x = player.x; _local3.y = player.y; }; _local2 = colHandle["bricks"][_local1]; removeBody(_local2); }; } override public function destruct():void{ parent.removeChild(score_mc); score_mc = null; super.destruct(); } override public function construct():void{ layout = new Lv11Layout(); layout.copyToContainer(this); layout.addEventListener(Event.COMPLETE, onLayout, false, 0, true); } public function onLayout(_arg1:Event){ layout.removeEventListener(Event.COMPLETE, onLayout); layout = null; ant_gravity2 = new b2Vec2(0, (-5 * playerBody.GetMass())); dispatchEvent(new LevelEvent(LevelEvent.LEVEL_READY)); } } }//package Levels
Section 132
//Level2 (Levels.Level2) package Levels { import flash.events.*; import utils.*; import application.*; public class Level2 extends EricLevel { var layout; public function Level2(_arg1:KeyTracker){ colHandle = new EricColDetect(); super(_arg1); m_world.SetContactListener(colHandle); _parTime = (30 * 150); hints = [[Demo2a, "Draw a ramp so I can get up."], [Demo2b, "Draw a ramp, so I can reach the lever"]]; } override public function construct():void{ layout = new Lv2Layout(); layout.copyToContainer(this); layout.addEventListener(Event.COMPLETE, onLayout, false, 0, true); } public function onLayout(_arg1:Event){ layout.removeEventListener(Event.COMPLETE, onLayout); layout = null; dispatchEvent(new LevelEvent(LevelEvent.LEVEL_READY)); } } }//package Levels
Section 133
//Level3 (Levels.Level3) package Levels { import flash.events.*; import utils.*; import application.*; public class Level3 extends EricLevel { var layout; var count;// = 0 var lastBox; var delay;// = 200 var num;// = 0 public function Level3(_arg1:KeyTracker){ delay = 200; count = 0; num = 0; colHandle = new EricColDetect(); super(_arg1); m_world.SetContactListener(colHandle); hints = [[Demo3, "collect the ink"], [Demo3a, "draw a line so the boxes<br>will fall onto the seesaw"]]; } override public function start():void{ lastBox = null; super.start(); count = 0; num = 0; } override public function Update(){ count++; if (count >= delay){ count = 0; makeBox(); }; super.Update(); } public function makeBox(){ var _local1:Number; var _local2:Number; var _local3:*; if (lastBox != null){ removeBody(lastBox); }; _local1 = 50; _local2 = 50; _local3 = copyProps(sprops); _local3.isDynamic = true; _local3.density = 3.1; _local3.friction = 0.1; lastBox = addBox(610, 30, _local1, _local2, 0, _local3, ("box" + num)); num++; } override public function destruct():void{ lastBox = null; super.destruct(); } override public function construct():void{ layout = new Lv3Layout(); layout.copyToContainer(this); layout.addEventListener(Event.COMPLETE, onLayout, false, 0, true); } public function onLayout(_arg1:Event){ layout.removeEventListener(Event.COMPLETE, onLayout); layout = null; dispatchEvent(new LevelEvent(LevelEvent.LEVEL_READY)); } } }//package Levels
Section 134
//Level4 (Levels.Level4) package Levels { import flash.events.*; import utils.*; import application.*; public class Level4 extends EricLevel { var layout; public function Level4(_arg1:KeyTracker){ colHandle = new EricColDetect(); super(_arg1); m_world.SetContactListener(colHandle); hints = [[null, "use the rotating platform to<br>get to the ink"], [Demo4, "draw some steps so that<br>I can get to the top"], [Demo4a, "use the ink to draw a ramp"]]; } override public function construct():void{ layout = new Lv4Layout(); layout.copyToContainer(this); layout.addEventListener(Event.COMPLETE, onLayout, false, 0, true); } public function onLayout(_arg1:Event){ layout.removeEventListener(Event.COMPLETE, onLayout); layout = null; dispatchEvent(new LevelEvent(LevelEvent.LEVEL_READY)); } } }//package Levels
Section 135
//Level5 (Levels.Level5) package Levels { import flash.events.*; import utils.*; import application.*; public class Level5 extends EricLevel { var layout; public function Level5(_arg1:KeyTracker){ colHandle = new EricColDetect(); super(_arg1); m_world.SetContactListener(colHandle); hints = [[Demo5, "push the boxes"], [Demo5a, "use the smaller box to jump up"], [Demo5b, "jump up and push the larger box<br>to the bottom right corner"], [Demo5c, "use the box to jump up<br>and push the lever"], [Demo5d, "Draw a step so<br>I can get up"]]; } override public function construct():void{ layout = new Lv5Layout(); layout.copyToContainer(this); layout.addEventListener(Event.COMPLETE, onLayout, false, 0, true); } public function onLayout(_arg1:Event){ layout.removeEventListener(Event.COMPLETE, onLayout); layout = null; dispatchEvent(new LevelEvent(LevelEvent.LEVEL_READY)); } } }//package Levels
Section 136
//Level6 (Levels.Level6) package Levels { import flash.events.*; import utils.*; import application.*; public class Level6 extends EricLevel { var layout; public function Level6(_arg1:KeyTracker){ colHandle = new EricColDetect(); super(_arg1); m_world.SetContactListener(colHandle); hints = [[null, "Jump over to the ink"], [Demo6, "Draw a floor. <br> <br>Draw a ramp to stop<br>the spinning platform."], [Demo6b, "Jump onto the spinning platform<br>and get a boost up."], [Demo6c, "Draw a bridge over the spikes."]]; } override public function construct():void{ layout = new Lv6Layout(); layout.copyToContainer(this); layout.addEventListener(Event.COMPLETE, onLayout, false, 0, true); } public function onLayout(_arg1:Event){ layout.removeEventListener(Event.COMPLETE, onLayout); layout = null; dispatchEvent(new LevelEvent(LevelEvent.LEVEL_READY)); } } }//package Levels
Section 137
//Level7 (Levels.Level7) package Levels { import flash.events.*; import utils.*; import application.*; public class Level7 extends EricLevel { var layout; public function Level7(_arg1:KeyTracker){ colHandle = new EricColDetect(); super(_arg1); m_world.SetContactListener(colHandle); hints = [[null, "Draw lines around the spikes<br>so I can make it to the exit."]]; } override public function construct():void{ layout = new Lv7Layout(); layout.copyToContainer(this); layout.addEventListener(Event.COMPLETE, onLayout, false, 0, true); } public function onLayout(_arg1:Event){ layout.removeEventListener(Event.COMPLETE, onLayout); layout = null; dispatchEvent(new LevelEvent(LevelEvent.LEVEL_READY)); } } }//package Levels
Section 138
//Level8 (Levels.Level8) package Levels { import Box2D.Common.Math.*; import flash.display.*; import flash.events.*; import utils.*; import application.*; import flash.ui.*; public class Level8 extends EricLevel { var picDone:Boolean;// = false var goingUp:Boolean;// = false var money:MoneyEric; var boostCounter:int;// = 0 var layout; var sparkle:SparkleEricCostume; var boost:int;// = 1 var best:Number;// = 0 public function Level8(_arg1:KeyTracker){ goingUp = false; best = 0; picDone = false; boost = 1; boostCounter = 0; colHandle = new EricColDetect(); super(_arg1); m_world.SetContactListener(colHandle); hints = [[null, "Get some air to score points!<br>Push DOWN as I enter the ramp.<br>Push UP as I exit the ramp.<br>Push LEFT/RIGHT at the bottom of the ramp."], [null, "Something is wrong with the scoreboard.<br>Maybe I can fix it..."], [null, "Exit to register your score!"]]; _parTime = 0; sparkle = new SparkleEricCostume(); money = new MoneyEric(); } override public function onSensor(_arg1:LevelEvent){ var _local2:MovieClip; super.onSensor(_arg1); if ((((_arg1.content.m_userData.name == "s8a")) || ((_arg1.content.m_userData.name == "s8b")))){ if ((((playerBody.m_linearVelocity.y < 0)) && (!(goingUp)))){ goingUp = true; }; if (keyboard.isDown(Keyboard.UP)){ playerBody.ApplyForce(new b2Vec2(0, ((jump * 8) * boost)), playerBody.GetPosition()); } else { if (keyboard.isDown(Keyboard.DOWN)){ playerBody.ApplyForce(new b2Vec2(0, ((jump * -8) * boost)), playerBody.GetPosition()); }; }; } else { if (_arg1.content.m_userData.name == "s8c"){ if (keyboard.isDown(Keyboard.RIGHT)){ playerBody.ApplyForce(new b2Vec2(((-(jump) * 8) * boost), 0), playerBody.GetPosition()); } else { if (keyboard.isDown(Keyboard.LEFT)){ playerBody.ApplyForce(new b2Vec2(((jump * 8) * boost), 0), playerBody.GetPosition()); }; }; } else { if ((((_arg1.content.m_userData.name == "s8d")) && ((boost == 1)))){ _local2 = (getChildByName("ericade_mc") as MovieClip); _local2.visible = false; boost = 0; say("_CLEAR"); say("Ericade!"); }; }; }; } override public function Update(){ var _local1:String; var _local2:*; if (goingUp){ _local1 = ""; _local2 = (Math.round(((-(playerBody.m_xf.position.y) + 9) * 150)) / 100); if (_local2 > best){ best = _local2; }; getChildByName("level8ScoreBoard")["best_txt"].text = (best + " ft. "); getChildByName("level8ScoreBoard")["height_txt"].text = (_local2 + " ft. "); if (playerBody.m_linearVelocity.y > 0){ goingUp = false; }; }; if (picDone){ _local1 = (Math.round((best * 100)) + "0 pts"); } else { if (Math.random() < 0.5){ _local1 = (Math.round((best * 100)) + " pts"); } else { _local1 = (Math.round((best * 100)) + ". pts"); }; }; getChildByName("level8ScoreBoard")["score_txt"].text = _local1; if (player.y < 100){ y = (-(player.y) + 100); } else { y = 0; }; if (boost == 0){ boostCounter++; if (boostCounter == 40){ money.visible = true; money.x = player.x; money.y = player.y; } else { if (boostCounter == 80){ money.visible = false; sparkle.visible = true; sparkle.x = player.x; sparkle.y = player.y; } else { if (boostCounter == 110){ boost = 2; boostCounter = 0; }; }; }; return; } else { if (boost == 2){ boostCounter++; if (boostCounter == 300){ sparkle.visible = false; }; }; }; super.Update(); sparkle.x = player.x; sparkle.y = player.y; } override protected function calcScore(){ score = 0; picScore = Math.round((best * 1000)); } override public function completePic(){ var _local1:String; super.completePic(); hint = 3; picDone = true; _local1 = (Math.round((best * 100)) + "0 pts"); getChildByName("level8ScoreBoard")["score_txt"].text = _local1; say("That's better!"); } override public function enterPic(_arg1){ super.enterPic(_arg1); goingUp = false; } override public function construct():void{ best = 0; boostCounter = 0; boost = 1; picDone = false; layout = new Lv8Layout(); layout.copyToContainer(this); layout.addEventListener(Event.COMPLETE, onLayout, false, 0, true); } public function onLayout(_arg1:Event){ layout.removeEventListener(Event.COMPLETE, onLayout); layout = null; addChild(sparkle); addChild(money); sparkle.visible = false; money.visible = false; dispatchEvent(new LevelEvent(LevelEvent.LEVEL_READY)); } } }//package Levels
Section 139
//Level9 (Levels.Level9) package Levels { import Box2D.Collision.Shapes.*; import flash.display.*; import flash.events.*; import utils.*; import application.*; public class Level9 extends EricLevel { var layout; public function Level9(_arg1:KeyTracker){ colHandle = new EricColDetect(); super(_arg1); m_world.SetContactListener(colHandle); hints = [[null, "Jump onto the words 'The Game'"], [null, "Jump above the words, <br>then put me in the right place<br>between the titles"], [null, "Press the continue button"]]; } protected function onContClick(_arg1:MouseEvent){ if (_arg1.target.visible){ exit = true; }; } override public function start():void{ var _local1:b2MassData; super.start(); _local1 = new b2MassData(); _local1.mass = 0.5; var _local2 = getChildByName("titleDecor"); _local2["play"](); } override public function onSensor(_arg1:LevelEvent){ super.onSensor(_arg1); } override public function Update(){ super.Update(); if (totalTime == 3501){ say("Oh no... not again! <br>This is the third time this week that I've<br>gotten stuck in the Menu Screen! <br>I thought I asked the programmer to fix this! <br>I guess we're going to have to fix it ourselves..."); }; } override public function completePic(){ var _local1:MovieClip; say("_CLEAR"); super.completePic(); _local1 = (getChildByName("continue_btn") as MovieClip); _local1.visible = true; player.visible = false; if (costume != null){ costume.visible = false; removeChild(costume); costume = null; }; hint = 4; } override public function enterPic(_arg1){ super.enterPic(_arg1); } override public function destruct():void{ var _local1:MovieClip; _local1 = (getChildByName("continue_btn") as MovieClip); _local1.visible = false; _local1.removeEventListener(MouseEvent.CLICK, onContClick); super.destruct(); } override public function construct():void{ layout = new Lv9Layout(); layout.copyToContainer(this); layout.addEventListener(Event.COMPLETE, onLayout, false, 0, true); } public function onLayout(_arg1:Event){ var _local2:MovieClip; _local2 = (getChildByName("continue_btn") as MovieClip); _local2.visible = false; _local2.removeEventListener(MouseEvent.CLICK, onContClick); _local2.addEventListener(MouseEvent.CLICK, onContClick, false, 0, true); layout.removeEventListener(Event.COMPLETE, onLayout); layout = null; dispatchEvent(new LevelEvent(LevelEvent.LEVEL_READY)); } } }//package Levels
Section 140
//LevelCredits (Levels.LevelCredits) package Levels { import flash.events.*; import utils.*; import application.*; public class LevelCredits extends EricLevel { var layout; public function LevelCredits(_arg1:KeyTracker){ colHandle = new EricColDetect(); super(_arg1); m_world.SetContactListener(colHandle); _parTime = 0; } override public function construct():void{ layout = new LvCreditsLayout(); layout.copyToContainer(this); layout.addEventListener(Event.COMPLETE, onLayout, false, 0, true); } public function onLayout(_arg1:Event){ layout.removeEventListener(Event.COMPLETE, onLayout); layout = null; dispatchEvent(new LevelEvent(LevelEvent.LEVEL_READY)); } } }//package Levels
Section 141
//LevelGallery (Levels.LevelGallery) package Levels { import flash.events.*; import utils.*; import application.*; public class LevelGallery extends EricLevel { var layout; public function LevelGallery(_arg1:KeyTracker){ colHandle = new EricColDetect(); super(_arg1); m_world.SetContactListener(colHandle); _parTime = 0; } override public function construct():void{ layout = new LvGalleryLayout(); layout.copyToContainer(this); layout.addEventListener(Event.COMPLETE, onLayout, false, 0, true); } public function onLayout(_arg1:Event){ layout.removeEventListener(Event.COMPLETE, onLayout); layout = null; dispatchEvent(new LevelEvent(LevelEvent.LEVEL_READY)); } } }//package Levels
Section 142
//LevelGallery2 (Levels.LevelGallery2) package Levels { import flash.events.*; import utils.*; import application.*; public class LevelGallery2 extends EricLevel { var layout; public function LevelGallery2(_arg1:KeyTracker){ colHandle = new EricColDetect(); super(_arg1); m_world.SetContactListener(colHandle); _parTime = 0; } override public function construct():void{ layout = new LvGallery2Layout(); layout.copyToContainer(this); layout.addEventListener(Event.COMPLETE, onLayout, false, 0, true); } public function onLayout(_arg1:Event){ layout.removeEventListener(Event.COMPLETE, onLayout); layout = null; dispatchEvent(new LevelEvent(LevelEvent.LEVEL_READY)); } } }//package Levels
Section 143
//LevelGallery3 (Levels.LevelGallery3) package Levels { import flash.events.*; import utils.*; import application.*; public class LevelGallery3 extends EricLevel { var layout; public function LevelGallery3(_arg1:KeyTracker){ colHandle = new EricColDetect(); super(_arg1); m_world.SetContactListener(colHandle); _parTime = 0; } override public function construct():void{ layout = new LvGallery3Layout(); layout.copyToContainer(this); layout.addEventListener(Event.COMPLETE, onLayout, false, 0, true); } public function onLayout(_arg1:Event){ layout.removeEventListener(Event.COMPLETE, onLayout); layout = null; dispatchEvent(new LevelEvent(LevelEvent.LEVEL_READY)); } } }//package Levels
Section 144
//LevelGallery4 (Levels.LevelGallery4) package Levels { import flash.display.*; import flash.events.*; import utils.*; import application.*; import flash.net.*; public class LevelGallery4 extends EricLevel { var layout; public function LevelGallery4(_arg1:KeyTracker){ colHandle = new EricColDetect(); super(_arg1); m_world.SetContactListener(colHandle); _parTime = 0; } protected function onContClick(_arg1:MouseEvent){ var _local2:URLRequest; _local2 = new URLRequest("http://www.ericthecircle.com/"); navigateToURL(_local2, "_blank"); } override public function destruct():void{ var _local1:MovieClip; _local1 = (getChildByName("web_btn") as MovieClip); _local1.removeEventListener(MouseEvent.CLICK, onContClick); super.destruct(); } override public function construct():void{ layout = new LvGallery4Layout(); layout.copyToContainer(this); layout.addEventListener(Event.COMPLETE, onLayout, false, 0, true); } public function onLayout(_arg1:Event){ var _local2:MovieClip; _local2 = (getChildByName("web_btn") as MovieClip); _local2.removeEventListener(MouseEvent.CLICK, onContClick); _local2.addEventListener(MouseEvent.CLICK, onContClick, false, 0, true); _local2.visible = false; layout.removeEventListener(Event.COMPLETE, onLayout); layout = null; dispatchEvent(new LevelEvent(LevelEvent.LEVEL_READY)); } } }//package Levels
Section 145
//title_150 (Main2_fla.title_150) package Main2_fla { import flash.display.*; public dynamic class title_150 extends MovieClip { public function title_150(){ addFrameScript(64, frame65); } function frame65(){ stop(); } } }//package Main2_fla
Section 146
//MochiAd (mochi.as3.MochiAd) package mochi.as3 { import flash.display.*; import flash.events.*; import flash.utils.*; import flash.net.*; import flash.system.*; public class MochiAd { public static function getVersion():String{ return (MochiServices.getVersion()); } 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 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{ trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software"); }, 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); }; 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]; if (Security.sandboxType == "application"){ return (_local2); }; 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{ trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software"); }, 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"){ trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!"); }; 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 (!(clip is DisplayObject)){ trace("Warning: Object passed as container clip not a descendant of the DisplayObject type"); return (null); }; if (MovieClip(clip).stage == null){ trace("Warning: Container clip for ad is not attached to the stage"); return (null); }; 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; } else { trace("[MochiAd] NOTE: Security Sandbox Violation errors below are normal"); }; 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(); mc.regContLC = function (_arg1:String):void{ mc._containerLCName = _arg1; }; 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.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, function (_arg1:IOErrorEvent):void{ trace("[MochiAds] Blocked URL"); }); if (!options.skip){ 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; default: trace(("[mochiads rpc] unknown rpc id: " + _arg3.id)); }; } 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_w:Number; 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 progress:Number; 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{ trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software"); }, ad_skipped:function ():void{ }, ad_progress:function (_arg1:Number):void{ }, progress_override:function (_arg1:Object):Number{ return (NaN); }, bar_offset:0}; 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; if (options.skip){ ad_timeout = 0; }; 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 + options.bar_offset); bar.y = (h - 20); }; bar_w = ((w - bar.x) - 10); 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(bar_w, 0); backing.lineTo(bar_w, 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(bar_w, 0); inside.lineTo(bar_w, 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(bar_w, 0); outline.lineTo(bar_w, 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; progress = Math.min(1, options.progress_override(clip)); f = function (_arg1:Event):void{ _arg1.target.removeEventListener(_arg1.type, arguments.callee); complete = true; if (unloaded){ MochiAd.unload(clip); }; }; if (!isNaN(progress)){ complete = (progress == 1); } else { if (clip.loaderInfo.bytesLoaded == clip.loaderInfo.bytesTotal){ complete = true; } else { if ((clip.root is MovieClip)){ r = (clip.root as MovieClip); if (r.framesLoaded >= r.totalFrames){ complete = true; } else { clip.loaderInfo.addEventListener(Event.COMPLETE, f); }; } else { clip.loaderInfo.addEventListener(Event.COMPLETE, f); }; }; }; 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{ trace(("[MOCHIAD rpcTestFn] " + _arg1)); return (_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:Number; var _local10:Object; var _local11:Number; var _local12: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; _local7 = Math.min(1, options.progress_override(_local1)); if (_local7 == 1){ complete = true; }; if (complete){ _local6 = Math.max(1, _local6); _local5 = _local6; }; _local8 = ((100 * _local6) / _local5); if (!isNaN(_local7)){ _local8 = (100 * _local7); }; _local9 = ((100 * _local3) / chk.ad_msec); _local10 = this._mochiad_bar._inside; _local11 = Math.min(100, Math.min(((_local8) || (0)), _local9)); _local11 = Math.max(this.last_pcnt, _local11); this.last_pcnt = _local11; _local10.scaleX = (_local11 * 0.01); options.ad_progress(_local11); if (sendHostProgress){ clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"hostLoadPcnt", pcnt:_local8}); if (_local8 >= 100){ sendHostProgress = false; }; }; if (!chk.showing){ _local12 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal; if (_local12 > 0){ chk.showing = true; chk.started = getTimer(); MochiAd.adShowing(clip); } else { if ((((_local3 > chk.ad_timeout)) && ((_local8 == 100)))){ options.ad_failed(); _local4 = true; }; }; }; if (_local3 > chk.ad_msec){ _local4 = true; }; if (((complete) && (_local4))){ if (unloaded){ MochiAd.unload(_local1); } else { 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{ trace("[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0"); MochiAd.showPreGameAd(_arg1); } public static function showTimedAd(_arg1:Object):void{ trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0"); 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 mochi.as3
Section 147
//MochiCoins (mochi.as3.MochiCoins) package mochi.as3 { public class MochiCoins { public static const STORE_HIDE:String = "StoreHide"; public static const NO_USER:String = "NoUser"; public static const IO_ERROR:String = "IOError"; public static const ITEM_NEW:String = "ItemNew"; public static const ITEM_OWNED:String = "ItemOwned"; public static const STORE_ITEMS:String = "StoreItems"; public static const ERROR:String = "Error"; public static const STORE_SHOW:String = "StoreShow"; public static var _inventory:MochiInventory; public static function triggerEvent(_arg1:String, _arg2:Object):void{ MochiSocial.triggerEvent(_arg1, _arg2); } public static function removeEventListener(_arg1:String, _arg2:Function):void{ MochiSocial.removeEventListener(_arg1, _arg2); } public static function addEventListener(_arg1:String, _arg2:Function):void{ MochiSocial.addEventListener(_arg1, _arg2); } public static function getStoreItems():void{ MochiServices.send("coins_getStoreItems"); } public static function get inventory():MochiInventory{ return (_inventory); } public static function showStore(_arg1:Object=null):void{ MochiServices.bringToTop(); MochiServices.send("coins_showStore", {options:_arg1}, null, null); } public static function showItem(_arg1:Object=null):void{ if (((!(_arg1)) || (!((typeof(_arg1.item) == "string"))))){ trace("ERROR: showItem call must pass an Object with an item key"); return; }; MochiServices.bringToTop(); MochiServices.send("coins_showItem", {options:_arg1}, null, null); } public static function getVersion():String{ return (MochiServices.getVersion()); } public static function showVideo(_arg1:Object=null):void{ if (((!(_arg1)) || (!((typeof(_arg1.item) == "string"))))){ trace("ERROR: showVideo call must pass an Object with an item key"); return; }; MochiServices.bringToTop(); MochiServices.send("coins_showVideo", {options:_arg1}, null, null); } MochiSocial.addEventListener(MochiSocial.LOGGED_IN, function (_arg1:Object):void{ _inventory = new MochiInventory(); }); MochiSocial.addEventListener(MochiSocial.LOGGED_OUT, function (_arg1:Object):void{ _inventory = null; }); } }//package mochi.as3
Section 148
//MochiDigits (mochi.as3.MochiDigits) package mochi.as3 { public final class MochiDigits { private var Sibling:MochiDigits; private var Fragment:Number; private var Encoder:Number; public function MochiDigits(_arg1:Number=0, _arg2:uint=0):void{ Encoder = 0; setValue(_arg1, _arg2); } public function set value(_arg1:Number):void{ setValue(_arg1); } public function reencode():void{ var _local1:uint; _local1 = int((2147483647 * Math.random())); Fragment = (Fragment ^ (_local1 ^ Encoder)); Encoder = _local1; } public function toString():String{ var _local1:String; _local1 = String.fromCharCode((Fragment ^ Encoder)); if (Sibling != null){ _local1 = (_local1 + Sibling.toString()); }; return (_local1); } public function get value():Number{ return (Number(this.toString())); } public function setValue(_arg1:Number=0, _arg2:uint=0):void{ var _local3:String; _local3 = _arg1.toString(); var _temp1 = _arg2; _arg2 = (_arg2 + 1); Fragment = (_local3.charCodeAt(_temp1) ^ Encoder); if (_arg2 < _local3.length){ Sibling = new MochiDigits(_arg1, _arg2); } else { Sibling = null; }; reencode(); } public function addValue(_arg1:Number):void{ value = (value + _arg1); } } }//package mochi.as3
Section 149
//MochiEventDispatcher (mochi.as3.MochiEventDispatcher) package mochi.as3 { public class MochiEventDispatcher { private var eventTable:Object; public function MochiEventDispatcher():void{ eventTable = {}; } public function triggerEvent(_arg1:String, _arg2:Object):void{ var _local3:Object; if (eventTable[_arg1] == undefined){ return; }; for (_local3 in eventTable[_arg1]) { var _local6 = eventTable[_arg1]; _local6[_local3](_arg2); }; } public function removeEventListener(_arg1:String, _arg2:Function):void{ var _local3:Object; if (eventTable[_arg1] == undefined){ eventTable[_arg1] = []; return; }; for (_local3 in eventTable[_arg1]) { if (eventTable[_arg1][_local3] != _arg2){ } else { eventTable[_arg1].splice(Number(_local3), 1); }; }; } public function addEventListener(_arg1:String, _arg2:Function):void{ removeEventListener(_arg1, _arg2); eventTable[_arg1].push(_arg2); } } }//package mochi.as3
Section 150
//MochiEvents (mochi.as3.MochiEvents) package mochi.as3 { import flash.display.*; public class MochiEvents { public static const ALIGN_BOTTOM_LEFT:String = "ALIGN_BL"; public static const FORMAT_LONG:String = "LongForm"; public static const ALIGN_BOTTOM:String = "ALIGN_B"; public static const ACHIEVEMENT_RECEIVED:String = "AchievementReceived"; public static const FORMAT_SHORT:String = "ShortForm"; public static const ALIGN_TOP_RIGHT:String = "ALIGN_TR"; public static const ALIGN_BOTTOM_RIGHT:String = "ALIGN_BR"; public static const ALIGN_TOP:String = "ALIGN_T"; public static const ALIGN_LEFT:String = "ALIGN_L"; public static const ALIGN_RIGHT:String = "ALIGN_R"; public static const ALIGN_TOP_LEFT:String = "ALIGN_TL"; public static const ALIGN_CENTER:String = "ALIGN_C"; private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher(); private static var gameStart:Number; private static var levelStart:Number; public static function endPlay():void{ MochiServices.send("events_clearRoundID", null, null, null); } public static function addEventListener(_arg1:String, _arg2:Function):void{ _dispatcher.addEventListener(_arg1, _arg2); } public static function trackEvent(_arg1:String, _arg2=null):void{ MochiServices.send("events_trackEvent", {tag:_arg1, value:_arg2}, null, null); } public static function removeEventListener(_arg1:String, _arg2:Function):void{ _dispatcher.removeEventListener(_arg1, _arg2); } public static function startSession(_arg1:String):void{ MochiServices.send("events_beginSession", {achievementID:_arg1}, null, null); } public static function triggerEvent(_arg1:String, _arg2:Object):void{ _dispatcher.triggerEvent(_arg1, _arg2); } public static function setNotifications(_arg1:MovieClip, _arg2:Object):void{ var _local3:Object; var _local4:Object; _local3 = {}; for (_local4 in _arg2) { _local3[_local4] = _arg2[_local4]; }; _local3.clip = _arg1; MochiServices.send("events_setNotifications", _local3, null, null); } public static function getVersion():String{ return (MochiServices.getVersion()); } public static function startPlay(_arg1:String="gameplay"):void{ MochiServices.send("events_setRoundID", {tag:String(_arg1)}, null, null); } } }//package mochi.as3
Section 151
//MochiInventory (mochi.as3.MochiInventory) package mochi.as3 { import flash.events.*; import flash.utils.*; public dynamic class MochiInventory extends Proxy { private var _timer:Timer; private var _names:Array; private var _consumableProperties:Object; private var _syncID:Number; private var _storeSync:Object; private var _outstandingID:Number; private var _syncPending:Boolean; public static const READY:String = "InvReady"; public static const ERROR:String = "Error"; public static const IO_ERROR:String = "IoError"; private static const KEY_SALT:String = " syncMaint"; public static const WRITTEN:String = "InvWritten"; public static const NOT_READY:String = "InvNotReady"; public static const VALUE_ERROR:String = "InvValueError"; private static const CONSUMER_KEY:String = "MochiConsumables"; private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher(); public function MochiInventory():void{ MochiCoins.addEventListener(MochiCoins.ITEM_OWNED, itemOwned); MochiCoins.addEventListener(MochiCoins.ITEM_NEW, newItems); MochiSocial.addEventListener(MochiSocial.LOGGED_IN, loggedIn); MochiSocial.addEventListener(MochiSocial.LOGGED_OUT, loggedOut); _storeSync = new Object(); _syncPending = false; _outstandingID = 0; _syncID = 0; _timer = new Timer(1000); _timer.addEventListener(TimerEvent.TIMER, sync); _timer.start(); if (MochiSocial.loggedIn){ loggedIn(); } else { loggedOut(); }; } private function newItems(_arg1:Object):void{ if (!this[(_arg1.id + KEY_SALT)]){ this[(_arg1.id + KEY_SALT)] = 0; }; if (!this[_arg1.id]){ this[_arg1.id] = 0; }; this[(_arg1.id + KEY_SALT)] = (this[(_arg1.id + KEY_SALT)] + _arg1.count); this[_arg1.id] = (this[_arg1.id] + _arg1.count); if (_arg1.privateProperties.consumable){ if (!this[_arg1.privateProperties.tag]){ this[_arg1.privateProperties.tag] = 0; }; this[_arg1.privateProperties.tag] = (this[_arg1.privateProperties.tag] + (_arg1.privateProperties.inc * _arg1.count)); }; } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function getProperty(_arg1){ if (_consumableProperties == null){ triggerEvent(ERROR, {type:NOT_READY}); return (-1); }; if (_consumableProperties[_arg1]){ return (MochiDigits(_consumableProperties[_arg1]).value); }; return (undefined); } public function release():void{ MochiCoins.removeEventListener(MochiCoins.ITEM_NEW, newItems); MochiSocial.removeEventListener(MochiSocial.LOGGED_IN, loggedIn); MochiSocial.removeEventListener(MochiSocial.LOGGED_OUT, loggedOut); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function hasProperty(_arg1):Boolean{ if (_consumableProperties == null){ triggerEvent(ERROR, {type:NOT_READY}); return (false); }; if (_consumableProperties[_arg1] == undefined){ return (false); }; return (true); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function nextNameIndex(_arg1:int):int{ return (((_arg1)>=_names.length) ? 0 : (_arg1 + 1)); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function setProperty(_arg1, _arg2):void{ var _local3:MochiDigits; if (_consumableProperties == null){ triggerEvent(ERROR, {type:NOT_READY}); return; }; if (!(_arg2 is Number)){ triggerEvent(ERROR, {type:VALUE_ERROR, error:"Invalid type", arg:_arg2}); return; }; if (_consumableProperties[_arg1]){ _local3 = MochiDigits(_consumableProperties[_arg1]); if (_local3.value == _arg2){ return; }; _local3.value = _arg2; } else { _names.push(_arg1); _consumableProperties[_arg1] = new MochiDigits(_arg2); }; _syncID++; } private function sync(_arg1:Event=null):void{ var _local2:Object; var _local3:String; if (((_syncPending) || ((_syncID == _outstandingID)))){ return; }; _outstandingID = _syncID; _local2 = {}; for (_local3 in _consumableProperties) { _local2[_local3] = MochiDigits(_consumableProperties[_local3]).value; }; MochiUserData.put(CONSUMER_KEY, _local2, putConsumableBag); _syncPending = true; } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function nextName(_arg1:int):String{ return (_names[(_arg1 - 1)]); } private function loggedIn(_arg1:Object=null):void{ MochiUserData.get(CONSUMER_KEY, getConsumableBag); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function deleteProperty(_arg1):Boolean{ if (!_consumableProperties[_arg1]){ return (false); }; _names.splice(_names.indexOf(_arg1), 1); delete _consumableProperties[_arg1]; return (true); } private function itemOwned(_arg1:Object):void{ _storeSync[_arg1.id] = {properties:_arg1.properties, count:_arg1.count}; } private function putConsumableBag(_arg1:MochiUserData):void{ _syncPending = false; if (_arg1.error){ triggerEvent(ERROR, {type:IO_ERROR, error:_arg1.error}); _outstandingID = -1; }; triggerEvent(WRITTEN, {}); } private function getConsumableBag(_arg1:MochiUserData):void{ var _local2:String; var _local3:Number; if (_arg1.error){ triggerEvent(ERROR, {type:IO_ERROR, error:_arg1.error}); return; }; _consumableProperties = {}; _names = new Array(); if (_arg1.data){ for (_local2 in _arg1.data) { _names.push(_local2); _consumableProperties[_local2] = new MochiDigits(_arg1.data[_local2]); }; }; for (_local2 in _storeSync) { _local3 = _storeSync[_local2].count; if (_consumableProperties[(_local2 + KEY_SALT)]){ _local3 = (_local3 - _consumableProperties[_local2]); }; if (_local3 == 0){ } else { newItems({id:_local2, count:_local3, properties:_storeSync[_local2].properties}); }; }; triggerEvent(READY, {}); } private function loggedOut(_arg1:Object=null):void{ _consumableProperties = null; } public static function triggerEvent(_arg1:String, _arg2:Object):void{ _dispatcher.triggerEvent(_arg1, _arg2); } public static function removeEventListener(_arg1:String, _arg2:Function):void{ _dispatcher.removeEventListener(_arg1, _arg2); } public static function addEventListener(_arg1:String, _arg2:Function):void{ _dispatcher.addEventListener(_arg1, _arg2); } } }//package mochi.as3
Section 152
//MochiScores (mochi.as3.MochiScores) package mochi.as3 { import flash.display.*; import flash.text.*; public class MochiScores { private static var boardID:String; public static var onErrorHandler:Object; public static var onCloseHandler:Object; public static function showLeaderboard(_arg1:Object=null):void{ var n:Number; var options = _arg1; if (options != null){ delete options.clip; MochiServices.setContainer(); MochiServices.bringToTop(); if (options.name != null){ if ((options.name is TextField)){ if (options.name.text.length > 0){ options.name = options.name.text; }; }; }; if (options.score != null){ if ((options.score is TextField)){ if (options.score.text.length > 0){ options.score = options.score.text; }; } else { if ((options.score is MochiDigits)){ options.score = options.score.value; }; }; n = Number(options.score); if (isNaN(n)){ trace((("ERROR: Submitted score '" + options.score) + "' will be rejected, score is 'Not a Number'")); } else { if ((((n == Number.NEGATIVE_INFINITY)) || ((n == Number.POSITIVE_INFINITY)))){ trace((("ERROR: Submitted score '" + options.score) + "' will be rejected, score is an infinite")); } else { if (Math.floor(n) != n){ trace((("WARNING: Submitted score '" + options.score) + "' will be truncated")); }; options.score = n; }; }; }; if (options.onDisplay != null){ options.onDisplay(); } else { if (MochiServices.clip != null){ if ((MochiServices.clip is MovieClip)){ MochiServices.clip.stop(); } else { trace("Warning: Container is not a MovieClip, cannot call default onDisplay."); }; }; }; } else { options = {}; if ((MochiServices.clip is MovieClip)){ MochiServices.clip.stop(); } else { trace("Warning: Container is not a MovieClip, cannot call default onDisplay."); }; }; if (options.onClose != null){ onCloseHandler = options.onClose; } else { onCloseHandler = function ():void{ if ((MochiServices.clip is MovieClip)){ MochiServices.clip.play(); } else { trace("Warning: Container is not a MovieClip, cannot call default onClose."); }; }; }; if (options.onError != null){ onErrorHandler = options.onError; } else { onErrorHandler = null; }; if (options.boardID == null){ if (MochiScores.boardID != null){ options.boardID = MochiScores.boardID; }; }; MochiServices.warnID(options.boardID, true); trace("[MochiScores] NOTE: Security Sandbox Violation errors below are normal"); MochiServices.send("scores_showLeaderboard", {options:options}, null, onClose); } public static function closeLeaderboard():void{ MochiServices.send("scores_closeLeaderboard"); } public static function getPlayerInfo(_arg1:Object, _arg2:Object=null):void{ MochiServices.send("scores_getPlayerInfo", null, _arg1, _arg2); } public static function requestList(_arg1:Object, _arg2:Object=null):void{ MochiServices.send("scores_requestList", null, _arg1, _arg2); } public static function scoresArrayToObjects(_arg1:Object):Object{ var _local2:Object; var _local3:Number; var _local4:Number; var _local5:Object; var _local6:Object; var _local7:String; var _local8:String; _local2 = {}; for (_local7 in _arg1) { if (typeof(_arg1[_local7]) == "object"){ if (((!((_arg1[_local7].cols == null))) && (!((_arg1[_local7].rows == null))))){ _local2[_local7] = []; _local5 = _arg1[_local7]; _local4 = 0; while (_local4 < _local5.rows.length) { _local6 = {}; _local3 = 0; while (_local3 < _local5.cols.length) { _local6[_local5.cols[_local3]] = _local5.rows[_local4][_local3]; _local3++; }; _local2[_local7].push(_local6); _local4++; }; } else { _local2[_local7] = {}; for (_local8 in _arg1[_local7]) { _local2[_local7][_local8] = _arg1[_local7][_local8]; }; }; } else { _local2[_local7] = _arg1[_local7]; }; }; return (_local2); } public static function submit(_arg1:Number, _arg2:String, _arg3:Object=null, _arg4:Object=null):void{ _arg1 = Number(_arg1); if (isNaN(_arg1)){ trace((("ERROR: Submitted score '" + String(_arg1)) + "' will be rejected, score is 'Not a Number'")); } else { if ((((_arg1 == Number.NEGATIVE_INFINITY)) || ((_arg1 == Number.POSITIVE_INFINITY)))){ trace((("ERROR: Submitted score '" + String(_arg1)) + "' will be rejected, score is an infinite")); } else { if (Math.floor(_arg1) != _arg1){ trace((("WARNING: Submitted score '" + String(_arg1)) + "' will be truncated")); }; _arg1 = Number(_arg1); }; }; MochiServices.send("scores_submit", {score:_arg1, name:_arg2}, _arg3, _arg4); } public static function onClose(_arg1:Object=null):void{ if (((((_arg1) && ((_arg1.error == true)))) && (onErrorHandler))){ if (_arg1.errorCode == null){ _arg1.errorCode = "IOError"; }; onErrorHandler(_arg1.errorCode); MochiServices.doClose(); return; }; onCloseHandler(); MochiServices.doClose(); } public static function setBoardID(_arg1:String):void{ MochiServices.warnID(_arg1, true); MochiScores.boardID = _arg1; MochiServices.send("scores_setBoardID", {boardID:_arg1}); } } }//package mochi.as3
Section 153
//MochiServices (mochi.as3.MochiServices) package mochi.as3 { import flash.display.*; import flash.events.*; import flash.utils.*; import flash.geom.*; import flash.net.*; import flash.system.*; public class MochiServices { private static var _container:Object; private static var _connected:Boolean = false; private static var _queue:Array; private static var _swfVersion:String; private static var _preserved:Object; public static var netupAttempted:Boolean = false; private static var _sendChannel:LocalConnection; public static var servicesSync:MochiSync = new MochiSync(); private static var _nextCallbackID:Number; private static var _clip:MovieClip; private static var _id:String; private static var _services:String = "services.swf"; private static var _servURL:String = "http://www.mochiads.com/static/lib/services/"; public static var widget:Boolean = false; private static var _timer:Timer; private static var _sendChannelName:String; private static var _loader:Loader; private static var _callbacks:Object; private static var _connecting:Boolean = false; private static var _mochiLocalConnection:MovieClip; private static var _listenChannelName:String = "__ms_"; public static var onError:Object; public static var netup:Boolean = true; private static var _mochiLC:String = "MochiLC.swf"; public static function isNetworkAvailable():Boolean{ return (!((Security.sandboxType == "localWithFile"))); } public static function get connected():Boolean{ return (_connected); } private static function onReceive(_arg1:Object):void{ var cb:String; var cblst:Object; var method:*; var methodName:String; var obj:Object; var pkg = _arg1; cb = pkg.callbackID; cblst = _callbacks[cb]; if (!cblst){ return; }; method = cblst.callbackMethod; methodName = ""; obj = cblst.callbackObject; if (((obj) && ((typeof(method) == "string")))){ methodName = method; if (obj[method] != null){ method = obj[method]; } else { trace((("Error: Method " + method) + " does not exist.")); }; }; if (method != undefined){ try { method.apply(obj, pkg.args); } catch(error:Error) { trace(((("Error invoking callback method '" + methodName) + "': ") + error.toString())); }; } else { if (obj != null){ try { obj(pkg.args); } catch(error:Error) { trace(("Error invoking method on object: " + error.toString())); }; }; }; delete _callbacks[cb]; } public static function send(_arg1:String, _arg2:Object=null, _arg3:Object=null, _arg4:Object=null):void{ if (_connected){ _mochiLocalConnection.send(_sendChannelName, "onReceive", {methodName:_arg1, args:_arg2, callbackID:_nextCallbackID}); } else { if ((((_clip == null)) || (!(_connecting)))){ trace(("Error: MochiServices not connected. Please call MochiServices.connect(). Function: " + _arg1)); handleError(_arg2, _arg3, _arg4); flush(true); return; }; _queue.push({methodName:_arg1, args:_arg2, callbackID:_nextCallbackID}); }; if (_clip != null){ if (_callbacks != null){ _callbacks[_nextCallbackID] = {callbackObject:_arg3, callbackMethod:_arg4}; _nextCallbackID++; }; }; } private static function init(_arg1:String, _arg2:Object):void{ _id = _arg1; if (_arg2 != null){ _container = _arg2; loadCommunicator(_arg1, _container); }; } public static function get childClip():Object{ return (_clip); } private static function clickMovie(_arg1:String, _arg2:Function):MovieClip{ var _local3:Array; var _local4:int; var _local5:Array; var _local6:Array; var _local7:MovieClip; var _local8:LocalConnection; var _local9:String; var _local10:ByteArray; var _local11:ByteArray; var _local12:uint; var _local13:uint; var _local14:Loader; _local3 = [150, 21, 0, 7, 1, 0, 0, 0, 0, 98, 116, 110, 0, 7, 2, 0, 0, 0, 0, 116, 104, 105, 115, 0, 28, 150, 22, 0, 0, 99, 114, 101, 97, 116, 101, 69, 109, 112, 116, 121, 77, 111, 118, 105, 101, 67, 108, 105, 112, 0, 82, 135, 1, 0, 0, 23, 150, 13, 0, 4, 0, 0, 111, 110, 82, 101, 108, 101, 97, 115, 101, 0, 142, 8, 0, 0, 0, 0, 2, 42, 0, 114, 0, 150, 17, 0, 0, 32, 0, 7, 1, 0, 0, 0, 8, 0, 0, 115, 112, 108, 105, 116, 0, 82, 135, 1, 0, 1, 23, 150, 7, 0, 4, 1, 7, 0, 0, 0, 0, 78, 150, 8, 0, 0, 95, 98, 108, 97, 110, 107, 0, 154, 1, 0, 0, 150, 7, 0, 0, 99, 108, 105, 99, 107, 0, 150, 7, 0, 4, 1, 7, 1, 0, 0, 0, 78, 150, 27, 0, 7, 2, 0, 0, 0, 7, 0, 0, 0, 0, 0, 76, 111, 99, 97, 108, 67, 111, 110, 110, 101, 99, 116, 105, 111, 110, 0, 64, 150, 6, 0, 0, 115, 101, 110, 100, 0, 82, 79, 150, 15, 0, 4, 0, 0, 95, 97, 108, 112, 104, 97, 0, 7, 0, 0, 0, 0, 79, 150, 23, 0, 7, 0xFF, 0, 0xFF, 0, 7, 1, 0, 0, 0, 4, 0, 0, 98, 101, 103, 105, 110, 70, 105, 108, 108, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 109, 111, 118, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 100, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 100, 0, 0, 0, 7, 100, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 100, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 16, 0, 7, 0, 0, 0, 0, 4, 0, 0, 101, 110, 100, 70, 105, 108, 108, 0, 82, 23]; _local5 = [104, 0, 31, 64, 0, 7, 208, 0, 0, 12, 1, 0, 67, 2, 0xFF, 0xFF, 0xFF, 63, 3]; _local6 = [0, 64, 0, 0, 0]; _local7 = new MovieClip(); _local8 = new LocalConnection(); _local9 = ((("_click_" + Math.floor((Math.random() * 999999))) + "_") + Math.floor(new Date().time)); _local8 = new LocalConnection(); _local7.lc = _local8; _local7.click = _arg2; _local8.client = _local7; _local8.connect(_local9); _local10 = new ByteArray(); _local11 = new ByteArray(); _local11.endian = Endian.LITTLE_ENDIAN; _local11.writeShort(1); _local11.writeUTFBytes(((_arg1 + " ") + _local9)); _local11.writeByte(0); _local12 = ((_local3.length + _local11.length) + 4); _local13 = (_local12 + 35); _local10.endian = Endian.LITTLE_ENDIAN; _local10.writeUTFBytes("FWS"); _local10.writeByte(8); _local10.writeUnsignedInt(_local13); for each (_local4 in _local5) { _local10.writeByte(_local4); }; _local10.writeUnsignedInt(_local12); _local10.writeByte(136); _local10.writeShort(_local11.length); _local10.writeBytes(_local11); for each (_local4 in _local3) { _local10.writeByte(_local4); }; for each (_local4 in _local6) { _local10.writeByte(_local4); }; _local14 = new Loader(); _local14.loadBytes(_local10); _local7.addChild(_local14); return (_local7); } public static function stayOnTop():void{ _container.addEventListener(Event.ENTER_FRAME, MochiServices.bringToTop, false, 0, true); if (_clip != null){ _clip.visible = true; }; } public static function addLinkEvent(_arg1:String, _arg2:String, _arg3:DisplayObjectContainer, _arg4:Function=null):void{ var vars:Object; var avm1Click:DisplayObject; var s:String; var i:Number; var x:String; var req:URLRequest; var loader:Loader; var setURL:Function; var err:Function; var complete:Function; var url = _arg1; var burl = _arg2; var btn = _arg3; var onClick = _arg4; vars = new Object(); vars["mav"] = getVersion(); vars["swfv"] = "9"; vars["swfurl"] = btn.loaderInfo.loaderURL; vars["fv"] = Capabilities.version; vars["os"] = Capabilities.os; vars["lang"] = Capabilities.language; vars["scres"] = ((Capabilities.screenResolutionX + "x") + Capabilities.screenResolutionY); s = "?"; i = 0; for (x in vars) { if (i != 0){ s = (s + "&"); }; i = (i + 1); s = (((s + x) + "=") + escape(vars[x])); }; req = new URLRequest("http://x.mochiads.com/linkping.swf"); loader = new Loader(); setURL = function (_arg1:String):void{ var _local2:Rectangle; if (avm1Click){ btn.removeChild(avm1Click); }; avm1Click = clickMovie(_arg1, onClick); _local2 = btn.getBounds(btn); btn.addChild(avm1Click); avm1Click.x = _local2.x; avm1Click.y = _local2.y; avm1Click.scaleX = (0.01 * _local2.width); avm1Click.scaleY = (0.01 * _local2.height); }; err = function (_arg1:Object):void{ netup = false; _arg1.target.removeEventListener(_arg1.type, arguments.callee); setURL(burl); }; complete = function (_arg1:Object):void{ _arg1.target.removeEventListener(_arg1.type, arguments.callee); }; if (netup){ setURL((url + s)); } else { setURL(burl); }; if (!((netupAttempted) || (_connected))){ netupAttempted = true; loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, err); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, complete); loader.load(req); }; } public static function disconnect():void{ if (((_connected) || (_connecting))){ if (_clip != null){ if (_clip.parent != null){ if ((_clip.parent is Sprite)){ Sprite(_clip.parent).removeChild(_clip); _clip = null; }; }; }; _connecting = (_connected = false); flush(true); try { _mochiLocalConnection.close(); } catch(error:Error) { }; }; if (_timer != null){ try { _timer.stop(); } catch(error:Error) { }; }; } public static function allowDomains(_arg1:String):String{ var _local2:String; if (Security.sandboxType != "application"){ Security.allowDomain("*"); Security.allowInsecureDomain("*"); }; if (_arg1.indexOf("http://") != -1){ _local2 = _arg1.split("/")[2].split(":")[0]; if (Security.sandboxType != "application"){ Security.allowDomain(_local2); Security.allowInsecureDomain(_local2); }; }; return (_local2); } public static function getVersion():String{ return ("3.8 as3"); } public static function doClose():void{ _container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop); } public static function warnID(_arg1:String, _arg2:Boolean):void{ var _local3:Number; _arg1 = _arg1.toLowerCase(); if (_arg1.length != 16){ trace((("WARNING: " + (_arg2) ? "board" : "game") + " ID is not the appropriate length")); return; } else { if (_arg1 == "1e113c7239048b3f"){ if (_arg2){ trace("WARNING: Using testing board ID"); } else { trace("WARNING: Using testing board ID as game ID"); }; return; } else { if (_arg1 == "84993a1de4031cd8"){ if (_arg2){ trace("WARNING: Using testing game ID as board ID"); } else { trace("WARNING: Using testing game ID"); }; return; }; }; }; _local3 = 0; while (_local3 < _arg1.length) { switch (_arg1.charAt(_local3)){ case "0": case "1": case "2": case "3": case "4": case "5": case "6": case "7": case "8": case "9": case "a": case "b": case "c": case "d": case "e": case "f": break; default: trace(("WARNING: Board ID contains illegal characters: " + _arg1)); return; }; _local3++; }; } private static function flush(_arg1:Boolean):void{ var _local2:Object; var _local3:Object; if (((_clip) && (_queue))){ while (_queue.length > 0) { _local2 = _queue.shift(); _local3 = null; if (_local2 != null){ if (_local2.callbackID != null){ _local3 = _callbacks[_local2.callbackID]; }; delete _callbacks[_local2.callbackID]; if (((_arg1) && (!((_local3 == null))))){ handleError(_local2.args, _local3.callbackObject, _local3.callbackMethod); }; }; }; }; } public static function get id():String{ return (_id); } private static function onEvent(_arg1:Object):void{ var _local2:String; var _local3:String; _local2 = _arg1.target; _local3 = _arg1.event; switch (_local2){ case "events": MochiEvents.triggerEvent(_arg1.event, _arg1.args); break; case "coins": MochiCoins.triggerEvent(_arg1.event, _arg1.args); break; case "sync": servicesSync.triggerEvent(_arg1.event, _arg1.args); break; }; } private static function urlOptions(_arg1:Object):Object{ var _local2:Object; var _local3:String; var _local4:Array; var _local5:Number; var _local6:Array; _local2 = {}; if (_arg1.stage){ _local3 = _arg1.stage.loaderInfo.parameters.mochiad_options; } else { _local3 = _arg1.loaderInfo.parameters.mochiad_options; }; if (_local3){ _local4 = _local3.split("&"); _local5 = 0; while (_local5 < _local4.length) { _local6 = _local4[_local5].split("="); _local2[unescape(_local6[0])] = unescape(_local6[1]); _local5++; }; }; return (_local2); } public static function setContainer(_arg1:Object=null, _arg2:Boolean=true):void{ if (_clip.parent){ _clip.parent.removeChild(_clip); }; if (_arg1 != null){ if ((_arg1 is DisplayObjectContainer)){ _container = _arg1; }; }; if (_arg2){ if ((_container is DisplayObjectContainer)){ DisplayObjectContainer(_container).addChild(_clip); }; }; } private static function handleError(_arg1:Object, _arg2:Object, _arg3:Object):void{ var args = _arg1; var callbackObject = _arg2; var callbackMethod = _arg3; if (args != null){ if (args.onError != null){ args.onError.apply(null, ["NotConnected"]); }; if (((!((args.options == null))) && (!((args.options.onError == null))))){ args.options.onError.apply(null, ["NotConnected"]); }; }; if (callbackMethod != null){ args = {}; args.error = true; args.errorCode = "NotConnected"; if (((!((callbackObject == null))) && ((callbackMethod is String)))){ try { var _local5 = callbackObject; _local5[callbackMethod](args); } catch(error:Error) { }; } else { if (callbackMethod != null){ try { callbackMethod.apply(args); } catch(error:Error) { }; }; }; }; } private static function loadError(_arg1:Object):void{ _clip._mochiad_ctr_failed = true; trace("MochiServices could not load."); MochiServices.disconnect(); MochiServices.onError("IOError"); } private static function initComChannels():void{ if (!_connected){ trace("[SERVICES_API] connected!"); _connecting = false; _connected = true; _mochiLocalConnection.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"}); _mochiLocalConnection.send(_sendChannelName, "onReceive", {methodName:"registerGame", preserved:_preserved, id:_id, version:getVersion(), parentURL:_container.loaderInfo.loaderURL}); _clip.onReceive = onReceive; _clip.onEvent = onEvent; _clip.onError = function ():void{ MochiServices.onError("IOError"); }; while (_queue.length > 0) { _mochiLocalConnection.send(_sendChannelName, "onReceive", _queue.shift()); }; }; } private static function loadLCBridge(_arg1:Object):void{ var loader:Loader; var mochiLCURL:String; var req:URLRequest; var complete:Function; var clip = _arg1; loader = new Loader(); mochiLCURL = (_servURL + _mochiLC); req = new URLRequest(mochiLCURL); complete = function (_arg1:Object):void{ _mochiLocalConnection = MovieClip(loader.content); listen(); }; loader.contentLoaderInfo.addEventListener(Event.COMPLETE, complete); loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loadError); loader.load(req); clip.addChild(loader); } private static function listen():void{ _mochiLocalConnection.connect(_listenChannelName); _clip.handshake = function (_arg1:Object):void{ MochiServices.comChannelName = _arg1.newChannel; }; trace("Waiting for MochiAds services to connect..."); } public static function get clip():Object{ return (_container); } public static function set comChannelName(_arg1:String):void{ if (_arg1 != null){ if (_arg1.length > 3){ _sendChannelName = (_arg1 + "_fromgame"); initComChannels(); }; }; } private static function loadCommunicator(_arg1:String, _arg2:Object):MovieClip{ var _local3:String; var _local4:URLRequest; var _local5:URLVariables; if (_clip != null){ return (_clip); }; if (!MochiServices.isNetworkAvailable()){ return (null); }; if (urlOptions(_arg2).servURL){ _servURL = urlOptions(_arg2).servURL; }; _local3 = (_servURL + _services); if (urlOptions(_arg2).servicesURL){ _local3 = urlOptions(_arg2).servicesURL; }; _listenChannelName = (_listenChannelName + ((Math.floor(new Date().time) + "_") + Math.floor((Math.random() * 99999)))); MochiServices.allowDomains(_local3); _clip = new MovieClip(); loadLCBridge(_clip); _loader = new Loader(); _loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loadError); _local4 = new URLRequest(_local3); _local5 = new URLVariables(); _local5.listenLC = _listenChannelName; _local5.mochiad_options = _arg2.loaderInfo.parameters.mochiad_options; _local5.api_version = getVersion(); if (widget){ _local5.widget = true; }; _local4.data = _local5; _loader.load(_local4); _clip.addChild(_loader); _sendChannel = new LocalConnection(); _queue = []; _nextCallbackID = 0; _callbacks = {}; _timer = new Timer(10000, 1); _timer.addEventListener(TimerEvent.TIMER, connectWait); _timer.start(); return (_clip); } public static function connect(_arg1:String, _arg2:Object, _arg3:Object=null):void{ var id = _arg1; var clip = _arg2; var onError = _arg3; warnID(id, false); if ((clip is DisplayObject)){ if (clip.stage == null){ trace("MochiServices connect requires the containing clip be attached to the stage"); }; if (((!(_connected)) && ((_clip == null)))){ trace("MochiServices Connecting..."); _connecting = true; init(id, clip); }; } else { trace("Error, MochiServices requires a Sprite, Movieclip or instance of the stage."); }; if (onError != null){ MochiServices.onError = onError; } else { if (MochiServices.onError == null){ MochiServices.onError = function (_arg1:String):void{ trace(_arg1); }; }; }; } public static function updateCopy(_arg1:Object):void{ MochiServices.send("coins_updateCopy", _arg1, null, null); } public static function bringToTop(_arg1:Event=null):void{ var e = _arg1; if (((!((MochiServices.clip == null))) && (!((MochiServices.childClip == null))))){ try { if (MochiServices.clip.numChildren > 1){ MochiServices.clip.setChildIndex(MochiServices.childClip, (MochiServices.clip.numChildren - 1)); }; } catch(errorObject:Error) { trace("Warning: Depth sort error."); _container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop); }; }; } public static function connectWait(_arg1:TimerEvent):void{ if (!_connected){ _clip._mochiad_ctr_failed = true; trace("MochiServices could not load. (timeout)"); MochiServices.disconnect(); MochiServices.onError("IOError"); }; } } }//package mochi.as3
Section 154
//MochiSocial (mochi.as3.MochiSocial) package mochi.as3 { public class MochiSocial { public static const LOGGED_IN:String = "LoggedIn"; public static const PROFILE_HIDE:String = "ProfileHide"; public static const NO_USER:String = "NoUser"; public static const PROPERTIES_SIZE:String = "PropertiesSize"; public static const IO_ERROR:String = "IOError"; public static const PROPERTIES_SAVED:String = "PropertySaved"; public static const WIDGET_LOADED:String = "WidgetLoaded"; public static const USER_INFO:String = "UserInfo"; public static const ERROR:String = "Error"; public static const LOGIN_SHOW:String = "LoginShow"; public static const LOGGED_OUT:String = "LoggedOut"; public static const PROFILE_SHOW:String = "ProfileShow"; public static const LOGIN_SHOWN:String = "LoginShown"; public static const LOGIN_HIDE:String = "LoginHide"; private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher(); public static var _user_info:Object = null; public static function getVersion():String{ return (MochiServices.getVersion()); } public static function saveUserProperties(_arg1:Object):void{ MochiServices.send("coins_saveUserProperties", _arg1); } public static function get loggedIn():Boolean{ return (!((_user_info == null))); } public static function triggerEvent(_arg1:String, _arg2:Object):void{ _dispatcher.triggerEvent(_arg1, _arg2); } public static function addEventListener(_arg1:String, _arg2:Function):void{ _dispatcher.addEventListener(_arg1, _arg2); } public static function getUserInfo():void{ MochiServices.send("coins_getUserInfo"); } public static function showLoginWidget(_arg1:Object=null):void{ MochiServices.setContainer(); MochiServices.bringToTop(); MochiServices.send("coins_showLoginWidget", {options:_arg1}); } public static function removeEventListener(_arg1:String, _arg2:Function):void{ _dispatcher.removeEventListener(_arg1, _arg2); } public static function requestLogin():void{ MochiServices.send("coins_requestLogin"); } public static function getAPIURL():String{ if (!_user_info){ return (null); }; return (_user_info.api_url); } public static function hideLoginWidget():void{ MochiServices.send("coins_hideLoginWidget"); } public static function getAPIToken():String{ if (!_user_info){ return (null); }; return (_user_info.api_token); } MochiSocial.addEventListener(MochiSocial.LOGGED_IN, function (_arg1:Object):void{ _user_info = _arg1; }); MochiSocial.addEventListener(MochiSocial.LOGGED_OUT, function (_arg1:Object):void{ _user_info = null; }); } }//package mochi.as3
Section 155
//MochiSync (mochi.as3.MochiSync) package mochi.as3 { import flash.utils.*; public dynamic class MochiSync extends Proxy { private var _syncContainer:Object; public static var SYNC_PROPERTY:String = "UpdateProperty"; public static var SYNC_REQUEST:String = "SyncRequest"; public function MochiSync():void{ _syncContainer = {}; } public function triggerEvent(_arg1:String, _arg2:Object):void{ switch (_arg1){ case SYNC_REQUEST: MochiServices.send("sync_syncronize", _syncContainer); break; case SYNC_PROPERTY: _syncContainer[_arg2.name] = _arg2.value; break; }; } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function getProperty(_arg1){ return (_syncContainer[_arg1]); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function setProperty(_arg1, _arg2):void{ var _local3:String; if (_syncContainer[_arg1] == _arg2){ return; }; _local3 = _arg1.toString(); _syncContainer[_local3] = _arg2; MochiServices.send("sync_propUpdate", {name:_local3, value:_arg2}); } } }//package mochi.as3
Section 156
//MochiUserData (mochi.as3.MochiUserData) package mochi.as3 { import flash.events.*; import flash.utils.*; import flash.net.*; public class MochiUserData extends EventDispatcher { public var callback:Function;// = null public var error:Event;// = null public var key:String;// = null public var operation:String;// = null public var data;// = null public var _loader:URLLoader; public function MochiUserData(_arg1:String="", _arg2:Function=null){ key = null; data = null; error = null; operation = null; callback = null; super(); this.key = _arg1; this.callback = _arg2; } public function securityErrorHandler(_arg1:SecurityErrorEvent):void{ errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, ("security error: " + _arg1.toString()))); } public function putEvent(_arg1):void{ request("put", serialize(_arg1)); } public function request(_arg1:String, _arg2:ByteArray):void{ var api_url:String; var api_token:String; var args:URLVariables; var req:URLRequest; var _operation = _arg1; var _data = _arg2; operation = _operation; api_url = MochiSocial.getAPIURL(); api_token = MochiSocial.getAPIToken(); if ((((api_url == null)) || ((api_token == null)))){ errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, "not logged in")); return; }; _loader = new URLLoader(); args = new URLVariables(); args.op = _operation; args.key = key; req = new URLRequest((((MochiSocial.getAPIURL() + "/") + "MochiUserData?") + args.toString())); req.method = URLRequestMethod.POST; req.contentType = "application/x-mochi-userdata"; req.requestHeaders = [new URLRequestHeader("x-mochi-services-version", MochiServices.getVersion()), new URLRequestHeader("x-mochi-api-token", api_token)]; req.data = _data; _loader.dataFormat = URLLoaderDataFormat.BINARY; _loader.addEventListener(Event.COMPLETE, completeHandler); _loader.addEventListener(IOErrorEvent.IO_ERROR, errorHandler); _loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler); try { _loader.load(req); } catch(e:SecurityError) { errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, ("security error: " + e.toString()))); }; } public function completeHandler(_arg1:Event):void{ var event = _arg1; try { if (_loader.data.length){ data = deserialize(_loader.data); } else { data = null; }; } catch(e:Error) { errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, ("deserialize error: " + e.toString()))); return; }; if (callback != null){ performCallback(); } else { dispatchEvent(event); }; close(); } public function performCallback():void{ try { callback(this); } catch(e:Error) { trace(("[MochiUserData] exception during callback: " + e)); }; } public function serialize(_arg1):ByteArray{ var _local2:ByteArray; _local2 = new ByteArray(); _local2.objectEncoding = ObjectEncoding.AMF3; _local2.writeObject(_arg1); _local2.compress(); return (_local2); } public function errorHandler(_arg1:IOErrorEvent):void{ data = null; error = _arg1; if (callback != null){ performCallback(); } else { dispatchEvent(_arg1); }; close(); } public function getEvent():void{ request("get", serialize(null)); } override public function toString():String{ return ((((((((("[MochiUserData operation=" + operation) + " key=\"") + key) + "\" data=") + data) + " error=\"") + error) + "\"]")); } public function close():void{ if (_loader){ _loader.removeEventListener(Event.COMPLETE, completeHandler); _loader.removeEventListener(IOErrorEvent.IO_ERROR, errorHandler); _loader.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler); _loader.close(); _loader = null; }; error = null; callback = null; } public function deserialize(_arg1:ByteArray){ _arg1.objectEncoding = ObjectEncoding.AMF3; _arg1.uncompress(); return (_arg1.readObject()); } public static function get(_arg1:String, _arg2:Function):void{ var _local3:MochiUserData; _local3 = new MochiUserData(_arg1, _arg2); _local3.getEvent(); } public static function put(_arg1:String, _arg2, _arg3:Function):void{ var _local4:MochiUserData; _local4 = new MochiUserData(_arg1, _arg3); _local4.putEvent(_arg2); } } }//package mochi.as3
Section 157
//Music (sound.Music) package sound { import flash.display.*; import flash.events.*; import flash.utils.*; import flash.media.*; public class Music extends Sprite { public var channel:SoundChannel; public var prog1:Array; public var _vol:Number;// = 1 public var playing:Boolean;// = false public var prog2:Array; public var h:int;// = -1 public var st:Number; public var sams:Array; public var t:SoundTransform; public var level:int;// = 0 public var current:Sound; public var segs:Array; public var nt:Number; public function Music(){ h = -1; level = 0; playing = false; _vol = 1; super(); t = new SoundTransform(1); prog1 = [0, 1, 1, 3, 3, 2, 4, 3]; prog2 = [0, 5]; segs = prog1; sams = [new asiam1(), new asiam2(), new asiam3(), new asiam4(), new asiam5(), new asiam6()]; vol = 0.5; } public function stop():void{ if (playing){ level = 0; h = 0; channel.stop(); current = null; playing = false; removeEventListener(Event.ENTER_FRAME, timerHandler); }; } public function play():void{ if (!playing){ playing = true; st = (getTimer() + 500); nt = 0; addEventListener(Event.ENTER_FRAME, timerHandler); }; } public function timerHandler(_arg1:Event){ var _local2:Number; _local2 = (getTimer() - st); if (h < segs.length){ if ((((_local2 >= nt)) && ((h < (segs.length - 1))))){ if ((((h < level)) && ((h < (segs.length - 1))))){ h++; dispatchEvent(new Event(Event.CHANGE)); }; current = sams[segs[h]]; channel = current.play((_local2 - nt)); channel.soundTransform = this.t; nt = (nt + (current.length - 160)); }; if (h == (segs.length - 1)){ h = 0; }; }; } public function reset(){ stop(); play(); level = 0; segs = prog1; h = -1; } public function set vol(_arg1:Number){ if (_vol == _arg1){ return; }; _vol = _arg1; if (_arg1 > 1){ _arg1 = 1; }; if (_arg1 < 0){ _arg1 = 0; }; t.volume = _arg1; if (channel){ channel.soundTransform = t; }; } public function set prog(_arg1:int){ if (_arg1 == 1){ segs = prog1; } else { if (_arg1 == 2){ segs = prog2; }; }; } } }//package sound
Section 158
//DigitOne (sprites.DigitOne) package sprites { public class DigitOne extends GameSprite { } }//package sprites
Section 159
//GameSprite (sprites.GameSprite) package sprites { import flash.display.*; public class GameSprite extends Sprite { public var props:Object; public function GameSprite(){ props = {}; super(); } } }//package sprites
Section 160
//PhysBox (sprites.PhysBox) package sprites { public class PhysBox extends GameSprite { public function PhysBox(_arg1=null, _arg2=null){ if (_arg1 != null){ scaleX = (_arg1 / 100); }; if (_arg2 != null){ scaleY = (_arg2 / 100); }; } } }//package sprites
Section 161
//PhysBoxFill (sprites.PhysBoxFill) package sprites { public class PhysBoxFill extends GameSprite { public function PhysBoxFill(_arg1=null, _arg2=null){ scaleX = (_arg1 / 100); scaleY = (_arg2 / 100); } } }//package sprites
Section 162
//PhysCircle (sprites.PhysCircle) package sprites { public class PhysCircle extends GameSprite { public function PhysCircle(_arg1=null){ scaleX = (_arg1 / 100); scaleY = (_arg1 / 100); } } }//package sprites
Section 163
//PhysCircleFill (sprites.PhysCircleFill) package sprites { public class PhysCircleFill extends GameSprite { public function PhysCircleFill(_arg1=null){ scaleX = (_arg1 / 100); scaleY = (_arg1 / 100); } } }//package sprites
Section 164
//Player (sprites.Player) package sprites { import flash.display.*; public class Player extends GameSprite { var bdata:BitmapData; var bitmap:Bitmap; } }//package sprites
Section 165
//BasicButton (ui.BasicButton) package ui { import flash.display.*; import flash.events.*; import flash.text.*; public class BasicButton extends MovieClip { protected var _enabled:Boolean;// = true public var input_txt:TextField; public var bg_mc:MovieClip; public function BasicButton(){ _enabled = true; super(); stop(); buttonMode = true; addEventListener(MouseEvent.CLICK, onClick, false, 0, true); addEventListener(MouseEvent.ROLL_OVER, onOver, false, 0, true); addEventListener(MouseEvent.ROLL_OUT, onOut, false, 0, true); } protected function onOver(_arg1:MouseEvent){ gotoAndStop("over"); } override public function set enabled(_arg1:Boolean):void{ super.enabled = _arg1; _enabled = _arg1; if (!_arg1){ gotoAndStop("disabled"); } else { gotoAndStop("up"); }; } protected function onClick(_arg1:MouseEvent){ if (!enabled){ _arg1.stopPropagation(); _arg1.stopImmediatePropagation(); }; } protected function onOut(_arg1:MouseEvent){ if (_enabled){ gotoAndStop("up"); } else { gotoAndStop("disabled"); }; } } }//package ui
Section 166
//Clock (ui.Clock) package ui { import flash.display.*; import flash.text.*; public class Clock extends MovieClip { public var secs_txt:TextField; public var mins_txt:TextField; public function set time(_arg1:Number){ var _local2:*; var _local3:*; if (_arg1 > 0){ _local2 = Math.floor((_arg1 / 60)); _local3 = Math.floor((_arg1 % 60)); mins_txt.text = _local2; if (_local3 < 10){ secs_txt.text = ("0" + _local3); } else { secs_txt.text = _local3; }; } else { secs_txt.text = "00"; mins_txt.text = "0"; }; } } }//package ui
Section 167
//CostumeButton (ui.CostumeButton) package ui { import flash.display.*; import flash.events.*; public class CostumeButton extends BasicButton { protected var _selected:Boolean;// = false public var lock_mc:MovieClip; public var costume_mc:MovieClip; protected static var current:CostumeButton; public function CostumeButton(){ _selected = false; super(); costume_mc.visible = false; costume_mc.mouseEnabled = false; lock_mc.mouseEnabled = false; lock_mc.visible = false; } public function set selected(_arg1:Boolean){ if (!enabled){ return; }; if (((_arg1) && (!(_selected)))){ if (current != null){ current.selected = false; }; _selected = true; current = this; costume_mc.visible = true; } else { if (((_selected) && (!(_arg1)))){ if (current == this){ current = null; }; _selected = false; costume_mc.visible = false; }; }; } override protected function onOver(_arg1:MouseEvent){ if (_enabled){ gotoAndStop("over"); costume_mc.visible = true; }; } override public function set enabled(_arg1:Boolean):void{ super.enabled = _arg1; lock_mc.visible = !(_arg1); } override protected function onClick(_arg1:MouseEvent){ if (!enabled){ _arg1.stopPropagation(); _arg1.stopImmediatePropagation(); } else { super.onClick(_arg1); selected = true; }; } override protected function onOut(_arg1:MouseEvent){ if (_enabled){ gotoAndStop("up"); if (!_selected){ costume_mc.visible = false; }; }; } } }//package ui
Section 168
//DemoClip (ui.DemoClip) package ui { import flash.display.*; import flash.events.*; public class DemoClip extends MovieClip { public function DemoClip(){ addEventListener(Event.ENTER_FRAME, onFrame, false, 0, true); } public function onFrame(_arg1:Event):void{ if (currentFrame == totalFrames){ removeEventListener(Event.ENTER_FRAME, onFrame); stop(); dispatchEvent(new Event(Event.COMPLETE)); }; } } }//package ui
Section 169
//FloatingText (ui.FloatingText) package ui { import flash.display.*; import flash.events.*; import flash.text.*; public class FloatingText extends MovieClip { public var text_txt:TextField; public function FloatingText(){ addEventListener(Event.ENTER_FRAME, onFrame, false, 0, true); } public function onFrame(_arg1:Event):void{ y--; alpha = (alpha - 0.01); if (alpha == 0){ parent.removeChild(this); removeEventListener(Event.ENTER_FRAME, onFrame); }; } } }//package ui
Section 170
//InkPot (ui.InkPot) package ui { import flash.display.*; public class InkPot extends MovieClip { var canvas:Sprite; var _per:Number;// = 0 public function InkPot(){ _per = 0; super(); canvas = new Sprite(); addChild(canvas); canvas.x = 38; canvas.y = 2; } public function changeBy(_arg1:Number):void{ _per = (_per + _arg1); if (_per < 0){ _per = 0; } else { if (_per > 100){ _per = 100; }; }; draw(); } public function draw():void{ var _local1:Graphics; _local1 = canvas.graphics; _local1.clear(); _local1.lineStyle(1, 0, 1); _local1.beginFill(0); _local1.drawRect(0, 0, ((200 * _per) / 100), 15); _local1.endFill(); } public function get percent():Number{ return (_per); } public function set percent(_arg1:Number):void{ _per = _arg1; draw(); } } }//package ui
Section 171
//LevelButton (ui.LevelButton) package ui { import flash.display.*; import flash.events.*; import flash.text.*; public class LevelButton extends BasicButton { public var lock_mc:MovieClip; public var level_txt:TextField; public var score_txt:TextField; public function LevelButton(){ lock_mc.mouseEnabled = false; } override protected function onOver(_arg1:MouseEvent){ if (_enabled){ gotoAndStop("over"); }; } override public function set enabled(_arg1:Boolean):void{ super.enabled = _arg1; lock_mc.visible = !(_arg1); } } }//package ui
Section 172
//LevelSelect (ui.LevelSelect) package ui { import flash.display.*; import flash.events.*; import utils.*; import application.*; import flash.text.*; public class LevelSelect extends MovieClip { public var total_txt:TextField; public var noCostume_btn:NoCostumeButton; public var cover_mc:MovieClip; public var but9:LevelButton; public var levelScore_txt:TextField; public var high_btn:SimpleButton; public var bonus_btn:SimpleButton; protected var total:int;// = 0 public var reset_btn:SimpleButton; public var headPhonesCostume_btn:DJCostumeButton; public var lastName_txt:TextField; public var but10:LevelButton; public var lastScore_txt:TextField; public var partyCostume_btn:PartyCostumeButton; protected var costumeButtons:Array; public var suerCostume_btn:SuperCostumeButton; public var angelCostume_btn:AngelCostumeButton; public var lastPic_txt:TextField; protected var costumes:Object; public var submit_btn:SimpleButton; public var but1:LevelButton; public var but2:LevelButton; public var but4:LevelButton; public var but5:LevelButton; public var but6:LevelButton; public var but7:LevelButton; public var but8:LevelButton; public var but3:LevelButton; public var costume:String;// = "none" public function LevelSelect(){ var _local1:*; var _local2:LevelButton; costume = "none"; costumes = {noCostume_btn:"none", angelCostume_btn:"AngelEric", headPhonesCostume_btn:"HeadPhonesEric", partyCostume_btn:"PartyEric", suerCostume_btn:"SuperEric"}; total = 0; super(); _local1 = 1; while (_local1 <= 10) { _local2 = (getChildByName(("but" + _local1)) as LevelButton); _local2.enabled = false; _local2.addEventListener(MouseEvent.CLICK, onButton, false, 0, true); _local1++; }; but1.enabled = true; but1.level_txt.text = "1"; costumeButtons = [noCostume_btn, angelCostume_btn, headPhonesCostume_btn, partyCostume_btn, suerCostume_btn]; _local1 = 0; while (_local1 < costumeButtons.length) { costumeButtons[_local1].addEventListener(MouseEvent.CLICK, onCostume, false, 0, true); costumeButtons[_local1].enabled = false; _local1++; }; costumeButtons[0].enabled = true; costumeButtons[0].selected = true; bonus_btn.addEventListener(MouseEvent.CLICK, onBonus, false, 0, true); bonus_btn.visible = false; reset_btn.addEventListener(MouseEvent.CLICK, onReset, false, 0, true); submit_btn.addEventListener(MouseEvent.CLICK, onSubmit, false, 0, true); high_btn.addEventListener(MouseEvent.CLICK, onHigh, false, 0, true); } protected function onButton(_arg1:MouseEvent){ var _local2:String; _local2 = _arg1.currentTarget.name.substr(3); dispatchEvent(new LevelEvent(LevelEvent.SELECT_LEVEL, _local2)); } protected function onCostume(_arg1:MouseEvent){ costume = costumes[_arg1.currentTarget.name]; } protected function onHigh(_arg1:MouseEvent){ Mochi.instance.showHighScores(); } protected function onBonus(_arg1:MouseEvent){ dispatchEvent(new LevelEvent(LevelEvent.SELECT_LEVEL, "Bonus")); } public function displayLast(_arg1:String, _arg2:int, _arg3:int){ cover_mc.visible = false; lastName_txt.text = (("Level " + _arg1) + " complete"); lastScore_txt.text = (_arg2 + ""); lastPic_txt.text = (_arg3 + ""); levelScore_txt.text = ((_arg2 + _arg3) + ""); } public function update(_arg1:Object){ var _local2:*; var _local3:LevelButton; var _local4:int; var _local5:LevelButton; _local2 = 1; while (_local2 <= 10) { _local3 = (getChildByName(("but" + _local2)) as LevelButton); _local3.enabled = false; _local3.level_txt.text = ""; _local3.score_txt.text = ""; _local2++; }; but1.enabled = true; but1.level_txt.text = "1"; total = 0; cover_mc.visible = true; for (_local2 in _arg1) { _local3 = (getChildByName(("but" + _local2)) as LevelButton); _local4 = parseInt(_local2); if (_local3 != null){ _local3.enabled = true; _local3.level_txt.text = _local2; _local3.score_txt.text = _arg1[_local2]; total = (total + _arg1[_local2]); }; _local5 = (getChildByName(("but" + (_local4 + 1))) as LevelButton); if (_local5 != null){ _local5.enabled = true; _local5.level_txt.text = ((_local4 + 1) + ""); }; }; if (_arg1.Bonus != null){ trace(("Bonus:" + _arg1.Bonus)); total = (total + _arg1.Bonus); }; total_txt.text = (total + ""); if (total >= 120000){ bonus_btn.visible = true; } else { bonus_btn.visible = false; }; _local2 = 1; while (_local2 < costumeButtons.length) { costumeButtons[_local2].enabled = (total >= (_local2 * 25000)); _local2++; }; } protected function onReset(_arg1:MouseEvent){ dispatchEvent(new LevelEvent(LevelEvent.RESET_SCORES)); } protected function onSubmit(_arg1:MouseEvent){ Mochi.instance.submitScore(total); } } }//package ui
Section 173
//PauseScreen (ui.PauseScreen) package ui { import flash.display.*; import flash.events.*; import flash.geom.*; import application.*; public class PauseScreen extends MovieClip { public var musicSlider_mc:MovieClip; public function PauseScreen(){ musicSlider_mc.addEventListener(MouseEvent.MOUSE_DOWN, onMusicSlider, false, 0, true); } protected function onMusicSlider(_arg1:MouseEvent){ var _local2:Rectangle; _local2 = new Rectangle(101, musicSlider_mc.y, (223 - 101), 0); musicSlider_mc.startDrag(false, _local2); stage.addEventListener(MouseEvent.MOUSE_UP, onUp, false, 0, true); stage.addEventListener(MouseEvent.MOUSE_MOVE, onMove, false, 0, true); } protected function onMove(_arg1:MouseEvent){ dispatchEvent(new LevelEvent(LevelEvent.MUSIC_LEVEL, ((musicSlider_mc.x - 101) / (223 - 101)))); } public function set vol(_arg1:Number){ musicSlider_mc.x = (101 + (_arg1 * (223 - 101))); } protected function onUp(_arg1:MouseEvent){ stage.removeEventListener(MouseEvent.MOUSE_UP, onUp); stage.removeEventListener(MouseEvent.MOUSE_MOVE, onMove); musicSlider_mc.stopDrag(); } } }//package ui
Section 174
//SpeechBubble (ui.SpeechBubble) package ui { import flash.display.*; import flash.events.*; import flash.utils.*; import flash.geom.*; import flash.text.*; public class SpeechBubble extends MovieClip { public var _text:String; public var timer:Timer; public var canvas:Sprite; public var targ:Point; public var text_txt:TextField; public var delay:int;// = 0 public var showBox:Boolean;// = true public var margin:Number;// = 10 public var index:int;// = 0 public function SpeechBubble(){ index = 0; delay = 0; showBox = true; margin = 10; super(); canvas = new Sprite(); addChildAt(canvas, 0); } public function startFade(_arg1:Event){ timer.removeEventListener("timer", startFade); removeEventListener(Event.ENTER_FRAME, fadeOut); addEventListener(Event.ENTER_FRAME, fadeOut, false, 0, true); } public function fadeOut(_arg1:Event){ alpha = (alpha - 0.05); if (alpha <= 0){ removeEventListener(Event.ENTER_FRAME, fadeOut); dispatchEvent(new Event(Event.COMPLETE)); visible = false; _text = ""; }; } public function set text(_arg1:String):void{ if (_text == _arg1){ return; }; if (_arg1 == "_CLEAR"){ clear(); return; }; removeEventListener(Event.ENTER_FRAME, nextLetter); visible = true; text_txt.autoSize = TextFieldAutoSize.LEFT; text_txt.multiline = true; text_txt.htmlText = _arg1; _text = _arg1; targ = new Point((text_txt.width + margin), (text_txt.height + margin)); if (showBox){ drawBox(); }; index = 0; text_txt.x = (margin / 2); text_txt.y = (margin / 2); text_txt.htmlText = ""; startCount(); } public function setPos(_arg1, _arg2){ var _local3:Number; _local3 = 0; _arg2 = (_arg2 - 20); this.x = (_arg1 - (targ.x / 2)); this.y = ((_arg2 - targ.y) - 10); if (this.x < 0){ _local3 = this.x; this.x = 0; } else { if (this.x > (640 - targ.x)){ _local3 = ((-640 + targ.x) + this.x); this.x = (640 - targ.x); }; }; if (this.y > 30){ drawBox(_local3); } else { this.y = (this.y + (targ.y + 60)); drawBoxTop(_local3); }; } public function clear(){ if (timer != null){ timer.removeEventListener("timer", startFade); }; removeEventListener(Event.ENTER_FRAME, fadeOut); alpha = 0; } public function startCount(){ alpha = 1; index = 1; text_txt.htmlText = _text.substr(0, index); if (timer != null){ timer.removeEventListener("timer", startFade); }; removeEventListener(Event.ENTER_FRAME, fadeOut); removeEventListener(Event.ENTER_FRAME, nextLetter); addEventListener(Event.ENTER_FRAME, nextLetter, false, 0, true); } public function drawBox(_arg1:Number=0){ var _local2:Graphics; _local2 = canvas.graphics; _local2.clear(); _local2.lineStyle(1, 0, 0.5); _local2.beginFill(0xFFFFFF, 0.95); _local2.moveTo(0, 0); _local2.lineTo(targ.x, 0); _local2.lineTo(targ.x, targ.y); _local2.lineTo((((targ.x / 2) + 10) + _arg1), targ.y); _local2.lineTo(((targ.x / 2) + _arg1), (targ.y + 10)); _local2.lineTo((((targ.x / 2) - 10) + _arg1), targ.y); _local2.lineTo(0, targ.y); _local2.lineTo(0, 0); _local2.endFill(); } public function nextLetter(_arg1:Event){ if (index < _text.length){ index++; text_txt.htmlText = _text.substr(0, index); } else { removeEventListener(Event.ENTER_FRAME, nextLetter); if (timer != null){ timer.removeEventListener("timer", startFade); }; delay = (1000 + (text_txt.text.length * 12)); timer = new Timer(delay, 1); timer.addEventListener("timer", startFade, false, 0, true); timer.start(); }; } public function drawBoxTop(_arg1:Number=0){ var _local2:Graphics; _local2 = canvas.graphics; _local2.clear(); _local2.lineStyle(1, 0, 0.5); _local2.beginFill(0xFFFFFF, 0.95); _local2.moveTo(0, 0); _local2.lineTo((((targ.x / 2) - 10) + _arg1), 0); _local2.lineTo(((targ.x / 2) + _arg1), -10); _local2.lineTo((((targ.x / 2) + 10) + _arg1), 0); _local2.lineTo(targ.x, 0); _local2.lineTo(targ.x, targ.y); _local2.lineTo(0, targ.y); _local2.lineTo(0, 0); _local2.endFill(); } } }//package ui
Section 175
//FPSCounter (utils.FPSCounter) package utils { import flash.display.*; import flash.events.*; import flash.utils.*; import flash.text.*; import flash.system.*; public class FPSCounter extends Sprite { private var objects:Array; private var t:Timer; private var ticks:int; private var FPS:TextField; private var format:TextFormat; public function FPSCounter(_arg1:int=0, _arg2:int=0){ format = new TextFormat(); t = new Timer(1000); objects = new Array(); super(); this.x = _arg1; this.y = _arg2; createText(); t.addEventListener(TimerEvent.TIMER, updateFPS); addEventListener(Event.ENTER_FRAME, onEnterFrame); t.start(); } public function addNameValue(_arg1){ objects.push(_arg1); } private function createText():void{ format.font = "Verdana"; format.size = 9; FPS = new TextField(); FPS.defaultTextFormat = format; FPS.autoSize = TextFieldAutoSize.LEFT; FPS.textColor = 0xFFFFFF; FPS.background = true; FPS.backgroundColor = 0x666666; FPS.antiAliasType = "advanced"; FPS.selectable = false; FPS.text = "..."; addChild(FPS); } private function updateFPS(_arg1:TimerEvent):void{ var _local2:int; var _local3:String; var _local4:*; _local2 = Math.round(((System.totalMemory / (0x0400 * 0x0400)) * 100)); _local3 = (((("[FPS:" + ticks) + "] [MEM:") + (_local2 / 100)) + "]"); _local4 = 0; while (_local4 < objects.length) { _local3 = (_local3 + ((((" [" + objects[_local4].name) + ":") + objects[_local4].value) + "]")); _local4++; }; FPS.text = _local3; ticks = 0; } private function onEnterFrame(_arg1:Event):void{ ticks++; } } }//package utils
Section 176
//KeyTracker (utils.KeyTracker) package utils { import flash.display.*; import flash.events.*; import flash.geom.*; import flash.ui.*; public class KeyTracker implements IEventDispatcher { private var counter:int; public var holdDelay:int;// = 15 private var _stage:Stage; private var keysDoubled:Object; public var mouse:Point; private var dispatcher:EventDispatcher; private var lastPressed:Object; public var doubleDelay:int;// = 8 private var keysDown:Object; private var keysHeld:Object; public var SPACE:int;// = 32 private var lastReleased:Object; private static var _instance:KeyTracker; public function KeyTracker(){ holdDelay = 15; doubleDelay = 8; mouse = new Point(0, 0); SPACE = Keyboard.SPACE; super(); if (_instance == null){ } else { throw (new Error(("singleton enforced on " + this))); }; dispatcher = new EventDispatcher(this); keysDown = new Object(); keysDoubled = new Object(); keysHeld = new Object(); lastPressed = new Object(); lastReleased = new Object(); counter = 0; } private function registerHold(_arg1:int):void{ if (!(_arg1 in keysHeld)){ keysHeld[_arg1] = true; if (_arg1 == -1){ dispatchEvent(new KeyTrackerEvent(KeyTrackerEvent.MOUSE_HOLD, _arg1, mouse.x, mouse.y)); } else { dispatchEvent(new KeyTrackerEvent(KeyTrackerEvent.KEY_HOLD, _arg1, mouse.x, mouse.y)); }; }; } public function willTrigger(_arg1:String):Boolean{ return (dispatcher.willTrigger(_arg1)); } private function mouseMoved(_arg1:Event){ mouse.x = stage.mouseX; mouse.y = stage.mouseY; dispatchEvent(new KeyTrackerEvent(KeyTrackerEvent.MOUSE_MOVE, -1, mouse.x, mouse.y)); } public function isDown(_arg1:uint):Boolean{ return (Boolean((_arg1 in keysDown))); } private function registerUp(_arg1:int):void{ if ((_arg1 in keysDown)){ lastReleased[_arg1] = counter; if (_arg1 == -1){ dispatchEvent(new KeyTrackerEvent(KeyTrackerEvent.MOUSE_UP, _arg1, mouse.x, mouse.y)); } else { dispatchEvent(new KeyTrackerEvent(KeyTrackerEvent.KEY_UP, _arg1, mouse.x, mouse.y)); }; }; delete keysDown[_arg1]; delete keysHeld[_arg1]; delete keysDoubled[_arg1]; } public function dispose():void{ stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyPressed); stage.removeEventListener(KeyboardEvent.KEY_UP, keyReleased); stage.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMoved); stage.removeEventListener(MouseEvent.MOUSE_DOWN, mouseDowned); stage.removeEventListener(MouseEvent.MOUSE_UP, mouseUped); stage.removeEventListener(Event.ENTER_FRAME, onFrame); keysDown = null; keysHeld = null; keysDoubled = null; this.stage = null; _instance = null; _stage = null; } public function isDoubled(_arg1:uint):Boolean{ return (Boolean((_arg1 in keysDoubled))); } private function keyReleased(_arg1:KeyboardEvent):void{ var _local2:*; _local2 = _arg1.keyCode; if (_local2 == 65){ _local2 = Keyboard.LEFT; }; if (_local2 == 68){ _local2 = Keyboard.RIGHT; }; if (_local2 == 87){ _local2 = Keyboard.UP; }; if (_local2 == 83){ _local2 = Keyboard.DOWN; }; registerUp(_local2); } private function mouseUped(_arg1:Event){ registerUp(-1); } public function dispatchEvent(_arg1:Event):Boolean{ return (dispatcher.dispatchEvent(_arg1)); } private function keyPressed(_arg1:KeyboardEvent):void{ var _local2:*; _local2 = _arg1.keyCode; if (_local2 == 65){ _local2 = Keyboard.LEFT; }; if (_local2 == 68){ _local2 = Keyboard.RIGHT; }; if (_local2 == 87){ _local2 = Keyboard.UP; }; if (_local2 == 83){ _local2 = Keyboard.DOWN; }; registerDown(_local2); } private function mouseDowned(_arg1:Event){ registerDown(-1); } public function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{ dispatcher.removeEventListener(_arg1, _arg2, _arg3); } private function registerDouble(_arg1:int):void{ if (!(_arg1 in keysDoubled)){ keysHeld[_arg1] = true; if (_arg1 == -1){ dispatchEvent(new KeyTrackerEvent(KeyTrackerEvent.MOUSE_DOUBLE, _arg1, mouse.x, mouse.y)); } else { dispatchEvent(new KeyTrackerEvent(KeyTrackerEvent.KEY_DOUBLE, _arg1, mouse.x, mouse.y)); }; }; } private function onFrame(_arg1:Event){ var _local2:*; var _local3:int; for (_local2 in keysDown) { _local3 = (counter - lastPressed[_local2]); if (_local3 >= holdDelay){ registerHold(_local2); }; }; counter++; } public function alert(_arg1:String){ } public function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{ dispatcher.addEventListener(_arg1, _arg2, _arg3, _arg4); } public function hasEventListener(_arg1:String):Boolean{ return (dispatcher.hasEventListener(_arg1)); } public function set stage(_arg1:Stage):void{ _arg1.addEventListener(KeyboardEvent.KEY_DOWN, keyPressed, false, 0, true); _arg1.addEventListener(KeyboardEvent.KEY_UP, keyReleased, false, 0, true); _arg1.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoved, false, 0, true); _arg1.addEventListener(MouseEvent.MOUSE_DOWN, mouseDowned, false, 0, true); _arg1.addEventListener(MouseEvent.MOUSE_UP, mouseUped, false, 0, true); _arg1.addEventListener(Event.ENTER_FRAME, onFrame, false, 0, true); _stage = _arg1; } private function registerDown(_arg1:int):void{ var _local2:int; if (!(_arg1 in keysDown)){ keysDown[_arg1] = true; lastPressed[_arg1] = counter; if (_arg1 == -1){ dispatchEvent(new KeyTrackerEvent(KeyTrackerEvent.MOUSE_DOWN, _arg1, mouse.x, mouse.y)); } else { dispatchEvent(new KeyTrackerEvent(KeyTrackerEvent.KEY_DOWN, _arg1, mouse.x, mouse.y)); }; }; if (!(_arg1 in lastReleased)){ return; }; _local2 = (counter - lastReleased[_arg1]); if (_local2 <= doubleDelay){ registerDouble(_arg1); }; } public function get stage():Stage{ return (_stage); } public function isHeld(_arg1:uint):Boolean{ return (Boolean((_arg1 in keysHeld))); } public static function get instance():KeyTracker{ if (_instance == null){ _instance = new (KeyTracker); }; return (_instance); } } }//package utils
Section 177
//KeyTrackerEvent (utils.KeyTrackerEvent) package utils { import flash.events.*; public class KeyTrackerEvent extends Event { public var mouseX:Number; public var keyCode:int; public var mouseY:Number; public static var KEY_DOWN:String = "keydown"; public static var MOUSE_MOVE:String = "mousemove"; public static var MOUSE_OVER:String = "mouseover"; public static var KEY_DOUBLE:String = "keydouble"; public static var MOUSE_OUT:String = "mouseout"; public static var MOUSE_UP:String = "mouseup"; public static var MOUSE_HOLD:String = "mousehold"; public static var MOUSE_DOUBLE:String = "mousedouble"; public static var KEY_UP:String = "keyup"; public static var MOUSE_DOWN:String = "mousedown"; public static var KEY_HOLD:String = "keyhold"; public function KeyTrackerEvent(_arg1:String, _arg2:int=-2, _arg3:Number=0, _arg4:Number=0){ super(_arg1); this.keyCode = _arg2; this.mouseX = _arg3; this.mouseY = _arg4; } } }//package utils
Section 178
//Mochi (utils.Mochi) package utils { import flash.display.*; import mochi.as3.*; public class Mochi extends Sprite { private var _storeItems:Object; public var playerName:String; private var _mc:MovieClip; private var _bid:String; public var lastPlayerName:String; public var h:Number; public var w:Number; public var score:MochiDigits; public var modal:Sprite; private var _id:String; public var lastScore:Number; private var _res:String; private static var _instance:Mochi; private static var _active:Boolean = false; public function Mochi(_arg1:MovieClip, _arg2:String, _arg3:String, _arg4:String){ var _local5:Array; var _local6:Graphics; super(); if (_instance != null){ throw ("singleton enforced"); }; _bid = _arg4; _res = _arg2; _mc = _arg1; _instance = this; _active = true; _id = _arg3; _local5 = _arg2.split("x"); w = parseInt(_local5[0]); h = parseInt(_local5[1]); modal = new Sprite(); _local6 = modal.graphics; _local6.lineStyle(1, 0, 0.6); _local6.beginFill(0, 0.6); _local6.drawRect(0, 0, w, h); _local6.endFill(); } public function showAd(){ if (modal.parent == _mc){ _mc.removeChild(modal); }; } private function coinsError(_arg1:Object):void{ trace(("[GAME] [coinsError] " + _arg1.type)); } protected function onHighClose(){ if (modal.parent == _mc){ _mc.removeChild(modal); }; } private function storeItems(_arg1:Object):void{ var _local2:String; _storeItems = _arg1; for (_local2 in _storeItems) { trace(("[GAME] [StoreItems] " + _local2)); }; } public function showHighScores():void{ if (modal.parent == null){ _mc.addChild(modal); }; MochiScores.showLeaderboard({res:_res, onClose:onHighClose, onError:function ():void{ trace("error loading leaderboard!"); }}); } public function onPlayerInfoReceived(_arg1:Object):void{ trace("Player info received..."); if (_arg1.name != undefined){ if (_arg1.name.length > 0){ lastPlayerName = _arg1.name; }; }; if (lastPlayerName != null){ playerName = lastPlayerName; }; if (_arg1.scores != undefined){ if (_arg1.scores[_bid] != undefined){ lastScore = _arg1.scores[_bid]; }; }; } public function showLogin(_arg1:Boolean){ if (_arg1){ MochiSocial.showLoginWidget({x:(w - 190), y:(h - 30)}); } else { MochiSocial.hideLoginWidget(); }; } public function showPreGame(){ MochiAd.showPreGameAd({id:_id, res:_res, clip:_mc}); } public function submitScore(_arg1:Number):void{ var _local2:*; if (modal.parent == null){ _mc.addChild(modal); }; score.value = _arg1; _local2 = {score:score, onClose:showAd}; MochiScores.showLeaderboard(_local2); } private function onAchieve(_arg1:Object=null){ } public function initScoreBoard():void{ MochiScores.getPlayerInfo(this, "onPlayerInfoReceived"); MochiCoins.getStoreItems(); MochiScores.setBoardID(_bid); MochiEvents.addEventListener(MochiEvents.ACHIEVEMENT_RECEIVED, onAchieve); MochiEvents.startSession(_bid); playerName = ""; score = new MochiDigits(); } private function onRequest(_arg1:Object):void{ trace("scores received!"); } private function coinsEvent(_arg1:Object):void{ trace(("[GAME] [coinsEvent] " + _arg1)); } protected function onScoresReceived(_arg1:Object):void{ var _local2:Object; if (_arg1.scores != null){ trace("Scores received!"); _local2 = MochiScores.scoresArrayToObjects(_arg1.scores); } else { if (_arg1.error){ trace(("Error: " + _arg1.errorCode)); }; }; } public function connect():void{ MochiServices.connect(_id, _mc); MochiCoins.addEventListener(MochiCoins.ERROR, coinsError); MochiSocial.addEventListener(MochiSocial.LOGGED_IN, coinsEvent); MochiCoins.addEventListener(MochiCoins.ITEM_OWNED, coinsEvent); MochiCoins.addEventListener(MochiCoins.STORE_ITEMS, storeItems); } public static function get active():Boolean{ return (_active); } public static function get instance():Mochi{ return (_instance); } } }//package utils
Section 179
//AngelCostumeButton (AngelCostumeButton) package { import ui.*; public dynamic class AngelCostumeButton extends CostumeButton { } }//package
Section 180
//AngelEricCostume (AngelEricCostume) package { import flash.display.*; public dynamic class AngelEricCostume extends MovieClip { } }//package
Section 181
//asiam1 (asiam1) package { import flash.media.*; public dynamic class asiam1 extends Sound { } }//package
Section 182
//asiam2 (asiam2) package { import flash.media.*; public dynamic class asiam2 extends Sound { } }//package
Section 183
//asiam3 (asiam3) package { import flash.media.*; public dynamic class asiam3 extends Sound { } }//package
Section 184
//asiam4 (asiam4) package { import flash.media.*; public dynamic class asiam4 extends Sound { } }//package
Section 185
//asiam5 (asiam5) package { import flash.media.*; public dynamic class asiam5 extends Sound { } }//package
Section 186
//asiam6 (asiam6) package { import flash.media.*; public dynamic class asiam6 extends Sound { } }//package
Section 187
//BlackBrick (BlackBrick) package { import sprites.*; public dynamic class BlackBrick extends GameSprite { } }//package
Section 188
//circle (circle) package { import b2MovieClips.*; public dynamic class circle extends b2CircleMC { } }//package
Section 189
//ClearButton (ClearButton) package { import ui.*; public dynamic class ClearButton extends BasicButton { } }//package
Section 190
//CotinueDecorButton (CotinueDecorButton) package { import b2MovieClips.*; public dynamic class CotinueDecorButton extends DecorButton { } }//package
Section 191
//Credits (Credits) package { import b2MovieClips.*; public dynamic class Credits extends DecorGFX { } }//package
Section 192
//Decor1 (Decor1) package { import b2MovieClips.*; public dynamic class Decor1 extends DecorGFX { } }//package
Section 193
//Decor10 (Decor10) package { import b2MovieClips.*; public dynamic class Decor10 extends DecorGFX { } }//package
Section 194
//Decor10bg (Decor10bg) package { import b2MovieClips.*; public dynamic class Decor10bg extends DecorGFX { } }//package
Section 195
//Decor2 (Decor2) package { import b2MovieClips.*; public dynamic class Decor2 extends DecorGFX { } }//package
Section 196
//Decor2FG (Decor2FG) package { import b2MovieClips.*; public dynamic class Decor2FG extends DecorGFX { } }//package
Section 197
//Decor3 (Decor3) package { import b2MovieClips.*; public dynamic class Decor3 extends DecorGFX { } }//package
Section 198
//Decor3FG (Decor3FG) package { import b2MovieClips.*; public dynamic class Decor3FG extends DecorGFX { } }//package
Section 199
//Decor4 (Decor4) package { import b2MovieClips.*; public dynamic class Decor4 extends DecorGFX { } }//package
Section 200
//Decor5 (Decor5) package { import b2MovieClips.*; public dynamic class Decor5 extends DecorGFX { } }//package
Section 201
//Decor5fg (Decor5fg) package { import b2MovieClips.*; public dynamic class Decor5fg extends DecorGFX { } }//package
Section 202
//Decor6Spikes (Decor6Spikes) package { import b2MovieClips.*; public dynamic class Decor6Spikes extends DecorGFX { } }//package
Section 203
//Decor6Tet (Decor6Tet) package { import b2MovieClips.*; public dynamic class Decor6Tet extends DecorGFX { } }//package
Section 204
//Decor7 (Decor7) package { import b2MovieClips.*; public dynamic class Decor7 extends DecorGFX { } }//package
Section 205
//Decor7bg (Decor7bg) package { import b2MovieClips.*; public dynamic class Decor7bg extends DecorGFX { } }//package
Section 206
//Decor8 (Decor8) package { import b2MovieClips.*; public dynamic class Decor8 extends DecorGFX { } }//package
Section 207
//Decor8Pic (Decor8Pic) package { import b2MovieClips.*; public dynamic class Decor8Pic extends DecorGFX { } }//package
Section 208
//DecorGallery (DecorGallery) package { import b2MovieClips.*; public dynamic class DecorGallery extends DecorGFX { } }//package
Section 209
//DecorGallery2 (DecorGallery2) package { import b2MovieClips.*; public dynamic class DecorGallery2 extends DecorGFX { } }//package
Section 210
//DecorGallery3 (DecorGallery3) package { import b2MovieClips.*; public dynamic class DecorGallery3 extends DecorGFX { } }//package
Section 211
//DecorGallery4 (DecorGallery4) package { import b2MovieClips.*; public dynamic class DecorGallery4 extends DecorGFX { } }//package
Section 212
//DeleteButton (DeleteButton) package { import ui.*; public dynamic class DeleteButton extends BasicButton { } }//package
Section 213
//Demo (Demo) package { import ui.*; public dynamic class Demo extends DemoClip { } }//package
Section 214
//Demo10a (Demo10a) package { import ui.*; public dynamic class Demo10a extends DemoClip { } }//package
Section 215
//Demo10b (Demo10b) package { import ui.*; public dynamic class Demo10b extends DemoClip { } }//package
Section 216
//Demo10c (Demo10c) package { import ui.*; public dynamic class Demo10c extends DemoClip { } }//package
Section 217
//Demo2 (Demo2) package { import ui.*; public dynamic class Demo2 extends DemoClip { } }//package
Section 218
//Demo2a (Demo2a) package { import ui.*; public dynamic class Demo2a extends DemoClip { } }//package
Section 219
//Demo2b (Demo2b) package { import ui.*; public dynamic class Demo2b extends DemoClip { } }//package
Section 220
//Demo3 (Demo3) package { import ui.*; public dynamic class Demo3 extends DemoClip { } }//package
Section 221
//Demo3a (Demo3a) package { import ui.*; public dynamic class Demo3a extends DemoClip { } }//package
Section 222
//Demo4 (Demo4) package { import ui.*; public dynamic class Demo4 extends DemoClip { } }//package
Section 223
//Demo4a (Demo4a) package { import ui.*; public dynamic class Demo4a extends DemoClip { } }//package
Section 224
//Demo5 (Demo5) package { import ui.*; public dynamic class Demo5 extends DemoClip { } }//package
Section 225
//Demo5a (Demo5a) package { import ui.*; public dynamic class Demo5a extends DemoClip { } }//package
Section 226
//Demo5b (Demo5b) package { import ui.*; public dynamic class Demo5b extends DemoClip { } }//package
Section 227
//Demo5c (Demo5c) package { import ui.*; public dynamic class Demo5c extends DemoClip { } }//package
Section 228
//Demo5d (Demo5d) package { import ui.*; public dynamic class Demo5d extends DemoClip { } }//package
Section 229
//Demo6 (Demo6) package { import ui.*; public dynamic class Demo6 extends DemoClip { } }//package
Section 230
//Demo6b (Demo6b) package { import ui.*; public dynamic class Demo6b extends DemoClip { } }//package
Section 231
//Demo6c (Demo6c) package { import ui.*; public dynamic class Demo6c extends DemoClip { } }//package
Section 232
//DigitOne (DigitOne) package { import sprites.*; public dynamic class DigitOne extends DigitOne { } }//package
Section 233
//DJCostumeButton (DJCostumeButton) package { import ui.*; public dynamic class DJCostumeButton extends CostumeButton { } }//package
Section 234
//DropDownRow (DropDownRow) package { import levelEditor.*; public dynamic class DropDownRow extends DropDownRow { } }//package
Section 235
//DynamicButton (DynamicButton) package { import ui.*; public dynamic class DynamicButton extends BasicButton { } }//package
Section 236
//EraseButton (EraseButton) package { import ui.*; public dynamic class EraseButton extends BasicButton { } }//package
Section 237
//Ericade (Ericade) package { import b2MovieClips.*; public dynamic class Ericade extends DecorGFX { } }//package
Section 238
//Exit (Exit) package { import sprites.*; public dynamic class Exit extends GameSprite { } }//package
Section 239
//ExitButton (ExitButton) package { import ui.*; public dynamic class ExitButton extends BasicButton { } }//package
Section 240
//Guitar (Guitar) package { import b2MovieClips.*; public dynamic class Guitar extends DecorGFX { } }//package
Section 241
//HeadPhonesEricCostume (HeadPhonesEricCostume) package { import flash.display.*; public dynamic class HeadPhonesEricCostume extends MovieClip { } }//package
Section 242
//Ink (Ink) package { import sprites.*; public dynamic class Ink extends GameSprite { } }//package
Section 243
//InkButton (InkButton) package { import ui.*; public dynamic class InkButton extends BasicButton { } }//package
Section 244
//JointButton (JointButton) package { import ui.*; public dynamic class JointButton extends BasicButton { } }//package
Section 245
//Level11Decor (Level11Decor) package { import b2MovieClips.*; public dynamic class Level11Decor extends DecorGFX { } }//package
Section 246
//Level11FG (Level11FG) package { import b2MovieClips.*; public dynamic class Level11FG extends DecorGFX { } }//package
Section 247
//level2FG (level2FG) package { import b2MovieClips.*; public dynamic class level2FG extends DecorGFX { } }//package
Section 248
//LevelNameButton (LevelNameButton) package { import ui.*; public dynamic class LevelNameButton extends BasicButton { } }//package
Section 249
//Lv10Layout (Lv10Layout) package { import b2MovieClips.*; public dynamic class Lv10Layout extends b2CompoundFrame { public var __id95_:InkGFX; public var __id84_:TalkArea; public var __id83_:TalkArea; public var __id85_:TalkArea; public var __id98_:TalkArea; public var __id86_:TalkArea; public var __id87_:TalkArea; public var __id75_:TalkArea; public var __id76_:TalkArea; public var __id89_:TalkArea; public var __id77_:TalkArea; public var __id88_:TalkArea; public var __id78_:TalkArea; public var __id119_:segment; public var __id81_:segment; public function Lv10Layout(){ __setProp___id89__Lv10Layout_Layer8_1(); __setProp___id83__Lv10Layout_bg_1(); __setProp___id95__Lv10Layout_object_1(); __setProp___id88__Lv10Layout_Layer8_1(); __setProp___id119__Lv10Layout_fg_1(); __setProp___id87__Lv10Layout_Layer8_1(); __setProp___id86__Lv10Layout_Layer8_1(); __setProp___id85__Lv10Layout_Layer8_1(); __setProp_pic10_Lv10Layout_Layer9_1(); __setProp___id78__Lv10Layout_bg_1(); __setProp___id77__Lv10Layout_bg_1(); __setProp___id75__Lv10Layout_bg_1(); __setProp___id76__Lv10Layout_bg_1(); __setProp___id98__Lv10Layout_object_1(); __setProp___id81__Lv10Layout_bg_1(); __setProp___id84__Lv10Layout_bg_1(); } function __setProp___id83__Lv10Layout_bg_1(){ try { __id83_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id83_.hintLevel = 0; __id83_.isVisible = false; __id83_.kills = false; __id83_.noDraw = true; __id83_.repeat = 1; __id83_.showHint = false; __id83_.speech = "You can't draw in this area."; __id83_.userData = ""; try { __id83_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id84__Lv10Layout_bg_1(){ try { __id84_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id84_.hintLevel = 0; __id84_.isVisible = false; __id84_.kills = true; __id84_.noDraw = false; __id84_.repeat = 0; __id84_.showHint = false; __id84_.speech = ""; __id84_.userData = ""; try { __id84_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id89__Lv10Layout_Layer8_1(){ try { __id89_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id89_.hintLevel = 5; __id89_.isVisible = false; __id89_.kills = false; __id89_.noDraw = false; __id89_.repeat = 0; __id89_.showHint = false; __id89_.speech = ""; __id89_.userData = ""; try { __id89_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id86__Lv10Layout_Layer8_1(){ try { __id86_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id86_.hintLevel = 2; __id86_.isVisible = false; __id86_.kills = false; __id86_.noDraw = false; __id86_.repeat = 0; __id86_.showHint = false; __id86_.speech = ""; __id86_.userData = ""; try { __id86_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id75__Lv10Layout_bg_1(){ try { __id75_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id75_.hintLevel = 0; __id75_.isVisible = false; __id75_.kills = true; __id75_.noDraw = false; __id75_.repeat = 0; __id75_.showHint = false; __id75_.speech = ""; __id75_.userData = ""; try { __id75_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id76__Lv10Layout_bg_1(){ try { __id76_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id76_.hintLevel = 0; __id76_.isVisible = false; __id76_.kills = true; __id76_.noDraw = false; __id76_.repeat = 0; __id76_.showHint = false; __id76_.speech = ""; __id76_.userData = ""; try { __id76_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id77__Lv10Layout_bg_1(){ try { __id77_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id77_.hintLevel = 0; __id77_.isVisible = false; __id77_.kills = true; __id77_.noDraw = false; __id77_.repeat = 0; __id77_.showHint = false; __id77_.speech = ""; __id77_.userData = ""; try { __id77_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id98__Lv10Layout_object_1(){ try { __id98_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id98_.hintLevel = 0; __id98_.isVisible = true; __id98_.kills = true; __id98_.noDraw = false; __id98_.repeat = 0; __id98_.showHint = false; __id98_.speech = ""; __id98_.userData = ""; try { __id98_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id78__Lv10Layout_bg_1(){ try { __id78_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id78_.hintLevel = 0; __id78_.isVisible = false; __id78_.kills = true; __id78_.noDraw = false; __id78_.repeat = 0; __id78_.showHint = false; __id78_.speech = ""; __id78_.userData = ""; try { __id78_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp_pic10_Lv10Layout_Layer9_1(){ try { pic10["componentInspectorSetting"] = true; } catch(e:Error) { }; pic10.picture = "p10"; pic10.scaleEric = 2.1; pic10.targetX = 0; pic10.targetY = -19; pic10.userData = ""; try { pic10["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id87__Lv10Layout_Layer8_1(){ try { __id87_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id87_.hintLevel = 3; __id87_.isVisible = false; __id87_.kills = false; __id87_.noDraw = false; __id87_.repeat = 0; __id87_.showHint = false; __id87_.speech = ""; __id87_.userData = ""; try { __id87_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id95__Lv10Layout_object_1(){ try { __id95_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id95_.ink = 70; __id95_.userData = ""; try { __id95_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id88__Lv10Layout_Layer8_1(){ try { __id88_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id88_.hintLevel = 4; __id88_.isVisible = false; __id88_.kills = false; __id88_.noDraw = false; __id88_.repeat = 0; __id88_.showHint = false; __id88_.speech = ""; __id88_.userData = ""; try { __id88_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id85__Lv10Layout_Layer8_1(){ try { __id85_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id85_.hintLevel = 1; __id85_.isVisible = false; __id85_.kills = false; __id85_.noDraw = false; __id85_.repeat = 0; __id85_.showHint = false; __id85_.speech = ""; __id85_.userData = ""; try { __id85_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id119__Lv10Layout_fg_1(){ try { __id119_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id119_.density = 0.05; __id119_.friction = 0.3; __id119_.isSensor = false; __id119_.isVisible = true; __id119_.restitution = 0.1; __id119_.userData = ""; try { __id119_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id81__Lv10Layout_bg_1(){ try { __id81_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id81_.density = 0.1; __id81_.friction = 0.1; __id81_.isSensor = false; __id81_.isVisible = true; __id81_.restitution = 0.2; __id81_.userData = ""; try { __id81_["componentInspectorSetting"] = false; } catch(e:Error) { }; } } }//package
Section 250
//Lv11Layout (Lv11Layout) package { import b2MovieClips.*; public dynamic class Lv11Layout extends b2CompoundFrame { public var __id148_:staticsegment; public var __id136_:staticsegment; public var __id124_:TalkArea; public var __id233_:staticsegment; public var __id221_:staticsegment; public var __id149_:staticsegment; public var __id137_:staticsegment; public var __id234_:staticsegment; public var __id222_:staticsegment; public var __id210_:staticsegment; public var __id138_:staticsegment; public var __id126_:InkGFX; public var __id235_:staticsegment; public var __id223_:staticsegment; public var __id211_:staticsegment; public var __id139_:staticsegment; public var __id127_:InkGFX; public var __id224_:staticsegment; public var __id212_:staticsegment; public var __id200_:staticsegment; public var __id236_:staticsegment; public var __id128_:InkGFX; public var __id213_:staticsegment; public var __id201_:staticsegment; public var __id237_:staticsegment; public var __id225_:staticsegment; public var __id238_:staticsegment; public var __id226_:staticsegment; public var __id214_:staticsegment; public var __id202_:staticsegment; public var __id129_:TalkArea; public var __id227_:staticsegment; public var __id215_:staticsegment; public var __id203_:staticsegment; public var __id239_:staticsegment; public var __id216_:staticsegment; public var __id228_:staticsegment; public var __id204_:staticsegment; public var __id229_:staticsegment; public var __id205_:staticsegment; public var __id217_:staticsegment; public var __id206_:staticsegment; public var __id218_:staticsegment; public var __id207_:staticsegment; public var __id219_:staticsegment; public var __id208_:staticsegment; public var __id209_:staticsegment; public var __id190_:staticsegment; public var __id191_:staticsegment; public var __id192_:staticsegment; public var __id180_:staticsegment; public var __id193_:staticsegment; public var __id181_:staticsegment; public var __id182_:staticsegment; public var __id170_:staticsegment; public var __id195_:staticsegment; public var __id183_:staticsegment; public var __id171_:staticsegment; public var __id184_:staticsegment; public var __id172_:staticsegment; public var __id160_:staticsegment; public var __id196_:staticsegment; public var __id197_:staticsegment; public var __id185_:staticsegment; public var __id173_:staticsegment; public var __id161_:staticsegment; public var __id186_:staticsegment; public var __id174_:staticsegment; public var __id162_:staticsegment; public var __id150_:staticsegment; public var __id198_:staticsegment; public var __id199_:staticsegment; public var __id187_:staticsegment; public var __id151_:staticsegment; public var __id175_:staticsegment; public var __id163_:staticsegment; public var __id188_:staticsegment; public var __id164_:staticsegment; public var __id152_:staticsegment; public var __id140_:staticsegment; public var __id176_:staticsegment; public var __id177_:staticsegment; public var __id165_:staticsegment; public var __id153_:staticsegment; public var __id141_:staticsegment; public var __id189_:staticsegment; public var __id178_:staticsegment; public var __id142_:staticsegment; public var __id130_:staticsegment; public var __id154_:staticsegment; public var __id179_:staticsegment; public var __id167_:staticsegment; public var __id155_:staticsegment; public var __id143_:staticsegment; public var __id131_:staticsegment; public var __id168_:staticsegment; public var __id156_:staticsegment; public var __id144_:staticsegment; public var __id132_:staticsegment; public var __id169_:staticsegment; public var __id157_:staticsegment; public var __id145_:staticsegment; public var __id133_:staticsegment; public var __id230_:staticsegment; public var __id158_:staticsegment; public var __id146_:staticsegment; public var __id134_:staticsegment; public var __id231_:staticsegment; public var __id159_:staticsegment; public var __id232_:staticsegment; public var __id135_:staticsegment; public var __id220_:staticsegment; public var __id147_:staticsegment; public function Lv11Layout(){ __setProp___id129__Lv11Layout_object_1(); __setProp___id236__Lv11Layout_bg_1(); __setProp___id232__Lv11Layout_bg_1(); __setProp___id226__Lv11Layout_bg_1(); __setProp___id222__Lv11Layout_bg_1(); __setProp___id190__Lv11Layout_bg_1(); __setProp___id185__Lv11Layout_bg_1(); __setProp___id177__Lv11Layout_bg_1(); __setProp___id175__Lv11Layout_bg_1(); __setProp___id173__Lv11Layout_bg_1(); __setProp___id171__Lv11Layout_bg_1(); __setProp___id167__Lv11Layout_bg_1(); __setProp___id165__Lv11Layout_bg_1(); __setProp___id163__Lv11Layout_bg_1(); __setProp___id161__Lv11Layout_bg_1(); __setProp___id238__Lv11Layout_bg_1(); __setProp___id237__Lv11Layout_bg_1(); __setProp___id233__Lv11Layout_bg_1(); __setProp___id227__Lv11Layout_bg_1(); __setProp___id223__Lv11Layout_bg_1(); __setProp___id218__Lv11Layout_bg_1(); __setProp___id195__Lv11Layout_bg_1(); __setProp___id191__Lv11Layout_bg_1(); __setProp___id184__Lv11Layout_bg_1(); __setProp___id180__Lv11Layout_bg_1(); __setProp___id176__Lv11Layout_bg_1(); __setProp___id174__Lv11Layout_bg_1(); __setProp___id172__Lv11Layout_bg_1(); __setProp___id170__Lv11Layout_bg_1(); __setProp___id164__Lv11Layout_bg_1(); __setProp___id162__Lv11Layout_bg_1(); __setProp___id160__Lv11Layout_bg_1(); __setProp___id169__Lv11Layout_bg_1(); __setProp___id157__Lv11Layout_bg_1(); __setProp___id155__Lv11Layout_bg_1(); __setProp___id153__Lv11Layout_bg_1(); __setProp___id151__Lv11Layout_bg_1(); __setProp___id149__Lv11Layout_bg_1(); __setProp___id147__Lv11Layout_bg_1(); __setProp___id145__Lv11Layout_bg_1(); __setProp___id143__Lv11Layout_bg_1(); __setProp___id141__Lv11Layout_bg_1(); __setProp___id216__Lv11Layout_bg_1(); __setProp___id212__Lv11Layout_bg_1(); __setProp___id206__Lv11Layout_bg_1(); __setProp___id202__Lv11Layout_bg_1(); __setProp___id181__Lv11Layout_bg_1(); __setProp___id229__Lv11Layout_bg_1(); __setProp___id209__Lv11Layout_bg_1(); __setProp___id179__Lv11Layout_bg_1(); __setProp___id168__Lv11Layout_bg_1(); __setProp___id159__Lv11Layout_bg_1(); __setProp___id156__Lv11Layout_bg_1(); __setProp___id154__Lv11Layout_bg_1(); __setProp___id152__Lv11Layout_bg_1(); __setProp___id150__Lv11Layout_bg_1(); __setProp___id148__Lv11Layout_bg_1(); __setProp___id146__Lv11Layout_bg_1(); __setProp___id144__Lv11Layout_bg_1(); __setProp___id140__Lv11Layout_bg_1(); __setProp___id139__Lv11Layout_bg_1(); __setProp___id217__Lv11Layout_bg_1(); __setProp___id213__Lv11Layout_bg_1(); __setProp___id207__Lv11Layout_bg_1(); __setProp___id203__Lv11Layout_bg_1(); __setProp_s11d_Lv11Layout_object_1(); __setProp___id239__Lv11Layout_bg_1(); __setProp___id228__Lv11Layout_bg_1(); __setProp___id219__Lv11Layout_bg_1(); __setProp___id208__Lv11Layout_bg_1(); __setProp___id178__Lv11Layout_bg_1(); __setProp___id158__Lv11Layout_bg_1(); __setProp___id142__Lv11Layout_bg_1(); __setProp___id138__Lv11Layout_bg_1(); __setProp___id234__Lv11Layout_bg_1(); __setProp___id230__Lv11Layout_bg_1(); __setProp___id224__Lv11Layout_bg_1(); __setProp___id220__Lv11Layout_bg_1(); __setProp___id196__Lv11Layout_bg_1(); __setProp___id192__Lv11Layout_bg_1(); __setProp___id189__Lv11Layout_bg_1(); __setProp___id187__Lv11Layout_bg_1(); __setProp___id183__Lv11Layout_bg_1(); __setProp___id137__Lv11Layout_bg_1(); __setProp___id135__Lv11Layout_bg_1(); __setProp___id133__Lv11Layout_bg_1(); __setProp___id131__Lv11Layout_bg_1(); __setProp_s11e_Lv11Layout_bg_1(); __setProp___id235__Lv11Layout_bg_1(); __setProp___id231__Lv11Layout_bg_1(); __setProp___id225__Lv11Layout_bg_1(); __setProp___id221__Lv11Layout_bg_1(); __setProp___id198__Lv11Layout_bg_1(); __setProp___id197__Lv11Layout_bg_1(); __setProp___id193__Lv11Layout_bg_1(); __setProp___id188__Lv11Layout_bg_1(); __setProp___id186__Lv11Layout_bg_1(); __setProp___id182__Lv11Layout_bg_1(); __setProp___id136__Lv11Layout_bg_1(); __setProp___id134__Lv11Layout_bg_1(); __setProp___id132__Lv11Layout_bg_1(); __setProp___id130__Lv11Layout_bg_1(); __setProp___id127__Lv11Layout_object_1(); __setProp___id126__Lv11Layout_object_1(); __setProp_s11a_Lv11Layout_bg_1(); __setProp___id214__Lv11Layout_bg_1(); __setProp___id210__Lv11Layout_bg_1(); __setProp___id204__Lv11Layout_bg_1(); __setProp___id200__Lv11Layout_bg_1(); __setProp___id199__Lv11Layout_bg_1(); __setProp___id128__Lv11Layout_object_1(); __setProp___id215__Lv11Layout_bg_1(); __setProp___id211__Lv11Layout_bg_1(); __setProp___id205__Lv11Layout_bg_1(); __setProp___id201__Lv11Layout_bg_1(); __setProp___id124__Lv11Layout_object_1(); } function __setProp___id176__Lv11Layout_bg_1(){ try { __id176_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id176_.density = 1; __id176_.friction = 0.7; __id176_.isSensor = false; __id176_.isVisible = true; __id176_.restitution = 0.8; __id176_.userData = "WhiteBrick"; try { __id176_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id141__Lv11Layout_bg_1(){ try { __id141_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id141_.density = 1; __id141_.friction = 0.7; __id141_.isSensor = false; __id141_.isVisible = true; __id141_.restitution = 0.8; __id141_.userData = "WhiteBrick"; try { __id141_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id207__Lv11Layout_bg_1(){ try { __id207_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id207_.density = 1; __id207_.friction = 0.7; __id207_.isSensor = false; __id207_.isVisible = true; __id207_.restitution = 0.8; __id207_.userData = "WhiteBrick"; try { __id207_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id178__Lv11Layout_bg_1(){ try { __id178_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id178_.density = 1; __id178_.friction = 0.7; __id178_.isSensor = false; __id178_.isVisible = true; __id178_.restitution = 0.8; __id178_.userData = "WhiteBrick"; try { __id178_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id154__Lv11Layout_bg_1(){ try { __id154_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id154_.density = 1; __id154_.friction = 0.7; __id154_.isSensor = false; __id154_.isVisible = true; __id154_.restitution = 0.8; __id154_.userData = "WhiteBrick"; try { __id154_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id130__Lv11Layout_bg_1(){ try { __id130_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id130_.density = 1; __id130_.friction = 0.7; __id130_.isSensor = false; __id130_.isVisible = true; __id130_.restitution = 0.8; __id130_.userData = "WhiteBrick"; try { __id130_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id167__Lv11Layout_bg_1(){ try { __id167_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id167_.density = 1; __id167_.friction = 0.7; __id167_.isSensor = false; __id167_.isVisible = true; __id167_.restitution = 0.8; __id167_.userData = "WhiteBrick"; try { __id167_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id143__Lv11Layout_bg_1(){ try { __id143_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id143_.density = 1; __id143_.friction = 0.7; __id143_.isSensor = false; __id143_.isVisible = true; __id143_.restitution = 0.8; __id143_.userData = "WhiteBrick"; try { __id143_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id209__Lv11Layout_bg_1(){ try { __id209_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id209_.density = 1; __id209_.friction = 0.7; __id209_.isSensor = false; __id209_.isVisible = true; __id209_.restitution = 0.8; __id209_.userData = "WhiteBrick"; try { __id209_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id156__Lv11Layout_bg_1(){ try { __id156_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id156_.density = 1; __id156_.friction = 0.7; __id156_.isSensor = false; __id156_.isVisible = true; __id156_.restitution = 0.8; __id156_.userData = "WhiteBrick"; try { __id156_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id132__Lv11Layout_bg_1(){ try { __id132_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id132_.density = 1; __id132_.friction = 0.7; __id132_.isSensor = false; __id132_.isVisible = true; __id132_.restitution = 0.8; __id132_.userData = "WhiteBrick"; try { __id132_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id169__Lv11Layout_bg_1(){ try { __id169_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id169_.density = 1; __id169_.friction = 0.7; __id169_.isSensor = false; __id169_.isVisible = true; __id169_.restitution = 0.8; __id169_.userData = "WhiteBrick"; try { __id169_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id145__Lv11Layout_bg_1(){ try { __id145_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id145_.density = 1; __id145_.friction = 0.7; __id145_.isSensor = false; __id145_.isVisible = true; __id145_.restitution = 0.8; __id145_.userData = "WhiteBrick"; try { __id145_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id158__Lv11Layout_bg_1(){ try { __id158_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id158_.density = 1; __id158_.friction = 0.7; __id158_.isSensor = false; __id158_.isVisible = true; __id158_.restitution = 0.8; __id158_.userData = "WhiteBrick"; try { __id158_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id134__Lv11Layout_bg_1(){ try { __id134_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id134_.density = 1; __id134_.friction = 0.7; __id134_.isSensor = false; __id134_.isVisible = true; __id134_.restitution = 0.8; __id134_.userData = "WhiteBrick"; try { __id134_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id231__Lv11Layout_bg_1(){ try { __id231_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id231_.density = 1; __id231_.friction = 0.7; __id231_.isSensor = false; __id231_.isVisible = true; __id231_.restitution = 0.8; __id231_.userData = "WhiteBrick"; try { __id231_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id127__Lv11Layout_object_1(){ try { __id127_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id127_.ink = 50; __id127_.userData = ""; try { __id127_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id191__Lv11Layout_bg_1(){ try { __id191_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id191_.density = 1; __id191_.friction = 0.7; __id191_.isSensor = false; __id191_.isVisible = true; __id191_.restitution = 0.8; __id191_.userData = "WhiteBrick"; try { __id191_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id147__Lv11Layout_bg_1(){ try { __id147_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id147_.density = 1; __id147_.friction = 0.7; __id147_.isSensor = false; __id147_.isVisible = true; __id147_.restitution = 0.8; __id147_.userData = "WhiteBrick"; try { __id147_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id124__Lv11Layout_object_1(){ try { __id124_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id124_.hintLevel = 0; __id124_.isVisible = true; __id124_.kills = true; __id124_.noDraw = false; __id124_.repeat = 0; __id124_.showHint = false; __id124_.speech = ""; __id124_.userData = ""; try { __id124_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id220__Lv11Layout_bg_1(){ try { __id220_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id220_.density = 1; __id220_.friction = 0.7; __id220_.isSensor = false; __id220_.isVisible = true; __id220_.restitution = 0.8; __id220_.userData = "WhiteBrick"; try { __id220_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id136__Lv11Layout_bg_1(){ try { __id136_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id136_.density = 1; __id136_.friction = 0.7; __id136_.isSensor = false; __id136_.isVisible = true; __id136_.restitution = 0.8; __id136_.userData = "WhiteBrick"; try { __id136_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id233__Lv11Layout_bg_1(){ try { __id233_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id233_.density = 1; __id233_.friction = 0.7; __id233_.isSensor = false; __id233_.isVisible = true; __id233_.restitution = 0.8; __id233_.userData = "WhiteBrick"; try { __id233_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id180__Lv11Layout_bg_1(){ try { __id180_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id180_.density = 1; __id180_.friction = 0.7; __id180_.isSensor = false; __id180_.isVisible = true; __id180_.restitution = 0.8; __id180_.userData = "WhiteBrick"; try { __id180_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id149__Lv11Layout_bg_1(){ try { __id149_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id149_.density = 1; __id149_.friction = 0.7; __id149_.isSensor = false; __id149_.isVisible = true; __id149_.restitution = 0.8; __id149_.userData = "WhiteBrick"; try { __id149_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id222__Lv11Layout_bg_1(){ try { __id222_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id222_.density = 1; __id222_.friction = 0.7; __id222_.isSensor = false; __id222_.isVisible = true; __id222_.restitution = 0.8; __id222_.userData = "WhiteBrick"; try { __id222_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id193__Lv11Layout_bg_1(){ try { __id193_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id193_.density = 1; __id193_.friction = 0.7; __id193_.isSensor = false; __id193_.isVisible = true; __id193_.restitution = 0.8; __id193_.userData = "WhiteBrick"; try { __id193_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id211__Lv11Layout_bg_1(){ try { __id211_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id211_.density = 1; __id211_.friction = 0.7; __id211_.isSensor = false; __id211_.isVisible = true; __id211_.restitution = 0.8; __id211_.userData = "WhiteBrick"; try { __id211_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id138__Lv11Layout_bg_1(){ try { __id138_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id138_.density = 1; __id138_.friction = 0.7; __id138_.isSensor = false; __id138_.isVisible = true; __id138_.restitution = 0.8; __id138_.userData = "WhiteBrick"; try { __id138_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id235__Lv11Layout_bg_1(){ try { __id235_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id235_.density = 1; __id235_.friction = 0.7; __id235_.isSensor = false; __id235_.isVisible = true; __id235_.restitution = 0.8; __id235_.userData = "WhiteBrick"; try { __id235_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id182__Lv11Layout_bg_1(){ try { __id182_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id182_.density = 1; __id182_.friction = 0.7; __id182_.isSensor = false; __id182_.isVisible = true; __id182_.restitution = 0.8; __id182_.userData = "WhiteBrick"; try { __id182_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id224__Lv11Layout_bg_1(){ try { __id224_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id224_.density = 1; __id224_.friction = 0.7; __id224_.isSensor = false; __id224_.isVisible = true; __id224_.restitution = 0.8; __id224_.userData = "WhiteBrick"; try { __id224_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id195__Lv11Layout_bg_1(){ try { __id195_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id195_.density = 1; __id195_.friction = 0.7; __id195_.isSensor = false; __id195_.isVisible = true; __id195_.restitution = 0.8; __id195_.userData = "WhiteBrick"; try { __id195_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id171__Lv11Layout_bg_1(){ try { __id171_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id171_.density = 1; __id171_.friction = 0.7; __id171_.isSensor = false; __id171_.isVisible = true; __id171_.restitution = 0.1; __id171_.userData = "WhiteBrick"; try { __id171_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id200__Lv11Layout_bg_1(){ try { __id200_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id200_.density = 1; __id200_.friction = 0.7; __id200_.isSensor = false; __id200_.isVisible = true; __id200_.restitution = 0.8; __id200_.userData = "WhiteBrick"; try { __id200_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id213__Lv11Layout_bg_1(){ try { __id213_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id213_.density = 1; __id213_.friction = 0.7; __id213_.isSensor = false; __id213_.isVisible = true; __id213_.restitution = 0.8; __id213_.userData = "WhiteBrick"; try { __id213_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id237__Lv11Layout_bg_1(){ try { __id237_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id237_.density = 1; __id237_.friction = 0.7; __id237_.isSensor = false; __id237_.isVisible = true; __id237_.restitution = 0.8; __id237_.userData = "WhiteBrick"; try { __id237_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id184__Lv11Layout_bg_1(){ try { __id184_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id184_.density = 1; __id184_.friction = 0.7; __id184_.isSensor = false; __id184_.isVisible = true; __id184_.restitution = 0.8; __id184_.userData = "WhiteBrick"; try { __id184_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id160__Lv11Layout_bg_1(){ try { __id160_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id160_.density = 1; __id160_.friction = 0.7; __id160_.isSensor = false; __id160_.isVisible = true; __id160_.restitution = 0.8; __id160_.userData = "WhiteBrick"; try { __id160_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id226__Lv11Layout_bg_1(){ try { __id226_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id226_.density = 1; __id226_.friction = 0.7; __id226_.isSensor = false; __id226_.isVisible = true; __id226_.restitution = 0.8; __id226_.userData = "WhiteBrick"; try { __id226_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id202__Lv11Layout_bg_1(){ try { __id202_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id202_.density = 1; __id202_.friction = 0.7; __id202_.isSensor = false; __id202_.isVisible = true; __id202_.restitution = 0.8; __id202_.userData = "WhiteBrick"; try { __id202_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id173__Lv11Layout_bg_1(){ try { __id173_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id173_.density = 1; __id173_.friction = 0.7; __id173_.isSensor = false; __id173_.isVisible = true; __id173_.restitution = 0.8; __id173_.userData = "WhiteBrick"; try { __id173_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id197__Lv11Layout_bg_1(){ try { __id197_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id197_.density = 1; __id197_.friction = 0.7; __id197_.isSensor = false; __id197_.isVisible = true; __id197_.restitution = 0.8; __id197_.userData = "WhiteBrick"; try { __id197_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id215__Lv11Layout_bg_1(){ try { __id215_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id215_.density = 1; __id215_.friction = 0.7; __id215_.isSensor = false; __id215_.isVisible = true; __id215_.restitution = 0.8; __id215_.userData = "WhiteBrick"; try { __id215_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id239__Lv11Layout_bg_1(){ try { __id239_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id239_.density = 1; __id239_.friction = 0.7; __id239_.isSensor = false; __id239_.isVisible = true; __id239_.restitution = 0.8; __id239_.userData = "WhiteBrick"; try { __id239_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id186__Lv11Layout_bg_1(){ try { __id186_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id186_.density = 1; __id186_.friction = 0.7; __id186_.isSensor = false; __id186_.isVisible = true; __id186_.restitution = 0.8; __id186_.userData = "WhiteBrick"; try { __id186_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id162__Lv11Layout_bg_1(){ try { __id162_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id162_.density = 1; __id162_.friction = 0.7; __id162_.isSensor = false; __id162_.isVisible = true; __id162_.restitution = 0.8; __id162_.userData = "WhiteBrick"; try { __id162_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id228__Lv11Layout_bg_1(){ try { __id228_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id228_.density = 1; __id228_.friction = 0.7; __id228_.isSensor = false; __id228_.isVisible = true; __id228_.restitution = 0.8; __id228_.userData = "WhiteBrick"; try { __id228_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id204__Lv11Layout_bg_1(){ try { __id204_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id204_.density = 1; __id204_.friction = 0.7; __id204_.isSensor = false; __id204_.isVisible = true; __id204_.restitution = 0.8; __id204_.userData = "WhiteBrick"; try { __id204_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id199__Lv11Layout_bg_1(){ try { __id199_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id199_.density = 1; __id199_.friction = 0.7; __id199_.isSensor = false; __id199_.isVisible = true; __id199_.restitution = 0.8; __id199_.userData = "WhiteBrick"; try { __id199_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id175__Lv11Layout_bg_1(){ try { __id175_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id175_.density = 1; __id175_.friction = 0.7; __id175_.isSensor = false; __id175_.isVisible = true; __id175_.restitution = 0.8; __id175_.userData = "WhiteBrick"; try { __id175_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp_s11d_Lv11Layout_object_1(){ try { s11d["componentInspectorSetting"] = true; } catch(e:Error) { }; s11d.hintLevel = 2; s11d.isVisible = false; s11d.kills = false; s11d.noDraw = false; s11d.repeat = 1; s11d.showHint = false; s11d.speech = "Boost!"; s11d.userData = ""; try { s11d["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id151__Lv11Layout_bg_1(){ try { __id151_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id151_.density = 1; __id151_.friction = 0.7; __id151_.isSensor = false; __id151_.isVisible = true; __id151_.restitution = 0.8; __id151_.userData = "WhiteBrick"; try { __id151_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id140__Lv11Layout_bg_1(){ try { __id140_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id140_.density = 1; __id140_.friction = 0.7; __id140_.isSensor = false; __id140_.isVisible = true; __id140_.restitution = 0.8; __id140_.userData = "WhiteBrick"; try { __id140_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id164__Lv11Layout_bg_1(){ try { __id164_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id164_.density = 1; __id164_.friction = 0.7; __id164_.isSensor = false; __id164_.isVisible = true; __id164_.restitution = 0.8; __id164_.userData = "WhiteBrick"; try { __id164_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id217__Lv11Layout_bg_1(){ try { __id217_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id217_.density = 1; __id217_.friction = 0.7; __id217_.isSensor = false; __id217_.isVisible = true; __id217_.restitution = 0.8; __id217_.userData = "WhiteBrick"; try { __id217_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id188__Lv11Layout_bg_1(){ try { __id188_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id188_.density = 1; __id188_.friction = 0.7; __id188_.isSensor = false; __id188_.isVisible = true; __id188_.restitution = 0.8; __id188_.userData = "WhiteBrick"; try { __id188_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id129__Lv11Layout_object_1(){ try { __id129_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id129_.hintLevel = 1; __id129_.isVisible = false; __id129_.kills = false; __id129_.noDraw = false; __id129_.repeat = 1; __id129_.showHint = false; __id129_.speech = "Let's score big in this bonus level!<br>Jump up and hit the bricks..."; __id129_.userData = ""; try { __id129_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id153__Lv11Layout_bg_1(){ try { __id153_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id153_.density = 1; __id153_.friction = 0.7; __id153_.isSensor = false; __id153_.isVisible = true; __id153_.restitution = 0.8; __id153_.userData = "WhiteBrick"; try { __id153_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id206__Lv11Layout_bg_1(){ try { __id206_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id206_.density = 1; __id206_.friction = 0.7; __id206_.isSensor = false; __id206_.isVisible = true; __id206_.restitution = 0.8; __id206_.userData = "WhiteBrick"; try { __id206_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id126__Lv11Layout_object_1(){ try { __id126_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id126_.ink = 50; __id126_.userData = ""; try { __id126_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id219__Lv11Layout_bg_1(){ try { __id219_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id219_.density = 1; __id219_.friction = 0.7; __id219_.isSensor = false; __id219_.isVisible = true; __id219_.restitution = 0.8; __id219_.userData = "WhiteBrick"; try { __id219_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id177__Lv11Layout_bg_1(){ try { __id177_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id177_.density = 1; __id177_.friction = 0.7; __id177_.isSensor = false; __id177_.isVisible = true; __id177_.restitution = 0.8; __id177_.userData = "WhiteBrick"; try { __id177_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id142__Lv11Layout_bg_1(){ try { __id142_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id142_.density = 1; __id142_.friction = 0.7; __id142_.isSensor = false; __id142_.isVisible = true; __id142_.restitution = 0.1; __id142_.userData = "WhiteBrick"; try { __id142_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id208__Lv11Layout_bg_1(){ try { __id208_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id208_.density = 1; __id208_.friction = 0.7; __id208_.isSensor = false; __id208_.isVisible = true; __id208_.restitution = 0.8; __id208_.userData = "WhiteBrick"; try { __id208_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id179__Lv11Layout_bg_1(){ try { __id179_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id179_.density = 1; __id179_.friction = 0.7; __id179_.isSensor = false; __id179_.isVisible = true; __id179_.restitution = 0.8; __id179_.userData = "WhiteBrick"; try { __id179_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id155__Lv11Layout_bg_1(){ try { __id155_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id155_.density = 1; __id155_.friction = 0.7; __id155_.isSensor = false; __id155_.isVisible = true; __id155_.restitution = 0.8; __id155_.userData = "WhiteBrick"; try { __id155_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id131__Lv11Layout_bg_1(){ try { __id131_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id131_.density = 1; __id131_.friction = 0.7; __id131_.isSensor = false; __id131_.isVisible = true; __id131_.restitution = 0.8; __id131_.userData = "WhiteBrick"; try { __id131_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id144__Lv11Layout_bg_1(){ try { __id144_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id144_.density = 1; __id144_.friction = 0.7; __id144_.isSensor = false; __id144_.isVisible = true; __id144_.restitution = 0.8; __id144_.userData = "WhiteBrick"; try { __id144_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id168__Lv11Layout_bg_1(){ try { __id168_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id168_.density = 1; __id168_.friction = 0.7; __id168_.isSensor = false; __id168_.isVisible = true; __id168_.restitution = 0.8; __id168_.userData = "WhiteBrick"; try { __id168_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id133__Lv11Layout_bg_1(){ try { __id133_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id133_.density = 1; __id133_.friction = 0.7; __id133_.isSensor = false; __id133_.isVisible = true; __id133_.restitution = 0.8; __id133_.userData = "WhiteBrick"; try { __id133_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id157__Lv11Layout_bg_1(){ try { __id157_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id157_.density = 1; __id157_.friction = 0.7; __id157_.isSensor = false; __id157_.isVisible = true; __id157_.restitution = 0.8; __id157_.userData = "WhiteBrick"; try { __id157_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id230__Lv11Layout_bg_1(){ try { __id230_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id230_.density = 1; __id230_.friction = 0.7; __id230_.isSensor = false; __id230_.isVisible = true; __id230_.restitution = 0.8; __id230_.userData = "WhiteBrick"; try { __id230_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id146__Lv11Layout_bg_1(){ try { __id146_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id146_.density = 1; __id146_.friction = 0.7; __id146_.isSensor = false; __id146_.isVisible = true; __id146_.restitution = 0.8; __id146_.userData = "WhiteBrick"; try { __id146_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id190__Lv11Layout_bg_1(){ try { __id190_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id190_.density = 1; __id190_.friction = 0.7; __id190_.isSensor = false; __id190_.isVisible = true; __id190_.restitution = 0.8; __id190_.userData = "WhiteBrick"; try { __id190_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id159__Lv11Layout_bg_1(){ try { __id159_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id159_.density = 1; __id159_.friction = 0.7; __id159_.isSensor = false; __id159_.isVisible = true; __id159_.restitution = 0.8; __id159_.userData = "WhiteBrick"; try { __id159_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id135__Lv11Layout_bg_1(){ try { __id135_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id135_.density = 1; __id135_.friction = 0.7; __id135_.isSensor = false; __id135_.isVisible = true; __id135_.restitution = 0.8; __id135_.userData = "WhiteBrick"; try { __id135_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id232__Lv11Layout_bg_1(){ try { __id232_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id232_.density = 1; __id232_.friction = 0.7; __id232_.isSensor = false; __id232_.isVisible = true; __id232_.restitution = 0.8; __id232_.userData = "WhiteBrick"; try { __id232_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp_s11e_Lv11Layout_bg_1(){ try { s11e["componentInspectorSetting"] = true; } catch(e:Error) { }; s11e.hintLevel = 2; s11e.isVisible = false; s11e.kills = false; s11e.noDraw = false; s11e.repeat = 1; s11e.showHint = false; s11e.speech = "Level Two1"; s11e.userData = ""; try { s11e["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp_s11a_Lv11Layout_bg_1(){ try { s11a["componentInspectorSetting"] = true; } catch(e:Error) { }; s11a.hintLevel = 2; s11a.isVisible = false; s11a.kills = false; s11a.noDraw = false; s11a.repeat = 1; s11a.showHint = false; s11a.speech = "Last Level!"; s11a.userData = ""; try { s11a["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id148__Lv11Layout_bg_1(){ try { __id148_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id148_.density = 1; __id148_.friction = 0.7; __id148_.isSensor = false; __id148_.isVisible = true; __id148_.restitution = 0.8; __id148_.userData = "WhiteBrick"; try { __id148_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id221__Lv11Layout_bg_1(){ try { __id221_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id221_.density = 1; __id221_.friction = 0.7; __id221_.isSensor = false; __id221_.isVisible = true; __id221_.restitution = 0.8; __id221_.userData = "WhiteBrick"; try { __id221_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id137__Lv11Layout_bg_1(){ try { __id137_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id137_.density = 1; __id137_.friction = 0.7; __id137_.isSensor = false; __id137_.isVisible = true; __id137_.restitution = 0.8; __id137_.userData = "WhiteBrick"; try { __id137_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id234__Lv11Layout_bg_1(){ try { __id234_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id234_.density = 1; __id234_.friction = 0.7; __id234_.isSensor = false; __id234_.isVisible = true; __id234_.restitution = 0.8; __id234_.userData = "WhiteBrick"; try { __id234_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id192__Lv11Layout_bg_1(){ try { __id192_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id192_.density = 1; __id192_.friction = 0.7; __id192_.isSensor = false; __id192_.isVisible = true; __id192_.restitution = 0.8; __id192_.userData = "WhiteBrick"; try { __id192_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id210__Lv11Layout_bg_1(){ try { __id210_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id210_.density = 1; __id210_.friction = 0.7; __id210_.isSensor = false; __id210_.isVisible = true; __id210_.restitution = 0.8; __id210_.userData = "WhiteBrick"; try { __id210_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id181__Lv11Layout_bg_1(){ try { __id181_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id181_.density = 1; __id181_.friction = 0.7; __id181_.isSensor = false; __id181_.isVisible = true; __id181_.restitution = 0.1; __id181_.userData = "WhiteBrick"; try { __id181_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id223__Lv11Layout_bg_1(){ try { __id223_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id223_.density = 1; __id223_.friction = 0.7; __id223_.isSensor = false; __id223_.isVisible = true; __id223_.restitution = 0.8; __id223_.userData = "WhiteBrick"; try { __id223_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id170__Lv11Layout_bg_1(){ try { __id170_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id170_.density = 1; __id170_.friction = 0.7; __id170_.isSensor = false; __id170_.isVisible = true; __id170_.restitution = 0.8; __id170_.userData = "WhiteBrick"; try { __id170_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id139__Lv11Layout_bg_1(){ try { __id139_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id139_.density = 1; __id139_.friction = 0.7; __id139_.isSensor = false; __id139_.isVisible = true; __id139_.restitution = 0.8; __id139_.userData = "WhiteBrick"; try { __id139_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id236__Lv11Layout_bg_1(){ try { __id236_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id236_.density = 1; __id236_.friction = 0.7; __id236_.isSensor = false; __id236_.isVisible = true; __id236_.restitution = 0.8; __id236_.userData = "WhiteBrick"; try { __id236_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id183__Lv11Layout_bg_1(){ try { __id183_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id183_.density = 1; __id183_.friction = 0.7; __id183_.isSensor = false; __id183_.isVisible = true; __id183_.restitution = 0.8; __id183_.userData = "WhiteBrick"; try { __id183_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id212__Lv11Layout_bg_1(){ try { __id212_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id212_.density = 1; __id212_.friction = 0.7; __id212_.isSensor = false; __id212_.isVisible = true; __id212_.restitution = 0.8; __id212_.userData = "WhiteBrick"; try { __id212_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id128__Lv11Layout_object_1(){ try { __id128_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id128_.ink = 50; __id128_.userData = ""; try { __id128_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id225__Lv11Layout_bg_1(){ try { __id225_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id225_.density = 1; __id225_.friction = 0.7; __id225_.isSensor = false; __id225_.isVisible = true; __id225_.restitution = 0.8; __id225_.userData = "WhiteBrick"; try { __id225_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id201__Lv11Layout_bg_1(){ try { __id201_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id201_.density = 1; __id201_.friction = 0.7; __id201_.isSensor = false; __id201_.isVisible = true; __id201_.restitution = 0.8; __id201_.userData = "WhiteBrick"; try { __id201_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id196__Lv11Layout_bg_1(){ try { __id196_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id196_.density = 1; __id196_.friction = 0.7; __id196_.isSensor = false; __id196_.isVisible = true; __id196_.restitution = 0.8; __id196_.userData = "WhiteBrick"; try { __id196_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id172__Lv11Layout_bg_1(){ try { __id172_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id172_.density = 1; __id172_.friction = 0.7; __id172_.isSensor = false; __id172_.isVisible = true; __id172_.restitution = 0.8; __id172_.userData = "WhiteBrick"; try { __id172_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id238__Lv11Layout_bg_1(){ try { __id238_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id238_.density = 1; __id238_.friction = 0.7; __id238_.isSensor = false; __id238_.isVisible = true; __id238_.restitution = 0.8; __id238_.userData = "WhiteBrick"; try { __id238_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id214__Lv11Layout_bg_1(){ try { __id214_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id214_.density = 1; __id214_.friction = 0.7; __id214_.isSensor = false; __id214_.isVisible = true; __id214_.restitution = 0.8; __id214_.userData = "WhiteBrick"; try { __id214_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id161__Lv11Layout_bg_1(){ try { __id161_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id161_.density = 1; __id161_.friction = 0.7; __id161_.isSensor = false; __id161_.isVisible = true; __id161_.restitution = 0.8; __id161_.userData = "WhiteBrick"; try { __id161_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id185__Lv11Layout_bg_1(){ try { __id185_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id185_.density = 1; __id185_.friction = 0.7; __id185_.isSensor = false; __id185_.isVisible = true; __id185_.restitution = 0.8; __id185_.userData = "WhiteBrick"; try { __id185_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id227__Lv11Layout_bg_1(){ try { __id227_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id227_.density = 1; __id227_.friction = 0.7; __id227_.isSensor = false; __id227_.isVisible = true; __id227_.restitution = 0.8; __id227_.userData = "WhiteBrick"; try { __id227_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id150__Lv11Layout_bg_1(){ try { __id150_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id150_.density = 1; __id150_.friction = 0.7; __id150_.isSensor = false; __id150_.isVisible = true; __id150_.restitution = 0.8; __id150_.userData = "WhiteBrick"; try { __id150_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id174__Lv11Layout_bg_1(){ try { __id174_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id174_.density = 1; __id174_.friction = 0.7; __id174_.isSensor = false; __id174_.isVisible = true; __id174_.restitution = 0.8; __id174_.userData = "WhiteBrick"; try { __id174_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id216__Lv11Layout_bg_1(){ try { __id216_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id216_.density = 1; __id216_.friction = 0.7; __id216_.isSensor = false; __id216_.isVisible = true; __id216_.restitution = 0.8; __id216_.userData = "WhiteBrick"; try { __id216_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id198__Lv11Layout_bg_1(){ try { __id198_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id198_.density = 1; __id198_.friction = 0.7; __id198_.isSensor = false; __id198_.isVisible = true; __id198_.restitution = 0.8; __id198_.userData = "WhiteBrick"; try { __id198_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id187__Lv11Layout_bg_1(){ try { __id187_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id187_.density = 1; __id187_.friction = 0.7; __id187_.isSensor = false; __id187_.isVisible = true; __id187_.restitution = 0.8; __id187_.userData = "WhiteBrick"; try { __id187_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id203__Lv11Layout_bg_1(){ try { __id203_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id203_.density = 1; __id203_.friction = 0.7; __id203_.isSensor = false; __id203_.isVisible = true; __id203_.restitution = 0.8; __id203_.userData = "WhiteBrick"; try { __id203_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id229__Lv11Layout_bg_1(){ try { __id229_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id229_.density = 1; __id229_.friction = 0.7; __id229_.isSensor = false; __id229_.isVisible = true; __id229_.restitution = 0.8; __id229_.userData = "WhiteBrick"; try { __id229_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id205__Lv11Layout_bg_1(){ try { __id205_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id205_.density = 1; __id205_.friction = 0.7; __id205_.isSensor = false; __id205_.isVisible = true; __id205_.restitution = 0.8; __id205_.userData = "WhiteBrick"; try { __id205_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id163__Lv11Layout_bg_1(){ try { __id163_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id163_.density = 1; __id163_.friction = 0.7; __id163_.isSensor = false; __id163_.isVisible = true; __id163_.restitution = 0.8; __id163_.userData = "WhiteBrick"; try { __id163_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id152__Lv11Layout_bg_1(){ try { __id152_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id152_.density = 1; __id152_.friction = 0.7; __id152_.isSensor = false; __id152_.isVisible = true; __id152_.restitution = 0.8; __id152_.userData = "WhiteBrick"; try { __id152_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id218__Lv11Layout_bg_1(){ try { __id218_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id218_.density = 1; __id218_.friction = 0.7; __id218_.isSensor = false; __id218_.isVisible = true; __id218_.restitution = 0.8; __id218_.userData = "WhiteBrick"; try { __id218_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id189__Lv11Layout_bg_1(){ try { __id189_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id189_.density = 1; __id189_.friction = 0.7; __id189_.isSensor = false; __id189_.isVisible = true; __id189_.restitution = 0.8; __id189_.userData = "WhiteBrick"; try { __id189_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id165__Lv11Layout_bg_1(){ try { __id165_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id165_.density = 1; __id165_.friction = 0.7; __id165_.isSensor = false; __id165_.isVisible = true; __id165_.restitution = 0.8; __id165_.userData = "WhiteBrick"; try { __id165_["componentInspectorSetting"] = false; } catch(e:Error) { }; } } }//package
Section 251
//Lv1Layout (Lv1Layout) package { import b2MovieClips.*; public dynamic class Lv1Layout extends b2CompoundFrame { public var __id283_:segment; public var __id286_:TalkArea; public var __id287_:TalkArea; public function Lv1Layout(){ __setProp_a3_Lv1Layout_Layer1_1(); __setProp_a6_Lv1Layout_Layer1_1(); __setProp_a2_Lv1Layout_Layer1_1(); __setProp___id283__Lv1Layout_Layer1_1(); __setProp_a4_Lv1Layout_Layer1_1(); __setProp___id287__Lv1Layout_Layer1_1(); __setProp_a5_Lv1Layout_Layer1_1(); __setProp___id286__Lv1Layout_Layer1_1(); __setProp_a1_Lv1Layout_Layer1_1(); __setProp_p1_Lv1Layout_Layer1_1(); } function __setProp_a5_Lv1Layout_Layer1_1(){ try { a5["componentInspectorSetting"] = true; } catch(e:Error) { }; a5.hintLevel = 0; a5.isVisible = false; a5.kills = false; a5.noDraw = false; a5.repeat = 1; a5.showHint = false; a5.speech = "This is a cartoon from my book!<br>Jump into the frame<br>to complete the picture."; a5.userData = ""; try { a5["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id287__Lv1Layout_Layer1_1(){ try { __id287_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id287_.hintLevel = 0; __id287_.isVisible = false; __id287_.kills = false; __id287_.noDraw = false; __id287_.repeat = 10000; __id287_.showHint = false; __id287_.speech = "Press ESC or P to pause<br>and adjust the volume."; __id287_.userData = ""; try { __id287_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp_a6_Lv1Layout_Layer1_1(){ try { a6["componentInspectorSetting"] = true; } catch(e:Error) { }; a6.hintLevel = 0; a6.isVisible = true; a6.kills = false; a6.noDraw = false; a6.repeat = 1; a6.showHint = false; a6.speech = "Now move around.<br>A caption will appear when<br>you find the right spot."; a6.userData = ""; try { a6["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp_a1_Lv1Layout_Layer1_1(){ try { a1["componentInspectorSetting"] = true; } catch(e:Error) { }; a1.hintLevel = 1; a1.isVisible = false; a1.kills = false; a1.noDraw = false; a1.repeat = 1; a1.showHint = false; a1.speech = "Press LEFT & RIGHT to move me"; a1.userData = ""; try { a1["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id286__Lv1Layout_Layer1_1(){ try { __id286_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id286_.hintLevel = 3; __id286_.isVisible = false; __id286_.kills = false; __id286_.noDraw = false; __id286_.repeat = 0; __id286_.showHint = false; __id286_.speech = ""; __id286_.userData = ""; try { __id286_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp_a2_Lv1Layout_Layer1_1(){ try { a2["componentInspectorSetting"] = true; } catch(e:Error) { }; a2.hintLevel = 0; a2.isVisible = false; a2.kills = false; a2.noDraw = false; a2.repeat = 10000; a2.showHint = false; a2.speech = "I can't jump up here!<br>Maybe that INK can help..."; a2.userData = ""; try { a2["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp_p1_Lv1Layout_Layer1_1(){ try { p1["componentInspectorSetting"] = true; } catch(e:Error) { }; p1.picture = "pic1"; p1.scaleEric = 0.4; p1.targetX = 12; p1.targetY = 8; p1.userData = ""; try { p1["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp_a3_Lv1Layout_Layer1_1(){ try { a3["componentInspectorSetting"] = true; } catch(e:Error) { }; a3.hintLevel = 0; a3.isVisible = false; a3.kills = false; a3.noDraw = false; a3.repeat = 1; a3.showHint = false; a3.speech = "Press UP and LEFT to<br>jump over the block"; a3.userData = ""; try { a3["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp_a4_Lv1Layout_Layer1_1(){ try { a4["componentInspectorSetting"] = true; } catch(e:Error) { }; a4.hintLevel = 2; a4.isVisible = false; a4.kills = false; a4.noDraw = false; a4.repeat = 1; a4.showHint = true; a4.speech = ""; a4.userData = ""; try { a4["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id283__Lv1Layout_Layer1_1(){ try { __id283_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id283_.density = 0.5; __id283_.friction = 0.7; __id283_.isSensor = false; __id283_.isVisible = true; __id283_.restitution = 0.2; __id283_.userData = ""; try { __id283_["componentInspectorSetting"] = false; } catch(e:Error) { }; } } }//package
Section 252
//Lv2Layout (Lv2Layout) package { import b2MovieClips.*; public dynamic class Lv2Layout extends b2CompoundFrame { public var __id308_:TalkArea; public var __id310_:InkGFX; public var __id311_:TalkArea; public var __id312_:TalkArea; public var __id313_:TalkArea; public var __id314_:segment; public var __id304_:InkGFX; public var __id288_:TalkArea; public var __id306_:InkGFX; public var __id307_:TalkArea; public var __id309_:TalkArea; public function Lv2Layout(){ __setProp___id310__Lv2Layout_Layer1_1(); __setProp___id314__Lv2Layout_Layer4_1(); __setProp___id309__Lv2Layout_Layer1_1(); __setProp___id308__Lv2Layout_Layer1_1(); __setProp_pic2_Lv2Layout_Layer3_1(); __setProp___id306__Lv2Layout_Layer1_1(); __setProp___id311__Lv2Layout_Layer1_1(); __setProp___id304__Lv2Layout_Layer1_1(); __setProp___id313__Lv2Layout_Layer1_1(); __setProp___id307__Lv2Layout_Layer1_1(); __setProp___id312__Lv2Layout_Layer1_1(); __setProp___id288__Lv2Layout_Layer1_1(); } function __setProp___id307__Lv2Layout_Layer1_1(){ try { __id307_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id307_.hintLevel = 0; __id307_.isVisible = false; __id307_.kills = true; __id307_.noDraw = false; __id307_.repeat = 0; __id307_.showHint = false; __id307_.speech = ""; __id307_.userData = ""; try { __id307_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id310__Lv2Layout_Layer1_1(){ try { __id310_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id310_.ink = 20; __id310_.userData = ""; try { __id310_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id306__Lv2Layout_Layer1_1(){ try { __id306_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id306_.ink = 20; __id306_.userData = ""; try { __id306_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id313__Lv2Layout_Layer1_1(){ try { __id313_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id313_.hintLevel = 1; __id313_.isVisible = false; __id313_.kills = false; __id313_.noDraw = false; __id313_.repeat = 0; __id313_.showHint = false; __id313_.speech = ""; __id313_.userData = ""; try { __id313_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id309__Lv2Layout_Layer1_1(){ try { __id309_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id309_.hintLevel = 0; __id309_.isVisible = false; __id309_.kills = true; __id309_.noDraw = false; __id309_.repeat = 0; __id309_.showHint = false; __id309_.speech = ""; __id309_.userData = ""; try { __id309_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id312__Lv2Layout_Layer1_1(){ try { __id312_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id312_.hintLevel = 0; __id312_.isVisible = false; __id312_.kills = false; __id312_.noDraw = false; __id312_.repeat = 1; __id312_.showHint = false; __id312_.speech = "You can't draw in this area.<br>Maybe that box up there can help..."; __id312_.userData = ""; try { __id312_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id288__Lv2Layout_Layer1_1(){ try { __id288_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id288_.hintLevel = 2; __id288_.isVisible = false; __id288_.kills = false; __id288_.noDraw = false; __id288_.repeat = 0; __id288_.showHint = false; __id288_.speech = ""; __id288_.userData = ""; try { __id288_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp_pic2_Lv2Layout_Layer3_1(){ try { pic2["componentInspectorSetting"] = true; } catch(e:Error) { }; pic2.picture = "p2"; pic2.scaleEric = 1.2; pic2.targetX = 0; pic2.targetY = 0; pic2.userData = ""; try { pic2["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id314__Lv2Layout_Layer4_1(){ try { __id314_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id314_.density = 0.03; __id314_.friction = 0.7; __id314_.isSensor = false; __id314_.isVisible = true; __id314_.restitution = 0.2; __id314_.userData = ""; try { __id314_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id304__Lv2Layout_Layer1_1(){ try { __id304_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id304_.ink = 50; __id304_.userData = ""; try { __id304_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id308__Lv2Layout_Layer1_1(){ try { __id308_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id308_.hintLevel = 0; __id308_.isVisible = false; __id308_.kills = false; __id308_.noDraw = false; __id308_.repeat = 1; __id308_.showHint = false; __id308_.speech = "Those spikes will kill me.<br>Be careful! "; __id308_.userData = ""; try { __id308_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id311__Lv2Layout_Layer1_1(){ try { __id311_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id311_.hintLevel = 0; __id311_.isVisible = false; __id311_.kills = false; __id311_.noDraw = true; __id311_.repeat = 0; __id311_.showHint = false; __id311_.speech = ""; __id311_.userData = ""; try { __id311_["componentInspectorSetting"] = false; } catch(e:Error) { }; } } }//package
Section 253
//Lv3Layout (Lv3Layout) package { import b2MovieClips.*; public dynamic class Lv3Layout extends b2CompoundFrame { public var __id330_:b2JointMC; public var __id343_:InkGFX; public var __id332_:b2JointMC; public var __id320_:staticsegment; public var __id334_:b2JointMC; public var __id322_:b2JointMC; public var __id348_:TalkArea; public var __id324_:b2JointMC; public var __id336_:b2JointMC; public var __id349_:TalkArea; public var __id326_:b2JointMC; public var __id338_:b2JointMC; public var __id315_:TalkArea; public var __id339_:staticsegment; public var __id328_:b2JointMC; public var __id318_:segment; public function Lv3Layout(){ __setProp_pic5_Lv3Layout_Layer1_1(); __setProp___id348__Lv3Layout_Layer1_1(); __setProp___id343__Lv3Layout_Layer1_1(); __setProp___id349__Lv3Layout_Layer1_1(); __setProp___id339__Lv3Layout_Layer1_1(); __setProp___id336__Lv3Layout_Layer1_1(); __setProp___id334__Lv3Layout_Layer1_1(); __setProp___id332__Lv3Layout_Layer1_1(); __setProp___id330__Lv3Layout_Layer1_1(); __setProp___id328__Lv3Layout_Layer1_1(); __setProp___id326__Lv3Layout_Layer1_1(); __setProp___id324__Lv3Layout_Layer1_1(); __setProp___id322__Lv3Layout_Layer1_1(); __setProp___id338__Lv3Layout_Layer1_1(); __setProp___id318__Lv3Layout_Layer1_1(); __setProp___id320__Lv3Layout_Layer1_1(); __setProp___id315__Lv3Layout_Layer1_1(); } function __setProp___id348__Lv3Layout_Layer1_1(){ try { __id348_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id348_.hintLevel = 1; __id348_.isVisible = false; __id348_.kills = false; __id348_.noDraw = false; __id348_.repeat = 0; __id348_.showHint = false; __id348_.speech = ""; __id348_.userData = ""; try { __id348_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id318__Lv3Layout_Layer1_1(){ try { __id318_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id318_.density = 1; __id318_.friction = 1; __id318_.isSensor = false; __id318_.isVisible = true; __id318_.restitution = 0.2; __id318_.userData = ""; try { __id318_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id332__Lv3Layout_Layer1_1(){ try { __id332_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id332_.EnableMotor = true; __id332_.MaxMotorTorque = 1000; __id332_.MotorSpeed = -5; __id332_.userData = ""; try { __id332_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id336__Lv3Layout_Layer1_1(){ try { __id336_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id336_.EnableMotor = true; __id336_.MaxMotorTorque = 1000; __id336_.MotorSpeed = -5; __id336_.userData = ""; try { __id336_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id343__Lv3Layout_Layer1_1(){ try { __id343_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id343_.ink = 15; __id343_.userData = ""; try { __id343_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id320__Lv3Layout_Layer1_1(){ try { __id320_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id320_.density = 1; __id320_.friction = 0.1; __id320_.isSensor = false; __id320_.isVisible = true; __id320_.restitution = 0.2; __id320_.userData = ""; try { __id320_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id324__Lv3Layout_Layer1_1(){ try { __id324_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id324_.EnableMotor = true; __id324_.MaxMotorTorque = 1000; __id324_.MotorSpeed = -5; __id324_.userData = ""; try { __id324_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id328__Lv3Layout_Layer1_1(){ try { __id328_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id328_.EnableMotor = true; __id328_.MaxMotorTorque = 1000; __id328_.MotorSpeed = -5; __id328_.userData = ""; try { __id328_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id339__Lv3Layout_Layer1_1(){ try { __id339_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id339_.density = 1; __id339_.friction = 0.1; __id339_.isSensor = false; __id339_.isVisible = true; __id339_.restitution = 0.2; __id339_.userData = ""; try { __id339_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp_pic5_Lv3Layout_Layer1_1(){ try { pic5["componentInspectorSetting"] = true; } catch(e:Error) { }; pic5.picture = "p5"; pic5.scaleEric = 1.1; pic5.targetX = 2; pic5.targetY = -17; pic5.userData = ""; try { pic5["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id334__Lv3Layout_Layer1_1(){ try { __id334_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id334_.EnableMotor = true; __id334_.MaxMotorTorque = 1000; __id334_.MotorSpeed = -5; __id334_.userData = ""; try { __id334_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id330__Lv3Layout_Layer1_1(){ try { __id330_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id330_.EnableMotor = true; __id330_.MaxMotorTorque = 1000; __id330_.MotorSpeed = -5; __id330_.userData = ""; try { __id330_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id338__Lv3Layout_Layer1_1(){ try { __id338_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id338_.EnableMotor = true; __id338_.MaxMotorTorque = 1000; __id338_.MotorSpeed = -5; __id338_.userData = ""; try { __id338_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id349__Lv3Layout_Layer1_1(){ try { __id349_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id349_.hintLevel = 3; __id349_.isVisible = false; __id349_.kills = false; __id349_.noDraw = false; __id349_.repeat = 1; __id349_.showHint = false; __id349_.speech = "air get!"; __id349_.userData = ""; try { __id349_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id315__Lv3Layout_Layer1_1(){ try { __id315_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id315_.hintLevel = 2; __id315_.isVisible = false; __id315_.kills = false; __id315_.noDraw = false; __id315_.repeat = 0; __id315_.showHint = false; __id315_.speech = ""; __id315_.userData = ""; try { __id315_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id326__Lv3Layout_Layer1_1(){ try { __id326_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id326_.EnableMotor = true; __id326_.MaxMotorTorque = 1000; __id326_.MotorSpeed = -5; __id326_.userData = ""; try { __id326_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id322__Lv3Layout_Layer1_1(){ try { __id322_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id322_.EnableMotor = true; __id322_.MaxMotorTorque = 1000; __id322_.MotorSpeed = -5; __id322_.userData = ""; try { __id322_["componentInspectorSetting"] = false; } catch(e:Error) { }; } } }//package
Section 254
//Lv4Layout (Lv4Layout) package { import b2MovieClips.*; public dynamic class Lv4Layout extends b2CompoundFrame { public var __id357_:segment; public var __id371_:TalkArea; public var __id372_:TalkArea; public var __id361_:b2JointMC; public var __id362_:InkGFX; public var __id350_:TalkArea; public var __id351_:TalkArea; public function Lv4Layout(){ __setProp___id371__Lv4Layout_Layer1_1(); __setProp_pic4_Lv4Layout_Layer1_1(); __setProp___id361__Lv4Layout_Layer1_1(); __setProp___id350__Lv4Layout_Layer1_1(); __setProp___id372__Lv4Layout_Layer1_1(); __setProp___id351__Lv4Layout_Layer1_1(); __setProp___id362__Lv4Layout_Layer1_1(); __setProp___id357__Lv4Layout_Layer1_1(); } function __setProp___id362__Lv4Layout_Layer1_1(){ try { __id362_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id362_.ink = 20; __id362_.userData = ""; try { __id362_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp_pic4_Lv4Layout_Layer1_1(){ try { pic4["componentInspectorSetting"] = true; } catch(e:Error) { }; pic4.picture = "p4"; pic4.scaleEric = 0.5; pic4.targetX = -2; pic4.targetY = 7; pic4.userData = ""; try { pic4["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id350__Lv4Layout_Layer1_1(){ try { __id350_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id350_.hintLevel = 2; __id350_.isVisible = false; __id350_.kills = false; __id350_.noDraw = false; __id350_.repeat = 0; __id350_.showHint = false; __id350_.speech = ""; __id350_.userData = ""; try { __id350_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id361__Lv4Layout_Layer1_1(){ try { __id361_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id361_.EnableMotor = true; __id361_.MaxMotorTorque = 100; __id361_.MotorSpeed = -0.3; __id361_.userData = ""; try { __id361_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id372__Lv4Layout_Layer1_1(){ try { __id372_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id372_.hintLevel = 3; __id372_.isVisible = false; __id372_.kills = false; __id372_.noDraw = false; __id372_.repeat = 0; __id372_.showHint = false; __id372_.speech = ""; __id372_.userData = ""; try { __id372_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id357__Lv4Layout_Layer1_1(){ try { __id357_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id357_.density = 0.3; __id357_.friction = 0.7; __id357_.isSensor = false; __id357_.isVisible = true; __id357_.restitution = 0.2; __id357_.userData = ""; try { __id357_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id371__Lv4Layout_Layer1_1(){ try { __id371_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id371_.hintLevel = 0; __id371_.isVisible = false; __id371_.kills = false; __id371_.noDraw = false; __id371_.repeat = 1; __id371_.showHint = false; __id371_.speech = "Don't jump...<br>just roll off<br>at the top"; __id371_.userData = ""; try { __id371_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id351__Lv4Layout_Layer1_1(){ try { __id351_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id351_.hintLevel = 1; __id351_.isVisible = false; __id351_.kills = false; __id351_.noDraw = false; __id351_.repeat = 0; __id351_.showHint = false; __id351_.speech = ""; __id351_.userData = ""; try { __id351_["componentInspectorSetting"] = false; } catch(e:Error) { }; } } }//package
Section 255
//Lv5Layout (Lv5Layout) package { import b2MovieClips.*; public dynamic class Lv5Layout extends b2CompoundFrame { public var __id391_:staticsegment; public var __id381_:segment; public var __id400_:TalkArea; public var __id401_:TalkArea; public var __id384_:segment; public var __id402_:TalkArea; public var __id373_:TalkArea; public var __id403_:TalkArea; public var __id404_:TalkArea; public var __id389_:segment; public function Lv5Layout(){ __setProp___id391__Lv5Layout_Layer1_1(); __setProp___id400__Lv5Layout_Layer1_1(); __setProp___id389__Lv5Layout_Layer1_1(); __setProp___id384__Lv5Layout_Layer1_1(); __setProp_pic3_Lv5Layout_Layer5_1(); __setProp___id404__Lv5Layout_Layer1_1(); __setProp___id401__Lv5Layout_Layer1_1(); __setProp___id381__Lv5Layout_Layer1_1(); __setProp___id373__Lv5Layout_Layer1_1(); __setProp___id403__Lv5Layout_Layer1_1(); __setProp___id402__Lv5Layout_Layer1_1(); } function __setProp___id401__Lv5Layout_Layer1_1(){ try { __id401_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id401_.hintLevel = 2; __id401_.isVisible = false; __id401_.kills = false; __id401_.noDraw = false; __id401_.repeat = 0; __id401_.showHint = false; __id401_.speech = ""; __id401_.userData = ""; try { __id401_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id373__Lv5Layout_Layer1_1(){ try { __id373_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id373_.hintLevel = 3; __id373_.isVisible = false; __id373_.kills = false; __id373_.noDraw = false; __id373_.repeat = 0; __id373_.showHint = false; __id373_.speech = ""; __id373_.userData = ""; try { __id373_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id384__Lv5Layout_Layer1_1(){ try { __id384_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id384_.density = 0.05; __id384_.friction = 0.1; __id384_.isSensor = false; __id384_.isVisible = true; __id384_.restitution = 0.2; __id384_.userData = ""; try { __id384_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id391__Lv5Layout_Layer1_1(){ try { __id391_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id391_.density = 1; __id391_.friction = 0.7; __id391_.isSensor = false; __id391_.isVisible = true; __id391_.restitution = 0; __id391_.userData = ""; try { __id391_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id400__Lv5Layout_Layer1_1(){ try { __id400_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id400_.hintLevel = 1; __id400_.isVisible = false; __id400_.kills = false; __id400_.noDraw = false; __id400_.repeat = 1; __id400_.showHint = false; __id400_.speech = "Sometimes I have to USE OBJECTS<br>to get to the Exit!"; __id400_.userData = ""; try { __id400_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id404__Lv5Layout_Layer1_1(){ try { __id404_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id404_.hintLevel = 6; __id404_.isVisible = false; __id404_.kills = false; __id404_.noDraw = false; __id404_.repeat = 0; __id404_.showHint = false; __id404_.speech = ""; __id404_.userData = ""; try { __id404_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id403__Lv5Layout_Layer1_1(){ try { __id403_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id403_.hintLevel = 5; __id403_.isVisible = false; __id403_.kills = false; __id403_.noDraw = false; __id403_.repeat = 0; __id403_.showHint = false; __id403_.speech = ""; __id403_.userData = ""; try { __id403_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp_pic3_Lv5Layout_Layer5_1(){ try { pic3["componentInspectorSetting"] = true; } catch(e:Error) { }; pic3.picture = "p3"; pic3.scaleEric = 1.4; pic3.targetX = -3; pic3.targetY = -15; pic3.userData = ""; try { pic3["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id402__Lv5Layout_Layer1_1(){ try { __id402_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id402_.hintLevel = 4; __id402_.isVisible = false; __id402_.kills = false; __id402_.noDraw = false; __id402_.repeat = 0; __id402_.showHint = false; __id402_.speech = ""; __id402_.userData = ""; try { __id402_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id381__Lv5Layout_Layer1_1(){ try { __id381_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id381_.density = 0.1; __id381_.friction = 0.5; __id381_.isSensor = false; __id381_.isVisible = true; __id381_.restitution = 0.2; __id381_.userData = ""; try { __id381_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id389__Lv5Layout_Layer1_1(){ try { __id389_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id389_.density = 1; __id389_.friction = 0.7; __id389_.isSensor = false; __id389_.isVisible = true; __id389_.restitution = 0; __id389_.userData = ""; try { __id389_["componentInspectorSetting"] = false; } catch(e:Error) { }; } } }//package
Section 256
//Lv6Layout (Lv6Layout) package { import b2MovieClips.*; public dynamic class Lv6Layout extends b2CompoundFrame { public var __id17_:TalkArea; public var __id15_:TalkArea; public var __id18_:TalkArea; public var __id19_:TalkArea; public var __id5_:TalkArea; public var __id20_:InkGFX; public var __id8_:segment; public var __id9_:b2JointMC; public var __id13_:b2JointMC; public var __id16_:TalkArea; public function Lv6Layout(){ __setProp___id16__Lv6Layout_Layer1_1(); __setProp___id17__Lv6Layout_Layer1_1(); __setProp___id18__Lv6Layout_Layer1_1(); __setProp___id20__Lv6Layout_Layer4_1(); __setProp___id13__Lv6Layout_Layer1_1(); __setProp___id9__Lv6Layout_Layer1_1(); __setProp___id15__Lv6Layout_Layer1_1(); __setProp___id19__Lv6Layout_Layer1_1(); __setProp___id5__Lv6Layout_Layer1_1(); __setProp_p6_Lv6Layout_Layer5_1(); __setProp___id8__Lv6Layout_Layer1_1(); } function __setProp___id17__Lv6Layout_Layer1_1(){ try { __id17_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id17_.hintLevel = 2; __id17_.isVisible = false; __id17_.kills = false; __id17_.noDraw = false; __id17_.repeat = 0; __id17_.showHint = false; __id17_.speech = ""; __id17_.userData = ""; try { __id17_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id13__Lv6Layout_Layer1_1(){ try { __id13_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id13_.EnableMotor = true; __id13_.MaxMotorTorque = 100; __id13_.MotorSpeed = -5; __id13_.userData = ""; try { __id13_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id8__Lv6Layout_Layer1_1(){ try { __id8_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id8_.density = 2; __id8_.friction = 0.7; __id8_.isSensor = false; __id8_.isVisible = true; __id8_.restitution = 1; __id8_.userData = ""; try { __id8_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id16__Lv6Layout_Layer1_1(){ try { __id16_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id16_.hintLevel = 1; __id16_.isVisible = false; __id16_.kills = false; __id16_.noDraw = false; __id16_.repeat = 0; __id16_.showHint = false; __id16_.speech = ""; __id16_.userData = ""; try { __id16_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id15__Lv6Layout_Layer1_1(){ try { __id15_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id15_.hintLevel = 0; __id15_.isVisible = false; __id15_.kills = true; __id15_.noDraw = false; __id15_.repeat = 0; __id15_.showHint = false; __id15_.speech = ""; __id15_.userData = ""; try { __id15_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id19__Lv6Layout_Layer1_1(){ try { __id19_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id19_.hintLevel = 4; __id19_.isVisible = false; __id19_.kills = false; __id19_.noDraw = false; __id19_.repeat = 1; __id19_.showHint = false; __id19_.speech = "hmmm... those things look nasty"; __id19_.userData = ""; try { __id19_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp_p6_Lv6Layout_Layer5_1(){ try { p6["componentInspectorSetting"] = true; } catch(e:Error) { }; p6.picture = "pic6"; p6.scaleEric = 0.4; p6.targetX = 8; p6.targetY = 5; p6.userData = ""; try { p6["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id20__Lv6Layout_Layer4_1(){ try { __id20_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id20_.ink = 100; __id20_.userData = ""; try { __id20_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id18__Lv6Layout_Layer1_1(){ try { __id18_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id18_.hintLevel = 3; __id18_.isVisible = false; __id18_.kills = false; __id18_.noDraw = false; __id18_.repeat = 0; __id18_.showHint = false; __id18_.speech = ""; __id18_.userData = ""; try { __id18_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id9__Lv6Layout_Layer1_1(){ try { __id9_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id9_.EnableMotor = true; __id9_.MaxMotorTorque = 100000; __id9_.MotorSpeed = -3.2; __id9_.userData = ""; try { __id9_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id5__Lv6Layout_Layer1_1(){ try { __id5_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id5_.hintLevel = 0; __id5_.isVisible = false; __id5_.kills = true; __id5_.noDraw = false; __id5_.repeat = 0; __id5_.showHint = false; __id5_.speech = ""; __id5_.userData = ""; try { __id5_["componentInspectorSetting"] = false; } catch(e:Error) { }; } } }//package
Section 257
//Lv7Layout (Lv7Layout) package { import b2MovieClips.*; public dynamic class Lv7Layout extends b2CompoundFrame { public var __id27_:TalkArea; public var __id29_:TalkArea; public var __id30_:TalkArea; public var __id31_:TalkArea; public var __id32_:TalkArea; public var __id33_:TalkArea; public var __id34_:TalkArea; public var __id35_:TalkArea; public var __id36_:InkGFX; public var __id28_:TalkArea; public function Lv7Layout(){ __setProp___id36__Lv7Layout_Layer1_1(); __setProp___id27__Lv7Layout_Layer1_1(); __setProp___id34__Lv7Layout_Layer1_1(); __setProp___id28__Lv7Layout_Layer1_1(); __setProp___id35__Lv7Layout_Layer1_1(); __setProp___id33__Lv7Layout_Layer1_1(); __setProp___id31__Lv7Layout_Layer1_1(); __setProp___id32__Lv7Layout_Layer1_1(); __setProp___id30__Lv7Layout_Layer1_1(); __setProp_pic7_Lv7Layout_Layer1_1(); __setProp___id29__Lv7Layout_Layer1_1(); } function __setProp___id28__Lv7Layout_Layer1_1(){ try { __id28_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id28_.hintLevel = 0; __id28_.isVisible = false; __id28_.kills = true; __id28_.noDraw = false; __id28_.repeat = 0; __id28_.showHint = false; __id28_.speech = ""; __id28_.userData = ""; try { __id28_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id31__Lv7Layout_Layer1_1(){ try { __id31_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id31_.hintLevel = 0; __id31_.isVisible = false; __id31_.kills = true; __id31_.noDraw = false; __id31_.repeat = 0; __id31_.showHint = false; __id31_.speech = ""; __id31_.userData = ""; try { __id31_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id35__Lv7Layout_Layer1_1(){ try { __id35_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id35_.hintLevel = 1; __id35_.isVisible = false; __id35_.kills = false; __id35_.noDraw = false; __id35_.repeat = 0; __id35_.showHint = false; __id35_.speech = ""; __id35_.userData = ""; try { __id35_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id27__Lv7Layout_Layer1_1(){ try { __id27_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id27_.hintLevel = 0; __id27_.isVisible = false; __id27_.kills = true; __id27_.noDraw = false; __id27_.repeat = 0; __id27_.showHint = false; __id27_.speech = ""; __id27_.userData = ""; try { __id27_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id30__Lv7Layout_Layer1_1(){ try { __id30_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id30_.hintLevel = 0; __id30_.isVisible = false; __id30_.kills = true; __id30_.noDraw = false; __id30_.repeat = 0; __id30_.showHint = false; __id30_.speech = ""; __id30_.userData = ""; try { __id30_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id34__Lv7Layout_Layer1_1(){ try { __id34_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id34_.hintLevel = 0; __id34_.isVisible = false; __id34_.kills = true; __id34_.noDraw = false; __id34_.repeat = 0; __id34_.showHint = false; __id34_.speech = ""; __id34_.userData = ""; try { __id34_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp_pic7_Lv7Layout_Layer1_1(){ try { pic7["componentInspectorSetting"] = true; } catch(e:Error) { }; pic7.picture = "p7"; pic7.scaleEric = 1.55; pic7.targetX = 3; pic7.targetY = -15; pic7.userData = ""; try { pic7["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id33__Lv7Layout_Layer1_1(){ try { __id33_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id33_.hintLevel = 0; __id33_.isVisible = false; __id33_.kills = true; __id33_.noDraw = false; __id33_.repeat = 0; __id33_.showHint = false; __id33_.speech = ""; __id33_.userData = ""; try { __id33_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id36__Lv7Layout_Layer1_1(){ try { __id36_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id36_.ink = 100; __id36_.userData = ""; try { __id36_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id32__Lv7Layout_Layer1_1(){ try { __id32_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id32_.hintLevel = 0; __id32_.isVisible = false; __id32_.kills = true; __id32_.noDraw = false; __id32_.repeat = 0; __id32_.showHint = false; __id32_.speech = ""; __id32_.userData = ""; try { __id32_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id29__Lv7Layout_Layer1_1(){ try { __id29_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id29_.hintLevel = 0; __id29_.isVisible = false; __id29_.kills = true; __id29_.noDraw = false; __id29_.repeat = 0; __id29_.showHint = false; __id29_.speech = ""; __id29_.userData = ""; try { __id29_["componentInspectorSetting"] = false; } catch(e:Error) { }; } } }//package
Section 258
//Lv8Layout (Lv8Layout) package { import b2MovieClips.*; public dynamic class Lv8Layout extends b2CompoundFrame { public var __id50_:staticsegment; public var __id63_:TalkArea; public var __id51_:staticsegment; public var __id64_:TalkArea; public var __id52_:staticsegment; public var __id46_:staticsegment; public var __id47_:staticsegment; public var __id48_:staticsegment; public var __id49_:staticsegment; public function Lv8Layout(){ __setProp_s8a_Lv8Layout_object_1(); __setProp___id47__Lv8Layout_object_1(); __setProp___id46__Lv8Layout_object_1(); __setProp___id52__Lv8Layout_object_1(); __setProp_p1_Lv8Layout_fg_1(); __setProp_s8d_Lv8Layout_object_1(); __setProp___id51__Lv8Layout_object_1(); __setProp___id50__Lv8Layout_object_1(); __setProp___id64__Lv8Layout_object_1(); __setProp___id63__Lv8Layout_object_1(); __setProp___id49__Lv8Layout_object_1(); __setProp_s8c_Lv8Layout_object_1(); __setProp_s8b_Lv8Layout_object_1(); __setProp___id48__Lv8Layout_object_1(); } function __setProp_s8a_Lv8Layout_object_1(){ try { s8a["componentInspectorSetting"] = true; } catch(e:Error) { }; s8a.hintLevel = 0; s8a.isVisible = false; s8a.kills = false; s8a.noDraw = false; s8a.repeat = 0; s8a.showHint = false; s8a.speech = ""; s8a.userData = ""; try { s8a["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id47__Lv8Layout_object_1(){ try { __id47_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id47_.density = 1; __id47_.friction = 1; __id47_.isSensor = false; __id47_.isVisible = true; __id47_.restitution = 0; __id47_.userData = ""; try { __id47_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp_s8b_Lv8Layout_object_1(){ try { s8b["componentInspectorSetting"] = true; } catch(e:Error) { }; s8b.hintLevel = 0; s8b.isVisible = false; s8b.kills = false; s8b.noDraw = false; s8b.repeat = 0; s8b.showHint = false; s8b.speech = ""; s8b.userData = ""; try { s8b["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id51__Lv8Layout_object_1(){ try { __id51_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id51_.density = 1; __id51_.friction = 1; __id51_.isSensor = false; __id51_.isVisible = true; __id51_.restitution = 0; __id51_.userData = ""; try { __id51_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id50__Lv8Layout_object_1(){ try { __id50_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id50_.density = 1; __id50_.friction = 1; __id50_.isSensor = false; __id50_.isVisible = true; __id50_.restitution = 0; __id50_.userData = ""; try { __id50_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp_s8c_Lv8Layout_object_1(){ try { s8c["componentInspectorSetting"] = true; } catch(e:Error) { }; s8c.hintLevel = 0; s8c.isVisible = false; s8c.kills = false; s8c.noDraw = false; s8c.repeat = 0; s8c.showHint = false; s8c.speech = ""; s8c.userData = ""; try { s8c["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id46__Lv8Layout_object_1(){ try { __id46_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id46_.density = 1; __id46_.friction = 1; __id46_.isSensor = false; __id46_.isVisible = true; __id46_.restitution = 0; __id46_.userData = ""; try { __id46_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id64__Lv8Layout_object_1(){ try { __id64_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id64_.hintLevel = 2; __id64_.isVisible = false; __id64_.kills = false; __id64_.noDraw = false; __id64_.repeat = 1; __id64_.showHint = false; __id64_.speech = "Something is wrong <br>with the SCORE BOARD! "; __id64_.userData = ""; try { __id64_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp_s8d_Lv8Layout_object_1(){ try { s8d["componentInspectorSetting"] = true; } catch(e:Error) { }; s8d.hintLevel = 0; s8d.isVisible = false; s8d.kills = false; s8d.noDraw = false; s8d.repeat = 0; s8d.showHint = false; s8d.speech = ""; s8d.userData = ""; try { s8d["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp_p1_Lv8Layout_fg_1(){ try { p1["componentInspectorSetting"] = true; } catch(e:Error) { }; p1.picture = "level8ScoreBoard"; p1.scaleEric = 0.4; p1.targetX = 52; p1.targetY = 23; p1.userData = ""; try { p1["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id49__Lv8Layout_object_1(){ try { __id49_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id49_.density = 1; __id49_.friction = 1; __id49_.isSensor = false; __id49_.isVisible = true; __id49_.restitution = 0; __id49_.userData = ""; try { __id49_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id52__Lv8Layout_object_1(){ try { __id52_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id52_.density = 1; __id52_.friction = 1; __id52_.isSensor = false; __id52_.isVisible = true; __id52_.restitution = 0; __id52_.userData = ""; try { __id52_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id63__Lv8Layout_object_1(){ try { __id63_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id63_.hintLevel = 0; __id63_.isVisible = false; __id63_.kills = false; __id63_.noDraw = false; __id63_.repeat = 1; __id63_.showHint = false; __id63_.speech = "There are 3 ways to gain speed...<br>1) Press DOWN as I roll down the ramp<br>2) Press LEFT/RIGHT when I'm at the bottom<br>3) Press UP as I roll up the ramp"; __id63_.userData = ""; try { __id63_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id48__Lv8Layout_object_1(){ try { __id48_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id48_.density = 1; __id48_.friction = 1; __id48_.isSensor = false; __id48_.isVisible = true; __id48_.restitution = 0; __id48_.userData = ""; try { __id48_["componentInspectorSetting"] = false; } catch(e:Error) { }; } } }//package
Section 259
//Lv9Layout (Lv9Layout) package { import b2MovieClips.*; public dynamic class Lv9Layout extends b2CompoundFrame { public var __id72_:staticsegment; public var __id71_:staticsegment; public var __id73_:TalkArea; public var __id70_:staticsegment; public var __id74_:TalkArea; public var __id68_:staticsegment; public var __id69_:staticsegment; public function Lv9Layout(){ __setProp___id69__Lv9Layout_bg_1(); __setProp___id68__Lv9Layout_bg_1(); __setProp___id73__Lv9Layout_fg_1(); __setProp___id71__Lv9Layout_bg_1(); __setProp___id70__Lv9Layout_bg_1(); __setProp___id74__Lv9Layout_fg_1(); __setProp_titleFrame_Lv9Layout_Layer8_1(); __setProp___id72__Lv9Layout_bg_1(); } function __setProp___id73__Lv9Layout_fg_1(){ try { __id73_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id73_.hintLevel = 1; __id73_.isVisible = false; __id73_.kills = false; __id73_.noDraw = false; __id73_.repeat = 0; __id73_.showHint = false; __id73_.speech = ""; __id73_.userData = ""; try { __id73_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id74__Lv9Layout_fg_1(){ try { __id74_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id74_.hintLevel = 2; __id74_.isVisible = false; __id74_.kills = false; __id74_.noDraw = false; __id74_.repeat = 0; __id74_.showHint = false; __id74_.speech = ""; __id74_.userData = ""; try { __id74_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id69__Lv9Layout_bg_1(){ try { __id69_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id69_.density = 1; __id69_.friction = 0.7; __id69_.isSensor = false; __id69_.isVisible = false; __id69_.restitution = 0.2; __id69_.userData = ""; try { __id69_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id68__Lv9Layout_bg_1(){ try { __id68_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id68_.density = 1; __id68_.friction = 0.7; __id68_.isSensor = false; __id68_.isVisible = false; __id68_.restitution = 0.2; __id68_.userData = ""; try { __id68_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id70__Lv9Layout_bg_1(){ try { __id70_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id70_.density = 1; __id70_.friction = 0.7; __id70_.isSensor = false; __id70_.isVisible = false; __id70_.restitution = 0.2; __id70_.userData = ""; try { __id70_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id71__Lv9Layout_bg_1(){ try { __id71_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id71_.density = 1; __id71_.friction = 0.7; __id71_.isSensor = false; __id71_.isVisible = false; __id71_.restitution = 0.2; __id71_.userData = ""; try { __id71_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id72__Lv9Layout_bg_1(){ try { __id72_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id72_.density = 1; __id72_.friction = 0.7; __id72_.isSensor = false; __id72_.isVisible = false; __id72_.restitution = 0.2; __id72_.userData = ""; try { __id72_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp_titleFrame_Lv9Layout_Layer8_1(){ try { titleFrame["componentInspectorSetting"] = true; } catch(e:Error) { }; titleFrame.picture = "titleDecor"; titleFrame.scaleEric = 6; titleFrame.targetX = 0; titleFrame.targetY = 0; titleFrame.userData = ""; try { titleFrame["componentInspectorSetting"] = false; } catch(e:Error) { }; } } }//package
Section 260
//LvCreditsLayout (LvCreditsLayout) package { import b2MovieClips.*; public dynamic class LvCreditsLayout extends b2CompoundFrame { public var __id420_:staticsegment; public var __id421_:staticsegment; public var __id422_:staticsegment; public var __id423_:staticsegment; public var __id424_:staticsegment; public function LvCreditsLayout(){ __setProp___id424__LvCreditsLayout_Layer6_1(); __setProp___id423__LvCreditsLayout_Layer6_1(); __setProp___id422__LvCreditsLayout_Layer6_1(); __setProp___id421__LvCreditsLayout_Layer6_1(); __setProp___id420__LvCreditsLayout_Layer6_1(); } function __setProp___id420__LvCreditsLayout_Layer6_1(){ try { __id420_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id420_.density = 1; __id420_.friction = 0.7; __id420_.isSensor = false; __id420_.isVisible = false; __id420_.restitution = 0.2; __id420_.userData = ""; try { __id420_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id423__LvCreditsLayout_Layer6_1(){ try { __id423_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id423_.density = 1; __id423_.friction = 0.7; __id423_.isSensor = false; __id423_.isVisible = false; __id423_.restitution = 0.2; __id423_.userData = ""; try { __id423_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id421__LvCreditsLayout_Layer6_1(){ try { __id421_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id421_.density = 1; __id421_.friction = 0.7; __id421_.isSensor = false; __id421_.isVisible = false; __id421_.restitution = 0.2; __id421_.userData = ""; try { __id421_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id424__LvCreditsLayout_Layer6_1(){ try { __id424_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id424_.density = 1; __id424_.friction = 0.7; __id424_.isSensor = false; __id424_.isVisible = false; __id424_.restitution = 0.2; __id424_.userData = ""; try { __id424_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id422__LvCreditsLayout_Layer6_1(){ try { __id422_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id422_.density = 1; __id422_.friction = 0.7; __id422_.isSensor = false; __id422_.isVisible = false; __id422_.restitution = 0.2; __id422_.userData = ""; try { __id422_["componentInspectorSetting"] = false; } catch(e:Error) { }; } } }//package
Section 261
//LvGallery2Layout (LvGallery2Layout) package { import b2MovieClips.*; public dynamic class LvGallery2Layout extends b2CompoundFrame { public var __id244_:TalkArea; public var __id246_:TalkArea; public var __id241_:staticsegment; public function LvGallery2Layout(){ __setProp_picGallery2_LvGallery2Layout_Layer5_1(); __setProp___id244__LvGallery2Layout_Layer1_1(); __setProp___id246__LvGallery2Layout_Layer6_1(); __setProp___id241__LvGallery2Layout_Layer1_1(); } function __setProp_picGallery2_LvGallery2Layout_Layer5_1(){ try { picGallery2["componentInspectorSetting"] = true; } catch(e:Error) { }; picGallery2.picture = "pGallery2"; picGallery2.scaleEric = 4; picGallery2.targetX = -180; picGallery2.targetY = -60; picGallery2.userData = ""; try { picGallery2["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id244__LvGallery2Layout_Layer1_1(){ try { __id244_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id244_.hintLevel = 0; __id244_.isVisible = false; __id244_.kills = false; __id244_.noDraw = false; __id244_.repeat = 99; __id244_.showHint = false; __id244_.speech = "Visit EricTheCircle.com<br>to see more cartoons<br>created by site members. "; __id244_.userData = ""; try { __id244_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id246__LvGallery2Layout_Layer6_1(){ try { __id246_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id246_.hintLevel = 0; __id246_.isVisible = false; __id246_.kills = false; __id246_.noDraw = false; __id246_.repeat = 1; __id246_.showHint = false; __id246_.speech = "This cartoon was drawn by Brigitta"; __id246_.userData = ""; try { __id246_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id241__LvGallery2Layout_Layer1_1(){ try { __id241_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id241_.density = 1; __id241_.friction = 0.7; __id241_.isSensor = false; __id241_.isVisible = false; __id241_.restitution = 0.2; __id241_.userData = ""; try { __id241_["componentInspectorSetting"] = false; } catch(e:Error) { }; } } }//package
Section 262
//LvGallery3Layout (LvGallery3Layout) package { import b2MovieClips.*; public dynamic class LvGallery3Layout extends b2CompoundFrame { public var __id247_:TalkArea; public var __id249_:staticsegment; public var __id252_:TalkArea; public function LvGallery3Layout(){ __setProp___id249__LvGallery3Layout_Layer1_1(); __setProp___id252__LvGallery3Layout_Layer1_1(); __setProp___id247__LvGallery3Layout_Layer6_1(); __setProp_picGallery2_LvGallery3Layout_Layer5_1(); } function __setProp_picGallery2_LvGallery3Layout_Layer5_1(){ try { picGallery2["componentInspectorSetting"] = true; } catch(e:Error) { }; picGallery2.picture = "pGallery3"; picGallery2.scaleEric = 0.3; picGallery2.targetX = 50; picGallery2.targetY = 25; picGallery2.userData = ""; try { picGallery2["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id249__LvGallery3Layout_Layer1_1(){ try { __id249_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id249_.density = 1; __id249_.friction = 0.7; __id249_.isSensor = false; __id249_.isVisible = false; __id249_.restitution = 0.2; __id249_.userData = ""; try { __id249_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id247__LvGallery3Layout_Layer6_1(){ try { __id247_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id247_.hintLevel = 0; __id247_.isVisible = false; __id247_.kills = false; __id247_.noDraw = false; __id247_.repeat = 1; __id247_.showHint = false; __id247_.speech = "This cartoon was drawn by Tony"; __id247_.userData = ""; try { __id247_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id252__LvGallery3Layout_Layer1_1(){ try { __id252_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id252_.hintLevel = 0; __id252_.isVisible = false; __id252_.kills = false; __id252_.noDraw = false; __id252_.repeat = 99; __id252_.showHint = false; __id252_.speech = "Visit EricTheCircle.com<br>to see more cartoons<br>created by site members. "; __id252_.userData = ""; try { __id252_["componentInspectorSetting"] = false; } catch(e:Error) { }; } } }//package
Section 263
//LvGallery4Layout (LvGallery4Layout) package { import b2MovieClips.*; public dynamic class LvGallery4Layout extends b2CompoundFrame { public var __id254_:TalkArea; public var __id259_:TalkArea; public var __id256_:staticsegment; public function LvGallery4Layout(){ __setProp___id254__LvGallery4Layout_Layer6_1(); __setProp___id259__LvGallery4Layout_Layer1_1(); __setProp_picGallery2_LvGallery4Layout_Layer5_1(); __setProp___id256__LvGallery4Layout_Layer1_1(); } function __setProp_picGallery2_LvGallery4Layout_Layer5_1(){ try { picGallery2["componentInspectorSetting"] = true; } catch(e:Error) { }; picGallery2.picture = "pGallery4"; picGallery2.scaleEric = 0.4; picGallery2.targetX = 82; picGallery2.targetY = 23; picGallery2.userData = ""; try { picGallery2["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id254__LvGallery4Layout_Layer6_1(){ try { __id254_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id254_.hintLevel = 0; __id254_.isVisible = false; __id254_.kills = false; __id254_.noDraw = false; __id254_.repeat = 1; __id254_.showHint = false; __id254_.speech = "and this one.... <br> <br> ....is a shameless plug."; __id254_.userData = ""; try { __id254_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id256__LvGallery4Layout_Layer1_1(){ try { __id256_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id256_.density = 1; __id256_.friction = 0.7; __id256_.isSensor = false; __id256_.isVisible = false; __id256_.restitution = 0.2; __id256_.userData = ""; try { __id256_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id259__LvGallery4Layout_Layer1_1(){ try { __id259_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id259_.hintLevel = 0; __id259_.isVisible = false; __id259_.kills = false; __id259_.noDraw = false; __id259_.repeat = 99; __id259_.showHint = false; __id259_.speech = "Visit EricTheCircle.com<br>to see more cartoons<br>created by site members. "; __id259_.userData = ""; try { __id259_["componentInspectorSetting"] = false; } catch(e:Error) { }; } } }//package
Section 264
//LvGalleryLayout (LvGalleryLayout) package { import b2MovieClips.*; public dynamic class LvGalleryLayout extends b2CompoundFrame { public var __id267_:TalkArea; public var __id262_:staticsegment; public var __id265_:TalkArea; public var __id266_:TalkArea; public function LvGalleryLayout(){ __setProp___id267__LvGalleryLayout_Layer1_1(); __setProp___id265__LvGalleryLayout_Layer1_1(); __setProp___id266__LvGalleryLayout_Layer1_1(); __setProp___id262__LvGalleryLayout_Layer1_1(); __setProp_picGallery_LvGalleryLayout_Layer1_1(); } function __setProp___id262__LvGalleryLayout_Layer1_1(){ try { __id262_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id262_.density = 1; __id262_.friction = 0.7; __id262_.isSensor = false; __id262_.isVisible = false; __id262_.restitution = 0.2; __id262_.userData = ""; try { __id262_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id265__LvGalleryLayout_Layer1_1(){ try { __id265_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id265_.hintLevel = 0; __id265_.isVisible = false; __id265_.kills = false; __id265_.noDraw = false; __id265_.repeat = 1; __id265_.showHint = false; __id265_.speech = "This cartoon was<br>drawn by Kevan<br>and reached #3<br>on the charts<br>....nice one Kevan!"; __id265_.userData = ""; try { __id265_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp_picGallery_LvGalleryLayout_Layer1_1(){ try { picGallery["componentInspectorSetting"] = true; } catch(e:Error) { }; picGallery.picture = "pGallery"; picGallery.scaleEric = 1.8; picGallery.targetX = 31; picGallery.targetY = -55; picGallery.userData = ""; try { picGallery["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id266__LvGalleryLayout_Layer1_1(){ try { __id266_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id266_.hintLevel = 0; __id266_.isVisible = false; __id266_.kills = false; __id266_.noDraw = false; __id266_.repeat = 1; __id266_.showHint = false; __id266_.speech = "Hey, we're in the GALLERY!<br>The gallery displays some of the<br>most popular cartoons from EricTheCircle.com"; __id266_.userData = ""; try { __id266_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id267__LvGalleryLayout_Layer1_1(){ try { __id267_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id267_.hintLevel = 0; __id267_.isVisible = false; __id267_.kills = false; __id267_.noDraw = false; __id267_.repeat = 99; __id267_.showHint = false; __id267_.speech = "Visit EricTheCircle.com<br>to see more cartoons<br>created by site members. "; __id267_.userData = ""; try { __id267_["componentInspectorSetting"] = false; } catch(e:Error) { }; } } }//package
Section 265
//Lvl11Score (Lvl11Score) package { import flash.display.*; import flash.text.*; public dynamic class Lvl11Score extends MovieClip { public var text_txt:TextField; } }//package
Section 266
//Main (Main) package { import flash.display.*; import flash.events.*; import ui.*; import utils.*; import Levels.*; import levelEditor.*; import application.*; import flash.net.*; import sound.*; import flash.text.*; public dynamic class Main extends MovieClip { public var levelClasses:Object; public var lastLevelPic:uint; public var eraser_btn:EraseButton; public var levelName:String;// = "none" public var pen_btn:PenButton; public var lastLevelName:String; public var level1_btn:SimpleButton; public var paused_mc:PauseScreen; public var resetString:String;// = "0,x:101,y:365|1,x:326,y:392.5,w:6.5,h:0.15|4,x:599,y:358" public var editor_btn:SimpleButton; public var numLevels;// = 10 public var hint_btn:SimpleButton; public var lastLevelScore:uint;// = 0 public var editString:String; public var levelScores:Object; public var levelComplete:Boolean;// = false public var title_mc:MovieClip; public var back_btn:SimpleButton; public var cover_mc:MovieClip; public var oldVol:Number;// = 0 public var paused:Boolean;// = false public var test_btn:SimpleButton; public var level_txt:TextField; public var mute_btn:SimpleButton; public var editor:LevelEditor; public var reset_btn:SimpleButton; public var menu_btn:SimpleButton; public var level:EricLevel; protected var sObject:SharedObject; public var levelSelect:LevelSelect; public var totalScore:int;// = 0 public var mochi:Mochi; public var keyboard:KeyTracker; public var gallery_btn:SimpleButton; public var music_mc:Music; public var counter:FPSCounter; public function Main(){ levelClasses = {Credits:LevelCredits, Gallery:LevelGallery, Gallery2:LevelGallery2, Gallery3:LevelGallery3, Gallery4:LevelGallery4, Test:Level0, Bonus:Level11, 1:Level1, 2:Level4, 3:Level3, 4:Level7, 5:Level8, 6:Level5, 7:Level6, 8:Level9, 9:Level2, 10:Level10}; levelScores = {}; totalScore = 0; numLevels = 10; levelName = "none"; levelComplete = false; resetString = "0,x:101,y:365|1,x:326,y:392.5,w:6.5,h:0.15|4,x:599,y:358"; keyboard = new KeyTracker(); lastLevelScore = 0; paused = false; oldVol = 0; super(); trace("main"); addEventListener(Event.ENTER_FRAME, checkLoad, false, 0, true); editString = resetString; stop(); mochi = new Mochi(this, "650x400", "f0f727140d87842d", "0ab22849f34f5b29"); mochi.connect(); mochi.showPreGame(); } protected function onKey(_arg1:KeyboardEvent){ if ((((((_arg1.keyCode == 27)) || ((_arg1.keyCode == 80)))) && (!((level == null))))){ pause(!(paused)); }; } public function checkLoad(_arg1:Event){ if (currentFrame == totalFrames){ removeEventListener(Event.ENTER_FRAME, checkLoad); stop(); init(); }; } public function stopEditor(){ if (editor != null){ editString = editor.encode(); editor.dispose(); removeChild(editor); editor = null; }; } protected function onEditor(_arg1:MouseEvent){ var _local2:URLRequest; _local2 = new URLRequest("http://www.ericthecircle.com/"); navigateToURL(_local2, "_blank"); } public function loadLevel(_arg1:String){ var _local2:Class; levelSelect.visible = false; stopEditor(); if (levelName != _arg1){ unloadLevel(); levelName = _arg1; _local2 = (levelClasses[levelName] as Class); level = new _local2(keyboard); addChildAt(level, 0); level.addEventListener(LevelEvent.LEVEL_READY, onLevelReady, false, 0, true); level.addEventListener(LevelEvent.LEVEL_COMPLETE, onLevelComplete, false, 0, true); if (_arg1 == "Test"){ back_btn.visible = true; hint_btn.visible = false; var _local3 = level; _local3["decode"](editString); } else { back_btn.visible = false; hint_btn.visible = true; }; level.construct(); }; } public function resetScores(_arg1:Event=null){ sObject.data.levelScores = {}; sObject.flush(); levelScores = {}; levelSelect.update(levelScores); } public function startEditor(){ if (editor == null){ pen_btn.visible = false; eraser_btn.visible = false; hint_btn.visible = false; music_mc.prog = 2; music_mc.level = 1; music_mc.h = 1; title_mc.visible = false; back_btn.visible = false; gallery_btn.visible = false; reset_btn.visible = false; level1_btn.visible = false; editor_btn.visible = false; menu_btn.visible = true; test_btn.visible = true; unloadLevel(); editor = new LevelEditor(); editor.decode(editString); addChild(editor); }; } protected function onSelectLevel(_arg1:LevelEvent){ loadLevel(_arg1.content); } protected function onMute(_arg1:MouseEvent){ trace(("old:" + oldVol)); if (oldVol == 0){ oldVol = music_mc._vol; music_mc.vol = 0; } else { music_mc.vol = oldVol; oldVol = 0; }; } public function showLevelSelect(_arg1:String="", _arg2:int=0, _arg3:int=0){ mochi.showLogin(false); updateScore(); pen_btn.visible = false; eraser_btn.visible = false; reset_btn.visible = false; levelSelect.visible = true; levelSelect.update(levelScores); title_mc.visible = false; gallery_btn.visible = false; level1_btn.visible = false; editor_btn.visible = false; menu_btn.visible = true; mute_btn.visible = true; test_btn.visible = false; hint_btn.visible = false; if (_arg1 != ""){ levelSelect.displayLast(_arg1, _arg2, _arg3); }; } protected function onPen(_arg1:Event){ if (level != null){ level.mode = "draw"; pen_btn.bg_mc.visible = true; eraser_btn.bg_mc.visible = false; }; } public function Update(_arg1):void{ var _local2:*; var _local3:*; if (level != null){ if (levelComplete){ levelComplete = false; if (levelName == "Gallery4"){ gotoMenu(); } else { if (levelName == "Gallery"){ loadLevel("Gallery2"); } else { if (levelName == "Gallery2"){ loadLevel("Gallery3"); } else { if (levelName == "Gallery3"){ loadLevel("Gallery4"); } else { if (levelName == "Test"){ startEditor(); } else { if (levelName == "Credits"){ showLevelSelect(lastLevelName, lastLevelScore, lastLevelPic); unloadLevel(); } else { _local2 = parseInt(levelName); _local3 = (level.score + level.picScore); if (levelScores[levelName] == null){ levelScores[levelName] = _local3; } else { if (levelScores[levelName] < _local3){ levelScores[levelName] = _local3; }; }; saveScores(); if (_local2 < numLevels){ showLevelSelect(levelName, level.score, level.picScore); unloadLevel(); } else { lastLevelScore = level.score; lastLevelPic = level.picScore; lastLevelName = levelName; loadLevel("Credits"); }; }; }; }; }; }; }; } else { if (!paused){ level.Update(); }; }; } else { trace("level is null"); }; } public function onMouseD(_arg1:MouseEvent){ if (level != null){ level.onMouseD(); }; if (editor != null){ editor.onDownBG(_arg1); }; } protected function onHint(_arg1:MouseEvent):void{ if (level != null){ level.showHint(); level.totalTime = (level.totalTime - 300); }; } public function init(){ test_btn.visible = false; menu_btn.visible = false; reset_btn.visible = false; back_btn.visible = false; hint_btn.visible = false; mute_btn.visible = false; pen_btn.visible = false; eraser_btn.visible = false; music_mc = new Music(); addChild(music_mc); music_mc.play(); levelSelect.visible = false; levelSelect.addEventListener(LevelEvent.SELECT_LEVEL, onSelectLevel, false, 0, true); levelSelect.addEventListener(LevelEvent.RESET_SCORES, resetScores, false, 0, true); test_btn.addEventListener(MouseEvent.CLICK, onTest); reset_btn.addEventListener(MouseEvent.CLICK, resetLevel); level1_btn.addEventListener(MouseEvent.CLICK, selectLevel); gallery_btn.addEventListener(MouseEvent.CLICK, selectLevel); editor_btn.addEventListener(MouseEvent.CLICK, onEditor); back_btn.addEventListener(MouseEvent.CLICK, onEditor); menu_btn.addEventListener(MouseEvent.CLICK, onMenu); hint_btn.addEventListener(MouseEvent.CLICK, onHint); mute_btn.addEventListener(MouseEvent.CLICK, onMute); keyboard.stage = stage; cover_mc.addEventListener(MouseEvent.MOUSE_DOWN, onMouseD, false, 0, true); cover_mc.addEventListener(MouseEvent.MOUSE_UP, onMouseU, false, 0, true); reset_btn.visible = false; sObject = SharedObject.getLocal("EricSO3"); if (sObject.data != null){ levelScores = sObject.data.levelScores; }; if (levelScores == null){ levelScores = {}; }; paused_mc.visible = false; paused_mc.addEventListener(LevelEvent.MUSIC_LEVEL, onMusic, false, 0, true); pen_btn.bg_mc.visible = false; eraser_btn.bg_mc.visible = false; pen_btn.addEventListener(MouseEvent.CLICK, onPen); eraser_btn.addEventListener(MouseEvent.CLICK, onEraser); stage.addEventListener(KeyboardEvent.KEY_UP, onKey, false, 0, true); mochi.initScoreBoard(); mochi.showLogin(true); } protected function onTest(_arg1:MouseEvent){ loadLevel("Test"); music_mc.level = 100; music_mc.prog = 1; } public function onMouseU(_arg1:MouseEvent){ if (level != null){ level.onMouseU(); }; } public function onLevelComplete(_arg1:LevelEvent){ levelComplete = true; } protected function updateScore(){ var _local1:*; totalScore = 0; for (_local1 in levelScores) { totalScore = (totalScore + levelScores[_local1]); }; } protected function onEraser(_arg1:Event){ if (level != null){ level.mode = "erase"; pen_btn.bg_mc.visible = false; eraser_btn.bg_mc.visible = true; }; } public function gotoMenu(){ mochi.showLogin(true); levelSelect.visible = false; stopEditor(); unloadLevel(); title_mc.visible = true; title_mc.gotoAndPlay(1); music_mc.reset(); music_mc.level = 0; back_btn.visible = false; gallery_btn.visible = true; reset_btn.visible = false; level1_btn.visible = true; editor_btn.visible = true; menu_btn.visible = false; test_btn.visible = false; hint_btn.visible = false; pen_btn.visible = false; eraser_btn.visible = false; mute_btn.visible = false; } public function resetLevel(_arg1:MouseEvent){ removeEventListener("enterFrame", Update); if (level != null){ level.reset(); }; } protected function onMusic(_arg1:LevelEvent){ if (_arg1.content == 0){ oldVol = music_mc._vol; music_mc.vol = _arg1.content; } else { oldVol = 0; music_mc.vol = _arg1.content; }; } public function onLevelReady(_arg1:LevelEvent){ levelSelect.visible = false; title_mc.visible = false; gallery_btn.visible = false; reset_btn.visible = true; level1_btn.visible = false; editor_btn.visible = false; menu_btn.visible = true; mute_btn.visible = true; test_btn.visible = false; pen_btn.visible = true; eraser_btn.visible = true; pen_btn.bg_mc.visible = true; eraser_btn.bg_mc.visible = false; removeEventListener("enterFrame", Update); addEventListener("enterFrame", Update); level.setCostume(levelSelect.costume); level.start(); music_mc.level = 100; music_mc.prog = 1; if ((((((levelName == "Gallery")) || ((levelName == "Gallery2")))) || ((levelName == "Gallery3")))){ music_mc.prog = 2; music_mc.level = 1; music_mc.h = 1; }; } public function unloadLevel(){ if (level != null){ level.destruct(); removeChild(level); removeEventListener("enterFrame", Update); level.removeEventListener(LevelEvent.LEVEL_COMPLETE, onLevelComplete); level.removeEventListener(LevelEvent.LEVEL_READY, onLevelReady); level = null; levelName = "none"; }; } protected function onMenu(_arg1:MouseEvent){ if (((((((((!((level == null))) && (!((levelName == "Gallery"))))) && (!((levelName == "Gallery2"))))) && (!((levelName == "Gallery3"))))) && (!((levelName == "Gallery4"))))){ unloadLevel(); showLevelSelect(); } else { gotoMenu(); }; } public function selectLevel(_arg1:MouseEvent){ if (_arg1.target.name == "level1_btn"){ showLevelSelect(); } else { if (_arg1.target.name == "gallery_btn"){ loadLevel("Gallery"); }; }; } public function pause(_arg1:Boolean){ paused_mc.visible = _arg1; paused_mc.vol = music_mc._vol; paused = _arg1; } public function saveScores(){ sObject.data.levelScores = levelScores; sObject.flush(); } } }//package
Section 267
//MoneyEric (MoneyEric) package { import flash.display.*; public dynamic class MoneyEric extends MovieClip { } }//package
Section 268
//NoCostumeButton (NoCostumeButton) package { import ui.*; public dynamic class NoCostumeButton extends CostumeButton { } }//package
Section 269
//ParTimeButton (ParTimeButton) package { import ui.*; public dynamic class ParTimeButton extends BasicButton { } }//package
Section 270
//PartyCostumeButton (PartyCostumeButton) package { import ui.*; public dynamic class PartyCostumeButton extends CostumeButton { } }//package
Section 271
//PartyEricCostume (PartyEricCostume) package { import flash.display.*; public dynamic class PartyEricCostume extends MovieClip { } }//package
Section 272
//PenButton (PenButton) package { import ui.*; public dynamic class PenButton extends BasicButton { } }//package
Section 273
//PlayerClip (PlayerClip) package { import flash.display.*; public dynamic class PlayerClip extends MovieClip { } }//package
Section 274
//PlayerGfx (PlayerGfx) package { import b2MovieClips.*; public dynamic class PlayerGfx extends b2PlayerMC { } }//package
Section 275
//ring (ring) package { import b2MovieClips.*; public dynamic class ring extends DecorGFX { } }//package
Section 276
//SantaEricCostume (SantaEricCostume) package { import flash.display.*; public dynamic class SantaEricCostume extends MovieClip { } }//package
Section 277
//segment (segment) package { import b2MovieClips.*; public dynamic class segment extends b2RectangleMC { } }//package
Section 278
//SparkleEricCostume (SparkleEricCostume) package { import flash.display.*; public dynamic class SparkleEricCostume extends MovieClip { } }//package
Section 279
//StaticButton (StaticButton) package { import ui.*; public dynamic class StaticButton extends BasicButton { } }//package
Section 280
//staticsegment (staticsegment) package { import b2MovieClips.*; public dynamic class staticsegment extends b2StaticRectangleMC { } }//package
Section 281
//SuperCostumeButton (SuperCostumeButton) package { import ui.*; public dynamic class SuperCostumeButton extends CostumeButton { } }//package
Section 282
//SuperEricCostume (SuperEricCostume) package { import flash.display.*; public dynamic class SuperEricCostume extends MovieClip { } }//package
Section 283
//titlecopy (titlecopy) package { import b2MovieClips.*; public dynamic class titlecopy extends DecorGFX { public function titlecopy(){ addFrameScript(64, frame65); } function frame65(){ stop(); } } }//package
Section 284
//TransformButton (TransformButton) package { import ui.*; public dynamic class TransformButton extends BasicButton { } }//package
Section 285
//WebsiteButton (WebsiteButton) package { import b2MovieClips.*; public dynamic class WebsiteButton extends DecorButton { } }//package
Section 286
//WhiteBrick (WhiteBrick) package { import sprites.*; public dynamic class WhiteBrick extends GameSprite { } }//package

Library Items

Symbol 1 FontUsed by:2 3 5 7 8 9 91 326 417 421 424 427 429 430 448 451 452 455 458 461 464 468
Symbol 2 EditableTextUses:1Used by:6
Symbol 3 EditableTextUses:1Used by:6
Symbol 4 GraphicUsed by:6 10 419 422 425 428 449 453 456 459
Symbol 5 EditableTextUses:1Used by:6
Symbol 6 MovieClip {LevelNameButton}Uses:2 3 4 5
Symbol 7 EditableTextUses:1Used by:10
Symbol 8 EditableTextUses:1Used by:10
Symbol 9 EditableTextUses:1Used by:10
Symbol 10 MovieClip {ParTimeButton}Uses:7 8 4 9
Symbol 11 GraphicUsed by:12
Symbol 12 MovieClip {DigitOne}Uses:11
Symbol 13 GraphicUsed by:14
Symbol 14 MovieClip {BlackBrick}Uses:13
Symbol 15 GraphicUsed by:16
Symbol 16 MovieClip {WhiteBrick}Uses:15
Symbol 17 GraphicUsed by:18
Symbol 18 MovieClip {MoneyEric}Uses:17
Symbol 19 GraphicUsed by:21
Symbol 20 GraphicUsed by:21
Symbol 21 MovieClip {SparkleEricCostume}Uses:19 20
Symbol 22 ShapeTweeningUsed by:26
Symbol 23 GraphicUsed by:26
Symbol 24 ShapeTweeningUsed by:26
Symbol 25 GraphicUsed by:26
Symbol 26 MovieClip {SantaEricCostume}Uses:22 23 24 25
Symbol 27 GraphicUsed by:42
Symbol 28 ShapeTweeningUsed by:41
Symbol 29 ShapeTweeningUsed by:41
Symbol 30 ShapeTweeningUsed by:41
Symbol 31 ShapeTweeningUsed by:41
Symbol 32 GraphicUsed by:41
Symbol 33 GraphicUsed by:41
Symbol 34 GraphicUsed by:41
Symbol 35 GraphicUsed by:41
Symbol 36 ShapeTweeningUsed by:41
Symbol 37 ShapeTweeningUsed by:41
Symbol 38 ShapeTweeningUsed by:41
Symbol 39 ShapeTweeningUsed by:41
Symbol 40 GraphicUsed by:41
Symbol 41 MovieClipUses:28 29 30 31 32 33 34 35 36 37 38 39 40Used by:42
Symbol 42 MovieClip {PartyEricCostume}Uses:27 41Used by:46
Symbol 43 GraphicUsed by:46 52 60 64 67 79 165 278
Symbol 44 GraphicUsed by:45
Symbol 45 MovieClipUses:44Used by:46 52 60 64 67 278
Symbol 46 MovieClip {PartyCostumeButton}Uses:43 45 42Used by:317
Symbol 47 GraphicUsed by:51
Symbol 48 ShapeTweeningUsed by:51
Symbol 49 ShapeTweeningUsed by:51
Symbol 50 GraphicUsed by:51
Symbol 51 MovieClip {HeadPhonesEricCostume}Uses:47 48 49 50Used by:52
Symbol 52 MovieClip {DJCostumeButton}Uses:43 45 51Used by:317
Symbol 53 ShapeTweeningUsed by:57
Symbol 54 ShapeTweeningUsed by:57
Symbol 55 ShapeTweeningUsed by:57
Symbol 56 GraphicUsed by:57
Symbol 57 MovieClipUses:53 54 55 56Used by:59
Symbol 58 GraphicUsed by:59
Symbol 59 MovieClip {SuperEricCostume}Uses:57 58Used by:60
Symbol 60 MovieClip {SuperCostumeButton}Uses:43 45 59Used by:317
Symbol 61 GraphicUsed by:62
Symbol 62 MovieClipUses:61Used by:63
Symbol 63 MovieClip {AngelEricCostume}Uses:62Used by:64
Symbol 64 MovieClip {AngelCostumeButton}Uses:43 45 63Used by:317
Symbol 65 GraphicUsed by:66
Symbol 66 MovieClipUses:65Used by:67
Symbol 67 MovieClip {NoCostumeButton}Uses:43 45 66Used by:317
Symbol 68 GraphicUsed by:75 499 504 507
Symbol 69 FontUsed by:70 72 74 80 81 127 128 180 182 183 188 195 201 274 276 277 281 283 285 288 290 291 293 295 296 298 299 300 302 303 305 307 308 309 310 321 322 336 392 393 396 479 482 485 488 491 494 496 497 498 501 502 503 505 506 509 512 514 517 523 524
Symbol 70 EditableTextUses:69Used by:75
Symbol 71 GraphicUsed by:75 499 504 507
Symbol 72 EditableTextUses:69Used by:75
Symbol 73 GraphicUsed by:75 499 504 507
Symbol 74 EditableTextUses:69Used by:75
Symbol 75 MovieClip {CotinueDecorButton}Uses:68 70 71 72 73 74Used by:155
Symbol 76 GraphicUsed by:84 313 525  Timeline
Symbol 77 FontUsed by:78 103 124 143 161 187 194 200 327 334 352 363 373 384
Symbol 78 EditableTextUses:77Used by:84
Symbol 79 MovieClipUses:43Used by:84 324 525
Symbol 80 EditableTextUses:69Used by:84 525
Symbol 81 EditableTextUses:69Used by:84
Symbol 82 FontUsed by:83
Symbol 83 EditableTextUses:82Used by:84
Symbol 84 MovieClip {titlecopy}Uses:76 78 79 80 81 83Used by:155
Symbol 85 GraphicUsed by:86
Symbol 86 MovieClipUses:85Used by:88 90
Symbol 87 GraphicUsed by:88
Symbol 88 MovieClip {EraseButton}Uses:86 87Used by:Timeline
Symbol 89 GraphicUsed by:90
Symbol 90 MovieClip {PenButton}Uses:86 89Used by:Timeline
Symbol 91 EditableTextUses:1Used by:Timeline
Symbol 92 GraphicUsed by:93
Symbol 93 MovieClip {staticsegment}Uses:92Used by:117 133 154 155 176 185 192 198 206 331 345 359 371 380 391 395
Symbol 94 GraphicUsed by:95
Symbol 95 MovieClip {b2MovieClips.ExitGFX}Uses:94Used by:117 133 154 176 185 192 198 206 331 345 359 371 380 391 395
Symbol 96 GraphicUsed by:97
Symbol 97 MovieClip {b2MovieClips.TalkArea}Uses:96Used by:117 133 154 155 176 185 192 198 206 331 345 359 371 380 391
Symbol 98 GraphicUsed by:99
Symbol 99 MovieClip {segment}Uses:98Used by:117 176 345 359 371 380 391
Symbol 100 GraphicUsed by:101
Symbol 101 MovieClip {b2MovieClips.b2JointMC}Uses:100Used by:117 176 345 359 371 380 391
Symbol 102 GraphicUsed by:108
Symbol 103 EditableTextUses:77Used by:108
Symbol 104 GraphicUsed by:105
Symbol 105 MovieClipUses:104Used by:108 191 330
Symbol 106 GraphicUsed by:108
Symbol 107 GraphicUsed by:108
Symbol 108 MovieClip {Decor6Tet}Uses:102 103 105 106 107Used by:117
Symbol 109 GraphicUsed by:110 379
Symbol 110 MovieClip {PlayerGfx}Uses:109Used by:117 133 154 155 176 185 192 198 206 331 345 359 371 380 391 395
Symbol 111 GraphicUsed by:112
Symbol 112 MovieClip {b2MovieClips.InkGFX}Uses:111Used by:117 133 176 185 345 359 371 380 391 395
Symbol 113 GraphicUsed by:114 157 347 358
Symbol 114 MovieClip {Decor6Spikes}Uses:113Used by:117
Symbol 115 GraphicUsed by:116 460
Symbol 116 MovieClip {b2MovieClips.PictureFrameGFX}Uses:115Used by:117 133 154 155 176 192 198 206 331 345 359 371 380 391
Symbol 117 MovieClip {Lv6Layout}Uses:93 95 97 99 101 108 110 112 114 116Used by:Timeline
Symbol 118 GraphicUsed by:119
Symbol 119 MovieClip {Decor7bg}Uses:118Used by:133
Symbol 120 GraphicUsed by:130 341
Symbol 121 GraphicUsed by:122
Symbol 122 MovieClipUses:121Used by:130
Symbol 123 GraphicUsed by:130
Symbol 124 EditableTextUses:77Used by:130
Symbol 125 GraphicUsed by:130
Symbol 126 ShapeTweeningUsed by:130
Symbol 127 EditableTextUses:69Used by:130
Symbol 128 EditableTextUses:69Used by:130
Symbol 129 GraphicUsed by:130
Symbol 130 MovieClip {Decor7}Uses:120 122 123 124 125 126 127 128 129Used by:133
Symbol 131 GraphicUsed by:132
Symbol 132 MovieClip {Guitar}Uses:131Used by:133
Symbol 133 MovieClip {Lv7Layout}Uses:119 93 95 97 130 116 112 110 132Used by:Timeline
Symbol 134 GraphicUsed by:146
Symbol 135 FontUsed by:136 139 141 144
Symbol 136 EditableTextUses:135Used by:146
Symbol 137 FontUsed by:138 140 142 145 269 270 272 275 279 306 311 312 314 315 316 318 434 500
Symbol 138 EditableTextUses:137Used by:146
Symbol 139 EditableTextUses:135Used by:146
Symbol 140 EditableTextUses:137Used by:146
Symbol 141 EditableTextUses:135Used by:146
Symbol 142 EditableTextUses:137Used by:146
Symbol 143 EditableTextUses:77Used by:146
Symbol 144 EditableTextUses:135Used by:146
Symbol 145 EditableTextUses:137Used by:146
Symbol 146 MovieClip {Decor8Pic}Uses:134 136 138 139 140 141 142 143 144 145Used by:154
Symbol 147 GraphicUsed by:151
Symbol 148 FontUsed by:149 180 182 183 268
Symbol 149 TextUses:148Used by:151
Symbol 150 GraphicUsed by:151
Symbol 151 MovieClip {Decor8}Uses:147 149 150Used by:154
Symbol 152 GraphicUsed by:153
Symbol 153 MovieClip {Ericade}Uses:152Used by:154
Symbol 154 MovieClip {Lv8Layout}Uses:93 95 97 146 151 110 116 153Used by:Timeline
Symbol 155 MovieClip {Lv9Layout}Uses:93 84 116 110 75 97Used by:Timeline
Symbol 156 GraphicUsed by:157
Symbol 157 MovieClip {Decor10bg}Uses:113 156Used by:176
Symbol 158 GraphicUsed by:165
Symbol 159 ShapeTweeningUsed by:165
Symbol 160 GraphicUsed by:165
Symbol 161 EditableTextUses:77Used by:165
Symbol 162 GraphicUsed by:165 356
Symbol 163 ShapeTweeningUsed by:165
Symbol 164 GraphicUsed by:165
Symbol 165 MovieClip {Decor10}Uses:158 159 160 161 162 163 164 43Used by:176
Symbol 166 GraphicUsed by:167
Symbol 167 MovieClip {ring}Uses:166Used by:176
Symbol 168 GraphicUsed by:169
Symbol 169 MovieClipUses:168Used by:175 212 215 219 228 231 241 247 255 265 344
Symbol 170 ShapeTweeningUsed by:175
Symbol 171 GraphicUsed by:175
Symbol 172 GraphicUsed by:175
Symbol 173 GraphicUsed by:175
Symbol 174 GraphicUsed by:175
Symbol 175 MovieClip {Demo10c}Uses:169 170 171 172 173 174Used by:176  Timeline
Symbol 176 MovieClip {Lv10Layout}Uses:97 99 101 93 157 95 112 165 116 110 167 175Used by:Timeline
Symbol 177 GraphicUsed by:178
Symbol 178 MovieClip {Level11Decor}Uses:177Used by:185
Symbol 179 GraphicUsed by:184
Symbol 180 EditableTextUses:69 148Used by:184
Symbol 181 GraphicUsed by:184
Symbol 182 EditableTextUses:69 148Used by:184
Symbol 183 EditableTextUses:69 148Used by:184
Symbol 184 MovieClip {Level11FG}Uses:179 180 181 182 183Used by:185
Symbol 185 MovieClip {Lv11Layout}Uses:178 93 95 97 112 110 184Used by:Timeline
Symbol 186 GraphicUsed by:191
Symbol 187 EditableTextUses:77Used by:191
Symbol 188 EditableTextUses:69Used by:191
Symbol 189 GraphicUsed by:191
Symbol 190 GraphicUsed by:191
Symbol 191 MovieClip {DecorGallery2}Uses:186 187 105 188 189 190Used by:192
Symbol 192 MovieClip {LvGallery2Layout}Uses:93 191 95 97 110 116Used by:Timeline
Symbol 193 GraphicUsed by:197
Symbol 194 EditableTextUses:77Used by:197
Symbol 195 EditableTextUses:69Used by:197
Symbol 196 GraphicUsed by:197
Symbol 197 MovieClip {DecorGallery3}Uses:193 194 195 196Used by:198
Symbol 198 MovieClip {LvGallery3Layout}Uses:97 93 197 95 110 116Used by:Timeline
Symbol 199 GraphicUsed by:203
Symbol 200 EditableTextUses:77Used by:203
Symbol 201 EditableTextUses:69Used by:203
Symbol 202 GraphicUsed by:203
Symbol 203 MovieClip {DecorGallery4}Uses:199 200 201 202Used by:206
Symbol 204 GraphicUsed by:205
Symbol 205 MovieClip {WebsiteButton}Uses:204Used by:206
Symbol 206 MovieClip {LvGallery4Layout}Uses:97 93 203 95 110 116 205Used by:Timeline
Symbol 207 GraphicUsed by:208
Symbol 208 MovieClipUses:207Used by:209 216 232 233 234 235 249 266
Symbol 209 MovieClip {Demo2}Uses:208Used by:Timeline
Symbol 210 ShapeTweeningUsed by:212
Symbol 211 GraphicUsed by:212
Symbol 212 MovieClip {Demo2a}Uses:169 210 211Used by:Timeline
Symbol 213 ShapeTweeningUsed by:215
Symbol 214 GraphicUsed by:215
Symbol 215 MovieClip {Demo2b}Uses:169 213 214Used by:359  Timeline
Symbol 216 MovieClip {Demo3}Uses:208Used by:Timeline
Symbol 217 ShapeTweeningUsed by:219
Symbol 218 GraphicUsed by:219
Symbol 219 MovieClip {Demo3a}Uses:169 217 218Used by:Timeline
Symbol 220 ShapeTweeningUsed by:228
Symbol 221 GraphicUsed by:228
Symbol 222 ShapeTweeningUsed by:228
Symbol 223 GraphicUsed by:228
Symbol 224 ShapeTweeningUsed by:228
Symbol 225 GraphicUsed by:228
Symbol 226 GraphicUsed by:228
Symbol 227 GraphicUsed by:228
Symbol 228 MovieClip {Demo4}Uses:169 220 221 222 223 224 225 226 227Used by:Timeline
Symbol 229 ShapeTweeningUsed by:231
Symbol 230 GraphicUsed by:231
Symbol 231 MovieClip {Demo4a}Uses:169 229 230Used by:Timeline
Symbol 232 MovieClip {Demo5}Uses:208Used by:Timeline
Symbol 233 MovieClip {Demo5a}Uses:208Used by:Timeline
Symbol 234 MovieClip {Demo5b}Uses:208Used by:Timeline
Symbol 235 MovieClip {Demo5c}Uses:208Used by:Timeline
Symbol 236 ShapeTweeningUsed by:241
Symbol 237 GraphicUsed by:241
Symbol 238 GraphicUsed by:241
Symbol 239 GraphicUsed by:241
Symbol 240 GraphicUsed by:241
Symbol 241 MovieClip {Demo5d}Uses:169 236 237 238 239 240Used by:391  Timeline
Symbol 242 ShapeTweeningUsed by:247
Symbol 243 GraphicUsed by:247
Symbol 244 ShapeTweeningUsed by:247
Symbol 245 GraphicUsed by:247
Symbol 246 GraphicUsed by:247
Symbol 247 MovieClip {Demo6}Uses:169 242 243 244 245 246Used by:Timeline
Symbol 248 GraphicUsed by:249 388 398 399 443
Symbol 249 MovieClip {Demo6b}Uses:208 248Used by:Timeline
Symbol 250 ShapeTweeningUsed by:255
Symbol 251 GraphicUsed by:255
Symbol 252 GraphicUsed by:255
Symbol 253 GraphicUsed by:255
Symbol 254 GraphicUsed by:255
Symbol 255 MovieClip {Demo6c}Uses:169 250 251 252 253 254Used by:Timeline
Symbol 256 ShapeTweeningUsed by:265
Symbol 257 GraphicUsed by:265
Symbol 258 ShapeTweeningUsed by:265
Symbol 259 GraphicUsed by:265
Symbol 260 ShapeTweeningUsed by:265
Symbol 261 GraphicUsed by:265
Symbol 262 ShapeTweeningUsed by:265
Symbol 263 GraphicUsed by:265
Symbol 264 GraphicUsed by:265
Symbol 265 MovieClip {Demo10a}Uses:169 256 257 258 259 260 261 262 263 264Used by:Timeline
Symbol 266 MovieClip {Demo10b}Uses:208Used by:Timeline
Symbol 267 GraphicUsed by:271
Symbol 268 EditableTextUses:148Used by:271
Symbol 269 EditableTextUses:137Used by:271
Symbol 270 EditableTextUses:137Used by:271
Symbol 271 MovieClip {ui.Clock}Uses:267 268 269 270Used by:Timeline
Symbol 272 EditableTextUses:137Used by:273
Symbol 273 MovieClip {ui.FloatingText}Uses:272Used by:Timeline
Symbol 274 EditableTextUses:69Used by:278
Symbol 275 EditableTextUses:137Used by:278
Symbol 276 EditableTextUses:69Used by:278
Symbol 277 EditableTextUses:69Used by:278
Symbol 278 MovieClip {ui.LevelButton}Uses:43 274 275 276 45 277Used by:317  Timeline
Symbol 279 EditableTextUses:137Used by:317
Symbol 280 GraphicUsed by:286 297 518
Symbol 281 EditableTextUses:69Used by:286
Symbol 282 GraphicUsed by:286
Symbol 283 EditableTextUses:69Used by:286
Symbol 284 GraphicUsed by:286 297
Symbol 285 EditableTextUses:69Used by:286
Symbol 286 ButtonUses:280 281 282 283 284 285Used by:317  Timeline
Symbol 287 GraphicUsed by:292 301
Symbol 288 EditableTextUses:69Used by:292
Symbol 289 GraphicUsed by:292 301
Symbol 290 EditableTextUses:69Used by:292
Symbol 291 EditableTextUses:69Used by:292
Symbol 292 ButtonUses:287 288 289 290 291Used by:317
Symbol 293 EditableTextUses:69Used by:297
Symbol 294 GraphicUsed by:297
Symbol 295 EditableTextUses:69Used by:297
Symbol 296 EditableTextUses:69Used by:297
Symbol 297 ButtonUses:280 293 294 295 284 296Used by:317
Symbol 298 EditableTextUses:69Used by:301
Symbol 299 EditableTextUses:69Used by:301
Symbol 300 EditableTextUses:69Used by:301
Symbol 301 ButtonUses:287 298 289 299 300Used by:317
Symbol 302 EditableTextUses:69Used by:317
Symbol 303 EditableTextUses:69Used by:317
Symbol 304 GraphicUsed by:317
Symbol 305 EditableTextUses:69Used by:317
Symbol 306 EditableTextUses:137Used by:317
Symbol 307 EditableTextUses:69Used by:317
Symbol 308 EditableTextUses:69Used by:317
Symbol 309 EditableTextUses:69Used by:317
Symbol 310 EditableTextUses:69Used by:317
Symbol 311 EditableTextUses:137Used by:317
Symbol 312 EditableTextUses:137Used by:317
Symbol 313 MovieClipUses:76Used by:317
Symbol 314 EditableTextUses:137Used by:317
Symbol 315 EditableTextUses:137Used by:317
Symbol 316 EditableTextUses:137Used by:317
Symbol 317 MovieClip {ui.LevelSelect}Uses:278 279 286 292 297 301 302 303 67 64 60 52 46 304 305 306 307 308 309 310 311 312 313 314 315 316Used by:Timeline
Symbol 318 EditableTextUses:137Used by:319
Symbol 319 MovieClip {Lvl11Score}Uses:318Used by:Timeline
Symbol 320 GraphicUsed by:324
Symbol 321 EditableTextUses:69Used by:324
Symbol 322 EditableTextUses:69Used by:324
Symbol 323 GraphicUsed by:324
Symbol 324 MovieClip {ui.PauseScreen}Uses:320 321 322 323 79Used by:Timeline
Symbol 325 GraphicUsed by:330
Symbol 326 EditableTextUses:1Used by:330
Symbol 327 EditableTextUses:77Used by:330
Symbol 328 GraphicUsed by:330
Symbol 329 GraphicUsed by:330
Symbol 330 MovieClip {DecorGallery}Uses:325 326 327 105 328 329Used by:331
Symbol 331 MovieClip {LvGalleryLayout}Uses:93 330 116 95 97 110Used by:Timeline
Symbol 332 BitmapUsed by:333 339
Symbol 333 GraphicUses:332Used by:341
Symbol 334 EditableTextUses:77Used by:341
Symbol 335 GraphicUsed by:341
Symbol 336 EditableTextUses:69Used by:341
Symbol 337 ShapeTweeningUsed by:341
Symbol 338 GraphicUsed by:341
Symbol 339 GraphicUses:332Used by:341
Symbol 340 GraphicUsed by:341
Symbol 341 MovieClip {Decor1}Uses:120 333 334 335 336 337 338 339 340Used by:345
Symbol 342 ShapeTweeningUsed by:344
Symbol 343 GraphicUsed by:344
Symbol 344 MovieClip {Demo}Uses:169 342 343Used by:345  Timeline
Symbol 345 MovieClip {Lv1Layout}Uses:97 341 116 93 112 95 99 101 110 344Used by:Timeline
Symbol 346 GraphicUsed by:347
Symbol 347 MovieClip {level2FG}Uses:346 113Used by:359
Symbol 348 GraphicUsed by:356
Symbol 349 ShapeTweeningUsed by:356
Symbol 350 GraphicUsed by:356
Symbol 351 GraphicUsed by:356 358
Symbol 352 EditableTextUses:77Used by:356
Symbol 353 ShapeTweeningUsed by:356
Symbol 354 GraphicUsed by:356
Symbol 355 GraphicUsed by:356
Symbol 356 MovieClip {Decor2}Uses:348 349 350 351 352 162 353 354 355Used by:359
Symbol 357 GraphicUsed by:358
Symbol 358 MovieClip {Decor2FG}Uses:357 113 351Used by:359
Symbol 359 MovieClip {Lv2Layout}Uses:347 215 97 356 93 99 101 95 112 110 116 358Used by:Timeline
Symbol 360 GraphicUsed by:366
Symbol 361 ShapeTweeningUsed by:366
Symbol 362 GraphicUsed by:366
Symbol 363 EditableTextUses:77Used by:366
Symbol 364 GraphicUsed by:366
Symbol 365 GraphicUsed by:366
Symbol 366 MovieClip {Decor5}Uses:360 361 362 363 364 365Used by:371
Symbol 367 GraphicUsed by:368
Symbol 368 MovieClip {circle}Uses:367Used by:371
Symbol 369 GraphicUsed by:370
Symbol 370 MovieClip {Decor5fg}Uses:369Used by:371
Symbol 371 MovieClip {Lv3Layout}Uses:97 366 116 93 99 101 368 112 95 110 370Used by:Timeline
Symbol 372 GraphicUsed by:379
Symbol 373 EditableTextUses:77Used by:379
Symbol 374 ShapeTweeningUsed by:379
Symbol 375 ShapeTweeningUsed by:379
Symbol 376 GraphicUsed by:379
Symbol 377 GraphicUsed by:379
Symbol 378 GraphicUsed by:379
Symbol 379 MovieClip {Decor4}Uses:372 373 374 375 376 377 378 109Used by:380
Symbol 380 MovieClip {Lv4Layout}Uses:97 379 116 93 99 101 112 95 110Used by:Timeline
Symbol 381 GraphicUsed by:388
Symbol 382 GraphicUsed by:388
Symbol 383 GraphicUsed by:388
Symbol 384 EditableTextUses:77Used by:388
Symbol 385 ShapeTweeningUsed by:388
Symbol 386 GraphicUsed by:388
Symbol 387 GraphicUsed by:388
Symbol 388 MovieClip {Decor3}Uses:381 382 383 384 385 386 248 387Used by:391
Symbol 389 GraphicUsed by:390
Symbol 390 MovieClip {Decor3FG}Uses:389Used by:391
Symbol 391 MovieClip {Lv5Layout}Uses:97 93 95 112 99 388 101 110 116 390 241Used by:Timeline
Symbol 392 EditableTextUses:69Used by:394
Symbol 393 EditableTextUses:69Used by:394
Symbol 394 MovieClip {Credits}Uses:392 393Used by:395
Symbol 395 MovieClip {LvCreditsLayout}Uses:93 95 112 110 394Used by:Timeline
Symbol 396 EditableTextUses:69Used by:397
Symbol 397 MovieClip {ui.SpeechBubble}Uses:396Used by:Timeline
Symbol 398 MovieClip {PlayerClip}Uses:248Used by:Timeline
Symbol 399 MovieClip {sprites.Player}Uses:248Used by:Timeline
Symbol 400 GraphicUsed by:401
Symbol 401 MovieClip {sprites.PhysCircleFill}Uses:400Used by:Timeline
Symbol 402 GraphicUsed by:403
Symbol 403 MovieClip {sprites.PhysCircle}Uses:402Used by:Timeline
Symbol 404 GraphicUsed by:405
Symbol 405 MovieClip {sprites.PhysBoxFill}Uses:404Used by:Timeline
Symbol 406 GraphicUsed by:407
Symbol 407 MovieClip {sprites.PhysBox}Uses:406Used by:Timeline
Symbol 408 GraphicUsed by:409
Symbol 409 MovieClip {Ink}Uses:408Used by:Timeline
Symbol 410 GraphicUsed by:411
Symbol 411 MovieClip {Exit}Uses:410Used by:Timeline
Symbol 412 GraphicUsed by:413
Symbol 413 MovieClip {ui.InkPot}Uses:412Used by:Timeline
Symbol 414 GraphicUsed by:419 422 425 428 449 453 456 459 463
Symbol 415 GraphicUsed by:419
Symbol 416 GraphicUsed by:419 422 425 428 449 453 456 459 463
Symbol 417 EditableTextUses:1Used by:419
Symbol 418 GraphicUsed by:419 422 425 428 449 453 456 459
Symbol 419 MovieClip {DynamicButton}Uses:414 415 416 4 417 418Used by:Timeline
Symbol 420 GraphicUsed by:422
Symbol 421 EditableTextUses:1Used by:422
Symbol 422 MovieClip {ExitButton}Uses:414 420 416 4 421 418Used by:Timeline
Symbol 423 GraphicUsed by:425
Symbol 424 EditableTextUses:1Used by:425
Symbol 425 MovieClip {InkButton}Uses:414 423 416 4 424 418Used by:Timeline
Symbol 426 GraphicUsed by:428
Symbol 427 EditableTextUses:1Used by:428
Symbol 428 MovieClip {StaticButton}Uses:414 426 416 4 427 418Used by:Timeline
Symbol 429 EditableTextUses:1Used by:431
Symbol 430 EditableTextUses:1Used by:431
Symbol 431 MovieClip {levelEditor.NameValueControl}Uses:429 430Used by:Timeline
Symbol 432 GraphicUsed by:433 438
Symbol 433 MovieClipUses:432Used by:437
Symbol 434 EditableTextUses:137Used by:437
Symbol 435 GraphicUsed by:436
Symbol 436 MovieClipUses:435Used by:437
Symbol 437 MovieClip {levelEditor.OptionsPanel}Uses:433 434 436Used by:Timeline
Symbol 438 MovieClip {levelEditor.DynamicRectMatrixObject}Uses:432Used by:Timeline
Symbol 439 GraphicUsed by:440
Symbol 440 MovieClip {levelEditor.ExitMatrixObject}Uses:439Used by:Timeline
Symbol 441 GraphicUsed by:442
Symbol 442 MovieClip {levelEditor.InkMatrixObject}Uses:441Used by:Timeline
Symbol 443 MovieClip {levelEditor.PlayerMatrixObject}Uses:248Used by:Timeline
Symbol 444 GraphicUsed by:445
Symbol 445 MovieClip {levelEditor.StaticRectMatrixObject}Uses:444Used by:Timeline
Symbol 446 GraphicUsed by:449
Symbol 447 GraphicUsed by:449
Symbol 448 EditableTextUses:1Used by:449
Symbol 449 MovieClip {TransformButton}Uses:414 446 447 416 4 448 418Used by:Timeline
Symbol 450 GraphicUsed by:453
Symbol 451 EditableTextUses:1Used by:453
Symbol 452 EditableTextUses:1Used by:453
Symbol 453 MovieClip {JointButton}Uses:414 450 416 4 451 452 418Used by:Timeline
Symbol 454 GraphicUsed by:456
Symbol 455 EditableTextUses:1Used by:456
Symbol 456 MovieClip {ClearButton}Uses:414 454 416 4 455 418Used by:Timeline
Symbol 457 GraphicUsed by:459
Symbol 458 EditableTextUses:1Used by:459
Symbol 459 MovieClip {DeleteButton}Uses:414 457 416 4 458 418Used by:Timeline
Symbol 460 MovieClipUses:115Used by:465 469
Symbol 461 EditableTextUses:1Used by:465
Symbol 462 GraphicUsed by:463
Symbol 463 ButtonUses:416 462 414Used by:465
Symbol 464 EditableTextUses:1Used by:465
Symbol 465 MovieClip {levelEditor.DropDownControl}Uses:460 461 463 464Used by:Timeline
Symbol 466 GraphicUsed by:467
Symbol 467 MovieClip {levelEditor.JointMatrixObject}Uses:466Used by:Timeline
Symbol 468 EditableTextUses:1Used by:469
Symbol 469 MovieClip {DropDownRow}Uses:460 468Used by:Timeline
Symbol 470 Sound {asiam2}Used by:Timeline
Symbol 471 Sound {asiam1}Used by:Timeline
Symbol 472 Sound {asiam3}Used by:Timeline
Symbol 473 Sound {asiam4}Used by:Timeline
Symbol 474 Sound {asiam5}Used by:Timeline
Symbol 475 Sound {asiam6}Used by:Timeline
Symbol 476 GraphicUsed by:477
Symbol 477 MovieClipUses:476Used by:Timeline
Symbol 478 GraphicUsed by:483
Symbol 479 EditableTextUses:69Used by:483
Symbol 480 GraphicUsed by:483
Symbol 481 GraphicUsed by:483
Symbol 482 EditableTextUses:69Used by:483
Symbol 483 ButtonUses:478 479 480 481 482Used by:Timeline
Symbol 484 GraphicUsed by:489
Symbol 485 EditableTextUses:69Used by:489
Symbol 486 GraphicUsed by:489
Symbol 487 GraphicUsed by:489
Symbol 488 EditableTextUses:69Used by:489
Symbol 489 ButtonUses:484 485 486 487 488Used by:Timeline
Symbol 490 GraphicUsed by:495
Symbol 491 EditableTextUses:69Used by:495
Symbol 492 GraphicUsed by:495
Symbol 493 GraphicUsed by:495
Symbol 494 EditableTextUses:69Used by:495
Symbol 495 ButtonUses:490 491 492 493 494Used by:Timeline
Symbol 496 EditableTextUses:69Used by:499
Symbol 497 EditableTextUses:69Used by:499
Symbol 498 EditableTextUses:69Used by:499
Symbol 499 ButtonUses:68 496 71 497 73 498Used by:Timeline
Symbol 500 EditableTextUses:137Used by:Timeline
Symbol 501 EditableTextUses:69Used by:504
Symbol 502 EditableTextUses:69Used by:504
Symbol 503 EditableTextUses:69Used by:504
Symbol 504 ButtonUses:68 501 71 502 73 503Used by:Timeline
Symbol 505 EditableTextUses:69Used by:507
Symbol 506 EditableTextUses:69Used by:507
Symbol 507 ButtonUses:68 505 71 73 506Used by:Timeline
Symbol 508 GraphicUsed by:513
Symbol 509 EditableTextUses:69Used by:513
Symbol 510 GraphicUsed by:513
Symbol 511 GraphicUsed by:513
Symbol 512 EditableTextUses:69Used by:513
Symbol 513 ButtonUses:508 509 510 511 512Used by:Timeline
Symbol 514 EditableTextUses:69Used by:518
Symbol 515 GraphicUsed by:518
Symbol 516 GraphicUsed by:518
Symbol 517 EditableTextUses:69Used by:518
Symbol 518 ButtonUses:280 514 515 516 517Used by:Timeline
Symbol 519 FontUsed by:520
Symbol 520 EditableTextUses:519Used by:521
Symbol 521 MovieClipUses:520Used by:Timeline
Symbol 522 GraphicUsed by:525
Symbol 523 EditableTextUses:69Used by:525
Symbol 524 EditableTextUses:69Used by:525
Symbol 525 MovieClip {Main2_fla.title_150}Uses:522 76 80 79 523 524Used by:Timeline

Instance Names

"pen_btn"Frame 1Symbol 90 MovieClip {PenButton}
"eraser_btn"Frame 1Symbol 88 MovieClip {EraseButton}
"cover_mc"Frame 10Symbol 477 MovieClip
"back_btn"Frame 10Symbol 483 Button
"menu_btn"Frame 10Symbol 489 Button
"test_btn"Frame 10Symbol 495 Button
"level1_btn"Frame 10Symbol 499 Button
"level_txt"Frame 10Symbol 500 EditableText
"gallery_btn"Frame 10Symbol 504 Button
"editor_btn"Frame 10Symbol 507 Button
"reset_btn"Frame 10Symbol 286 Button
"hint_btn"Frame 10Symbol 513 Button
"mute_btn"Frame 10Symbol 518 Button
"title_mc"Frame 10Symbol 525 MovieClip {Main2_fla.title_150}
"levelSelect"Frame 10Symbol 317 MovieClip {ui.LevelSelect}
"paused_mc"Frame 10Symbol 324 MovieClip {ui.PauseScreen}
"input_txt"Symbol 6 MovieClip {LevelNameButton} Frame 1Symbol 2 EditableText
"input_txt"Symbol 10 MovieClip {ParTimeButton} Frame 1Symbol 7 EditableText
"lock_mc"Symbol 46 MovieClip {PartyCostumeButton} Frame 1Symbol 45 MovieClip
"costume_mc"Symbol 46 MovieClip {PartyCostumeButton} Frame 1Symbol 42 MovieClip {PartyEricCostume}
"lock_mc"Symbol 52 MovieClip {DJCostumeButton} Frame 1Symbol 45 MovieClip
"costume_mc"Symbol 52 MovieClip {DJCostumeButton} Frame 1Symbol 51 MovieClip {HeadPhonesEricCostume}
"lock_mc"Symbol 60 MovieClip {SuperCostumeButton} Frame 1Symbol 45 MovieClip
"costume_mc"Symbol 60 MovieClip {SuperCostumeButton} Frame 1Symbol 59 MovieClip {SuperEricCostume}
"lock_mc"Symbol 64 MovieClip {AngelCostumeButton} Frame 1Symbol 45 MovieClip
"costume_mc"Symbol 64 MovieClip {AngelCostumeButton} Frame 1Symbol 63 MovieClip {AngelEricCostume}
"lock_mc"Symbol 67 MovieClip {NoCostumeButton} Frame 1Symbol 45 MovieClip
"costume_mc"Symbol 67 MovieClip {NoCostumeButton} Frame 1Symbol 66 MovieClip
"time_txt"Symbol 84 MovieClip {titlecopy} Frame 1Symbol 78 EditableText
"bg_mc"Symbol 88 MovieClip {EraseButton} Frame 1Symbol 86 MovieClip
"bg_mc"Symbol 90 MovieClip {PenButton} Frame 1Symbol 86 MovieClip
"time_txt"Symbol 108 MovieClip {Decor6Tet} Frame 1Symbol 103 EditableText
"__id5_"Symbol 117 MovieClip {Lv6Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"__id8_"Symbol 117 MovieClip {Lv6Layout} Frame 1Symbol 99 MovieClip {segment}
"__id9_"Symbol 117 MovieClip {Lv6Layout} Frame 1Symbol 101 MovieClip {b2MovieClips.b2JointMC}
"__id13_"Symbol 117 MovieClip {Lv6Layout} Frame 1Symbol 101 MovieClip {b2MovieClips.b2JointMC}
"__id15_"Symbol 117 MovieClip {Lv6Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"pic6"Symbol 117 MovieClip {Lv6Layout} Frame 1Symbol 108 MovieClip {Decor6Tet}
"__id16_"Symbol 117 MovieClip {Lv6Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"__id17_"Symbol 117 MovieClip {Lv6Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"__id18_"Symbol 117 MovieClip {Lv6Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"__id19_"Symbol 117 MovieClip {Lv6Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"__id20_"Symbol 117 MovieClip {Lv6Layout} Frame 1Symbol 112 MovieClip {b2MovieClips.InkGFX}
"p6"Symbol 117 MovieClip {Lv6Layout} Frame 1Symbol 116 MovieClip {b2MovieClips.PictureFrameGFX}
"time_txt"Symbol 130 MovieClip {Decor7} Frame 1Symbol 124 EditableText
"__id27_"Symbol 133 MovieClip {Lv7Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"__id28_"Symbol 133 MovieClip {Lv7Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"__id29_"Symbol 133 MovieClip {Lv7Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"__id30_"Symbol 133 MovieClip {Lv7Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"__id31_"Symbol 133 MovieClip {Lv7Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"__id32_"Symbol 133 MovieClip {Lv7Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"__id33_"Symbol 133 MovieClip {Lv7Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"__id34_"Symbol 133 MovieClip {Lv7Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"__id35_"Symbol 133 MovieClip {Lv7Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"p7"Symbol 133 MovieClip {Lv7Layout} Frame 1Symbol 130 MovieClip {Decor7}
"pic7"Symbol 133 MovieClip {Lv7Layout} Frame 1Symbol 116 MovieClip {b2MovieClips.PictureFrameGFX}
"__id36_"Symbol 133 MovieClip {Lv7Layout} Frame 1Symbol 112 MovieClip {b2MovieClips.InkGFX}
"best_txt"Symbol 146 MovieClip {Decor8Pic} Frame 1Symbol 140 EditableText
"score_txt"Symbol 146 MovieClip {Decor8Pic} Frame 1Symbol 142 EditableText
"time_txt"Symbol 146 MovieClip {Decor8Pic} Frame 1Symbol 143 EditableText
"height_txt"Symbol 146 MovieClip {Decor8Pic} Frame 1Symbol 145 EditableText
"__id46_"Symbol 154 MovieClip {Lv8Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id47_"Symbol 154 MovieClip {Lv8Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id48_"Symbol 154 MovieClip {Lv8Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id49_"Symbol 154 MovieClip {Lv8Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id50_"Symbol 154 MovieClip {Lv8Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id51_"Symbol 154 MovieClip {Lv8Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id52_"Symbol 154 MovieClip {Lv8Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"s8a"Symbol 154 MovieClip {Lv8Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"s8b"Symbol 154 MovieClip {Lv8Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"s8c"Symbol 154 MovieClip {Lv8Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"__id63_"Symbol 154 MovieClip {Lv8Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"__id64_"Symbol 154 MovieClip {Lv8Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"s8d"Symbol 154 MovieClip {Lv8Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"level8ScoreBoard"Symbol 154 MovieClip {Lv8Layout} Frame 1Symbol 146 MovieClip {Decor8Pic}
"p1"Symbol 154 MovieClip {Lv8Layout} Frame 1Symbol 116 MovieClip {b2MovieClips.PictureFrameGFX}
"ericade_mc"Symbol 154 MovieClip {Lv8Layout} Frame 1Symbol 153 MovieClip {Ericade}
"titleDecor"Symbol 155 MovieClip {Lv9Layout} Frame 1Symbol 84 MovieClip {titlecopy}
"__id68_"Symbol 155 MovieClip {Lv9Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id69_"Symbol 155 MovieClip {Lv9Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id70_"Symbol 155 MovieClip {Lv9Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id71_"Symbol 155 MovieClip {Lv9Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id72_"Symbol 155 MovieClip {Lv9Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"titleFrame"Symbol 155 MovieClip {Lv9Layout} Frame 1Symbol 116 MovieClip {b2MovieClips.PictureFrameGFX}
"continue_btn"Symbol 155 MovieClip {Lv9Layout} Frame 1Symbol 75 MovieClip {CotinueDecorButton}
"__id73_"Symbol 155 MovieClip {Lv9Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"__id74_"Symbol 155 MovieClip {Lv9Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"time_txt"Symbol 165 MovieClip {Decor10} Frame 1Symbol 161 EditableText
"__id75_"Symbol 176 MovieClip {Lv10Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"__id76_"Symbol 176 MovieClip {Lv10Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"__id77_"Symbol 176 MovieClip {Lv10Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"__id78_"Symbol 176 MovieClip {Lv10Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"__id81_"Symbol 176 MovieClip {Lv10Layout} Frame 1Symbol 99 MovieClip {segment}
"__id83_"Symbol 176 MovieClip {Lv10Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"__id84_"Symbol 176 MovieClip {Lv10Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"__id85_"Symbol 176 MovieClip {Lv10Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"__id86_"Symbol 176 MovieClip {Lv10Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"__id87_"Symbol 176 MovieClip {Lv10Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"__id88_"Symbol 176 MovieClip {Lv10Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"__id89_"Symbol 176 MovieClip {Lv10Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"exit"Symbol 176 MovieClip {Lv10Layout} Frame 1Symbol 95 MovieClip {b2MovieClips.ExitGFX}
"__id95_"Symbol 176 MovieClip {Lv10Layout} Frame 1Symbol 112 MovieClip {b2MovieClips.InkGFX}
"__id98_"Symbol 176 MovieClip {Lv10Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"p10"Symbol 176 MovieClip {Lv10Layout} Frame 1Symbol 165 MovieClip {Decor10}
"pic10"Symbol 176 MovieClip {Lv10Layout} Frame 1Symbol 116 MovieClip {b2MovieClips.PictureFrameGFX}
"__id119_"Symbol 176 MovieClip {Lv10Layout} Frame 1Symbol 99 MovieClip {segment}
"s11d"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"__id124_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"__id126_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 112 MovieClip {b2MovieClips.InkGFX}
"__id127_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 112 MovieClip {b2MovieClips.InkGFX}
"__id128_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 112 MovieClip {b2MovieClips.InkGFX}
"__id129_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"__id130_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id131_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id132_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id133_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id134_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id135_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id136_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id137_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id138_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"s11e"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"__id139_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id140_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id141_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id142_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id143_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id144_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id145_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id146_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id147_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id148_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id149_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id150_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id151_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id152_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id153_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id154_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id155_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id156_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id157_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id158_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id159_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id160_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id161_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id162_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id163_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id164_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id165_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id167_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id168_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id169_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id170_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id171_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id172_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id173_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id174_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id175_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id176_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id177_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id178_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id179_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id180_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id181_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id182_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id183_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id184_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id185_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id186_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id187_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id188_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id189_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id190_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id191_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id192_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id193_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id195_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id196_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id197_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id198_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id199_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id200_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id201_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id202_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id203_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id204_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id205_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id206_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id207_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id208_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id209_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id210_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id211_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id212_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id213_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id214_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id215_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id216_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id217_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id218_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id219_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"s11a"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"__id220_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id221_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id222_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id223_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id224_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id225_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id226_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id227_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id228_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id229_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id230_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id231_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id232_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id233_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id234_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id235_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id236_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id237_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id238_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id239_"Symbol 185 MovieClip {Lv11Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"time_txt"Symbol 191 MovieClip {DecorGallery2} Frame 1Symbol 187 EditableText
"__id241_"Symbol 192 MovieClip {LvGallery2Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"pGallery2"Symbol 192 MovieClip {LvGallery2Layout} Frame 1Symbol 191 MovieClip {DecorGallery2}
"__id244_"Symbol 192 MovieClip {LvGallery2Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"__id246_"Symbol 192 MovieClip {LvGallery2Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"picGallery2"Symbol 192 MovieClip {LvGallery2Layout} Frame 1Symbol 116 MovieClip {b2MovieClips.PictureFrameGFX}
"time_txt"Symbol 197 MovieClip {DecorGallery3} Frame 1Symbol 194 EditableText
"__id247_"Symbol 198 MovieClip {LvGallery3Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"__id249_"Symbol 198 MovieClip {LvGallery3Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"pGallery3"Symbol 198 MovieClip {LvGallery3Layout} Frame 1Symbol 197 MovieClip {DecorGallery3}
"__id252_"Symbol 198 MovieClip {LvGallery3Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"picGallery2"Symbol 198 MovieClip {LvGallery3Layout} Frame 1Symbol 116 MovieClip {b2MovieClips.PictureFrameGFX}
"time_txt"Symbol 203 MovieClip {DecorGallery4} Frame 1Symbol 200 EditableText
"__id254_"Symbol 206 MovieClip {LvGallery4Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"__id256_"Symbol 206 MovieClip {LvGallery4Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"pGallery4"Symbol 206 MovieClip {LvGallery4Layout} Frame 1Symbol 203 MovieClip {DecorGallery4}
"__id259_"Symbol 206 MovieClip {LvGallery4Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"picGallery2"Symbol 206 MovieClip {LvGallery4Layout} Frame 1Symbol 116 MovieClip {b2MovieClips.PictureFrameGFX}
"web_btn"Symbol 206 MovieClip {LvGallery4Layout} Frame 1Symbol 205 MovieClip {WebsiteButton}
"mins_txt"Symbol 271 MovieClip {ui.Clock} Frame 1Symbol 269 EditableText
"secs_txt"Symbol 271 MovieClip {ui.Clock} Frame 1Symbol 270 EditableText
"text_txt"Symbol 273 MovieClip {ui.FloatingText} Frame 1Symbol 272 EditableText
"score_txt"Symbol 278 MovieClip {ui.LevelButton} Frame 1Symbol 275 EditableText
"level_txt"Symbol 278 MovieClip {ui.LevelButton} Frame 1Symbol 276 EditableText
"lock_mc"Symbol 278 MovieClip {ui.LevelButton} Frame 1Symbol 45 MovieClip
"but1"Symbol 317 MovieClip {ui.LevelSelect} Frame 1Symbol 278 MovieClip {ui.LevelButton}
"but2"Symbol 317 MovieClip {ui.LevelSelect} Frame 1Symbol 278 MovieClip {ui.LevelButton}
"but3"Symbol 317 MovieClip {ui.LevelSelect} Frame 1Symbol 278 MovieClip {ui.LevelButton}
"but4"Symbol 317 MovieClip {ui.LevelSelect} Frame 1Symbol 278 MovieClip {ui.LevelButton}
"but5"Symbol 317 MovieClip {ui.LevelSelect} Frame 1Symbol 278 MovieClip {ui.LevelButton}
"but6"Symbol 317 MovieClip {ui.LevelSelect} Frame 1Symbol 278 MovieClip {ui.LevelButton}
"but7"Symbol 317 MovieClip {ui.LevelSelect} Frame 1Symbol 278 MovieClip {ui.LevelButton}
"but8"Symbol 317 MovieClip {ui.LevelSelect} Frame 1Symbol 278 MovieClip {ui.LevelButton}
"but9"Symbol 317 MovieClip {ui.LevelSelect} Frame 1Symbol 278 MovieClip {ui.LevelButton}
"but10"Symbol 317 MovieClip {ui.LevelSelect} Frame 1Symbol 278 MovieClip {ui.LevelButton}
"total_txt"Symbol 317 MovieClip {ui.LevelSelect} Frame 1Symbol 279 EditableText
"reset_btn"Symbol 317 MovieClip {ui.LevelSelect} Frame 1Symbol 286 Button
"bonus_btn"Symbol 317 MovieClip {ui.LevelSelect} Frame 1Symbol 292 Button
"submit_btn"Symbol 317 MovieClip {ui.LevelSelect} Frame 1Symbol 297 Button
"high_btn"Symbol 317 MovieClip {ui.LevelSelect} Frame 1Symbol 301 Button
"noCostume_btn"Symbol 317 MovieClip {ui.LevelSelect} Frame 1Symbol 67 MovieClip {NoCostumeButton}
"angelCostume_btn"Symbol 317 MovieClip {ui.LevelSelect} Frame 1Symbol 64 MovieClip {AngelCostumeButton}
"suerCostume_btn"Symbol 317 MovieClip {ui.LevelSelect} Frame 1Symbol 60 MovieClip {SuperCostumeButton}
"headPhonesCostume_btn"Symbol 317 MovieClip {ui.LevelSelect} Frame 1Symbol 52 MovieClip {DJCostumeButton}
"partyCostume_btn"Symbol 317 MovieClip {ui.LevelSelect} Frame 1Symbol 46 MovieClip {PartyCostumeButton}
"lastScore_txt"Symbol 317 MovieClip {ui.LevelSelect} Frame 1Symbol 306 EditableText
"lastName_txt"Symbol 317 MovieClip {ui.LevelSelect} Frame 1Symbol 307 EditableText
"lastPic_txt"Symbol 317 MovieClip {ui.LevelSelect} Frame 1Symbol 311 EditableText
"levelScore_txt"Symbol 317 MovieClip {ui.LevelSelect} Frame 1Symbol 312 EditableText
"cover_mc"Symbol 317 MovieClip {ui.LevelSelect} Frame 1Symbol 313 MovieClip
"text_txt"Symbol 319 MovieClip {Lvl11Score} Frame 1Symbol 318 EditableText
"musicSlider_mc"Symbol 324 MovieClip {ui.PauseScreen} Frame 1Symbol 79 MovieClip
"time_txt"Symbol 330 MovieClip {DecorGallery} Frame 1Symbol 327 EditableText
"__id262_"Symbol 331 MovieClip {LvGalleryLayout} Frame 1Symbol 93 MovieClip {staticsegment}
"pGallery"Symbol 331 MovieClip {LvGalleryLayout} Frame 1Symbol 330 MovieClip {DecorGallery}
"picGallery"Symbol 331 MovieClip {LvGalleryLayout} Frame 1Symbol 116 MovieClip {b2MovieClips.PictureFrameGFX}
"__id265_"Symbol 331 MovieClip {LvGalleryLayout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"__id266_"Symbol 331 MovieClip {LvGalleryLayout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"__id267_"Symbol 331 MovieClip {LvGalleryLayout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"time_txt"Symbol 341 MovieClip {Decor1} Frame 1Symbol 334 EditableText
"a6"Symbol 345 MovieClip {Lv1Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"pic1"Symbol 345 MovieClip {Lv1Layout} Frame 1Symbol 341 MovieClip {Decor1}
"p1"Symbol 345 MovieClip {Lv1Layout} Frame 1Symbol 116 MovieClip {b2MovieClips.PictureFrameGFX}
"a1"Symbol 345 MovieClip {Lv1Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"a2"Symbol 345 MovieClip {Lv1Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"a3"Symbol 345 MovieClip {Lv1Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"a4"Symbol 345 MovieClip {Lv1Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"exit"Symbol 345 MovieClip {Lv1Layout} Frame 1Symbol 95 MovieClip {b2MovieClips.ExitGFX}
"a5"Symbol 345 MovieClip {Lv1Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"__id283_"Symbol 345 MovieClip {Lv1Layout} Frame 1Symbol 99 MovieClip {segment}
"__id286_"Symbol 345 MovieClip {Lv1Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"__id287_"Symbol 345 MovieClip {Lv1Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"time_txt"Symbol 356 MovieClip {Decor2} Frame 1Symbol 352 EditableText
"__id288_"Symbol 359 MovieClip {Lv2Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"p2"Symbol 359 MovieClip {Lv2Layout} Frame 1Symbol 356 MovieClip {Decor2}
"pole"Symbol 359 MovieClip {Lv2Layout} Frame 1Symbol 99 MovieClip {segment}
"j3"Symbol 359 MovieClip {Lv2Layout} Frame 1Symbol 101 MovieClip {b2MovieClips.b2JointMC}
"__id304_"Symbol 359 MovieClip {Lv2Layout} Frame 1Symbol 112 MovieClip {b2MovieClips.InkGFX}
"__id306_"Symbol 359 MovieClip {Lv2Layout} Frame 1Symbol 112 MovieClip {b2MovieClips.InkGFX}
"__id307_"Symbol 359 MovieClip {Lv2Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"__id308_"Symbol 359 MovieClip {Lv2Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"__id309_"Symbol 359 MovieClip {Lv2Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"__id310_"Symbol 359 MovieClip {Lv2Layout} Frame 1Symbol 112 MovieClip {b2MovieClips.InkGFX}
"__id311_"Symbol 359 MovieClip {Lv2Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"__id312_"Symbol 359 MovieClip {Lv2Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"__id313_"Symbol 359 MovieClip {Lv2Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"pic2"Symbol 359 MovieClip {Lv2Layout} Frame 1Symbol 116 MovieClip {b2MovieClips.PictureFrameGFX}
"p1fg"Symbol 359 MovieClip {Lv2Layout} Frame 1Symbol 358 MovieClip {Decor2FG}
"__id314_"Symbol 359 MovieClip {Lv2Layout} Frame 1Symbol 99 MovieClip {segment}
"time_txt"Symbol 366 MovieClip {Decor5} Frame 1Symbol 363 EditableText
"__id315_"Symbol 371 MovieClip {Lv3Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"p5"Symbol 371 MovieClip {Lv3Layout} Frame 1Symbol 366 MovieClip {Decor5}
"pic5"Symbol 371 MovieClip {Lv3Layout} Frame 1Symbol 116 MovieClip {b2MovieClips.PictureFrameGFX}
"__id318_"Symbol 371 MovieClip {Lv3Layout} Frame 1Symbol 99 MovieClip {segment}
"__id320_"Symbol 371 MovieClip {Lv3Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id322_"Symbol 371 MovieClip {Lv3Layout} Frame 1Symbol 101 MovieClip {b2MovieClips.b2JointMC}
"__id324_"Symbol 371 MovieClip {Lv3Layout} Frame 1Symbol 101 MovieClip {b2MovieClips.b2JointMC}
"__id326_"Symbol 371 MovieClip {Lv3Layout} Frame 1Symbol 101 MovieClip {b2MovieClips.b2JointMC}
"__id328_"Symbol 371 MovieClip {Lv3Layout} Frame 1Symbol 101 MovieClip {b2MovieClips.b2JointMC}
"__id330_"Symbol 371 MovieClip {Lv3Layout} Frame 1Symbol 101 MovieClip {b2MovieClips.b2JointMC}
"__id332_"Symbol 371 MovieClip {Lv3Layout} Frame 1Symbol 101 MovieClip {b2MovieClips.b2JointMC}
"__id334_"Symbol 371 MovieClip {Lv3Layout} Frame 1Symbol 101 MovieClip {b2MovieClips.b2JointMC}
"__id336_"Symbol 371 MovieClip {Lv3Layout} Frame 1Symbol 101 MovieClip {b2MovieClips.b2JointMC}
"__id338_"Symbol 371 MovieClip {Lv3Layout} Frame 1Symbol 101 MovieClip {b2MovieClips.b2JointMC}
"__id339_"Symbol 371 MovieClip {Lv3Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id343_"Symbol 371 MovieClip {Lv3Layout} Frame 1Symbol 112 MovieClip {b2MovieClips.InkGFX}
"__id348_"Symbol 371 MovieClip {Lv3Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"__id349_"Symbol 371 MovieClip {Lv3Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"p5fg"Symbol 371 MovieClip {Lv3Layout} Frame 1Symbol 370 MovieClip {Decor5fg}
"time_txt"Symbol 379 MovieClip {Decor4} Frame 1Symbol 373 EditableText
"__id350_"Symbol 380 MovieClip {Lv4Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"__id351_"Symbol 380 MovieClip {Lv4Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"p4"Symbol 380 MovieClip {Lv4Layout} Frame 1Symbol 379 MovieClip {Decor4}
"pic4"Symbol 380 MovieClip {Lv4Layout} Frame 1Symbol 116 MovieClip {b2MovieClips.PictureFrameGFX}
"__id357_"Symbol 380 MovieClip {Lv4Layout} Frame 1Symbol 99 MovieClip {segment}
"__id361_"Symbol 380 MovieClip {Lv4Layout} Frame 1Symbol 101 MovieClip {b2MovieClips.b2JointMC}
"__id362_"Symbol 380 MovieClip {Lv4Layout} Frame 1Symbol 112 MovieClip {b2MovieClips.InkGFX}
"__id371_"Symbol 380 MovieClip {Lv4Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"__id372_"Symbol 380 MovieClip {Lv4Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"time_txt"Symbol 388 MovieClip {Decor3} Frame 1Symbol 384 EditableText
"__id373_"Symbol 391 MovieClip {Lv5Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"__id381_"Symbol 391 MovieClip {Lv5Layout} Frame 1Symbol 99 MovieClip {segment}
"__id384_"Symbol 391 MovieClip {Lv5Layout} Frame 1Symbol 99 MovieClip {segment}
"p3"Symbol 391 MovieClip {Lv5Layout} Frame 1Symbol 388 MovieClip {Decor3}
"__id389_"Symbol 391 MovieClip {Lv5Layout} Frame 1Symbol 99 MovieClip {segment}
"__id391_"Symbol 391 MovieClip {Lv5Layout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id400_"Symbol 391 MovieClip {Lv5Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"__id401_"Symbol 391 MovieClip {Lv5Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"__id402_"Symbol 391 MovieClip {Lv5Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"__id403_"Symbol 391 MovieClip {Lv5Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"__id404_"Symbol 391 MovieClip {Lv5Layout} Frame 1Symbol 97 MovieClip {b2MovieClips.TalkArea}
"pic3"Symbol 391 MovieClip {Lv5Layout} Frame 1Symbol 116 MovieClip {b2MovieClips.PictureFrameGFX}
"p3fg"Symbol 391 MovieClip {Lv5Layout} Frame 1Symbol 390 MovieClip {Decor3FG}
"__id420_"Symbol 395 MovieClip {LvCreditsLayout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id421_"Symbol 395 MovieClip {LvCreditsLayout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id422_"Symbol 395 MovieClip {LvCreditsLayout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id423_"Symbol 395 MovieClip {LvCreditsLayout} Frame 1Symbol 93 MovieClip {staticsegment}
"__id424_"Symbol 395 MovieClip {LvCreditsLayout} Frame 1Symbol 93 MovieClip {staticsegment}
"text_txt"Symbol 397 MovieClip {ui.SpeechBubble} Frame 1Symbol 396 EditableText
"label"Symbol 431 MovieClip {levelEditor.NameValueControl} Frame 1Symbol 429 EditableText
"tf"Symbol 431 MovieClip {levelEditor.NameValueControl} Frame 1Symbol 430 EditableText
"bg2_mc"Symbol 437 MovieClip {levelEditor.OptionsPanel} Frame 1Symbol 433 MovieClip
"bg_mc"Symbol 437 MovieClip {levelEditor.OptionsPanel} Frame 1Symbol 433 MovieClip
"title_txt"Symbol 437 MovieClip {levelEditor.OptionsPanel} Frame 1Symbol 434 EditableText
"resize_mc"Symbol 437 MovieClip {levelEditor.OptionsPanel} Frame 1Symbol 436 MovieClip
"bg"Symbol 465 MovieClip {levelEditor.DropDownControl} Frame 1Symbol 460 MovieClip
"value_txt"Symbol 465 MovieClip {levelEditor.DropDownControl} Frame 1Symbol 461 EditableText
"arrow_btn"Symbol 465 MovieClip {levelEditor.DropDownControl} Frame 1Symbol 463 Button
"label_txt"Symbol 465 MovieClip {levelEditor.DropDownControl} Frame 1Symbol 464 EditableText
"b1"Symbol 469 MovieClip {DropDownRow} Frame 1Symbol 460 MovieClip
"b2"Symbol 469 MovieClip {DropDownRow} Frame 1Symbol 460 MovieClip
"txt"Symbol 469 MovieClip {DropDownRow} Frame 1Symbol 468 EditableText

Special Tags

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

Labels

"up"Symbol 6 MovieClip {LevelNameButton} Frame 1
"over"Symbol 6 MovieClip {LevelNameButton} Frame 2
"disabled"Symbol 6 MovieClip {LevelNameButton} Frame 3
"up"Symbol 10 MovieClip {ParTimeButton} Frame 1
"over"Symbol 10 MovieClip {ParTimeButton} Frame 2
"disabled"Symbol 10 MovieClip {ParTimeButton} Frame 3
"up"Symbol 46 MovieClip {PartyCostumeButton} Frame 1
"over"Symbol 46 MovieClip {PartyCostumeButton} Frame 2
"disabled"Symbol 46 MovieClip {PartyCostumeButton} Frame 3
"up"Symbol 52 MovieClip {DJCostumeButton} Frame 1
"over"Symbol 52 MovieClip {DJCostumeButton} Frame 2
"disabled"Symbol 52 MovieClip {DJCostumeButton} Frame 3
"up"Symbol 60 MovieClip {SuperCostumeButton} Frame 1
"over"Symbol 60 MovieClip {SuperCostumeButton} Frame 2
"disabled"Symbol 60 MovieClip {SuperCostumeButton} Frame 3
"up"Symbol 64 MovieClip {AngelCostumeButton} Frame 1
"over"Symbol 64 MovieClip {AngelCostumeButton} Frame 2
"disabled"Symbol 64 MovieClip {AngelCostumeButton} Frame 3
"up"Symbol 67 MovieClip {NoCostumeButton} Frame 1
"over"Symbol 67 MovieClip {NoCostumeButton} Frame 2
"disabled"Symbol 67 MovieClip {NoCostumeButton} Frame 3
"up"Symbol 75 MovieClip {CotinueDecorButton} Frame 1
"over"Symbol 75 MovieClip {CotinueDecorButton} Frame 2
"disabled"Symbol 75 MovieClip {CotinueDecorButton} Frame 3
"up"Symbol 205 MovieClip {WebsiteButton} Frame 1
"over"Symbol 205 MovieClip {WebsiteButton} Frame 2
"disabled"Symbol 205 MovieClip {WebsiteButton} Frame 3
"up"Symbol 278 MovieClip {ui.LevelButton} Frame 1
"over"Symbol 278 MovieClip {ui.LevelButton} Frame 2
"disabled"Symbol 278 MovieClip {ui.LevelButton} Frame 3
"up"Symbol 419 MovieClip {DynamicButton} Frame 1
"over"Symbol 419 MovieClip {DynamicButton} Frame 2
"disabled"Symbol 419 MovieClip {DynamicButton} Frame 3
"up"Symbol 422 MovieClip {ExitButton} Frame 1
"over"Symbol 422 MovieClip {ExitButton} Frame 2
"disabled"Symbol 422 MovieClip {ExitButton} Frame 3
"up"Symbol 425 MovieClip {InkButton} Frame 1
"over"Symbol 425 MovieClip {InkButton} Frame 2
"disabled"Symbol 425 MovieClip {InkButton} Frame 3
"up"Symbol 428 MovieClip {StaticButton} Frame 1
"over"Symbol 428 MovieClip {StaticButton} Frame 2
"disabled"Symbol 428 MovieClip {StaticButton} Frame 3
"up"Symbol 449 MovieClip {TransformButton} Frame 1
"over"Symbol 449 MovieClip {TransformButton} Frame 2
"disabled"Symbol 449 MovieClip {TransformButton} Frame 3
"up"Symbol 453 MovieClip {JointButton} Frame 1
"over"Symbol 453 MovieClip {JointButton} Frame 2
"disabled"Symbol 453 MovieClip {JointButton} Frame 3
"up"Symbol 456 MovieClip {ClearButton} Frame 1
"over"Symbol 456 MovieClip {ClearButton} Frame 2
"disabled"Symbol 456 MovieClip {ClearButton} Frame 3
"up"Symbol 459 MovieClip {DeleteButton} Frame 1
"over"Symbol 459 MovieClip {DeleteButton} Frame 2
"disabled"Symbol 459 MovieClip {DeleteButton} Frame 3




http://swfchan.com/19/90948/info.shtml
Created: 28/3 -2019 04:17:02 Last modified: 28/3 -2019 04:17:02 Server time: 14/11 -2024 18:26:54