Section 1
//GameSound (Audio.GameSound)
package Audio {
import flash.media.*;
import flash.utils.*;
import Tools.*;
public class GameSound {
public var alternates:Array;
public var lastPlayed:int;// = -10
public var eqVolume:Number;// = 1
public var sc:SoundChannel;
public var minDelay:int;// = 0
public var s:Sound;
public var embed:Class;
public var isMusic:Boolean;// = false
public static var allSounds:Array = new Array();
public static var globalSoundVolume:Number = 1;
public static var globalMusicVolume:Number = 1;
public function GameSound(_arg1:Class, _arg2:Number, _arg3:int=0){
embed = _arg1;
s = new embed();
eqVolume = _arg2;
minDelay = _arg3;
allSounds.push(this);
}
public function addAlternate(_arg1:GameSound):void{
if (!alternates){
alternates = new Array();
alternates.push(this);
};
alternates.push(_arg1);
}
public function play(_arg1:Boolean=false, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0, _arg5:Boolean=false):GameSoundChannel{
var _local9:int;
var _local10:GameSoundChannel;
if ((getTimer() - lastPlayed) < minDelay){
return (new GameSoundChannel(null, null));
};
lastPlayed = getTimer();
if (((alternates) && (!(_arg5)))){
_local9 = Random.randInt(0, (alternates.length - 1));
return (alternates[_local9].play(_arg1, _arg2, _arg3, _arg4, true));
};
var _local6:Number = eqVolume;
if (isMusic){
_local6 = (_local6 * globalMusicVolume);
} else {
_local6 = (_local6 * globalSoundVolume);
};
var _local7:SoundTransform = new SoundTransform(_local6, _arg4);
if (_arg3){
_local7.volume = 0;
};
_arg2 = (_arg2 % s.length);
sc = null;
var _local8:Boolean;
while (sc == null) {
if (_arg1){
if (_arg2 == 0){
sc = s.play(_arg2, 99, _local7);
} else {
sc = s.play(_arg2, 0, _local7);
};
} else {
sc = s.play(_arg2, 0, _local7);
};
if (sc == null){
if (_local8){
return (new GameSoundChannel(null, null));
};
_local8 = true;
s = new embed();
};
};
if (sc){
_local10 = new GameSoundChannel(this, sc, _arg1, _arg3);
_local10._pan = _arg4;
return (_local10);
};
return (new GameSoundChannel(null, null));
}
public function playSpecific(_arg1:int):GameSoundChannel{
if (!alternates){
return (play());
};
return (alternates[_arg1].play(false, 0, 0, 0, true));
}
public static function forEmbed(_arg1:Class, _arg2:Number, _arg3:int=0):GameSound{
var _local5:GameSound;
var _local4:Sound = new (_arg1);
for each (_local5 in allSounds) {
if ((((_local5.s.bytesTotal == _local4.bytesTotal)) && ((_local5.s.length == _local4.length)))){
return (_local5);
};
};
return (new GameSound(_arg1, _arg2, _arg3));
}
public static function forEmbedArray(_arg1:Array, _arg2:Number, _arg3:int=0):GameSound{
var _local5:int;
if (!(_arg1[0] is Class)){
return (null);
};
var _local4:GameSound = forEmbed(_arg1[0], _arg2);
if (_local4){
_local5 = 1;
while (_local5 < _arg1.length) {
_local4.addAlternate(forEmbed(_arg1[_local5], _arg2, _arg3));
_local5++;
};
};
return (_local4);
}
}
}//package Audio
Section 2
//GameSoundChannel (Audio.GameSoundChannel)
package Audio {
import flash.events.*;
import GameObject.*;
import flash.media.*;
import Tools.*;
public class GameSoundChannel {
public var fadeIn:Number;// = 0
public var chan:SoundChannel;
public var fullVolumeSet:Boolean;// = false
public var fadeOutTime:Number;// = 0
public var _remove:Boolean;// = false
public var _pan:Number;
public var gs:GameSound;
public var _playing:Boolean;// = true
public var chanStart:Number;// = 0
public var currentVolume:Number;// = 1
public var fadeOut:Number;// = 0
public var tiedObject:GameObject;
public var looping:Boolean;// = false
public static var allChannels:Array = new Array();
public function GameSoundChannel(_arg1:GameSound, _arg2:SoundChannel, _arg3:Boolean=false, _arg4:Number=0){
if (_arg2){
chanStart = _arg2.position;
chan = _arg2;
} else {
_playing = false;
};
if (chan){
chan.addEventListener(Event.SOUND_COMPLETE, complete);
};
fadeIn = _arg4;
looping = _arg3;
gs = _arg1;
if (gs){
allChannels.push(this);
};
}
public function complete(_arg1:Event):void{
if (!chan){
return;
};
if (_playing == false){
return;
};
chan.removeEventListener(Event.SOUND_COMPLETE, complete);
chan.stop();
chanStart = (chanStart - chan.position);
fadeOutTime = (fadeOutTime - chan.position);
if (looping){
chan = gs.s.play(0, 0, new SoundTransform(vol(), pan()));
if (chan){
chan.addEventListener(Event.SOUND_COMPLETE, complete);
};
} else {
_playing = false;
_remove = true;
};
}
public function update():void{
var _local1:Number;
var _local2:Number;
var _local3:SoundTransform;
if (!chan){
return;
};
if (((!((fadeIn == 0))) || (!((fadeOut == 0))))){
if (((((chan.position - chanStart) < fadeIn)) || (!((fadeOut == 0))))){
_local1 = Interpolation.linearInterpolateLock(0, 1, Interpolation.fromTo((chan.position - chanStart), 0, fadeIn));
_local2 = 1;
if (fadeOut != 0){
_local2 = Interpolation.linearInterpolateLock(1, 0, Interpolation.fromTo(chan.position, fadeOutTime, (fadeOutTime + fadeOut)));
};
_local3 = new SoundTransform(((_local1 * _local2) * vol()), pan());
chan.soundTransform = _local3;
} else {
fullVolumeSet = true;
_local3 = new SoundTransform(vol(), pan());
chan.soundTransform = _local3;
};
} else {
_local3 = new SoundTransform(vol());
chan.soundTransform = _local3;
};
if (tiedObject){
if (tiedObject._removed){
stop();
};
};
if (fadeOut != 0){
if (chan.position > (fadeOutTime + fadeOut)){
stop();
};
};
}
public function tieTo(_arg1:GameObject):void{
tiedObject = _arg1;
}
public function stop(_arg1:Number=0):void{
if (!chan){
return;
};
if (_arg1 != 0){
fadeOutTime = chan.position;
fadeOut = _arg1;
return;
};
_playing = false;
chan.removeEventListener(Event.SOUND_COMPLETE, complete);
chan.stop();
_remove = true;
}
public function vol():Number{
var _local1:Number = (currentVolume * gs.eqVolume);
if (gs.isMusic){
_local1 = (_local1 * GameSound.globalMusicVolume);
} else {
_local1 = (_local1 * GameSound.globalSoundVolume);
};
return (_local1);
}
public function setVolume(_arg1:Number):void{
currentVolume = _arg1;
}
public function pan():Number{
return (_pan);
}
public function position():Number{
if (!chan){
return (0);
};
return (chan.position);
}
public function playing():Boolean{
if (fadeOut != 0){
return (false);
};
return (_playing);
}
public static function updateAll():void{
var gsc:GameSoundChannel;
allChannels = allChannels.filter(function (_arg1:GameSoundChannel, _arg2:int, _arg3:Array):Boolean{
return (!(_arg1._remove));
});
for each (gsc in allChannels) {
gsc.update();
};
}
}
}//package Audio
Section 3
//GameSoundScene (Audio.GameSoundScene)
package Audio {
import flash.utils.*;
import Tools.*;
public class GameSoundScene {
public var breakLoop:GameSound;
public var breakLoopChannel:GameSoundChannel;
public var permanentBreakCurrent:int;// = 0
public var volumeTarget:Number;// = 1
public var mainLoopChannel:GameSoundChannel;
public var mainLoopStopped:Number;// = 0
public var restartTime:Number;
public var permanentBreakTime:int;// = 0
public var permanentBreak:Boolean;// = false
public var currentVolume:Number;// = 1
public var sceneName:String;
public var deadBreak:Boolean;// = false
public var mainLoop:GameSound;
public static var allScenes:Array = new Array();
public function GameSoundScene(_arg1:String){
sceneName = _arg1;
allScenes.push(this);
}
public function update():void{
currentVolume = Interpolation.tendTowards(currentVolume, volumeTarget, 0.01);
if (mainLoopChannel){
if (mainLoopChannel.playing()){
if (currentVolume != volumeTarget){
mainLoopChannel.setVolume(currentVolume);
};
};
};
if (breakLoopChannel){
if (!breakLoopChannel.playing()){
breakLoopChannel.stop();
breakLoopChannel = null;
mainLoopChannel.stop();
mainLoopChannel = mainLoop.play(true, mainLoopStopped, 500);
mainLoopStopped = 0;
};
};
if (deadBreak){
if (getTimer() > restartTime){
deadBreak = false;
mainLoopChannel.stop();
mainLoopChannel = mainLoop.play(true, mainLoopStopped, 500);
mainLoopStopped = 0;
};
};
if (permanentBreak){
if (mainLoopChannel != null){
if (!mainLoopChannel.playing()){
permanentBreakCurrent++;
if (permanentBreakCurrent > permanentBreakTime){
permanentBreakCurrent = 0;
mainLoopChannel = mainLoop.play(false, 0, 500);
};
};
};
};
}
public function insertDeadBreak(_arg1:Number):void{
mainLoopStopped = mainLoopChannel.position();
mainLoopChannel.stop(2000);
deadBreak = true;
restartTime = (getTimer() + _arg1);
}
public function setPermanentBreak(_arg1:int):void{
permanentBreak = true;
permanentBreakTime = _arg1;
}
public function setBackgroundMusic(_arg1:GameSound, _arg2:int=500):void{
if (mainLoop){
if (mainLoop == _arg1){
return;
};
};
if (mainLoop){
if (mainLoopChannel){
mainLoopChannel.stop(_arg2);
};
};
mainLoop = _arg1;
_arg1.isMusic = true;
volumeTarget = 1;
mainLoopChannel = _arg1.play(!(permanentBreak), 0, _arg2);
}
public function queueBackgroundMusic(_arg1:GameSound):void{
mainLoop = _arg1;
}
public function insertBreak(_arg1:GameSound):void{
_arg1.isMusic = true;
mainLoopStopped = mainLoopChannel.position();
mainLoopChannel.stop(500);
breakLoop = _arg1;
breakLoopChannel = _arg1.play();
deadBreak = false;
}
public static function forName(_arg1:String):GameSoundScene{
var _local2:GameSoundScene;
for each (_local2 in allScenes) {
if (_local2.sceneName == _arg1){
return (_local2);
};
};
return (new GameSoundScene(_arg1));
}
public static function updateAll():void{
var _local1:GameSoundScene;
GameSoundChannel.updateAll();
for each (_local1 in allScenes) {
_local1.update();
};
}
}
}//package Audio
Section 4
//GameIntroComponent (com.miniclip.components.GameIntroComponent)
package com.miniclip.components {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
public class GameIntroComponent extends UIComponentTiny {
private var tfDebug:TextField;
private var mcExternalAnimation:MovieClip;// = null
public var animationUrl:String;// = "http://www.miniclip.com/swfcontent/as3/intro.swf"
public var mcInternalAnimation:MovieClip;
public var mcBackgroundBlock:MovieClip;
private var externalLoader:Loader;// = null
private var mcParent:MovieClip;
private var isOnMiniclip:Boolean;// = false
private static var DEFAULT_WIDTH:uint = 328;
private static var DEFAULT_HEIGHT:uint = 204;
public function GameIntroComponent():void{
externalLoader = null;
mcExternalAnimation = null;
isOnMiniclip = false;
animationUrl = "http://www.miniclip.com/swfcontent/as3/intro.swf";
super();
}
override protected function init():void{
if (!isLivePreview){
if ((parent is MovieClip)){
mcParent = MovieClip(parent);
} else {
trace("no timeline");
};
if (mcParent){
mcParent.stop();
};
mcInternalAnimation.mcOffsite.addEventListener(MouseEvent.CLICK, onMiniclipClick, false, 0, false);
isOnMiniclip = detectOnMiniclip();
Security.allowInsecureDomain("*");
x = 0;
y = 0;
width = DEFAULT_WIDTH;
height = DEFAULT_HEIGHT;
mcInternalAnimation.x = ((stage.stageWidth / 2) - (DEFAULT_WIDTH / 2));
mcInternalAnimation.y = ((stage.stageHeight / 2) - (DEFAULT_HEIGHT / 2));
mcInternalAnimation.visible = true;
mcBackgroundBlock.width = stage.stageWidth;
mcBackgroundBlock.height = stage.stageHeight;
loadExternalAnimation();
if (isOnMiniclip){
addEventListener(Event.ENTER_FRAME, onEnterFrame, false, 0, true);
};
};
}
private function onMiniclipClick(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://www.miniclip.com/"));
}
private function removeInternalAnimation():void{
if (mcInternalAnimation){
removeChild(mcInternalAnimation);
mcInternalAnimation = null;
};
}
private function detectOnMiniclip():Boolean{
var _local1:RegExp;
_local1 = /^http:\/\/[\w]+.miniclip.com/;
return (_local1.test(loaderInfo.url));
}
private function updateProgress():void{
if (mcExternalAnimation){
mcExternalAnimation.updateProgress((loaderInfo.bytesLoaded / loaderInfo.bytesTotal));
};
}
private function externalAnimationLoaded(_arg1:Event):void{
removeInternalAnimation();
addChild(externalLoader);
externalLoader.visible = true;
mcExternalAnimation = MovieClip(externalLoader.content);
mcExternalAnimation.addEventListener("finished", onExternalAnimationFinished, false, 0, true);
mcExternalAnimation.begin(isOnMiniclip);
}
private function onExternalAnimationFinished(_arg1:Event):void{
removeExternalAnimation();
removeEventListener(Event.ENTER_FRAME, onEnterFrame);
if (mcParent){
mcParent.play();
};
removeComponent();
dispatchEvent(new Event(Event.COMPLETE));
}
private function externalAnimationProgress(_arg1:ProgressEvent):void{
var _local2:uint;
_local2 = Math.round(((_arg1.bytesLoaded / _arg1.bytesTotal) * 100));
mcInternalAnimation.mcProgress.gotoAndStop(_local2);
}
private function externalAnimationError():void{
removeEventListener(Event.ENTER_FRAME, onEnterFrame);
mcInternalAnimation.mcOffsite.alpha = 1;
}
private function loadExternalAnimation():void{
var _local1:String;
var _local2:URLRequest;
externalLoader = new Loader();
externalLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, externalAnimationLoaded);
externalLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, externalAnimationProgress);
externalLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, externalAnimationIoErrorHandler);
externalLoader.visible = false;
_local1 = ((animationUrl + "?") + Math.round((Math.random() * 10000)));
_local2 = new URLRequest(_local1);
externalLoader.load(_local2);
}
private function onEnterFrame(_arg1:Event):void{
updateProgress();
}
private function externalAnimationIoErrorHandler(_arg1:IOErrorEvent):void{
externalAnimationError();
}
private function removeExternalAnimation():void{
if (mcExternalAnimation != null){
removeChild(externalLoader);
mcExternalAnimation = null;
externalLoader.unload();
};
}
private function removeComponent():void{
removeChild(mcBackgroundBlock);
if (externalLoader){
externalLoader.contentLoaderInfo.removeEventListener(Event.COMPLETE, externalAnimationLoaded);
externalLoader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, externalAnimationIoErrorHandler);
externalLoader = null;
};
}
}
}//package com.miniclip.components
Section 5
//UIComponentTiny (com.miniclip.components.UIComponentTiny)
package com.miniclip.components {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
public class UIComponentTiny extends MovieClip {
protected var callLaterMethods:Dictionary;
public static var inCallLaterPhase:Boolean = false;
public function UIComponentTiny():void{
callLaterMethods = new Dictionary();
callLater(init);
}
protected function init():void{
}
private function callLaterDispatcher(_arg1:Event):void{
var _local2:Dictionary;
var _local3:Object;
if (_arg1.type == Event.ADDED_TO_STAGE){
removeEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher);
stage.addEventListener(Event.RENDER, callLaterDispatcher, false, 0, true);
stage.invalidate();
return;
};
_arg1.target.removeEventListener(Event.RENDER, callLaterDispatcher);
if (stage == null){
addEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher, false, 0, true);
return;
};
inCallLaterPhase = true;
_local2 = callLaterMethods;
for (_local3 in _local2) {
_local3();
delete _local2[_local3];
};
inCallLaterPhase = false;
}
protected function get isLivePreview():Boolean{
var className:String;
if (parent == null){
return (false);
};
try {
className = getQualifiedClassName(parent);
} catch(e:Error) {
};
return ((className == "fl.livepreview::LivePreviewParent"));
}
protected function callLater(_arg1:Function):void{
if (inCallLaterPhase){
return;
};
callLaterMethods[_arg1] = true;
if (stage != null){
stage.addEventListener(Event.RENDER, callLaterDispatcher, false, 0, true);
stage.invalidate();
} else {
addEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher, false, 0, true);
};
}
}
}//package com.miniclip.components
Section 6
//b2BoxDef (Engine.Collision.Shapes.b2BoxDef)
package Engine.Collision.Shapes {
import Engine.Common.Math.*;
public class b2BoxDef extends b2ShapeDef {
public var extents:b2Vec2;
public function b2BoxDef(){
type = b2Shape.e_boxShape;
extents = new b2Vec2(1, 1);
}
}
}//package Engine.Collision.Shapes
Section 7
//b2CircleDef (Engine.Collision.Shapes.b2CircleDef)
package Engine.Collision.Shapes {
public class b2CircleDef extends b2ShapeDef {
public var radius:Number;
public function b2CircleDef(){
type = b2Shape.e_circleShape;
radius = 1;
}
}
}//package Engine.Collision.Shapes
Section 8
//b2CircleShape (Engine.Collision.Shapes.b2CircleShape)
package Engine.Collision.Shapes {
import Engine.Collision.*;
import Engine.Common.Math.*;
import Engine.Dynamics.*;
public class b2CircleShape extends b2Shape {
public var m_localPosition:b2Vec2;
public var m_radius:Number;
public function b2CircleShape(_arg1:b2ShapeDef, _arg2:b2Body, _arg3:b2Vec2){
m_localPosition = new b2Vec2();
super(_arg1, _arg2);
var _local4:b2CircleDef = (_arg1 as b2CircleDef);
m_localPosition.Set((_arg1.localPosition.x - _arg3.x), (_arg1.localPosition.y - _arg3.y));
m_type = b2Shape.e_circleShape;
m_radius = _local4.radius;
m_R.SetM(m_body.m_R);
m_position.SetV(m_localPosition);
m_position.MulM(m_R);
m_position.Add(m_body.m_position);
var _local5:b2AABB = new b2AABB();
_local5.minVertex.Set((m_position.x - m_radius), (m_position.y - m_radius));
_local5.maxVertex.Set((m_position.x + m_radius), (m_position.y + m_radius));
var _local6:b2BroadPhase = m_body.m_world.m_broadPhase;
if (_local6.InRange(_local5)){
m_proxyId = _local6.CreateProxy(_local5, _arg1.groupIndex, _arg1.categoryBits, _arg1.maskBits, this);
} else {
m_proxyId = b2Pair.b2_nullProxy;
};
if (m_proxyId == b2Pair.b2_nullProxy){
m_body.Freeze();
};
}
override public function Synchronize(_arg1:b2Vec2, _arg2:b2Mat22){
m_R.SetM(_arg2);
m_position.SetV(m_localPosition);
m_position.MulM(_arg2);
m_position.Add(_arg1);
if (m_proxyId == b2Pair.b2_nullProxy){
return;
};
var _local3:b2AABB = new b2AABB();
_local3.minVertex.Set((m_position.x - m_radius), (m_position.y - m_radius));
_local3.maxVertex.Set((m_position.x + m_radius), (m_position.y + m_radius));
var _local4:b2BroadPhase = m_body.m_world.m_broadPhase;
if (_local4.InRange(_local3)){
_local4.MoveProxy(m_proxyId, _local3);
} else {
_local4.DestroyProxy(m_proxyId);
m_proxyId = b2Pair.b2_nullProxy;
m_body.Freeze();
};
}
override public function ResetProxy(_arg1:b2BroadPhase){
if (m_proxyId == b2Pair.b2_nullProxy){
return;
};
var _local2:b2Proxy = _arg1.GetProxy(m_proxyId);
var _local3:int = _local2.groupIndex;
var _local4:uint = _local2.categoryBits;
var _local5:uint = _local2.maskBits;
_arg1.DestroyProxy(m_proxyId);
_local2 = null;
var _local6:b2AABB = new b2AABB();
_local6.minVertex.Set((m_position.x - m_radius), (m_position.y - m_radius));
_local6.maxVertex.Set((m_position.x + m_radius), (m_position.y + m_radius));
if (_arg1.InRange(_local6)){
m_proxyId = _arg1.CreateProxy(_local6, _local3, _local4, _local5, this);
} else {
m_proxyId = b2Pair.b2_nullProxy;
};
if (m_proxyId == b2Pair.b2_nullProxy){
m_body.Freeze();
};
}
override public function TestPoint(_arg1:b2Vec2):Boolean{
var _local2:b2Vec2 = new b2Vec2();
_local2.SetV(_arg1);
_local2.Subtract(m_position);
return ((b2Math.b2Dot(_local2, _local2) <= (m_radius * m_radius)));
}
override public function Support(_arg1:Number, _arg2:Number):b2Vec2{
var _local3:Number = Math.sqrt(((_arg1 * _arg1) + (_arg2 * _arg2)));
_arg1 = (_arg1 / _local3);
_arg2 = (_arg2 / _local3);
return (new b2Vec2((m_position.x + (m_radius * _arg1)), (m_position.y + (m_radius * _arg2))));
}
}
}//package Engine.Collision.Shapes
Section 9
//b2MassData (Engine.Collision.Shapes.b2MassData)
package Engine.Collision.Shapes {
import Engine.Common.Math.*;
public class b2MassData {
public var mass:Number;// = 0
public var center:b2Vec2;
public var I:Number;// = 0
public function b2MassData(){
center = new b2Vec2(0, 0);
super();
}
}
}//package Engine.Collision.Shapes
Section 10
//b2PolyDef (Engine.Collision.Shapes.b2PolyDef)
package Engine.Collision.Shapes {
import Engine.Common.Math.*;
import Engine.Common.*;
public class b2PolyDef extends b2ShapeDef {
public var vertices:Array;
public var vertexCount:int;
public function b2PolyDef(){
vertices = new Array(b2Settings.b2_maxPolyVertices);
super();
type = b2Shape.e_polyShape;
vertexCount = 0;
var _local1:int;
while (_local1 < b2Settings.b2_maxPolyVertices) {
vertices[_local1] = new b2Vec2();
_local1++;
};
}
}
}//package Engine.Collision.Shapes
Section 11
//b2PolyShape (Engine.Collision.Shapes.b2PolyShape)
package Engine.Collision.Shapes {
import Engine.Collision.*;
import Engine.Common.Math.*;
import Engine.Dynamics.*;
import Engine.Common.*;
public class b2PolyShape extends b2Shape {
public var m_nextVert:Array;
public var m_vertices:Array;
public var m_localOBB:b2OBB;
public var m_vertexCount:int;
public var m_normals:Array;
public function b2PolyShape(_arg1:b2ShapeDef, _arg2:b2Body, _arg3:b2Vec2){
var _local4:int;
var _local5:b2Vec2;
var _local6:b2Vec2;
var _local8:b2Mat22;
var _local9:Number;
var _local10:Number;
var _local17:b2BoxDef;
var _local18:b2PolyDef;
var _local19:b2Vec2;
m_localOBB = new b2OBB();
super(_arg1, _arg2);
var _local7:b2AABB = new b2AABB();
m_vertices = new Array(b2Settings.b2_maxPolyVertices);
m_nextVert = new Array();
m_normals = new Array(b2Settings.b2_maxPolyVertices);
m_type = b2Shape.e_polyShape;
_local8 = new b2Mat22(_arg1.localRotation);
_local9 = (_arg1.localPosition.x - _arg3.x);
_local10 = (_arg1.localPosition.y - _arg3.y);
if (_arg1.type == b2Shape.e_boxShape){
_local17 = (_arg1 as b2BoxDef);
m_vertexCount = 4;
_local5 = _local17.extents;
m_vertices[0] = new b2Vec2(_local5.x, _local5.y);
_local6 = m_vertices[0];
_local6.MulM(_local8);
_local6.x = (_local6.x + _local9);
_local6.y = (_local6.y + _local10);
m_vertices[1] = new b2Vec2(-(_local5.x), _local5.y);
_local6 = m_vertices[1];
_local6.MulM(_local8);
_local6.x = (_local6.x + _local9);
_local6.y = (_local6.y + _local10);
m_vertices[2] = new b2Vec2(-(_local5.x), -(_local5.y));
_local6 = m_vertices[2];
_local6.MulM(_local8);
_local6.x = (_local6.x + _local9);
_local6.y = (_local6.y + _local10);
m_vertices[3] = new b2Vec2(_local5.x, -(_local5.y));
_local6 = m_vertices[3];
_local6.MulM(_local8);
_local6.x = (_local6.x + _local9);
_local6.y = (_local6.y + _local10);
} else {
_local18 = (_arg1 as b2PolyDef);
m_vertexCount = _local18.vertexCount;
_local4 = 0;
while (_local4 < m_vertexCount) {
m_vertices[_local4] = _local18.vertices[_local4].Copy();
_local6 = m_vertices[_local4];
_local6.MulM(_local8);
_local6.x = (_local6.x + _local9);
_local6.y = (_local6.y + _local10);
_local4++;
};
};
var _local11:b2Vec2 = new b2Vec2(Number.MAX_VALUE, Number.MAX_VALUE);
var _local12:b2Vec2 = new b2Vec2(-(Number.MAX_VALUE), -(Number.MAX_VALUE));
_local4 = 0;
while (_local4 < m_vertexCount) {
_local11 = b2Math.b2MinV(_local11, m_vertices[_local4]);
_local12 = b2Math.b2MaxV(_local12, m_vertices[_local4]);
_local4++;
};
m_localOBB.R.SetIdentity();
m_localOBB.center.Set(((_local11.x + _local12.x) * 0.5), ((_local11.y + _local12.y) * 0.5));
m_localOBB.extents.Set(((_local12.x - _local11.x) * 0.5), ((_local12.y - _local11.y) * 0.5));
_local4 = 0;
while (_local4 < m_vertexCount) {
m_nextVert[_local4] = (((_local4 + 1) < m_vertexCount)) ? (_local4 + 1) : 0;
_local19 = m_vertices[m_nextVert[_local4]].Copy();
_local19.Subtract(m_vertices[_local4]);
m_normals[_local4] = new b2Vec2();
_local6 = m_normals[_local4];
_local6.SetV(_local19);
_local6.CrossVF(1);
_local6.Normalize();
_local4++;
};
_local4 = 0;
while (_local4 < m_vertexCount) {
_local4++;
};
m_R = m_body.m_R.Copy();
m_position.SetV(m_body.m_position);
var _local13:b2Mat22 = b2Math.b2MulMM(m_R, m_localOBB.R);
var _local14:b2Mat22 = b2Math.b2AbsM(_local13);
_local5 = b2Math.b2MulMV(_local14, m_localOBB.extents);
var _local15:b2Vec2 = b2Math.b2MulMV(m_R, m_localOBB.center);
_local15.Add(m_position);
_local7.minVertex.SetV(_local15);
_local7.minVertex.Subtract(_local5);
_local7.maxVertex.SetV(_local15);
_local7.maxVertex.Add(_local5);
var _local16:b2BroadPhase = m_body.m_world.m_broadPhase;
if (_local16.InRange(_local7)){
m_proxyId = b2Pair.b2_nullProxy;
} else {
m_proxyId = b2Pair.b2_nullProxy;
};
if (m_proxyId == b2Pair.b2_nullProxy){
m_body.Freeze();
};
}
override public function Support(_arg1:Number, _arg2:Number):b2Vec2{
var _local8:Number;
var _local3:Number = ((_arg1 * m_R.col1.x) + (_arg2 * m_R.col1.y));
var _local4:Number = ((_arg1 * m_R.col2.x) + (_arg2 * m_R.col2.y));
var _local5:int;
var _local6:Number = ((m_vertices[0].x * _local3) + (m_vertices[0].y * _local4));
var _local7 = 1;
while (_local7 < m_vertexCount) {
_local8 = ((m_vertices[_local7].x * _local3) + (m_vertices[_local7].y * _local4));
if (_local8 > _local6){
_local5 = _local7;
_local6 = _local8;
};
_local7++;
};
return (new b2Vec2((m_position.x + ((m_R.col1.x * m_vertices[_local5].x) + (m_R.col2.x * m_vertices[_local5].y))), (m_position.y + ((m_R.col1.y * m_vertices[_local5].x) + (m_R.col2.y * m_vertices[_local5].y)))));
}
override public function Synchronize(_arg1:b2Vec2, _arg2:b2Mat22){
m_R.SetM(_arg2);
m_position.SetV(_arg1);
if (m_proxyId == b2Pair.b2_nullProxy){
return;
};
var _local3:b2Mat22 = b2Math.b2MulMM(m_R, m_localOBB.R);
var _local4:b2Mat22 = b2Math.b2AbsM(_local3);
var _local5:b2Vec2 = b2Math.b2MulMV(_local4, m_localOBB.extents);
var _local6:b2Vec2 = b2Math.b2MulMV(m_R, m_localOBB.center);
_local6.Add(m_position);
var _local7:b2AABB = new b2AABB();
_local7.minVertex.SetV(_local6);
_local7.minVertex.Subtract(_local5);
_local7.maxVertex.SetV(_local6);
_local7.maxVertex.Add(_local5);
var _local8:b2BroadPhase = m_body.m_world.m_broadPhase;
if (_local8.InRange(_local7)){
_local8.MoveProxy(m_proxyId, _local7);
} else {
_local8.DestroyProxy(m_proxyId);
m_proxyId = b2Pair.b2_nullProxy;
m_body.Freeze();
};
}
override public function TestPoint(_arg1:b2Vec2):Boolean{
var _local4:b2Vec2;
var _local5:Number;
var _local2:b2Vec2 = new b2Vec2();
_local2.SetV(_arg1);
_local2.Subtract(m_position);
_local2.MulTM(m_R);
var _local3:int;
while (_local3 < m_vertexCount) {
_local4 = new b2Vec2();
_local4.SetV(_local2);
_local4.Subtract(m_vertices[_local3]);
_local5 = b2Math.b2Dot(m_normals[_local3], _local4);
if (_local5 > 0){
return (false);
};
_local3++;
};
return (true);
}
override public function ResetProxy(_arg1:b2BroadPhase){
if (m_proxyId == b2Pair.b2_nullProxy){
return;
};
var _local2:b2Proxy = _arg1.GetProxy(m_proxyId);
var _local3:int = _local2.groupIndex;
var _local4:uint = _local2.categoryBits;
var _local5:uint = _local2.maskBits;
_arg1.DestroyProxy(m_proxyId);
_local2 = null;
var _local6:b2Mat22 = b2Math.b2MulMM(m_R, m_localOBB.R);
var _local7:b2Mat22 = b2Math.b2AbsM(_local6);
var _local8:b2Vec2 = b2Math.b2MulMV(_local7, m_localOBB.extents);
var _local9:b2Vec2 = b2Math.b2MulMV(m_R, m_localOBB.center);
_local9.Add(m_position);
var _local10:b2AABB = new b2AABB();
_local10.minVertex.SetV(_local9);
_local10.minVertex.Subtract(_local8);
_local10.maxVertex.SetV(_local9);
_local10.maxVertex.Add(_local8);
if (_arg1.InRange(_local10)){
m_proxyId = _arg1.CreateProxy(_local10, _local3, _local4, _local5, this);
} else {
m_proxyId = b2Pair.b2_nullProxy;
};
if (m_proxyId == b2Pair.b2_nullProxy){
m_body.Freeze();
};
}
}
}//package Engine.Collision.Shapes
Section 12
//b2Shape (Engine.Collision.Shapes.b2Shape)
package Engine.Collision.Shapes {
import Engine.Collision.*;
import Engine.Common.Math.*;
import Engine.Dynamics.*;
public class b2Shape {
public var m_R:b2Mat22;
public var m_next:b2Shape;
public var m_friction:Number;
public var m_type:int;
public var m_proxyId:int;
public var m_userData;// = null
public var m_body:b2Body;
public var m_restitution:Number;
public var m_position:b2Vec2;
public static const e_boxShape:int = 1;
public static const e_unknownShape:int = -1;
public static const e_shapeTypeCount:int = 4;
public static const e_circleShape:int = 0;
public static const e_meshShape:int = 3;
public static const e_polyShape:int = 2;
public function b2Shape(_arg1:b2ShapeDef, _arg2:b2Body){
m_position = new b2Vec2();
m_R = new b2Mat22();
super();
m_userData = _arg1.userData;
m_friction = _arg1.friction;
m_restitution = _arg1.restitution;
m_body = _arg2;
m_proxyId = b2Pair.b2_nullProxy;
}
public function ResetProxy(_arg1:b2BroadPhase){
}
public function GetNext():b2Shape{
return (m_next);
}
public function GetType():int{
return (m_type);
}
public function GetUserData(){
return (m_userData);
}
public function Support(_arg1:Number, _arg2:Number):b2Vec2{
return (null);
}
public function Synchronize(_arg1:b2Vec2, _arg2:b2Mat22){
}
public function GetRotationMatrix():b2Mat22{
return (m_R);
}
public function GetBody():b2Body{
return (m_body);
}
public function TestPoint(_arg1:b2Vec2):Boolean{
return (false);
}
public function GetPosition():b2Vec2{
return (m_position);
}
public static function Destroy(_arg1:b2Shape){
if (_arg1.m_proxyId != b2Pair.b2_nullProxy){
_arg1.m_body.m_world.m_broadPhase.DestroyProxy(_arg1.m_proxyId);
};
}
public static function PolyMass(_arg1:b2MassData, _arg2:Array, _arg3:int, _arg4:Number){
var _local11:b2Vec2;
var _local12:b2Vec2;
var _local13:b2Vec2;
var _local14:b2Vec2;
var _local15:b2Vec2;
var _local16:Number;
var _local17:Number;
var _local18:b2Vec2;
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 _local5:b2Vec2 = new b2Vec2();
_local5.SetZero();
var _local6:Number = 0;
var _local7:Number = 0;
var _local8:b2Vec2 = new b2Vec2(0, 0);
var _local9:Number = (1 / 3);
var _local10:int;
while (_local10 < _arg3) {
_local11 = _local8;
_local12 = _arg2[_local10];
_local13 = (((_local10 + 1) < _arg3)) ? _arg2[(_local10 + 1)] : _arg2[0];
_local14 = b2Math.SubtractVV(_local12, _local11);
_local15 = b2Math.SubtractVV(_local13, _local11);
_local16 = b2Math.b2CrossVV(_local14, _local15);
_local17 = (0.5 * _local16);
_local6 = (_local6 + _local17);
_local18 = new b2Vec2();
_local18.SetV(_local11);
_local18.Add(_local12);
_local18.Add(_local13);
_local18.Multiply((_local9 * _local17));
_local5.Add(_local18);
_local19 = _local11.x;
_local20 = _local11.y;
_local21 = _local14.x;
_local22 = _local14.y;
_local23 = _local15.x;
_local24 = _local15.y;
_local25 = ((_local9 * ((0.25 * (((_local21 * _local21) + (_local23 * _local21)) + (_local23 * _local23))) + ((_local19 * _local21) + (_local19 * _local23)))) + ((0.5 * _local19) * _local19));
_local26 = ((_local9 * ((0.25 * (((_local22 * _local22) + (_local24 * _local22)) + (_local24 * _local24))) + ((_local20 * _local22) + (_local20 * _local24)))) + ((0.5 * _local20) * _local20));
_local7 = (_local7 + (_local16 * (_local25 + _local26)));
_local10++;
};
_arg1.mass = (_arg4 * _local6);
_local5.Multiply((1 / _local6));
_arg1.center = _local5;
_local7 = (_arg4 * (_local7 - (_local6 * b2Math.b2Dot(_local5, _local5))));
_arg1.I = _local7;
}
public static function Create(_arg1:b2ShapeDef, _arg2:b2Body, _arg3:b2Vec2):b2Shape{
switch (_arg1.type){
case e_circleShape:
return (new b2CircleShape(_arg1, _arg2, _arg3));
case e_boxShape:
case e_polyShape:
return (new b2PolyShape(_arg1, _arg2, _arg3));
};
return (null);
}
}
}//package Engine.Collision.Shapes
Section 13
//b2ShapeDef (Engine.Collision.Shapes.b2ShapeDef)
package Engine.Collision.Shapes {
import Engine.Common.Math.*;
import Engine.Common.*;
public class b2ShapeDef {
public var type:int;
public var groupIndex:int;
public var localPosition:b2Vec2;
public var categoryBits:int;
public var localRotation:Number;
public var density:Number;
public var restitution:Number;
public var userData;// = null
public var maskBits:int;
public var friction:Number;
public function b2ShapeDef(){
type = b2Shape.e_unknownShape;
userData = null;
localPosition = new b2Vec2(0, 0);
localRotation = 0;
friction = 0.2;
restitution = 0;
density = 0;
categoryBits = 1;
maskBits = 0xFFFF;
groupIndex = 0;
}
public function ComputeMass(_arg1:b2MassData){
var _local2:b2CircleDef;
var _local3:b2BoxDef;
var _local4:b2PolyDef;
_arg1.center = new b2Vec2(0, 0);
if (density == 0){
_arg1.mass = 0;
_arg1.center.Set(0, 0);
_arg1.I = 0;
};
switch (type){
case b2Shape.e_circleShape:
_local2 = (this as b2CircleDef);
_arg1.mass = (((density * b2Settings.b2_pi) * _local2.radius) * _local2.radius);
_arg1.center.Set(0, 0);
_arg1.I = (((0.5 * _arg1.mass) * _local2.radius) * _local2.radius);
break;
case b2Shape.e_boxShape:
_local3 = (this as b2BoxDef);
_arg1.mass = (((4 * density) * _local3.extents.x) * _local3.extents.y);
_arg1.center.Set(0, 0);
_arg1.I = ((_arg1.mass / 3) * b2Math.b2Dot(_local3.extents, _local3.extents));
break;
case b2Shape.e_polyShape:
_local4 = (this as b2PolyDef);
b2Shape.PolyMass(_arg1, _local4.vertices, _local4.vertexCount, density);
break;
default:
_arg1.mass = 0;
_arg1.center.Set(0, 0);
_arg1.I = 0;
break;
};
}
}
}//package Engine.Collision.Shapes
Section 14
//b2AABB (Engine.Collision.b2AABB)
package Engine.Collision {
import Engine.Common.Math.*;
public class b2AABB {
public var minVertex:b2Vec2;
public var maxVertex:b2Vec2;
public function b2AABB(){
minVertex = new b2Vec2();
maxVertex = new b2Vec2();
super();
}
public function IsValid():Boolean{
var _local1:Number = maxVertex.x;
var _local2:Number = maxVertex.y;
_local1 = maxVertex.x;
_local2 = maxVertex.y;
_local1 = (_local1 - minVertex.x);
_local2 = (_local2 - minVertex.y);
var _local3:Boolean = (((_local1 >= 0)) && ((_local2 >= 0)));
_local3 = ((((_local3) && (minVertex.IsValid()))) && (maxVertex.IsValid()));
return (_local3);
}
}
}//package Engine.Collision
Section 15
//b2Bound (Engine.Collision.b2Bound)
package Engine.Collision {
public class b2Bound {
public var value:uint;
public var proxyId:uint;
public var stabbingCount:uint;
public function Swap(_arg1:b2Bound){
var _local2:uint = value;
var _local3:uint = proxyId;
var _local4:uint = 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 Engine.Collision
Section 16
//b2BroadPhase (Engine.Collision.b2BroadPhase)
package Engine.Collision {
import Engine.Common.Math.*;
import Engine.Common.*;
public class b2BroadPhase {
public var m_bounds:Array;
public var m_quantizationFactor:b2Vec2;
public var m_pairBuffer:Array;
public var m_worldAABB:b2AABB;
public var m_freeProxy:uint;
public var m_pairCallback:b2PairCallback;
public var m_proxyCount:int;
public var m_queryResultCount:int;
public var m_proxyPool:Array;
public var m_pairManager:b2PairManager;
public var m_pairBufferCount:int;
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 _local6:b2Proxy;
var _local7:int;
m_pairManager = new b2PairManager();
m_proxyPool = new Array(b2Settings.b2_maxPairs);
m_pairBuffer = 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_worldAABB = _arg1;
m_pairCallback = _arg2;
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++;
};
_local3 = 0;
while (_local3 < b2Settings.b2_maxPairs) {
m_pairBuffer[_local3] = new b2BufferedPair();
_local3++;
};
var _local4:Number = _arg1.maxVertex.x;
var _local5:Number = _arg1.maxVertex.y;
_local4 = (_local4 - _arg1.minVertex.x);
_local5 = (_local5 - _arg1.minVertex.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[(b2Settings.b2_maxProxies - 1)] = _local6;
_local6.SetNext(b2Pair.b2_nullProxy);
_local6.timeStamp = 0;
_local6.overlapCount = b2_invalid;
_local6.userData = null;
m_freeProxy = 0;
m_pairBufferCount = 0;
m_timeStamp = 1;
m_queryResultCount = 0;
}
public function ValidatePairs(){
var _local3:b2Pair;
var _local4:b2Proxy;
var _local5:b2Proxy;
var _local1:uint = m_pairManager.GetCount();
m_pairBuffer.sortOn(["proxyId1", "proxyId2"], Array.NUMERIC);
var _local2:int;
while (_local2 < m_pairBufferCount) {
if (_local2 > 0){
};
_local3 = m_pairManager.Find(m_pairBuffer[_local2].proxyId1, m_pairBuffer[_local2].proxyId2);
_local4 = m_proxyPool[_local3.proxyId1];
_local5 = m_proxyPool[_local3.proxyId2];
_local2++;
};
}
public function GetProxy(_arg1:int):b2Proxy{
if ((((_arg1 == b2Pair.b2_nullProxy)) || ((m_proxyPool[_arg1].IsValid() == false)))){
return (null);
};
return (m_proxyPool[_arg1]);
}
public function QueryAABB(_arg1:b2AABB, _arg2, _arg3:int):int{
var _local6:uint;
var _local7:uint;
var _local12:b2Proxy;
var _local4:Array = new Array();
var _local5:Array = new Array();
ComputeBounds(_local4, _local5, _arg1);
var _local8:Array = [_local6];
var _local9:Array = [_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);
var _local10:int;
var _local11:int;
while ((((_local11 < m_queryResultCount)) && ((_local10 < _arg3)))) {
_local12 = m_proxyPool[m_queryResults[_local11]];
_arg2[_local11] = _local12.userData;
_local11++;
_local10++;
};
m_queryResultCount = 0;
IncrementTimeStamp();
return (_local10);
}
private function RemoveBufferedPair(_arg1:uint, _arg2:uint){
var _local3:b2Pair = m_pairManager.Find(_arg1, _arg2);
if (_local3 == null){
return;
};
if (_local3.IsBuffered() == false){
if (m_pairBufferCount < b2Settings.b2_maxPairs){
_local3.SetBuffered();
m_pairBuffer[m_pairBufferCount].proxyId1 = _local3.proxyId1;
m_pairBuffer[m_pairBufferCount].proxyId2 = _local3.proxyId2;
m_pairBufferCount++;
};
};
_local3.SetRemoved();
}
public function Flush(){
var _local1:int;
var _local3:b2Pair;
var _local4:b2Proxy;
var _local5:b2Proxy;
var _local2:int;
_local1 = 0;
while (_local1 < m_pairBufferCount) {
_local3 = m_pairManager.Find(m_pairBuffer[_local1].proxyId1, m_pairBuffer[_local1].proxyId2);
_local4 = m_proxyPool[_local3.proxyId1];
_local5 = m_proxyPool[_local3.proxyId2];
if (_local3.IsRemoved()){
if (_local3.IsReceived()){
m_pairCallback.PairRemoved(_local4.userData, _local5.userData, _local3.userData);
};
m_pairBuffer[_local2].proxyId1 = _local3.proxyId1;
m_pairBuffer[_local2].proxyId2 = _local3.proxyId2;
_local2++;
} else {
_local3.ClearBuffered();
if (_local3.IsReceived() == false){
_local3.userData = m_pairCallback.PairAdded(_local4.userData, _local5.userData);
_local3.SetReceived();
};
};
_local1++;
};
_local1 = 0;
while (_local1 < _local2) {
m_pairManager.Remove(m_pairBuffer[_local1].proxyId1, m_pairBuffer[_local1].proxyId2);
_local1++;
};
m_pairBufferCount = 0;
}
private function IncrementTimeStamp(){
var _local1:uint;
if (m_timeStamp == b2Settings.USHRT_MAX){
_local1 = 0;
while (_local1 < b2Settings.b2_maxProxies) {
m_proxyPool[_local1].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){
var _local11:int;
var _local12:int;
var _local13:b2Proxy;
var _local8:uint = BinarySearch(_arg5, _arg6, _arg3);
var _local9:uint = BinarySearch(_arg5, _arg6, _arg4);
var _local10:uint = _local8;
while (_local10 < _local9) {
if (_arg5[_local10].IsLower()){
IncrementOverlapCount(_arg5[_local10].proxyId);
};
_local10++;
};
if (_local8 > 0){
_local11 = (_local8 - 1);
_local12 = _arg5[_local11].stabbingCount;
while (_local12) {
if (_arg5[_local11].IsLower()){
_local13 = m_proxyPool[_arg5[_local11].proxyId];
if (_local8 <= _local13.upperBounds[_arg7]){
IncrementOverlapCount(_arg5[_local11].proxyId);
_local12--;
};
};
_local11--;
};
};
_arg1[0] = _local8;
_arg2[0] = _local9;
}
private function ComputeBounds(_arg1:Array, _arg2:Array, _arg3:b2AABB){
var _local4:Number = _arg3.minVertex.x;
var _local5:Number = _arg3.minVertex.y;
_local4 = b2Math.b2Min(_local4, m_worldAABB.maxVertex.x);
_local5 = b2Math.b2Min(_local5, m_worldAABB.maxVertex.y);
_local4 = b2Math.b2Max(_local4, m_worldAABB.minVertex.x);
_local5 = b2Math.b2Max(_local5, m_worldAABB.minVertex.y);
var _local6:Number = _arg3.maxVertex.x;
var _local7:Number = _arg3.maxVertex.y;
_local6 = b2Math.b2Min(_local6, m_worldAABB.maxVertex.x);
_local7 = b2Math.b2Min(_local7, m_worldAABB.maxVertex.y);
_local6 = b2Math.b2Max(_local6, m_worldAABB.minVertex.x);
_local7 = b2Math.b2Max(_local7, m_worldAABB.minVertex.y);
_arg1[0] = (uint((m_quantizationFactor.x * (_local4 - m_worldAABB.minVertex.x))) & (b2Settings.USHRT_MAX - 1));
_arg2[0] = ((uint((m_quantizationFactor.x * (_local6 - m_worldAABB.minVertex.x))) & 0xFFFF) | 1);
_arg1[1] = (uint((m_quantizationFactor.y * (_local5 - m_worldAABB.minVertex.y))) & (b2Settings.USHRT_MAX - 1));
_arg2[1] = ((uint((m_quantizationFactor.y * (_local7 - m_worldAABB.minVertex.y))) & 0xFFFF) | 1);
}
public function ShouldCollide(_arg1:int, _arg2:int):Boolean{
var _local3:b2Proxy = m_proxyPool[_arg1];
var _local4:b2Proxy = m_proxyPool[_arg2];
if ((((_local3.groupIndex == _local4.groupIndex)) && (!((_local3.groupIndex == 0))))){
return ((_local3.groupIndex > 0));
};
var _local5:Boolean = ((!(((_local3.maskBits & _local4.categoryBits) == 0))) && (!(((_local3.categoryBits & _local4.maskBits) == 0))));
return (_local5);
}
public function CreateProxy(_arg1:b2AABB, _arg2:int, _arg3:int, _arg4:int, _arg5):uint{
var _local6:uint;
var _local7:b2Proxy;
var _local14:Array;
var _local15:uint;
var _local16:uint;
var _local17:Array;
var _local18:Array;
var _local19:Array;
var _local20:int;
var _local21:int;
var _local22:b2Bound;
var _local23:b2Bound;
var _local24:int;
var _local25:b2Proxy;
var _local26:b2Pair;
if (m_freeProxy == b2Pair.b2_nullProxy){
return (b2Pair.b2_nullProxy);
};
Flush();
var _local8:uint = m_freeProxy;
_local7 = m_proxyPool[_local8];
m_freeProxy = _local7.GetNext();
_local7.overlapCount = 0;
_local7.groupIndex = _arg2;
_local7.categoryBits = _arg3;
_local7.maskBits = _arg4;
_local7.userData = _arg5;
var _local9:uint = (2 * m_proxyCount);
var _local10:Array = new Array();
var _local11:Array = new Array();
ComputeBounds(_local10, _local11, _arg1);
var _local12:int;
while (_local12 < 2) {
_local14 = m_bounds[_local12];
_local17 = [_local15];
_local18 = [_local16];
Query(_local17, _local18, _local10[_local12], _local11[_local12], _local14, _local9, _local12);
_local15 = _local17[0];
_local16 = _local18[0];
_local19 = new Array();
_local21 = (_local9 - _local16);
_local20 = 0;
while (_local20 < _local21) {
_local19[_local20] = new b2Bound();
_local22 = _local19[_local20];
_local23 = _local14[(_local16 + _local20)];
_local22.value = _local23.value;
_local22.proxyId = _local23.proxyId;
_local22.stabbingCount = _local23.stabbingCount;
_local20++;
};
_local21 = _local19.length;
_local24 = (_local16 + 2);
_local20 = 0;
while (_local20 < _local21) {
_local23 = _local19[_local20];
_local22 = _local14[(_local24 + _local20)];
_local22.value = _local23.value;
_local22.proxyId = _local23.proxyId;
_local22.stabbingCount = _local23.stabbingCount;
_local20++;
};
_local19 = new Array();
_local21 = (_local16 - _local15);
_local20 = 0;
while (_local20 < _local21) {
_local19[_local20] = new b2Bound();
_local22 = _local19[_local20];
_local23 = _local14[(_local15 + _local20)];
_local22.value = _local23.value;
_local22.proxyId = _local23.proxyId;
_local22.stabbingCount = _local23.stabbingCount;
_local20++;
};
_local21 = _local19.length;
_local24 = (_local15 + 1);
_local20 = 0;
while (_local20 < _local21) {
_local23 = _local19[_local20];
_local22 = _local14[(_local24 + _local20)];
_local22.value = _local23.value;
_local22.proxyId = _local23.proxyId;
_local22.stabbingCount = _local23.stabbingCount;
_local20++;
};
_local16++;
_local14[_local15].value = _local10[_local12];
_local14[_local15].proxyId = _local8;
_local14[_local16].value = _local11[_local12];
_local14[_local16].proxyId = _local8;
_local14[_local15].stabbingCount = ((_local15 == 0)) ? 0 : _local14[(_local15 - 1)].stabbingCount;
_local14[_local16].stabbingCount = _local14[(_local16 - 1)].stabbingCount;
_local6 = _local15;
while (_local6 < _local16) {
_local14[_local6].stabbingCount++;
_local6++;
};
_local6 = _local15;
while (_local6 < (_local9 + 2)) {
_local25 = m_proxyPool[_local14[_local6].proxyId];
if (_local14[_local6].IsLower()){
_local25.lowerBounds[_local12] = _local6;
} else {
_local25.upperBounds[_local12] = _local6;
};
_local6++;
};
_local12++;
};
m_proxyCount++;
var _local13:int;
while (_local13 < m_queryResultCount) {
if (ShouldCollide(_local8, m_queryResults[_local13]) == false){
} else {
_local26 = m_pairManager.Add(_local8, m_queryResults[_local13]);
if (_local26 == null){
} else {
_local26.userData = m_pairCallback.PairAdded(_local7.userData, m_proxyPool[m_queryResults[_local13]].userData);
_local26.SetReceived();
};
};
_local13++;
};
m_queryResultCount = 0;
IncrementTimeStamp();
return (_local8);
}
public function DestroyProxy(_arg1:uint){
var _local6:Array;
var _local7:uint;
var _local8:uint;
var _local9:uint;
var _local10:uint;
var _local11:Array;
var _local12:int;
var _local13:int;
var _local14:b2Bound;
var _local15:b2Bound;
var _local16:int;
var _local17:uint;
var _local18:int;
var _local19:b2Proxy;
var _local20:b2Proxy;
var _local21:*;
if (_arg1 == b2Pair.b2_nullProxy){
return;
};
Flush();
var _local2:b2Proxy = m_proxyPool[_arg1];
var _local3:uint = (2 * m_proxyCount);
var _local4:int;
while (_local4 < 2) {
_local6 = m_bounds[_local4];
_local7 = _local2.lowerBounds[_local4];
_local8 = _local2.upperBounds[_local4];
_local9 = _local6[_local7].value;
_local10 = _local6[_local8].value;
_local11 = new Array();
_local13 = ((_local8 - _local7) - 1);
_local12 = 0;
while (_local12 < _local13) {
_local11[_local12] = new b2Bound();
_local14 = _local11[_local12];
_local15 = _local6[((_local7 + 1) + _local12)];
_local14.value = _local15.value;
_local14.proxyId = _local15.proxyId;
_local14.stabbingCount = _local15.stabbingCount;
_local12++;
};
_local13 = _local11.length;
_local16 = _local7;
_local12 = 0;
while (_local12 < _local13) {
_local15 = _local11[_local12];
_local14 = _local6[(_local16 + _local12)];
_local14.value = _local15.value;
_local14.proxyId = _local15.proxyId;
_local14.stabbingCount = _local15.stabbingCount;
_local12++;
};
_local11 = new Array();
_local13 = ((_local3 - _local8) - 1);
_local12 = 0;
while (_local12 < _local13) {
_local11[_local12] = new b2Bound();
_local14 = _local11[_local12];
_local15 = _local6[((_local8 + 1) + _local12)];
_local14.value = _local15.value;
_local14.proxyId = _local15.proxyId;
_local14.stabbingCount = _local15.stabbingCount;
_local12++;
};
_local13 = _local11.length;
_local16 = (_local8 - 1);
_local12 = 0;
while (_local12 < _local13) {
_local15 = _local11[_local12];
_local14 = _local6[(_local16 + _local12)];
_local14.value = _local15.value;
_local14.proxyId = _local15.proxyId;
_local14.stabbingCount = _local15.stabbingCount;
_local12++;
};
_local13 = (_local3 - 2);
_local17 = _local7;
while (_local17 < _local13) {
_local19 = m_proxyPool[_local6[_local17].proxyId];
if (_local6[_local17].IsLower()){
_local19.lowerBounds[_local4] = _local17;
} else {
_local19.upperBounds[_local4] = _local17;
};
_local17++;
};
_local13 = (_local8 - 1);
_local18 = _local7;
while (_local18 < _local13) {
_local6[_local18].stabbingCount--;
_local18++;
};
Query(new Array(), new Array(), _local9, _local10, _local6, (_local3 - 2), _local4);
_local4++;
};
var _local5:int;
while (_local5 < m_queryResultCount) {
_local20 = m_proxyPool[m_queryResults[_local5]];
_local21 = m_pairManager.Remove(_arg1, m_queryResults[_local5]);
m_pairCallback.PairRemoved(_local2.userData, _local20.userData, _local21);
_local5++;
};
m_queryResultCount = 0;
IncrementTimeStamp();
_local2.userData = null;
_local2.overlapCount = b2_invalid;
_local2.SetNext(m_freeProxy);
m_freeProxy = _arg1;
m_proxyCount--;
}
private function TestOverlap(_arg1:b2Proxy, _arg2:b2Proxy):Boolean{
var _local4:Array;
var _local3:int;
while (_local3 < 2) {
_local4 = m_bounds[_local3];
if (_local4[_arg1.lowerBounds[_local3]].value > _local4[_arg2.upperBounds[_local3]].value){
return (false);
};
if (_local4[_arg1.upperBounds[_local3]].value < _local4[_arg2.lowerBounds[_local3]].value){
return (false);
};
_local3++;
};
return (true);
}
public function Validate(){
var _local1:b2Pair;
var _local2:b2Proxy;
var _local3:b2Proxy;
var _local4:Boolean;
var _local10:b2Bound;
var _local11:uint;
var _local12:uint;
var _local13:uint;
var _local14:b2Bound;
var _local15:uint;
var _local16:b2Proxy;
var _local17:b2Bound;
var _local5:int;
while (_local5 < 2) {
_local10 = m_bounds[_local5];
_local11 = (2 * m_proxyCount);
_local12 = 0;
_local13 = 0;
while (_local13 < _local11) {
_local14 = _local10[_local13];
if (_local13 > 0){
_local17 = _local10[(_local13 - 1)];
};
_local15 = _local14.proxyId;
_local16 = m_proxyPool[_local14.proxyId];
if (_local14.IsLower() == true){
_local12++;
} else {
_local12--;
};
_local13++;
};
_local5++;
};
var _local6:Array = m_pairManager.GetPairs();
var _local7:uint = m_pairManager.GetCount();
m_pairBuffer.sortOn(["proxyId1", "proxyId2"], Array.NUMERIC);
var _local8:int;
while (_local8 < m_pairBufferCount) {
if (_local8 > 0){
};
_local1 = m_pairManager.Find(m_pairBuffer[_local8].proxyId1, m_pairBuffer[_local8].proxyId2);
_local2 = m_proxyPool[_local1.proxyId1];
_local3 = m_proxyPool[_local1.proxyId2];
_local4 = TestOverlap(_local2, _local3);
if (_local1.IsRemoved() == true){
};
_local8++;
};
var _local9:int;
while (_local9 < _local7) {
_local1 = _local6[_local9];
_local2 = m_proxyPool[_local1.proxyId1];
_local3 = m_proxyPool[_local1.proxyId2];
_local4 = TestOverlap(_local2, _local3);
if (_local1.IsBuffered()){
if (_local1.IsRemoved() == true){
};
};
_local9++;
};
}
private function IncrementOverlapCount(_arg1:uint){
var _local2:b2Proxy = 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.minVertex.x;
_local3 = _arg1.minVertex.y;
_local2 = (_local2 - m_worldAABB.maxVertex.x);
_local3 = (_local3 - m_worldAABB.maxVertex.y);
_local4 = m_worldAABB.minVertex.x;
_local5 = m_worldAABB.minVertex.y;
_local4 = (_local4 - _arg1.maxVertex.x);
_local5 = (_local5 - _arg1.maxVertex.y);
_local2 = b2Math.b2Max(_local2, _local4);
_local3 = b2Math.b2Max(_local3, _local5);
return ((b2Math.b2Max(_local2, _local3) < 0));
}
private function AddBufferedPair(_arg1:uint, _arg2:uint){
if (ShouldCollide(_arg1, _arg2) == false){
return;
};
var _local3:b2Pair = m_pairManager.Add(_arg1, _arg2);
if (_local3 == null){
return;
};
if (_local3.IsBuffered() == false){
if (m_pairBufferCount < b2Settings.b2_maxPairs){
_local3.SetBuffered();
m_pairBuffer[m_pairBufferCount].proxyId1 = _local3.proxyId1;
m_pairBuffer[m_pairBufferCount].proxyId2 = _local3.proxyId2;
m_pairBufferCount++;
};
};
_local3.ClearRemoved();
}
public function MoveProxy(_arg1:uint, _arg2:b2AABB){
var _local3:uint;
var _local4:b2Bound;
var _local5:b2Bound;
var _local6:b2Bound;
var _local7:uint;
var _local8:b2Proxy;
var _local14:Array;
var _local15:uint;
var _local16:uint;
var _local17:uint;
var _local18:uint;
var _local19:int;
var _local20:int;
var _local21:uint;
var _local22:b2Proxy;
if ((((_arg1 == b2Pair.b2_nullProxy)) || ((b2Settings.b2_maxProxies <= _arg1)))){
return;
};
if (_arg2.IsValid() == false){
return;
};
var _local9:uint = (2 * m_proxyCount);
var _local10:b2Proxy = m_proxyPool[_arg1];
var _local11:Array = new Array();
var _local12:Array = new Array();
ComputeBounds(_local11, _local12, _arg2);
var _local13:uint;
while (_local13 < 2) {
_local14 = m_bounds[_local13];
_local15 = _local10.lowerBounds[_local13];
_local16 = _local10.upperBounds[_local13];
_local17 = _local11[_local13];
_local18 = _local12[_local13];
_local19 = (_local17 - _local14[_local15].value);
_local20 = (_local18 - _local14[_local16].value);
_local14[_local15].value = _local17;
_local14[_local16].value = _local18;
if (_local19 < 0){
_local3 = _local15;
while ((((_local3 > 0)) && ((_local17 < _local14[(_local3 - 1)].value)))) {
_local4 = _local14[_local3];
_local5 = _local14[(_local3 - 1)];
_local21 = _local5.proxyId;
_local22 = m_proxyPool[_local5.proxyId];
_local5.stabbingCount++;
if (_local5.IsUpper() == true){
if (TestOverlap(_local10, _local22)){
AddBufferedPair(_arg1, _local21);
};
var _local23 = _local22.upperBounds;
var _local24 = _local13;
var _local25 = (_local23[_local24] + 1);
_local23[_local24] = _local25;
_local4.stabbingCount++;
} else {
_local23 = _local22.lowerBounds;
_local24 = _local13;
_local25 = (_local23[_local24] + 1);
_local23[_local24] = _local25;
_local4.stabbingCount--;
};
_local23 = _local10.lowerBounds;
_local24 = _local13;
_local25 = (_local23[_local24] - 1);
_local23[_local24] = _local25;
_local4.Swap(_local5);
_local3--;
};
};
if (_local20 > 0){
_local3 = _local16;
while ((((_local3 < (_local9 - 1))) && ((_local14[(_local3 + 1)].value <= _local18)))) {
_local4 = _local14[_local3];
_local6 = _local14[(_local3 + 1)];
_local7 = _local6.proxyId;
_local8 = m_proxyPool[_local7];
_local6.stabbingCount++;
if (_local6.IsLower() == true){
if (TestOverlap(_local10, _local8)){
AddBufferedPair(_arg1, _local7);
};
_local23 = _local8.lowerBounds;
_local24 = _local13;
_local25 = (_local23[_local24] - 1);
_local23[_local24] = _local25;
_local4.stabbingCount++;
} else {
_local23 = _local8.upperBounds;
_local24 = _local13;
_local25 = (_local23[_local24] - 1);
_local23[_local24] = _local25;
_local4.stabbingCount--;
};
_local23 = _local10.upperBounds;
_local24 = _local13;
_local25 = (_local23[_local24] + 1);
_local23[_local24] = _local25;
_local4.Swap(_local6);
_local3++;
};
};
if (_local19 > 0){
_local3 = _local15;
while ((((_local3 < (_local9 - 1))) && ((_local14[(_local3 + 1)].value <= _local17)))) {
_local4 = _local14[_local3];
_local6 = _local14[(_local3 + 1)];
_local7 = _local6.proxyId;
_local8 = m_proxyPool[_local7];
_local6.stabbingCount--;
if (_local6.IsUpper()){
RemoveBufferedPair(_arg1, _local7);
_local23 = _local8.upperBounds;
_local24 = _local13;
_local25 = (_local23[_local24] - 1);
_local23[_local24] = _local25;
_local4.stabbingCount--;
} else {
_local23 = _local8.lowerBounds;
_local24 = _local13;
_local25 = (_local23[_local24] - 1);
_local23[_local24] = _local25;
_local4.stabbingCount++;
};
_local23 = _local10.lowerBounds;
_local24 = _local13;
_local25 = (_local23[_local24] + 1);
_local23[_local24] = _local25;
_local4.Swap(_local6);
_local3++;
};
};
if (_local20 < 0){
_local3 = _local16;
while ((((_local3 > 0)) && ((_local18 < _local14[(_local3 - 1)].value)))) {
_local4 = _local14[_local3];
_local5 = _local14[(_local3 - 1)];
_local21 = _local5.proxyId;
_local22 = m_proxyPool[_local21];
_local5.stabbingCount--;
if (_local5.IsLower() == true){
RemoveBufferedPair(_arg1, _local21);
_local23 = _local22.lowerBounds;
_local24 = _local13;
_local25 = (_local23[_local24] + 1);
_local23[_local24] = _local25;
_local4.stabbingCount--;
} else {
_local23 = _local22.upperBounds;
_local24 = _local13;
_local25 = (_local23[_local24] + 1);
_local23[_local24] = _local25;
_local4.stabbingCount++;
};
_local23 = _local10.upperBounds;
_local24 = _local13;
_local25 = (_local23[_local24] - 1);
_local23[_local24] = _local25;
_local4.Swap(_local5);
_local3--;
};
};
_local13++;
};
}
public static function BinarySearch(_arg1:Array, _arg2:int, _arg3:uint):uint{
var _local6:int;
var _local4:int;
var _local5:int = (_arg2 - 1);
while (_local4 <= _local5) {
_local6 = ((_local4 + _local5) / 2);
if (_arg1[_local6].value > _arg3){
_local5 = (_local6 - 1);
} else {
if (_arg1[_local6].value < _arg3){
_local4 = (_local6 + 1);
} else {
return (uint(_local6));
};
};
};
return (uint(_local4));
}
public static function Equals(_arg1:b2BufferedPair, _arg2:b2BufferedPair):Boolean{
if ((((_arg1.proxyId1 == _arg2.proxyId1)) && ((_arg1.proxyId2 == _arg2.proxyId2)))){
return (true);
};
return (false);
}
public static function LessThanBP(_arg1:b2BufferedPair, _arg2:b2BufferedPair):Boolean{
if (_arg1.proxyId1 < _arg2.proxyId1){
return (true);
};
if (_arg1.proxyId1 == _arg2.proxyId1){
return ((_arg1.proxyId2 < _arg2.proxyId2));
};
return (false);
}
}
}//package Engine.Collision
Section 17
//b2BufferedPair (Engine.Collision.b2BufferedPair)
package Engine.Collision {
public class b2BufferedPair {
public var proxyId1:uint;
public var proxyId2:uint;
}
}//package Engine.Collision
Section 18
//b2Collision (Engine.Collision.b2Collision)
package Engine.Collision {
import Engine.Collision.Shapes.*;
import Engine.Common.Math.*;
import Engine.Common.*;
public class b2Collision {
public static const b2_nullFeature:uint = 0xFF;
public static var d:b2Vec2 = new b2Vec2();
private static var b2CollidePolyTempVec:b2Vec2 = new b2Vec2();
public static var dLocal1:b2Vec2 = new b2Vec2();
public static var v1:b2Vec2 = new b2Vec2();
public static var v2:b2Vec2 = new b2Vec2();
public static function EdgeSeparation(_arg1:b2PolyShape, _arg2:int, _arg3:b2PolyShape):Number{
var _local5:Array;
var _local8:int;
var _local14:Number;
var _local23:b2Vec2;
var _local24:Number;
var _local4:int = _arg1.m_vertexCount;
_local5 = _arg1.m_vertices;
var _local6:int = _arg3.m_vertexCount;
var _local7:Array = _arg3.m_vertices;
_local8 = _arg2;
var _local9:int = (((_arg2 + 1) == _local4)) ? 0 : (_arg2 + 1);
var _local10:Number = (_local5[_local9].x - _local5[_local8].x);
var _local11:Number = (_local5[_local9].y - _local5[_local8].y);
var _local12:Number = _local10;
_local10 = _local11;
_local11 = -(_local12);
var _local13:Number = (1 / Math.sqrt(((_local10 * _local10) + (_local11 * _local11))));
_local10 = (_local10 * _local13);
_local11 = (_local11 * _local13);
_local14 = _local10;
var _local15:Number = _local11;
_local12 = _local14;
var _local16:b2Mat22 = _arg1.m_R;
_local14 = ((_local16.col1.x * _local12) + (_local16.col2.x * _local15));
_local15 = ((_local16.col1.y * _local12) + (_local16.col2.y * _local15));
var _local17:Number = _local14;
var _local18:Number = _local15;
_local16 = _arg3.m_R;
_local12 = ((_local17 * _local16.col1.x) + (_local18 * _local16.col1.y));
_local18 = ((_local17 * _local16.col2.x) + (_local18 * _local16.col2.y));
_local17 = _local12;
var _local19:int;
var _local20:Number = Number.MAX_VALUE;
var _local21:int;
while (_local21 < _local6) {
_local23 = _local7[_local21];
_local24 = ((_local23.x * _local17) + (_local23.y * _local18));
if (_local24 < _local20){
_local20 = _local24;
_local19 = _local21;
};
_local21++;
};
v1.x = 0;
v1.y = 0;
v1.SetV(_local5[_local8]);
v1.MulM(_arg1.m_R);
v1.Add(_arg1.m_position);
v2.x = 0;
v2.y = 0;
v2.SetV(_local7[_local19]);
v2.MulM(_arg3.m_R);
v2.Add(_arg3.m_position);
v2.Subtract(v1);
var _local22:Number = ((v2.x * _local14) + (v2.y * _local15));
return (_local22);
}
public static function b2TestOverlap(_arg1:b2AABB, _arg2:b2AABB):Boolean{
var _local3:b2Vec2 = _arg2.minVertex;
var _local4:b2Vec2 = _arg1.maxVertex;
var _local5:Number = (_local3.x - _local4.x);
var _local6:Number = (_local3.y - _local4.y);
_local3 = _arg1.minVertex;
_local4 = _arg2.maxVertex;
var _local7:Number = (_local3.x - _local4.x);
var _local8:Number = (_local3.y - _local4.y);
if ((((_local5 > 0)) || ((_local6 > 0)))){
return (false);
};
if ((((_local7 > 0)) || ((_local8 > 0)))){
return (false);
};
return (true);
}
public static function b2CollidePolyAndCircle(_arg1:b2Manifold, _arg2:b2PolyShape, _arg3:b2CircleShape){
var _local4:b2ContactPoint;
var _local5:Number;
var _local6:Number;
var _local11:Number;
var _local22:Number;
var _local23:Number;
var _local24:Number;
var _local25:b2Vec2;
_arg1.pointCount = 0;
var _local7:Number = (_arg3.m_position.x - _arg2.m_position.x);
var _local8:Number = (_arg3.m_position.y - _arg2.m_position.y);
var _local9:b2Mat22 = _arg2.m_R;
var _local10:Number = ((_local7 * _local9.col1.x) + (_local8 * _local9.col1.y));
_local8 = ((_local7 * _local9.col2.x) + (_local8 * _local9.col2.y));
_local7 = _local10;
var _local12:int;
var _local13:Number = -(Number.MAX_VALUE);
var _local14:Number = _arg3.m_radius;
var _local15:int;
while (_local15 < _arg2.m_vertexCount) {
_local24 = ((_arg2.m_normals[_local15].x * (_local7 - _arg2.m_vertices[_local15].x)) + (_arg2.m_normals[_local15].y * (_local8 - _arg2.m_vertices[_local15].y)));
if (_local24 > _local14){
return;
};
if (_local24 > _local13){
_local13 = _local24;
_local12 = _local15;
};
_local15++;
};
if (_local13 < Number.MIN_VALUE){
_arg1.pointCount = 1;
_local25 = _arg2.m_normals[_local12];
_arg1.normal.x = ((_local9.col1.x * _local25.x) + (_local9.col2.x * _local25.y));
_arg1.normal.y = ((_local9.col1.y * _local25.x) + (_local9.col2.y * _local25.y));
_local4 = _arg1.points[0];
_local4.id.features.incidentEdge = _local12;
_local4.id.features.incidentVertex = b2_nullFeature;
_local4.id.features.referenceFace = b2_nullFeature;
_local4.id.features.flip = 0;
_local4.position.x = (_arg3.m_position.x - (_local14 * _arg1.normal.x));
_local4.position.y = (_arg3.m_position.y - (_local14 * _arg1.normal.y));
_local4.separation = (_local13 - _local14);
return;
};
var _local16:int = _local12;
var _local17:int = _arg2.m_nextVert[_local16];
var _local18:Number = (_arg2.m_vertices[_local17].x - _arg2.m_vertices[_local16].x);
var _local19:Number = (_arg2.m_vertices[_local17].y - _arg2.m_vertices[_local16].y);
var _local20:Number = Math.sqrt(((_local18 * _local18) + (_local19 * _local19)));
_local18 = (_local18 / _local20);
_local19 = (_local19 / _local20);
if (_local20 < Number.MIN_VALUE){
_local5 = (_local7 - _arg2.m_vertices[_local16].x);
_local6 = (_local8 - _arg2.m_vertices[_local16].y);
_local11 = Math.sqrt(((_local5 * _local5) + (_local6 * _local6)));
_local5 = (_local5 / _local11);
_local6 = (_local6 / _local11);
if (_local11 > _local14){
return;
};
_arg1.pointCount = 1;
_arg1.normal.Set(((_local9.col1.x * _local5) + (_local9.col2.x * _local6)), ((_local9.col1.y * _local5) + (_local9.col2.y * _local6)));
_local4 = _arg1.points[0];
_local4.id.features.incidentEdge = b2_nullFeature;
_local4.id.features.incidentVertex = _local16;
_local4.id.features.referenceFace = b2_nullFeature;
_local4.id.features.flip = 0;
_local4.position.x = (_arg3.m_position.x - (_local14 * _arg1.normal.x));
_local4.position.y = (_arg3.m_position.y - (_local14 * _arg1.normal.y));
_local4.separation = (_local11 - _local14);
return;
};
var _local21:Number = (((_local7 - _arg2.m_vertices[_local16].x) * _local18) + ((_local8 - _arg2.m_vertices[_local16].y) * _local19));
_local4 = _arg1.points[0];
_local4.id.features.incidentEdge = b2_nullFeature;
_local4.id.features.incidentVertex = b2_nullFeature;
_local4.id.features.referenceFace = b2_nullFeature;
_local4.id.features.flip = 0;
if (_local21 <= 0){
_local22 = _arg2.m_vertices[_local16].x;
_local23 = _arg2.m_vertices[_local16].y;
_local4.id.features.incidentVertex = _local16;
} else {
if (_local21 >= _local20){
_local22 = _arg2.m_vertices[_local17].x;
_local23 = _arg2.m_vertices[_local17].y;
_local4.id.features.incidentVertex = _local17;
} else {
_local22 = ((_local18 * _local21) + _arg2.m_vertices[_local16].x);
_local23 = ((_local19 * _local21) + _arg2.m_vertices[_local16].y);
_local4.id.features.incidentEdge = _local16;
};
};
_local5 = (_local7 - _local22);
_local6 = (_local8 - _local23);
_local11 = Math.sqrt(((_local5 * _local5) + (_local6 * _local6)));
_local5 = (_local5 / _local11);
_local6 = (_local6 / _local11);
if (_local11 > _local14){
return;
};
_arg1.pointCount = 1;
_arg1.normal.Set(((_local9.col1.x * _local5) + (_local9.col2.x * _local6)), ((_local9.col1.y * _local5) + (_local9.col2.y * _local6)));
_local4.position.x = (_arg3.m_position.x - (_local14 * _arg1.normal.x));
_local4.position.y = (_arg3.m_position.y - (_local14 * _arg1.normal.y));
_local4.separation = (_local11 - _local14);
}
public static function FindIncidentEdge(_arg1:Array, _arg2:b2PolyShape, _arg3:int, _arg4:b2PolyShape){
var _local21:int;
var _local22:int;
var _local25:ClipVertex;
var _local26:int;
var _local27:int;
var _local28:Number;
var _local29:Number;
var _local30:Number;
var _local5:int = _arg2.m_vertexCount;
var _local6:Array = _arg2.m_vertices;
var _local7:int = _arg4.m_vertexCount;
var _local8:Array = _arg4.m_vertices;
var _local9:int = _arg3;
var _local10:int = (((_arg3 + 1) == _local5)) ? 0 : (_arg3 + 1);
var _local11:b2Vec2 = _local6[_local10];
var _local12:Number = _local11.x;
var _local13:Number = _local11.y;
_local11 = _local6[_local9];
_local12 = (_local12 - _local11.x);
_local13 = (_local13 - _local11.y);
var _local14:Number = _local12;
_local12 = _local13;
_local13 = -(_local14);
var _local15:Number = (1 / Math.sqrt(((_local12 * _local12) + (_local13 * _local13))));
_local12 = (_local12 * _local15);
_local13 = (_local13 * _local15);
var _local16:Number = _local12;
var _local17:Number = _local13;
_local14 = _local16;
var _local18:b2Mat22 = _arg2.m_R;
_local16 = ((_local18.col1.x * _local14) + (_local18.col2.x * _local17));
_local17 = ((_local18.col1.y * _local14) + (_local18.col2.y * _local17));
var _local19:Number = _local16;
var _local20:Number = _local17;
_local18 = _arg4.m_R;
_local14 = ((_local19 * _local18.col1.x) + (_local20 * _local18.col1.y));
_local20 = ((_local19 * _local18.col2.x) + (_local20 * _local18.col2.y));
_local19 = _local14;
var _local23:Number = Number.MAX_VALUE;
var _local24:int;
while (_local24 < _local7) {
_local26 = _local24;
_local27 = (((_local24 + 1) < _local7)) ? (_local24 + 1) : 0;
_local11 = _local8[_local27];
_local28 = _local11.x;
_local29 = _local11.y;
_local11 = _local8[_local26];
_local28 = (_local28 - _local11.x);
_local29 = (_local29 - _local11.y);
_local14 = _local28;
_local28 = _local29;
_local29 = -(_local14);
_local15 = (1 / Math.sqrt(((_local28 * _local28) + (_local29 * _local29))));
_local28 = (_local28 * _local15);
_local29 = (_local29 * _local15);
_local30 = ((_local28 * _local19) + (_local29 * _local20));
if (_local30 < _local23){
_local23 = _local30;
_local21 = _local26;
_local22 = _local27;
};
_local24++;
};
_local25 = _arg1[0];
_local11 = _local25.v;
_local11.SetV(_local8[_local21]);
_local11.MulM(_arg4.m_R);
_local11.Add(_arg4.m_position);
_local25.id.features.referenceFace = _arg3;
_local25.id.features.incidentEdge = _local21;
_local25.id.features.incidentVertex = _local21;
_local25 = _arg1[1];
_local11 = _local25.v;
_local11.SetV(_local8[_local22]);
_local11.MulM(_arg4.m_R);
_local11.Add(_arg4.m_position);
_local25.id.features.referenceFace = _arg3;
_local25.id.features.incidentEdge = _local21;
_local25.id.features.incidentVertex = _local22;
}
public static function FindMaxSeparation(_arg1:Array, _arg2:b2PolyShape, _arg3:b2PolyShape):Number{
var _local13:int;
var _local14:Number;
var _local15:int;
var _local16:Number;
var _local17:int;
var _local18:Number;
var _local4:int = _arg2.m_vertexCount;
var _local5:Array = _arg2.m_vertices;
d.x = 0;
d.y = 0;
d.SetV(_arg3.m_position);
d.Subtract(_arg2.m_position);
dLocal1.x = 0;
dLocal1.y = 0;
dLocal1.SetV(d);
dLocal1.MulTM(_arg2.m_R);
var _local6:int;
var _local7:Number = -(Number.MAX_VALUE);
var _local8:int;
while (_local8 < _local4) {
_local16 = b2Math.b2Dot(_local5[_local8], dLocal1);
if (_local16 > _local7){
_local7 = _local16;
_local6 = _local8;
};
_local8++;
};
var _local9:int = (((_local6 - 1) >= 0)) ? (_local6 - 1) : (_local4 - 1);
var _local10:Number = EdgeSeparation(_arg2, _local9, _arg3);
if (_local10 > 0){
return (_local10);
};
var _local11:int = _local6;
var _local12:Number = EdgeSeparation(_arg2, _local11, _arg3);
if (_local12 > 0){
return (_local12);
};
if (_local10 > _local12){
_local15 = -1;
_local13 = _local9;
_local14 = _local10;
} else {
_local15 = 1;
_local13 = _local11;
_local14 = _local12;
};
while (true) {
if (_local15 == -1){
_local17 = (((_local13 - 1) >= 0)) ? (_local13 - 1) : (_local4 - 1);
} else {
_local17 = (((_local13 + 1) < _local4)) ? (_local13 + 1) : 0;
};
_local18 = EdgeSeparation(_arg2, _local17, _arg3);
if (_local18 > 0){
return (_local18);
};
if (_local18 > _local14){
_local13 = _local17;
_local14 = _local18;
} else {
break;
};
};
_arg1[0] = _local13;
return (_local14);
}
public static function ClipSegmentToLine(_arg1:Array, _arg2:Array, _arg3:b2Vec2, _arg4:Number):int{
var _local7:b2Vec2;
var _local8:Number;
var _local10:Number;
var _local11:b2Vec2;
var _local5:int;
var _local6:b2Vec2 = _arg2[0].v;
_local7 = _arg2[1].v;
_local8 = (b2Math.b2Dot(_arg3, _arg2[0].v) - _arg4);
var _local9:Number = (b2Math.b2Dot(_arg3, _arg2[1].v) - _arg4);
if (_local8 <= 0){
var _temp1 = _local5;
_local5 = (_local5 + 1);
var _local12 = _temp1;
_arg1[_local12] = _arg2[0];
};
if (_local9 <= 0){
var _temp2 = _local5;
_local5 = (_local5 + 1);
_local12 = _temp2;
_arg1[_local12] = _arg2[1];
};
if ((_local8 * _local9) < 0){
_local10 = (_local8 / (_local8 - _local9));
_local11 = _arg1[_local5].v;
_local11.x = (_local6.x + (_local10 * (_local7.x - _local6.x)));
_local11.y = (_local6.y + (_local10 * (_local7.y - _local6.y)));
if (_local8 > 0){
_arg1[_local5].id = _arg2[0].id;
} else {
_arg1[_local5].id = _arg2[1].id;
};
_local5++;
};
return (_local5);
}
public static function b2CollidePoly(_arg1:b2Manifold, _arg2:b2PolyShape, _arg3:b2PolyShape){
var _local10:b2PolyShape;
var _local11:b2PolyShape;
var _local12:int;
var _local13:int;
var _local39:int;
var _local42:b2Vec2;
var _local43:Number;
var _local44:b2ContactPoint;
_arg1.pointCount = 0;
var _local4:int;
var _local5:Array = [_local4];
var _local6:Number = FindMaxSeparation(_local5, _arg2, _arg3);
_local4 = _local5[0];
if (_local6 > 0){
return;
};
var _local7:int;
var _local8:Array = [_local7];
var _local9:Number = FindMaxSeparation(_local8, _arg3, _arg2);
_local7 = _local8[0];
if (_local9 > 0){
return;
};
var _local14:Number = 0.98;
var _local15:Number = 0.001;
if (_local9 > ((_local14 * _local6) + _local15)){
_local10 = _arg3;
_local11 = _arg2;
_local12 = _local7;
_local13 = 1;
} else {
_local10 = _arg2;
_local11 = _arg3;
_local12 = _local4;
_local13 = 0;
};
var _local16:Array = [new ClipVertex(), new ClipVertex()];
FindIncidentEdge(_local16, _local10, _local12, _local11);
var _local17:int = _local10.m_vertexCount;
var _local18:Array = _local10.m_vertices;
var _local19:b2Vec2 = _local18[_local12];
var _local20:b2Vec2 = (((_local12 + 1) < _local17)) ? _local18[(_local12 + 1)] : _local18[0];
var _local21:Number = (_local20.x - _local19.x);
var _local22:Number = (_local20.y - _local19.y);
var _local23:Number = (_local20.x - _local19.x);
var _local24:Number = (_local20.y - _local19.y);
var _local25:Number = _local23;
var _local26:b2Mat22 = _local10.m_R;
_local23 = ((_local26.col1.x * _local25) + (_local26.col2.x * _local24));
_local24 = ((_local26.col1.y * _local25) + (_local26.col2.y * _local24));
var _local27:Number = (1 / Math.sqrt(((_local23 * _local23) + (_local24 * _local24))));
_local23 = (_local23 * _local27);
_local24 = (_local24 * _local27);
var _local28:Number = _local23;
var _local29:Number = _local24;
_local25 = _local28;
_local28 = _local29;
_local29 = -(_local25);
var _local30:Number = _local19.x;
var _local31:Number = _local19.y;
_local25 = _local30;
_local26 = _local10.m_R;
_local30 = ((_local26.col1.x * _local25) + (_local26.col2.x * _local31));
_local31 = ((_local26.col1.y * _local25) + (_local26.col2.y * _local31));
_local30 = (_local30 + _local10.m_position.x);
_local31 = (_local31 + _local10.m_position.y);
var _local32:Number = _local20.x;
var _local33:Number = _local20.y;
_local25 = _local32;
_local26 = _local10.m_R;
_local32 = ((_local26.col1.x * _local25) + (_local26.col2.x * _local33));
_local33 = ((_local26.col1.y * _local25) + (_local26.col2.y * _local33));
_local32 = (_local32 + _local10.m_position.x);
_local33 = (_local33 + _local10.m_position.y);
var _local34:Number = ((_local28 * _local30) + (_local29 * _local31));
var _local35:Number = -(((_local23 * _local30) + (_local24 * _local31)));
var _local36:Number = ((_local23 * _local32) + (_local24 * _local33));
var _local37:Array = [new ClipVertex(), new ClipVertex()];
var _local38:Array = [new ClipVertex(), new ClipVertex()];
b2CollidePolyTempVec.Set(-(_local23), -(_local24));
_local39 = ClipSegmentToLine(_local37, _local16, b2CollidePolyTempVec, _local35);
if (_local39 < 2){
return;
};
b2CollidePolyTempVec.Set(_local23, _local24);
_local39 = ClipSegmentToLine(_local38, _local37, b2CollidePolyTempVec, _local36);
if (_local39 < 2){
return;
};
if (_local13){
_arg1.normal.Set(-(_local28), -(_local29));
} else {
_arg1.normal.Set(_local28, _local29);
};
var _local40:int;
var _local41:int;
while (_local41 < b2Settings.b2_maxManifoldPoints) {
_local42 = _local38[_local41].v;
_local43 = (((_local28 * _local42.x) + (_local29 * _local42.y)) - _local34);
if (_local43 <= 0){
_local44 = _arg1.points[_local40];
_local44.separation = _local43;
_local44.position.SetV(_local38[_local41].v);
_local44.id.Set(_local38[_local41].id);
_local44.id.features.flip = _local13;
_local40++;
};
_local41++;
};
_arg1.pointCount = _local40;
}
public static function b2CollideCircle(_arg1:b2Manifold, _arg2:b2CircleShape, _arg3:b2CircleShape){
var _local8:Number;
var _local10:Number;
var _local11:Number;
_arg1.pointCount = 0;
var _local4:Number = (_arg3.m_position.x - _arg2.m_position.x);
var _local5:Number = (_arg3.m_position.y - _arg2.m_position.y);
var _local6:Number = ((_local4 * _local4) + (_local5 * _local5));
var _local7:Number = (_arg2.m_radius + _arg3.m_radius);
if (_local6 > (_local7 * _local7)){
return;
};
if (_local6 < Number.MIN_VALUE){
_local8 = -(_local7);
_arg1.normal.Set(0, 1);
} else {
_local10 = Math.sqrt(_local6);
_local8 = (_local10 - _local7);
_local11 = (1 / _local10);
_arg1.normal.x = (_local11 * _local4);
_arg1.normal.y = (_local11 * _local5);
};
_arg1.pointCount = 1;
var _local9:b2ContactPoint = _arg1.points[0];
_local9.id.key = 0;
_local9.separation = _local8;
_local9.position.x = (_arg3.m_position.x - (_arg3.m_radius * _arg1.normal.x));
_local9.position.y = (_arg3.m_position.y - (_arg3.m_radius * _arg1.normal.y));
}
}
}//package Engine.Collision
Section 19
//b2ContactID (Engine.Collision.b2ContactID)
package Engine.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){
key = _arg1._key;
}
public function Copy():b2ContactID{
var _local1:b2ContactID = new b2ContactID();
_local1.key = key;
return (_local1);
}
public function set key(_arg1:uint){
_key = _arg1;
features._referenceFace = (_key & 0xFF);
features._incidentEdge = (((_key & 0xFF00) >> 8) & 0xFF);
features._incidentVertex = (((_key & 0xFF0000) >> 16) & 0xFF);
features._flip = (((_key & 4278190080) >> 24) & 0xFF);
}
public function get key():uint{
return (_key);
}
}
}//package Engine.Collision
Section 20
//b2ContactPoint (Engine.Collision.b2ContactPoint)
package Engine.Collision {
import Engine.Common.Math.*;
public class b2ContactPoint {
public var tangentImpulse:Number;
public var separation:Number;
public var position:b2Vec2;
public var id:b2ContactID;
public var normalImpulse:Number;
public function b2ContactPoint(){
position = new b2Vec2();
id = new b2ContactID();
super();
}
}
}//package Engine.Collision
Section 21
//b2Manifold (Engine.Collision.b2Manifold)
package Engine.Collision {
import Engine.Common.Math.*;
import Engine.Common.*;
public class b2Manifold {
public var points:Array;
public var normal:b2Vec2;
public var pointCount:int;
public function b2Manifold(){
points = new Array(b2Settings.b2_maxManifoldPoints);
var _local1:int;
while (_local1 < b2Settings.b2_maxManifoldPoints) {
points[_local1] = new b2ContactPoint();
_local1++;
};
normal = new b2Vec2();
}
}
}//package Engine.Collision
Section 22
//b2OBB (Engine.Collision.b2OBB)
package Engine.Collision {
import Engine.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 Engine.Collision
Section 23
//b2Pair (Engine.Collision.b2Pair)
package Engine.Collision {
public class b2Pair {
public var proxyId1:uint;
public var userData;// = null
public var proxyId2:uint;
public var status:uint;
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 e_pairReceived:uint = 4;
public static var b2_nullProxy:uint = 0xFFFF;
public static var b2_tableCapacity:int = 8192;
public function SetBuffered(){
status = (status | e_pairBuffered);
}
public function SetReceived(){
status = (status | e_pairReceived);
}
public function IsBuffered():Boolean{
return (((status & e_pairBuffered) == e_pairBuffered));
}
public function IsReceived():Boolean{
return (((status & e_pairReceived) == e_pairReceived));
}
public function ClearBuffered(){
status = (status & ~(e_pairBuffered));
}
public function ClearRemoved(){
status = (status & ~(e_pairRemoved));
}
public function IsRemoved():Boolean{
return (((status & e_pairRemoved) == e_pairRemoved));
}
public function SetRemoved(){
status = (status | e_pairRemoved);
}
}
}//package Engine.Collision
Section 24
//b2PairCallback (Engine.Collision.b2PairCallback)
package Engine.Collision {
public class b2PairCallback {
public function PairRemoved(_arg1, _arg2, _arg3){
}
public function PairAdded(_arg1, _arg2){
return (null);
}
}
}//package Engine.Collision
Section 25
//b2PairManager (Engine.Collision.b2PairManager)
package Engine.Collision {
import Engine.Common.Math.*;
import Engine.Common.*;
public class b2PairManager {
public var m_pairCount:int;
public var m_next:Array;
public var m_hashTable:Array;
public var m_pairs:Array;
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_next = new Array(b2Settings.b2_maxPairs);
_local1 = 0;
while (_local1 < b2Settings.b2_maxPairs) {
m_next[_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_pairCount = 0;
}
public function Find(_arg1:uint, _arg2:uint):b2Pair{
var _local5:uint;
if (_arg1 > _arg2){
_local5 = _arg1;
_arg1 = _arg2;
_arg2 = _local5;
};
var _local3:uint = (Hash(_arg1, _arg2) & b2Pair.b2_tableMask);
var _local4:uint = m_hashTable[_local3];
while (((!((_local4 == b2Pair.b2_nullPair))) && ((Equals(m_pairs[_local4], _arg1, _arg2) == false)))) {
_local4 = m_next[_local4];
};
if (_local4 == b2Pair.b2_nullPair){
return (null);
};
return (m_pairs[_local4]);
}
public function Add(_arg1:uint, _arg2:uint):b2Pair{
var _local6:uint;
if (_arg1 > _arg2){
_local6 = _arg1;
_arg1 = _arg2;
_arg2 = _local6;
};
var _local3:uint = (Hash(_arg1, _arg2) & b2Pair.b2_tableMask);
var _local4:int = FindHash(_arg1, _arg2, _local3);
var _local5:b2Pair = ((_local4)!=b2Settings.USHRT_MAX) ? m_pairs[_local4] : null;
if (_local5 != null){
return (_local5);
};
if (m_pairCount == b2Settings.b2_maxPairs){
return (null);
};
_local5 = m_pairs[m_pairCount];
_local5.proxyId1 = _arg1;
_local5.proxyId2 = _arg2;
_local5.status = 0;
_local5.userData = null;
m_next[m_pairCount] = m_hashTable[_local3];
m_hashTable[_local3] = m_pairCount;
m_pairCount++;
return (_local5);
}
public function Remove(_arg1:uint, _arg2:uint){
var _local12:uint;
if (_arg1 > _arg2){
_local12 = _arg1;
_arg1 = _arg2;
_arg2 = _local12;
};
var _local3:uint = (Hash(_arg1, _arg2) & b2Pair.b2_tableMask);
var _local4:int = FindHash(_arg1, _arg2, _local3);
var _local5:b2Pair = ((_local4)!=b2Settings.USHRT_MAX) ? m_pairs[_local4] : null;
if (_local5 == null){
return (null);
};
var _local6:* = _local5.userData;
var _local7:uint = m_hashTable[_local3];
var _local8:uint = b2Pair.b2_nullPair;
while (_local7 != _local4) {
_local8 = _local7;
_local7 = m_next[_local7];
};
if (_local8 != b2Pair.b2_nullPair){
m_next[_local8] = m_next[_local4];
} else {
m_hashTable[_local3] = m_next[_local4];
};
var _local9:uint = (m_pairCount - 1);
if (_local9 == _local4){
m_pairCount--;
return (_local6);
};
var _local10:b2Pair = m_pairs[_local9];
var _local11:uint = (Hash(_local10.proxyId1, _local10.proxyId2) & b2Pair.b2_tableMask);
_local7 = m_hashTable[_local11];
_local8 = b2Pair.b2_nullPair;
while (_local7 != _local9) {
_local8 = _local7;
_local7 = m_next[_local7];
};
if (_local8 != b2Pair.b2_nullPair){
m_next[_local8] = m_next[_local9];
} else {
m_hashTable[_local11] = m_next[_local9];
};
m_pairs[_local4].userData = m_pairs[_local9].userData;
m_pairs[_local4].proxyId1 = m_pairs[_local9].proxyId1;
m_pairs[_local4].proxyId2 = m_pairs[_local9].proxyId2;
m_pairs[_local4].status = m_pairs[_local9].status;
m_next[_local4] = m_hashTable[_local11];
m_hashTable[_local11] = _local4;
m_pairCount--;
return (_local6);
}
private function FindHash(_arg1:uint, _arg2:uint, _arg3:uint):int{
var _local4:uint = m_hashTable[_arg3];
while (((!((_local4 == b2Pair.b2_nullPair))) && ((Equals(m_pairs[_local4], _arg1, _arg2) == false)))) {
_local4 = m_next[_local4];
};
if (_local4 == b2Pair.b2_nullPair){
return (b2Settings.USHRT_MAX);
};
return (_local4);
}
public function GetPairs():Array{
return (m_pairs);
}
public function GetCount():int{
return (m_pairCount);
}
public static function Hash(_arg1:uint, _arg2:uint):uint{
var _local3:uint = (((_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 Engine.Collision
Section 26
//b2Proxy (Engine.Collision.b2Proxy)
package Engine.Collision {
public class b2Proxy {
public var categoryBits:uint;
public var overlapCount:uint;
public var lowerBounds:Array;
public var upperBounds:Array;
public var maskBits:uint;
public var groupIndex:int;
public var userData;// = null
public var timeStamp:uint;
public function b2Proxy(){
lowerBounds = [uint(0), uint(0)];
upperBounds = [uint(0), uint(0)];
super();
}
public function GetNext():uint{
return (lowerBounds[0]);
}
public function IsValid():Boolean{
return (!((overlapCount == b2BroadPhase.b2_invalid)));
}
public function SetNext(_arg1:uint){
lowerBounds[0] = (_arg1 & 0xFFFF);
}
}
}//package Engine.Collision
Section 27
//ClipVertex (Engine.Collision.ClipVertex)
package Engine.Collision {
import Engine.Common.Math.*;
public class ClipVertex {
public var id:b2ContactID;
public var v:b2Vec2;
public function ClipVertex(){
v = new b2Vec2();
id = new b2ContactID();
super();
}
}
}//package Engine.Collision
Section 28
//Features (Engine.Collision.Features)
package Engine.Collision {
public class Features {
public var _referenceFace:int;
public var _incidentEdge:int;
public var _flip:int;
public var _incidentVertex:int;
public var _m_id:b2ContactID;
public function get referenceFace():int{
return (_referenceFace);
}
public function set incidentVertex(_arg1:int){
_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 referenceFace(_arg1:int){
_referenceFace = _arg1;
_m_id._key = ((_m_id._key & 4294967040) | (_referenceFace & 0xFF));
}
public function get incidentVertex():int{
return (_incidentVertex);
}
public function set flip(_arg1:int){
_flip = _arg1;
_m_id._key = ((_m_id._key & 0xFFFFFF) | ((_flip << 24) & 4278190080));
}
public function set incidentEdge(_arg1:int){
_incidentEdge = _arg1;
_m_id._key = ((_m_id._key & 4294902015) | ((_incidentEdge << 8) & 0xFF00));
}
}
}//package Engine.Collision
Section 29
//b2Mat22 (Engine.Common.Math.b2Mat22)
package Engine.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(){
col1.x = 1;
col2.x = 0;
col1.y = 0;
col2.y = 1;
}
public function SetVV(_arg1:b2Vec2, _arg2:b2Vec2){
col1.SetV(_arg1);
col2.SetV(_arg2);
}
public function Set(_arg1:Number){
var _local2:Number;
_local2 = Math.cos(_arg1);
var _local3:Number = Math.sin(_arg1);
col1.x = _local2;
col2.x = -(_local3);
col1.y = _local3;
col2.y = _local2;
}
public function SetZero(){
col1.x = 0;
col2.x = 0;
col1.y = 0;
col2.y = 0;
}
public function SetM(_arg1:b2Mat22){
col1.SetV(_arg1.col1);
col2.SetV(_arg1.col2);
}
public function AddM(_arg1:b2Mat22){
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(){
col1.Abs();
col2.Abs();
}
public function Copy():b2Mat22{
return (new b2Mat22(0, col1, col2));
}
public function Invert(_arg1:b2Mat22):b2Mat22{
var _local2:Number;
var _local4:Number;
var _local6:Number;
_local2 = col1.x;
var _local3:Number = col2.x;
_local4 = col1.y;
var _local5:Number = 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 Solve(_arg1:b2Vec2, _arg2:Number, _arg3:Number):b2Vec2{
var _local4:Number = col1.x;
var _local5:Number = col2.x;
var _local6:Number = col1.y;
var _local7:Number = col2.y;
var _local8:Number = ((_local4 * _local7) - (_local5 * _local6));
_local8 = (1 / _local8);
_arg1.x = (_local8 * ((_local7 * _arg2) - (_local5 * _arg3)));
_arg1.y = (_local8 * ((_local4 * _arg3) - (_local6 * _arg2)));
return (_arg1);
}
}
}//package Engine.Common.Math
Section 30
//b2Math (Engine.Common.Math.b2Math)
package Engine.Common.Math {
public class b2Math {
public static function b2CrossVF(_arg1:b2Vec2, _arg2:Number):b2Vec2{
var _local3:b2Vec2 = new b2Vec2((_arg2 * _arg1.y), (-(_arg2) * _arg1.x));
return (_local3);
}
public static function AddVV(_arg1:b2Vec2, _arg2:b2Vec2):b2Vec2{
var _local3:b2Vec2 = new b2Vec2((_arg1.x + _arg2.x), (_arg1.y + _arg2.y));
return (_local3);
}
public static function b2IsValid(_arg1:Number){
return (isFinite(_arg1));
}
public static function b2Swap(_arg1:Array, _arg2:Array){
var _local3:* = _arg1[0];
_arg1[0] = _arg2[0];
_arg2[0] = _local3;
}
public static function b2Abs(_arg1:Number):Number{
return (((_arg1 > 0)) ? _arg1 : -(_arg1));
}
public static function b2AbsM(_arg1:b2Mat22):b2Mat22{
var _local2:b2Mat22 = new b2Mat22(0, b2AbsV(_arg1.col1), b2AbsV(_arg1.col2));
return (_local2);
}
public static function SubtractVV(_arg1:b2Vec2, _arg2:b2Vec2):b2Vec2{
var _local3:b2Vec2 = new b2Vec2((_arg1.x - _arg2.x), (_arg1.y - _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 b2Clamp(_arg1:Number, _arg2:Number, _arg3:Number):Number{
return (b2Max(_arg2, b2Min(_arg1, _arg3)));
}
public static function b2AbsV(_arg1:b2Vec2):b2Vec2{
var _local2:b2Vec2 = new b2Vec2(b2Abs(_arg1.x), b2Abs(_arg1.y));
return (_local2);
}
public static function b2MinV(_arg1:b2Vec2, _arg2:b2Vec2):b2Vec2{
var _local3:b2Vec2 = new b2Vec2(b2Min(_arg1.x, _arg2.x), b2Min(_arg1.y, _arg2.y));
return (_local3);
}
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 = new b2Vec2((-(_arg1) * _arg2.y), (_arg1 * _arg2.x));
return (_local3);
}
public static function AddMM(_arg1:b2Mat22, _arg2:b2Mat22):b2Mat22{
var _local3:b2Mat22 = new b2Mat22(0, AddVV(_arg1.col1, _arg2.col1), AddVV(_arg1.col2, _arg2.col2));
return (_local3);
}
public static function b2MulTMM(_arg1:b2Mat22, _arg2:b2Mat22):b2Mat22{
var _local3:b2Vec2 = new b2Vec2(b2Dot(_arg1.col1, _arg2.col1), b2Dot(_arg1.col2, _arg2.col1));
var _local4:b2Vec2 = new b2Vec2(b2Dot(_arg1.col1, _arg2.col2), b2Dot(_arg1.col2, _arg2.col2));
var _local5:b2Mat22 = new b2Mat22(0, _local3, _local4);
return (_local5);
}
public static function b2MaxV(_arg1:b2Vec2, _arg2:b2Vec2):b2Vec2{
var _local3:b2Vec2 = new b2Vec2(b2Max(_arg1.x, _arg2.x), b2Max(_arg1.y, _arg2.y));
return (_local3);
}
public static function b2IsPowerOfTwo(_arg1:uint):Boolean{
var _local2:Boolean = (((_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 MulFV(_arg1:Number, _arg2:b2Vec2):b2Vec2{
var _local3:b2Vec2 = new b2Vec2((_arg1 * _arg2.x), (_arg1 * _arg2.y));
return (_local3);
}
public static function b2MulTMV(_arg1:b2Mat22, _arg2:b2Vec2):b2Vec2{
var _local3:b2Vec2 = 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 = 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 = 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 Engine.Common.Math
Section 31
//b2Vec2 (Engine.Common.Math.b2Vec2)
package Engine.Common.Math {
public class b2Vec2 {
public var y:Number;
public var x:Number;
public function b2Vec2(_arg1:Number=0, _arg2:Number=0){
x = _arg1;
y = _arg2;
}
public function Add(_arg1:b2Vec2){
x = (x + _arg1.x);
y = (y + _arg1.y);
}
public function Set(_arg1:Number=0, _arg2:Number=0){
x = _arg1;
y = _arg2;
}
public function Multiply(_arg1:Number){
x = (x * _arg1);
y = (y * _arg1);
}
public function Length():Number{
return (Math.sqrt(((x * x) + (y * y))));
}
public function MulM(_arg1:b2Mat22){
var _local2:Number = x;
x = ((_arg1.col1.x * _local2) + (_arg1.col2.x * y));
y = ((_arg1.col1.y * _local2) + (_arg1.col2.y * y));
}
public function SetZero(){
x = 0;
y = 0;
}
public function MinV(_arg1:b2Vec2){
x = ((x < _arg1.x)) ? x : _arg1.x;
y = ((y < _arg1.y)) ? y : _arg1.y;
}
public function Normalize():Number{
var _local1:Number = Length();
if (_local1 < Number.MIN_VALUE){
return (0);
};
var _local2:Number = (1 / _local1);
x = (x * _local2);
y = (y * _local2);
return (_local1);
}
public function CrossVF(_arg1:Number){
var _local2:Number = x;
x = (_arg1 * y);
y = (-(_arg1) * _local2);
}
public function MaxV(_arg1:b2Vec2){
x = ((x > _arg1.x)) ? x : _arg1.x;
y = ((y > _arg1.y)) ? y : _arg1.y;
}
public function SetV(_arg1:b2Vec2){
x = _arg1.x;
y = _arg1.y;
}
public function Negative():b2Vec2{
return (new b2Vec2(-(x), -(y)));
}
public function CrossFV(_arg1:Number){
var _local2:Number = x;
x = (-(_arg1) * y);
y = (_arg1 * _local2);
}
public function Abs(){
x = Math.abs(x);
y = Math.abs(y);
}
public function Subtract(_arg1:b2Vec2){
x = (x - _arg1.x);
y = (y - _arg1.y);
}
public function Copy():b2Vec2{
return (new b2Vec2(x, y));
}
public function MulTM(_arg1:b2Mat22){
var _local2:Number = 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 static function Make(_arg1:Number, _arg2:Number):b2Vec2{
return (new b2Vec2(_arg1, _arg2));
}
}
}//package Engine.Common.Math
Section 32
//b2Settings (Engine.Common.b2Settings)
package Engine.Common {
import Engine.Common.Math.*;
public class b2Settings {
public static const b2_lengthUnitsPerMeter:Number = 1;
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_maxShapesPerBody:int = 64;
public static const b2_maxProxies:int = 0x0400;
public static const b2_velocityThreshold:Number = 1;
public static const b2_timeToSleep:Number = 0.5;
public static const b2_contactBaumgarte:Number = 0.2;
public static const b2_maxPairs:int = 8192;
public static const b2_maxManifoldPoints:int = 2;
public static const b2_maxAngularCorrection:Number = 0.139626340159546;
public static const b2_massUnitsPerKilogram:Number = 1;
public static const USHRT_MAX:int = 0xFFFF;
public static const b2_maxLinearCorrection:Number = 0.2;
public static const b2_maxPolyVertices:int = 8;
public static const b2_timeUnitsPerSecond:Number = 1;
public static function b2Assert(_arg1:Boolean){
var _local2:b2Vec2;
if (!_arg1){
_local2.x++;
};
}
}
}//package Engine.Common
Section 33
//b2CircleContact (Engine.Dynamics.Contacts.b2CircleContact)
package Engine.Dynamics.Contacts {
import Engine.Collision.Shapes.*;
import Engine.Collision.*;
import Engine.Common.Math.*;
import Engine.Dynamics.*;
import Engine.Common.*;
public class b2CircleContact extends b2Contact {
public var m_manifold:Array;
public function b2CircleContact(_arg1:b2Shape, _arg2:b2Shape){
m_manifold = [new b2Manifold()];
super(_arg1, _arg2);
m_manifold[0].pointCount = 0;
m_manifold[0].points[0].normalImpulse = 0;
m_manifold[0].points[0].tangentImpulse = 0;
}
override public function Evaluate(){
b2Collision.b2CollideCircle(m_manifold[0], (m_shape1 as b2CircleShape), (m_shape2 as b2CircleShape));
if (m_manifold[0].pointCount > 0){
m_manifoldCount = 1;
} else {
m_manifoldCount = 0;
};
}
override public function GetManifolds():Array{
return (m_manifold);
}
public static function Destroy(_arg1:b2Contact, _arg2){
}
public static function Create(_arg1:b2Shape, _arg2:b2Shape, _arg3):b2Contact{
return (new b2CircleContact(_arg1, _arg2));
}
}
}//package Engine.Dynamics.Contacts
Section 34
//b2Contact (Engine.Dynamics.Contacts.b2Contact)
package Engine.Dynamics.Contacts {
import Engine.Collision.Shapes.*;
import Engine.Collision.*;
import Engine.Common.Math.*;
import Engine.Dynamics.*;
import Engine.Common.*;
public class b2Contact {
public var m_shape1:b2Shape;
public var m_shape2:b2Shape;
public var m_next:b2Contact;
public var m_prev:b2Contact;
public var m_friction:Number;
public var m_manifoldCount:int;
public var m_node1:b2ContactNode;
public var m_node2:b2ContactNode;
public var m_restitution:Number;
public var m_flags:uint;
public static var s_registers:Array;
public static var s_initialized:Boolean = false;
public static var e_islandFlag:uint = 1;
public static var e_destroyFlag:uint = 2;
public function b2Contact(_arg1:b2Shape=null, _arg2:b2Shape=null){
m_node1 = new b2ContactNode();
m_node2 = new b2ContactNode();
super();
m_flags = 0;
if (((!(_arg1)) || (!(_arg2)))){
m_shape1 = null;
m_shape2 = null;
return;
};
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 GetShape2():b2Shape{
return (m_shape2);
}
public function GetManifoldCount():int{
return (m_manifoldCount);
}
public function GetNext():b2Contact{
return (m_next);
}
public function GetManifolds():Array{
return (null);
}
public function Evaluate(){
}
public static function InitializeRegisters(){
var _local2:int;
s_registers = new Array(b2Shape.e_shapeTypeCount);
var _local1:int;
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_polyShape, b2Shape.e_circleShape);
AddType(b2PolyContact.Create, b2PolyContact.Destroy, b2Shape.e_polyShape, b2Shape.e_polyShape);
}
public static function Destroy(_arg1:b2Contact, _arg2){
if (_arg1.GetManifoldCount() > 0){
_arg1.m_shape1.m_body.WakeUp();
_arg1.m_shape2.m_body.WakeUp();
};
var _local3:int = _arg1.m_shape1.m_type;
var _local4:int = _arg1.m_shape2.m_type;
var _local5:* = s_registers[_local3][_local4].destroyFcn;
_local5(_arg1, _arg2);
}
public static function AddType(_arg1, _arg2, _arg3:int, _arg4:int){
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 _local7:b2Contact;
var _local8:int;
var _local9:b2Manifold;
if (s_initialized == false){
InitializeRegisters();
s_initialized = true;
};
var _local4:int = _arg1.m_type;
var _local5:int = _arg2.m_type;
var _local6:* = s_registers[_local4][_local5].createFcn;
if (_local6){
if (s_registers[_local4][_local5].primary){
return (_local6(_arg1, _arg2, _arg3));
};
_local7 = _local6(_arg2, _arg1, _arg3);
_local8 = 0;
while (_local8 < _local7.GetManifoldCount()) {
_local9 = _local7.GetManifolds()[_local8];
_local7.GetManifolds()[_local8].normal = _local9.normal.Negative();
_local8++;
};
return (_local7);
//unresolved jump
};
return (null);
}
}
}//package Engine.Dynamics.Contacts
Section 35
//b2ContactConstraint (Engine.Dynamics.Contacts.b2ContactConstraint)
package Engine.Dynamics.Contacts {
import Engine.Collision.*;
import Engine.Common.Math.*;
import Engine.Dynamics.*;
import Engine.Common.*;
public class b2ContactConstraint {
public var points:Array;
public var normal:b2Vec2;
public var restitution:Number;
public var body1:b2Body;
public var manifold:b2Manifold;
public var body2:b2Body;
public var friction:Number;
public var pointCount:int;
public function b2ContactConstraint(){
normal = new b2Vec2();
super();
points = new Array(b2Settings.b2_maxManifoldPoints);
var _local1:int;
while (_local1 < b2Settings.b2_maxManifoldPoints) {
points[_local1] = new b2ContactConstraintPoint();
_local1++;
};
}
}
}//package Engine.Dynamics.Contacts
Section 36
//b2ContactConstraintPoint (Engine.Dynamics.Contacts.b2ContactConstraintPoint)
package Engine.Dynamics.Contacts {
import Engine.Common.Math.*;
public class b2ContactConstraintPoint {
public var separation:Number;
public var positionImpulse:Number;
public var normalImpulse:Number;
public var tangentImpulse:Number;
public var localAnchor1:b2Vec2;
public var localAnchor2:b2Vec2;
public var tangentMass:Number;
public var normalMass:Number;
public var velocityBias:Number;
public function b2ContactConstraintPoint(){
localAnchor1 = new b2Vec2();
localAnchor2 = new b2Vec2();
super();
}
}
}//package Engine.Dynamics.Contacts
Section 37
//b2ContactNode (Engine.Dynamics.Contacts.b2ContactNode)
package Engine.Dynamics.Contacts {
import Engine.Dynamics.*;
public class b2ContactNode {
public var other:b2Body;
public var prev:b2ContactNode;
public var contact:b2Contact;
public var next:b2ContactNode;
}
}//package Engine.Dynamics.Contacts
Section 38
//b2ContactRegister (Engine.Dynamics.Contacts.b2ContactRegister)
package Engine.Dynamics.Contacts {
public class b2ContactRegister {
public var primary:Boolean;
public var createFcn;
public var destroyFcn;
}
}//package Engine.Dynamics.Contacts
Section 39
//b2ContactSolver (Engine.Dynamics.Contacts.b2ContactSolver)
package Engine.Dynamics.Contacts {
import Engine.Collision.*;
import Engine.Common.Math.*;
import Engine.Dynamics.*;
import Engine.Common.*;
public class b2ContactSolver {
public var m_constraintCount:int;
public var m_constraints:Array;
public var m_allocator;
public function b2ContactSolver(_arg1:Array, _arg2:int, _arg3){
var _local4:int;
var _local5:b2Vec2;
var _local6:b2Mat22;
var _local8:b2Contact;
var _local9:b2Body;
var _local10:b2Body;
var _local11:int;
var _local12:Array;
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:int;
var _local22:b2Manifold;
var _local23:Number;
var _local24:Number;
var _local25:b2ContactConstraint;
var _local26:*;
var _local27:b2ContactPoint;
var _local28:b2ContactConstraintPoint;
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;
var _local42:Number;
var _local43:Number;
var _local44:Number;
var _local45:Number;
m_constraints = new Array();
super();
m_allocator = _arg3;
m_constraintCount = 0;
_local4 = 0;
while (_local4 < _arg2) {
m_constraintCount = (m_constraintCount + _arg1[_local4].GetManifoldCount());
_local4++;
};
_local4 = 0;
while (_local4 < m_constraintCount) {
m_constraints[_local4] = new b2ContactConstraint();
_local4++;
};
var _local7:int;
_local4 = 0;
while (_local4 < _arg2) {
_local8 = _arg1[_local4];
_local9 = _local8.m_shape1.m_body;
_local10 = _local8.m_shape2.m_body;
_local11 = _local8.GetManifoldCount();
_local12 = _local8.GetManifolds();
_local13 = _local8.m_friction;
_local14 = _local8.m_restitution;
_local15 = _local9.m_linearVelocity.x;
_local16 = _local9.m_linearVelocity.y;
_local17 = _local10.m_linearVelocity.x;
_local18 = _local10.m_linearVelocity.y;
_local19 = _local9.m_angularVelocity;
_local20 = _local10.m_angularVelocity;
_local21 = 0;
while (_local21 < _local11) {
_local22 = _local12[_local21];
_local23 = _local22.normal.x;
_local24 = _local22.normal.y;
_local25 = m_constraints[_local7];
_local25.body1 = _local9;
_local25.body2 = _local10;
_local25.manifold = _local22;
_local25.normal.x = _local23;
_local25.normal.y = _local24;
_local25.pointCount = _local22.pointCount;
_local25.friction = _local13;
_local25.restitution = _local14;
_local26 = 0;
while (_local26 < _local25.pointCount) {
_local27 = _local22.points[_local26];
_local28 = _local25.points[_local26];
_local28.normalImpulse = _local27.normalImpulse;
_local28.tangentImpulse = _local27.tangentImpulse;
_local28.separation = _local27.separation;
_local29 = (_local27.position.x - _local9.m_position.x);
_local30 = (_local27.position.y - _local9.m_position.y);
_local31 = (_local27.position.x - _local10.m_position.x);
_local32 = (_local27.position.y - _local10.m_position.y);
_local5 = _local28.localAnchor1;
_local6 = _local9.m_R;
_local5.x = ((_local29 * _local6.col1.x) + (_local30 * _local6.col1.y));
_local5.y = ((_local29 * _local6.col2.x) + (_local30 * _local6.col2.y));
_local5 = _local28.localAnchor2;
_local6 = _local10.m_R;
_local5.x = ((_local31 * _local6.col1.x) + (_local32 * _local6.col1.y));
_local5.y = ((_local31 * _local6.col2.x) + (_local32 * _local6.col2.y));
_local33 = ((_local29 * _local29) + (_local30 * _local30));
_local34 = ((_local31 * _local31) + (_local32 * _local32));
_local35 = ((_local29 * _local23) + (_local30 * _local24));
_local36 = ((_local31 * _local23) + (_local32 * _local24));
_local37 = (_local9.m_invMass + _local10.m_invMass);
_local37 = (_local37 + ((_local9.m_invI * (_local33 - (_local35 * _local35))) + (_local10.m_invI * (_local34 - (_local36 * _local36)))));
_local28.normalMass = (1 / _local37);
_local38 = _local24;
_local39 = -(_local23);
_local40 = ((_local29 * _local38) + (_local30 * _local39));
_local41 = ((_local31 * _local38) + (_local32 * _local39));
_local42 = (_local9.m_invMass + _local10.m_invMass);
_local42 = (_local42 + ((_local9.m_invI * (_local33 - (_local40 * _local40))) + (_local10.m_invI * (_local34 - (_local41 * _local41)))));
_local28.tangentMass = (1 / _local42);
_local43 = (((_local17 + (-(_local20) * _local32)) - _local15) - (-(_local19) * _local30));
_local44 = (((_local18 + (_local20 * _local31)) - _local16) - (_local19 * _local29));
_local45 = ((_local25.normal.x * _local43) + (_local25.normal.y * _local44));
if (_local45 < -(b2Settings.b2_velocityThreshold)){
_local28.velocityBias = (-(_local25.restitution) * _local45);
} else {
_local28.velocityBias = 0;
};
_local26++;
};
_local7++;
_local21++;
};
_local4++;
};
}
public function SolveVelocityConstraints(){
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:b2Mat22;
var _local14:b2Vec2;
var _local16:b2ContactConstraint;
var _local17:b2Body;
var _local18:b2Body;
var _local19:Number;
var _local20:b2Vec2;
var _local21:Number;
var _local22:b2Vec2;
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:int;
var _local32:Number;
var _local33:Number;
var _local34:Number;
var _local15:int;
while (_local15 < m_constraintCount) {
_local16 = m_constraints[_local15];
_local17 = _local16.body1;
_local18 = _local16.body2;
_local19 = _local17.m_angularVelocity;
_local20 = _local17.m_linearVelocity;
_local21 = _local18.m_angularVelocity;
_local22 = _local18.m_linearVelocity;
_local23 = _local17.m_invMass;
_local24 = _local17.m_invI;
_local25 = _local18.m_invMass;
_local26 = _local18.m_invI;
_local27 = _local16.normal.x;
_local28 = _local16.normal.y;
_local29 = _local28;
_local30 = -(_local27);
_local31 = _local16.pointCount;
_local1 = 0;
while (_local1 < _local31) {
_local2 = _local16.points[_local1];
_local13 = _local17.m_R;
_local14 = _local2.localAnchor1;
_local3 = ((_local13.col1.x * _local14.x) + (_local13.col2.x * _local14.y));
_local4 = ((_local13.col1.y * _local14.x) + (_local13.col2.y * _local14.y));
_local13 = _local18.m_R;
_local14 = _local2.localAnchor2;
_local5 = ((_local13.col1.x * _local14.x) + (_local13.col2.x * _local14.y));
_local6 = ((_local13.col1.y * _local14.x) + (_local13.col2.y * _local14.y));
_local7 = (((_local22.x + (-(_local21) * _local6)) - _local20.x) - (-(_local19) * _local4));
_local8 = (((_local22.y + (_local21 * _local5)) - _local20.y) - (_local19 * _local3));
_local32 = ((_local7 * _local27) + (_local8 * _local28));
_local9 = (-(_local2.normalMass) * (_local32 - _local2.velocityBias));
_local10 = b2Math.b2Max((_local2.normalImpulse + _local9), 0);
_local9 = (_local10 - _local2.normalImpulse);
_local11 = (_local9 * _local27);
_local12 = (_local9 * _local28);
_local20.x = (_local20.x - (_local23 * _local11));
_local20.y = (_local20.y - (_local23 * _local12));
_local19 = (_local19 - (_local24 * ((_local3 * _local12) - (_local4 * _local11))));
_local22.x = (_local22.x + (_local25 * _local11));
_local22.y = (_local22.y + (_local25 * _local12));
_local21 = (_local21 + (_local26 * ((_local5 * _local12) - (_local6 * _local11))));
_local2.normalImpulse = _local10;
_local7 = (((_local22.x + (-(_local21) * _local6)) - _local20.x) - (-(_local19) * _local4));
_local8 = (((_local22.y + (_local21 * _local5)) - _local20.y) - (_local19 * _local3));
_local33 = ((_local7 * _local29) + (_local8 * _local30));
_local9 = (_local2.tangentMass * -(_local33));
_local34 = (_local16.friction * _local2.normalImpulse);
_local10 = b2Math.b2Clamp((_local2.tangentImpulse + _local9), -(_local34), _local34);
_local9 = (_local10 - _local2.tangentImpulse);
_local11 = (_local9 * _local29);
_local12 = (_local9 * _local30);
_local20.x = (_local20.x - (_local23 * _local11));
_local20.y = (_local20.y - (_local23 * _local12));
_local19 = (_local19 - (_local24 * ((_local3 * _local12) - (_local4 * _local11))));
_local22.x = (_local22.x + (_local25 * _local11));
_local22.y = (_local22.y + (_local25 * _local12));
_local21 = (_local21 + (_local26 * ((_local5 * _local12) - (_local6 * _local11))));
_local2.tangentImpulse = _local10;
_local1++;
};
_local17.m_angularVelocity = _local19;
_local18.m_angularVelocity = _local21;
_local15++;
};
}
public function PreSolve(){
var _local1:b2Vec2;
var _local2:b2Vec2;
var _local3:b2Mat22;
var _local5:b2ContactConstraint;
var _local6:b2Body;
var _local7:b2Body;
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:int;
var _local17:int;
var _local18:b2ContactConstraintPoint;
var _local19:Number;
var _local20:Number;
var _local21:Number;
var _local22:Number;
var _local23:Number;
var _local24:Number;
var _local25:b2ContactConstraintPoint;
var _local4:int;
while (_local4 < m_constraintCount) {
_local5 = m_constraints[_local4];
_local6 = _local5.body1;
_local7 = _local5.body2;
_local8 = _local6.m_invMass;
_local9 = _local6.m_invI;
_local10 = _local7.m_invMass;
_local11 = _local7.m_invI;
_local12 = _local5.normal.x;
_local13 = _local5.normal.y;
_local14 = _local13;
_local15 = -(_local12);
if (b2World.s_enableWarmStarting){
_local17 = _local5.pointCount;
_local16 = 0;
while (_local16 < _local17) {
_local18 = _local5.points[_local16];
_local19 = ((_local18.normalImpulse * _local12) + (_local18.tangentImpulse * _local14));
_local20 = ((_local18.normalImpulse * _local13) + (_local18.tangentImpulse * _local15));
_local3 = _local6.m_R;
_local1 = _local18.localAnchor1;
_local21 = ((_local3.col1.x * _local1.x) + (_local3.col2.x * _local1.y));
_local22 = ((_local3.col1.y * _local1.x) + (_local3.col2.y * _local1.y));
_local3 = _local7.m_R;
_local1 = _local18.localAnchor2;
_local23 = ((_local3.col1.x * _local1.x) + (_local3.col2.x * _local1.y));
_local24 = ((_local3.col1.y * _local1.x) + (_local3.col2.y * _local1.y));
_local6.m_angularVelocity = (_local6.m_angularVelocity - (_local9 * ((_local21 * _local20) - (_local22 * _local19))));
_local6.m_linearVelocity.x = (_local6.m_linearVelocity.x - (_local8 * _local19));
_local6.m_linearVelocity.y = (_local6.m_linearVelocity.y - (_local8 * _local20));
_local7.m_angularVelocity = (_local7.m_angularVelocity + (_local11 * ((_local23 * _local20) - (_local24 * _local19))));
_local7.m_linearVelocity.x = (_local7.m_linearVelocity.x + (_local10 * _local19));
_local7.m_linearVelocity.y = (_local7.m_linearVelocity.y + (_local10 * _local20));
_local18.positionImpulse = 0;
_local16++;
};
} else {
_local17 = _local5.pointCount;
_local16 = 0;
while (_local16 < _local17) {
_local25 = _local5.points[_local16];
_local25.normalImpulse = 0;
_local25.tangentImpulse = 0;
_local25.positionImpulse = 0;
_local16++;
};
};
_local4++;
};
}
public function SolvePositionConstraints(_arg1:Number):Boolean{
var _local3:b2Mat22;
var _local4:b2Vec2;
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:Number;
var _local20:Number;
var _local21:int;
var _local22:int;
var _local23:b2ContactConstraintPoint;
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 _local2:Number = 0;
var _local5:int;
while (_local5 < m_constraintCount) {
_local6 = m_constraints[_local5];
_local7 = _local6.body1;
_local8 = _local6.body2;
_local9 = _local7.m_position;
_local10 = _local7.m_rotation;
_local11 = _local8.m_position;
_local12 = _local8.m_rotation;
_local13 = _local7.m_invMass;
_local14 = _local7.m_invI;
_local15 = _local8.m_invMass;
_local16 = _local8.m_invI;
_local17 = _local6.normal.x;
_local18 = _local6.normal.y;
_local19 = _local18;
_local20 = -(_local17);
_local21 = _local6.pointCount;
_local22 = 0;
while (_local22 < _local21) {
_local23 = _local6.points[_local22];
_local3 = _local7.m_R;
_local4 = _local23.localAnchor1;
_local24 = ((_local3.col1.x * _local4.x) + (_local3.col2.x * _local4.y));
_local25 = ((_local3.col1.y * _local4.x) + (_local3.col2.y * _local4.y));
_local3 = _local8.m_R;
_local4 = _local23.localAnchor2;
_local26 = ((_local3.col1.x * _local4.x) + (_local3.col2.x * _local4.y));
_local27 = ((_local3.col1.y * _local4.x) + (_local3.col2.y * _local4.y));
_local28 = (_local9.x + _local24);
_local29 = (_local9.y + _local25);
_local30 = (_local11.x + _local26);
_local31 = (_local11.y + _local27);
_local32 = (_local30 - _local28);
_local33 = (_local31 - _local29);
_local34 = (((_local32 * _local17) + (_local33 * _local18)) + _local23.separation);
_local2 = b2Math.b2Min(_local2, _local34);
_local35 = (_arg1 * b2Math.b2Clamp((_local34 + b2Settings.b2_linearSlop), -(b2Settings.b2_maxLinearCorrection), 0));
_local36 = (-(_local23.normalMass) * _local35);
_local37 = _local23.positionImpulse;
_local23.positionImpulse = b2Math.b2Max((_local37 + _local36), 0);
_local36 = (_local23.positionImpulse - _local37);
_local38 = (_local36 * _local17);
_local39 = (_local36 * _local18);
_local9.x = (_local9.x - (_local13 * _local38));
_local9.y = (_local9.y - (_local13 * _local39));
_local10 = (_local10 - (_local14 * ((_local24 * _local39) - (_local25 * _local38))));
_local7.m_R.Set(_local10);
_local11.x = (_local11.x + (_local15 * _local38));
_local11.y = (_local11.y + (_local15 * _local39));
_local12 = (_local12 + (_local16 * ((_local26 * _local39) - (_local27 * _local38))));
_local8.m_R.Set(_local12);
_local22++;
};
_local7.m_rotation = _local10;
_local8.m_rotation = _local12;
_local5++;
};
return ((_local2 >= -(b2Settings.b2_linearSlop)));
}
public function PostSolve(){
var _local2:b2ContactConstraint;
var _local3:b2Manifold;
var _local4:int;
var _local5:b2ContactPoint;
var _local6:b2ContactConstraintPoint;
var _local1:int;
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 Engine.Dynamics.Contacts
Section 40
//b2NullContact (Engine.Dynamics.Contacts.b2NullContact)
package Engine.Dynamics.Contacts {
public class b2NullContact extends b2Contact {
override public function Evaluate(){
}
override public function GetManifolds():Array{
return (null);
}
}
}//package Engine.Dynamics.Contacts
Section 41
//b2PolyAndCircleContact (Engine.Dynamics.Contacts.b2PolyAndCircleContact)
package Engine.Dynamics.Contacts {
import Engine.Collision.Shapes.*;
import Engine.Collision.*;
import Engine.Common.Math.*;
import Engine.Dynamics.*;
import Engine.Common.*;
public class b2PolyAndCircleContact extends b2Contact {
public var m_manifold:Array;
public function b2PolyAndCircleContact(_arg1:b2Shape, _arg2:b2Shape){
m_manifold = [new b2Manifold()];
super(_arg1, _arg2);
b2Settings.b2Assert((m_shape1.m_type == b2Shape.e_polyShape));
b2Settings.b2Assert((m_shape2.m_type == b2Shape.e_circleShape));
m_manifold[0].pointCount = 0;
m_manifold[0].points[0].normalImpulse = 0;
m_manifold[0].points[0].tangentImpulse = 0;
}
override public function Evaluate(){
b2Collision.b2CollidePolyAndCircle(m_manifold[0], (m_shape1 as b2PolyShape), (m_shape2 as b2CircleShape));
if (m_manifold[0].pointCount > 0){
m_manifoldCount = 1;
} else {
m_manifoldCount = 0;
};
}
override public function GetManifolds():Array{
return (m_manifold);
}
public static function Destroy(_arg1:b2Contact, _arg2){
}
public static function Create(_arg1:b2Shape, _arg2:b2Shape, _arg3):b2Contact{
return (new b2PolyAndCircleContact(_arg1, _arg2));
}
}
}//package Engine.Dynamics.Contacts
Section 42
//b2PolyContact (Engine.Dynamics.Contacts.b2PolyContact)
package Engine.Dynamics.Contacts {
import Engine.Collision.Shapes.*;
import Engine.Collision.*;
import Engine.Common.Math.*;
import Engine.Dynamics.*;
import Engine.Common.*;
public class b2PolyContact extends b2Contact {
public var m_manifold:Array;
private var m0:b2Manifold;
public function b2PolyContact(_arg1:b2Shape, _arg2:b2Shape){
m0 = new b2Manifold();
m_manifold = [new b2Manifold()];
super(_arg1, _arg2);
m_manifold[0].pointCount = 0;
}
override public function Evaluate(){
var _local4:b2ContactPoint;
var _local5:b2ContactPoint;
var _local6:Array;
var _local7:int;
var _local8:b2ContactPoint;
var _local9:uint;
var _local10:int;
var _local11:b2ContactPoint;
var _local12:b2ContactID;
var _local1:b2Manifold = m_manifold[0];
var _local2:Array = m0.points;
var _local3:int;
while (_local3 < _local1.pointCount) {
_local4 = _local2[_local3];
_local5 = _local1.points[_local3];
_local4.normalImpulse = _local5.normalImpulse;
_local4.tangentImpulse = _local5.tangentImpulse;
_local4.id = _local5.id.Copy();
_local3++;
};
m0.pointCount = _local1.pointCount;
b2Collision.b2CollidePoly(_local1, (m_shape1 as b2PolyShape), (m_shape2 as b2PolyShape));
if (_local1.pointCount > 0){
_local6 = [false, false];
_local7 = 0;
while (_local7 < _local1.pointCount) {
_local8 = _local1.points[_local7];
_local8.normalImpulse = 0;
_local8.tangentImpulse = 0;
_local9 = _local8.id.key;
_local10 = 0;
while (_local10 < m0.pointCount) {
if (_local6[_local10] == true){
} else {
_local11 = m0.points[_local10];
_local12 = _local11.id;
if (_local12.key == _local9){
_local6[_local10] = true;
_local8.normalImpulse = _local11.normalImpulse;
_local8.tangentImpulse = _local11.tangentImpulse;
break;
};
};
_local10++;
};
_local7++;
};
m_manifoldCount = 1;
} else {
m_manifoldCount = 0;
};
}
override public function GetManifolds():Array{
return (m_manifold);
}
public static function Destroy(_arg1:b2Contact, _arg2){
}
public static function Create(_arg1:b2Shape, _arg2:b2Shape, _arg3):b2Contact{
return (new b2PolyContact(_arg1, _arg2));
}
}
}//package Engine.Dynamics.Contacts
Section 43
//b2DistanceJoint (Engine.Dynamics.Joints.b2DistanceJoint)
package Engine.Dynamics.Joints {
import Engine.Common.Math.*;
import Engine.Dynamics.*;
import Engine.Common.*;
public class b2DistanceJoint extends b2Joint {
public var m_localAnchor1:b2Vec2;
public var m_localAnchor2:b2Vec2;
public var m_u:b2Vec2;
public var m_impulse:Number;
public var m_length:Number;
public var m_mass: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);
_local2 = m_body1.m_R;
_local3 = (_arg1.anchorPoint1.x - m_body1.m_position.x);
_local4 = (_arg1.anchorPoint1.y - m_body1.m_position.y);
m_localAnchor1.x = ((_local3 * _local2.col1.x) + (_local4 * _local2.col1.y));
m_localAnchor1.y = ((_local3 * _local2.col2.x) + (_local4 * _local2.col2.y));
_local2 = m_body2.m_R;
_local3 = (_arg1.anchorPoint2.x - m_body2.m_position.x);
_local4 = (_arg1.anchorPoint2.y - m_body2.m_position.y);
m_localAnchor2.x = ((_local3 * _local2.col1.x) + (_local4 * _local2.col1.y));
m_localAnchor2.y = ((_local3 * _local2.col2.x) + (_local4 * _local2.col2.y));
_local3 = (_arg1.anchorPoint2.x - _arg1.anchorPoint1.x);
_local4 = (_arg1.anchorPoint2.y - _arg1.anchorPoint1.y);
m_length = Math.sqrt(((_local3 * _local3) + (_local4 * _local4)));
m_impulse = 0;
}
override public function GetAnchor1():b2Vec2{
return (b2Math.AddVV(m_body1.m_position, b2Math.b2MulMV(m_body1.m_R, m_localAnchor1)));
}
override public function GetAnchor2():b2Vec2{
return (b2Math.AddVV(m_body2.m_position, b2Math.b2MulMV(m_body2.m_R, m_localAnchor2)));
}
override public function GetReactionTorque(_arg1:Number):Number{
return (0);
}
override public function GetReactionForce(_arg1:Number):b2Vec2{
var _local2:b2Vec2 = new b2Vec2();
_local2.SetV(m_u);
_local2.Multiply((m_impulse * _arg1));
return (_local2);
}
override public function SolvePositionConstraints():Boolean{
var _local1:b2Mat22;
_local1 = m_body1.m_R;
var _local2:Number = ((_local1.col1.x * m_localAnchor1.x) + (_local1.col2.x * m_localAnchor1.y));
var _local3:Number = ((_local1.col1.y * m_localAnchor1.x) + (_local1.col2.y * m_localAnchor1.y));
_local1 = m_body2.m_R;
var _local4:Number = ((_local1.col1.x * m_localAnchor2.x) + (_local1.col2.x * m_localAnchor2.y));
var _local5:Number = ((_local1.col1.y * m_localAnchor2.x) + (_local1.col2.y * m_localAnchor2.y));
var _local6:Number = (((m_body2.m_position.x + _local4) - m_body1.m_position.x) - _local2);
var _local7:Number = (((m_body2.m_position.y + _local5) - m_body1.m_position.y) - _local3);
var _local8:Number = Math.sqrt(((_local6 * _local6) + (_local7 * _local7)));
_local6 = (_local6 / _local8);
_local7 = (_local7 / _local8);
var _local9:Number = (_local8 - m_length);
_local9 = b2Math.b2Clamp(_local9, -(b2Settings.b2_maxLinearCorrection), b2Settings.b2_maxLinearCorrection);
var _local10:Number = (-(m_mass) * _local9);
m_u.Set(_local6, _local7);
var _local11:Number = (_local10 * m_u.x);
var _local12:Number = (_local10 * m_u.y);
m_body1.m_position.x = (m_body1.m_position.x - (m_body1.m_invMass * _local11));
m_body1.m_position.y = (m_body1.m_position.y - (m_body1.m_invMass * _local12));
m_body1.m_rotation = (m_body1.m_rotation - (m_body1.m_invI * ((_local2 * _local12) - (_local3 * _local11))));
m_body2.m_position.x = (m_body2.m_position.x + (m_body2.m_invMass * _local11));
m_body2.m_position.y = (m_body2.m_position.y + (m_body2.m_invMass * _local12));
m_body2.m_rotation = (m_body2.m_rotation + (m_body2.m_invI * ((_local4 * _local12) - (_local5 * _local11))));
m_body1.m_R.Set(m_body1.m_rotation);
m_body2.m_R.Set(m_body2.m_rotation);
return ((b2Math.b2Abs(_local9) < b2Settings.b2_linearSlop));
}
override public function PrepareVelocitySolver(){
var _local1:b2Mat22;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local9:Number;
var _local10:Number;
_local1 = m_body1.m_R;
_local2 = ((_local1.col1.x * m_localAnchor1.x) + (_local1.col2.x * m_localAnchor1.y));
_local3 = ((_local1.col1.y * m_localAnchor1.x) + (_local1.col2.y * m_localAnchor1.y));
_local1 = m_body2.m_R;
_local4 = ((_local1.col1.x * m_localAnchor2.x) + (_local1.col2.x * m_localAnchor2.y));
_local5 = ((_local1.col1.y * m_localAnchor2.x) + (_local1.col2.y * m_localAnchor2.y));
m_u.x = (((m_body2.m_position.x + _local4) - m_body1.m_position.x) - _local2);
m_u.y = (((m_body2.m_position.y + _local5) - m_body1.m_position.y) - _local3);
var _local6:Number = Math.sqrt(((m_u.x * m_u.x) + (m_u.y * m_u.y)));
if (_local6 > b2Settings.b2_linearSlop){
m_u.Multiply((1 / _local6));
} else {
m_u.SetZero();
};
var _local7:Number = ((_local2 * m_u.y) - (_local3 * m_u.x));
var _local8:Number = ((_local4 * m_u.y) - (_local5 * m_u.x));
m_mass = (((m_body1.m_invMass + ((m_body1.m_invI * _local7) * _local7)) + m_body2.m_invMass) + ((m_body2.m_invI * _local8) * _local8));
m_mass = (1 / m_mass);
if (b2World.s_enableWarmStarting){
_local9 = (m_impulse * m_u.x);
_local10 = (m_impulse * m_u.y);
m_body1.m_linearVelocity.x = (m_body1.m_linearVelocity.x - (m_body1.m_invMass * _local9));
m_body1.m_linearVelocity.y = (m_body1.m_linearVelocity.y - (m_body1.m_invMass * _local10));
m_body1.m_angularVelocity = (m_body1.m_angularVelocity - (m_body1.m_invI * ((_local2 * _local10) - (_local3 * _local9))));
m_body2.m_linearVelocity.x = (m_body2.m_linearVelocity.x + (m_body2.m_invMass * _local9));
m_body2.m_linearVelocity.y = (m_body2.m_linearVelocity.y + (m_body2.m_invMass * _local10));
m_body2.m_angularVelocity = (m_body2.m_angularVelocity + (m_body2.m_invI * ((_local4 * _local10) - (_local5 * _local9))));
} else {
m_impulse = 0;
};
}
override public function SolveVelocityConstraints(_arg1:b2StepInfo){
var _local2:b2Mat22;
var _local14:Number;
_local2 = m_body1.m_R;
var _local3:Number = ((_local2.col1.x * m_localAnchor1.x) + (_local2.col2.x * m_localAnchor1.y));
var _local4:Number = ((_local2.col1.y * m_localAnchor1.x) + (_local2.col2.y * m_localAnchor1.y));
_local2 = m_body2.m_R;
var _local5:Number = ((_local2.col1.x * m_localAnchor2.x) + (_local2.col2.x * m_localAnchor2.y));
var _local6:Number = ((_local2.col1.y * m_localAnchor2.x) + (_local2.col2.y * m_localAnchor2.y));
var _local7:Number = (m_body1.m_linearVelocity.x + (-(m_body1.m_angularVelocity) * _local4));
var _local8:Number = (m_body1.m_linearVelocity.y + (m_body1.m_angularVelocity * _local3));
var _local9:Number = (m_body2.m_linearVelocity.x + (-(m_body2.m_angularVelocity) * _local6));
var _local10:Number = (m_body2.m_linearVelocity.y + (m_body2.m_angularVelocity * _local5));
var _local11:Number = ((m_u.x * (_local9 - _local7)) + (m_u.y * (_local10 - _local8)));
var _local12:Number = (-(m_mass) * _local11);
m_impulse = (m_impulse + _local12);
var _local13:Number = (_local12 * m_u.x);
_local14 = (_local12 * m_u.y);
m_body1.m_linearVelocity.x = (m_body1.m_linearVelocity.x - (m_body1.m_invMass * _local13));
m_body1.m_linearVelocity.y = (m_body1.m_linearVelocity.y - (m_body1.m_invMass * _local14));
m_body1.m_angularVelocity = (m_body1.m_angularVelocity - (m_body1.m_invI * ((_local3 * _local14) - (_local4 * _local13))));
m_body2.m_linearVelocity.x = (m_body2.m_linearVelocity.x + (m_body2.m_invMass * _local13));
m_body2.m_linearVelocity.y = (m_body2.m_linearVelocity.y + (m_body2.m_invMass * _local14));
m_body2.m_angularVelocity = (m_body2.m_angularVelocity + (m_body2.m_invI * ((_local5 * _local14) - (_local6 * _local13))));
}
}
}//package Engine.Dynamics.Joints
Section 44
//b2DistanceJointDef (Engine.Dynamics.Joints.b2DistanceJointDef)
package Engine.Dynamics.Joints {
import Engine.Common.Math.*;
public class b2DistanceJointDef extends b2JointDef {
public var anchorPoint1:b2Vec2;
public var anchorPoint2:b2Vec2;
public function b2DistanceJointDef(){
anchorPoint1 = new b2Vec2();
anchorPoint2 = new b2Vec2();
super();
type = b2Joint.e_distanceJoint;
}
}
}//package Engine.Dynamics.Joints
Section 45
//b2GearJoint (Engine.Dynamics.Joints.b2GearJoint)
package Engine.Dynamics.Joints {
import Engine.Common.Math.*;
import Engine.Dynamics.*;
import Engine.Common.*;
public class b2GearJoint extends b2Joint {
public var m_ground2:b2Body;
public var m_groundAnchor1:b2Vec2;
public var m_groundAnchor2:b2Vec2;
public var m_revolute2:b2RevoluteJoint;
public var m_localAnchor1:b2Vec2;
public var m_localAnchor2:b2Vec2;
public var m_ratio:Number;
public var m_mass:Number;
public var m_impulse:Number;
public var m_prismatic2:b2PrismaticJoint;
public var m_ground1:b2Body;
public var m_revolute1:b2RevoluteJoint;
public var m_prismatic1:b2PrismaticJoint;
public var m_constant:Number;
public var m_J:b2Jacobian;
public function b2GearJoint(_arg1:b2GearJointDef){
var _local2:Number;
var _local3:Number;
m_groundAnchor1 = new b2Vec2();
m_groundAnchor2 = new b2Vec2();
m_localAnchor1 = new b2Vec2();
m_localAnchor2 = new b2Vec2();
m_J = new b2Jacobian();
super(_arg1);
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 (_arg1.joint1.m_type == b2Joint.e_revoluteJoint){
m_revolute1 = (_arg1.joint1 as b2RevoluteJoint);
m_groundAnchor1.SetV(m_revolute1.m_localAnchor1);
m_localAnchor1.SetV(m_revolute1.m_localAnchor2);
_local2 = m_revolute1.GetJointAngle();
} else {
m_prismatic1 = (_arg1.joint1 as b2PrismaticJoint);
m_groundAnchor1.SetV(m_prismatic1.m_localAnchor1);
m_localAnchor1.SetV(m_prismatic1.m_localAnchor2);
_local2 = m_prismatic1.GetJointTranslation();
};
m_ground2 = _arg1.joint2.m_body1;
m_body2 = _arg1.joint2.m_body2;
if (_arg1.joint2.m_type == b2Joint.e_revoluteJoint){
m_revolute2 = (_arg1.joint2 as b2RevoluteJoint);
m_groundAnchor2.SetV(m_revolute2.m_localAnchor1);
m_localAnchor2.SetV(m_revolute2.m_localAnchor2);
_local3 = m_revolute2.GetJointAngle();
} else {
m_prismatic2 = (_arg1.joint2 as b2PrismaticJoint);
m_groundAnchor2.SetV(m_prismatic2.m_localAnchor1);
m_localAnchor2.SetV(m_prismatic2.m_localAnchor2);
_local3 = m_prismatic2.GetJointTranslation();
};
m_ratio = _arg1.ratio;
m_constant = (_local2 + (m_ratio * _local3));
m_impulse = 0;
}
override public function GetAnchor1():b2Vec2{
var _local1:b2Mat22 = m_body1.m_R;
return (new b2Vec2((m_body1.m_position.x + ((_local1.col1.x * m_localAnchor1.x) + (_local1.col2.x * m_localAnchor1.y))), (m_body1.m_position.y + ((_local1.col1.y * m_localAnchor1.x) + (_local1.col2.y * m_localAnchor1.y)))));
}
override public function GetAnchor2():b2Vec2{
var _local1:b2Mat22 = m_body2.m_R;
return (new b2Vec2((m_body2.m_position.x + ((_local1.col1.x * m_localAnchor2.x) + (_local1.col2.x * m_localAnchor2.y))), (m_body2.m_position.y + ((_local1.col1.y * m_localAnchor2.x) + (_local1.col2.y * m_localAnchor2.y)))));
}
override public function PrepareVelocitySolver(){
var _local3:b2Body;
var _local4:b2Body;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:b2Mat22;
var _local10:b2Vec2;
var _local11:Number;
var _local1:b2Body = m_ground1;
var _local2:b2Body = m_ground2;
_local3 = m_body1;
_local4 = m_body2;
var _local12:Number = 0;
m_J.SetZero();
if (m_revolute1){
m_J.angular1 = -1;
_local12 = (_local12 + _local3.m_invI);
} else {
_local9 = _local1.m_R;
_local10 = m_prismatic1.m_localXAxis1;
_local5 = ((_local9.col1.x * _local10.x) + (_local9.col2.x * _local10.y));
_local6 = ((_local9.col1.y * _local10.x) + (_local9.col2.y * _local10.y));
_local9 = _local3.m_R;
_local7 = ((_local9.col1.x * m_localAnchor1.x) + (_local9.col2.x * m_localAnchor1.y));
_local8 = ((_local9.col1.y * m_localAnchor1.x) + (_local9.col2.y * m_localAnchor1.y));
_local11 = ((_local7 * _local6) - (_local8 * _local5));
m_J.linear1.Set(-(_local5), -(_local6));
m_J.angular1 = -(_local11);
_local12 = (_local12 + (_local3.m_invMass + ((_local3.m_invI * _local11) * _local11)));
};
if (m_revolute2){
m_J.angular2 = -(m_ratio);
_local12 = (_local12 + ((m_ratio * m_ratio) * _local4.m_invI));
} else {
_local9 = _local2.m_R;
_local10 = m_prismatic2.m_localXAxis1;
_local5 = ((_local9.col1.x * _local10.x) + (_local9.col2.x * _local10.y));
_local6 = ((_local9.col1.y * _local10.x) + (_local9.col2.y * _local10.y));
_local9 = _local4.m_R;
_local7 = ((_local9.col1.x * m_localAnchor2.x) + (_local9.col2.x * m_localAnchor2.y));
_local8 = ((_local9.col1.y * m_localAnchor2.x) + (_local9.col2.y * m_localAnchor2.y));
_local11 = ((_local7 * _local6) - (_local8 * _local5));
m_J.linear2.Set((-(m_ratio) * _local5), (-(m_ratio) * _local6));
m_J.angular2 = (-(m_ratio) * _local11);
_local12 = (_local12 + ((m_ratio * m_ratio) * (_local4.m_invMass + ((_local4.m_invI * _local11) * _local11))));
};
m_mass = (1 / _local12);
_local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + ((_local3.m_invMass * m_impulse) * m_J.linear1.x));
_local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + ((_local3.m_invMass * m_impulse) * m_J.linear1.y));
_local3.m_angularVelocity = (_local3.m_angularVelocity + ((_local3.m_invI * m_impulse) * m_J.angular1));
_local4.m_linearVelocity.x = (_local4.m_linearVelocity.x + ((_local4.m_invMass * m_impulse) * m_J.linear2.x));
_local4.m_linearVelocity.y = (_local4.m_linearVelocity.y + ((_local4.m_invMass * m_impulse) * m_J.linear2.y));
_local4.m_angularVelocity = (_local4.m_angularVelocity + ((_local4.m_invI * m_impulse) * m_J.angular2));
}
override public function GetReactionTorque(_arg1:Number):Number{
return (0);
}
override public function GetReactionForce(_arg1:Number):b2Vec2{
return (new b2Vec2());
}
override public function SolvePositionConstraints():Boolean{
var _local4:Number;
var _local5:Number;
var _local1:Number = 0;
var _local2:b2Body = m_body1;
var _local3:b2Body = 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();
};
var _local6:Number = (m_constant - (_local4 + (m_ratio * _local5)));
var _local7:Number = (-(m_mass) * _local6);
_local2.m_position.x = (_local2.m_position.x + ((_local2.m_invMass * _local7) * m_J.linear1.x));
_local2.m_position.y = (_local2.m_position.y + ((_local2.m_invMass * _local7) * m_J.linear1.y));
_local2.m_rotation = (_local2.m_rotation + ((_local2.m_invI * _local7) * m_J.angular1));
_local3.m_position.x = (_local3.m_position.x + ((_local3.m_invMass * _local7) * m_J.linear2.x));
_local3.m_position.y = (_local3.m_position.y + ((_local3.m_invMass * _local7) * m_J.linear2.y));
_local3.m_rotation = (_local3.m_rotation + ((_local3.m_invI * _local7) * m_J.angular2));
_local2.m_R.Set(_local2.m_rotation);
_local3.m_R.Set(_local3.m_rotation);
return ((_local1 < b2Settings.b2_linearSlop));
}
public function GetRatio():Number{
return (m_ratio);
}
override public function SolveVelocityConstraints(_arg1:b2StepInfo){
var _local2:b2Body = m_body1;
var _local3:b2Body = m_body2;
var _local4:Number = m_J.Compute(_local2.m_linearVelocity, _local2.m_angularVelocity, _local3.m_linearVelocity, _local3.m_angularVelocity);
var _local5:Number = (-(m_mass) * _local4);
m_impulse = (m_impulse + _local5);
_local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + ((_local2.m_invMass * _local5) * m_J.linear1.x));
_local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + ((_local2.m_invMass * _local5) * m_J.linear1.y));
_local2.m_angularVelocity = (_local2.m_angularVelocity + ((_local2.m_invI * _local5) * m_J.angular1));
_local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + ((_local3.m_invMass * _local5) * m_J.linear2.x));
_local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + ((_local3.m_invMass * _local5) * m_J.linear2.y));
_local3.m_angularVelocity = (_local3.m_angularVelocity + ((_local3.m_invI * _local5) * m_J.angular2));
}
}
}//package Engine.Dynamics.Joints
Section 46
//b2GearJointDef (Engine.Dynamics.Joints.b2GearJointDef)
package Engine.Dynamics.Joints {
public class b2GearJointDef extends b2JointDef {
public var joint1:b2Joint;
public var joint2:b2Joint;
public var ratio:Number;
public function b2GearJointDef(){
type = b2Joint.e_gearJoint;
joint1 = null;
joint2 = null;
ratio = 1;
}
}
}//package Engine.Dynamics.Joints
Section 47
//b2Jacobian (Engine.Dynamics.Joints.b2Jacobian)
package Engine.Dynamics.Joints {
import Engine.Common.Math.*;
public class b2Jacobian {
public var linear1:b2Vec2;
public var linear2:b2Vec2;
public var angular1:Number;
public var angular2:Number;
public function b2Jacobian(){
linear1 = new b2Vec2();
linear2 = new b2Vec2();
super();
}
public function Set(_arg1:b2Vec2, _arg2:Number, _arg3:b2Vec2, _arg4:Number){
linear1.SetV(_arg1);
angular1 = _arg2;
linear2.SetV(_arg3);
angular2 = _arg4;
}
public function SetZero(){
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 Engine.Dynamics.Joints
Section 48
//b2Joint (Engine.Dynamics.Joints.b2Joint)
package Engine.Dynamics.Joints {
import Engine.Common.Math.*;
import Engine.Dynamics.*;
public class b2Joint {
public var m_islandFlag:Boolean;
public var m_collideConnected:Boolean;
public var m_prev:b2Joint;
public var m_next:b2Joint;
public var m_type:int;
public var m_node1:b2JointNode;
public var m_node2:b2JointNode;
public var m_userData;
public var m_body1:b2Body;
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 b2JointNode();
m_node2 = new b2JointNode();
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 GetNext():b2Joint{
return (m_next);
}
public function GetType():int{
return (m_type);
}
public function SolveVelocityConstraints(_arg1:b2StepInfo){
}
public function PrepareVelocitySolver(){
}
public function PreparePositionSolver(){
}
public function GetReactionTorque(_arg1:Number):Number{
return (0);
}
public function GetUserData(){
return (m_userData);
}
public function GetReactionForce(_arg1:Number):b2Vec2{
return (null);
}
public function SolvePositionConstraints():Boolean{
return (false);
}
public function GetBody1():b2Body{
return (m_body1);
}
public function GetBody2():b2Body{
return (m_body2);
}
public static function Destroy(_arg1:b2Joint, _arg2){
}
public static function Create(_arg1:b2JointDef, _arg2):b2Joint{
var _local3:b2Joint;
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 Engine.Dynamics.Joints
Section 49
//b2JointDef (Engine.Dynamics.Joints.b2JointDef)
package Engine.Dynamics.Joints {
import Engine.Dynamics.*;
public class b2JointDef {
public var body2:b2Body;
public var type:int;
public var userData;
public var collideConnected:Boolean;
public var body1:b2Body;
public function b2JointDef(){
type = b2Joint.e_unknownJoint;
userData = null;
body1 = null;
body2 = null;
collideConnected = false;
}
}
}//package Engine.Dynamics.Joints
Section 50
//b2JointNode (Engine.Dynamics.Joints.b2JointNode)
package Engine.Dynamics.Joints {
import Engine.Dynamics.*;
public class b2JointNode {
public var other:b2Body;
public var next:b2JointNode;
public var prev:b2JointNode;
public var joint:b2Joint;
}
}//package Engine.Dynamics.Joints
Section 51
//b2MouseJoint (Engine.Dynamics.Joints.b2MouseJoint)
package Engine.Dynamics.Joints {
import Engine.Common.Math.*;
import Engine.Dynamics.*;
import Engine.Common.*;
public class b2MouseJoint extends b2Joint {
private var K1:b2Mat22;
public var m_beta:Number;
private var K:b2Mat22;
private var K2:b2Mat22;
public var m_target:b2Vec2;
public var m_gamma:Number;
public var m_impulse:b2Vec2;
public var m_ptpMass:b2Mat22;
public var m_C:b2Vec2;
public var m_maxForce:Number;
public var m_localAnchor:b2Vec2;
public function b2MouseJoint(_arg1:b2MouseJointDef){
var _local3:Number;
K = new b2Mat22();
K1 = new b2Mat22();
K2 = new b2Mat22();
m_localAnchor = new b2Vec2();
m_target = new b2Vec2();
m_impulse = new b2Vec2();
m_ptpMass = new b2Mat22();
m_C = new b2Vec2();
super(_arg1);
m_target.SetV(_arg1.target);
var _local2:Number = (m_target.x - m_body2.m_position.x);
_local3 = (m_target.y - m_body2.m_position.y);
m_localAnchor.x = ((_local2 * m_body2.m_R.col1.x) + (_local3 * m_body2.m_R.col1.y));
m_localAnchor.y = ((_local2 * m_body2.m_R.col2.x) + (_local3 * m_body2.m_R.col2.y));
m_maxForce = _arg1.maxForce;
m_impulse.SetZero();
var _local4:Number = m_body2.m_mass;
var _local5:Number = ((2 * b2Settings.b2_pi) * _arg1.frequencyHz);
var _local6:Number = (((2 * _local4) * _arg1.dampingRatio) * _local5);
var _local7:Number = ((_local4 * _local5) * _local5);
m_gamma = (1 / (_local6 + (_arg1.timeStep * _local7)));
m_beta = ((_arg1.timeStep * _local7) / (_local6 + (_arg1.timeStep * _local7)));
}
public function SetTarget(_arg1:b2Vec2){
m_body2.WakeUp();
m_target = _arg1;
}
override public function GetAnchor2():b2Vec2{
var _local1:b2Vec2 = b2Math.b2MulMV(m_body2.m_R, m_localAnchor);
_local1.Add(m_body2.m_position);
return (_local1);
}
override public function GetAnchor1():b2Vec2{
return (m_target);
}
override public function PrepareVelocitySolver(){
var _local1:b2Body;
var _local2:b2Mat22;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
_local1 = m_body2;
_local2 = _local1.m_R;
_local3 = ((_local2.col1.x * m_localAnchor.x) + (_local2.col2.x * m_localAnchor.y));
_local4 = ((_local2.col1.y * m_localAnchor.x) + (_local2.col2.y * m_localAnchor.y));
_local5 = _local1.m_invMass;
_local6 = _local1.m_invI;
K1.col1.x = _local5;
K1.col2.x = 0;
K1.col1.y = 0;
K1.col2.y = _local5;
K2.col1.x = ((_local6 * _local4) * _local4);
K2.col2.x = ((-(_local6) * _local3) * _local4);
K2.col1.y = ((-(_local6) * _local3) * _local4);
K2.col2.y = ((_local6 * _local3) * _local3);
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_ptpMass);
m_C.x = ((_local1.m_position.x + _local3) - m_target.x);
m_C.y = ((_local1.m_position.y + _local4) - m_target.y);
_local1.m_angularVelocity = (_local1.m_angularVelocity * 0.98);
var _local7:Number = m_impulse.x;
var _local8:Number = m_impulse.y;
_local1.m_linearVelocity.x = (_local1.m_linearVelocity.x + (_local5 * _local7));
_local1.m_linearVelocity.y = (_local1.m_linearVelocity.y + (_local5 * _local8));
_local1.m_angularVelocity = (_local1.m_angularVelocity + (_local6 * ((_local3 * _local8) - (_local4 * _local7))));
}
override public function GetReactionTorque(_arg1:Number):Number{
return (0);
}
override public function GetReactionForce(_arg1:Number):b2Vec2{
var _local2:b2Vec2 = new b2Vec2();
_local2.SetV(m_impulse);
_local2.Multiply(_arg1);
return (_local2);
}
override public function SolvePositionConstraints():Boolean{
return (true);
}
override public function SolveVelocityConstraints(_arg1:b2StepInfo){
var _local3:b2Mat22;
var _local2:b2Body = m_body2;
_local3 = _local2.m_R;
var _local4:Number = ((_local3.col1.x * m_localAnchor.x) + (_local3.col2.x * m_localAnchor.y));
var _local5:Number = ((_local3.col1.y * m_localAnchor.x) + (_local3.col2.y * m_localAnchor.y));
var _local6:Number = (_local2.m_linearVelocity.x + (-(_local2.m_angularVelocity) * _local5));
var _local7:Number = (_local2.m_linearVelocity.y + (_local2.m_angularVelocity * _local4));
_local3 = m_ptpMass;
var _local8:Number = ((_local6 + ((m_beta * _arg1.inv_dt) * m_C.x)) + (m_gamma * m_impulse.x));
var _local9:Number = ((_local7 + ((m_beta * _arg1.inv_dt) * m_C.y)) + (m_gamma * m_impulse.y));
var _local10:Number = -(((_local3.col1.x * _local8) + (_local3.col2.x * _local9)));
var _local11:Number = -(((_local3.col1.y * _local8) + (_local3.col2.y * _local9)));
var _local12:Number = m_impulse.x;
var _local13:Number = m_impulse.y;
m_impulse.x = (m_impulse.x + _local10);
m_impulse.y = (m_impulse.y + _local11);
var _local14:Number = m_impulse.Length();
if (_local14 > (_arg1.dt * m_maxForce)){
m_impulse.Multiply(((_arg1.dt * m_maxForce) / _local14));
};
_local10 = (m_impulse.x - _local12);
_local11 = (m_impulse.y - _local13);
_local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + (_local2.m_invMass * _local10));
_local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + (_local2.m_invMass * _local11));
_local2.m_angularVelocity = (_local2.m_angularVelocity + (_local2.m_invI * ((_local4 * _local11) - (_local5 * _local10))));
}
}
}//package Engine.Dynamics.Joints
Section 52
//b2MouseJointDef (Engine.Dynamics.Joints.b2MouseJointDef)
package Engine.Dynamics.Joints {
import Engine.Common.Math.*;
public class b2MouseJointDef extends b2JointDef {
public var timeStep:Number;
public var target:b2Vec2;
public var maxForce:Number;
public var dampingRatio:Number;
public var frequencyHz:Number;
public function b2MouseJointDef(){
target = new b2Vec2();
super();
type = b2Joint.e_mouseJoint;
maxForce = 0;
frequencyHz = 5;
dampingRatio = 0.7;
timeStep = (1 / 60);
}
}
}//package Engine.Dynamics.Joints
Section 53
//b2PrismaticJoint (Engine.Dynamics.Joints.b2PrismaticJoint)
package Engine.Dynamics.Joints {
import Engine.Common.Math.*;
import Engine.Dynamics.*;
import Engine.Common.*;
public class b2PrismaticJoint extends b2Joint {
public var m_initialAngle:Number;
public var m_localXAxis1:b2Vec2;
public var m_lowerTranslation:Number;
public var m_angularMass:Number;
public var m_enableLimit:Boolean;
public var m_maxMotorForce:Number;
public var m_limitState:int;
public var m_localYAxis1:b2Vec2;
public var m_motorMass:Number;
public var m_linearImpulse:Number;
public var m_upperTranslation:Number;
public var m_localAnchor1:b2Vec2;
public var m_localAnchor2:b2Vec2;
public var m_angularImpulse:Number;
public var m_linearMass:Number;
public var m_motorImpulse:Number;
public var m_limitImpulse:Number;
public var m_motorJacobian:b2Jacobian;
public var m_limitPositionImpulse:Number;
public var m_motorSpeed:Number;
public var m_enableMotor:Boolean;
public var m_linearJacobian:b2Jacobian;
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);
_local2 = m_body1.m_R;
_local3 = (_arg1.anchorPoint.x - m_body1.m_position.x);
_local4 = (_arg1.anchorPoint.y - m_body1.m_position.y);
m_localAnchor1.Set(((_local3 * _local2.col1.x) + (_local4 * _local2.col1.y)), ((_local3 * _local2.col2.x) + (_local4 * _local2.col2.y)));
_local2 = m_body2.m_R;
_local3 = (_arg1.anchorPoint.x - m_body2.m_position.x);
_local4 = (_arg1.anchorPoint.y - m_body2.m_position.y);
m_localAnchor2.Set(((_local3 * _local2.col1.x) + (_local4 * _local2.col1.y)), ((_local3 * _local2.col2.x) + (_local4 * _local2.col2.y)));
_local2 = m_body1.m_R;
_local3 = _arg1.axis.x;
_local4 = _arg1.axis.y;
m_localXAxis1.Set(((_local3 * _local2.col1.x) + (_local4 * _local2.col1.y)), ((_local3 * _local2.col2.x) + (_local4 * _local2.col2.y)));
m_localYAxis1.x = -(m_localXAxis1.y);
m_localYAxis1.y = m_localXAxis1.x;
m_initialAngle = (m_body2.m_rotation - m_body1.m_rotation);
m_linearJacobian.SetZero();
m_linearMass = 0;
m_linearImpulse = 0;
m_angularMass = 0;
m_angularImpulse = 0;
m_motorJacobian.SetZero();
m_motorMass = 0;
m_motorImpulse = 0;
m_limitImpulse = 0;
m_limitPositionImpulse = 0;
m_lowerTranslation = _arg1.lowerTranslation;
m_upperTranslation = _arg1.upperTranslation;
m_maxMotorForce = _arg1.motorForce;
m_motorSpeed = _arg1.motorSpeed;
m_enableLimit = _arg1.enableLimit;
m_enableMotor = _arg1.enableMotor;
}
override public function GetAnchor1():b2Vec2{
var _local1:b2Body = m_body1;
var _local2:b2Vec2 = new b2Vec2();
_local2.SetV(m_localAnchor1);
_local2.MulM(_local1.m_R);
_local2.Add(_local1.m_position);
return (_local2);
}
override public function GetAnchor2():b2Vec2{
var _local1:b2Body = m_body2;
var _local2:b2Vec2 = new b2Vec2();
_local2.SetV(m_localAnchor2);
_local2.MulM(_local1.m_R);
_local2.Add(_local1.m_position);
return (_local2);
}
override public function PrepareVelocitySolver(){
var _local3:b2Mat22;
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 _local1:b2Body = m_body1;
var _local2:b2Body = m_body2;
_local3 = _local1.m_R;
var _local4:Number = ((_local3.col1.x * m_localAnchor1.x) + (_local3.col2.x * m_localAnchor1.y));
var _local5:Number = ((_local3.col1.y * m_localAnchor1.x) + (_local3.col2.y * m_localAnchor1.y));
_local3 = _local2.m_R;
var _local6:Number = ((_local3.col1.x * m_localAnchor2.x) + (_local3.col2.x * m_localAnchor2.y));
var _local7:Number = ((_local3.col1.y * m_localAnchor2.x) + (_local3.col2.y * m_localAnchor2.y));
var _local8:Number = _local1.m_invMass;
var _local9:Number = _local2.m_invMass;
var _local10:Number = _local1.m_invI;
var _local11:Number = _local2.m_invI;
_local3 = _local1.m_R;
var _local12:Number = ((_local3.col1.x * m_localYAxis1.x) + (_local3.col2.x * m_localYAxis1.y));
var _local13:Number = ((_local3.col1.y * m_localYAxis1.x) + (_local3.col2.y * m_localYAxis1.y));
var _local14:Number = ((_local2.m_position.x + _local6) - _local1.m_position.x);
var _local15:Number = ((_local2.m_position.y + _local7) - _local1.m_position.y);
m_linearJacobian.linear1.x = -(_local12);
m_linearJacobian.linear1.y = -(_local13);
m_linearJacobian.linear2.x = _local12;
m_linearJacobian.linear2.y = _local13;
m_linearJacobian.angular1 = -(((_local14 * _local13) - (_local15 * _local12)));
m_linearJacobian.angular2 = ((_local6 * _local13) - (_local7 * _local12));
m_linearMass = (((_local8 + ((_local10 * m_linearJacobian.angular1) * m_linearJacobian.angular1)) + _local9) + ((_local11 * m_linearJacobian.angular2) * m_linearJacobian.angular2));
m_linearMass = (1 / m_linearMass);
m_angularMass = (1 / (_local10 + _local11));
if (((m_enableLimit) || (m_enableMotor))){
_local3 = _local1.m_R;
_local16 = ((_local3.col1.x * m_localXAxis1.x) + (_local3.col2.x * m_localXAxis1.y));
_local17 = ((_local3.col1.y * m_localXAxis1.x) + (_local3.col2.y * m_localXAxis1.y));
m_motorJacobian.linear1.x = -(_local16);
m_motorJacobian.linear1.y = -(_local17);
m_motorJacobian.linear2.x = _local16;
m_motorJacobian.linear2.y = _local17;
m_motorJacobian.angular1 = -(((_local14 * _local17) - (_local15 * _local16)));
m_motorJacobian.angular2 = ((_local6 * _local17) - (_local7 * _local16));
m_motorMass = (((_local8 + ((_local10 * m_motorJacobian.angular1) * m_motorJacobian.angular1)) + _local9) + ((_local11 * m_motorJacobian.angular2) * m_motorJacobian.angular2));
m_motorMass = (1 / m_motorMass);
if (m_enableLimit){
_local18 = (_local14 - _local4);
_local19 = (_local15 - _local5);
_local20 = ((_local16 * _local18) + (_local17 * _local19));
if (b2Math.b2Abs((m_upperTranslation - m_lowerTranslation)) < (2 * b2Settings.b2_linearSlop)){
m_limitState = e_equalLimits;
} else {
if (_local20 <= m_lowerTranslation){
if (m_limitState != e_atLowerLimit){
m_limitImpulse = 0;
};
m_limitState = e_atLowerLimit;
} else {
if (_local20 >= m_upperTranslation){
if (m_limitState != e_atUpperLimit){
m_limitImpulse = 0;
};
m_limitState = e_atUpperLimit;
} else {
m_limitState = e_inactiveLimit;
m_limitImpulse = 0;
};
};
};
};
};
if (m_enableMotor == false){
m_motorImpulse = 0;
};
if (m_enableLimit == false){
m_limitImpulse = 0;
};
if (b2World.s_enableWarmStarting){
_local21 = ((m_linearImpulse * m_linearJacobian.linear1.x) + ((m_motorImpulse + m_limitImpulse) * m_motorJacobian.linear1.x));
_local22 = ((m_linearImpulse * m_linearJacobian.linear1.y) + ((m_motorImpulse + m_limitImpulse) * m_motorJacobian.linear1.y));
_local23 = ((m_linearImpulse * m_linearJacobian.linear2.x) + ((m_motorImpulse + m_limitImpulse) * m_motorJacobian.linear2.x));
_local24 = ((m_linearImpulse * m_linearJacobian.linear2.y) + ((m_motorImpulse + m_limitImpulse) * m_motorJacobian.linear2.y));
_local25 = (((m_linearImpulse * m_linearJacobian.angular1) - m_angularImpulse) + ((m_motorImpulse + m_limitImpulse) * m_motorJacobian.angular1));
_local26 = (((m_linearImpulse * m_linearJacobian.angular2) + m_angularImpulse) + ((m_motorImpulse + m_limitImpulse) * m_motorJacobian.angular2));
_local1.m_linearVelocity.x = (_local1.m_linearVelocity.x + (_local8 * _local21));
_local1.m_linearVelocity.y = (_local1.m_linearVelocity.y + (_local8 * _local22));
_local1.m_angularVelocity = (_local1.m_angularVelocity + (_local10 * _local25));
_local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + (_local9 * _local23));
_local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + (_local9 * _local24));
_local2.m_angularVelocity = (_local2.m_angularVelocity + (_local11 * _local26));
} else {
m_linearImpulse = 0;
m_angularImpulse = 0;
m_limitImpulse = 0;
m_motorImpulse = 0;
};
m_limitPositionImpulse = 0;
}
public function GetJointTranslation():Number{
var _local3:b2Mat22;
var _local1:b2Body = m_body1;
var _local2:b2Body = m_body2;
_local3 = _local1.m_R;
var _local4:Number = ((_local3.col1.x * m_localAnchor1.x) + (_local3.col2.x * m_localAnchor1.y));
var _local5:Number = ((_local3.col1.y * m_localAnchor1.x) + (_local3.col2.y * m_localAnchor1.y));
_local3 = _local2.m_R;
var _local6:Number = ((_local3.col1.x * m_localAnchor2.x) + (_local3.col2.x * m_localAnchor2.y));
var _local7:Number = ((_local3.col1.y * m_localAnchor2.x) + (_local3.col2.y * m_localAnchor2.y));
var _local8:Number = (_local1.m_position.x + _local4);
var _local9:Number = (_local1.m_position.y + _local5);
var _local10:Number = (_local2.m_position.x + _local6);
var _local11:Number = (_local2.m_position.y + _local7);
var _local12:Number = (_local10 - _local8);
var _local13:Number = (_local11 - _local9);
_local3 = _local1.m_R;
var _local14:Number = ((_local3.col1.x * m_localXAxis1.x) + (_local3.col2.x * m_localXAxis1.y));
var _local15:Number = ((_local3.col1.y * m_localXAxis1.x) + (_local3.col2.y * m_localXAxis1.y));
var _local16:Number = ((_local14 * _local12) + (_local15 * _local13));
return (_local16);
}
override public function GetReactionForce(_arg1:Number):b2Vec2{
var _local3:b2Mat22;
var _local2:Number = (_arg1 * m_limitImpulse);
_local3 = m_body1.m_R;
var _local4:Number = (_local2 * ((_local3.col1.x * m_localXAxis1.x) + (_local3.col2.x * m_localXAxis1.y)));
var _local5:Number = (_local2 * ((_local3.col1.y * m_localXAxis1.x) + (_local3.col2.y * m_localXAxis1.y)));
var _local6:Number = (_local2 * ((_local3.col1.x * m_localYAxis1.x) + (_local3.col2.x * m_localYAxis1.y)));
var _local7:Number = (_local2 * ((_local3.col1.y * m_localYAxis1.x) + (_local3.col2.y * m_localYAxis1.y)));
return (new b2Vec2((_local4 + _local6), (_local5 + _local7)));
}
override public function SolvePositionConstraints():Boolean{
var _local1:Number;
var _local2:Number;
var _local9:b2Mat22;
var _local28:Number;
var _local29:Number;
var _local30:Number;
var _local31:Number;
var _local3:b2Body = m_body1;
var _local4:b2Body = m_body2;
var _local5:Number = _local3.m_invMass;
var _local6:Number = _local4.m_invMass;
var _local7:Number = _local3.m_invI;
var _local8:Number = _local4.m_invI;
_local9 = _local3.m_R;
var _local10:Number = ((_local9.col1.x * m_localAnchor1.x) + (_local9.col2.x * m_localAnchor1.y));
var _local11:Number = ((_local9.col1.y * m_localAnchor1.x) + (_local9.col2.y * m_localAnchor1.y));
_local9 = _local4.m_R;
var _local12:Number = ((_local9.col1.x * m_localAnchor2.x) + (_local9.col2.x * m_localAnchor2.y));
var _local13:Number = ((_local9.col1.y * m_localAnchor2.x) + (_local9.col2.y * m_localAnchor2.y));
var _local14:Number = (_local3.m_position.x + _local10);
var _local15:Number = (_local3.m_position.y + _local11);
var _local16:Number = (_local4.m_position.x + _local12);
var _local17:Number = (_local4.m_position.y + _local13);
var _local18:Number = (_local16 - _local14);
var _local19:Number = (_local17 - _local15);
_local9 = _local3.m_R;
var _local20:Number = ((_local9.col1.x * m_localYAxis1.x) + (_local9.col2.x * m_localYAxis1.y));
var _local21:Number = ((_local9.col1.y * m_localYAxis1.x) + (_local9.col2.y * m_localYAxis1.y));
var _local22:Number = ((_local20 * _local18) + (_local21 * _local19));
_local22 = b2Math.b2Clamp(_local22, -(b2Settings.b2_maxLinearCorrection), b2Settings.b2_maxLinearCorrection);
var _local23:Number = (-(m_linearMass) * _local22);
_local3.m_position.x = (_local3.m_position.x + ((_local5 * _local23) * m_linearJacobian.linear1.x));
_local3.m_position.y = (_local3.m_position.y + ((_local5 * _local23) * m_linearJacobian.linear1.y));
_local3.m_rotation = (_local3.m_rotation + ((_local7 * _local23) * m_linearJacobian.angular1));
_local4.m_position.x = (_local4.m_position.x + ((_local6 * _local23) * m_linearJacobian.linear2.x));
_local4.m_position.y = (_local4.m_position.y + ((_local6 * _local23) * m_linearJacobian.linear2.y));
_local4.m_rotation = (_local4.m_rotation + ((_local8 * _local23) * m_linearJacobian.angular2));
var _local24:Number = b2Math.b2Abs(_local22);
var _local25:Number = ((_local4.m_rotation - _local3.m_rotation) - m_initialAngle);
_local25 = b2Math.b2Clamp(_local25, -(b2Settings.b2_maxAngularCorrection), b2Settings.b2_maxAngularCorrection);
var _local26:Number = (-(m_angularMass) * _local25);
_local3.m_rotation = (_local3.m_rotation - (_local3.m_invI * _local26));
_local3.m_R.Set(_local3.m_rotation);
_local4.m_rotation = (_local4.m_rotation + (_local4.m_invI * _local26));
_local4.m_R.Set(_local4.m_rotation);
var _local27:Number = b2Math.b2Abs(_local25);
if (((m_enableLimit) && (!((m_limitState == e_inactiveLimit))))){
_local9 = _local3.m_R;
_local10 = ((_local9.col1.x * m_localAnchor1.x) + (_local9.col2.x * m_localAnchor1.y));
_local11 = ((_local9.col1.y * m_localAnchor1.x) + (_local9.col2.y * m_localAnchor1.y));
_local9 = _local4.m_R;
_local12 = ((_local9.col1.x * m_localAnchor2.x) + (_local9.col2.x * m_localAnchor2.y));
_local13 = ((_local9.col1.y * m_localAnchor2.x) + (_local9.col2.y * m_localAnchor2.y));
_local14 = (_local3.m_position.x + _local10);
_local15 = (_local3.m_position.y + _local11);
_local16 = (_local4.m_position.x + _local12);
_local17 = (_local4.m_position.y + _local13);
_local18 = (_local16 - _local14);
_local19 = (_local17 - _local15);
_local9 = _local3.m_R;
_local28 = ((_local9.col1.x * m_localXAxis1.x) + (_local9.col2.x * m_localXAxis1.y));
_local29 = ((_local9.col1.y * m_localXAxis1.x) + (_local9.col2.y * m_localXAxis1.y));
_local30 = ((_local28 * _local18) + (_local29 * _local19));
_local31 = 0;
if (m_limitState == e_equalLimits){
_local1 = b2Math.b2Clamp(_local30, -(b2Settings.b2_maxLinearCorrection), b2Settings.b2_maxLinearCorrection);
_local31 = (-(m_motorMass) * _local1);
_local24 = b2Math.b2Max(_local24, b2Math.b2Abs(_local25));
} else {
if (m_limitState == e_atLowerLimit){
_local1 = (_local30 - m_lowerTranslation);
_local24 = b2Math.b2Max(_local24, -(_local1));
_local1 = b2Math.b2Clamp((_local1 + b2Settings.b2_linearSlop), -(b2Settings.b2_maxLinearCorrection), 0);
_local31 = (-(m_motorMass) * _local1);
_local2 = m_limitPositionImpulse;
m_limitPositionImpulse = b2Math.b2Max((m_limitPositionImpulse + _local31), 0);
_local31 = (m_limitPositionImpulse - _local2);
} else {
if (m_limitState == e_atUpperLimit){
_local1 = (_local30 - m_upperTranslation);
_local24 = b2Math.b2Max(_local24, _local1);
_local1 = b2Math.b2Clamp((_local1 - b2Settings.b2_linearSlop), 0, b2Settings.b2_maxLinearCorrection);
_local31 = (-(m_motorMass) * _local1);
_local2 = m_limitPositionImpulse;
m_limitPositionImpulse = b2Math.b2Min((m_limitPositionImpulse + _local31), 0);
_local31 = (m_limitPositionImpulse - _local2);
};
};
};
_local3.m_position.x = (_local3.m_position.x + ((_local5 * _local31) * m_motorJacobian.linear1.x));
_local3.m_position.y = (_local3.m_position.y + ((_local5 * _local31) * m_motorJacobian.linear1.y));
_local3.m_rotation = (_local3.m_rotation + ((_local7 * _local31) * m_motorJacobian.angular1));
_local3.m_R.Set(_local3.m_rotation);
_local4.m_position.x = (_local4.m_position.x + ((_local6 * _local31) * m_motorJacobian.linear2.x));
_local4.m_position.y = (_local4.m_position.y + ((_local6 * _local31) * m_motorJacobian.linear2.y));
_local4.m_rotation = (_local4.m_rotation + ((_local8 * _local31) * m_motorJacobian.angular2));
_local4.m_R.Set(_local4.m_rotation);
};
return ((((_local24 <= b2Settings.b2_linearSlop)) && ((_local27 <= b2Settings.b2_angularSlop))));
}
public function SetMotorSpeed(_arg1:Number){
m_motorSpeed = _arg1;
}
public function GetJointSpeed():Number{
var _local3:b2Mat22;
var _local1:b2Body = m_body1;
var _local2:b2Body = m_body2;
_local3 = _local1.m_R;
var _local4:Number = ((_local3.col1.x * m_localAnchor1.x) + (_local3.col2.x * m_localAnchor1.y));
var _local5:Number = ((_local3.col1.y * m_localAnchor1.x) + (_local3.col2.y * m_localAnchor1.y));
_local3 = _local2.m_R;
var _local6:Number = ((_local3.col1.x * m_localAnchor2.x) + (_local3.col2.x * m_localAnchor2.y));
var _local7:Number = ((_local3.col1.y * m_localAnchor2.x) + (_local3.col2.y * m_localAnchor2.y));
var _local8:Number = (_local1.m_position.x + _local4);
var _local9:Number = (_local1.m_position.y + _local5);
var _local10:Number = (_local2.m_position.x + _local6);
var _local11:Number = (_local2.m_position.y + _local7);
var _local12:Number = (_local10 - _local8);
var _local13:Number = (_local11 - _local9);
_local3 = _local1.m_R;
var _local14:Number = ((_local3.col1.x * m_localXAxis1.x) + (_local3.col2.x * m_localXAxis1.y));
var _local15:Number = ((_local3.col1.y * m_localXAxis1.x) + (_local3.col2.y * m_localXAxis1.y));
var _local16:b2Vec2 = _local1.m_linearVelocity;
var _local17:b2Vec2 = _local2.m_linearVelocity;
var _local18:Number = _local1.m_angularVelocity;
var _local19:Number = _local2.m_angularVelocity;
var _local20:Number = (((_local12 * (-(_local18) * _local15)) + (_local13 * (_local18 * _local14))) + ((_local14 * (((_local17.x + (-(_local19) * _local7)) - _local16.x) - (-(_local18) * _local5))) + (_local15 * (((_local17.y + (_local19 * _local6)) - _local16.y) - (_local18 * _local4)))));
return (_local20);
}
public function GetMotorForce(_arg1:Number):Number{
return ((_arg1 * m_motorImpulse));
}
public function SetMotorForce(_arg1:Number){
m_maxMotorForce = _arg1;
}
override public function GetReactionTorque(_arg1:Number):Number{
return ((_arg1 * m_angularImpulse));
}
override public function SolveVelocityConstraints(_arg1:b2StepInfo){
var _local8:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local2:b2Body = m_body1;
var _local3:b2Body = m_body2;
var _local4:Number = _local2.m_invMass;
var _local5:Number = _local3.m_invMass;
var _local6:Number = _local2.m_invI;
var _local7:Number = _local3.m_invI;
var _local9:Number = m_linearJacobian.Compute(_local2.m_linearVelocity, _local2.m_angularVelocity, _local3.m_linearVelocity, _local3.m_angularVelocity);
var _local10:Number = (-(m_linearMass) * _local9);
m_linearImpulse = (m_linearImpulse + _local10);
_local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + ((_local4 * _local10) * m_linearJacobian.linear1.x));
_local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + ((_local4 * _local10) * m_linearJacobian.linear1.y));
_local2.m_angularVelocity = (_local2.m_angularVelocity + ((_local6 * _local10) * m_linearJacobian.angular1));
_local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + ((_local5 * _local10) * m_linearJacobian.linear2.x));
_local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + ((_local5 * _local10) * m_linearJacobian.linear2.y));
_local3.m_angularVelocity = (_local3.m_angularVelocity + ((_local7 * _local10) * m_linearJacobian.angular2));
var _local11:Number = (_local3.m_angularVelocity - _local2.m_angularVelocity);
var _local12:* = (-(m_angularMass) * _local11);
m_angularImpulse = (m_angularImpulse + _local12);
_local2.m_angularVelocity = (_local2.m_angularVelocity - (_local6 * _local12));
_local3.m_angularVelocity = (_local3.m_angularVelocity + (_local7 * _local12));
if (((m_enableMotor) && (!((m_limitState == e_equalLimits))))){
_local13 = (m_motorJacobian.Compute(_local2.m_linearVelocity, _local2.m_angularVelocity, _local3.m_linearVelocity, _local3.m_angularVelocity) - m_motorSpeed);
_local14 = (-(m_motorMass) * _local13);
_local15 = m_motorImpulse;
m_motorImpulse = b2Math.b2Clamp((m_motorImpulse + _local14), (-(_arg1.dt) * m_maxMotorForce), (_arg1.dt * m_maxMotorForce));
_local14 = (m_motorImpulse - _local15);
_local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + ((_local4 * _local14) * m_motorJacobian.linear1.x));
_local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + ((_local4 * _local14) * m_motorJacobian.linear1.y));
_local2.m_angularVelocity = (_local2.m_angularVelocity + ((_local6 * _local14) * m_motorJacobian.angular1));
_local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + ((_local5 * _local14) * m_motorJacobian.linear2.x));
_local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + ((_local5 * _local14) * m_motorJacobian.linear2.y));
_local3.m_angularVelocity = (_local3.m_angularVelocity + ((_local7 * _local14) * m_motorJacobian.angular2));
};
if (((m_enableLimit) && (!((m_limitState == e_inactiveLimit))))){
_local16 = m_motorJacobian.Compute(_local2.m_linearVelocity, _local2.m_angularVelocity, _local3.m_linearVelocity, _local3.m_angularVelocity);
_local17 = (-(m_motorMass) * _local16);
if (m_limitState == e_equalLimits){
m_limitImpulse = (m_limitImpulse + _local17);
} else {
if (m_limitState == e_atLowerLimit){
_local8 = m_limitImpulse;
m_limitImpulse = b2Math.b2Max((m_limitImpulse + _local17), 0);
_local17 = (m_limitImpulse - _local8);
} else {
if (m_limitState == e_atUpperLimit){
_local8 = m_limitImpulse;
m_limitImpulse = b2Math.b2Min((m_limitImpulse + _local17), 0);
_local17 = (m_limitImpulse - _local8);
};
};
};
_local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + ((_local4 * _local17) * m_motorJacobian.linear1.x));
_local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + ((_local4 * _local17) * m_motorJacobian.linear1.y));
_local2.m_angularVelocity = (_local2.m_angularVelocity + ((_local6 * _local17) * m_motorJacobian.angular1));
_local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + ((_local5 * _local17) * m_motorJacobian.linear2.x));
_local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + ((_local5 * _local17) * m_motorJacobian.linear2.y));
_local3.m_angularVelocity = (_local3.m_angularVelocity + ((_local7 * _local17) * m_motorJacobian.angular2));
};
}
}
}//package Engine.Dynamics.Joints
Section 54
//b2PrismaticJointDef (Engine.Dynamics.Joints.b2PrismaticJointDef)
package Engine.Dynamics.Joints {
import Engine.Common.Math.*;
public class b2PrismaticJointDef extends b2JointDef {
public var axis:b2Vec2;
public var upperTranslation:Number;
public var lowerTranslation:Number;
public var motorSpeed:Number;
public var enableLimit:Boolean;
public var enableMotor:Boolean;
public var anchorPoint:b2Vec2;
public var motorForce:Number;
public function b2PrismaticJointDef(){
type = b2Joint.e_prismaticJoint;
anchorPoint = new b2Vec2(0, 0);
axis = new b2Vec2(0, 0);
lowerTranslation = 0;
upperTranslation = 0;
motorForce = 0;
motorSpeed = 0;
enableLimit = false;
enableMotor = false;
}
}
}//package Engine.Dynamics.Joints
Section 55
//b2PulleyJoint (Engine.Dynamics.Joints.b2PulleyJoint)
package Engine.Dynamics.Joints {
import Engine.Common.Math.*;
import Engine.Dynamics.*;
import Engine.Common.*;
public class b2PulleyJoint extends b2Joint {
public var m_limitState1:int;
public var m_limitState2:int;
public var m_ground:b2Body;
public var m_maxLength2:Number;
public var m_maxLength1:Number;
public var m_limitPositionImpulse1:Number;
public var m_limitPositionImpulse2:Number;
public var m_pulleyImpulse:Number;
public var m_constant:Number;
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_limitMass1:Number;
public var m_limitMass2:Number;
public var m_limitImpulse1:Number;
public var m_pulleyMass:Number;
public var m_u1:b2Vec2;
public var m_u2:b2Vec2;
public var m_limitImpulse2:Number;
public static var b2_minPulleyLength:Number = 1;
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.groundPoint1.x - m_ground.m_position.x);
m_groundAnchor1.y = (_arg1.groundPoint1.y - m_ground.m_position.y);
m_groundAnchor2.x = (_arg1.groundPoint2.x - m_ground.m_position.x);
m_groundAnchor2.y = (_arg1.groundPoint2.y - m_ground.m_position.y);
_local2 = m_body1.m_R;
_local3 = (_arg1.anchorPoint1.x - m_body1.m_position.x);
_local4 = (_arg1.anchorPoint1.y - m_body1.m_position.y);
m_localAnchor1.x = ((_local3 * _local2.col1.x) + (_local4 * _local2.col1.y));
m_localAnchor1.y = ((_local3 * _local2.col2.x) + (_local4 * _local2.col2.y));
_local2 = m_body2.m_R;
_local3 = (_arg1.anchorPoint2.x - m_body2.m_position.x);
_local4 = (_arg1.anchorPoint2.y - m_body2.m_position.y);
m_localAnchor2.x = ((_local3 * _local2.col1.x) + (_local4 * _local2.col1.y));
m_localAnchor2.y = ((_local3 * _local2.col2.x) + (_local4 * _local2.col2.y));
m_ratio = _arg1.ratio;
_local3 = (_arg1.groundPoint1.x - _arg1.anchorPoint1.x);
_local4 = (_arg1.groundPoint1.y - _arg1.anchorPoint1.y);
var _local5:Number = Math.sqrt(((_local3 * _local3) + (_local4 * _local4)));
_local3 = (_arg1.groundPoint2.x - _arg1.anchorPoint2.x);
_local4 = (_arg1.groundPoint2.y - _arg1.anchorPoint2.y);
var _local6:Number = Math.sqrt(((_local3 * _local3) + (_local4 * _local4)));
var _local7:Number = b2Math.b2Max((0.5 * b2_minPulleyLength), _local5);
var _local8:Number = b2Math.b2Max((0.5 * b2_minPulleyLength), _local6);
m_constant = (_local7 + (m_ratio * _local8));
m_maxLength1 = b2Math.b2Clamp(_arg1.maxLength1, _local7, (m_constant - (m_ratio * b2_minPulleyLength)));
m_maxLength2 = b2Math.b2Clamp(_arg1.maxLength2, _local8, ((m_constant - b2_minPulleyLength) / m_ratio));
m_pulleyImpulse = 0;
m_limitImpulse1 = 0;
m_limitImpulse2 = 0;
}
public function GetLength1():Number{
var _local1:b2Mat22;
_local1 = m_body1.m_R;
var _local2:Number = (m_body1.m_position.x + ((_local1.col1.x * m_localAnchor1.x) + (_local1.col2.x * m_localAnchor1.y)));
var _local3:Number = (m_body1.m_position.y + ((_local1.col1.y * m_localAnchor1.x) + (_local1.col2.y * m_localAnchor1.y)));
var _local4:Number = (_local2 - (m_ground.m_position.x + m_groundAnchor1.x));
var _local5:Number = (_local3 - (m_ground.m_position.y + m_groundAnchor1.y));
return (Math.sqrt(((_local4 * _local4) + (_local5 * _local5))));
}
override public function GetAnchor1():b2Vec2{
var _local1:b2Mat22 = m_body1.m_R;
return (new b2Vec2((m_body1.m_position.x + ((_local1.col1.x * m_localAnchor1.x) + (_local1.col2.x * m_localAnchor1.y))), (m_body1.m_position.y + ((_local1.col1.y * m_localAnchor1.x) + (_local1.col2.y * m_localAnchor1.y)))));
}
override public function GetAnchor2():b2Vec2{
var _local1:b2Mat22 = m_body2.m_R;
return (new b2Vec2((m_body2.m_position.x + ((_local1.col1.x * m_localAnchor2.x) + (_local1.col2.x * m_localAnchor2.y))), (m_body2.m_position.y + ((_local1.col1.y * m_localAnchor2.x) + (_local1.col2.y * m_localAnchor2.y)))));
}
override public function PrepareVelocitySolver(){
var _local3:b2Mat22;
var _local1:b2Body = m_body1;
var _local2:b2Body = m_body2;
_local3 = _local1.m_R;
var _local4:Number = ((_local3.col1.x * m_localAnchor1.x) + (_local3.col2.x * m_localAnchor1.y));
var _local5:Number = ((_local3.col1.y * m_localAnchor1.x) + (_local3.col2.y * m_localAnchor1.y));
_local3 = _local2.m_R;
var _local6:Number = ((_local3.col1.x * m_localAnchor2.x) + (_local3.col2.x * m_localAnchor2.y));
var _local7:Number = ((_local3.col1.y * m_localAnchor2.x) + (_local3.col2.y * m_localAnchor2.y));
var _local8:Number = (_local1.m_position.x + _local4);
var _local9:Number = (_local1.m_position.y + _local5);
var _local10:Number = (_local2.m_position.x + _local6);
var _local11:Number = (_local2.m_position.y + _local7);
var _local12:Number = (m_ground.m_position.x + m_groundAnchor1.x);
var _local13:Number = (m_ground.m_position.y + m_groundAnchor1.y);
var _local14:Number = (m_ground.m_position.x + m_groundAnchor2.x);
var _local15:Number = (m_ground.m_position.y + m_groundAnchor2.y);
m_u1.Set((_local8 - _local12), (_local9 - _local13));
m_u2.Set((_local10 - _local14), (_local11 - _local15));
var _local16:Number = m_u1.Length();
var _local17:Number = 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();
};
if (_local16 < m_maxLength1){
m_limitState1 = e_inactiveLimit;
m_limitImpulse1 = 0;
} else {
m_limitState1 = e_atUpperLimit;
m_limitPositionImpulse1 = 0;
};
if (_local17 < m_maxLength2){
m_limitState2 = e_inactiveLimit;
m_limitImpulse2 = 0;
} else {
m_limitState2 = e_atUpperLimit;
m_limitPositionImpulse2 = 0;
};
var _local18:Number = ((_local4 * m_u1.y) - (_local5 * m_u1.x));
var _local19:Number = ((_local6 * m_u2.y) - (_local7 * m_u2.x));
m_limitMass1 = (_local1.m_invMass + ((_local1.m_invI * _local18) * _local18));
m_limitMass2 = (_local2.m_invMass + ((_local2.m_invI * _local19) * _local19));
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);
var _local20:Number = ((-(m_pulleyImpulse) - m_limitImpulse1) * m_u1.x);
var _local21:Number = ((-(m_pulleyImpulse) - m_limitImpulse1) * m_u1.y);
var _local22:Number = (((-(m_ratio) * m_pulleyImpulse) - m_limitImpulse2) * m_u2.x);
var _local23:Number = (((-(m_ratio) * m_pulleyImpulse) - m_limitImpulse2) * m_u2.y);
_local1.m_linearVelocity.x = (_local1.m_linearVelocity.x + (_local1.m_invMass * _local20));
_local1.m_linearVelocity.y = (_local1.m_linearVelocity.y + (_local1.m_invMass * _local21));
_local1.m_angularVelocity = (_local1.m_angularVelocity + (_local1.m_invI * ((_local4 * _local21) - (_local5 * _local20))));
_local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + (_local2.m_invMass * _local22));
_local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + (_local2.m_invMass * _local23));
_local2.m_angularVelocity = (_local2.m_angularVelocity + (_local2.m_invI * ((_local6 * _local23) - (_local7 * _local22))));
}
override public function GetReactionForce(_arg1:Number):b2Vec2{
return (new b2Vec2());
}
override public function SolvePositionConstraints():Boolean{
var _local3:b2Mat22;
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 _local1:b2Body = m_body1;
var _local2:b2Body = m_body2;
var _local4:Number = (m_ground.m_position.x + m_groundAnchor1.x);
var _local5:Number = (m_ground.m_position.y + m_groundAnchor1.y);
var _local6:Number = (m_ground.m_position.x + m_groundAnchor2.x);
var _local7:Number = (m_ground.m_position.y + m_groundAnchor2.y);
var _local21:Number = 0;
_local3 = _local1.m_R;
_local8 = ((_local3.col1.x * m_localAnchor1.x) + (_local3.col2.x * m_localAnchor1.y));
_local9 = ((_local3.col1.y * m_localAnchor1.x) + (_local3.col2.y * m_localAnchor1.y));
_local3 = _local2.m_R;
_local10 = ((_local3.col1.x * m_localAnchor2.x) + (_local3.col2.x * m_localAnchor2.y));
_local11 = ((_local3.col1.y * m_localAnchor2.x) + (_local3.col2.y * m_localAnchor2.y));
_local12 = (_local1.m_position.x + _local8);
_local13 = (_local1.m_position.y + _local9);
_local14 = (_local2.m_position.x + _local10);
_local15 = (_local2.m_position.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));
_local21 = b2Math.b2Max(_local21, Math.abs(_local18));
_local18 = b2Math.b2Clamp(_local18, -(b2Settings.b2_maxLinearCorrection), b2Settings.b2_maxLinearCorrection);
_local19 = (-(m_pulleyMass) * _local18);
_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_position.x = (_local1.m_position.x + (_local1.m_invMass * _local12));
_local1.m_position.y = (_local1.m_position.y + (_local1.m_invMass * _local13));
_local1.m_rotation = (_local1.m_rotation + (_local1.m_invI * ((_local8 * _local13) - (_local9 * _local12))));
_local2.m_position.x = (_local2.m_position.x + (_local2.m_invMass * _local14));
_local2.m_position.y = (_local2.m_position.y + (_local2.m_invMass * _local15));
_local2.m_rotation = (_local2.m_rotation + (_local2.m_invI * ((_local10 * _local15) - (_local11 * _local14))));
_local1.m_R.Set(_local1.m_rotation);
_local2.m_R.Set(_local2.m_rotation);
if (m_limitState1 == e_atUpperLimit){
_local3 = _local1.m_R;
_local8 = ((_local3.col1.x * m_localAnchor1.x) + (_local3.col2.x * m_localAnchor1.y));
_local9 = ((_local3.col1.y * m_localAnchor1.x) + (_local3.col2.y * m_localAnchor1.y));
_local12 = (_local1.m_position.x + _local8);
_local13 = (_local1.m_position.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);
_local21 = b2Math.b2Max(_local21, -(_local18));
_local18 = b2Math.b2Clamp((_local18 + b2Settings.b2_linearSlop), -(b2Settings.b2_maxLinearCorrection), 0);
_local19 = (-(m_limitMass1) * _local18);
_local20 = m_limitPositionImpulse1;
m_limitPositionImpulse1 = b2Math.b2Max(0, (m_limitPositionImpulse1 + _local19));
_local19 = (m_limitPositionImpulse1 - _local20);
_local12 = (-(_local19) * m_u1.x);
_local13 = (-(_local19) * m_u1.y);
_local1.m_position.x = (_local1.m_position.x + (_local1.m_invMass * _local12));
_local1.m_position.y = (_local1.m_position.y + (_local1.m_invMass * _local13));
_local1.m_rotation = (_local1.m_rotation + (_local1.m_invI * ((_local8 * _local13) - (_local9 * _local12))));
_local1.m_R.Set(_local1.m_rotation);
};
if (m_limitState2 == e_atUpperLimit){
_local3 = _local2.m_R;
_local10 = ((_local3.col1.x * m_localAnchor2.x) + (_local3.col2.x * m_localAnchor2.y));
_local11 = ((_local3.col1.y * m_localAnchor2.x) + (_local3.col2.y * m_localAnchor2.y));
_local14 = (_local2.m_position.x + _local10);
_local15 = (_local2.m_position.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);
_local21 = b2Math.b2Max(_local21, -(_local18));
_local18 = b2Math.b2Clamp((_local18 + b2Settings.b2_linearSlop), -(b2Settings.b2_maxLinearCorrection), 0);
_local19 = (-(m_limitMass2) * _local18);
_local20 = m_limitPositionImpulse2;
m_limitPositionImpulse2 = b2Math.b2Max(0, (m_limitPositionImpulse2 + _local19));
_local19 = (m_limitPositionImpulse2 - _local20);
_local14 = (-(_local19) * m_u2.x);
_local15 = (-(_local19) * m_u2.y);
_local2.m_position.x = (_local2.m_position.x + (_local2.m_invMass * _local14));
_local2.m_position.y = (_local2.m_position.y + (_local2.m_invMass * _local15));
_local2.m_rotation = (_local2.m_rotation + (_local2.m_invI * ((_local10 * _local15) - (_local11 * _local14))));
_local2.m_R.Set(_local2.m_rotation);
};
return ((_local21 < b2Settings.b2_linearSlop));
}
public function GetGroundPoint2():b2Vec2{
return (new b2Vec2((m_ground.m_position.x + m_groundAnchor2.x), (m_ground.m_position.y + m_groundAnchor2.y)));
}
override public function GetReactionTorque(_arg1:Number):Number{
return (0);
}
public function GetGroundPoint1():b2Vec2{
return (new b2Vec2((m_ground.m_position.x + m_groundAnchor1.x), (m_ground.m_position.y + m_groundAnchor1.y)));
}
override public function SolveVelocityConstraints(_arg1:b2StepInfo){
var _local4:b2Mat22;
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 _local2:b2Body = m_body1;
var _local3:b2Body = m_body2;
_local4 = _local2.m_R;
var _local5:Number = ((_local4.col1.x * m_localAnchor1.x) + (_local4.col2.x * m_localAnchor1.y));
var _local6:Number = ((_local4.col1.y * m_localAnchor1.x) + (_local4.col2.y * m_localAnchor1.y));
_local4 = _local3.m_R;
var _local7:Number = ((_local4.col1.x * m_localAnchor2.x) + (_local4.col2.x * m_localAnchor2.y));
var _local8:Number = ((_local4.col1.y * m_localAnchor2.x) + (_local4.col2.y * m_localAnchor2.y));
_local9 = (_local2.m_linearVelocity.x + (-(_local2.m_angularVelocity) * _local6));
_local10 = (_local2.m_linearVelocity.y + (_local2.m_angularVelocity * _local5));
_local11 = (_local3.m_linearVelocity.x + (-(_local3.m_angularVelocity) * _local8));
_local12 = (_local3.m_linearVelocity.y + (_local3.m_angularVelocity * _local7));
_local17 = (-(((m_u1.x * _local9) + (m_u1.y * _local10))) - (m_ratio * ((m_u2.x * _local11) + (m_u2.y * _local12))));
_local18 = (-(m_pulleyMass) * _local17);
m_pulleyImpulse = (m_pulleyImpulse + _local18);
_local13 = (-(_local18) * m_u1.x);
_local14 = (-(_local18) * m_u1.y);
_local15 = ((-(m_ratio) * _local18) * m_u2.x);
_local16 = ((-(m_ratio) * _local18) * m_u2.y);
_local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + (_local2.m_invMass * _local13));
_local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + (_local2.m_invMass * _local14));
_local2.m_angularVelocity = (_local2.m_angularVelocity + (_local2.m_invI * ((_local5 * _local14) - (_local6 * _local13))));
_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 * ((_local7 * _local16) - (_local8 * _local15))));
if (m_limitState1 == e_atUpperLimit){
_local9 = (_local2.m_linearVelocity.x + (-(_local2.m_angularVelocity) * _local6));
_local10 = (_local2.m_linearVelocity.y + (_local2.m_angularVelocity * _local5));
_local17 = -(((m_u1.x * _local9) + (m_u1.y * _local10)));
_local18 = (-(m_limitMass1) * _local17);
_local19 = m_limitImpulse1;
m_limitImpulse1 = b2Math.b2Max(0, (m_limitImpulse1 + _local18));
_local18 = (m_limitImpulse1 - _local19);
_local13 = (-(_local18) * m_u1.x);
_local14 = (-(_local18) * m_u1.y);
_local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + (_local2.m_invMass * _local13));
_local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + (_local2.m_invMass * _local14));
_local2.m_angularVelocity = (_local2.m_angularVelocity + (_local2.m_invI * ((_local5 * _local14) - (_local6 * _local13))));
};
if (m_limitState2 == e_atUpperLimit){
_local11 = (_local3.m_linearVelocity.x + (-(_local3.m_angularVelocity) * _local8));
_local12 = (_local3.m_linearVelocity.y + (_local3.m_angularVelocity * _local7));
_local17 = -(((m_u2.x * _local11) + (m_u2.y * _local12)));
_local18 = (-(m_limitMass2) * _local17);
_local19 = m_limitImpulse2;
m_limitImpulse2 = b2Math.b2Max(0, (m_limitImpulse2 + _local18));
_local18 = (m_limitImpulse2 - _local19);
_local15 = (-(_local18) * m_u2.x);
_local16 = (-(_local18) * m_u2.y);
_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 * ((_local7 * _local16) - (_local8 * _local15))));
};
}
public function GetRatio():Number{
return (m_ratio);
}
public function GetLength2():Number{
var _local1:b2Mat22;
_local1 = m_body2.m_R;
var _local2:Number = (m_body2.m_position.x + ((_local1.col1.x * m_localAnchor2.x) + (_local1.col2.x * m_localAnchor2.y)));
var _local3:Number = (m_body2.m_position.y + ((_local1.col1.y * m_localAnchor2.x) + (_local1.col2.y * m_localAnchor2.y)));
var _local4:Number = (_local2 - (m_ground.m_position.x + m_groundAnchor2.x));
var _local5:Number = (_local3 - (m_ground.m_position.y + m_groundAnchor2.y));
return (Math.sqrt(((_local4 * _local4) + (_local5 * _local5))));
}
}
}//package Engine.Dynamics.Joints
Section 56
//b2PulleyJointDef (Engine.Dynamics.Joints.b2PulleyJointDef)
package Engine.Dynamics.Joints {
import Engine.Common.Math.*;
public class b2PulleyJointDef extends b2JointDef {
public var maxLength1:Number;
public var groundPoint1:b2Vec2;
public var groundPoint2:b2Vec2;
public var ratio:Number;
public var maxLength2:Number;
public var anchorPoint1:b2Vec2;
public var anchorPoint2:b2Vec2;
public function b2PulleyJointDef(){
groundPoint1 = new b2Vec2();
groundPoint2 = new b2Vec2();
anchorPoint1 = new b2Vec2();
anchorPoint2 = new b2Vec2();
super();
type = b2Joint.e_pulleyJoint;
groundPoint1.Set(-1, 1);
groundPoint2.Set(1, 1);
anchorPoint1.Set(-1, 0);
anchorPoint2.Set(1, 0);
maxLength1 = (0.5 * b2PulleyJoint.b2_minPulleyLength);
maxLength2 = (0.5 * b2PulleyJoint.b2_minPulleyLength);
ratio = 1;
collideConnected = true;
}
}
}//package Engine.Dynamics.Joints
Section 57
//b2RevoluteJoint (Engine.Dynamics.Joints.b2RevoluteJoint)
package Engine.Dynamics.Joints {
import Engine.Common.Math.*;
import Engine.Dynamics.*;
import Engine.Common.*;
public class b2RevoluteJoint extends b2Joint {
public var m_enableLimit:Boolean;
public var m_limitState:int;
public var m_ptpMass:b2Mat22;
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 K:b2Mat22;
public var m_limitImpulse:Number;
private var K3:b2Mat22;
public var m_motorImpulse:Number;
public var m_enableMotor:Boolean;
public var m_limitPositionImpulse:Number;
public var m_motorSpeed:Number;
public var m_upperAngle:Number;
public var m_lowerAngle:Number;
public var m_maxMotorTorque:Number;
public var m_ptpImpulse:b2Vec2;
public var m_intialAngle:Number;
static var tImpulse:b2Vec2 = new b2Vec2();
public function b2RevoluteJoint(_arg1:b2RevoluteJointDef){
var _local2:b2Mat22;
var _local3:Number;
var _local4:Number;
K = new b2Mat22();
K1 = new b2Mat22();
K2 = new b2Mat22();
K3 = new b2Mat22();
m_localAnchor1 = new b2Vec2();
m_localAnchor2 = new b2Vec2();
m_ptpImpulse = new b2Vec2();
m_ptpMass = new b2Mat22();
super(_arg1);
_local2 = m_body1.m_R;
_local3 = (_arg1.anchorPoint.x - m_body1.m_position.x);
_local4 = (_arg1.anchorPoint.y - m_body1.m_position.y);
m_localAnchor1.x = ((_local3 * _local2.col1.x) + (_local4 * _local2.col1.y));
m_localAnchor1.y = ((_local3 * _local2.col2.x) + (_local4 * _local2.col2.y));
_local2 = m_body2.m_R;
_local3 = (_arg1.anchorPoint.x - m_body2.m_position.x);
_local4 = (_arg1.anchorPoint.y - m_body2.m_position.y);
m_localAnchor2.x = ((_local3 * _local2.col1.x) + (_local4 * _local2.col1.y));
m_localAnchor2.y = ((_local3 * _local2.col2.x) + (_local4 * _local2.col2.y));
m_intialAngle = (m_body2.m_rotation - m_body1.m_rotation);
m_ptpImpulse.Set(0, 0);
m_motorImpulse = 0;
m_limitImpulse = 0;
m_limitPositionImpulse = 0;
m_lowerAngle = _arg1.lowerAngle;
m_upperAngle = _arg1.upperAngle;
m_maxMotorTorque = _arg1.motorTorque;
m_motorSpeed = _arg1.motorSpeed;
m_enableLimit = _arg1.enableLimit;
m_enableMotor = _arg1.enableMotor;
}
override public function GetAnchor1():b2Vec2{
var _local1:b2Mat22 = m_body1.m_R;
return (new b2Vec2((m_body1.m_position.x + ((_local1.col1.x * m_localAnchor1.x) + (_local1.col2.x * m_localAnchor1.y))), (m_body1.m_position.y + ((_local1.col1.y * m_localAnchor1.x) + (_local1.col2.y * m_localAnchor1.y)))));
}
override public function GetAnchor2():b2Vec2{
var _local1:b2Mat22 = m_body2.m_R;
return (new b2Vec2((m_body2.m_position.x + ((_local1.col1.x * m_localAnchor2.x) + (_local1.col2.x * m_localAnchor2.y))), (m_body2.m_position.y + ((_local1.col1.y * m_localAnchor2.x) + (_local1.col2.y * m_localAnchor2.y)))));
}
override public function PrepareVelocitySolver(){
var _local1:b2Body;
var _local2:b2Body;
var _local3:b2Mat22;
var _local12:Number;
_local1 = m_body1;
_local2 = m_body2;
_local3 = _local1.m_R;
var _local4:Number = ((_local3.col1.x * m_localAnchor1.x) + (_local3.col2.x * m_localAnchor1.y));
var _local5:Number = ((_local3.col1.y * m_localAnchor1.x) + (_local3.col2.y * m_localAnchor1.y));
_local3 = _local2.m_R;
var _local6:Number = ((_local3.col1.x * m_localAnchor2.x) + (_local3.col2.x * m_localAnchor2.y));
var _local7:Number = ((_local3.col1.y * m_localAnchor2.x) + (_local3.col2.y * m_localAnchor2.y));
var _local8:Number = _local1.m_invMass;
var _local9:Number = _local2.m_invMass;
var _local10:Number = _local1.m_invI;
var _local11:Number = _local2.m_invI;
K1.col1.x = (_local8 + _local9);
K1.col2.x = 0;
K1.col1.y = 0;
K1.col2.y = (_local8 + _local9);
K2.col1.x = ((_local10 * _local5) * _local5);
K2.col2.x = ((-(_local10) * _local4) * _local5);
K2.col1.y = ((-(_local10) * _local4) * _local5);
K2.col2.y = ((_local10 * _local4) * _local4);
K3.col1.x = ((_local11 * _local7) * _local7);
K3.col2.x = ((-(_local11) * _local6) * _local7);
K3.col1.y = ((-(_local11) * _local6) * _local7);
K3.col2.y = ((_local11 * _local6) * _local6);
K.SetM(K1);
K.AddM(K2);
K.AddM(K3);
K.Invert(m_ptpMass);
m_motorMass = (1 / (_local10 + _local11));
if (m_enableMotor == false){
m_motorImpulse = 0;
};
if (m_enableLimit){
_local12 = ((_local2.m_rotation - _local1.m_rotation) - m_intialAngle);
if (b2Math.b2Abs((m_upperAngle - m_lowerAngle)) < (2 * b2Settings.b2_angularSlop)){
m_limitState = e_equalLimits;
} else {
if (_local12 <= m_lowerAngle){
if (m_limitState != e_atLowerLimit){
m_limitImpulse = 0;
};
m_limitState = e_atLowerLimit;
} else {
if (_local12 >= m_upperAngle){
if (m_limitState != e_atUpperLimit){
m_limitImpulse = 0;
};
m_limitState = e_atUpperLimit;
} else {
m_limitState = e_inactiveLimit;
m_limitImpulse = 0;
};
};
};
} else {
m_limitImpulse = 0;
};
if (b2World.s_enableWarmStarting){
_local1.m_linearVelocity.x = (_local1.m_linearVelocity.x - (_local8 * m_ptpImpulse.x));
_local1.m_linearVelocity.y = (_local1.m_linearVelocity.y - (_local8 * m_ptpImpulse.y));
_local1.m_angularVelocity = (_local1.m_angularVelocity - (_local10 * ((((_local4 * m_ptpImpulse.y) - (_local5 * m_ptpImpulse.x)) + m_motorImpulse) + m_limitImpulse)));
_local2.m_linearVelocity.x = (_local2.m_linearVelocity.x + (_local9 * m_ptpImpulse.x));
_local2.m_linearVelocity.y = (_local2.m_linearVelocity.y + (_local9 * m_ptpImpulse.y));
_local2.m_angularVelocity = (_local2.m_angularVelocity + (_local11 * ((((_local6 * m_ptpImpulse.y) - (_local7 * m_ptpImpulse.x)) + m_motorImpulse) + m_limitImpulse)));
} else {
m_ptpImpulse.SetZero();
m_motorImpulse = 0;
m_limitImpulse = 0;
};
m_limitPositionImpulse = 0;
}
override public function GetReactionForce(_arg1:Number):b2Vec2{
var _local2:b2Vec2 = m_ptpImpulse.Copy();
_local2.Multiply(_arg1);
return (_local2);
}
override public function SolvePositionConstraints():Boolean{
var _local1:Number;
var _local2:Number;
var _local6:b2Mat22;
var _local24:Number;
var _local25:Number;
var _local3:b2Body = m_body1;
var _local4:b2Body = m_body2;
var _local5:Number = 0;
_local6 = _local3.m_R;
var _local7:Number = ((_local6.col1.x * m_localAnchor1.x) + (_local6.col2.x * m_localAnchor1.y));
var _local8:Number = ((_local6.col1.y * m_localAnchor1.x) + (_local6.col2.y * m_localAnchor1.y));
_local6 = _local4.m_R;
var _local9:Number = ((_local6.col1.x * m_localAnchor2.x) + (_local6.col2.x * m_localAnchor2.y));
var _local10:Number = ((_local6.col1.y * m_localAnchor2.x) + (_local6.col2.y * m_localAnchor2.y));
var _local11:Number = (_local3.m_position.x + _local7);
var _local12:Number = (_local3.m_position.y + _local8);
var _local13:Number = (_local4.m_position.x + _local9);
var _local14:Number = (_local4.m_position.y + _local10);
var _local15:Number = (_local13 - _local11);
var _local16:Number = (_local14 - _local12);
_local5 = Math.sqrt(((_local15 * _local15) + (_local16 * _local16)));
var _local17:Number = _local3.m_invMass;
var _local18:Number = _local4.m_invMass;
var _local19:Number = _local3.m_invI;
var _local20:Number = _local4.m_invI;
K1.col1.x = (_local17 + _local18);
K1.col2.x = 0;
K1.col1.y = 0;
K1.col2.y = (_local17 + _local18);
K2.col1.x = ((_local19 * _local8) * _local8);
K2.col2.x = ((-(_local19) * _local7) * _local8);
K2.col1.y = ((-(_local19) * _local7) * _local8);
K2.col2.y = ((_local19 * _local7) * _local7);
K3.col1.x = ((_local20 * _local10) * _local10);
K3.col2.x = ((-(_local20) * _local9) * _local10);
K3.col1.y = ((-(_local20) * _local9) * _local10);
K3.col2.y = ((_local20 * _local9) * _local9);
K.SetM(K1);
K.AddM(K2);
K.AddM(K3);
K.Solve(tImpulse, -(_local15), -(_local16));
var _local21:Number = tImpulse.x;
var _local22:Number = tImpulse.y;
_local3.m_position.x = (_local3.m_position.x - (_local3.m_invMass * _local21));
_local3.m_position.y = (_local3.m_position.y - (_local3.m_invMass * _local22));
_local3.m_rotation = (_local3.m_rotation - (_local3.m_invI * ((_local7 * _local22) - (_local8 * _local21))));
_local3.m_R.Set(_local3.m_rotation);
_local4.m_position.x = (_local4.m_position.x + (_local4.m_invMass * _local21));
_local4.m_position.y = (_local4.m_position.y + (_local4.m_invMass * _local22));
_local4.m_rotation = (_local4.m_rotation + (_local4.m_invI * ((_local9 * _local22) - (_local10 * _local21))));
_local4.m_R.Set(_local4.m_rotation);
var _local23:Number = 0;
if (((m_enableLimit) && (!((m_limitState == e_inactiveLimit))))){
_local24 = ((_local4.m_rotation - _local3.m_rotation) - m_intialAngle);
_local25 = 0;
if (m_limitState == e_equalLimits){
_local2 = b2Math.b2Clamp(_local24, -(b2Settings.b2_maxAngularCorrection), b2Settings.b2_maxAngularCorrection);
_local25 = (-(m_motorMass) * _local2);
_local23 = b2Math.b2Abs(_local2);
} else {
if (m_limitState == e_atLowerLimit){
_local2 = (_local24 - m_lowerAngle);
_local23 = b2Math.b2Max(0, -(_local2));
_local2 = b2Math.b2Clamp((_local2 + b2Settings.b2_angularSlop), -(b2Settings.b2_maxAngularCorrection), 0);
_local25 = (-(m_motorMass) * _local2);
_local1 = m_limitPositionImpulse;
m_limitPositionImpulse = b2Math.b2Max((m_limitPositionImpulse + _local25), 0);
_local25 = (m_limitPositionImpulse - _local1);
} else {
if (m_limitState == e_atUpperLimit){
_local2 = (_local24 - m_upperAngle);
_local23 = b2Math.b2Max(0, _local2);
_local2 = b2Math.b2Clamp((_local2 - b2Settings.b2_angularSlop), 0, b2Settings.b2_maxAngularCorrection);
_local25 = (-(m_motorMass) * _local2);
_local1 = m_limitPositionImpulse;
m_limitPositionImpulse = b2Math.b2Min((m_limitPositionImpulse + _local25), 0);
_local25 = (m_limitPositionImpulse - _local1);
};
};
};
_local3.m_rotation = (_local3.m_rotation - (_local3.m_invI * _local25));
_local3.m_R.Set(_local3.m_rotation);
_local4.m_rotation = (_local4.m_rotation + (_local4.m_invI * _local25));
_local4.m_R.Set(_local4.m_rotation);
};
return ((((_local5 <= b2Settings.b2_linearSlop)) && ((_local23 <= b2Settings.b2_angularSlop))));
}
public function SetMotorSpeed(_arg1:Number){
m_motorSpeed = _arg1;
}
public function GetJointSpeed():Number{
return ((m_body2.m_angularVelocity - m_body1.m_angularVelocity));
}
public function SetMotorTorque(_arg1:Number){
m_maxMotorTorque = _arg1;
}
public function GetJointAngle():Number{
return ((m_body2.m_rotation - m_body1.m_rotation));
}
public function GetMotorTorque(_arg1:Number):Number{
return ((_arg1 * m_motorImpulse));
}
override public function GetReactionTorque(_arg1:Number):Number{
return ((_arg1 * m_limitImpulse));
}
override public function SolveVelocityConstraints(_arg1:b2StepInfo){
var _local4:b2Mat22;
var _local9:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local2:b2Body = m_body1;
var _local3:b2Body = m_body2;
_local4 = _local2.m_R;
var _local5:Number = ((_local4.col1.x * m_localAnchor1.x) + (_local4.col2.x * m_localAnchor1.y));
var _local6:Number = ((_local4.col1.y * m_localAnchor1.x) + (_local4.col2.y * m_localAnchor1.y));
_local4 = _local3.m_R;
var _local7:Number = ((_local4.col1.x * m_localAnchor2.x) + (_local4.col2.x * m_localAnchor2.y));
var _local8:Number = ((_local4.col1.y * m_localAnchor2.x) + (_local4.col2.y * m_localAnchor2.y));
var _local10:Number = (((_local3.m_linearVelocity.x + (-(_local3.m_angularVelocity) * _local8)) - _local2.m_linearVelocity.x) - (-(_local2.m_angularVelocity) * _local6));
var _local11:Number = (((_local3.m_linearVelocity.y + (_local3.m_angularVelocity * _local7)) - _local2.m_linearVelocity.y) - (_local2.m_angularVelocity * _local5));
var _local12:Number = -(((m_ptpMass.col1.x * _local10) + (m_ptpMass.col2.x * _local11)));
var _local13:Number = -(((m_ptpMass.col1.y * _local10) + (m_ptpMass.col2.y * _local11)));
m_ptpImpulse.x = (m_ptpImpulse.x + _local12);
m_ptpImpulse.y = (m_ptpImpulse.y + _local13);
_local2.m_linearVelocity.x = (_local2.m_linearVelocity.x - (_local2.m_invMass * _local12));
_local2.m_linearVelocity.y = (_local2.m_linearVelocity.y - (_local2.m_invMass * _local13));
_local2.m_angularVelocity = (_local2.m_angularVelocity - (_local2.m_invI * ((_local5 * _local13) - (_local6 * _local12))));
_local3.m_linearVelocity.x = (_local3.m_linearVelocity.x + (_local3.m_invMass * _local12));
_local3.m_linearVelocity.y = (_local3.m_linearVelocity.y + (_local3.m_invMass * _local13));
_local3.m_angularVelocity = (_local3.m_angularVelocity + (_local3.m_invI * ((_local7 * _local13) - (_local8 * _local12))));
if (((m_enableMotor) && (!((m_limitState == e_equalLimits))))){
_local14 = ((_local3.m_angularVelocity - _local2.m_angularVelocity) - m_motorSpeed);
_local15 = (-(m_motorMass) * _local14);
_local16 = m_motorImpulse;
m_motorImpulse = b2Math.b2Clamp((m_motorImpulse + _local15), (-(_arg1.dt) * m_maxMotorTorque), (_arg1.dt * m_maxMotorTorque));
_local15 = (m_motorImpulse - _local16);
_local2.m_angularVelocity = (_local2.m_angularVelocity - (_local2.m_invI * _local15));
_local3.m_angularVelocity = (_local3.m_angularVelocity + (_local3.m_invI * _local15));
};
if (((m_enableLimit) && (!((m_limitState == e_inactiveLimit))))){
_local17 = (_local3.m_angularVelocity - _local2.m_angularVelocity);
_local18 = (-(m_motorMass) * _local17);
if (m_limitState == e_equalLimits){
m_limitImpulse = (m_limitImpulse + _local18);
} else {
if (m_limitState == e_atLowerLimit){
_local9 = m_limitImpulse;
m_limitImpulse = b2Math.b2Max((m_limitImpulse + _local18), 0);
_local18 = (m_limitImpulse - _local9);
} else {
if (m_limitState == e_atUpperLimit){
_local9 = m_limitImpulse;
m_limitImpulse = b2Math.b2Min((m_limitImpulse + _local18), 0);
_local18 = (m_limitImpulse - _local9);
};
};
};
_local2.m_angularVelocity = (_local2.m_angularVelocity - (_local2.m_invI * _local18));
_local3.m_angularVelocity = (_local3.m_angularVelocity + (_local3.m_invI * _local18));
};
}
}
}//package Engine.Dynamics.Joints
Section 58
//b2RevoluteJointDef (Engine.Dynamics.Joints.b2RevoluteJointDef)
package Engine.Dynamics.Joints {
import Engine.Common.Math.*;
public class b2RevoluteJointDef extends b2JointDef {
public var enableMotor:Boolean;
public var upperAngle:Number;
public var lowerAngle:Number;
public var enableLimit:Boolean;
public var motorSpeed:Number;
public var anchorPoint:b2Vec2;
public var motorTorque:Number;
public function b2RevoluteJointDef(){
type = b2Joint.e_revoluteJoint;
anchorPoint = new b2Vec2(0, 0);
lowerAngle = 0;
upperAngle = 0;
motorTorque = 0;
motorSpeed = 0;
enableLimit = false;
enableMotor = false;
}
}
}//package Engine.Dynamics.Joints
Section 59
//b2Body (Engine.Dynamics.b2Body)
package Engine.Dynamics {
import Engine.Collision.Shapes.*;
import Engine.Common.Math.*;
import Engine.Dynamics.Joints.*;
import Engine.Dynamics.Contacts.*;
import Engine.Common.*;
public class b2Body {
public var m_next:b2Body;
public var m_R:b2Mat22;
public var m_contactList:b2ContactNode;
public var m_angularVelocity:Number;
public var m_rotation:Number;
public var m_shapeList:b2Shape;
public var m_force:b2Vec2;
public var m_torque:Number;
public var m_mass:Number;
public var m_userData;
public var m_invI:Number;
public var m_shapeCount:int;
public var m_linearVelocity:b2Vec2;
public var m_invMass:Number;
public var m_position:b2Vec2;
public var m_flags:uint;
public var m_world:b2World;
public var m_linearDamping:Number;
public var m_prev:b2Body;
public var m_angularDamping:Number;
public var m_center:b2Vec2;
public var m_sleepTime:Number;
public var m_I:Number;
public var m_jointList:b2JointNode;
public static var e_frozenFlag:uint = 2;
public static var e_sleepFlag:uint = 8;
public static var e_islandFlag:uint = 4;
public static var e_destroyFlag:uint = 32;
public static var e_allowSleepFlag:uint = 16;
public static var e_staticFlag:uint = 1;
public function b2Body(_arg1:b2BodyDef, _arg2:b2World){
var _local3:int;
var _local4:b2ShapeDef;
var _local5:b2MassData;
var _local7:b2Vec2;
var _local8:b2Shape;
m_position = new b2Vec2();
m_R = new b2Mat22(0);
super();
m_flags = 0;
m_position.SetV(_arg1.position);
m_rotation = _arg1.rotation;
m_R.Set(m_rotation);
m_world = _arg2;
m_linearDamping = b2Math.b2Clamp((1 - _arg1.linearDamping), 0, 1);
m_angularDamping = b2Math.b2Clamp((1 - _arg1.angularDamping), 0, 1);
m_force = new b2Vec2(0, 0);
m_torque = 0;
m_mass = 0;
var _local6:Array = new Array(b2Settings.b2_maxShapesPerBody);
_local3 = 0;
while (_local3 < b2Settings.b2_maxShapesPerBody) {
_local6[_local3] = new b2MassData();
_local3++;
};
m_shapeCount = 0;
m_center = new b2Vec2(0, 0);
_local3 = 0;
while (_local3 < b2Settings.b2_maxShapesPerBody) {
_local4 = _arg1.shapes[_local3];
if (_local4 == null){
break;
};
_local5 = _local6[_local3];
_local4.ComputeMass(_local5);
m_mass = (m_mass + _local5.mass);
m_center.Add(b2Math.MulFV(_local5.mass, b2Math.AddVV(_local4.localPosition, _local5.center)));
m_shapeCount++;
_local3++;
};
if (m_mass > 0){
m_center.Multiply((1 / m_mass));
m_position.Add(b2Math.b2MulMV(m_R, m_center));
} else {
m_flags = (m_flags | e_staticFlag);
};
m_I = 0;
_local3 = 0;
while (_local3 < m_shapeCount) {
_local4 = _arg1.shapes[_local3];
_local5 = _local6[_local3];
m_I = (m_I + _local5.I);
_local7 = b2Math.SubtractVV(b2Math.AddVV(_local4.localPosition, _local5.center), m_center);
m_I = (m_I + (_local5.mass * b2Math.b2Dot(_local7, _local7)));
_local3++;
};
if (m_mass > 0){
m_invMass = (1 / m_mass);
} else {
m_invMass = 0;
};
if ((((m_I > 0)) && ((_arg1.preventRotation == false)))){
m_invI = (1 / m_I);
} else {
m_I = 0;
m_invI = 0;
};
m_linearVelocity = b2Math.AddVV(_arg1.linearVelocity, b2Math.b2CrossFV(_arg1.angularVelocity, m_center));
m_angularVelocity = _arg1.angularVelocity;
m_jointList = null;
m_contactList = null;
m_prev = null;
m_next = null;
m_shapeList = null;
_local3 = 0;
while (_local3 < m_shapeCount) {
_local4 = _arg1.shapes[_local3];
_local8 = b2Shape.Create(_local4, this, m_center);
_local8.m_next = m_shapeList;
m_shapeList = _local8;
_local3++;
};
m_sleepTime = 0;
if (_arg1.allowSleep){
m_flags = (m_flags | e_allowSleepFlag);
};
if (_arg1.isSleeping){
m_flags = (m_flags | e_sleepFlag);
};
if ((((m_flags & e_sleepFlag)) || ((m_invMass == 0)))){
m_linearVelocity.Set(0, 0);
m_angularVelocity = 0;
};
m_userData = _arg1.userData;
}
public function SetCenterPosition(_arg1:b2Vec2, _arg2:Number){
if (IsFrozen()){
return;
};
m_rotation = _arg2;
m_R.Set(m_rotation);
m_position.SetV(_arg1);
var _local3:b2Shape = m_shapeList;
while (_local3 != null) {
_local3.Synchronize(m_position, m_R);
_local3 = _local3.m_next;
};
m_world.m_broadPhase.Flush();
}
public function GetWorldPoint(_arg1:b2Vec2):b2Vec2{
return (b2Math.AddVV(m_position, b2Math.b2MulMV(m_R, _arg1)));
}
public function SetLinearVelocity(_arg1:b2Vec2){
m_linearVelocity.SetV(_arg1);
}
public function WakeUp(){
m_flags = (m_flags & ~(e_sleepFlag));
m_sleepTime = 0;
}
public function IsFrozen():Boolean{
return (((m_flags & e_frozenFlag) == e_frozenFlag));
}
public function IsSleeping():Boolean{
return (((m_flags & e_sleepFlag) == e_sleepFlag));
}
public function GetInertia():Number{
return (m_I);
}
public function GetLocalVector(_arg1:b2Vec2):b2Vec2{
return (b2Math.b2MulTMV(m_R, _arg1));
}
public function GetJointList():b2JointNode{
return (m_jointList);
}
public function GetRotationMatrix():b2Mat22{
return (m_R);
}
public function Freeze(){
m_flags = (m_flags | e_frozenFlag);
m_linearVelocity.SetZero();
m_angularVelocity = 0;
}
public function SetAngularVelocity(_arg1:Number){
m_angularVelocity = _arg1;
}
public function SynchronizeShapes(){
var _local1:b2Shape = m_shapeList;
while (_local1 != null) {
_local1.Synchronize(m_position, m_R);
_local1 = _local1.m_next;
};
}
public function ApplyForce(_arg1:b2Vec2, _arg2:b2Vec2){
if (IsSleeping() == false){
m_force.Add(_arg1);
m_torque = (m_torque + b2Math.b2CrossVV(b2Math.SubtractVV(_arg2, m_position), _arg1));
};
}
public function GetOriginPosition():b2Vec2{
return (b2Math.SubtractVV(m_position, b2Math.b2MulMV(m_R, m_center)));
}
public function ApplyImpulse(_arg1:b2Vec2, _arg2:b2Vec2){
if (IsSleeping() == false){
m_linearVelocity.Add(b2Math.MulFV(m_invMass, _arg1));
m_angularVelocity = (m_angularVelocity + (m_invI * b2Math.b2CrossVV(b2Math.SubtractVV(_arg2, m_position), _arg1)));
};
}
public function GetContactList():b2ContactNode{
return (m_contactList);
}
public function GetShapeList():b2Shape{
return (m_shapeList);
}
public function GetMass():Number{
return (m_mass);
}
public function GetAngularVelocity():Number{
return (m_angularVelocity);
}
public function SetOriginPosition(_arg1:b2Vec2, _arg2:Number){
if (IsFrozen()){
return;
};
m_rotation = _arg2;
m_R.Set(m_rotation);
m_position = b2Math.AddVV(_arg1, b2Math.b2MulMV(m_R, m_center));
var _local3:b2Shape = m_shapeList;
while (_local3 != null) {
_local3.Synchronize(m_position, m_R);
_local3 = _local3.m_next;
};
m_world.m_broadPhase.Flush();
}
public function GetLocalPoint(_arg1:b2Vec2):b2Vec2{
return (b2Math.b2MulTMV(m_R, b2Math.SubtractVV(_arg1, m_position)));
}
public function GetRotation():Number{
return (m_rotation);
}
public function IsStatic():Boolean{
return (((m_flags & e_staticFlag) == e_staticFlag));
}
public function Destroy(){
var _local2:b2Shape;
var _local1:b2Shape = m_shapeList;
while (_local1) {
_local2 = _local1;
_local1 = _local1.m_next;
b2Shape.Destroy(_local2);
};
}
public function GetWorldVector(_arg1:b2Vec2):b2Vec2{
return (b2Math.b2MulMV(m_R, _arg1));
}
public function GetNext():b2Body{
return (m_next);
}
public function IsConnected(_arg1:b2Body):Boolean{
var _local2:b2JointNode = m_jointList;
while (_local2 != null) {
if (_local2.other == _arg1){
return ((_local2.joint.m_collideConnected == false));
};
_local2 = _local2.next;
};
return (false);
}
public function GetUserData(){
return (m_userData);
}
public function AllowSleeping(_arg1:Boolean){
if (_arg1){
m_flags = (m_flags | e_allowSleepFlag);
} else {
m_flags = (m_flags & ~(e_allowSleepFlag));
WakeUp();
};
}
public function ApplyTorque(_arg1:Number){
if (IsSleeping() == false){
m_torque = (m_torque + _arg1);
};
}
public function GetCenterPosition():b2Vec2{
return (m_position);
}
public function GetLinearVelocity():b2Vec2{
return (m_linearVelocity);
}
}
}//package Engine.Dynamics
Section 60
//b2BodyDef (Engine.Dynamics.b2BodyDef)
package Engine.Dynamics {
import Engine.Collision.Shapes.*;
import Engine.Common.Math.*;
import Engine.Common.*;
public class b2BodyDef {
public var angularDamping:Number;
public var linearVelocity:b2Vec2;
public var position:b2Vec2;
public var isSleeping:Boolean;
public var allowSleep:Boolean;
public var userData;
public var preventRotation:Boolean;
public var shapes:Array;
public var linearDamping:Number;
public var rotation:Number;
public var angularVelocity:Number;
public function b2BodyDef(){
shapes = new Array();
super();
userData = null;
var _local1:int;
while (_local1 < b2Settings.b2_maxShapesPerBody) {
shapes[_local1] = null;
_local1++;
};
position = new b2Vec2(0, 0);
rotation = 0;
linearVelocity = new b2Vec2(0, 0);
angularVelocity = 0;
linearDamping = 0;
angularDamping = 0;
allowSleep = true;
isSleeping = false;
preventRotation = false;
}
public function AddShape(_arg1:b2ShapeDef){
var _local2:int;
while (_local2 < b2Settings.b2_maxShapesPerBody) {
if (shapes[_local2] == null){
shapes[_local2] = _arg1;
break;
};
_local2++;
};
}
}
}//package Engine.Dynamics
Section 61
//b2ContactManager (Engine.Dynamics.b2ContactManager)
package Engine.Dynamics {
import Engine.Collision.Shapes.*;
import Engine.Collision.*;
import Engine.Dynamics.Contacts.*;
public class b2ContactManager extends b2PairCallback {
public var m_world:b2World;
public var m_destroyImmediate:Boolean;
public var m_nullContact:b2NullContact;
public function b2ContactManager(){
m_nullContact = new b2NullContact();
super();
m_world = null;
m_destroyImmediate = false;
}
public function Collide(){
var _local1:b2Body;
var _local2:b2Body;
var _local3:b2ContactNode;
var _local4:b2ContactNode;
var _local6:int;
var _local7:int;
var _local5:b2Contact = m_world.m_contactList;
while (_local5 != null) {
if (((_local5.m_shape1.m_body.IsSleeping()) && (_local5.m_shape2.m_body.IsSleeping()))){
} else {
_local6 = _local5.GetManifoldCount();
_local5.Evaluate();
_local7 = _local5.GetManifoldCount();
if ((((_local6 == 0)) && ((_local7 > 0)))){
_local1 = _local5.m_shape1.m_body;
_local2 = _local5.m_shape2.m_body;
_local3 = _local5.m_node1;
_local4 = _local5.m_node2;
_local3.contact = _local5;
_local3.other = _local2;
_local3.prev = null;
_local3.next = _local1.m_contactList;
if (_local3.next != null){
_local3.next.prev = _local5.m_node1;
};
_local1.m_contactList = _local5.m_node1;
_local4.contact = _local5;
_local4.other = _local1;
_local4.prev = null;
_local4.next = _local2.m_contactList;
if (_local4.next != null){
_local4.next.prev = _local4;
};
_local2.m_contactList = _local4;
} else {
if ((((_local6 > 0)) && ((_local7 == 0)))){
_local1 = _local5.m_shape1.m_body;
_local2 = _local5.m_shape2.m_body;
_local3 = _local5.m_node1;
_local4 = _local5.m_node2;
if (_local3.prev){
_local3.prev.next = _local3.next;
};
if (_local3.next){
_local3.next.prev = _local3.prev;
};
if (_local3 == _local1.m_contactList){
_local1.m_contactList = _local3.next;
};
_local3.prev = null;
_local3.next = null;
if (_local4.prev){
_local4.prev.next = _local4.next;
};
if (_local4.next){
_local4.next.prev = _local4.prev;
};
if (_local4 == _local2.m_contactList){
_local2.m_contactList = _local4.next;
};
_local4.prev = null;
_local4.next = null;
};
};
};
_local5 = _local5.m_next;
};
}
public function CleanContactList(){
var _local2:b2Contact;
var _local1:b2Contact = m_world.m_contactList;
while (_local1 != null) {
_local2 = _local1;
_local1 = _local1.m_next;
if ((_local2.m_flags & b2Contact.e_destroyFlag)){
DestroyContact(_local2);
_local2 = null;
};
};
}
public function DestroyContact(_arg1:b2Contact){
var _local2:b2Body;
var _local3:b2Body;
var _local4:b2ContactNode;
var _local5:b2ContactNode;
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;
};
if (_arg1.GetManifoldCount() > 0){
_local2 = _arg1.m_shape1.m_body;
_local3 = _arg1.m_shape2.m_body;
_local4 = _arg1.m_node1;
_local5 = _arg1.m_node2;
_local2.WakeUp();
_local3.WakeUp();
if (_local4.prev){
_local4.prev.next = _local4.next;
};
if (_local4.next){
_local4.next.prev = _local4.prev;
};
if (_local4 == _local2.m_contactList){
_local2.m_contactList = _local4.next;
};
_local4.prev = null;
_local4.next = null;
if (_local5.prev){
_local5.prev.next = _local5.next;
};
if (_local5.next){
_local5.next.prev = _local5.prev;
};
if (_local5 == _local3.m_contactList){
_local3.m_contactList = _local5.next;
};
_local5.prev = null;
_local5.next = null;
};
b2Contact.Destroy(_arg1, m_world.m_blockAllocator);
m_world.m_contactCount--;
}
override public function PairRemoved(_arg1, _arg2, _arg3){
if (_arg3 == null){
return;
};
var _local4:b2Contact = (_arg3 as b2Contact);
if (_local4 != m_nullContact){
if (m_destroyImmediate == true){
DestroyContact(_local4);
_local4 = null;
} else {
_local4.m_flags = (_local4.m_flags | b2Contact.e_destroyFlag);
};
};
}
override public function PairAdded(_arg1, _arg2){
var _local8:b2Shape;
var _local9:b2Body;
var _local3:b2Shape = (_arg1 as b2Shape);
var _local4:b2Shape = (_arg2 as b2Shape);
var _local5:b2Body = _local3.m_body;
var _local6:b2Body = _local4.m_body;
if (((_local5.IsStatic()) && (_local6.IsStatic()))){
return (m_nullContact);
};
if (_local3.m_body == _local4.m_body){
return (m_nullContact);
};
if (_local6.m_invMass == 0){
_local8 = _local3;
_local3 = _local4;
_local4 = _local8;
_local9 = _local5;
_local5 = _local6;
_local6 = _local9;
};
if (_local6.IsConnected(_local5)){
return (m_nullContact);
};
var _local7:b2Contact = b2Contact.Create(_local3, _local4, m_world.m_blockAllocator);
if (_local7 == null){
return (m_nullContact);
};
_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;
m_world.m_contactCount++;
return (_local7);
}
}
}//package Engine.Dynamics
Section 62
//b2Island (Engine.Dynamics.b2Island)
package Engine.Dynamics {
import Engine.Common.Math.*;
import Engine.Dynamics.Joints.*;
import Engine.Dynamics.Contacts.*;
import Engine.Common.*;
public class b2Island {
public var m_positionError:Number;
public var m_bodyCapacity:int;
public var m_bodies:Array;
public var m_joints: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;
public static var m_positionIterationCount;
public function b2Island(_arg1:int, _arg2:int, _arg3:int, _arg4){
var _local5:int;
super();
m_bodyCapacity = _arg1;
m_contactCapacity = _arg2;
m_jointCapacity = _arg3;
m_bodyCount = 0;
m_contactCount = 0;
m_jointCount = 0;
m_bodies = new Array(_arg1);
_local5 = 0;
while (_local5 < _arg1) {
m_bodies[_local5] = null;
_local5++;
};
m_contacts = new Array(_arg2);
_local5 = 0;
while (_local5 < _arg2) {
m_contacts[_local5] = null;
_local5++;
};
m_joints = new Array(_arg3);
_local5 = 0;
while (_local5 < _arg3) {
m_joints[_local5] = null;
_local5++;
};
m_allocator = _arg4;
}
public function AddBody(_arg1:b2Body){
var _local2 = m_bodyCount++;
m_bodies[_local2] = _arg1;
}
public function AddJoint(_arg1:b2Joint){
var _local2 = m_jointCount++;
m_joints[_local2] = _arg1;
}
public function AddContact(_arg1:b2Contact){
var _local2 = m_contactCount++;
m_contacts[_local2] = _arg1;
}
public function Solve(_arg1:b2StepInfo, _arg2:b2Vec2){
var _local3:int;
var _local4:b2Body;
var _local6:int;
var _local7:Boolean;
var _local8:Boolean;
var _local9:Boolean;
_local3 = 0;
while (_local3 < m_bodyCount) {
_local4 = m_bodies[_local3];
if (_local4.m_invMass == 0){
} else {
_local4.m_linearVelocity.Add(b2Math.MulFV(_arg1.dt, b2Math.AddVV(_arg2, b2Math.MulFV(_local4.m_invMass, _local4.m_force))));
_local4.m_angularVelocity = (_local4.m_angularVelocity + ((_arg1.dt * _local4.m_invI) * _local4.m_torque));
_local4.m_linearVelocity.Multiply(_local4.m_linearDamping);
_local4.m_angularVelocity = (_local4.m_angularVelocity * _local4.m_angularDamping);
};
_local3++;
};
var _local5:b2ContactSolver = new b2ContactSolver(m_contacts, m_contactCount, m_allocator);
_local5.PreSolve();
_local3 = 0;
while (_local3 < m_jointCount) {
m_joints[_local3].PrepareVelocitySolver();
_local3++;
};
_local3 = 0;
while (_local3 < _arg1.iterations) {
_local5.SolveVelocityConstraints();
_local6 = 0;
while (_local6 < m_jointCount) {
m_joints[_local6].SolveVelocityConstraints(_arg1);
_local6++;
};
_local3++;
};
_local3 = 0;
while (_local3 < m_bodyCount) {
_local4 = m_bodies[_local3];
if (_local4.m_invMass == 0){
} else {
_local4.m_position.x = (_local4.m_position.x + (_arg1.dt * _local4.m_linearVelocity.x));
_local4.m_position.y = (_local4.m_position.y + (_arg1.dt * _local4.m_linearVelocity.y));
_local4.m_rotation = (_local4.m_rotation + (_arg1.dt * _local4.m_angularVelocity));
_local4.m_R.Set(_local4.m_rotation);
};
_local3++;
};
_local3 = 0;
while (_local3 < m_jointCount) {
m_joints[_local3].PreparePositionSolver();
_local3++;
};
if (b2World.s_enablePositionCorrection){
m_positionIterationCount = 0;
while (m_positionIterationCount < _arg1.iterations) {
_local7 = _local5.SolvePositionConstraints(b2Settings.b2_contactBaumgarte);
_local8 = true;
_local3 = 0;
while (_local3 < m_jointCount) {
_local9 = m_joints[_local3].SolvePositionConstraints();
_local8 = ((_local8) && (_local9));
_local3++;
};
if (((_local7) && (_local8))){
break;
};
m_positionIterationCount++;
};
};
_local5.PostSolve();
_local3 = 0;
while (_local3 < m_bodyCount) {
_local4 = m_bodies[_local3];
if (_local4.m_invMass == 0){
} else {
_local4.m_R.Set(_local4.m_rotation);
_local4.SynchronizeShapes();
_local4.m_force.Set(0, 0);
_local4.m_torque = 0;
};
_local3++;
};
}
public function Clear(){
m_bodyCount = 0;
m_contactCount = 0;
m_jointCount = 0;
}
public function UpdateSleep(_arg1:Number){
var _local2:int;
var _local3:b2Body;
var _local4:Number = Number.MAX_VALUE;
var _local5:Number = (b2Settings.b2_linearSleepTolerance * b2Settings.b2_linearSleepTolerance);
var _local6:Number = (b2Settings.b2_angularSleepTolerance * b2Settings.b2_angularSleepTolerance);
_local2 = 0;
while (_local2 < m_bodyCount) {
_local3 = m_bodies[_local2];
if (_local3.m_invMass == 0){
} else {
if ((_local3.m_flags & b2Body.e_allowSleepFlag) == 0){
_local3.m_sleepTime = 0;
_local4 = 0;
};
if (((((((_local3.m_flags & b2Body.e_allowSleepFlag) == 0)) || (((_local3.m_angularVelocity * _local3.m_angularVelocity) > _local6)))) || ((b2Math.b2Dot(_local3.m_linearVelocity, _local3.m_linearVelocity) > _local5)))){
_local3.m_sleepTime = 0;
_local4 = 0;
} else {
_local3.m_sleepTime = (_local3.m_sleepTime + _arg1);
_local4 = b2Math.b2Min(_local4, _local3.m_sleepTime);
};
};
_local2++;
};
if (_local4 >= b2Settings.b2_timeToSleep){
_local2 = 0;
while (_local2 < m_bodyCount) {
_local3 = m_bodies[_local2];
_local3.m_flags = (_local3.m_flags | b2Body.e_sleepFlag);
_local2++;
};
};
}
}
}//package Engine.Dynamics
Section 63
//b2StepInfo (Engine.Dynamics.b2StepInfo)
package Engine.Dynamics {
public class b2StepInfo {
public var dt:Number;
public var iterations:int;
public var inv_dt:Number;
}
}//package Engine.Dynamics
Section 64
//b2World (Engine.Dynamics.b2World)
package Engine.Dynamics {
import Engine.Collision.Shapes.*;
import Engine.Collision.*;
import Engine.Common.Math.*;
import Engine.Dynamics.Joints.*;
import Engine.Dynamics.Contacts.*;
public class b2World {
public var m_bodyCount:int;
public var m_gravity:b2Vec2;
public var m_listener:b2WorldListener;
private var step:b2StepInfo;
public var m_positionIterationCount:int;
public var m_contactList:b2Contact;
public var m_blockAllocator;
public var m_groundBody:b2Body;
public var m_contactCount:int;
public var m_broadPhase:b2BroadPhase;
public var m_stackAllocator;
public var m_jointCount:int;
public var m_bodyList:b2Body;
public var m_doSleep:Boolean;
public var m_bodyDestroyList:b2Body;
public var m_jointList:b2Joint;
public var m_contactManager:b2ContactManager;
public static var s_enableWarmStarting:int = 1;
public static var s_enablePositionCorrection:int = 1;
public function b2World(_arg1:b2AABB, _arg2:b2Vec2, _arg3:Boolean){
step = new b2StepInfo();
m_contactManager = new b2ContactManager();
super();
m_listener = null;
m_bodyList = null;
m_contactList = null;
m_jointList = null;
m_bodyCount = 0;
m_contactCount = 0;
m_jointCount = 0;
m_bodyDestroyList = null;
m_doSleep = _arg3;
m_gravity = _arg2;
m_contactManager.m_world = this;
m_broadPhase = new b2BroadPhase(_arg1, m_contactManager);
var _local4:b2BodyDef = new b2BodyDef();
m_groundBody = CreateBody(_local4);
}
public function GetContactList():b2Contact{
return (m_contactList);
}
public function CreateJoint(_arg1:b2JointDef):b2Joint{
var _local3:b2Body;
var _local4:b2Shape;
var _local2:b2Joint = 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.ResetProxy(m_broadPhase);
_local4 = _local4.m_next;
};
};
return (_local2);
}
public function DestroyJoint(_arg1:b2Joint){
var _local5:b2Body;
var _local6:b2Shape;
var _local2:Boolean = _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;
};
var _local3:b2Body = _arg1.m_body1;
var _local4:b2Body = _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.ResetProxy(m_broadPhase);
_local6 = _local6.m_next;
};
};
}
public function DestroyBody(_arg1:b2Body){
if ((_arg1.m_flags & b2Body.e_destroyFlag)){
return;
};
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;
};
_arg1.m_flags = (_arg1.m_flags | b2Body.e_destroyFlag);
m_bodyCount--;
_arg1.m_prev = null;
_arg1.m_next = m_bodyDestroyList;
m_bodyDestroyList = _arg1;
}
public function SetListener(_arg1:b2WorldListener){
m_listener = _arg1;
}
public function CreateBody(_arg1:b2BodyDef):b2Body{
var _local2:b2Body = 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 GetGroundBody():b2Body{
return (m_groundBody);
}
public function Query(_arg1:b2AABB, _arg2:Array, _arg3:int):int{
var _local4:Array = new Array();
var _local5:int = m_broadPhase.QueryAABB(_arg1, _local4, _arg3);
var _local6:int;
while (_local6 < _local5) {
_arg2[_local6] = (_local4[_local6] as b2Shape);
_local6++;
};
return (_local5);
}
public function CleanBodyList(){
var _local2:b2Body;
var _local3:b2JointNode;
var _local4:b2JointNode;
m_contactManager.m_destroyImmediate = true;
var _local1:b2Body = m_bodyDestroyList;
while (_local1) {
_local2 = _local1;
_local1 = _local1.m_next;
_local3 = _local2.m_jointList;
while (_local3) {
_local4 = _local3;
_local3 = _local3.next;
if (m_listener){
m_listener.NotifyJointDestroyed(_local4.joint);
};
DestroyJoint(_local4.joint);
};
_local2.Destroy();
};
m_bodyDestroyList = null;
m_contactManager.m_destroyImmediate = false;
}
public function Step(_arg1:Number, _arg2:int){
var _local3:b2Body;
var _local4:b2Body;
var _local12:int;
var _local13:int;
var _local14:b2ContactNode;
var _local15:b2JointNode;
var _local16:uint;
step.dt = _arg1;
step.iterations = _arg2;
if (_arg1 > 0){
step.inv_dt = (1 / _arg1);
} else {
step.inv_dt = 0;
};
m_positionIterationCount = 0;
m_contactManager.CleanContactList();
CleanBodyList();
m_contactManager.Collide();
var _local5:b2Island = new b2Island(m_bodyCount, m_contactCount, m_jointCount, m_stackAllocator);
_local3 = m_bodyList;
while (_local3 != null) {
_local3.m_flags = (_local3.m_flags & ~(b2Body.e_islandFlag));
_local3 = _local3.m_next;
};
var _local6:b2Contact = m_contactList;
while (_local6 != null) {
_local6.m_flags = (_local6.m_flags & ~(b2Contact.e_islandFlag));
_local6 = _local6.m_next;
};
var _local7:b2Joint = m_jointList;
while (_local7 != null) {
_local7.m_islandFlag = false;
_local7 = _local7.m_next;
};
var _local8:int = m_bodyCount;
var _local9:Array = new Array(m_bodyCount);
var _local10:int;
while (_local10 < m_bodyCount) {
_local9[_local10] = null;
_local10++;
};
var _local11:b2Body = m_bodyList;
while (_local11 != null) {
if ((_local11.m_flags & (((b2Body.e_staticFlag | b2Body.e_islandFlag) | b2Body.e_sleepFlag) | b2Body.e_frozenFlag))){
} else {
_local5.Clear();
_local12 = 0;
var _temp1 = _local12;
_local12 = (_local12 + 1);
var _local17 = _temp1;
_local9[_local17] = _local11;
_local11.m_flags = (_local11.m_flags | b2Body.e_islandFlag);
while (_local12 > 0) {
--_local12;
_local3 = _local9[_local12];
_local5.AddBody(_local3);
_local3.m_flags = (_local3.m_flags & ~(b2Body.e_sleepFlag));
if ((_local3.m_flags & b2Body.e_staticFlag)){
} else {
_local14 = _local3.m_contactList;
while (_local14 != null) {
if ((_local14.contact.m_flags & b2Contact.e_islandFlag)){
} else {
_local5.AddContact(_local14.contact);
_local14.contact.m_flags = (_local14.contact.m_flags | b2Contact.e_islandFlag);
_local4 = _local14.other;
if ((_local4.m_flags & b2Body.e_islandFlag)){
} else {
var _temp2 = _local12;
_local12 = (_local12 + 1);
var _local18 = _temp2;
_local9[_local18] = _local4;
_local4.m_flags = (_local4.m_flags | b2Body.e_islandFlag);
};
};
_local14 = _local14.next;
};
_local15 = _local3.m_jointList;
while (_local15 != null) {
if (_local15.joint.m_islandFlag == true){
} else {
_local5.AddJoint(_local15.joint);
_local15.joint.m_islandFlag = true;
_local4 = _local15.other;
if ((_local4.m_flags & b2Body.e_islandFlag)){
} else {
var _temp3 = _local12;
_local12 = (_local12 + 1);
_local18 = _temp3;
_local9[_local18] = _local4;
_local4.m_flags = (_local4.m_flags | b2Body.e_islandFlag);
};
};
_local15 = _local15.next;
};
};
};
_local5.Solve(step, m_gravity);
m_positionIterationCount = b2Math.b2Max(m_positionIterationCount, b2Island.m_positionIterationCount);
if (m_doSleep){
_local5.UpdateSleep(_arg1);
};
_local13 = 0;
while (_local13 < _local5.m_bodyCount) {
_local3 = _local5.m_bodies[_local13];
if ((_local3.m_flags & b2Body.e_staticFlag)){
_local3.m_flags = (_local3.m_flags & ~(b2Body.e_islandFlag));
};
if (((_local3.IsFrozen()) && (m_listener))){
_local16 = m_listener.NotifyBoundaryViolated(_local3);
if (_local16 == b2WorldListener.b2_destroyBody){
DestroyBody(_local3);
_local3 = null;
_local5.m_bodies[_local13] = null;
};
};
_local13++;
};
};
_local11 = _local11.m_next;
};
m_broadPhase.Flush();
}
public function GetJointList():b2Joint{
return (m_jointList);
}
public function GetBodyList():b2Body{
return (m_bodyList);
}
}
}//package Engine.Dynamics
Section 65
//b2WorldListener (Engine.Dynamics.b2WorldListener)
package Engine.Dynamics {
import Engine.Dynamics.Joints.*;
public class b2WorldListener {
public static var b2_freezeBody:uint = 0;
public static var b2_destroyBody:uint = 1;
public function NotifyJointDestroyed(_arg1:b2Joint){
}
public function NotifyBoundaryViolated(_arg1:b2Body):uint{
return (b2_freezeBody);
}
}
}//package Engine.Dynamics
Section 66
//CustomPreloader (FreeOnlineGames.CustomPreloader)
package FreeOnlineGames {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import mx.events.*;
public class CustomPreloader extends MovieClip {
public var _mochiad:MovieClip;
public var b:MovieClip;
public var count:int;// = 0
public var clip:MovieClip;
public var _finished:Boolean;// = false
private var _871298722preloaderClass:Class;
public var setup:Boolean;// = false
public var _mochiad_loaded:Boolean;// = false
public static var demo:Boolean = false;
public static var cfg:Object;
public static var corner_embed:Class = CustomPreloader_corner_embed;
public function CustomPreloader(){
var _local2:int;
var _local3:Bitmap;
_871298722preloaderClass = CustomPreloader_preloaderClass;
super();
stop();
stage.scaleMode = StageScaleMode.SHOW_ALL;
stage.align = StageAlign.TOP_LEFT;
addEventListener(Event.ENTER_FRAME, onEnterFrame);
b = new preloaderClass();
b.x = (400 - (b.width / 2));
b.y = (300 - (b.height / 2));
addChild(b);
var _local1:int;
while (_local1 <= 1) {
_local2 = 0;
while (_local2 <= 1) {
_local3 = new corner_embed();
_local3.x = (_local1 * 800);
_local3.y = (_local2 * 600);
_local3.rotation = ((_local1 * 90) + (_local2 * 90));
if ((((_local1 == 0)) && ((_local2 == 1)))){
_local3.rotation = (_local3.rotation + 180);
};
stage.addChild(_local3);
_local2++;
};
_local1++;
};
}
public function get preloaderClass():Class{
return (this._871298722preloaderClass);
}
public function set preloaderClass(_arg1:Class):void{
var _local2:Object = this._871298722preloaderClass;
if (_local2 !== _arg1){
this._871298722preloaderClass = _arg1;
this.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, "preloaderClass", _local2, _arg1));
};
}
public function onEnterFrame(_arg1:Event):void{
graphics.clear();
graphics.beginGradientFill(GradientType.LINEAR, [0xBCBCBC], [1], [1]);
graphics.drawRect(0, 0, 800, 600);
var _local2:String = root.loaderInfo.url.split("/")[2];
var _local3:Array = _local2.split(".");
var _local4:String = _local3[(_local3.length - 2)];
if ((((_local4 == "freeonlinegames")) || ((_local4 == "freeonlinegames")))){
demo = false;
} else {
demo = true;
};
var _local5:Boolean;
if ((((((framesLoaded == totalFrames)) && (_finished))) && (!(_local5)))){
count++;
if (count > 100){
removeChild(b);
graphics.clear();
removeEventListener(Event.ENTER_FRAME, onEnterFrame);
nextFrame();
init();
_local5 = true;
return;
};
};
_finished = (root.loaderInfo.bytesLoaded == root.loaderInfo.bytesTotal);
}
public function adfinished():void{
_finished = true;
}
private function init():void{
var _local2:Object;
var _local1:Class = Class(getDefinitionByName("Main"));
if (_local1){
_local2 = new (_local1);
addChild((_local2 as DisplayObject));
};
}
public function unloadAd():void{
}
public function unload():void{
}
}
}//package FreeOnlineGames
Section 67
//CustomPreloader_corner_embed (FreeOnlineGames.CustomPreloader_corner_embed)
package FreeOnlineGames {
import mx.core.*;
public class CustomPreloader_corner_embed extends BitmapAsset {
}
}//package FreeOnlineGames
Section 68
//CustomPreloader_preloaderClass (FreeOnlineGames.CustomPreloader_preloaderClass)
package FreeOnlineGames {
import mx.core.*;
import flash.utils.*;
public class CustomPreloader_preloaderClass extends MovieClipLoaderAsset {
public var dataClass:Class;
private static var bytes:ByteArray = null;
public function CustomPreloader_preloaderClass(){
dataClass = CustomPreloader_preloaderClass_dataClass;
super();
initialWidth = (12000 / 20);
initialHeight = (8400 / 20);
}
override public function get movieClipData():ByteArray{
if (bytes == null){
bytes = ByteArray(new dataClass());
};
return (bytes);
}
}
}//package FreeOnlineGames
Section 69
//CustomPreloader_preloaderClass_dataClass (FreeOnlineGames.CustomPreloader_preloaderClass_dataClass)
package FreeOnlineGames {
import mx.core.*;
public class CustomPreloader_preloaderClass_dataClass extends ByteArrayAsset {
}
}//package FreeOnlineGames
Section 70
//GameConfig (GameConfig.GameConfig)
package GameConfig {
public class GameConfig {
public static var fontName:String = "Agency FB";
public static var shortName:String = "stuntpilot";
public static var nagEnabled:Boolean = false;
public static var referenceAngle:Number = 0;
public static var startClass:Class;
public static var fontColor:int = 0xFFCD00;
}
}//package GameConfig
Section 71
//mcInternalAnimation_3 (GameIntro_fla.mcInternalAnimation_3)
package GameIntro_fla {
import flash.display.*;
import flash.text.*;
public dynamic class mcInternalAnimation_3 extends MovieClip {
public var mcProgress:MovieClip;
public var mcTimer:MovieClip;
public var textStatus:TextField;
public var mcOffsite:SimpleButton;
}
}//package GameIntro_fla
Section 72
//mcProgressBar_4 (GameIntro_fla.mcProgressBar_4)
package GameIntro_fla {
import flash.display.*;
public dynamic class mcProgressBar_4 extends MovieClip {
public function mcProgressBar_4(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package GameIntro_fla
Section 73
//GameObject (GameObject.GameObject)
package GameObject {
import flash.events.*;
import GameScene.*;
import Particles.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import Tools.*;
import flash.text.*;
import GameConfig.*;
import flash.filters.*;
public class GameObject {
public var baseBrightness:Number;// = 1
public var loaded:Boolean;// = false
public var animFreeze:Boolean;// = false
public var dampenOrigin:Number;// = 1
public var modifiedAlpha:Number;// = 1
public var className:String;
public var zOrderString:String;
public var _mHasHit:Boolean;// = false
public var _toRemove:Boolean;// = false
public var tformFromParent:Boolean;// = true
public var debug:Boolean;// = false
public var justCreated:Boolean;// = true
public var m:MovieClip;
public var ticks:int;// = 0
public var modifiedScaleX:Number;// = 1
public var modifiedScaleY:Number;// = 1
public var isInputEnterHit:Boolean;// = false
public var _on:Boolean;// = false
public var baseScaleX:Number;// = 1
public var baseScaleY:Number;// = 1
public var overGlow:Number;// = 1
public var lastX:Number;// = 0
public var lastY:Number;// = 0
public var helperButton:GameObjectHelperButton;
public var isInputMaxLength:int;// = -1
public var name:String;
public var disabled:Boolean;// = false
private var _tFormedY:Number;
private var _tFormedX:Number;
public var selectGlow:Number;// = 1
public var parent:GameObject;
public var particles:Array;
public var imClass:Class;
public var animSpeed:Number;// = 0
public var lastModifiedX:Number;// = 0
public var lastModifiedY:Number;// = 0
public var isInput:Boolean;// = false
public var oldstr:String;// = "oldstrdefaultvalue"
public var oldRotation:Number;
public var helperFilter:GameObjectHelperFilter;
public var conditionalParticles:Array;
public var modifiedx:Number;
public var modifiedy:Number;
public var initialized:Boolean;// = false
public var pausesGame:Boolean;// = false
public var obj:DisplayObject;
public var gs:GameScene;
public var imageSet:Array;
public var baseAlpha:Number;// = 1
public var independentRotation:Boolean;// = false
public var id:int;// = 0
public var baseHandleX:Number;// = 0.5
public var baseHandleY:Number;// = 0.5
public var _removed:Boolean;// = false
public var buttonBitmapDataOff:BitmapData;
public var mainLayer:ParticleLayer;
public var collision:GameObjectCollision;
public var animStarted:Boolean;// = false
public var updateDespitePaused:Boolean;// = false
public var randTicks:int;
public var oldScaleX:Number;
public var oldScaleY:Number;
public var baseHeight:Number;
public var modifiedRotation:Number;// = 0
public var isGlobal:Boolean;// = false
public var baseRotation:Number;// = 0
public var baseWidth:Number;
public var helperAnimation:GameObjectHelperAnimation;
public var oldAlpha:Number;
public var fontName:String;
public var defaultCol:int;
public var buttonBitmapDataOn:BitmapData;
public var showButtonOnOutline:Boolean;// = false
public var syncedSize:Boolean;// = false
public var defaultTextNum:int;// = 48
public var buttonTextOffsetX:Number;// = 0
public var hidden:Boolean;// = false
public var helper:GameObjectHelper;
private var radianConst:Number;// = 0.0174532925199433
public var basex:Number;
public var basey:Number;
public var additive:Boolean;// = false
public var buttonDisabled:Boolean;// = false
public var animFrame:Number;// = 0
public var lastScreenY:Number;// = 0
public var filters:Array;
public var lastScreenX:Number;// = 0
public var children:Array;
public static var matrixClip:MovieClip = new MovieClip();
public static var idBase:int = 0;
public function GameObject(_arg1:GameScene, _arg2:Object, _arg3:String, _arg4:int, _arg5:int):void{
var _local6:Class;
filters = new Array();
particles = new Array();
conditionalParticles = new Array();
children = new Array();
randTicks = Random.randInt(0, 10000);
fontName = GameConfig.fontName;
super();
if (_arg1 == null){
_arg1 = GameScene.current();
};
helper = new GameObjectHelper(this);
helperFilter = new GameObjectHelperFilter(this);
helperAnimation = new GameObjectHelperAnimation(this);
idBase++;
id = idBase;
defaultCol = GameConfig.fontColor;
if (_arg2 == null){
obj = new TextField();
TextField(obj).mouseEnabled = false;
TextField(obj).selectable = false;
} else {
if ((_arg2 is Class)){
_local6 = Class(_arg2);
obj = new (_local6);
} else {
if ((_arg2 is DisplayObject)){
obj = DisplayObject(_arg2);
};
};
};
obj.alpha = 0;
basex = _arg4;
basey = _arg5;
baseWidth = obj.width;
baseHeight = obj.height;
obj.x = basex;
obj.y = basey;
lastX = basex;
lastY = basey;
_arg1.objects.push(this);
zOrderString = _arg3;
m = _arg1.clipForZOrder(_arg3);
m.addChild(obj);
mainLayer = new ParticleLayer();
mainLayer.parent = m;
if ((_arg2 is Class)){
imClass = Class(_arg2);
};
gs = _arg1;
}
public function setupButton(_arg1:Object, _arg2:String, _arg3:Class=null, _arg4:Boolean=false, _arg5:Boolean=false):void{
var _local6:DisplayObject;
var _local7:DisplayObject;
var _local8:DisplayObject;
var _local11:Class;
var _local12:BitmapData;
helperButton = new GameObjectHelperButton(this);
this.name = _arg2;
if ((_arg1 is Class)){
_local11 = Class(_arg1);
if (((_arg5) && (_arg3))){
_local8 = new (_arg3);
_local6 = new (_arg3);
_arg3 = null;
} else {
_local6 = new (_local11);
_local8 = new (_local11);
};
_local7 = new (_local11);
} else {
if ((_arg1 is BitmapData)){
_local12 = BitmapData(_arg1);
_local6 = new Bitmap(_local12);
_local7 = new Bitmap(_local12);
_local8 = new Bitmap(_local12);
} else {
_local6 = DisplayObject(_arg1);
_local7 = DisplayObject(_arg1);
_local8 = DisplayObject(_arg1);
};
};
_local6.scaleX = 0.95;
_local6.scaleY = 0.95;
_local6.x = (0.025 * _local6.width);
_local6.y = (0.025 * _local6.height);
if (!_arg5){
if (_arg4){
_local8.filters = [new GlowFilter(0xFFFFFF, 0.6), new GlowFilter(0xFFFFFF, 0.6, 16, 16, 2, 1, true)];
} else {
_local8.filters = [new GlowFilter(0xFFFFFF, 0.6)];
};
};
_local6.filters = [new GlowFilter(0xFFFFFF, overGlow)];
var _local9:SimpleButton = SimpleButton(obj);
_local9.upState = _local7;
_local9.overState = _local8;
_local9.downState = _local6;
_local9.useHandCursor = true;
_local9.hitTestState = _local7;
_local9.useHandCursor = _arg4;
baseWidth = _local7.width;
baseHeight = _local7.height;
_local9.addEventListener(MouseEvent.CLICK, _mHit);
var _local10:GameObject = new GameObject(gs, null, zOrderString, buttonTextOffsetX, -2);
_local10.fontName = fontName;
_local10.setText(_arg2.toUpperCase(), 26, defaultCol);
addChild(_local10);
if (_arg3){
buttonBitmapDataOn = Bitmap(new (_arg3)).bitmapData;
buttonBitmapDataOff = Bitmap(_local7).bitmapData;
};
}
public function setAlpha(_arg1:Number, _arg2:Boolean=false):void{
var _local3:GameObject;
baseAlpha = _arg1;
if (_arg2){
for each (_local3 in children) {
_local3.setAlpha(_arg1, true);
};
};
}
public function distanceToPoint(_arg1:Number, _arg2:Number):Number{
var _local3:Number = (_arg1 - basex);
var _local4:Number = (_arg2 - basey);
return (Math.sqrt(((_local3 * _local3) + (_local4 * _local4))));
}
public function objectLoaded(_arg1:Event=null):void{
baseWidth = obj.width;
baseHeight = obj.height;
loaded = true;
}
public function setFrame(_arg1:int){
if (imageSet){
if ((((_arg1 >= 0)) && ((_arg1 < imageSet.length)))){
Bitmap(obj).bitmapData = imageSet[_arg1];
};
};
}
public function disableButton():void{
var _local1:SimpleButton;
if ((obj is SimpleButton)){
_local1 = SimpleButton(obj);
_local1.enabled = false;
baseAlpha = 0.5;
buttonDisabled = true;
};
}
public function pushScale(_arg1:Number, _arg2:Number):void{
modifiedScaleX = (modifiedScaleX * _arg1);
modifiedScaleY = (modifiedScaleY * _arg2);
}
public function addConditionalParticleArray(_arg1:Array):void{
if (!_arg1){
return;
};
var _local2:int;
while (_local2 < _arg1.length) {
conditionalParticles.push(_arg1[_local2]);
_local2++;
};
}
public function collidesWith(_arg1:GameObject):Boolean{
if (((!(collision)) || (!(_arg1.collision)))){
return (false);
};
collision.go = this;
_arg1.collision.go = _arg1;
return (collision.collidesWith(_arg1.collision));
}
public function syncObj():void{
if (justCreated){
modifiedRotation = baseRotation;
modifiedx = basex;
modifiedy = basey;
modifiedScaleX = baseScaleX;
modifiedScaleY = baseScaleY;
};
lastScreenX = modifiedx;
lastScreenY = modifiedy;
if (parent){
if (tformFromParent){
parent._tformed(modifiedx, modifiedy);
lastScreenX = parent._tFormedX;
lastScreenY = parent._tFormedY;
modifiedScaleX = (modifiedScaleX * parent.modifiedScaleX);
modifiedScaleY = (modifiedScaleY * parent.modifiedScaleY);
} else {
lastScreenX = (lastScreenX + parent.modifiedx);
lastScreenY = (lastScreenY + parent.modifiedy);
};
modifiedAlpha = (modifiedAlpha * parent.modifiedAlpha);
};
if (!isGlobal){
lastScreenX = (lastScreenX - (gs.camX * dampenOrigin));
lastScreenY = (lastScreenY - (gs.camY * dampenOrigin));
};
var _local1:Number = (lastScreenX - ((Math.cos((-(modifiedRotation) * radianConst)) * int(((baseWidth * baseHandleX) * modifiedScaleX))) + (Math.sin((-(modifiedRotation) * radianConst)) * int(((baseHeight * baseHandleY) * modifiedScaleY)))));
var _local2:Number = (lastScreenY - ((-(Math.sin((-(modifiedRotation) * radianConst))) * int(((baseWidth * baseHandleX) * modifiedScaleX))) + (Math.cos((-(modifiedRotation) * radianConst)) * int(((baseHeight * baseHandleY) * modifiedScaleY)))));
if (parent){
};
obj.x = _local1;
obj.y = _local2;
if (((_local1 + (baseWidth * Math.abs(modifiedScaleX))) + 20) < 0){
obj.visible = false;
return;
};
if (((_local1 - (baseWidth * Math.abs(modifiedScaleX))) - 20) > 800){
obj.visible = false;
return;
};
obj.visible = !(hidden);
if (hidden){
modifiedAlpha = 0;
};
if (modifiedAlpha != oldAlpha){
obj.alpha = modifiedAlpha;
oldAlpha = modifiedAlpha;
};
if (modifiedRotation != oldRotation){
oldRotation = modifiedRotation;
obj.rotation = modifiedRotation;
};
if (modifiedScaleX != oldScaleX){
oldScaleX = modifiedScaleX;
obj.scaleX = modifiedScaleX;
};
if (modifiedScaleY != oldScaleY){
obj.scaleY = modifiedScaleY;
oldScaleY = modifiedScaleY;
};
if (additive){
obj.blendMode = BlendMode.ADD;
};
}
public function stripText():void{
var _local1:GameObject;
for each (_local1 in children) {
_local1.remove();
};
}
public function syncText():void{
if (!(obj is TextField)){
return;
};
var _local1:TextField = TextField(obj);
_local1.width = (_local1.textWidth + 64);
_local1.height = (_local1.textHeight + 16);
baseWidth = _local1.textWidth;
baseHeight = _local1.textHeight;
}
public function pushAlpha(_arg1:Number):void{
modifiedAlpha = (modifiedAlpha * _arg1);
}
public function remoteLoad(_arg1:String):void{
if ((!(obj) is Loader)){
return;
};
var _local2:Loader = Loader(obj);
_local2.load(new URLRequest(_arg1));
_local2.contentLoaderInfo.addEventListener(Event.COMPLETE, objectLoaded);
}
public function findChildrenByName(_arg1:String):Array{
var name = _arg1;
return (children.filter(function (_arg1:GameObject, _arg2:int, _arg3:Array):Boolean{
return ((_arg1.name == name));
}));
}
public function remove():void{
var _local1:GameObjectFilter;
var _local2:GameObject;
if (_removed){
return;
};
gs.addOrphanedParticleLayer(mainLayer);
if (m.contains(obj)){
m.removeChild(obj);
} else {
trace("Does not contain");
};
for each (_local1 in filters) {
_local1.remove(this);
};
for each (_local2 in children) {
_local2.remove();
};
helper.handleRemove();
_remove();
_removed = true;
}
public function sind(_arg1:Number):Number{
return (Math.sin((_arg1 * (Math.PI / 180))));
}
public function enableButton():void{
var _local1:SimpleButton;
if ((obj is SimpleButton)){
_local1 = SimpleButton(obj);
_local1.enabled = true;
baseAlpha = 1;
buttonDisabled = false;
};
}
public function screenBaseX():Number{
return ((basex - gs.camX));
}
public function screenBaseY():Number{
return ((basey - gs.camY));
}
public function bringToFront():void{
var _local1:MovieClip = gs.clipForZOrder(zOrderString);
if (_local1.contains(obj)){
_local1.setChildIndex(obj, 0);
};
}
private function _tformed(_arg1:Number, _arg2:Number):void{
var _local3:Number = modifiedx;
var _local4:Number = modifiedy;
if (parent){
parent._tformed(modifiedx, modifiedy);
_local3 = parent._tFormedX;
_local4 = parent._tFormedY;
};
_tFormedX = ((_local3 + ((Math.cos((-(modifiedRotation) * radianConst)) * _arg1) * modifiedScaleX)) + ((Math.sin((-(modifiedRotation) * radianConst)) * _arg2) * modifiedScaleY));
_tFormedY = ((_local4 + ((-(Math.sin((-(modifiedRotation) * radianConst))) * _arg1) * modifiedScaleX)) + ((Math.cos((-(modifiedRotation) * radianConst)) * _arg2) * modifiedScaleY));
}
public function setupTextInput(_arg1:int=-1):void{
var _local2:TextField;
if ((obj is TextField)){
_local2 = TextField(obj);
_local2.selectable = true;
_local2.mouseEnabled = true;
_local2.type = TextFieldType.INPUT;
if (_arg1 != -1){
_local2.maxChars = _arg1;
};
_local2.setSelection(_local2.text.length, _local2.text.length);
GameSceneStack.focusObj = this;
};
}
public function setGlobal(_arg1:Boolean):void{
var _local2:GameObject;
isGlobal = _arg1;
for each (_local2 in children) {
_local2.setGlobal(_arg1);
};
}
public function distanceToObject(_arg1:GameObject):Number{
var _local2:Number = (_arg1.basex - basex);
var _local3:Number = (_arg1.basey - basey);
return (Math.sqrt(((_local2 * _local2) + (_local3 * _local3))));
}
public function setText(_arg1:String, _arg2:int=-1, _arg3:int=-1):void{
var _local4:TextField;
var _local5:int;
var _local6:TextField;
if (_arg1 == null){
_arg1 = "";
};
if (oldstr == null){
oldstr = "";
};
if ((obj is TextField)){
_local4 = TextField(obj);
if (((!((_arg1.length == oldstr.length))) && (!((oldstr == "oldstrdefaultvalue"))))){
_local5 = -1;
if (m.contains(_local4)){
_local5 = m.getChildIndex(_local4);
m.removeChild(_local4);
};
_local6 = _local4;
_local4 = new TextField();
_local4.x = _local6.x;
_local4.y = _local6.y;
_local4.scaleX = _local6.scaleX;
_local4.scaleY = _local6.scaleY;
_local4.rotation = _local6.rotation;
_local4.alpha = _local6.alpha;
if (_local5 == -1){
m.addChild(_local4);
} else {
m.addChildAt(_local4, _local5);
};
obj = _local4;
};
oldstr = _arg1;
if (_arg2 == -1){
_arg2 = defaultTextNum;
} else {
defaultTextNum = _arg2;
};
if (_arg3 == -1){
_arg3 = defaultCol;
} else {
defaultCol = _arg3;
};
_local4.defaultTextFormat = new TextFormat(fontName, _arg2, _arg3, true, true);
_local4.embedFonts = true;
if (_arg1.indexOf("<b>") != -1){
_local4.htmlText = _arg1;
} else {
_local4.text = _arg1;
};
syncText();
syncedSize = false;
_local4.selectable = false;
_local4.mouseEnabled = false;
if ((((_arg2 > 12)) && ((_local4.filters.length < 1)))){
_local4.filters = [new DropShadowFilter((4 * (_arg2 / 48)), 45, 0, 1, 0, 0, 1, 0)];
};
};
}
public function changeZOrder(_arg1:String):void{
if (gs.clipForZOrder(zOrderString).contains(obj)){
gs.clipForZOrder(zOrderString).removeChild(obj);
};
m = gs.clipForZOrder(_arg1);
gs.clipForZOrder(_arg1).addChild(obj);
zOrderString = _arg1;
}
public function buttonOn():Boolean{
return (_on);
}
public function mOverModified():Boolean{
if (Input.i.mouseX() > (modifiedx - (baseWidth / 2))){
if (Input.i.mouseX() < (modifiedx + (baseWidth / 2))){
if (Input.i.mouseY() > (modifiedy - (baseHeight / 2))){
if (Input.i.mouseY() < (modifiedy + (baseHeight / 2))){
return (true);
};
};
};
};
return (false);
}
public function _mHit(_arg1:Event):void{
if (gs.stackFading()){
return;
};
if (hidden){
return;
};
if (buttonDisabled){
return;
};
if (buttonBitmapDataOn){
setButtonOn(!(_on));
};
helperButton.mHit();
_mHasHit = true;
}
public function update():void{
var pe:ParticleEmitter;
var go:GameObject;
var frame:int;
var c:int;
var ostr:String;
var str:String;
if (_removed){
return;
};
if (disabled){
obj.alpha = 0;
return;
};
if ((obj is TextField)){
syncText();
};
if (imageSet){
if (animSpeed > 0){
if (!animStarted){
animFrame = (Math.random() * imageSet.length);
animStarted = true;
};
if (!animFreeze){
animFrame = (animFrame + (1 / animSpeed));
};
frame = (int(animFrame) % imageSet.length);
Bitmap(obj).bitmapData = imageSet[frame];
};
};
if (!initialized){
initialized = true;
_init();
};
helper.update();
helperAnimation.update();
if (helperButton){
helperButton.update();
};
ticks++;
randTicks++;
justCreated = false;
modifiedRotation = baseRotation;
lastModifiedX = modifiedx;
lastModifiedY = modifiedy;
modifiedx = basex;
modifiedy = basey;
modifiedScaleX = baseScaleX;
modifiedScaleY = baseScaleY;
if (parent != null){
modifiedRotation = (parent.modifiedRotation + baseRotation);
if (independentRotation){
modifiedRotation = baseRotation;
};
};
modifiedAlpha = baseAlpha;
var i:int;
while (i < filters.length) {
GameObjectFilter(filters[i]).update(this);
i = (i + 1);
};
with ({}) {
with ({}) {
!ERROR!.blah = function (_arg1:Object, _arg2:int, _arg3:Array):Boolean{
return (!(GameObjectFilter(_arg1).removeFilter));
};
};
filters = filters.filter(function (_arg1:Object, _arg2:int, _arg3:Array):Boolean{
return (!(GameObjectFilter(_arg1).removeFilter));
});
for each (pe in particles) {
pe.emitOnto(mainLayer, tformedX(pe.x, pe.y), tformedY(pe.x, pe.y));
};
for each (go in children) {
go.update();
};
mainLayer.x = gs.camX;
mainLayer.y = gs.camY;
if (mainLayer.particles.length > 0){
mainLayer.update();
};
if (isInput){
c = 0;
while (c < 0xFF) {
if (Input.i.keyHit(c)){
if (c == 13){
isInputEnterHit = true;
} else {
if (c == 8){
ostr = TextField(obj).text;
if (ostr.length > 1){
setText(ostr.slice(0, (ostr.length - 1)));
} else {
setText("");
};
} else {
str = numToChar(c);
ostr = TextField(obj).text;
if (str.length > 0){
if ((((ostr.length < isInputMaxLength)) || ((isInputMaxLength == -1)))){
setText((ostr + str));
};
};
};
};
};
c = (c + 1);
};
};
_update();
if (_toRemove){
remove();
};
}
public function mOver():Boolean{
if (Input.i.mouseX() > (basex - (baseWidth / 2))){
if (Input.i.mouseX() < (basex + (baseWidth / 2))){
if (Input.i.mouseY() > (basey - (baseHeight / 2))){
if (Input.i.mouseY() < (basey + (baseHeight / 2))){
return (true);
};
};
};
};
return (false);
}
public function tintClip(_arg1:DisplayObject, _arg2:Number, _arg3:Number, _arg4:Number):void{
var _local5:Array = new Array();
_local5 = _local5.concat([_arg2, _arg3, _arg4, 0, 0]);
_local5 = _local5.concat([_arg4, _arg2, _arg3, 0, 0]);
_local5 = _local5.concat([_arg3, _arg4, _arg2, 0, 0]);
_local5 = _local5.concat([0, 0, 0, 1, 0]);
var _local6:BitmapFilter = new ColorMatrixFilter(_local5);
_arg1.filters = new Array(_local6);
}
public function show():void{
hidden = false;
}
public function removeChild(_arg1:GameObject):void{
var go = _arg1;
go.parent = null;
children = children.filter(function (_arg1:Object, _arg2:int, _arg3:Array){
return (!((_arg1 == go)));
});
}
public function tformedWithoutParent(_arg1:Number, _arg2:Number):Point{
var _local3:Number = ((modifiedx + ((cosd(-(modifiedRotation)) * _arg1) * baseScaleX)) + ((sind(-(modifiedRotation)) * _arg2) * baseScaleY));
var _local4:Number = ((modifiedy + ((-(sind(-(modifiedRotation))) * _arg1) * baseScaleX)) + ((cosd(-(modifiedRotation)) * _arg2) * baseScaleY));
return (new Point(_local3, _local4));
}
public function mask():void{
var _local4:int;
if ((!(obj) is Bitmap)){
return;
};
var _local1:Bitmap = Bitmap(obj);
var _local2:BitmapData = _local1.bitmapData;
_local2.lock();
var _local3:int;
while (_local3 < _local2.width) {
_local4 = 0;
while (_local4 < _local2.height) {
if (_local2.getPixel32(_local3, _local4) == 4278190080){
_local2.floodFill(_local3, _local4, 0);
};
_local4++;
};
_local3++;
};
_local2.unlock();
}
public function addChild(_arg1:GameObject):void{
_arg1.parent = this;
children.push(_arg1);
}
public function globalX():Number{
var _local1:Number = basex;
if (parent){
_local1 = parent.tformedX(basex, basey);
};
return (_local1);
}
public function drawToPixmap(_arg1:DisplayObject, _arg2:int, _arg3:int, _arg4:int=0, _arg5:Number=1, _arg6:Number=1, _arg7:String="normal"){
var _local8:BitmapData = Bitmap(obj).bitmapData;
_arg1.x = _arg2;
_arg1.y = _arg3;
_arg1.scaleX = _arg5;
_arg1.scaleY = _arg6;
_arg1.rotation = _arg4;
_local8.draw(_arg1, _arg1.transform.matrix, null, _arg7);
}
public function globalY():Number{
var _local1:Number = basey;
if (parent){
_local1 = parent.tformedY(basex, basey);
};
return (_local1);
}
public function position(_arg1:Number, _arg2:Number):void{
basex = _arg1;
basey = _arg2;
}
public function setHandle(_arg1:Number, _arg2:Number, _arg3:Boolean=true){
var _local4:GameObject;
baseHandleX = _arg1;
baseHandleY = _arg2;
if (_arg3){
for each (_local4 in children) {
_local4.setHandle(_arg1, _arg2, _arg3);
};
};
}
public function setButtonOn(_arg1:Boolean):void{
var _local2:BitmapData;
var _local3:SimpleButton;
_on = _arg1;
if (buttonBitmapDataOn){
if (_on){
_local2 = buttonBitmapDataOn;
} else {
_local2 = buttonBitmapDataOff;
};
_local3 = SimpleButton(obj);
Bitmap(_local3.upState).bitmapData = _local2;
Bitmap(_local3.downState).bitmapData = _local2;
Bitmap(_local3.overState).bitmapData = _local2;
};
if (((showButtonOnOutline) || (!(buttonBitmapDataOn)))){
if (_on){
obj.filters = [new GlowFilter(0xFFCD00, selectGlow, 12, 12, 3)];
} else {
obj.filters = new Array();
};
};
}
public function tint(_arg1:Number, _arg2:Number, _arg3:Number):void{
tintClip(obj, _arg1, _arg2, _arg3);
}
public function emitConditionalParticles(_arg1:String, _arg2:Number=0, _arg3:Number=0, _arg4:Boolean=false, _arg5:Number=0):Array{
var _local7:ParticleEmitter;
if (_removed){
return (null);
};
var _local6:Array;
for each (_local7 in conditionalParticles) {
if (_local7.Name == _arg1){
if (_arg4){
_local6 = _local7.emitOnto(mainLayer, _arg2, _arg3, _arg5, gs.particleKilledCallback);
} else {
_local6 = _local7.emitOnto(mainLayer, tformedX((_local7.x + _arg2), (_local7.y + _arg3)), tformedY((_local7.x + _arg2), (_local7.y + _arg3)), _arg5, gs.particleKilledCallback);
};
};
};
return (_local6);
}
public function hide():void{
hidden = true;
}
public function tformedX(_arg1:Number, _arg2:Number):Number{
_tformed(_arg1, _arg2);
return (_tFormedX);
}
public function tformedY(_arg1:Number, _arg2:Number):Number{
_tformed(_arg1, _arg2);
return (_tFormedY);
}
public function rotate(_arg1:Number):void{
baseRotation = _arg1;
}
public function addFilter(_arg1:GameObjectFilter):void{
filters.push(_arg1);
}
public function setButtonText(_arg1:String, _arg2:int=-1):void{
var _local3:GameObject = children[0];
_local3.setText(_arg1, _arg2);
}
private function numToChar(_arg1:int):String{
var _local2:String;
var _local3:String;
var _local4:String;
if ((((_arg1 > 47)) && ((_arg1 < 58)))){
_local2 = "0123456789";
return (_local2.charAt((_arg1 - 48)));
};
if ((((_arg1 > 64)) && ((_arg1 < 91)))){
_local3 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
return (_local3.charAt((_arg1 - 65)));
};
if ((((_arg1 > 96)) && ((_arg1 < 123)))){
_local4 = "abcdefghijklmnopqrstuvwxyz";
return (_local4.charAt((_arg1 - 97)));
};
return ("");
}
public function _remove():void{
}
public function drawToImage(_arg1:Object, _arg2:int, _arg3:int, _arg4:int=0, _arg5:Number=1, _arg6:Number=1, _arg7:String="erase", _arg8:Rectangle=null, _arg9:Array=null){
var _local12:BitmapData;
var _local13:BitmapData;
var _local10:BitmapData = Bitmap(obj).bitmapData;
var _local11:Object = _arg1;
matrixClip.scaleX = _arg5;
matrixClip.scaleY = _arg6;
matrixClip.rotation = _arg4;
matrixClip.x = ((_arg2 - basex) + (_local10.width / 2));
matrixClip.y = ((_arg3 - basey) + (_local10.height / 2));
if (_arg9){
tintClip(matrixClip, _arg9[0], _arg9[1], _arg9[2]);
_local12 = new BitmapData(_local11.width, _local11.height, true);
if ((_arg1 is BitmapData)){
_local13 = BitmapData(_arg1);
} else {
_local13 = Bitmap(_local11).bitmapData;
};
_local12.applyFilter(_local13, new Rectangle(0, 0, _local11.width, _local11.height), new Point(0, 0), matrixClip.filters[0]);
_local11 = _local12;
};
if ((_local11 is IBitmapDrawable)){
_local10.draw(IBitmapDrawable(_local11), matrixClip.transform.matrix, null, _arg7, _arg8, true);
} else {
trace("ILLEGAL BITMAP DRAW!!");
};
}
public function cosd(_arg1:Number):Number{
return (Math.cos((_arg1 * (Math.PI / 180))));
}
public function setFrameFromRange(_arg1:Number, _arg2:Number, _arg3:Array):void{
var _local4:Number = (Number(_arg1) / Number(_arg2));
var _local5:int = (_local4 * _arg3.length);
if (_local5 < 0){
_local5 = 0;
};
if (_local5 > (_arg3.length - 1)){
_local5 = (_arg3.length - 1);
};
Bitmap(obj).bitmapData = _arg3[_local5];
}
public function move(_arg1:Number, _arg2:Number):void{
var _local3:Number = ((_arg1 * cosd(-(baseRotation))) + (sind(-(baseRotation)) * _arg2));
var _local4:Number = ((_arg1 * -(sind(-(baseRotation)))) + (cosd(-(baseRotation)) * _arg2));
basex = (basex + _local3);
basey = (basey + _local4);
}
public function setFrameFromSignedRange(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Array):void{
if (_arg1 < _arg2){
_arg1 = _arg2;
};
if (_arg1 > _arg3){
_arg1 = _arg3;
};
return (setFrameFromRange((_arg1 - _arg2), (_arg3 - _arg2), _arg4));
}
public function tformed(_arg1:Number, _arg2:Number):Point{
_tformed(_arg1, _arg2);
return (new Point(_tFormedX, _tFormedY));
}
public function mHit():Boolean{
var _local1:Boolean = _mHasHit;
_mHasHit = false;
return (_local1);
}
public function _update():void{
}
public function _init():void{
}
}
}//package GameObject
Section 74
//GameObjectCollision (GameObject.GameObjectCollision)
package GameObject {
import Engine.Collision.Shapes.*;
import Engine.Collision.*;
import Engine.Common.Math.*;
import Engine.Dynamics.*;
import Engine.Common.*;
public class GameObjectCollision {
public var approxX:Number;
public var vecTemp:b2Vec2;
public var lastSynchronized:int;// = 0
public var approxRadius:Number;
public var approxY:Number;
public var lastMiniSync:int;// = 0
public var body:b2Body;
public var bodydef:b2BodyDef;
public var go:GameObject;
public var type:int;// = 0
public var disabled:Boolean;// = false
public var children:Array;
public static var world:b2World;
public function GameObjectCollision(){
var _local1:b2AABB;
var _local2:b2Vec2;
var _local3:Boolean;
children = new Array();
vecTemp = new b2Vec2();
super();
if (!world){
_local1 = new b2AABB();
_local1.minVertex.Set(-100, -100);
_local1.maxVertex.Set(100, 100);
_local2 = new b2Vec2(0, 0);
_local3 = true;
world = new b2World(_local1, _local2, _local3);
};
bodydef = new b2BodyDef();
}
public function pushPolygon(_arg1:GameObjectCollisionPoly):void{
_arg1.finalize();
children.push(_arg1);
bodydef.AddShape(_arg1.polyDef);
}
public function miniSync():void{
if (lastMiniSync == go.ticks){
return;
};
lastMiniSync = go.ticks;
var _local1:b2Shape = body.m_shapeList;
var _local2:Number = ((go.baseRotation / 180) * Math.PI);
var _local3:int;
while (_local3 < body.m_shapeCount) {
children[_local3].tformedX = (((Math.cos(-(_local2)) * children[_local3].approxX) + (Math.sin(-(_local2)) * children[_local3].approxY)) + go.basex);
children[_local3].tformedY = (((-(Math.sin(-(_local2))) * children[_local3].approxX) + (Math.cos(-(_local2)) * children[_local3].approxY)) + go.basey);
_local1 = _local1.m_next;
_local3++;
};
}
public function collidesWith(_arg1:GameObjectCollision):Boolean{
var _local8:b2Shape;
var _local9:int;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Boolean;
var _local15:b2Manifold;
if (((disabled) || (_arg1.disabled))){
return (false);
};
var _local2:Number = (go.basex - _arg1.go.basex);
var _local3:Number = (go.basey - _arg1.go.basey);
var _local4:Number = ((((go.baseWidth + _arg1.go.baseWidth) + go.baseHeight) + _arg1.go.baseHeight) * 0.7);
if ((((((((_local2 < -(_local4))) || ((_local2 > _local4)))) || ((_local3 < -(_local4))))) || ((_local3 > _local4)))){
return (false);
};
miniSync();
_arg1.miniSync();
var _local5:b2Shape = body.m_shapeList;
var _local6:int;
var _local7:int = (body.m_shapeCount - 1);
while (_local7 >= 0) {
_local8 = _arg1.body.m_shapeList;
_local9 = (_arg1.body.m_shapeCount - 1);
while (_local9 >= 0) {
_local10 = (children[_local7].tformedX - _arg1.children[_local9].tformedX);
_local11 = (children[_local7].tformedY - _arg1.children[_local9].tformedY);
_local12 = ((_local10 * _local10) + (_local11 * _local11));
_local13 = (children[_local7].approxRadius + _arg1.children[_local9].approxRadius);
_local14 = false;
if (_local12 < (_local13 * _local13)){
_local14 = true;
};
if (_local14){
synchronize();
_arg1.synchronize();
_local15 = new b2Manifold();
b2Collision.b2CollidePoly(_local15, b2PolyShape(_local5), b2PolyShape(_local8));
if (_local15.points[0].separation < 9999999){
return (true);
};
};
_local8 = _local8.m_next;
_local9--;
};
_local5 = _local5.m_next;
_local7--;
};
return (false);
}
public function finalize():void{
body = new b2Body(bodydef, world);
}
public function synchronize():void{
var _local2:Number;
if (lastSynchronized == go.ticks){
return;
};
lastSynchronized = go.ticks;
vecTemp.x = go.basex;
vecTemp.y = go.basey;
var _local1:b2Shape = body.m_shapeList;
_local2 = ((go.baseRotation / 180) * Math.PI);
body.m_flags = (body.m_flags & ~(b2Body.e_frozenFlag));
body.SetOriginPosition(vecTemp, _local2);
body.SynchronizeShapes();
}
}
}//package GameObject
Section 75
//GameObjectCollisionPoly (GameObject.GameObjectCollisionPoly)
package GameObject {
import Engine.Collision.Shapes.*;
public class GameObjectCollisionPoly {
public var tformedX:Number;
public var points:Array;
public var approxX:Number;
public var tformedY:Number;
public var approxRadius:Number;
public var polyDef:b2PolyDef;
public var approxY:Number;
public function GameObjectCollisionPoly(){
points = new Array();
super();
}
public function finalize():void{
polyDef = new b2PolyDef();
polyDef.vertexCount = points.length;
var _local1:int = (points.length - 1);
while (_local1 >= 0) {
polyDef.vertices[_local1].Set(points[_local1][0], points[_local1][1]);
_local1--;
};
polyDef.density = 1;
polyDef.friction = 0.3;
}
public function pushPoint(_arg1:Number, _arg2:Number):void{
points.push([_arg1, _arg2]);
}
}
}//package GameObject
Section 76
//GameObjectCollisionSet (GameObject.GameObjectCollisionSet)
package GameObject {
public class GameObjectCollisionSet {
public var children:Array;
public function GameObjectCollisionSet(){
children = new Array();
super();
}
public function collides(_arg1:GameObject, _arg2:Number, _arg3:Number):Boolean{
var _local7:GameObject;
var _local4:Number = (_arg2 - _arg1.basex);
var _local5:Number = (_arg3 - _arg1.basey);
var _local6:int;
while (_local6 < children.length) {
_local7 = children[_local6];
if (_local4 > (_local7.basex - (_local7.baseWidth / 2))){
if (_local5 > (_local7.basey - (_local7.baseHeight / 2))){
if (_local4 < (_local7.basex + (_local7.baseWidth / 2))){
if (_local5 < (_local7.basey + (_local7.baseHeight / 2))){
return (true);
};
};
};
};
_local6++;
};
return (false);
}
public static function fromChildren(_arg1:Array, _arg2:String):GameObjectCollisionSet{
var _local4:GameObject;
var _local3:GameObjectCollisionSet = new (GameObjectCollisionSet);
for each (_local4 in _arg1) {
if (_local4.name == _arg2){
_local4.remove();
_local3.children.push(_local4);
};
};
return (_local3);
}
}
}//package GameObject
Section 77
//GameObjectFilter (GameObject.GameObjectFilter)
package GameObject {
public class GameObjectFilter {
public var ticks:int;// = 0
public var removeFilter:Boolean;// = false
public function removeWhenDone():void{
}
public function reverse():void{
}
public function remove(_arg1:GameObject):void{
}
public function update(_arg1:GameObject):void{
}
}
}//package GameObject
Section 78
//GameObjectFilterAddOrigin (GameObject.GameObjectFilterAddOrigin)
package GameObject {
public class GameObjectFilterAddOrigin extends GameObjectFilter {
public var dx:Number;// = 0
public var dy:Number;// = 0
override public function update(_arg1:GameObject):void{
_arg1.modifiedx = (_arg1.modifiedx + dx);
_arg1.modifiedy = (_arg1.modifiedy + dy);
}
}
}//package GameObject
Section 79
//GameObjectFilterBlink (GameObject.GameObjectFilterBlink)
package GameObject {
import Tools.*;
public class GameObjectFilterBlink extends GameObjectFilter {
public var BlinkAlpha:Number;// = 0
public var dead:Boolean;// = false
public var Interval:int;// = 100
public var AliveTime:int;// = 0
public function GameObjectFilterBlink(){
ticks = Random.randInt(0, 100);
}
override public function update(_arg1:GameObject):void{
if (dead){
return;
};
ticks++;
if (((ticks % Interval) > (Interval / 2))){
_arg1.modifiedAlpha = (_arg1.modifiedAlpha * BlinkAlpha);
};
if ((((AliveTime > 0)) && ((ticks > AliveTime)))){
dead = true;
};
}
}
}//package GameObject
Section 80
//GameObjectFilterDampenInterpolateIn (GameObject.GameObjectFilterDampenInterpolateIn)
package GameObject {
import Tools.*;
public class GameObjectFilterDampenInterpolateIn extends GameObjectFilter {
public var Delay:int;
public var dx:Number;// = 0
public var dy:Number;// = 0
public var FadeTime:int;
override public function update(_arg1:GameObject):void{
ticks = (ticks + 1);
var _local2:Number = Interpolation.dampenInterpolateLock(dx, 0, Interpolation.fromTo(ticks, Delay, (Delay + FadeTime)));
var _local3:Number = Interpolation.dampenInterpolateLock(dy, 0, Interpolation.fromTo(ticks, Delay, (Delay + FadeTime)));
_arg1.modifiedx = (_arg1.modifiedx + _local2);
_arg1.modifiedy = (_arg1.modifiedy + _local3);
}
}
}//package GameObject
Section 81
//GameObjectFilterDampenOrigin (GameObject.GameObjectFilterDampenOrigin)
package GameObject {
public class GameObjectFilterDampenOrigin extends GameObjectFilter {
public var StickToBottom:int;// = 0
public var StickToTop:int;// = 0
public var factor:Number;// = 0
override public function update(_arg1:GameObject):void{
_arg1.dampenOrigin = factor;
}
}
}//package GameObject
Section 82
//GameObjectFilterDraggable (GameObject.GameObjectFilterDraggable)
package GameObject {
import Tools.*;
public class GameObjectFilterDraggable extends GameObjectFilter {
public var handleX:Number;// = 0
public var handleY:Number;// = 0
public var beingDragged:Boolean;// = false
public var startFunc:Function;
public var finishFunc:Function;
override public function update(_arg1:GameObject):void{
if (!beingDragged){
if (_arg1.gs.mHit()){
if (Input.i.mouseX() > (_arg1.basex - (_arg1.baseWidth / 2))){
if (Input.i.mouseX() < (_arg1.basex + (_arg1.baseWidth / 2))){
if (Input.i.mouseY() > (_arg1.basey - (_arg1.baseHeight / 2))){
if (Input.i.mouseY() < (_arg1.basey + (_arg1.baseHeight / 2))){
handleX = (_arg1.basex - Input.i.mouseX());
handleY = (_arg1.basey - Input.i.mouseY());
beingDragged = true;
if (startFunc){
startFunc();
};
};
};
};
};
};
};
if (beingDragged){
if (!Input.i.mouseDown()){
beingDragged = false;
if (finishFunc != null){
finishFunc();
};
};
};
if (beingDragged){
_arg1.basex = (Input.i.mouseX() + handleX);
_arg1.basey = (Input.i.mouseY() + handleY);
};
}
}
}//package GameObject
Section 83
//GameObjectFilterFadeInOut (GameObject.GameObjectFilterFadeInOut)
package GameObject {
import Tools.*;
public class GameObjectFilterFadeInOut extends GameObjectFilter {
public var FadeIn:int;// = 0
public var FadeOutDuration:Number;// = 0
public var FadeInBlur:int;// = 0
public var FadeInDelay:Number;// = 0
public var FadeOut:int;// = 0
public var FadeInDuration:Number;// = 0
public var FadeOutKill:int;// = 1
public var FadeOutBlur:int;// = 0
public var FadeOutTime:Number;// = 0
override public function update(_arg1:GameObject):void{
var _local5:Number;
var _local6:Array;
ticks = (ticks + 1);
var _local2:Number = 1;
var _local3:Number = 1;
var _local4:Number = 1;
if (FadeIn){
_local3 = Interpolation.linearInterpolateLock(0, 1, Interpolation.fromTo(ticks, FadeInDelay, (FadeInDelay + FadeInDuration)));
};
if (FadeOut){
_local4 = Interpolation.linearInterpolateLock(1, 0, Interpolation.fromTo(ticks, FadeOutTime, (FadeOutTime + FadeOutDuration)));
};
_local2 = (_local3 * _local4);
_arg1.pushAlpha(_local2);
if (((FadeInBlur) || (FadeOutBlur))){
_local5 = (((1 - _local3) * FadeInBlur) + ((1 - _local4) * FadeOutBlur));
_local6 = _arg1.obj.filters;
_arg1.obj.filters = _local6;
};
if (((FadeOut) && (FadeOutKill))){
if (ticks > (FadeOutTime + FadeOutDuration)){
_arg1._toRemove = true;
};
};
}
}
}//package GameObject
Section 84
//GameObjectFilterKill (GameObject.GameObjectFilterKill)
package GameObject {
public class GameObjectFilterKill extends GameObjectFilter {
public var time:Number;// = 0
override public function update(_arg1:GameObject):void{
if (_arg1.ticks > time){
_arg1._toRemove = true;
};
}
}
}//package GameObject
Section 85
//GameObjectFilterMoveWith (GameObject.GameObjectFilterMoveWith)
package GameObject {
public class GameObjectFilterMoveWith extends GameObjectFilter {
public var other:GameObject;
public var dx:Number;
public var dy:Number;
public var setup:Boolean;// = false
override public function update(_arg1:GameObject):void{
ticks++;
if (!setup){
setup = true;
dx = (_arg1.basex - other.basex);
dy = (_arg1.basey - other.basey);
};
_arg1.basex = (other.basex + dx);
_arg1.basey = (other.basey + dy);
if (other._removed){
removeFilter = true;
};
}
}
}//package GameObject
Section 86
//GameObjectFilterPulse (GameObject.GameObjectFilterPulse)
package GameObject {
import Tools.*;
public class GameObjectFilterPulse extends GameObjectFilter {
public var alpha:Number;// = 1
public var Speed:Number;// = 1
public function GameObjectFilterPulse(){
ticks = Random.randInt(0, 100);
}
override public function update(_arg1:GameObject):void{
ticks++;
_arg1.modifiedAlpha = (_arg1.modifiedAlpha * ((alpha * (1 + _arg1.sind(((ticks * 2) * Speed)))) / 2));
}
}
}//package GameObject
Section 87
//GameObjectFilterRepeats (GameObject.GameObjectFilterRepeats)
package GameObject {
import flash.display.*;
public class GameObjectFilterRepeats extends GameObjectFilter {
public var created:Boolean;// = false
public var others:Array;
public function GameObjectFilterRepeats(){
others = new Array();
super();
}
override public function remove(_arg1:GameObject):void{
var _local2:GameObject;
for each (_local2 in others) {
_local2.remove();
};
}
override public function update(_arg1:GameObject):void{
var _local2:int;
var _local3:int;
var _local4:GameObjectFilterStayOnScreen;
var _local5:GameObject;
var _local6:GameObjectFilter;
var _local7:GameObjectFilterDampenOrigin;
if (!created){
_arg1.hide();
_local3 = ((800 / _arg1.baseWidth) + 2);
_local4 = new GameObjectFilterStayOnScreen();
_local4.multiplier = _local3;
_local2 = 0;
while (_local2 < _local3) {
_local5 = new GameObject(_arg1.gs, _arg1.imClass, _arg1.zOrderString, (_arg1.basex + (_local2 * _arg1.baseWidth)), _arg1.basey);
_local5.addFilter(_local4);
others.push(_local5);
for each (_local6 in _arg1.filters) {
if ((_local6 is GameObjectFilterDampenOrigin)){
_local7 = new GameObjectFilterDampenOrigin();
_local7.factor = GameObjectFilterDampenOrigin(_local6).factor;
_local5.addFilter(_local7);
};
};
_local2++;
};
_arg1.addFilter(_local4);
created = true;
};
_local2 = 0;
while (_local2 < others.length) {
if (Bitmap(others[_local2].obj).bitmapData != Bitmap(_arg1.obj).bitmapData){
Bitmap(others[_local2].obj).bitmapData = Bitmap(_arg1.obj).bitmapData;
};
others[_local2].baseWidth = _arg1.baseWidth;
others[_local2].baseHeight = _arg1.baseHeight;
_local2++;
};
}
}
}//package GameObject
Section 88
//GameObjectFilterRotateSlowly (GameObject.GameObjectFilterRotateSlowly)
package GameObject {
import Tools.*;
public class GameObjectFilterRotateSlowly extends GameObjectFilter {
public var rotSpeed:Number;// = 1
public var paused:Boolean;// = false
public var internalRotationSet:Boolean;// = false
public var internalRotation:Number;// = 0
public function GameObjectFilterRotateSlowly(_arg1:Number=1){
rotSpeed = _arg1;
}
override public function update(_arg1:GameObject):void{
if (!internalRotationSet){
internalRotation = _arg1.baseRotation;
internalRotationSet = true;
};
if (!paused){
internalRotation = Interpolation.tendTowardsAngle(internalRotation, _arg1.baseRotation, rotSpeed);
};
_arg1.modifiedRotation = internalRotation;
}
}
}//package GameObject
Section 89
//GameObjectFilterScaleInOut (GameObject.GameObjectFilterScaleInOut)
package GameObject {
import Tools.*;
public class GameObjectFilterScaleInOut extends GameObjectFilter {
public var ScaleOutEndX:Number;// = 0
public var ScaleInDuration:Number;// = 0
public var ScaleOut:int;// = 0
public var ScaleInStartX:Number;// = 1
public var ScaleInStartY:Number;// = 1
public var ScaleOutTime:Number;// = 0
public var ScaleInDelay:Number;// = 0
public var ScaleIn:int;// = 0
public var ScaleOutDuration:Number;// = 0
public var ScaleOutEndY:Number;// = 0
override public function update(_arg1:GameObject):void{
ticks = (ticks + 1);
var _local2:Number = 1;
var _local3:Number = 1;
if (ScaleIn){
_local2 = (_local2 * Interpolation.linearInterpolateLock(ScaleInStartX, 1, Interpolation.fromTo(ticks, ScaleInDelay, (ScaleInDelay + ScaleInDuration))));
_local3 = (_local3 * Interpolation.linearInterpolateLock(ScaleInStartY, 1, Interpolation.fromTo(ticks, ScaleInDelay, (ScaleInDelay + ScaleInDuration))));
};
if (ScaleOut){
_local2 = (_local2 * Interpolation.linearInterpolateLock(1, ScaleOutEndX, Interpolation.fromTo(ticks, ScaleOutTime, (ScaleOutTime + ScaleOutDuration))));
_local3 = (_local3 * Interpolation.linearInterpolateLock(1, ScaleOutEndY, Interpolation.fromTo(ticks, ScaleOutTime, (ScaleOutTime + ScaleOutDuration))));
};
_arg1.pushScale(_local2, _local3);
}
}
}//package GameObject
Section 90
//GameObjectFilterShift (GameObject.GameObjectFilterShift)
package GameObject {
public class GameObjectFilterShift extends GameObjectFilter {
public var timeout:int;// = -1
public var dx:Number;// = 0
public var dy:Number;// = 0
override public function update(_arg1:GameObject):void{
ticks++;
_arg1.basex = (_arg1.basex + dx);
_arg1.basey = (_arg1.basey + dy);
if ((((ticks > timeout)) && (!((timeout == -1))))){
removeFilter = true;
};
}
}
}//package GameObject
Section 91
//GameObjectFilterSinDisplace (GameObject.GameObjectFilterSinDisplace)
package GameObject {
public class GameObjectFilterSinDisplace extends GameObjectFilter {
public var speed:Number;// = 1
public var x:Number;// = 0
public var y:Number;// = 0
override public function update(_arg1:GameObject):void{
ticks++;
_arg1.modifiedx = (_arg1.modifiedx + (x * _arg1.sind(((speed * Number(ticks)) * 3.6))));
_arg1.modifiedy = (_arg1.modifiedy + (y * _arg1.sind(((speed * Number(ticks)) * 3.6))));
}
}
}//package GameObject
Section 92
//GameObjectFilterSqrtInterpolateIn (GameObject.GameObjectFilterSqrtInterpolateIn)
package GameObject {
import Tools.*;
public class GameObjectFilterSqrtInterpolateIn extends GameObjectFilter {
public var useSquareSquare:Boolean;// = false
public var Delay:int;
public var useSquare:Boolean;// = false
public var FadeTime:int;
public var dx:Number;// = 0
public var dy:Number;// = 0
public var killFunction:Function;
public var useAlpha:Boolean;// = false
public var killWhenDone:Boolean;// = false
override public function removeWhenDone():void{
killWhenDone = true;
}
override public function reverse():void{
useSquare = !(useSquare);
ticks = 0;
}
public function progress():Number{
var _local1:Number = Interpolation.lockValue(Interpolation.fromTo(ticks, Delay, (Delay + FadeTime)), 0, 1);
if (useSquare){
return ((1 - _local1));
};
return (_local1);
}
override public function update(_arg1:GameObject):void{
var _local4:int;
var _local5:int;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
ticks = (ticks + 1);
var _local2:Number = 0;
var _local3:Number = 0;
if (useAlpha){
_local4 = 0;
_local5 = 1;
if (useSquare){
_local4 = 1;
_local5 = 0;
};
_arg1.modifiedAlpha = (_arg1.modifiedAlpha * Interpolation.squareInterpolateLock(_local4, _local5, Interpolation.fromTo(ticks, Delay, (Delay + FadeTime))));
} else {
if (useSquareSquare){
_local6 = 0;
_local7 = dx;
_local8 = 0;
_local9 = dy;
if (useSquare){
_local6 = dx;
_local8 = dy;
_local7 = 0;
_local9 = 0;
};
_local2 = Interpolation.squareSquareInterpolateLock(_local6, _local7, Interpolation.fromTo(ticks, Delay, (Delay + FadeTime)));
_local3 = Interpolation.squareSquareInterpolateLock(_local8, _local9, Interpolation.fromTo(ticks, Delay, (Delay + FadeTime)));
} else {
if (useSquare){
_local2 = Interpolation.squareInterpolateLock(0, dx, Interpolation.fromTo(ticks, Delay, (Delay + FadeTime)));
_local3 = Interpolation.squareInterpolateLock(0, dy, Interpolation.fromTo(ticks, Delay, (Delay + FadeTime)));
} else {
_local2 = Interpolation.sqrtInterpolateLock(dx, 0, Interpolation.fromTo(ticks, Delay, (Delay + FadeTime)));
_local3 = Interpolation.sqrtInterpolateLock(dy, 0, Interpolation.fromTo(ticks, Delay, (Delay + FadeTime)));
};
};
};
_arg1.modifiedx = (_arg1.modifiedx + _local2);
_arg1.modifiedy = (_arg1.modifiedy + _local3);
if (ticks > (Delay + FadeTime)){
if (killWhenDone){
if (killFunction){
killFunction(_arg1);
};
_arg1.remove();
};
};
}
public function done():Boolean{
return ((ticks > (Delay + FadeTime)));
}
}
}//package GameObject
Section 93
//GameObjectFilterStayOnScreen (GameObject.GameObjectFilterStayOnScreen)
package GameObject {
public class GameObjectFilterStayOnScreen extends GameObjectFilter {
public var overridedx:Number;// = 0
public var multiplier:int;// = 0
override public function update(_arg1:GameObject):void{
var _local2:Number = 0;
if (multiplier == 0){
_local2 = (880 + (_arg1.baseWidth * _arg1.modifiedScaleX));
} else {
_local2 = ((multiplier * _arg1.baseWidth) * _arg1.modifiedScaleX);
};
if (overridedx > 10){
_local2 = overridedx;
};
while (((_arg1.modifiedx - (_arg1.gs.camX * _arg1.dampenOrigin)) + ((_arg1.baseWidth * _arg1.modifiedScaleX) / 2)) < 0) {
_arg1.modifiedx = (_arg1.modifiedx + _local2);
};
while (((_arg1.modifiedx - (_arg1.gs.camX * _arg1.dampenOrigin)) - ((_arg1.baseWidth * _arg1.modifiedScaleX) / 2)) > 800) {
_arg1.modifiedx = (_arg1.modifiedx - _local2);
};
}
}
}//package GameObject
Section 94
//GameObjectFilterTrigger (GameObject.GameObjectFilterTrigger)
package GameObject {
public class GameObjectFilterTrigger extends GameObjectFilter {
public var cause:Function;
public var result:Function;
override public function update(_arg1:GameObject):void{
if (cause()){
removeFilter = true;
result();
};
}
}
}//package GameObject
Section 95
//GameObjectHelper (GameObject.GameObjectHelper)
package GameObject {
import flash.display.*;
import flash.geom.*;
import Audio.*;
import Tools.*;
import GameConfig.*;
public class GameObjectHelper {
public var ambientsMap:Object;
public var conditionalChildrenAdjust:Object;
public var lastInputs:Object;
public var lastOutputs:Object;
public var conditionalChildren:Object;
public var backing:GameObject;
public var _lazyLoad:SafeImageRequest;
public var removed:Boolean;// = false
public var childrenFadeData:Object;
public var go:GameObject;
public var blinkFilter:GameObjectFilterBlink;
public var lastAdjustedAlphaTicks;// = 0
public static var radianConst:Number = 0.0174532925199433;
public function GameObjectHelper(_arg1:GameObject){
conditionalChildren = new Object();
conditionalChildrenAdjust = new Object();
childrenFadeData = new Object();
lastInputs = new Object();
lastOutputs = new Object();
ambientsMap = new Object();
super();
this.go = _arg1;
}
public function angleToPoint(_arg1:Number, _arg2:Number):Number{
return (((((Math.atan2((_arg2 - go.globalY()), (_arg1 - go.globalX())) * 180) / Math.PI) + 90) + GameConfig.referenceAngle));
}
public function blinkHelpText(_arg1:String, _arg2:String="", _arg3:int=7):void{
var _local4:GameObject = new GameObject(go.gs, null, go.zOrderString, (go.baseWidth * (0.5 - go.baseHandleX)), (((-(go.baseHeight) / 2) - 10) + (go.baseHeight * (0.5 - go.baseHandleY))));
if (_arg2 != ""){
_local4.fontName = _arg2;
};
_local4.setText(_arg1, _arg3);
_local4.addFilter(new GameObjectFilterBlink());
_local4.updateDespitePaused = go.updateDespitePaused;
go.addChild(_local4);
}
public function slideTo(_arg1:Number, _arg2:Number, _arg3:Boolean=true, _arg4:int=100, _arg5:Function=null):void{
var _local6:GameObjectFilterSqrtInterpolateIn = new GameObjectFilterSqrtInterpolateIn();
_local6.dx = (_arg1 - go.basex);
_local6.dy = (_arg2 - go.basey);
_local6.useSquareSquare = true;
_local6.killWhenDone = _arg3;
_local6.FadeTime = _arg4;
_local6.killFunction = _arg5;
go.addFilter(_local6);
}
public function angleToObject(_arg1:GameObject):Number{
return (((((Math.atan2((_arg1.globalY() - go.globalY()), (_arg1.globalX() - go.globalX())) * 180) / Math.PI) + 90) + GameConfig.referenceAngle));
}
public function normalize(_arg1:Number, _arg2:Number):Point{
if ((((_arg1 == 0)) && ((_arg2 == 0)))){
return (new Point(0, 0));
};
var _local3:Number = Math.sqrt(((_arg1 * _arg1) + (_arg2 * _arg2)));
_arg1 = (_arg1 / _local3);
_arg2 = (_arg2 / _local3);
return (new Point(_arg1, _arg2));
}
public function anySlideFilters():Boolean{
var _local1:GameObjectFilter;
for each (_local1 in go.filters) {
if ((_local1 is GameObjectFilterSqrtInterpolateIn)){
if (!GameObjectFilterSqrtInterpolateIn(_local1).done()){
return (true);
};
};
};
return (false);
}
public function showChildren():void{
var _local1:GameObject;
for each (_local1 in go.children) {
_local1.show();
};
}
public function mapWhenChanged(_arg1:Array, _arg2:String, _arg3:Function, _arg4:Function):Array{
var _local5:Array = new Array(_arg1.length);
var _local6:Array = Array(lastInputs[_arg2])[0];
var _local7:Array = Array(lastOutputs[_arg2])[0];
if (!_local6){
_local6 = new Array(_arg1.length);
lastInputs[_arg2] = _local6;
_local7 = new Array(_arg1.length);
lastOutputs[_arg2] = _local7;
};
var _local8:int;
while (_local8 < _arg1.length) {
if (_arg1[_local8] != _local6[_local8]){
if (_local7[_local8]){
_arg4(_local7[_local8]);
};
if (_arg1[_local8]){
_local5[_local8] = _arg3(_arg1[_local8]);
};
} else {
_local5[_local8] = _local7[_local8];
};
_local6[_local8] = _arg1[_local8];
_local7[_local8] = _local5[_local8];
_local8++;
};
return (_local5);
}
public function relativeAngleToObject(_arg1:GameObject):Number{
var _local2:Number = 0;
if (go.parent){
_local2 = (_local2 + go.parent.baseRotation);
};
return ((go.helper.angleToObject(_arg1) - _local2));
}
public function fadeChildren(_arg1:Number, _arg2:Number=100):void{
var _local3:GameObject;
var _local4:Number;
for each (_local3 in go.children) {
if (childrenFadeData[_local3] == null){
childrenFadeData[_local3] = _local3.baseAlpha;
};
_local4 = Number(childrenFadeData[_local3]);
_local3.baseAlpha = Interpolation.tendTowards(_local3.baseAlpha, (_arg1 * _local4), (_local4 / _arg2));
_local3.hidden = (_local3.baseAlpha == 0);
};
}
public function onScreen():Boolean{
if ((go.basex - go.gs.camX) < 0){
return (false);
};
if ((go.basey - go.gs.camX) > 800){
return (false);
};
if ((go.basey - go.gs.camY) < 0){
return (false);
};
if ((go.basey - go.gs.camY) > 600){
return (false);
};
return (true);
}
public function positionAsChild(_arg1:GameObject, _arg2:Number, _arg3:Number):void{
var _local4:Point = go.tformed(_arg2, _arg3);
_arg1.basex = _local4.x;
_arg1.basey = _local4.y;
_arg1.baseScaleX = go.baseScaleX;
_arg1.baseScaleY = go.baseScaleY;
_arg1.baseRotation = go.modifiedRotation;
_arg1.baseAlpha = go.baseAlpha;
}
public function offscreen(_arg1:int=0):Boolean{
if (go.basex < -(_arg1)){
return (true);
};
if (go.basex > (800 + _arg1)){
return (true);
};
if (go.basey < -(_arg1)){
return (true);
};
if (go.basey > (600 + _arg1)){
return (true);
};
return (false);
}
public function stripChildren():void{
var _local1:GameObject;
for each (_local1 in go.children) {
_local1.remove();
};
}
public function addBacking():void{
backing = new GameObject(go.gs, GraphicsTools.createFilledSprite(800, 600, 4278190080), go.zOrderString, 400, 300);
backing.baseAlpha = 0.4;
backing.helperFilter.fadeIn(15);
backing.setGlobal(true);
go.changeZOrder(go.zOrderString);
}
public function playAmbient(_arg1:GameSound, _arg2:Boolean=false):GameSoundChannel{
if ((ambientsMap[_arg1] is GameSoundChannel)){
if (!_arg2){
ambientsMap[_arg1].stop();
ambientsMap[_arg1] = null;
};
} else {
if (_arg2){
ambientsMap[_arg1] = _arg1.play(true);
};
};
return (ambientsMap[_arg1]);
}
public function update():void{
var _local1:GameObjectFilter;
var _local2:Number;
if (_lazyLoad){
if (_lazyLoad.finished){
go.setupButton(Bitmap(_lazyLoad.ldr.getChildAt(0)).bitmapData, "", null, true);
go.baseWidth = go.obj.width;
go.baseHeight = go.obj.height;
_lazyLoad = null;
};
};
if (backing){
for each (_local1 in go.filters) {
if ((_local1 is GameObjectFilterSqrtInterpolateIn)){
_local2 = GameObjectFilterSqrtInterpolateIn(_local1).progress();
_local2 = ((_local2 - 0.5) * 2);
if (_local2 < 0){
_local2 = 0;
};
backing.baseAlpha = (_local2 * 0.4);
};
};
};
}
public function handleRemove():void{
var _local1:Object;
removed = true;
if (backing){
backing.helperFilter.fadeOff(15);
};
for each (_local1 in conditionalChildren) {
if ((_local1 is GameObject)){
GameObject(_local1).remove();
};
};
for each (_local1 in ambientsMap) {
if ((_local1 is GameSoundChannel)){
GameSoundChannel(_local1).stop();
};
};
}
public function blink(_arg1:Boolean):void{
if (_arg1){
if (!blinkFilter){
blinkFilter = new GameObjectFilterBlink();
blinkFilter.BlinkAlpha = 0.4;
blinkFilter.Interval = 15;
go.addFilter(blinkFilter);
};
} else {
if (blinkFilter){
blinkFilter.removeFilter = true;
blinkFilter = null;
};
};
}
public function getModifiedRotation():Number{
var _local1:GameObjectFilter;
for each (_local1 in go.filters) {
if ((_local1 is GameObjectFilterRotateSlowly)){
return (GameObjectFilterRotateSlowly(_local1).internalRotation);
};
};
return (go.baseRotation);
}
public function hideChildren():void{
var _local1:GameObject;
for each (_local1 in go.children) {
_local1.hide();
};
}
public function findNearest(_arg1:Class):GameObject{
var _local4:GameObject;
var _local2:GameObject;
var _local3:Number = 0;
for each (_local4 in go.gs.objects) {
if ((_local4 is _arg1)){
if (_local4 != go){
if ((((_local4.distanceToObject(go) < _local3)) || ((_local2 == null)))){
_local3 = _local4.distanceToObject(go);
_local2 = _local4;
};
};
};
};
return (_local2);
}
public function conditionallyCreateChild(_arg1:Object, _arg2:String, _arg3:Boolean, _arg4:Number=0.05, _arg5:Function=null):GameObject{
var _local7:Object;
var _local8:int;
if (removed){
return (null);
};
var _local6:GameObject = conditionalChildren[_arg2];
if (!_local6){
if (_arg3){
if ((_arg1 is Class)){
_local7 = new (_arg1);
if ((_local7 is GameObject)){
_local6 = GameObject(_local7);
} else {
_local6 = new GameObject(null, _local7, go.zOrderString, go.basex, go.basey);
};
} else {
if ((_arg1 is Function)){
_local6 = GameObject(_arg1());
} else {
_local6 = new GameObject(go.gs, _arg1, go.zOrderString, go.basex, go.basey);
};
};
if (_arg5){
_arg5(_local6);
};
conditionalChildren[_arg2] = _local6;
_local6.baseAlpha = 0;
};
};
if (_local6){
_local8 = int(conditionalChildrenAdjust[_arg2]);
if (_local8 != go.ticks){
if (_arg3){
_local6.baseAlpha = (_local6.baseAlpha + _arg4);
} else {
_local6.baseAlpha = (_local6.baseAlpha - _arg4);
};
};
conditionalChildrenAdjust[_arg2] = go.ticks;
_local6.baseAlpha = Interpolation.lockValue(_local6.baseAlpha, 0, 1);
if (((!(_arg3)) && ((_local6.baseAlpha == 0)))){
_local6.remove();
conditionalChildren[_arg2] = null;
};
};
return (_local6);
}
public function angleForVector(_arg1:Number, _arg2:Number):Number{
return (((((Math.atan2(_arg2, _arg1) * 180) / Math.PI) + 90) + GameConfig.referenceAngle));
}
public function containsFilter(_arg1:Class):Boolean{
var _local2:GameObjectFilter;
for each (_local2 in go.filters) {
if ((_local2 is _arg1)){
return (true);
};
};
return (false);
}
public function lazyLoad(_arg1:String):void{
_lazyLoad = new SafeImageRequest(_arg1);
}
public function mapChildren(_arg1:Function):void{
var _local2:GameObject;
for each (_local2 in go.children) {
_arg1(_local2);
};
}
public function vectorToObject(_arg1:GameObject):Point{
var _local2:Number = (_arg1.basex - go.basex);
var _local3:Number = (_arg1.basey - go.basey);
var _local4:Number = Math.sqrt(((_local2 * _local2) + (_local3 * _local3)));
_local2 = (_local2 / _local4);
_local3 = (_local3 / _local4);
return (new Point(_local2, _local3));
}
public function rotateVector(_arg1:Number, _arg2:Number, _arg3:Number=-9999999):Point{
if (_arg3 < -99999){
_arg3 = go.baseRotation;
};
var _local4:Number = (((Math.cos((-(_arg3) * radianConst)) * _arg1) * go.modifiedScaleX) + ((Math.sin((-(_arg3) * radianConst)) * _arg2) * go.modifiedScaleY));
var _local5:Number = (((-(Math.sin((-(_arg3) * radianConst))) * _arg1) * go.modifiedScaleX) + ((Math.cos((-(_arg3) * radianConst)) * _arg2) * go.modifiedScaleY));
return (new Point(_local4, _local5));
}
}
}//package GameObject
Section 96
//GameObjectHelperAnimation (GameObject.GameObjectHelperAnimation)
package GameObject {
import flash.display.*;
public class GameObjectHelperAnimation {
public var go:GameObject;
public function GameObjectHelperAnimation(_arg1:GameObject){
go = _arg1;
}
public function update():void{
}
public function setFrame(_arg1:BitmapData):void{
Bitmap(go.obj).bitmapData = _arg1;
go.baseWidth = _arg1.width;
go.baseHeight = _arg1.height;
}
}
}//package GameObject
Section 97
//GameObjectHelperButton (GameObject.GameObjectHelperButton)
package GameObject {
public class GameObjectHelperButton {
public var radioButtons:Array;// = null
public var go:GameObject;
public var selected:Boolean;// = false
public function GameObjectHelperButton(_arg1:GameObject){
go = _arg1;
}
public function mHit():void{
var _local1:GameObject;
if (radioButtons){
for each (_local1 in radioButtons) {
_local1.setButtonOn(false);
_local1.helperButton.selected = false;
};
go.setButtonOn(true);
selected = true;
};
}
public function update():void{
}
public function setupRadioButtons(_arg1:Array, _arg2:Boolean=true):void{
var _local3:GameObject;
for each (_local3 in _arg1) {
_local3.helperButton.radioButtons = _arg1;
};
if (_arg2){
selected = true;
go.setButtonOn(true);
};
}
public function updatePrevNext(_arg1:GameObject, _arg2:GameObject):void{
var _local3:int;
var _local4:int;
if (radioButtons){
_arg1.enableButton();
_arg2.enableButton();
_local3 = -1;
_local4 = 0;
while (_local4 < radioButtons.length) {
if (radioButtons[_local4].helperButton.selected){
_local3 = _local4;
};
_local4++;
};
if (_local3 == 0){
_arg1.disableButton();
};
if (_local3 == (radioButtons.length - 1)){
_arg2.disableButton();
};
if (_arg1.mHit()){
if (_local3 == -1){
radioButtons[0]._mHit(null);
} else {
if (_local3 > 0){
radioButtons[(_local3 - 1)]._mHit(null);
};
};
};
if (_arg2.mHit()){
if (_local3 == -1){
radioButtons[0]._mHit(null);
} else {
if (_local3 < (radioButtons.length - 1)){
radioButtons[(_local3 + 1)]._mHit(null);
};
};
};
};
}
}
}//package GameObject
Section 98
//GameObjectHelperFilter (GameObject.GameObjectHelperFilter)
package GameObject {
public class GameObjectHelperFilter {
public var go:GameObject;
public function GameObjectHelperFilter(_arg1:GameObject){
go = _arg1;
}
public function fadeIn(_arg1:int, _arg2:int=0):void{
var _local3:GameObjectFilterFadeInOut = new GameObjectFilterFadeInOut();
_local3.FadeIn = 1;
_local3.FadeInDuration = _arg1;
_local3.FadeInDelay = _arg2;
go.addFilter(_local3);
}
public function addShift(_arg1:Number, _arg2:Number, _arg3:int=-1):void{
var _local4:GameObjectFilterShift = new GameObjectFilterShift();
_local4.dx = _arg1;
_local4.dy = _arg2;
_local4.timeout = _arg3;
go.addFilter(_local4);
}
public function draggable(_arg1:Function=null, _arg2:Function=null):GameObjectFilterDraggable{
var _local3:GameObjectFilterDraggable = new GameObjectFilterDraggable();
_local3.startFunc = _arg1;
_local3.finishFunc = _arg2;
go.addFilter(_local3);
return (_local3);
}
public function addPanelSlide():void{
go.basey = (go.basey - 700);
var _local1:GameObjectFilterSqrtInterpolateIn = new GameObjectFilterSqrtInterpolateIn();
_local1.dy = 700;
_local1.FadeTime = 100;
_local1.useSquareSquare = true;
go.addFilter(_local1);
}
public function sinDisplace(_arg1:Number, _arg2:Number, _arg3:Number=1):void{
var _local4:GameObjectFilterSinDisplace = new GameObjectFilterSinDisplace();
_local4.x = _arg1;
_local4.y = _arg2;
_local4.speed = _arg3;
go.addFilter(_local4);
}
public function fadeOffIfFalse(_arg1:int, _arg2:Function):void{
var period = _arg1;
var func = _arg2;
var gof:GameObjectFilterTrigger = new GameObjectFilterTrigger();
gof.cause = func;
gof.result = function ():void{
go.helperFilter.fadeOff(period);
};
go.addFilter(gof);
}
public function scaleIn(_arg1:int, _arg2:Number=0, _arg3:Number=0, _arg4:int=0):void{
var _local5:GameObjectFilterScaleInOut = new GameObjectFilterScaleInOut();
_local5.ScaleIn = 1;
_local5.ScaleInDelay = _arg4;
_local5.ScaleInDuration = _arg1;
_local5.ScaleInStartX = _arg2;
_local5.ScaleInStartY = _arg3;
go.addFilter(_local5);
}
public function moveWith(_arg1:GameObject):void{
var _local2:GameObjectFilterMoveWith = new GameObjectFilterMoveWith();
_local2.other = _arg1;
go.addFilter(_local2);
}
public function pulse(_arg1:Number=1, _arg2:int=0, _arg3:int=0, _arg4:Boolean=true):void{
var _local5:GameObjectFilterPulse = new GameObjectFilterPulse();
if (_arg2 > 0){
_local5.Speed = (100 / _arg2);
};
if (!_arg4){
_local5.ticks = 0;
};
_local5.alpha = _arg1;
go.addFilter(_local5);
}
public function fadeOff(_arg1:int, _arg2:int=-1, _arg3:Boolean=true):void{
if (_arg2 == -1){
_arg2 = _arg1;
_arg1 = 0;
};
var _local4:GameObjectFilterFadeInOut = new GameObjectFilterFadeInOut();
_local4.FadeOut = 1;
_local4.FadeOutTime = _arg1;
_local4.FadeOutDuration = _arg2;
_local4.FadeOutKill = (_arg3) ? 1 : 0;
go.addFilter(_local4);
}
public function blink(_arg1:Number=0, _arg2:int=100, _arg3:int=0, _arg4:Boolean=true):void{
var _local5:GameObjectFilterBlink = new GameObjectFilterBlink();
_local5.BlinkAlpha = _arg1;
_local5.Interval = _arg2;
_local5.AliveTime = _arg3;
if (!_arg4){
_local5.ticks = 0;
};
go.addFilter(_local5);
}
public function dampenInterpolateIn(_arg1:int, _arg2:Number, _arg3:Number, _arg4:int=0):void{
var _local5:GameObjectFilterDampenInterpolateIn = new GameObjectFilterDampenInterpolateIn();
_local5.Delay = _arg4;
_local5.FadeTime = _arg1;
_local5.dx = _arg2;
_local5.dy = _arg3;
go.addFilter(_local5);
}
}
}//package GameObject
Section 99
//GameScene (GameScene.GameScene)
package GameScene {
import Particles.*;
import flash.display.*;
import GameObject.*;
import Layout.*;
import flash.geom.*;
import NagScreen.*;
import Audio.*;
import Tools.*;
import GlobalSetup.*;
public class GameScene {
public var updateWhenRemoving:Boolean;// = false
public var gss:GameSceneStack;
public var objects:Array;
public var parent:Sprite;
public var paused:Boolean;// = false
public var defaultTextSize:Number;// = 24
public var fadeToBlackTicks:int;// = 0
public var fadeToBlack:Boolean;// = false
public var _paused:Boolean;// = false
public var Ticks:int;// = 0
public var camX:Number;// = 0
public var _mhit:Boolean;
public var m:MovieClip;
public var cameras:Array;
public var orphanedParticleLayers:Array;
public var i:Input;
public var camY:Number;// = 0
public var defaultTextLayer:String;// = "TextLayer"
public var zOrders:Array;
public static var stealFocus:Boolean = true;
public static var currentScene:GameScene;
public static var currentindex:int = 0;
public function GameScene(){
objects = new Array();
zOrders = new Array();
cameras = new Array();
orphanedParticleLayers = new Array();
super();
currentScene = this;
NagScreen.preload();
m = new MovieClip();
new ZOrder().SetupZOrder(this);
}
public function _register(_arg1:Sprite):void{
}
public function flushParticles():void{
var _local1:GameSceneZOrder;
var _local2:ParticleLayer;
for each (_local1 in zOrders) {
if (_local1.pl){
_local1.pl.remove();
};
};
for each (_local2 in orphanedParticleLayers) {
_local2.remove();
};
orphanedParticleLayers = new Array();
}
public function particleKilledCallback(_arg1:Particle):void{
}
public function init():void{
}
public function pushScene(_arg1:GameScene, _arg2:Boolean=false, _arg3:int=0):void{
gss.pushScene(_arg1, _arg2, _arg3);
}
public function count(_arg1:Class):int{
var _local3:GameObject;
var _local2:int;
for each (_local3 in objects) {
if ((_local3 is _arg1)){
_local2++;
};
};
return (_local2);
}
public function drawBackground(_arg1:int, _arg2:int, _arg3:int):void{
var _local4:String = GradientType.LINEAR;
var _local5:Array = [_arg1, _arg2, _arg3];
var _local6:Array = [100, 100, 100];
var _local7:Array = [0, 128, 0xFF];
var _local8:Matrix = new Matrix();
_local8.createGradientBox(400, 600, (Math.PI / 2), 0, 0);
var _local9:String = SpreadMethod.PAD;
m.graphics.beginGradientFill(_local4, _local5, _local6, _local7, _local8, _local9);
m.graphics.drawRect(0, 0, 800, 600);
}
final public function register(_arg1:Sprite):void{
var _local2:GameSceneZOrder;
parent = _arg1;
currentindex--;
_arg1.addChildAt(m, 0);
for each (_local2 in zOrders) {
m.addChild(_local2.m);
};
_register(_arg1);
}
public function applyToParticles(_arg1:Function):void{
var _local2:int;
var _local3:Particle;
var _local4:ParticleLayer;
var _local5:GameSceneZOrder;
_local2 = 0;
while (_local2 < objects.length) {
for each (_local3 in objects[_local2].mainLayer.particles) {
_arg1(_local3);
};
_local2++;
};
_local2 = 0;
while (_local2 < orphanedParticleLayers.length) {
_local4 = orphanedParticleLayers[_local2];
for each (_local3 in _local4.particles) {
_arg1(_local3);
};
_local2++;
};
_local2 = 0;
while (_local2 < zOrders.length) {
_local5 = GameSceneZOrder(zOrders[_local2]);
for each (_local3 in _local5.pl.particles) {
_arg1(_local3);
};
_local2++;
};
}
public function findRandomObjectByClass(_arg1:String):GameObject{
var _local3:GameObject;
var _local2:Array = new Array();
for each (_local3 in objects) {
if (_local3.className == _arg1){
_local2.push(_local3);
};
};
if (_local2.length > 0){
return (_local2[Random.randInt(0, (_local2.length - 1))]);
};
return (null);
}
public function setCamera(_arg1:GameSceneCamera):void{
cameras.push(_arg1);
}
public function clipForZOrder(_arg1:String):MovieClip{
var _local2:GameSceneZOrder;
for each (_local2 in zOrders) {
if (_local2.name == _arg1){
return (_local2.m);
};
};
trace(("Could not find ZOrder: " + _arg1));
return (m);
}
public function vert(_arg1:Array, _arg2:int=8, _arg3:Number=0, _arg4:Number=0):Layout{
return (Layout.Vert(_arg1, _arg2, _arg3, _arg4));
}
public function text(_arg1:String, _arg2:Number=-1, _arg3:Number=0.5, _arg4:Number=0.5):GameObject{
if (_arg2 < 0){
_arg2 = defaultTextSize;
};
var _local5 = "TextLayer";
if (defaultTextLayer != ""){
_local5 = defaultTextLayer;
};
var _local6:GameObject = new GameObject(this, null, _local5, 0, 0);
_local6.setText(_arg1, _arg2);
_local6.baseHandleX = _arg3;
_local6.baseHandleY = _arg4;
return (_local6);
}
public function horiz(_arg1:Array, _arg2:int=8, _arg3:Number=0, _arg4:Number=0):Layout{
return (Layout.Horiz(_arg1, _arg2, _arg3, _arg4));
}
public function getNearest(_arg1:Class, _arg2:Number, _arg3:Number):GameObject{
var _local5:GameObject;
var _local6:GameObject;
var _local7:Number;
var _local4:Number = 999999;
for each (_local6 in objects) {
if ((_local6 is _arg1)){
_local7 = _local6.distanceToPoint(_arg2, _arg3);
if (_local7 < _local4){
_local4 = _local7;
_local5 = _local6;
};
};
};
return (_local5);
}
public function syncRemoved():void{
objects = objects.filter(function (_arg1:GameObject, _arg2:int, _arg3:Array):Boolean{
return (!(_arg1._removed));
});
}
public function update():void{
var go:GameObject;
var lgo:GameObject;
var gss:GameSceneCameraStack;
var nc:GameSceneCamera;
var zo:GameSceneZOrder;
var pl:ParticleLayer;
_mhit = Input.i.mouseHit();
_paused = paused;
for each (go in objects) {
if (go.pausesGame){
_paused = true;
};
};
if (!_paused){
for each (gss in cameras) {
gss.decay();
};
};
if (cameras.length > 0){
nc = GameSceneCameraStack.flatten(cameras);
camX = nc.x;
camY = nc.y;
};
GameSoundScene.updateAll();
if (!_paused){
Ticks = (Ticks + 1);
};
for each (lgo in objects) {
lgo.lastX = lgo.basex;
lgo.lastY = lgo.basey;
};
for each (lgo in objects) {
if (((!(_paused)) || (lgo.updateDespitePaused))){
if (lgo.parent == null){
lgo.update();
};
};
};
for each (lgo in objects) {
if (((!(_paused)) || (lgo.updateDespitePaused))){
lgo.syncObj();
} else {
if (lgo.parent){
if (lgo.parent.updateDespitePaused){
lgo.syncObj();
};
};
};
};
_update();
syncRemoved();
if (!_paused){
for each (zo in zOrders) {
zo.pl.x = camX;
zo.pl.y = camY;
zo.pl.update();
};
for each (pl in orphanedParticleLayers) {
pl.x = camX;
pl.y = camY;
pl.update();
if (pl.parent.length == 0){
pl.remove();
};
};
orphanedParticleLayers = orphanedParticleLayers.filter(function (_arg1:ParticleLayer, _arg2:int, _arg3:Array):Boolean{
return (!((_arg1.particles.length == 0)));
});
};
}
public function pushCamera(_arg1:GameSceneCamera):void{
var _local2:GameSceneCameraStack;
for each (_local2 in cameras) {
if (_local2.Camera == _arg1){
_local2.increment();
return;
};
};
_local2 = new GameSceneCameraStack();
_local2.Camera = _arg1;
cameras.push(_local2);
}
public function stackFading():Boolean{
return (!((GameSceneStack.currentStack.fading == 0)));
}
public function mHit():Boolean{
return (_mhit);
}
public function _update():void{
}
public function getZOrder(_arg1:String):GameSceneZOrder{
var _local2:GameSceneZOrder;
for each (_local2 in zOrders) {
if (_local2.name == _arg1){
return (_local2);
};
};
trace(("Could not find ZOrder: " + _arg1));
return (null);
}
public function mousex():int{
return (i.mouseX());
}
public function mousey():int{
return (i.mouseY());
}
public function addZOrder(_arg1:String):void{
var _local2:GameSceneZOrder = new GameSceneZOrder();
_local2.name = _arg1;
_local2.m = new MovieClip();
_local2.pl = new ParticleLayer();
_local2.pl.parent = _local2.m;
zOrders.push(_local2);
}
public function findObjectByClass(_arg1:String):GameObject{
var _local2:GameObject;
for each (_local2 in objects) {
if (_local2.className == _arg1){
return (_local2);
};
};
return (null);
}
public function findObjectByName(_arg1:String):GameObject{
var _local2:GameObject;
for each (_local2 in objects) {
if (_local2.name == _arg1){
return (_local2);
};
};
return (null);
}
public function addOrphanedParticleLayer(_arg1:ParticleLayer):void{
orphanedParticleLayers.push(_arg1);
}
public static function current():GameScene{
return (currentScene);
}
}
}//package GameScene
Section 100
//GameSceneCamera (GameScene.GameSceneCamera)
package GameScene {
public class GameSceneCamera {
public var totalTicks:Number;// = 300
public var linear:Boolean;// = false
public var minX:Number;// = -9999999
public var minY:Number;// = -9999999
public var maxX:Number;// = 9999999
public var maxY:Number;// = 9999999
public var x:Number;// = 0
public var y:Number;// = 0
public var frameChange:Number;// = 1
public function position(_arg1:Number, _arg2:Number):void{
this.x = _arg1;
this.y = _arg2;
if (this.x > maxX){
this.x = maxX;
};
if (this.x < minX){
this.x = minX;
};
if (this.y > maxY){
this.y = maxY;
};
if (this.y < minY){
this.y = minY;
};
}
public function positionInterpolate(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):void{
position(((_arg1 + _arg3) / 2), ((_arg2 + _arg4) / 2));
}
}
}//package GameScene
Section 101
//GameSceneCameraStack (GameScene.GameSceneCameraStack)
package GameScene {
import Tools.*;
public class GameSceneCameraStack {
public var Camera:GameSceneCamera;
public var ticks:Number;// = 0
public static var globalCameraX:Number;
public static var globalCameraY:Number;
public function decay():void{
ticks = (ticks - Camera.frameChange);
if (ticks < 0){
ticks = 0;
};
}
public function increment():void{
ticks = (ticks + (Camera.frameChange * 2));
if (ticks > Camera.totalTicks){
ticks = Camera.totalTicks;
};
}
public static function cameraSort(_arg1:GameSceneCameraStack, _arg2:GameSceneCameraStack):int{
if (_arg1.ticks > _arg2.ticks){
return (-1);
};
if (_arg1.ticks < _arg2.ticks){
return (1);
};
return (0);
}
public static function flatten(_arg1:Array):GameSceneCamera{
var _local5:GameSceneCameraStack;
var _local6:GameSceneCamera;
var _local7:Number;
var _local2:Number = 0;
var _local3:Number = 0;
var _local4:Number = 0;
for each (_local5 in _arg1) {
if (_local5.ticks > 0){
if (_local5.Camera.linear){
_local7 = (Number(_local5.ticks) / Number(_local5.Camera.totalTicks));
} else {
_local7 = Interpolation.squareSquareInterpolateLock(0, 1, (Number(_local5.ticks) / Number(_local5.Camera.totalTicks)));
};
_local2 = (_local2 + (_local5.Camera.x * _local7));
_local3 = (_local3 + (_local5.Camera.y * _local7));
_local4 = (_local4 + _local7);
};
};
_local6 = new GameSceneCamera();
if (_local4 > 0){
_local6.x = (_local2 / _local4);
_local6.y = (_local3 / _local4);
} else {
if (_arg1.length > 0){
_local6.x = _arg1[0].Camera.x;
_local6.y = _arg1[0].Camera.y;
} else {
_local6.x = 0;
_local6.y = 0;
};
};
globalCameraX = _local6.x;
globalCameraY = _local6.y;
return (_local6);
}
}
}//package GameScene
Section 102
//GameSceneStack (GameScene.GameSceneStack)
package GameScene {
import flash.display.*;
import GameObject.*;
import flash.utils.*;
import Serialization.*;
import Tools.*;
public class GameSceneStack {
public var lastTicks:int;
public var fadeSprite:Bitmap;
public var stack:Array;
public var i:Input;
public var extraDelay:int;// = 0
public var fading:Boolean;// = false
public var fadeTicks:int;// = 0
public var killedLife:int;// = 0
public var elapsedTicks:int;
public var mainSprite:Sprite;
public static var focusObj:GameObject;
public static var currentStack:GameSceneStack;
public function GameSceneStack(){
stack = new Array();
super();
currentStack = this;
}
public function update():void{
var _local4:Boolean;
var _local5:int;
var _local6:GameScene;
var _local7:int;
var _local8:GameScene;
var _local9:int;
var _local10:Boolean;
var _local11:GameObject;
StoreObject.updateStoreObject();
if (i == null){
if (Input.i){
i = Input.i;
} else {
i = new Input(mainSprite.stage);
};
};
if (GameScene.stealFocus){
if (focusObj){
if (focusObj._removed){
focusObj = null;
};
};
if (focusObj){
mainSprite.stage.focus = InteractiveObject(focusObj.obj);
} else {
mainSprite.stage.focus = mainSprite;
};
mainSprite.focusRect = null;
mainSprite.stage.stageFocusRect = false;
};
var _local1:int = getTimer();
elapsedTicks = (elapsedTicks + (_local1 - lastTicks));
lastTicks = _local1;
var _local2:int = ((elapsedTicks - (elapsedTicks % 10)) / 10);
elapsedTicks = (elapsedTicks % 10);
if (_local2 > 5){
_local2 = 5;
};
var _local3:int;
while (_local3 < _local2) {
_local4 = (_local3 == (_local2 - 1));
_local5 = getTimer();
_local6 = GameScene(stack[(stack.length - 1)]);
if (((!(fading)) || ((fadeTicks > (60 + extraDelay))))){
_local6.update();
};
_local7 = 0;
while (_local7 < (stack.length - 1)) {
_local8 = GameScene(stack[_local7]);
if (_local8.updateWhenRemoving){
_local8.update();
};
_local7++;
};
if (fading){
fadeTicks = (fadeTicks + 1);
fadeSprite.alpha = Interpolation.linearInterpolateLock(0, 1, Interpolation.fromTo(fadeTicks, 0, 30));
fadeSprite.alpha = (fadeSprite.alpha * Interpolation.linearInterpolateLock(1, 0, Interpolation.fromTo(fadeTicks, (70 + extraDelay), (100 + extraDelay))));
if ((((fadeTicks > (100 + extraDelay))) && (_local4))){
fadeTicks = 0;
fading = false;
mainSprite.removeChild(fadeSprite);
};
};
_local3++;
};
_local3 = 0;
while (_local3 < _local2) {
_local9 = 0;
while (_local9 < (stack.length - 1)) {
_local6 = GameScene(stack[_local9]);
_local10 = false;
if (_local6.fadeToBlack){
_local6.fadeToBlackTicks = (_local6.fadeToBlackTicks + 1);
_local10 = (_local6.fadeToBlackTicks > 50);
} else {
_local6.m.alpha = (_local6.m.alpha - 0.02);
_local10 = (_local6.m.alpha < 0);
};
if (((_local10) && ((_local3 == (_local2 - 1))))){
_local6.flushParticles();
for each (_local11 in _local6.objects) {
_local11.remove();
};
mainSprite.removeChild(_local6.m);
stack = [stack.pop()];
return;
};
_local9++;
};
_local3++;
};
}
public function pushScene(_arg1:GameScene, _arg2:Boolean=false, _arg3:int=0):void{
_arg1.gss = this;
_arg1.i = i;
_arg1.register(mainSprite);
_arg1.init();
stack.push(_arg1);
extraDelay = _arg3;
if (_arg2){
if (fadeSprite){
if (mainSprite.contains(fadeSprite)){
mainSprite.removeChild(fadeSprite);
};
};
fadeSprite = GraphicsTools.createFilledSprite(800, 600, 0);
mainSprite.addChild(fadeSprite);
fadeTicks = 0;
fading = true;
_arg1.fadeToBlack = true;
} else {
fading = false;
};
}
}
}//package GameScene
Section 103
//GameSceneZOrder (GameScene.GameSceneZOrder)
package GameScene {
import Particles.*;
import flash.display.*;
public class GameSceneZOrder {
public var name:String;
public var pl:ParticleLayer;
public var m:MovieClip;
}
}//package GameScene
Section 104
//Embeds (GlobalSetup.Embeds)
package GlobalSetup {
public class Embeds {
public static var p1_roll002_png:Class = Embeds_p1_roll002_png;
public static var p1_roll006_png:Class = Embeds_p1_roll006_png;
public static var smoke_d003_png:Class = Embeds_smoke_d003_png;
public static var smoke_a013_png:Class = Embeds_smoke_a013_png;
public static var smoke_d007_png:Class = Embeds_smoke_d007_png;
public static var bonus_ball_png:Class = Embeds_bonus_ball_png;
public static var pipe_png:Class = Embeds_pipe_png;
public static var balloon_png:Class = Embeds_balloon_png;
public static var ring3_roll_png:Class = Embeds_ring3_roll_png;
public static var smoke_d010_png:Class = Embeds_smoke_d010_png;
public static var smoke_c001_png:Class = Embeds_smoke_c001_png;
public static var smoke_d014_png:Class = Embeds_smoke_d014_png;
public static var parachute_png:Class = Embeds_parachute_png;
public static var smoke_c005_png:Class = Embeds_smoke_c005_png;
public static var smoke_c009_png:Class = Embeds_smoke_c009_png;
public static var cloud1_png:Class = Embeds_cloud1_png;
public static var p1_roll017_png:Class = Embeds_p1_roll017_png;
public static var p1_roll013_png:Class = Embeds_p1_roll013_png;
public static var menu_button_play_png:Class = Embeds_menu_button_play_png;
public static var p1_roll020_png:Class = Embeds_p1_roll020_png;
public static var p1_roll024_png:Class = Embeds_p1_roll024_png;
public static var p1_roll028_png:Class = Embeds_p1_roll028_png;
public static var smoke_c012_png:Class = Embeds_smoke_c012_png;
public static var smoke_b003_png:Class = Embeds_smoke_b003_png;
public static var smoke_c016_png:Class = Embeds_smoke_c016_png;
public static var smoke_b007_png:Class = Embeds_smoke_b007_png;
public static var p1_roll031_png:Class = Embeds_p1_roll031_png;
public static var rock_png:Class = Embeds_rock_png;
public static var tree1_png:Class = Embeds_tree1_png;
public static var yoursite_png:Class = Embeds_yoursite_png;
public static var smoke_b010_png:Class = Embeds_smoke_b010_png;
public static var smoke_a001_png:Class = Embeds_smoke_a001_png;
public static var smoke_b014_png:Class = Embeds_smoke_b014_png;
public static var ring2_png:Class = Embeds_ring2_png;
public static var pipebigback_roll_png:Class = Embeds_pipebigback_roll_png;
public static var smoke_a005_png:Class = Embeds_smoke_a005_png;
public static var smoke_a009_png:Class = Embeds_smoke_a009_png;
public static var level_panel_png:Class = Embeds_level_panel_png;
public static var pipebig_roll_png:Class = Embeds_pipebig_roll_png;
public static var menu_logo_png:Class = Embeds_menu_logo_png;
public static var menu_button_png:Class = Embeds_menu_button_png;
public static var pipeback_png:Class = Embeds_pipeback_png;
public static var p1_roll001_png:Class = Embeds_p1_roll001_png;
public static var p1_roll005_png:Class = Embeds_p1_roll005_png;
public static var tick_png:Class = Embeds_tick_png;
public static var smoke_d002_png:Class = Embeds_smoke_d002_png;
public static var smoke_a012_png:Class = Embeds_smoke_a012_png;
public static var smoke_d006_png:Class = Embeds_smoke_d006_png;
public static var smoke_a016_png:Class = Embeds_smoke_a016_png;
public static var p1_roll009_png:Class = Embeds_p1_roll009_png;
public static var solid_png:Class = Embeds_solid_png;
public static var ring3back_roll_png:Class = Embeds_ring3back_roll_png;
public static var p1_roll012_png:Class = Embeds_p1_roll012_png;
public static var p1_roll016_png:Class = Embeds_p1_roll016_png;
public static var pipecollisiongoodright_png:Class = Embeds_pipecollisiongoodright_png;
public static var smoke_d013_png:Class = Embeds_smoke_d013_png;
public static var smoke_c004_png:Class = Embeds_smoke_c004_png;
public static var pipecollision_png:Class = Embeds_pipecollision_png;
public static var smoke_c008_png:Class = Embeds_smoke_c008_png;
public static var planecrash_png:Class = Embeds_planecrash_png;
public static var p1_roll023_png:Class = Embeds_p1_roll023_png;
public static var p1_roll027_png:Class = Embeds_p1_roll027_png;
public static var smoke_c011_png:Class = Embeds_smoke_c011_png;
public static var collisiontall_png:Class = Embeds_collisiontall_png;
public static var smoke_b002_png:Class = Embeds_smoke_b002_png;
public static var smoke_c015_png:Class = Embeds_smoke_c015_png;
public static var smoke_b006_png:Class = Embeds_smoke_b006_png;
public static var CollisionTall_png:Class = Embeds_CollisionTall_png;
public static var pipeback_roll_png:Class = Embeds_pipeback_roll_png;
public static var ring2back_png:Class = Embeds_ring2back_png;
public static var p1_roll030_png:Class = Embeds_p1_roll030_png;
public static var pipe_roll_png:Class = Embeds_pipe_roll_png;
public static var smoke_b013_png:Class = Embeds_smoke_b013_png;
public static var pipecollisiongood_png:Class = Embeds_pipecollisiongood_png;
public static var smoke_a004_png:Class = Embeds_smoke_a004_png;
public static var smoke_a008_png:Class = Embeds_smoke_a008_png;
public static var button_control_2_png:Class = Embeds_button_control_2_png;
public static var collisionbig_png:Class = Embeds_collisionbig_png;
public static var pipebig_png:Class = Embeds_pipebig_png;
public static var ring2back_roll_png:Class = Embeds_ring2back_roll_png;
public static var p1_roll004_png:Class = Embeds_p1_roll004_png;
public static var smoke_d001_png:Class = Embeds_smoke_d001_png;
public static var smoke_a011_png:Class = Embeds_smoke_a011_png;
public static var smoke_d005_png:Class = Embeds_smoke_d005_png;
public static var smoke_a015_png:Class = Embeds_smoke_a015_png;
public static var p1_roll008_png:Class = Embeds_p1_roll008_png;
public static var smoke_d009_png:Class = Embeds_smoke_d009_png;
public static var ring2_roll_png:Class = Embeds_ring2_roll_png;
public static var lives_png:Class = Embeds_lives_png;
public static var p1_roll011_png:Class = Embeds_p1_roll011_png;
public static var smoke_d012_png:Class = Embeds_smoke_d012_png;
public static var pole_png:Class = Embeds_pole_png;
public static var smoke_c003_png:Class = Embeds_smoke_c003_png;
public static var smoke_d016_png:Class = Embeds_smoke_d016_png;
public static var smoke_c007_png:Class = Embeds_smoke_c007_png;
public static var p1_roll015_png:Class = Embeds_p1_roll015_png;
public static var p1_roll019_png:Class = Embeds_p1_roll019_png;
public static var pop_png:Class = Embeds_pop_png;
public static var p1_roll022_png:Class = Embeds_p1_roll022_png;
public static var rock_2_png:Class = Embeds_rock_2_png;
public static var p1_roll026_png:Class = Embeds_p1_roll026_png;
public static var smoke_c010_png:Class = Embeds_smoke_c010_png;
public static var smoke_b001_png:Class = Embeds_smoke_b001_png;
public static var smoke_c014_png:Class = Embeds_smoke_c014_png;
public static var smoke_b005_png:Class = Embeds_smoke_b005_png;
public static var tree3_png:Class = Embeds_tree3_png;
public static var smoke_b009_png:Class = Embeds_smoke_b009_png;
public static var pipebigback_png:Class = Embeds_pipebigback_png;
public static var shot_png:Class = Embeds_shot_png;
public static var smoke_b012_png:Class = Embeds_smoke_b012_png;
public static var smoke_a003_png:Class = Embeds_smoke_a003_png;
public static var smoke_b016_png:Class = Embeds_smoke_b016_png;
public static var smoke_a007_png:Class = Embeds_smoke_a007_png;
public static var ground_png:Class = Embeds_ground_png;
public static var content_png:Class = Embeds_content_png;
public static var button_control_1_png:Class = Embeds_button_control_1_png;
public static var p1_roll003_png:Class = Embeds_p1_roll003_png;
public static var p1_roll007_png:Class = Embeds_p1_roll007_png;
public static var cloud2_png:Class = Embeds_cloud2_png;
public static var smoke_a010_png:Class = Embeds_smoke_a010_png;
public static var smoke_d004_png:Class = Embeds_smoke_d004_png;
public static var smoke_a014_png:Class = Embeds_smoke_a014_png;
public static var smoke_d008_png:Class = Embeds_smoke_d008_png;
public static var p1_roll010_png:Class = Embeds_p1_roll010_png;
public static var p1_roll014_png:Class = Embeds_p1_roll014_png;
public static var smoke_d011_png:Class = Embeds_smoke_d011_png;
public static var smoke_c002_png:Class = Embeds_smoke_c002_png;
public static var smoke_d015_png:Class = Embeds_smoke_d015_png;
public static var games_png:Class = Embeds_games_png;
public static var blimp_png:Class = Embeds_blimp_png;
public static var smoke_c006_png:Class = Embeds_smoke_c006_png;
public static var p1_roll018_png:Class = Embeds_p1_roll018_png;
public static var p1_roll021_png:Class = Embeds_p1_roll021_png;
public static var rock_1_png:Class = Embeds_rock_1_png;
public static var p1_roll025_png:Class = Embeds_p1_roll025_png;
public static var tree2_png:Class = Embeds_tree2_png;
public static var p1_roll029_png:Class = Embeds_p1_roll029_png;
public static var collisionhuge_png:Class = Embeds_collisionhuge_png;
public static var smoke_c013_png:Class = Embeds_smoke_c013_png;
public static var man_png:Class = Embeds_man_png;
public static var smoke_b004_png:Class = Embeds_smoke_b004_png;
public static var smoke_b008_png:Class = Embeds_smoke_b008_png;
public static var land_png:Class = Embeds_land_png;
public static var ring3back_png:Class = Embeds_ring3back_png;
public static var plane_prop_png:Class = Embeds_plane_prop_png;
public static var p1_roll032_png:Class = Embeds_p1_roll032_png;
public static var smoke_b011_png:Class = Embeds_smoke_b011_png;
public static var smoke_a002_png:Class = Embeds_smoke_a002_png;
public static var smoke_b015_png:Class = Embeds_smoke_b015_png;
public static var ring3_png:Class = Embeds_ring3_png;
public static var smoke_a006_png:Class = Embeds_smoke_a006_png;
public static var menu_button_link_png:Class = Embeds_menu_button_link_png;
public static var shot2_png:Class = Embeds_shot2_png;
}
}//package GlobalSetup
Section 105
//Embeds_balloon_png (GlobalSetup.Embeds_balloon_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_balloon_png extends BitmapAsset {
}
}//package GlobalSetup
Section 106
//Embeds_blimp_png (GlobalSetup.Embeds_blimp_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_blimp_png extends BitmapAsset {
}
}//package GlobalSetup
Section 107
//Embeds_bonus_ball_png (GlobalSetup.Embeds_bonus_ball_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_bonus_ball_png extends BitmapAsset {
}
}//package GlobalSetup
Section 108
//Embeds_button_control_1_png (GlobalSetup.Embeds_button_control_1_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_button_control_1_png extends BitmapAsset {
}
}//package GlobalSetup
Section 109
//Embeds_button_control_2_png (GlobalSetup.Embeds_button_control_2_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_button_control_2_png extends BitmapAsset {
}
}//package GlobalSetup
Section 110
//Embeds_cloud1_png (GlobalSetup.Embeds_cloud1_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_cloud1_png extends BitmapAsset {
}
}//package GlobalSetup
Section 111
//Embeds_cloud2_png (GlobalSetup.Embeds_cloud2_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_cloud2_png extends BitmapAsset {
}
}//package GlobalSetup
Section 112
//Embeds_collisionbig_png (GlobalSetup.Embeds_collisionbig_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_collisionbig_png extends BitmapAsset {
}
}//package GlobalSetup
Section 113
//Embeds_collisionhuge_png (GlobalSetup.Embeds_collisionhuge_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_collisionhuge_png extends BitmapAsset {
}
}//package GlobalSetup
Section 114
//Embeds_CollisionTall_png (GlobalSetup.Embeds_CollisionTall_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_CollisionTall_png extends BitmapAsset {
}
}//package GlobalSetup
Section 115
//Embeds_collisiontall_png (GlobalSetup.Embeds_collisiontall_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_collisiontall_png extends BitmapAsset {
}
}//package GlobalSetup
Section 116
//Embeds_content_png (GlobalSetup.Embeds_content_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_content_png extends BitmapAsset {
}
}//package GlobalSetup
Section 117
//Embeds_games_png (GlobalSetup.Embeds_games_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_games_png extends BitmapAsset {
}
}//package GlobalSetup
Section 118
//Embeds_ground_png (GlobalSetup.Embeds_ground_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_ground_png extends BitmapAsset {
}
}//package GlobalSetup
Section 119
//Embeds_land_png (GlobalSetup.Embeds_land_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_land_png extends BitmapAsset {
}
}//package GlobalSetup
Section 120
//Embeds_level_panel_png (GlobalSetup.Embeds_level_panel_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_level_panel_png extends BitmapAsset {
}
}//package GlobalSetup
Section 121
//Embeds_lives_png (GlobalSetup.Embeds_lives_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_lives_png extends BitmapAsset {
}
}//package GlobalSetup
Section 122
//Embeds_man_png (GlobalSetup.Embeds_man_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_man_png extends BitmapAsset {
}
}//package GlobalSetup
Section 123
//Embeds_menu_button_link_png (GlobalSetup.Embeds_menu_button_link_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_menu_button_link_png extends BitmapAsset {
}
}//package GlobalSetup
Section 124
//Embeds_menu_button_play_png (GlobalSetup.Embeds_menu_button_play_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_menu_button_play_png extends BitmapAsset {
}
}//package GlobalSetup
Section 125
//Embeds_menu_button_png (GlobalSetup.Embeds_menu_button_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_menu_button_png extends BitmapAsset {
}
}//package GlobalSetup
Section 126
//Embeds_menu_logo_png (GlobalSetup.Embeds_menu_logo_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_menu_logo_png extends BitmapAsset {
}
}//package GlobalSetup
Section 127
//Embeds_p1_roll001_png (GlobalSetup.Embeds_p1_roll001_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_p1_roll001_png extends BitmapAsset {
}
}//package GlobalSetup
Section 128
//Embeds_p1_roll002_png (GlobalSetup.Embeds_p1_roll002_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_p1_roll002_png extends BitmapAsset {
}
}//package GlobalSetup
Section 129
//Embeds_p1_roll003_png (GlobalSetup.Embeds_p1_roll003_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_p1_roll003_png extends BitmapAsset {
}
}//package GlobalSetup
Section 130
//Embeds_p1_roll004_png (GlobalSetup.Embeds_p1_roll004_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_p1_roll004_png extends BitmapAsset {
}
}//package GlobalSetup
Section 131
//Embeds_p1_roll005_png (GlobalSetup.Embeds_p1_roll005_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_p1_roll005_png extends BitmapAsset {
}
}//package GlobalSetup
Section 132
//Embeds_p1_roll006_png (GlobalSetup.Embeds_p1_roll006_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_p1_roll006_png extends BitmapAsset {
}
}//package GlobalSetup
Section 133
//Embeds_p1_roll007_png (GlobalSetup.Embeds_p1_roll007_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_p1_roll007_png extends BitmapAsset {
}
}//package GlobalSetup
Section 134
//Embeds_p1_roll008_png (GlobalSetup.Embeds_p1_roll008_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_p1_roll008_png extends BitmapAsset {
}
}//package GlobalSetup
Section 135
//Embeds_p1_roll009_png (GlobalSetup.Embeds_p1_roll009_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_p1_roll009_png extends BitmapAsset {
}
}//package GlobalSetup
Section 136
//Embeds_p1_roll010_png (GlobalSetup.Embeds_p1_roll010_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_p1_roll010_png extends BitmapAsset {
}
}//package GlobalSetup
Section 137
//Embeds_p1_roll011_png (GlobalSetup.Embeds_p1_roll011_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_p1_roll011_png extends BitmapAsset {
}
}//package GlobalSetup
Section 138
//Embeds_p1_roll012_png (GlobalSetup.Embeds_p1_roll012_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_p1_roll012_png extends BitmapAsset {
}
}//package GlobalSetup
Section 139
//Embeds_p1_roll013_png (GlobalSetup.Embeds_p1_roll013_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_p1_roll013_png extends BitmapAsset {
}
}//package GlobalSetup
Section 140
//Embeds_p1_roll014_png (GlobalSetup.Embeds_p1_roll014_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_p1_roll014_png extends BitmapAsset {
}
}//package GlobalSetup
Section 141
//Embeds_p1_roll015_png (GlobalSetup.Embeds_p1_roll015_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_p1_roll015_png extends BitmapAsset {
}
}//package GlobalSetup
Section 142
//Embeds_p1_roll016_png (GlobalSetup.Embeds_p1_roll016_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_p1_roll016_png extends BitmapAsset {
}
}//package GlobalSetup
Section 143
//Embeds_p1_roll017_png (GlobalSetup.Embeds_p1_roll017_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_p1_roll017_png extends BitmapAsset {
}
}//package GlobalSetup
Section 144
//Embeds_p1_roll018_png (GlobalSetup.Embeds_p1_roll018_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_p1_roll018_png extends BitmapAsset {
}
}//package GlobalSetup
Section 145
//Embeds_p1_roll019_png (GlobalSetup.Embeds_p1_roll019_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_p1_roll019_png extends BitmapAsset {
}
}//package GlobalSetup
Section 146
//Embeds_p1_roll020_png (GlobalSetup.Embeds_p1_roll020_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_p1_roll020_png extends BitmapAsset {
}
}//package GlobalSetup
Section 147
//Embeds_p1_roll021_png (GlobalSetup.Embeds_p1_roll021_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_p1_roll021_png extends BitmapAsset {
}
}//package GlobalSetup
Section 148
//Embeds_p1_roll022_png (GlobalSetup.Embeds_p1_roll022_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_p1_roll022_png extends BitmapAsset {
}
}//package GlobalSetup
Section 149
//Embeds_p1_roll023_png (GlobalSetup.Embeds_p1_roll023_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_p1_roll023_png extends BitmapAsset {
}
}//package GlobalSetup
Section 150
//Embeds_p1_roll024_png (GlobalSetup.Embeds_p1_roll024_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_p1_roll024_png extends BitmapAsset {
}
}//package GlobalSetup
Section 151
//Embeds_p1_roll025_png (GlobalSetup.Embeds_p1_roll025_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_p1_roll025_png extends BitmapAsset {
}
}//package GlobalSetup
Section 152
//Embeds_p1_roll026_png (GlobalSetup.Embeds_p1_roll026_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_p1_roll026_png extends BitmapAsset {
}
}//package GlobalSetup
Section 153
//Embeds_p1_roll027_png (GlobalSetup.Embeds_p1_roll027_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_p1_roll027_png extends BitmapAsset {
}
}//package GlobalSetup
Section 154
//Embeds_p1_roll028_png (GlobalSetup.Embeds_p1_roll028_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_p1_roll028_png extends BitmapAsset {
}
}//package GlobalSetup
Section 155
//Embeds_p1_roll029_png (GlobalSetup.Embeds_p1_roll029_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_p1_roll029_png extends BitmapAsset {
}
}//package GlobalSetup
Section 156
//Embeds_p1_roll030_png (GlobalSetup.Embeds_p1_roll030_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_p1_roll030_png extends BitmapAsset {
}
}//package GlobalSetup
Section 157
//Embeds_p1_roll031_png (GlobalSetup.Embeds_p1_roll031_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_p1_roll031_png extends BitmapAsset {
}
}//package GlobalSetup
Section 158
//Embeds_p1_roll032_png (GlobalSetup.Embeds_p1_roll032_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_p1_roll032_png extends BitmapAsset {
}
}//package GlobalSetup
Section 159
//Embeds_parachute_png (GlobalSetup.Embeds_parachute_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_parachute_png extends BitmapAsset {
}
}//package GlobalSetup
Section 160
//Embeds_pipe_png (GlobalSetup.Embeds_pipe_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_pipe_png extends BitmapAsset {
}
}//package GlobalSetup
Section 161
//Embeds_pipe_roll_png (GlobalSetup.Embeds_pipe_roll_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_pipe_roll_png extends BitmapAsset {
}
}//package GlobalSetup
Section 162
//Embeds_pipeback_png (GlobalSetup.Embeds_pipeback_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_pipeback_png extends BitmapAsset {
}
}//package GlobalSetup
Section 163
//Embeds_pipeback_roll_png (GlobalSetup.Embeds_pipeback_roll_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_pipeback_roll_png extends BitmapAsset {
}
}//package GlobalSetup
Section 164
//Embeds_pipebig_png (GlobalSetup.Embeds_pipebig_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_pipebig_png extends BitmapAsset {
}
}//package GlobalSetup
Section 165
//Embeds_pipebig_roll_png (GlobalSetup.Embeds_pipebig_roll_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_pipebig_roll_png extends BitmapAsset {
}
}//package GlobalSetup
Section 166
//Embeds_pipebigback_png (GlobalSetup.Embeds_pipebigback_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_pipebigback_png extends BitmapAsset {
}
}//package GlobalSetup
Section 167
//Embeds_pipebigback_roll_png (GlobalSetup.Embeds_pipebigback_roll_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_pipebigback_roll_png extends BitmapAsset {
}
}//package GlobalSetup
Section 168
//Embeds_pipecollision_png (GlobalSetup.Embeds_pipecollision_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_pipecollision_png extends BitmapAsset {
}
}//package GlobalSetup
Section 169
//Embeds_pipecollisiongood_png (GlobalSetup.Embeds_pipecollisiongood_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_pipecollisiongood_png extends BitmapAsset {
}
}//package GlobalSetup
Section 170
//Embeds_pipecollisiongoodright_png (GlobalSetup.Embeds_pipecollisiongoodright_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_pipecollisiongoodright_png extends BitmapAsset {
}
}//package GlobalSetup
Section 171
//Embeds_plane_prop_png (GlobalSetup.Embeds_plane_prop_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_plane_prop_png extends BitmapAsset {
}
}//package GlobalSetup
Section 172
//Embeds_planecrash_png (GlobalSetup.Embeds_planecrash_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_planecrash_png extends BitmapAsset {
}
}//package GlobalSetup
Section 173
//Embeds_pole_png (GlobalSetup.Embeds_pole_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_pole_png extends BitmapAsset {
}
}//package GlobalSetup
Section 174
//Embeds_pop_png (GlobalSetup.Embeds_pop_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_pop_png extends BitmapAsset {
}
}//package GlobalSetup
Section 175
//Embeds_ring2_png (GlobalSetup.Embeds_ring2_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_ring2_png extends BitmapAsset {
}
}//package GlobalSetup
Section 176
//Embeds_ring2_roll_png (GlobalSetup.Embeds_ring2_roll_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_ring2_roll_png extends BitmapAsset {
}
}//package GlobalSetup
Section 177
//Embeds_ring2back_png (GlobalSetup.Embeds_ring2back_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_ring2back_png extends BitmapAsset {
}
}//package GlobalSetup
Section 178
//Embeds_ring2back_roll_png (GlobalSetup.Embeds_ring2back_roll_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_ring2back_roll_png extends BitmapAsset {
}
}//package GlobalSetup
Section 179
//Embeds_ring3_png (GlobalSetup.Embeds_ring3_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_ring3_png extends BitmapAsset {
}
}//package GlobalSetup
Section 180
//Embeds_ring3_roll_png (GlobalSetup.Embeds_ring3_roll_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_ring3_roll_png extends BitmapAsset {
}
}//package GlobalSetup
Section 181
//Embeds_ring3back_png (GlobalSetup.Embeds_ring3back_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_ring3back_png extends BitmapAsset {
}
}//package GlobalSetup
Section 182
//Embeds_ring3back_roll_png (GlobalSetup.Embeds_ring3back_roll_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_ring3back_roll_png extends BitmapAsset {
}
}//package GlobalSetup
Section 183
//Embeds_rock_1_png (GlobalSetup.Embeds_rock_1_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_rock_1_png extends BitmapAsset {
}
}//package GlobalSetup
Section 184
//Embeds_rock_2_png (GlobalSetup.Embeds_rock_2_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_rock_2_png extends BitmapAsset {
}
}//package GlobalSetup
Section 185
//Embeds_rock_png (GlobalSetup.Embeds_rock_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_rock_png extends BitmapAsset {
}
}//package GlobalSetup
Section 186
//Embeds_shot_png (GlobalSetup.Embeds_shot_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_shot_png extends BitmapAsset {
}
}//package GlobalSetup
Section 187
//Embeds_shot2_png (GlobalSetup.Embeds_shot2_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_shot2_png extends BitmapAsset {
}
}//package GlobalSetup
Section 188
//Embeds_smoke_a001_png (GlobalSetup.Embeds_smoke_a001_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_smoke_a001_png extends BitmapAsset {
}
}//package GlobalSetup
Section 189
//Embeds_smoke_a002_png (GlobalSetup.Embeds_smoke_a002_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_smoke_a002_png extends BitmapAsset {
}
}//package GlobalSetup
Section 190
//Embeds_smoke_a003_png (GlobalSetup.Embeds_smoke_a003_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_smoke_a003_png extends BitmapAsset {
}
}//package GlobalSetup
Section 191
//Embeds_smoke_a004_png (GlobalSetup.Embeds_smoke_a004_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_smoke_a004_png extends BitmapAsset {
}
}//package GlobalSetup
Section 192
//Embeds_smoke_a005_png (GlobalSetup.Embeds_smoke_a005_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_smoke_a005_png extends BitmapAsset {
}
}//package GlobalSetup
Section 193
//Embeds_smoke_a006_png (GlobalSetup.Embeds_smoke_a006_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_smoke_a006_png extends BitmapAsset {
}
}//package GlobalSetup
Section 194
//Embeds_smoke_a007_png (GlobalSetup.Embeds_smoke_a007_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_smoke_a007_png extends BitmapAsset {
}
}//package GlobalSetup
Section 195
//Embeds_smoke_a008_png (GlobalSetup.Embeds_smoke_a008_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_smoke_a008_png extends BitmapAsset {
}
}//package GlobalSetup
Section 196
//Embeds_smoke_a009_png (GlobalSetup.Embeds_smoke_a009_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_smoke_a009_png extends BitmapAsset {
}
}//package GlobalSetup
Section 197
//Embeds_smoke_a010_png (GlobalSetup.Embeds_smoke_a010_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_smoke_a010_png extends BitmapAsset {
}
}//package GlobalSetup
Section 198
//Embeds_smoke_a011_png (GlobalSetup.Embeds_smoke_a011_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_smoke_a011_png extends BitmapAsset {
}
}//package GlobalSetup
Section 199
//Embeds_smoke_a012_png (GlobalSetup.Embeds_smoke_a012_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_smoke_a012_png extends BitmapAsset {
}
}//package GlobalSetup
Section 200
//Embeds_smoke_a013_png (GlobalSetup.Embeds_smoke_a013_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_smoke_a013_png extends BitmapAsset {
}
}//package GlobalSetup
Section 201
//Embeds_smoke_a014_png (GlobalSetup.Embeds_smoke_a014_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_smoke_a014_png extends BitmapAsset {
}
}//package GlobalSetup
Section 202
//Embeds_smoke_a015_png (GlobalSetup.Embeds_smoke_a015_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_smoke_a015_png extends BitmapAsset {
}
}//package GlobalSetup
Section 203
//Embeds_smoke_a016_png (GlobalSetup.Embeds_smoke_a016_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_smoke_a016_png extends BitmapAsset {
}
}//package GlobalSetup
Section 204
//Embeds_smoke_b001_png (GlobalSetup.Embeds_smoke_b001_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_smoke_b001_png extends BitmapAsset {
}
}//package GlobalSetup
Section 205
//Embeds_smoke_b002_png (GlobalSetup.Embeds_smoke_b002_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_smoke_b002_png extends BitmapAsset {
}
}//package GlobalSetup
Section 206
//Embeds_smoke_b003_png (GlobalSetup.Embeds_smoke_b003_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_smoke_b003_png extends BitmapAsset {
}
}//package GlobalSetup
Section 207
//Embeds_smoke_b004_png (GlobalSetup.Embeds_smoke_b004_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_smoke_b004_png extends BitmapAsset {
}
}//package GlobalSetup
Section 208
//Embeds_smoke_b005_png (GlobalSetup.Embeds_smoke_b005_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_smoke_b005_png extends BitmapAsset {
}
}//package GlobalSetup
Section 209
//Embeds_smoke_b006_png (GlobalSetup.Embeds_smoke_b006_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_smoke_b006_png extends BitmapAsset {
}
}//package GlobalSetup
Section 210
//Embeds_smoke_b007_png (GlobalSetup.Embeds_smoke_b007_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_smoke_b007_png extends BitmapAsset {
}
}//package GlobalSetup
Section 211
//Embeds_smoke_b008_png (GlobalSetup.Embeds_smoke_b008_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_smoke_b008_png extends BitmapAsset {
}
}//package GlobalSetup
Section 212
//Embeds_smoke_b009_png (GlobalSetup.Embeds_smoke_b009_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_smoke_b009_png extends BitmapAsset {
}
}//package GlobalSetup
Section 213
//Embeds_smoke_b010_png (GlobalSetup.Embeds_smoke_b010_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_smoke_b010_png extends BitmapAsset {
}
}//package GlobalSetup
Section 214
//Embeds_smoke_b011_png (GlobalSetup.Embeds_smoke_b011_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_smoke_b011_png extends BitmapAsset {
}
}//package GlobalSetup
Section 215
//Embeds_smoke_b012_png (GlobalSetup.Embeds_smoke_b012_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_smoke_b012_png extends BitmapAsset {
}
}//package GlobalSetup
Section 216
//Embeds_smoke_b013_png (GlobalSetup.Embeds_smoke_b013_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_smoke_b013_png extends BitmapAsset {
}
}//package GlobalSetup
Section 217
//Embeds_smoke_b014_png (GlobalSetup.Embeds_smoke_b014_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_smoke_b014_png extends BitmapAsset {
}
}//package GlobalSetup
Section 218
//Embeds_smoke_b015_png (GlobalSetup.Embeds_smoke_b015_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_smoke_b015_png extends BitmapAsset {
}
}//package GlobalSetup
Section 219
//Embeds_smoke_b016_png (GlobalSetup.Embeds_smoke_b016_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_smoke_b016_png extends BitmapAsset {
}
}//package GlobalSetup
Section 220
//Embeds_smoke_c001_png (GlobalSetup.Embeds_smoke_c001_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_smoke_c001_png extends BitmapAsset {
}
}//package GlobalSetup
Section 221
//Embeds_smoke_c002_png (GlobalSetup.Embeds_smoke_c002_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_smoke_c002_png extends BitmapAsset {
}
}//package GlobalSetup
Section 222
//Embeds_smoke_c003_png (GlobalSetup.Embeds_smoke_c003_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_smoke_c003_png extends BitmapAsset {
}
}//package GlobalSetup
Section 223
//Embeds_smoke_c004_png (GlobalSetup.Embeds_smoke_c004_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_smoke_c004_png extends BitmapAsset {
}
}//package GlobalSetup
Section 224
//Embeds_smoke_c005_png (GlobalSetup.Embeds_smoke_c005_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_smoke_c005_png extends BitmapAsset {
}
}//package GlobalSetup
Section 225
//Embeds_smoke_c006_png (GlobalSetup.Embeds_smoke_c006_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_smoke_c006_png extends BitmapAsset {
}
}//package GlobalSetup
Section 226
//Embeds_smoke_c007_png (GlobalSetup.Embeds_smoke_c007_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_smoke_c007_png extends BitmapAsset {
}
}//package GlobalSetup
Section 227
//Embeds_smoke_c008_png (GlobalSetup.Embeds_smoke_c008_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_smoke_c008_png extends BitmapAsset {
}
}//package GlobalSetup
Section 228
//Embeds_smoke_c009_png (GlobalSetup.Embeds_smoke_c009_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_smoke_c009_png extends BitmapAsset {
}
}//package GlobalSetup
Section 229
//Embeds_smoke_c010_png (GlobalSetup.Embeds_smoke_c010_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_smoke_c010_png extends BitmapAsset {
}
}//package GlobalSetup
Section 230
//Embeds_smoke_c011_png (GlobalSetup.Embeds_smoke_c011_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_smoke_c011_png extends BitmapAsset {
}
}//package GlobalSetup
Section 231
//Embeds_smoke_c012_png (GlobalSetup.Embeds_smoke_c012_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_smoke_c012_png extends BitmapAsset {
}
}//package GlobalSetup
Section 232
//Embeds_smoke_c013_png (GlobalSetup.Embeds_smoke_c013_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_smoke_c013_png extends BitmapAsset {
}
}//package GlobalSetup
Section 233
//Embeds_smoke_c014_png (GlobalSetup.Embeds_smoke_c014_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_smoke_c014_png extends BitmapAsset {
}
}//package GlobalSetup
Section 234
//Embeds_smoke_c015_png (GlobalSetup.Embeds_smoke_c015_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_smoke_c015_png extends BitmapAsset {
}
}//package GlobalSetup
Section 235
//Embeds_smoke_c016_png (GlobalSetup.Embeds_smoke_c016_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_smoke_c016_png extends BitmapAsset {
}
}//package GlobalSetup
Section 236
//Embeds_smoke_d001_png (GlobalSetup.Embeds_smoke_d001_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_smoke_d001_png extends BitmapAsset {
}
}//package GlobalSetup
Section 237
//Embeds_smoke_d002_png (GlobalSetup.Embeds_smoke_d002_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_smoke_d002_png extends BitmapAsset {
}
}//package GlobalSetup
Section 238
//Embeds_smoke_d003_png (GlobalSetup.Embeds_smoke_d003_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_smoke_d003_png extends BitmapAsset {
}
}//package GlobalSetup
Section 239
//Embeds_smoke_d004_png (GlobalSetup.Embeds_smoke_d004_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_smoke_d004_png extends BitmapAsset {
}
}//package GlobalSetup
Section 240
//Embeds_smoke_d005_png (GlobalSetup.Embeds_smoke_d005_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_smoke_d005_png extends BitmapAsset {
}
}//package GlobalSetup
Section 241
//Embeds_smoke_d006_png (GlobalSetup.Embeds_smoke_d006_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_smoke_d006_png extends BitmapAsset {
}
}//package GlobalSetup
Section 242
//Embeds_smoke_d007_png (GlobalSetup.Embeds_smoke_d007_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_smoke_d007_png extends BitmapAsset {
}
}//package GlobalSetup
Section 243
//Embeds_smoke_d008_png (GlobalSetup.Embeds_smoke_d008_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_smoke_d008_png extends BitmapAsset {
}
}//package GlobalSetup
Section 244
//Embeds_smoke_d009_png (GlobalSetup.Embeds_smoke_d009_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_smoke_d009_png extends BitmapAsset {
}
}//package GlobalSetup
Section 245
//Embeds_smoke_d010_png (GlobalSetup.Embeds_smoke_d010_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_smoke_d010_png extends BitmapAsset {
}
}//package GlobalSetup
Section 246
//Embeds_smoke_d011_png (GlobalSetup.Embeds_smoke_d011_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_smoke_d011_png extends BitmapAsset {
}
}//package GlobalSetup
Section 247
//Embeds_smoke_d012_png (GlobalSetup.Embeds_smoke_d012_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_smoke_d012_png extends BitmapAsset {
}
}//package GlobalSetup
Section 248
//Embeds_smoke_d013_png (GlobalSetup.Embeds_smoke_d013_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_smoke_d013_png extends BitmapAsset {
}
}//package GlobalSetup
Section 249
//Embeds_smoke_d014_png (GlobalSetup.Embeds_smoke_d014_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_smoke_d014_png extends BitmapAsset {
}
}//package GlobalSetup
Section 250
//Embeds_smoke_d015_png (GlobalSetup.Embeds_smoke_d015_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_smoke_d015_png extends BitmapAsset {
}
}//package GlobalSetup
Section 251
//Embeds_smoke_d016_png (GlobalSetup.Embeds_smoke_d016_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_smoke_d016_png extends BitmapAsset {
}
}//package GlobalSetup
Section 252
//Embeds_solid_png (GlobalSetup.Embeds_solid_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_solid_png extends BitmapAsset {
}
}//package GlobalSetup
Section 253
//Embeds_tick_png (GlobalSetup.Embeds_tick_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_tick_png extends BitmapAsset {
}
}//package GlobalSetup
Section 254
//Embeds_tree1_png (GlobalSetup.Embeds_tree1_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_tree1_png extends BitmapAsset {
}
}//package GlobalSetup
Section 255
//Embeds_tree2_png (GlobalSetup.Embeds_tree2_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_tree2_png extends BitmapAsset {
}
}//package GlobalSetup
Section 256
//Embeds_tree3_png (GlobalSetup.Embeds_tree3_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_tree3_png extends BitmapAsset {
}
}//package GlobalSetup
Section 257
//Embeds_yoursite_png (GlobalSetup.Embeds_yoursite_png)
package GlobalSetup {
import mx.core.*;
public class Embeds_yoursite_png extends BitmapAsset {
}
}//package GlobalSetup
Section 258
//ZOrder (GlobalSetup.ZOrder)
package GlobalSetup {
import GameScene.*;
public class ZOrder {
public function SetupZOrder(_arg1:GameScene):void{
_arg1.addZOrder("");
_arg1.addZOrder("ObstacleBack");
_arg1.addZOrder("Ground");
_arg1.addZOrder("Player");
_arg1.addZOrder("ObstacleFront");
_arg1.addZOrder("Stars");
_arg1.addZOrder("TextLayer");
_arg1.addZOrder("AfterTextLayer");
_arg1.addZOrder("GUILayer");
}
}
}//package GlobalSetup
Section 259
//LayerFilter (Layout.LayerFilter)
package Layout {
import flash.display.*;
import GameObject.*;
public class LayerFilter {
public static function applyAlphaInOut(_arg1:Object, _arg2:int, _arg3:int, _arg4:int, _arg5:int){
var _local7:GameObject;
var _local8:GameObjectFilterFadeInOut;
var _local6:Array = getObjectsArray(_arg1);
for each (_local7 in _local6) {
_local8 = new GameObjectFilterFadeInOut();
_local8.FadeIn = 1;
_local8.FadeInDelay = _arg2;
_local8.FadeInDuration = _arg3;
_local8.FadeOut = 1;
_local8.FadeOutTime = _arg4;
_local8.FadeOutDuration = _arg5;
_local7.addFilter(_local8);
};
}
public static function applyAlphaInStep(_arg1:Object, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int):void{
var _local7:int;
var _local8:Layout = Layout(_arg1);
for each (_arg1 in _local8.children) {
applyAlphaInOut(_arg1, (_arg2 + (_arg6 * _local7)), _arg3, _arg4, _arg5);
_local7++;
};
}
public static function reverse(_arg1:Object):void{
var _local3:GameObject;
var _local4:GameObjectFilter;
var _local2:Array = getObjectsArray(_arg1);
for each (_local3 in _local2) {
for each (_local4 in _local3.filters) {
_local4.reverse();
_local4.removeWhenDone();
};
};
}
public static function bakeToObject(_arg1:GameObject, _arg2:Object):void{
var _local4:GameObject;
var _local3:Array = getObjectsArray(_arg2);
for each (_local4 in _local3) {
_arg1.drawToPixmap(_local4.obj, _local4.obj.x, _local4.obj.y, _local4.baseRotation, _local4.baseScaleX, _local4.baseScaleY, BlendMode.NORMAL);
};
}
public static function getObjectsArray(_arg1:Object):Array{
var _local2:Array;
var _local3:Object;
var _local4:Array;
var _local5:Object;
if ((_arg1 is Array)){
_local2 = new Array();
for each (_local3 in _arg1) {
_local4 = getObjectsArray(_local3);
for each (_local5 in _local4) {
_local2.push(_local5);
};
};
};
if ((_arg1 is Layout)){
_local2 = Layout(_arg1).getGameObjects();
};
if ((_arg1 is GameObject)){
_local2 = [_arg1];
};
return (_local2);
}
public static function setLayerOrigin(_arg1:Object, _arg2:Number, _arg3:Number):void{
var _local5:GameObject;
var _local6:Boolean;
var _local7:GameObjectFilter;
var _local8:GameObjectFilterAddOrigin;
var _local4:Array = getObjectsArray(_arg1);
for each (_local5 in _local4) {
_local6 = false;
for each (_local7 in _local5.filters) {
if ((_local7 is GameObjectFilterAddOrigin)){
_local6 = true;
_local8 = GameObjectFilterAddOrigin(_local7);
_local8.dx = _arg2;
_local8.dy = _arg3;
};
};
if (!_local6){
_local8 = new GameObjectFilterAddOrigin();
_local8.dx = _arg2;
_local8.dy = _arg3;
_local5.addFilter(_local8);
};
};
}
public static function applySlideIn(_arg1:Object, _arg2:int=0, _arg3:int=800, _arg4:int=0, _arg5:Boolean=false, _arg6:int=80):void{
var _local9:GameObject;
var _local10:GameObjectFilterSqrtInterpolateIn;
var _local7:Array = getObjectsArray(_arg1);
var _local8 = 1;
for each (_local9 in _local7) {
_local10 = new GameObjectFilterSqrtInterpolateIn();
if (_arg2 != 0){
_local8 = _arg2;
};
_local10.dx = (_local8 * _arg3);
_local10.dy = _arg4;
_local10.FadeTime = _arg6;
_local10.useAlpha = _arg5;
_local9.addFilter(_local10);
_local8 = (_local8 * -1);
};
}
public static function applySqrtSlide(_arg1:Object, _arg2:int=0, _arg3:int=0, _arg4:int=80, _arg5:Boolean=false):void{
var _local7:GameObject;
var _local8:GameObjectFilterSqrtInterpolateIn;
var _local6:Array = getObjectsArray(_arg1);
for each (_local7 in _local6) {
_local8 = new GameObjectFilterSqrtInterpolateIn();
_local8.dx = _arg2;
_local8.dy = _arg3;
_local8.FadeTime = _arg4;
_local8.killWhenDone = _arg5;
_local8.useSquareSquare = true;
_local7.addFilter(_local8);
};
}
public static function applyDampenIn(_arg1:Object, _arg2:int=800, _arg3:int=0, _arg4:int=5):void{
var _local7:GameObject;
var _local8:GameObjectFilterDampenInterpolateIn;
var _local5:Array = getObjectsArray(_arg1);
var _local6:int;
for each (_local7 in _local5) {
_local8 = new GameObjectFilterDampenInterpolateIn();
_local8.dx = _arg2;
_local8.dy = _arg3;
_local8.FadeTime = 200;
_local8.Delay = _local6;
_local6 = (_local6 + _arg4);
_local7.addFilter(_local8);
};
}
public static function setAlpha(_arg1:Object, _arg2:Number):void{
var _local4:GameObject;
var _local3:Array = getObjectsArray(_arg1);
for each (_local4 in _local3) {
_local4.baseAlpha = _arg2;
};
}
public static function removeAll(_arg1:Object):void{
var _local3:GameObject;
var _local2:Array = getObjectsArray(_arg1);
for each (_local3 in _local2) {
_local3.remove();
};
}
}
}//package Layout
Section 260
//Layout (Layout.Layout)
package Layout {
import GameObject.*;
public class Layout {
public var y:Number;// = 0
public var spacing:Number;// = 0
public var dir:int;// = 0
public var freePlacement:Boolean;// = false
public var leaf:GameObject;
public var freeX:Number;// = 0
public var freeY:Number;// = 0
public var globalx:Number;// = 0
public var globaly:Number;// = 0
public var x:Number;// = 0
public var children:Array;
public function getGameObjects():Array{
var _local1:Array;
var _local2:Layout;
var _local3:GameObject;
if (leaf){
return ([leaf]);
};
_local1 = new Array();
for each (_local2 in children) {
for each (_local3 in _local2.getGameObjects()) {
_local1.push(_local3);
};
};
return (_local1);
}
public function width():Number{
var _local2:Layout;
if (leaf){
return (leaf.baseWidth);
};
var _local1:Number = 0;
if (dir == 0){
_local1 = -(spacing);
for each (_local2 in children) {
if (!_local2.freePlacement){
_local1 = (_local1 + (_local2.width() + spacing));
};
};
} else {
for each (_local2 in children) {
if (!_local2.freePlacement){
_local1 = Math.max(_local1, (_local2.width() + spacing));
};
};
};
return (_local1);
}
public function height():Number{
var _local2:Layout;
if (leaf){
return (leaf.baseHeight);
};
var _local1:Number = 0;
if (dir == 1){
_local1 = -(spacing);
for each (_local2 in children) {
if (!_local2.freePlacement){
_local1 = (_local1 + (_local2.height() + spacing));
};
};
} else {
for each (_local2 in children) {
if (!_local2.freePlacement){
_local1 = Math.max(_local1, (_local2.height() + spacing));
};
};
};
return (_local1);
}
public function layout(_arg1:Number=0, _arg2:Number=0):void{
var _local3:int;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
if (leaf){
leaf.basex = _arg1;
leaf.basey = _arg2;
return;
};
if (dir == 0){
_local4 = 0;
_local5 = width();
_local3 = 0;
while (_local3 < children.length) {
children[_local3].x = ((_local4 - (_local5 / 2)) + (children[_local3].width() / 2));
_local4 = (_local4 + (children[_local3].width() + spacing));
_local3++;
};
} else {
_local6 = 0;
_local7 = height();
_local3 = 0;
while (_local3 < children.length) {
children[_local3].y = ((_local6 - (_local7 / 2)) + (children[_local3].height() / 2));
_local6 = (_local6 + (children[_local3].height() + spacing));
_local3++;
};
};
_local3 = 0;
while (_local3 < children.length) {
if (children[_local3].freePlacement){
children[_local3].x = children[_local3].freeX;
children[_local3].y = children[_local3].freeY;
};
children[_local3].layout((_arg1 + children[_local3].x), (_arg2 + children[_local3].y));
_local3++;
};
}
public static function createLeaves(_arg1:Array):Array{
var _local4:Object;
var _local5:Layout;
var _local2:Array = new Array();
var _local3:int;
while (_local3 < _arg1.length) {
_local4 = _arg1[_local3];
if ((_local4 is Array)){
_local2.push(createLeaves(Array(_local4)));
} else {
if ((_local4 is GameObject)){
_local5 = new (Layout);
_local5.leaf = GameObject(_local4);
_local2.push(_local5);
} else {
_local2.push(_local4);
};
};
_local3++;
};
return (_local2);
}
public static function Vert(_arg1:Array, _arg2:int=8, _arg3:Number=0, _arg4:Number=0):Layout{
_arg1 = createLeaves(_arg1);
var _local5:Layout = new (Layout);
_local5.dir = 1;
_local5.spacing = _arg2;
_local5.children = _arg1;
_local5.layout(_arg3, _arg4);
return (_local5);
}
public static function Horiz(_arg1:Array, _arg2:Number=8, _arg3:Number=0, _arg4:Number=0):Layout{
_arg1 = createLeaves(_arg1);
var _local5:Layout = new (Layout);
_local5.dir = 0;
_local5.spacing = _arg2;
_local5.children = _arg1;
_local5.layout(_arg3, _arg4);
return (_local5);
}
}
}//package Layout
Section 261
//DefaultSet (Levels.DefaultSet)
package Levels {
import GameScene.*;
import GameObject.*;
import Objects.*;
public class DefaultSet {
public static var levels:int = 46;
function createLevel30(_arg1:Array, _arg2:GameScene):void{
var _local3:GameObject;
_local3 = new PipeBigRoll(_arg2, 79.6875, 378.375);
_arg1.push(_local3);
_local3 = new VertPipeBig(_arg2, 189.6875, 279.375);
_arg1.push(_local3);
_local3 = new VertPipe(_arg2, 201.8125, 191.375);
_arg1.push(_local3);
_local3 = new VertPipe(_arg2, 209.8125, 128.375);
_arg1.push(_local3);
_local3 = new PipeRoll(_arg2, 285.125, 32.8125);
_arg1.push(_local3);
_local3 = new VertPipeRoll(_arg2, 441.5, 132.9375);
_arg1.push(_local3);
_local3 = new VertPipe(_arg2, 449.5, 195.9375);
_arg1.push(_local3);
_local3 = new VertPipe(_arg2, 457.5, 259.9375);
_arg1.push(_local3);
_local3 = new VertPipe(_arg2, 469.5, 323.9375);
_arg1.push(_local3);
_local3 = new PipeRoll(_arg2, 604.875, 404.0625);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 670.875, 412.0625);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 734.875, 423.0625);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 789.875, 433.0625);
_arg1.push(_local3);
_local3 = new Tree1(_arg2, 197.75, 563.9375);
_arg1.push(_local3);
_local3 = new Tree2(_arg2, 140.75, 576.9375);
_arg1.push(_local3);
_local3 = new Tree3(_arg2, 482.75, 563.9375);
_arg1.push(_local3);
_local3 = new Tree1(_arg2, 543.75, 573.9375);
_arg1.push(_local3);
_local3 = new Pole(_arg2, 680.4375, 552.1875);
_arg1.push(_local3);
_local3 = new Tree2(_arg2, 780.4375, 578.1875);
_arg1.push(_local3);
_local3 = new FloatObstacle(_arg2, 477, -6.5625);
_arg1.push(_local3);
_local3 = new FloatObstacle(_arg2, 217.1875, 410.125);
_arg1.push(_local3);
}
function createLevel31(_arg1:Array, _arg2:GameScene):void{
var _local3:GameObject;
_local3 = new PipeRoll(_arg2, 56.4375, 288.875);
_arg1.push(_local3);
_local3 = new VertPipeRoll(_arg2, 162.4375, 386.875);
_arg1.push(_local3);
_local3 = new Pole(_arg2, 292.4375, 550.875);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 289.4375, 441.875);
_arg1.push(_local3);
_local3 = new Rock1(_arg2, 460.4375, 508.875);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 516.4375, 400.875);
_arg1.push(_local3);
_local3 = new PipeBig(_arg2, 611.1875, 485.4375);
_arg1.push(_local3);
_local3 = new VertPipeRoll(_arg2, 693.1875, 398.4375);
_arg1.push(_local3);
_local3 = new VertPipeRoll(_arg2, 721.1875, 264.4375);
_arg1.push(_local3);
_local3 = new VertPipeRoll(_arg2, 745.1875, 136.4375);
_arg1.push(_local3);
_local3 = new Blimp(_arg2, 385.4375, 250.6875);
_arg1.push(_local3);
_local3 = new Tree2(_arg2, 328.0625, 579.5625);
_arg1.push(_local3);
_local3 = new Tree3(_arg2, 13.0625, 569.5625);
_arg1.push(_local3);
_local3 = new Tree2(_arg2, 567.125, 578);
_arg1.push(_local3);
_local3 = new Tree3(_arg2, 636.125, 570);
_arg1.push(_local3);
}
function createLevel10(_arg1:Array, _arg2:GameScene):void{
var _local3:GameObject;
_local3 = new Rock1(_arg2, 664.125, 512.0625);
_arg1.push(_local3);
_local3 = new PipeBig(_arg2, 420.125, 502.0625);
_arg1.push(_local3);
_local3 = new PipeBig(_arg2, 714.9375, 346.25);
_arg1.push(_local3);
_local3 = new PipeBig(_arg2, 801.1875, 293.875);
_arg1.push(_local3);
_local3 = new FloatObstacle(_arg2, 164.3125, 300.5625);
_arg1.push(_local3);
_local3 = new FloatObstacle(_arg2, 426.625, 394.25);
_arg1.push(_local3);
_local3 = new Tree2(_arg2, 629.625, 584.25);
_arg1.push(_local3);
_local3 = new Tree3(_arg2, 183.625, 572.25);
_arg1.push(_local3);
_local3 = new Tree1(_arg2, 1.625, 580.25);
_arg1.push(_local3);
_local3 = new Pole(_arg2, 299.375, 556);
_arg1.push(_local3);
_local3 = new Rock2(_arg2, 949.8125, 519.3125);
_arg1.push(_local3);
_local3 = new Tree2(_arg2, 953.8125, 585.3125);
_arg1.push(_local3);
_local3 = new Tree1(_arg2, 849.8125, 574.3125);
_arg1.push(_local3);
_local3 = new Tree3(_arg2, 1024.8125, 571.3125);
_arg1.push(_local3);
_local3 = new PipeBig(_arg2, 65.9375, 395.375);
_arg1.push(_local3);
_local3 = new PipeBig(_arg2, 667.4375, 132.125);
_arg1.push(_local3);
_local3 = new PipeBig(_arg2, 486.4375, 45.125);
_arg1.push(_local3);
_local3 = new PipeBig(_arg2, 264.9375, 434.5);
_arg1.push(_local3);
_local3 = new PipeBigRoll(_arg2, 578.0625, 97.4375);
_arg1.push(_local3);
}
function createLevel11(_arg1:Array, _arg2:GameScene):void{
var _local3:GameObject;
_local3 = new BonusBalloon(_arg2, 96.9375, 116.375);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 141.9375, 134.375);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 189.9375, 154.375);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 235.9375, 175.375);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 282.25, 196.0625);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 562.25, 207.0625);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 565.25, 470.0625);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 619.25, 472.0625);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 294.25, 464.0625);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 240.25, 463.0625);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 761.625, 119.125);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 511.25, 462.6875);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 479.25, 411.6875);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 428.25, 381.6875);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 379.25, 410.6875);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 348.25, 457.6875);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 614.6875, 182.4375);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 663.6875, 161.4375);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 712.6875, 141.4375);
_arg1.push(_local3);
_local3 = new Rock2(_arg2, 426.1875, 521.75);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 432.625, 53.9375);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 432.625, 100.9375);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 432.625, 148.9375);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 431.625, 196.9375);
_arg1.push(_local3);
}
function createLevel1(_arg1:Array, _arg2:GameScene):void{
var _local3:GameObject;
_local3 = new PipeBig(_arg2, 120.3125, 353.0625);
_arg1.push(_local3);
_local3 = new PipeBig(_arg2, 234, 312);
_arg1.push(_local3);
_local3 = new PipeBig(_arg2, 342, 270);
_arg1.push(_local3);
_local3 = new Tree2(_arg2, 345.3125, 568.5);
_arg1.push(_local3);
_local3 = new Tree3(_arg2, 275.3125, 563.5);
_arg1.push(_local3);
_local3 = new Tree1(_arg2, 778.4375, 562.9375);
_arg1.push(_local3);
_local3 = new PipeBig(_arg2, 449.5, 267.6875);
_arg1.push(_local3);
_local3 = new PipeBig(_arg2, 560.5, 309.6875);
_arg1.push(_local3);
_local3 = new PipeBig(_arg2, 678.5, 347.6875);
_arg1.push(_local3);
}
function createLevel2(_arg1:Array, _arg2:GameScene):void{
var _local3:GameObject;
_local3 = new Pole(_arg2, 267.4375, 539.9375);
_arg1.push(_local3);
_local3 = new Pole(_arg2, 917.4375, 542.9375);
_arg1.push(_local3);
_local3 = new Tree3(_arg2, 299.1875, 559.9375);
_arg1.push(_local3);
_local3 = new Tree1(_arg2, 207.1875, 564.9375);
_arg1.push(_local3);
_local3 = new Tree2(_arg2, 714.1875, 570.9375);
_arg1.push(_local3);
_local3 = new Tree1(_arg2, 496.1875, 565.9375);
_arg1.push(_local3);
_local3 = new Tree3(_arg2, 444.1875, 584.9375);
_arg1.push(_local3);
_local3 = new VertPipeBig(_arg2, 427.1875, 272);
_arg1.push(_local3);
_local3 = new VertPipeBig(_arg2, 697.1875, 272);
_arg1.push(_local3);
_local3 = new VertPipeBig(_arg2, 147.1875, 272);
_arg1.push(_local3);
}
function createLevel3(_arg1:Array, _arg2:GameScene):void{
var _local3:GameObject;
_local3 = new Tree2(_arg2, 787.6875, 573.1875);
_arg1.push(_local3);
_local3 = new Tree3(_arg2, 157.6875, 574.1875);
_arg1.push(_local3);
_local3 = new VertPipeBig(_arg2, 321.75, 376.25);
_arg1.push(_local3);
_local3 = new VertPipeBig(_arg2, 764.75, 376.25);
_arg1.push(_local3);
_local3 = new PipeBig(_arg2, 138.875, 293.375);
_arg1.push(_local3);
_local3 = new PipeBig(_arg2, 532.875, 293.375);
_arg1.push(_local3);
_local3 = new Tree1(_arg2, 220.125, 592.1875);
_arg1.push(_local3);
_local3 = new Tree1(_arg2, 717.3125, 566.375);
_arg1.push(_local3);
_local3 = new Tree2(_arg2, -115.75, 588.875);
_arg1.push(_local3);
_local3 = new Tree3(_arg2, -222.75, 578.875);
_arg1.push(_local3);
_local3 = new Tree1(_arg2, -271.75, 589.875);
_arg1.push(_local3);
_local3 = new PipeBig(_arg2, 629.5625, 122.9375);
_arg1.push(_local3);
_local3 = new PipeBig(_arg2, 517.5625, 99.9375);
_arg1.push(_local3);
_local3 = new PipeBig(_arg2, 396.5625, 99.9375);
_arg1.push(_local3);
_local3 = new PipeBig(_arg2, 260.5625, 122.9375);
_arg1.push(_local3);
}
function createLevel4(_arg1:Array, _arg2:GameScene):void{
var _local3:GameObject;
_local3 = new PipeBig(_arg2, 191.75, 225.6875);
_arg1.push(_local3);
_local3 = new PipeBig(_arg2, 288.75, 251.6875);
_arg1.push(_local3);
_local3 = new PipeBig(_arg2, 376.75, 216.6875);
_arg1.push(_local3);
_local3 = new PipeBig(_arg2, 684.5625, 431.375);
_arg1.push(_local3);
_local3 = new PipeBig(_arg2, 574.5625, 459.375);
_arg1.push(_local3);
_local3 = new PipeBig(_arg2, 454.5625, 456.375);
_arg1.push(_local3);
_local3 = new Pole(_arg2, 737.5625, 552.375);
_arg1.push(_local3);
_local3 = new FloatObstacle(_arg2, 608, 196.3125);
_arg1.push(_local3);
_local3 = new Tree2(_arg2, 100, 573.3125);
_arg1.push(_local3);
_local3 = new Tree2(_arg2, 766, 581.3125);
_arg1.push(_local3);
_local3 = new Tree1(_arg2, 407, 573.3125);
_arg1.push(_local3);
_local3 = new Tree3(_arg2, -105.375, 566.75);
_arg1.push(_local3);
_local3 = new Tree3(_arg2, 451.4375, 589);
_arg1.push(_local3);
_local3 = new PipeBig(_arg2, 103.875, 207.375);
_arg1.push(_local3);
_local3 = new PipeBig(_arg2, 1.875, 207.375);
_arg1.push(_local3);
_local3 = new FloatObstacle(_arg2, 551, 323);
_arg1.push(_local3);
}
function createLevel5(_arg1:Array, _arg2:GameScene):void{
var _local3:GameObject;
_local3 = new BonusBalloon(_arg2, 149.9375, 437.875);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 194.9375, 429.875);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 239.9375, 436.875);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 285.75, 430.6875);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 330.75, 436.6875);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 474.9375, 364.25);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 516.9375, 344.25);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 546.9375, 305.25);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 573.9375, 268.25);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 616.9375, 248.25);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 384.125, 127);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 357.125, 162);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 316.125, 183);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 276.125, 207);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 251.125, 242);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 562.6875, 117.75);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 606.6875, 106.75);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 650.6875, 115.75);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 695.6875, 108.75);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 740.6875, 115.75);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 643.9375, 385.3125);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 688.9375, 395.3125);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 732.9375, 385.3125);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 777.9375, 395.3125);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 822.5625, 385.75);
_arg1.push(_local3);
_local3 = new Tree3(_arg2, 123.0625, 563.4375);
_arg1.push(_local3);
_local3 = new Tree2(_arg2, 184.0625, 581.4375);
_arg1.push(_local3);
_local3 = new Tree1(_arg2, 740.0625, 568.4375);
_arg1.push(_local3);
_local3 = new Tree2(_arg2, 690.0625, 580.4375);
_arg1.push(_local3);
}
function createLevel6(_arg1:Array, _arg2:GameScene):void{
var _local3:GameObject;
_local3 = new FloatObstacle(_arg2, 162.0625, 360.25);
_arg1.push(_local3);
_local3 = new FloatObstacle(_arg2, 469.0625, 360.25);
_arg1.push(_local3);
_local3 = new VertPipeBig(_arg2, 287.0625, 352.25);
_arg1.push(_local3);
_local3 = new VertPipeBig(_arg2, 646.0625, 352);
_arg1.push(_local3);
_local3 = new Pole(_arg2, 774.0625, 545);
_arg1.push(_local3);
_local3 = new Tree3(_arg2, 723.0625, 562);
_arg1.push(_local3);
_local3 = new Tree1(_arg2, 9.0625, 567);
_arg1.push(_local3);
_local3 = new Tree3(_arg2, -165.4375, 572.8125);
_arg1.push(_local3);
_local3 = new PipeBig(_arg2, 29.375, 420.625);
_arg1.push(_local3);
_local3 = new Tree3(_arg2, 207.375, 570.3125);
_arg1.push(_local3);
_local3 = new Tree1(_arg2, 271.375, 584.3125);
_arg1.push(_local3);
_local3 = new PipeBigRoll(_arg2, 467.8125, 233.125);
_arg1.push(_local3);
_local3 = new PipeBig(_arg2, 820.0625, 367.3125);
_arg1.push(_local3);
}
function createLevel0(_arg1:Array, _arg2:GameScene):void{
var _local3:GameObject;
_local3 = new Pole(_arg2, 702.625, 547.625);
_arg1.push(_local3);
_local3 = new PipeBig(_arg2, 213.25, 288.5);
_arg1.push(_local3);
_local3 = new PipeBig(_arg2, 637.0625, 342.8125);
_arg1.push(_local3);
_local3 = new PipeBig(_arg2, 328.9375, 288.8125);
_arg1.push(_local3);
_local3 = new PipeBig(_arg2, 741.9375, 342.8125);
_arg1.push(_local3);
_local3 = new Tree2(_arg2, 658.6875, 574.0625);
_arg1.push(_local3);
_local3 = new Tree1(_arg2, 326.25, 565.25);
_arg1.push(_local3);
_local3 = new Tree2(_arg2, 287.6875, 576.5);
_arg1.push(_local3);
}
public function init(_arg1:int, _arg2:GameScene):Array{
var _local4:GameObject;
var _local3:Array = new Array();
if (_arg1 == 0){
createLevel0(_local3, _arg2);
};
if (_arg1 == 1){
createLevel1(_local3, _arg2);
};
if (_arg1 == 2){
createLevel2(_local3, _arg2);
};
if (_arg1 == 3){
createLevel3(_local3, _arg2);
};
if (_arg1 == 4){
createLevel4(_local3, _arg2);
};
if (_arg1 == 5){
createLevel5(_local3, _arg2);
};
if (_arg1 == 6){
createLevel6(_local3, _arg2);
};
if (_arg1 == 7){
createLevel7(_local3, _arg2);
};
if (_arg1 == 8){
createLevel8(_local3, _arg2);
};
if (_arg1 == 9){
createLevel9(_local3, _arg2);
};
if (_arg1 == 10){
createLevel10(_local3, _arg2);
};
if (_arg1 == 11){
createLevel11(_local3, _arg2);
};
if (_arg1 == 12){
createLevel12(_local3, _arg2);
};
if (_arg1 == 13){
createLevel13(_local3, _arg2);
};
if (_arg1 == 14){
createLevel14(_local3, _arg2);
};
if (_arg1 == 15){
createLevel15(_local3, _arg2);
};
if (_arg1 == 16){
createLevel16(_local3, _arg2);
};
if (_arg1 == 17){
createLevel17(_local3, _arg2);
};
if (_arg1 == 18){
createLevel18(_local3, _arg2);
};
if (_arg1 == 19){
createLevel19(_local3, _arg2);
};
if (_arg1 == 20){
createLevel20(_local3, _arg2);
};
if (_arg1 == 21){
createLevel21(_local3, _arg2);
};
if (_arg1 == 22){
createLevel22(_local3, _arg2);
};
if (_arg1 == 23){
createLevel23(_local3, _arg2);
};
if (_arg1 == 24){
createLevel24(_local3, _arg2);
};
if (_arg1 == 25){
createLevel25(_local3, _arg2);
};
if (_arg1 == 26){
createLevel26(_local3, _arg2);
};
if (_arg1 == 27){
createLevel27(_local3, _arg2);
};
if (_arg1 == 28){
createLevel28(_local3, _arg2);
};
if (_arg1 == 29){
createLevel29(_local3, _arg2);
};
if (_arg1 == 30){
createLevel30(_local3, _arg2);
};
if (_arg1 == 31){
createLevel31(_local3, _arg2);
};
if (_arg1 == 32){
createLevel32(_local3, _arg2);
};
if (_arg1 == 33){
createLevel33(_local3, _arg2);
};
if (_arg1 == 34){
createLevel34(_local3, _arg2);
};
if (_arg1 == 35){
createLevel35(_local3, _arg2);
};
if (_arg1 == 36){
createLevel36(_local3, _arg2);
};
if (_arg1 == 37){
createLevel37(_local3, _arg2);
};
if (_arg1 == 38){
createLevel38(_local3, _arg2);
};
if (_arg1 == 39){
createLevel39(_local3, _arg2);
};
if (_arg1 == 40){
createLevel40(_local3, _arg2);
};
if (_arg1 == 41){
createLevel41(_local3, _arg2);
};
return (_local3);
}
function createLevel9(_arg1:Array, _arg2:GameScene):void{
var _local3:GameObject;
_local3 = new Tree1(_arg2, -161, 558.9375);
_arg1.push(_local3);
_local3 = new Tree1(_arg2, 242, 566.9375);
_arg1.push(_local3);
_local3 = new Tree1(_arg2, 958.3125, 569.625);
_arg1.push(_local3);
_local3 = new Tree2(_arg2, 323.3125, 581.625);
_arg1.push(_local3);
_local3 = new Tree3(_arg2, 758.3125, 566.625);
_arg1.push(_local3);
_local3 = new Tree2(_arg2, 710.3125, 580.625);
_arg1.push(_local3);
_local3 = new Tree1(_arg2, 373.3125, 568.625);
_arg1.push(_local3);
_local3 = new Tree2(_arg2, 8.0625, 575.875);
_arg1.push(_local3);
_local3 = new Tree3(_arg2, 55.0625, 565.875);
_arg1.push(_local3);
_local3 = new Rock1(_arg2, 530.875, 512.3125);
_arg1.push(_local3);
_local3 = new Rock2(_arg2, 146.9375, 522.875);
_arg1.push(_local3);
_local3 = new PipeBig(_arg2, 60.9375, 416.875);
_arg1.push(_local3);
_local3 = new Tree3(_arg2, 590.3125, 580.875);
_arg1.push(_local3);
_local3 = new Tree1(_arg2, 117.3125, 599.875);
_arg1.push(_local3);
_local3 = new VertPipeBig(_arg2, 799.1875, 142.625);
_arg1.push(_local3);
_local3 = new Rock2(_arg2, 1104.75, 532.5625);
_arg1.push(_local3);
_local3 = new PipeBig(_arg2, 672.125, 401.5625);
_arg1.push(_local3);
_local3 = new Blimp(_arg2, 520.8125, 261.3125);
_arg1.push(_local3);
_local3 = new FloatObstacle(_arg2, 330.375, 438.625);
_arg1.push(_local3);
_local3 = new PipeBig(_arg2, 877.5625, 51.4375);
_arg1.push(_local3);
_local3 = new PipeBig(_arg2, 975.5625, 51.4375);
_arg1.push(_local3);
_local3 = new PipeBig(_arg2, 330.125, 340.0625);
_arg1.push(_local3);
_local3 = new VertPipeBigRoll(_arg2, 798.625, 265.125);
_arg1.push(_local3);
}
function createLevel14(_arg1:Array, _arg2:GameScene):void{
var _local3:GameObject;
_local3 = new Pipe(_arg2, 139.0625, 463.5);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 322.0625, 402.5);
_arg1.push(_local3);
_local3 = new VertPipeBig(_arg2, 489.25, 311.25);
_arg1.push(_local3);
_local3 = new VertPipeBig(_arg2, 489.25, 115.25);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 658.5625, 45.625);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 878.5625, 127.625);
_arg1.push(_local3);
_local3 = new Tree3(_arg2, 525, 575.8125);
_arg1.push(_local3);
_local3 = new Tree2(_arg2, 493, 594.8125);
_arg1.push(_local3);
_local3 = new Tree2(_arg2, 76.3125, 573.5);
_arg1.push(_local3);
_local3 = new Tree1(_arg2, 153.3125, 575.5);
_arg1.push(_local3);
_local3 = new Tree3(_arg2, 344.3125, 568.5);
_arg1.push(_local3);
_local3 = new Tree1(_arg2, 374.3125, 581.5);
_arg1.push(_local3);
_local3 = new Tree2(_arg2, 295.3125, 586.5);
_arg1.push(_local3);
_local3 = new VertPipeRoll(_arg2, 487.375, 212.4375);
_arg1.push(_local3);
_local3 = new PipeRoll(_arg2, 764.9375, 65.3125);
_arg1.push(_local3);
_local3 = new Rock2(_arg2, 614.4375, 523.8125);
_arg1.push(_local3);
}
function createLevel15(_arg1:Array, _arg2:GameScene):void{
var _local3:GameObject;
_local3 = new Pole(_arg2, 295.9375, 552.25);
_arg1.push(_local3);
_local3 = new FloatObstacle(_arg2, 294.9375, 356.25);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 292.9375, 447.25);
_arg1.push(_local3);
_local3 = new Pole(_arg2, 770.5625, 552.9375);
_arg1.push(_local3);
_local3 = new FloatObstacle(_arg2, 768.5625, 358.9375);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 767.5625, 449.9375);
_arg1.push(_local3);
_local3 = new FloatObstacle(_arg2, 530.5625, 404.9375);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 528.5625, 494.9375);
_arg1.push(_local3);
_local3 = new Tree2(_arg2, 258.6875, 576.625);
_arg1.push(_local3);
_local3 = new Tree3(_arg2, 731.6875, 581.625);
_arg1.push(_local3);
_local3 = new Tree2(_arg2, 810.0625, 582.8125);
_arg1.push(_local3);
_local3 = new Tree3(_arg2, 35.6875, 563.375);
_arg1.push(_local3);
_local3 = new Tree1(_arg2, 456.6875, 576.375);
_arg1.push(_local3);
_local3 = new Tree2(_arg2, 615.6875, 581.375);
_arg1.push(_local3);
_local3 = new VertPipe(_arg2, 644.25, 205);
_arg1.push(_local3);
_local3 = new Blimp(_arg2, 530.6875, 39.3125);
_arg1.push(_local3);
_local3 = new PipeBigRoll(_arg2, 150.1875, 435.25);
_arg1.push(_local3);
_local3 = new VertPipeRoll(_arg2, 435.625, 204.375);
_arg1.push(_local3);
}
function createLevel16(_arg1:Array, _arg2:GameScene):void{
var _local3:GameObject;
_local3 = new VertPipe(_arg2, 278.75, 378.875);
_arg1.push(_local3);
_local3 = new VertPipe(_arg2, 445.75, 379.875);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 762.0625, 446.875);
_arg1.push(_local3);
_local3 = new Pole(_arg2, 423.8125, 552.8125);
_arg1.push(_local3);
_local3 = new Pole(_arg2, 873.8125, 550.8125);
_arg1.push(_local3);
_local3 = new FloatObstacle(_arg2, 283.8125, 230.8125);
_arg1.push(_local3);
_local3 = new Tree2(_arg2, 807.8125, 579.8125);
_arg1.push(_local3);
_local3 = new Tree3(_arg2, 77.8125, 568.8125);
_arg1.push(_local3);
_local3 = new Tree1(_arg2, 154.8125, 580.8125);
_arg1.push(_local3);
_local3 = new Tree1(_arg2, 484.8125, 574.8125);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 762.9375, 287.625);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 533.9375, 172.625);
_arg1.push(_local3);
_local3 = new FloatObstacle(_arg2, 646.25, 326.75);
_arg1.push(_local3);
_local3 = new PipeRoll(_arg2, 648, 225.5);
_arg1.push(_local3);
}
function createLevel17(_arg1:Array, _arg2:GameScene):void{
var _local3:GameObject;
_local3 = new BonusBalloon(_arg2, 172.3125, 62.9375);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 140.3125, 100.9375);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 126.3125, 149.9375);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 148.3125, 197.9375);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 181.3125, 232.9375);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 223.3125, 257.9375);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 720.25, 150.875);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 704.25, 198.875);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 666.25, 234.875);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 619.25, 258.875);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 704.25, 97.875);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 668.25, 57.875);
_arg1.push(_local3);
_local3 = new Pole(_arg2, 426.9375, 554.75);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 377.9375, 408.75);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 351.9375, 457.75);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 311.9375, 496.75);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 259.9375, 509.75);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 467.9375, 407.75);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 488.9375, 460.75);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 523.9375, 496.75);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 573.9375, 514.75);
_arg1.push(_local3);
}
function createLevel7(_arg1:Array, _arg2:GameScene):void{
var _local3:GameObject;
_local3 = new Tree2(_arg2, 78.6875, 571.5625);
_arg1.push(_local3);
_local3 = new Tree3(_arg2, -114.875, 559.5625);
_arg1.push(_local3);
_local3 = new Tree1(_arg2, 476.125, 562.5625);
_arg1.push(_local3);
_local3 = new Tree2(_arg2, 718.5625, 573);
_arg1.push(_local3);
_local3 = new FloatObstacle(_arg2, 475.9375, 322.6875);
_arg1.push(_local3);
_local3 = new VertPipeBig(_arg2, 650.4375, 326.4375);
_arg1.push(_local3);
_local3 = new PipeBig(_arg2, 561.625, 434.6875);
_arg1.push(_local3);
_local3 = new PipeBig(_arg2, 561.625, 212.6875);
_arg1.push(_local3);
_local3 = new VertPipeBig(_arg2, 231.5, 362.0625);
_arg1.push(_local3);
_local3 = new PipeBigRoll(_arg2, 388, 436);
_arg1.push(_local3);
_local3 = new PipeBigRoll(_arg2, 467, 186);
_arg1.push(_local3);
_local3 = new PipeBig(_arg2, 368, 159);
_arg1.push(_local3);
}
function createLevel8(_arg1:Array, _arg2:GameScene):void{
var _local3:GameObject;
_local3 = new Blimp(_arg2, 204.9375, 360.125);
_arg1.push(_local3);
_local3 = new PipeBig(_arg2, 367.9375, 438.125);
_arg1.push(_local3);
_local3 = new Tree1(_arg2, 98.9375, 570.375);
_arg1.push(_local3);
_local3 = new Tree2(_arg2, 134.9375, 580.375);
_arg1.push(_local3);
_local3 = new Tree3(_arg2, 308.9375, 566.375);
_arg1.push(_local3);
_local3 = new VertPipeBig(_arg2, 539, 326.5);
_arg1.push(_local3);
_local3 = new VertPipeBig(_arg2, 539, 181.5);
_arg1.push(_local3);
_local3 = new VertPipeBig(_arg2, 800.625, 146.125);
_arg1.push(_local3);
_local3 = new VertPipeBig(_arg2, 799.625, 291.125);
_arg1.push(_local3);
_local3 = new FloatObstacle(_arg2, 657.4375, 143.125);
_arg1.push(_local3);
_local3 = new Tree2(_arg2, 843, 577.25);
_arg1.push(_local3);
_local3 = new Tree1(_arg2, 772, 569.25);
_arg1.push(_local3);
_local3 = new Tree3(_arg2, -211.4375, 567.375);
_arg1.push(_local3);
_local3 = new Tree3(_arg2, 1016.0625, 568.125);
_arg1.push(_local3);
_local3 = new PipeBig(_arg2, 42.25, 424.25);
_arg1.push(_local3);
_local3 = new PipeBig(_arg2, 658.5, 20.8125);
_arg1.push(_local3);
_local3 = new PipeBigRoll(_arg2, 205.3125, 467.125);
_arg1.push(_local3);
}
function createLevel12(_arg1:Array, _arg2:GameScene):void{
var _local3:GameObject;
_local3 = new PipeBig(_arg2, 513.9375, 473.875);
_arg1.push(_local3);
_local3 = new Blimp(_arg2, 514.9375, 358.1875);
_arg1.push(_local3);
_local3 = new Rock1(_arg2, 337.8125, 505.4375);
_arg1.push(_local3);
_local3 = new Rock2(_arg2, 696.3125, 527.3125);
_arg1.push(_local3);
_local3 = new Tree1(_arg2, 643.3125, 591.3125);
_arg1.push(_local3);
_local3 = new Tree3(_arg2, 279.3125, 575.3125);
_arg1.push(_local3);
_local3 = new Tree2(_arg2, 748.3125, 589.3125);
_arg1.push(_local3);
_local3 = new PipeBig(_arg2, 53.9375, 349.5);
_arg1.push(_local3);
_local3 = new PipeBig(_arg2, 197.9375, 325.5);
_arg1.push(_local3);
_local3 = new PipeBig(_arg2, 125.9375, 336.5);
_arg1.push(_local3);
_local3 = new VertPipeBig(_arg2, 641.4375, 84.3125);
_arg1.push(_local3);
_local3 = new FloatObstacle(_arg2, 361.4375, 197.3125);
_arg1.push(_local3);
_local3 = new FloatObstacle(_arg2, 422.4375, 274.3125);
_arg1.push(_local3);
_local3 = new FloatObstacle(_arg2, 384.4375, 84.3125);
_arg1.push(_local3);
_local3 = new FloatObstacle(_arg2, 752.6875, 331.25);
_arg1.push(_local3);
_local3 = new Tree2(_arg2, 27.4375, 576.125);
_arg1.push(_local3);
_local3 = new Tree1(_arg2, 79.4375, 571.125);
_arg1.push(_local3);
_local3 = new VertPipeBigRoll(_arg2, 641.4375, 182.5625);
_arg1.push(_local3);
}
function createLevel13(_arg1:Array, _arg2:GameScene):void{
var _local3:GameObject;
_local3 = new Pipe(_arg2, 109.75, 326.3125);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 188.75, 326.3125);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 415.75, 301.3125);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 483.75, 300.3125);
_arg1.push(_local3);
_local3 = new Tree3(_arg2, 572, 565);
_arg1.push(_local3);
_local3 = new Tree2(_arg2, 527, 581);
_arg1.push(_local3);
_local3 = new Blimp(_arg2, 280, 235);
_arg1.push(_local3);
_local3 = new Blimp(_arg2, 330, 413);
_arg1.push(_local3);
_local3 = new Pole(_arg2, 853.3125, 554.6875);
_arg1.push(_local3);
_local3 = new PipeBig(_arg2, 927.3125, 388.6875);
_arg1.push(_local3);
_local3 = new Tree3(_arg2, 64.75, 569.125);
_arg1.push(_local3);
_local3 = new Tree1(_arg2, 139.75, 578.125);
_arg1.push(_local3);
_local3 = new Tree2(_arg2, 18.75, 590.125);
_arg1.push(_local3);
_local3 = new Tree3(_arg2, 397.75, 574.125);
_arg1.push(_local3);
_local3 = new Tree1(_arg2, 340.75, 579.125);
_arg1.push(_local3);
_local3 = new Tree2(_arg2, 293.75, 587.125);
_arg1.push(_local3);
_local3 = new Tree1(_arg2, 888.4375, 579.6875);
_arg1.push(_local3);
_local3 = new Tree2(_arg2, 816.4375, 588.6875);
_arg1.push(_local3);
_local3 = new VertPipeBigRoll(_arg2, 641.625, 401.4375);
_arg1.push(_local3);
_local3 = new PipeBigRoll(_arg2, 821.8125, 407.0625);
_arg1.push(_local3);
}
function createLevel36(_arg1:Array, _arg2:GameScene):void{
var _local3:GameObject;
_local3 = new Pipe(_arg2, 93.125, 310.8125);
_arg1.push(_local3);
_local3 = new VertPipe(_arg2, 182.125, 255.8125);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 254.125, 184.8125);
_arg1.push(_local3);
_local3 = new VertPipeRoll(_arg2, 338.4375, 127.9375);
_arg1.push(_local3);
_local3 = new PipeBig(_arg2, 404.0625, 51.5);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 477.0625, 60.5);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 535.0625, 88.5);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 729.0625, 198.5);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 787.0625, 218.5);
_arg1.push(_local3);
_local3 = new PipeRoll(_arg2, 592.375, 123.8125);
_arg1.push(_local3);
_local3 = new PipeRoll(_arg2, 18.75, 310.5625);
_arg1.push(_local3);
_local3 = new Tree2(_arg2, 44.1875, 575.6875);
_arg1.push(_local3);
_local3 = new Tree2(_arg2, 687.1875, 572.6875);
_arg1.push(_local3);
_local3 = new Tree3(_arg2, 620.1875, 564.6875);
_arg1.push(_local3);
_local3 = new Tree3(_arg2, 90.1875, 567.6875);
_arg1.push(_local3);
_local3 = new Tree1(_arg2, 154.1875, 577.6875);
_arg1.push(_local3);
_local3 = new Tree1(_arg2, 546.1875, 566.6875);
_arg1.push(_local3);
_local3 = new FloatObstacle(_arg2, 19.25, 392.9375);
_arg1.push(_local3);
_local3 = new FloatObstacle(_arg2, 21.25, 226.9375);
_arg1.push(_local3);
_local3 = new FloatObstacle(_arg2, 649.875, 233);
_arg1.push(_local3);
_local3 = new FloatObstacle(_arg2, 669.5, 83.3125);
_arg1.push(_local3);
_local3 = new Rock2(_arg2, 485.25, 525.875);
_arg1.push(_local3);
_local3 = new Tree2(_arg2, 425.25, 578.875);
_arg1.push(_local3);
}
function createLevel37(_arg1:Array, _arg2:GameScene):void{
var _local3:GameObject;
_local3 = new Pipe(_arg2, 136.1875, 482.125);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 232.1875, 501.125);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 311.1875, 508.125);
_arg1.push(_local3);
_local3 = new FloatObstacle(_arg2, 395.1875, 385.125);
_arg1.push(_local3);
_local3 = new PipeRoll(_arg2, 35.1875, 472.125);
_arg1.push(_local3);
_local3 = new FloatObstacle(_arg2, 39.375, 380.6875);
_arg1.push(_local3);
_local3 = new PipeRoll(_arg2, 420, 460.625);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 513, 414.625);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 614, 408.625);
_arg1.push(_local3);
_local3 = new VertPipeRoll(_arg2, 703.5625, 331.5);
_arg1.push(_local3);
_local3 = new VertPipe(_arg2, 703.5625, 234.5);
_arg1.push(_local3);
_local3 = new VertPipe(_arg2, 701.5625, 142.5);
_arg1.push(_local3);
_local3 = new PipeRoll(_arg2, 499.8125, 128.125);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 392.8125, 168.125);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 308.8125, 168.125);
_arg1.push(_local3);
_local3 = new FloatObstacle(_arg2, 702.25, 14.0625);
_arg1.push(_local3);
_local3 = new FloatObstacle(_arg2, 354.25, 99.0625);
_arg1.push(_local3);
_local3 = new FloatObstacle(_arg2, 355.25, 234.0625);
_arg1.push(_local3);
_local3 = new Tree3(_arg2, 83.3125, 564.625);
_arg1.push(_local3);
_local3 = new Tree2(_arg2, 133.3125, 579.625);
_arg1.push(_local3);
_local3 = new Tree3(_arg2, 772.3125, 559.625);
_arg1.push(_local3);
_local3 = new Tree1(_arg2, 710.3125, 569.625);
_arg1.push(_local3);
_local3 = new Tree2(_arg2, 431.3125, 582.625);
_arg1.push(_local3);
}
function createLevel38(_arg1:Array, _arg2:GameScene):void{
var _local3:GameObject;
_local3 = new Rock1(_arg2, 62.8125, 519.0625);
_arg1.push(_local3);
_local3 = new Rock2(_arg2, 493.8125, 534.0625);
_arg1.push(_local3);
_local3 = new Tree3(_arg2, 767.9375, 568.3125);
_arg1.push(_local3);
_local3 = new Rock1(_arg2, 829.9375, 533.3125);
_arg1.push(_local3);
_local3 = new Tree3(_arg2, 891.9375, 571.3125);
_arg1.push(_local3);
_local3 = new Tree3(_arg2, 433.9375, 575.3125);
_arg1.push(_local3);
_local3 = new Tree2(_arg2, 107, 583.4375);
_arg1.push(_local3);
_local3 = new Tree3(_arg2, -3, 572.4375);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 219.875, 465.8125);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 268.875, 486.8125);
_arg1.push(_local3);
_local3 = new PipeRoll(_arg2, 319.875, 486.8125);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 364.875, 468.8125);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 589.6875, 466.8125);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 661.6875, 480.8125);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 721.6875, 459.8125);
_arg1.push(_local3);
_local3 = new VertPipeRoll(_arg2, 783, 329.3125);
_arg1.push(_local3);
_local3 = new VertPipe(_arg2, 777, 269.3125);
_arg1.push(_local3);
_local3 = new VertPipe(_arg2, 753, 208.3125);
_arg1.push(_local3);
_local3 = new VertPipe(_arg2, 713, 152.3125);
_arg1.push(_local3);
_local3 = new Blimp(_arg2, 685.4375, 41.5625);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 528.4375, 152.5625);
_arg1.push(_local3);
_local3 = new VertPipeRoll(_arg2, 453.4375, 217.5625);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 366.4375, 270.5625);
_arg1.push(_local3);
_local3 = new FloatObstacle(_arg2, 492.4375, 316.5625);
_arg1.push(_local3);
_local3 = new FloatObstacle(_arg2, 116.625, 294.8125);
_arg1.push(_local3);
}
function createLevel39(_arg1:Array, _arg2:GameScene):void{
var _local3:GameObject;
_local3 = new PipeBig(_arg2, 77.5625, 290.125);
_arg1.push(_local3);
_local3 = new Blimp(_arg2, 88.5625, 426.125);
_arg1.push(_local3);
_local3 = new Blimp(_arg2, 71.5625, 179.125);
_arg1.push(_local3);
_local3 = new FloatObstacle(_arg2, 209.5625, 276.25);
_arg1.push(_local3);
_local3 = new PipeRoll(_arg2, 207.5625, 371.25);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 289.5625, 352.25);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 372.5625, 351.25);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 457.5625, 380.25);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 582.375, 447.5);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 673.375, 495.5);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 758.375, 486.5);
_arg1.push(_local3);
_local3 = new FloatObstacle(_arg2, 546.375, 355.5);
_arg1.push(_local3);
_local3 = new FloatObstacle(_arg2, 535.375, 499.5);
_arg1.push(_local3);
_local3 = new PipeBig(_arg2, 825.875, 465.5625);
_arg1.push(_local3);
_local3 = new Tree2(_arg2, 442.25, 572.3125);
_arg1.push(_local3);
_local3 = new Tree3(_arg2, 476.25, 564.3125);
_arg1.push(_local3);
_local3 = new Tree3(_arg2, 98.25, 561.3125);
_arg1.push(_local3);
_local3 = new Tree1(_arg2, 151.25, 569.3125);
_arg1.push(_local3);
_local3 = new Tree1(_arg2, 781.25, 564.3125);
_arg1.push(_local3);
_local3 = new VertPipeRoll(_arg2, 732.1875, 188.4375);
_arg1.push(_local3);
_local3 = new VertPipeRoll(_arg2, 582.1875, 152.4375);
_arg1.push(_local3);
_local3 = new VertPipeRoll(_arg2, 435.1875, 112.4375);
_arg1.push(_local3);
_local3 = new VertPipeRoll(_arg2, 283.1875, 76.4375);
_arg1.push(_local3);
}
function createLevel18(_arg1:Array, _arg2:GameScene):void{
var _local3:GameObject;
_local3 = new Pipe(_arg2, 115.5625, 410.75);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 206.5625, 375.75);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 336.5625, 180.75);
_arg1.push(_local3);
_local3 = new VertPipe(_arg2, 578.5625, 408.75);
_arg1.push(_local3);
_local3 = new VertPipe(_arg2, 881.5, 413.25);
_arg1.push(_local3);
_local3 = new Rock1(_arg2, 414.5, 503.25);
_arg1.push(_local3);
_local3 = new Tree2(_arg2, 359.9375, 586);
_arg1.push(_local3);
_local3 = new Tree1(_arg2, 468.9375, 579);
_arg1.push(_local3);
_local3 = new Tree3(_arg2, 97.9375, 578);
_arg1.push(_local3);
_local3 = new Tree3(_arg2, 798.9375, 571);
_arg1.push(_local3);
_local3 = new Tree1(_arg2, 749.9375, 585);
_arg1.push(_local3);
_local3 = new Tree1(_arg2, 164.9375, 578);
_arg1.push(_local3);
_local3 = new FloatObstacle(_arg2, 391.9375, 296);
_arg1.push(_local3);
_local3 = new FloatObstacle(_arg2, 742.3125, 339.4375);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 437.9375, 180.5);
_arg1.push(_local3);
_local3 = new VertPipeRoll(_arg2, 534.125, 247.5);
_arg1.push(_local3);
_local3 = new FloatObstacle(_arg2, 343.4375, 379.875);
_arg1.push(_local3);
}
function createLevel19(_arg1:Array, _arg2:GameScene):void{
var _local3:GameObject;
_local3 = new Tree1(_arg2, 164.375, 558.6875);
_arg1.push(_local3);
_local3 = new Tree3(_arg2, 225.375, 581.6875);
_arg1.push(_local3);
_local3 = new Tree2(_arg2, 98.375, 568.6875);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 210.0625, 476.625);
_arg1.push(_local3);
_local3 = new Tree2(_arg2, 420.5625, 569.9375);
_arg1.push(_local3);
_local3 = new Tree3(_arg2, 760.5625, 567.9375);
_arg1.push(_local3);
_local3 = new Rock2(_arg2, 351.5625, 521.9375);
_arg1.push(_local3);
_local3 = new Tree1(_arg2, 319.4375, 571.4375);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 415.4375, 398.4375);
_arg1.push(_local3);
_local3 = new FloatObstacle(_arg2, 419.4375, 306.4375);
_arg1.push(_local3);
_local3 = new Pole(_arg2, 801.4375, 548.375);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 500.5625, 436.5625);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 588.5625, 465.5625);
_arg1.push(_local3);
_local3 = new FloatObstacle(_arg2, 495.375, 220.3125);
_arg1.push(_local3);
_local3 = new PipeRoll(_arg2, 239.8125, 248.8125);
_arg1.push(_local3);
_local3 = new PipeRoll(_arg2, 321.8125, 198.8125);
_arg1.push(_local3);
_local3 = new PipeRoll(_arg2, 412.8125, 146.8125);
_arg1.push(_local3);
}
function createLevel33(_arg1:Array, _arg2:GameScene):void{
var _local3:GameObject;
_local3 = new Pipe(_arg2, 35.5625, 182.875);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 121.5625, 160.875);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 204.5625, 149.875);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 283.5625, 156.875);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 352.5625, 190.875);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 588.5625, 227.875);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 669.5625, 194.875);
_arg1.push(_local3);
_local3 = new VertPipe(_arg2, 748.1875, 287.25);
_arg1.push(_local3);
_local3 = new VertPipe(_arg2, 750.1875, 370.25);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 677.1875, 458.25);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 524.1875, 502.25);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 445.1875, 520.25);
_arg1.push(_local3);
_local3 = new Pole(_arg2, 126.1875, 550.25);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 268.1875, 415.25);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 190.1875, 395.25);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 112.1875, 377.25);
_arg1.push(_local3);
_local3 = new PipeRoll(_arg2, 500.6875, 248.75);
_arg1.push(_local3);
_local3 = new PipeRoll(_arg2, 599.9375, 479.4375);
_arg1.push(_local3);
_local3 = new FloatObstacle(_arg2, 811.5, 136.5625);
_arg1.push(_local3);
_local3 = new FloatObstacle(_arg2, 439.6875, 168.6875);
_arg1.push(_local3);
_local3 = new Tree2(_arg2, 40.125, 572.625);
_arg1.push(_local3);
_local3 = new Tree3(_arg2, 770.3125, 565.4375);
_arg1.push(_local3);
_local3 = new Tree2(_arg2, 737.3125, 583.4375);
_arg1.push(_local3);
_local3 = new Tree1(_arg2, 90.3125, 568.4375);
_arg1.push(_local3);
}
function createLevel34(_arg1:Array, _arg2:GameScene):void{
var _local3:GameObject;
_local3 = new PipeBig(_arg2, 62.6875, 140.4375);
_arg1.push(_local3);
_local3 = new PipeBig(_arg2, 134.6875, 98.4375);
_arg1.push(_local3);
_local3 = new PipeBig(_arg2, 207.6875, 63.4375);
_arg1.push(_local3);
_local3 = new PipeRoll(_arg2, 271.25, 56.3125);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 339.25, 78.3125);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 399.25, 101.3125);
_arg1.push(_local3);
_local3 = new VertPipeRoll(_arg2, 458.8125, 217.5);
_arg1.push(_local3);
_local3 = new VertPipe(_arg2, 452.8125, 285.5);
_arg1.push(_local3);
_local3 = new VertPipe(_arg2, 446.8125, 352.5);
_arg1.push(_local3);
_local3 = new Pole(_arg2, 372.8125, 553.5);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 574.3125, 483);
_arg1.push(_local3);
_local3 = new VertPipe(_arg2, 645.3125, 404);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 704.3125, 319);
_arg1.push(_local3);
_local3 = new VertPipe(_arg2, 771.3125, 232);
_arg1.push(_local3);
_local3 = new Tree2(_arg2, 334.5, 576.1875);
_arg1.push(_local3);
_local3 = new Tree3(_arg2, 679.5, 569.1875);
_arg1.push(_local3);
_local3 = new Tree1(_arg2, 37.5, 565.1875);
_arg1.push(_local3);
_local3 = new Tree3(_arg2, 105.5, 570.1875);
_arg1.push(_local3);
_local3 = new FloatObstacle(_arg2, 67.5625, 251.375);
_arg1.push(_local3);
_local3 = new FloatObstacle(_arg2, 71, 34.75);
_arg1.push(_local3);
_local3 = new FloatObstacle(_arg2, 542.6875, 104.9375);
_arg1.push(_local3);
}
function createLevel35(_arg1:Array, _arg2:GameScene):void{
var _local3:GameObject;
_local3 = new BonusBalloon(_arg2, 36.5625, 360.375);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 101.5625, 362.375);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 162.5625, 357.375);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 218.5625, 331.375);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 254.5625, 284.375);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 274.5625, 226.375);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 510.4375, 225.625);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 525.4375, 280.625);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 554.4375, 332.625);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 604.4375, 361.625);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 668.4375, 366.625);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 731.4375, 363.625);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 396.5, 66.3125);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 367.5, 106.3125);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 428.5, 107.3125);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 397.5, 149.3125);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 122.5, 440.6875);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 91.5, 481.6875);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 155.5, 481.6875);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 124.5, 523.6875);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 646.8125, 515.875);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 643.8125, 431.875);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 608.8125, 473.875);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 679.8125, 473.875);
_arg1.push(_local3);
}
function createLevel40(_arg1:Array, _arg2:GameScene):void{
var _local3:GameObject;
_local3 = new VertPipeRoll(_arg2, 86.5625, 471.25);
_arg1.push(_local3);
_local3 = new VertPipeRoll(_arg2, 199.5625, 307.25);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 376.5625, 181.25);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 423.5625, 200.25);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 494.5625, 275.25);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 538.5625, 298.25);
_arg1.push(_local3);
_local3 = new FloatObstacle(_arg2, 508.5625, 170.25);
_arg1.push(_local3);
_local3 = new FloatObstacle(_arg2, 58.5625, 387.25);
_arg1.push(_local3);
_local3 = new FloatObstacle(_arg2, 419.5625, 313.25);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 713.0625, 392.375);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 771.0625, 392.375);
_arg1.push(_local3);
_local3 = new PipeRoll(_arg2, 650.0625, 392.375);
_arg1.push(_local3);
_local3 = new Tree2(_arg2, 119.4375, 574.5);
_arg1.push(_local3);
_local3 = new Tree3(_arg2, 158.4375, 563.5);
_arg1.push(_local3);
_local3 = new Tree1(_arg2, 603.6875, 561.6875);
_arg1.push(_local3);
_local3 = new Tree2(_arg2, 648.6875, 573.6875);
_arg1.push(_local3);
_local3 = new Tree3(_arg2, 769.6875, 559.6875);
_arg1.push(_local3);
_local3 = new Tree3(_arg2, 307.6875, 564.6875);
_arg1.push(_local3);
_local3 = new Blimp(_arg2, 705.6875, 293.6875);
_arg1.push(_local3);
_local3 = new VertPipe(_arg2, 149.4375, 390.5);
_arg1.push(_local3);
_local3 = new VertPipe(_arg2, 243.4375, 230.5);
_arg1.push(_local3);
_local3 = new Rock2(_arg2, 699.5, 522.9375);
_arg1.push(_local3);
}
function createLevel41(_arg1:Array, _arg2:GameScene):void{
var _local3:GameObject;
_local3 = new BonusBalloon(_arg2, 101.375, 436.75);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 143.375, 405.75);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 182.375, 375.75);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 221.375, 348.75);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 299.9375, 172.0625);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 338.9375, 140.0625);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 377.9375, 109.0625);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 415.9375, 78.0625);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 573.25, 77.125);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 610.25, 105.125);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 648.25, 136.125);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 683.25, 164.125);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 404.1875, 310.6875);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 452.1875, 311.6875);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 503.1875, 311.6875);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 552.1875, 311.6875);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 599.1875, 308.6875);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 505.375, 362.5625);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 506.375, 410.5625);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 507.375, 461.5625);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 769.5625, 350.75);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 806.5625, 380.75);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 844.5625, 408.75);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 883.5625, 437.75);
_arg1.push(_local3);
}
function createLevel20(_arg1:Array, _arg2:GameScene):void{
var _local3:GameObject;
_local3 = new Pipe(_arg2, 97, 304.1875);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 182, 349.1875);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 265, 391.1875);
_arg1.push(_local3);
_local3 = new VertPipe(_arg2, 683.5625, 400.25);
_arg1.push(_local3);
_local3 = new VertPipe(_arg2, 675.5625, 195.25);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 744.5625, 119.375);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 844.5625, 174.375);
_arg1.push(_local3);
_local3 = new FloatObstacle(_arg2, 783.5625, 235.375);
_arg1.push(_local3);
_local3 = new FloatObstacle(_arg2, 581.4375, 384.9375);
_arg1.push(_local3);
_local3 = new Pole(_arg2, 762.4375, 551.9375);
_arg1.push(_local3);
_local3 = new Tree2(_arg2, 275.4375, 572.9375);
_arg1.push(_local3);
_local3 = new Tree3(_arg2, 209.4375, 560.9375);
_arg1.push(_local3);
_local3 = new Rock1(_arg2, 414.4375, 511.9375);
_arg1.push(_local3);
_local3 = new Tree3(_arg2, 797.125, 572.875);
_arg1.push(_local3);
_local3 = new Tree1(_arg2, 722.125, 576.875);
_arg1.push(_local3);
_local3 = new Tree3(_arg2, 370.125, 570.875);
_arg1.push(_local3);
_local3 = new Tree1(_arg2, 43.6875, 562.375);
_arg1.push(_local3);
_local3 = new VertPipeRoll(_arg2, 658.0625, 296.25);
_arg1.push(_local3);
_local3 = new VertPipeRoll(_arg2, 503, 418);
_arg1.push(_local3);
}
function createLevel21(_arg1:Array, _arg2:GameScene):void{
var _local3:GameObject;
_local3 = new VertPipe(_arg2, 318.6875, 359.1875);
_arg1.push(_local3);
_local3 = new VertPipe(_arg2, 636.6875, 249.1875);
_arg1.push(_local3);
_local3 = new FloatObstacle(_arg2, 638.0625, 420.0625);
_arg1.push(_local3);
_local3 = new Pole(_arg2, 325.0625, 551.0625);
_arg1.push(_local3);
_local3 = new Rock2(_arg2, 40.5625, 522.875);
_arg1.push(_local3);
_local3 = new Tree3(_arg2, 368.5625, 561.875);
_arg1.push(_local3);
_local3 = new Tree1(_arg2, 808.5, 568.75);
_arg1.push(_local3);
_local3 = new Tree1(_arg2, -19.3125, 574.6875);
_arg1.push(_local3);
_local3 = new Tree3(_arg2, 97.6875, 574.6875);
_arg1.push(_local3);
_local3 = new Tree2(_arg2, 287.6875, 577.6875);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 774.4375, 171.875);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 873.4375, 170.875);
_arg1.push(_local3);
_local3 = new FloatObstacle(_arg2, 383, 165.625);
_arg1.push(_local3);
_local3 = new VertPipe(_arg2, 501.1875, 199.8125);
_arg1.push(_local3);
_local3 = new VertPipe(_arg2, 478.1875, 354.8125);
_arg1.push(_local3);
_local3 = new VertPipe(_arg2, 150.1875, 361.8125);
_arg1.push(_local3);
_local3 = new VertPipeBigRoll(_arg2, 478, 295.9375);
_arg1.push(_local3);
}
function createLevel22(_arg1:Array, _arg2:GameScene):void{
var _local3:GameObject;
_local3 = new Blimp(_arg2, 611.375, 242.25);
_arg1.push(_local3);
_local3 = new Tree2(_arg2, 621.5, 572.5625);
_arg1.push(_local3);
_local3 = new Tree3(_arg2, 664.5, 563.5625);
_arg1.push(_local3);
_local3 = new Tree1(_arg2, 133.5, 563.5625);
_arg1.push(_local3);
_local3 = new Tree2(_arg2, 178.5, 574.5625);
_arg1.push(_local3);
_local3 = new Tree3(_arg2, 252.5, 564.5625);
_arg1.push(_local3);
_local3 = new Rock2(_arg2, 417.5, 524.5625);
_arg1.push(_local3);
_local3 = new Tree2(_arg2, 476.5, 570.5625);
_arg1.push(_local3);
_local3 = new Tree1(_arg2, 367.5, 566.5625);
_arg1.push(_local3);
_local3 = new PipeRoll(_arg2, 31.5625, 316.625);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 155.625, 365.375);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 387.625, 256.375);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 611.625, 137.375);
_arg1.push(_local3);
_local3 = new Blimp(_arg2, 153.625, 258.375);
_arg1.push(_local3);
_local3 = new PipeBigRoll(_arg2, 271, 325);
_arg1.push(_local3);
_local3 = new PipeBigRoll(_arg2, 492, 191);
_arg1.push(_local3);
_local3 = new PipeBigRoll(_arg2, 714, 177);
_arg1.push(_local3);
}
function createLevel23(_arg1:Array, _arg2:GameScene):void{
var _local3:GameObject;
_local3 = new BonusBalloon(_arg2, 184.8125, 256.5);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 340.8125, 202.5);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 407.8125, 161.5);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 473.8125, 204.5);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 509.8125, 269.5);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 475.8125, 338.5);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 409.8125, 373.5);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 341.8125, 340.5);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 303.8125, 267.5);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 134.625, 268.25);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 84.625, 256.25);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 625.9375, 253.8125);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 672.9375, 271.8125);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 718.9375, 253.8125);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 412.6875, 476.25);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 366.6875, 464.25);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 458.6875, 462.25);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 246.9375, 143.625);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 310.9375, 83.625);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 406.9375, 46.625);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 497.9375, 86.625);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 551.9375, 147.625);
_arg1.push(_local3);
}
function createLevel24(_arg1:Array, _arg2:GameScene):void{
var _local3:GameObject;
_local3 = new PipeRoll(_arg2, 83.25, 418.1875);
_arg1.push(_local3);
_local3 = new VertPipeRoll(_arg2, 202.25, 270.1875);
_arg1.push(_local3);
_local3 = new VertPipeRoll(_arg2, 202.625, 84.6875);
_arg1.push(_local3);
_local3 = new PipeRoll(_arg2, 362.625, 41.8125);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 538.625, 37.8125);
_arg1.push(_local3);
_local3 = new VertPipeRoll(_arg2, 646.625, 152.8125);
_arg1.push(_local3);
_local3 = new VertPipe(_arg2, 648.75, 283.875);
_arg1.push(_local3);
_local3 = new Tree2(_arg2, 458.8125, 573.0625);
_arg1.push(_local3);
_local3 = new Tree3(_arg2, 226.8125, 564.0625);
_arg1.push(_local3);
_local3 = new Tree1(_arg2, 158.375, 566.5625);
_arg1.push(_local3);
_local3 = new FloatObstacle(_arg2, 129.9375, 278.8125);
_arg1.push(_local3);
_local3 = new FloatObstacle(_arg2, 275.9375, 277.8125);
_arg1.push(_local3);
_local3 = new FloatObstacle(_arg2, 573.9375, 294.8125);
_arg1.push(_local3);
_local3 = new FloatObstacle(_arg2, 723.9375, 291.8125);
_arg1.push(_local3);
_local3 = new Pole(_arg2, 651.5625, 555.25);
_arg1.push(_local3);
_local3 = new PipeBig(_arg2, 774.8125, 425.4375);
_arg1.push(_local3);
_local3 = new FloatObstacle(_arg2, 433.5, 144.5625);
_arg1.push(_local3);
}
function createLevel25(_arg1:Array, _arg2:GameScene):void{
var _local3:GameObject;
_local3 = new Rock2(_arg2, 363.5625, 538.25);
_arg1.push(_local3);
_local3 = new Tree2(_arg2, 305.5625, 576.25);
_arg1.push(_local3);
_local3 = new Tree3(_arg2, 250.5625, 571.25);
_arg1.push(_local3);
_local3 = new VertPipeBig(_arg2, 358.5625, 355.25);
_arg1.push(_local3);
_local3 = new VertPipeRoll(_arg2, 357.5625, 272.25);
_arg1.push(_local3);
_local3 = new VertPipe(_arg2, 165.375, 158.4375);
_arg1.push(_local3);
_local3 = new VertPipeBigRoll(_arg2, 166.375, 245.4375);
_arg1.push(_local3);
_local3 = new FloatObstacle(_arg2, 107.25, 108.1875);
_arg1.push(_local3);
_local3 = new PipeBig(_arg2, 531.3125, 392.6875);
_arg1.push(_local3);
_local3 = new PipeBig(_arg2, 614.3125, 392.6875);
_arg1.push(_local3);
_local3 = new VertPipeBig(_arg2, 731.3125, 327.6875);
_arg1.push(_local3);
_local3 = new PipeBig(_arg2, 820.3125, 98.75);
_arg1.push(_local3);
_local3 = new VertPipeRoll(_arg2, 744.3125, 207.75);
_arg1.push(_local3);
_local3 = new FloatObstacle(_arg2, 717.125, 439.5);
_arg1.push(_local3);
_local3 = new FloatObstacle(_arg2, 738.375, 65.375);
_arg1.push(_local3);
_local3 = new Tree2(_arg2, 636.3125, 574.75);
_arg1.push(_local3);
_local3 = new Tree3(_arg2, 584.3125, 567.75);
_arg1.push(_local3);
_local3 = new Tree1(_arg2, 508.3125, 573.75);
_arg1.push(_local3);
_local3 = new Tree1(_arg2, 812.875, 569.0625);
_arg1.push(_local3);
}
function createLevel26(_arg1:Array, _arg2:GameScene):void{
var _local3:GameObject;
_local3 = new PipeBig(_arg2, 57.4375, 493.4375);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 139.4375, 494.4375);
_arg1.push(_local3);
_local3 = new PipeBigRoll(_arg2, 210.4375, 494.4375);
_arg1.push(_local3);
_local3 = new Rock1(_arg2, 345.4375, 503.4375);
_arg1.push(_local3);
_local3 = new FloatObstacle(_arg2, 208.4375, 375.4375);
_arg1.push(_local3);
_local3 = new VertPipeBig(_arg2, 283.25, 302.5);
_arg1.push(_local3);
_local3 = new VertPipeBig(_arg2, 309.25, 221.5);
_arg1.push(_local3);
_local3 = new VertPipeBig(_arg2, 341.25, 148.5);
_arg1.push(_local3);
_local3 = new PipeRoll(_arg2, 445.9375, 72.875);
_arg1.push(_local3);
_local3 = new VertPipeBigRoll(_arg2, 522.9375, 148.875);
_arg1.push(_local3);
_local3 = new VertPipeBigRoll(_arg2, 522.9375, 421.875);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 694.0625, 480.5);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 758.0625, 460.5);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 817.0625, 438.5);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 876.0625, 417.5);
_arg1.push(_local3);
_local3 = new FloatObstacle(_arg2, 457.25, 296.6875);
_arg1.push(_local3);
_local3 = new FloatObstacle(_arg2, 592.25, 297.6875);
_arg1.push(_local3);
_local3 = new Tree3(_arg2, 421.375, 567.0625);
_arg1.push(_local3);
_local3 = new Tree2(_arg2, 270.375, 585.0625);
_arg1.push(_local3);
_local3 = new Tree1(_arg2, 784.625, 572.875);
_arg1.push(_local3);
_local3 = new Tree3(_arg2, 724.625, 583.875);
_arg1.push(_local3);
_local3 = new Tree1(_arg2, -0.625, 577.5);
_arg1.push(_local3);
}
function createLevel27(_arg1:Array, _arg2:GameScene):void{
var _local3:GameObject;
_local3 = new Pipe(_arg2, 32.875, 292.75);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 96.875, 276.75);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 157.875, 261.75);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 252.875, 433.75);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 374.875, 471.75);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 510.875, 300.75);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 566.875, 274.75);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 629.375, 88.625);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 760.375, 120.625);
_arg1.push(_local3);
_local3 = new Pole(_arg2, 200.375, 556.0625);
_arg1.push(_local3);
_local3 = new Blimp(_arg2, 767.5625, 213.8125);
_arg1.push(_local3);
_local3 = new PipeRoll(_arg2, 314.625, 453.125);
_arg1.push(_local3);
_local3 = new PipeRoll(_arg2, 697.5, 105.25);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 449.875, 327.25);
_arg1.push(_local3);
_local3 = new Rock1(_arg2, 585, 504.4375);
_arg1.push(_local3);
_local3 = new Tree2(_arg2, 241, 582.4375);
_arg1.push(_local3);
_local3 = new Tree3(_arg2, 154.5, 578.0625);
_arg1.push(_local3);
_local3 = new Tree1(_arg2, 34.5, 570.0625);
_arg1.push(_local3);
}
function createLevel28(_arg1:Array, _arg2:GameScene):void{
var _local3:GameObject;
_local3 = new PipeRoll(_arg2, 86.6875, 448.5);
_arg1.push(_local3);
_local3 = new PipeRoll(_arg2, 304.5, 27.3125);
_arg1.push(_local3);
_local3 = new VertPipeRoll(_arg2, 410.875, 168.3125);
_arg1.push(_local3);
_local3 = new VertPipeRoll(_arg2, 414.875, 453.75);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 552.875, 488.75);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 202.875, 244.75);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 679.8125, 315.25);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 747.375, 85.3125);
_arg1.push(_local3);
_local3 = new Tree2(_arg2, 155.4375, 574.4375);
_arg1.push(_local3);
_local3 = new Tree2(_arg2, 666.4375, 571.4375);
_arg1.push(_local3);
_local3 = new Tree3(_arg2, 634.4375, 561.4375);
_arg1.push(_local3);
_local3 = new Tree1(_arg2, 291.4375, 565.4375);
_arg1.push(_local3);
_local3 = new Pole(_arg2, 224.4375, 551.4375);
_arg1.push(_local3);
_local3 = new FloatObstacle(_arg2, 462.0625, 59.375);
_arg1.push(_local3);
_local3 = new FloatObstacle(_arg2, 303.5, 160.1875);
_arg1.push(_local3);
_local3 = new FloatObstacle(_arg2, 766.75, 228.9375);
_arg1.push(_local3);
}
function createLevel29(_arg1:Array, _arg2:GameScene):void{
var _local3:GameObject;
_local3 = new BonusBalloon(_arg2, 270.75, 287.125);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 528.75, 286.125);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 328.75, 320.125);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 472.75, 319.125);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 405.75, 329.125);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 268.4375, 163.9375);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 325.4375, 128.9375);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 402.4375, 114.9375);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 475.4375, 131.9375);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 541.4375, 166.9375);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 169.1875, 227.25);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 123.1875, 259.25);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 78.1875, 290.25);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 32.1875, 324.25);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 614.25, 235.8125);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 656.25, 265.8125);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 697.25, 296.8125);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 740.25, 331.8125);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 351.5, 441.3125);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 404.5, 442.3125);
_arg1.push(_local3);
_local3 = new BonusBalloon(_arg2, 457.5, 442.3125);
_arg1.push(_local3);
}
public function getClasses(_arg1:int):Array{
var _local2:Array = new Array();
if (_arg1 == 0){
_local2.push(Pole);
_local2.push(PipeBig);
_local2.push(PipeBig);
_local2.push(PipeBig);
_local2.push(PipeBig);
_local2.push(Tree2);
_local2.push(Tree1);
_local2.push(Tree2);
};
if (_arg1 == 1){
_local2.push(PipeBig);
_local2.push(PipeBig);
_local2.push(PipeBig);
_local2.push(Tree2);
_local2.push(Tree3);
_local2.push(Tree1);
_local2.push(PipeBig);
_local2.push(PipeBig);
_local2.push(PipeBig);
};
if (_arg1 == 2){
_local2.push(Pole);
_local2.push(Pole);
_local2.push(Tree3);
_local2.push(Tree1);
_local2.push(Tree2);
_local2.push(Tree1);
_local2.push(Tree3);
_local2.push(VertPipeBig);
_local2.push(VertPipeBig);
_local2.push(VertPipeBig);
};
if (_arg1 == 3){
_local2.push(Tree2);
_local2.push(Tree3);
_local2.push(VertPipeBig);
_local2.push(VertPipeBig);
_local2.push(PipeBig);
_local2.push(PipeBig);
_local2.push(Tree1);
_local2.push(Tree1);
_local2.push(Tree2);
_local2.push(Tree3);
_local2.push(Tree1);
_local2.push(PipeBig);
_local2.push(PipeBig);
_local2.push(PipeBig);
_local2.push(PipeBig);
};
if (_arg1 == 4){
_local2.push(PipeBig);
_local2.push(PipeBig);
_local2.push(PipeBig);
_local2.push(PipeBig);
_local2.push(PipeBig);
_local2.push(PipeBig);
_local2.push(Pole);
_local2.push(FloatObstacle);
_local2.push(Tree2);
_local2.push(Tree2);
_local2.push(Tree1);
_local2.push(Tree3);
_local2.push(Tree3);
_local2.push(PipeBig);
_local2.push(PipeBig);
_local2.push(FloatObstacle);
};
if (_arg1 == 5){
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(Tree3);
_local2.push(Tree2);
_local2.push(Tree1);
_local2.push(Tree2);
};
if (_arg1 == 6){
_local2.push(FloatObstacle);
_local2.push(FloatObstacle);
_local2.push(VertPipeBig);
_local2.push(VertPipeBig);
_local2.push(Pole);
_local2.push(Tree3);
_local2.push(Tree1);
_local2.push(Tree3);
_local2.push(PipeBig);
_local2.push(Tree3);
_local2.push(Tree1);
_local2.push(PipeBigRoll);
_local2.push(PipeBig);
};
if (_arg1 == 7){
_local2.push(Tree2);
_local2.push(Tree3);
_local2.push(Tree1);
_local2.push(Tree2);
_local2.push(FloatObstacle);
_local2.push(VertPipeBig);
_local2.push(PipeBig);
_local2.push(PipeBig);
_local2.push(VertPipeBig);
_local2.push(PipeBigRoll);
_local2.push(PipeBigRoll);
_local2.push(PipeBig);
};
if (_arg1 == 8){
_local2.push(Blimp);
_local2.push(PipeBig);
_local2.push(Tree1);
_local2.push(Tree2);
_local2.push(Tree3);
_local2.push(VertPipeBig);
_local2.push(VertPipeBig);
_local2.push(VertPipeBig);
_local2.push(VertPipeBig);
_local2.push(FloatObstacle);
_local2.push(Tree2);
_local2.push(Tree1);
_local2.push(Tree3);
_local2.push(Tree3);
_local2.push(PipeBig);
_local2.push(PipeBig);
_local2.push(PipeBigRoll);
};
if (_arg1 == 9){
_local2.push(Tree1);
_local2.push(Tree1);
_local2.push(Tree1);
_local2.push(Tree2);
_local2.push(Tree3);
_local2.push(Tree2);
_local2.push(Tree1);
_local2.push(Tree2);
_local2.push(Tree3);
_local2.push(Rock1);
_local2.push(Rock2);
_local2.push(PipeBig);
_local2.push(Tree3);
_local2.push(Tree1);
_local2.push(VertPipeBig);
_local2.push(Rock2);
_local2.push(PipeBig);
_local2.push(Blimp);
_local2.push(FloatObstacle);
_local2.push(PipeBig);
_local2.push(PipeBig);
_local2.push(PipeBig);
_local2.push(VertPipeBigRoll);
};
if (_arg1 == 10){
_local2.push(Rock1);
_local2.push(PipeBig);
_local2.push(PipeBig);
_local2.push(PipeBig);
_local2.push(FloatObstacle);
_local2.push(FloatObstacle);
_local2.push(Tree2);
_local2.push(Tree3);
_local2.push(Tree1);
_local2.push(Pole);
_local2.push(Rock2);
_local2.push(Tree2);
_local2.push(Tree1);
_local2.push(Tree3);
_local2.push(PipeBig);
_local2.push(PipeBig);
_local2.push(PipeBig);
_local2.push(PipeBig);
_local2.push(PipeBigRoll);
};
if (_arg1 == 11){
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(Rock2);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
};
if (_arg1 == 12){
_local2.push(PipeBig);
_local2.push(Blimp);
_local2.push(Rock1);
_local2.push(Rock2);
_local2.push(Tree1);
_local2.push(Tree3);
_local2.push(Tree2);
_local2.push(PipeBig);
_local2.push(PipeBig);
_local2.push(PipeBig);
_local2.push(VertPipeBig);
_local2.push(FloatObstacle);
_local2.push(FloatObstacle);
_local2.push(FloatObstacle);
_local2.push(FloatObstacle);
_local2.push(Tree2);
_local2.push(Tree1);
_local2.push(VertPipeBigRoll);
};
if (_arg1 == 13){
_local2.push(Pipe);
_local2.push(Pipe);
_local2.push(Pipe);
_local2.push(Pipe);
_local2.push(Tree3);
_local2.push(Tree2);
_local2.push(Blimp);
_local2.push(Blimp);
_local2.push(Pole);
_local2.push(PipeBig);
_local2.push(Tree3);
_local2.push(Tree1);
_local2.push(Tree2);
_local2.push(Tree3);
_local2.push(Tree1);
_local2.push(Tree2);
_local2.push(Tree1);
_local2.push(Tree2);
_local2.push(VertPipeBigRoll);
_local2.push(PipeBigRoll);
};
if (_arg1 == 14){
_local2.push(Pipe);
_local2.push(Pipe);
_local2.push(VertPipeBig);
_local2.push(VertPipeBig);
_local2.push(Pipe);
_local2.push(Pipe);
_local2.push(Tree3);
_local2.push(Tree2);
_local2.push(Tree2);
_local2.push(Tree1);
_local2.push(Tree3);
_local2.push(Tree1);
_local2.push(Tree2);
_local2.push(VertPipeRoll);
_local2.push(PipeRoll);
_local2.push(Rock2);
};
if (_arg1 == 15){
_local2.push(Pole);
_local2.push(FloatObstacle);
_local2.push(Pipe);
_local2.push(Pole);
_local2.push(FloatObstacle);
_local2.push(Pipe);
_local2.push(FloatObstacle);
_local2.push(Pipe);
_local2.push(Tree2);
_local2.push(Tree3);
_local2.push(Tree2);
_local2.push(Tree3);
_local2.push(Tree1);
_local2.push(Tree2);
_local2.push(VertPipe);
_local2.push(Blimp);
_local2.push(PipeBigRoll);
_local2.push(VertPipeRoll);
};
if (_arg1 == 16){
_local2.push(VertPipe);
_local2.push(VertPipe);
_local2.push(Pipe);
_local2.push(Pole);
_local2.push(Pole);
_local2.push(FloatObstacle);
_local2.push(Tree2);
_local2.push(Tree3);
_local2.push(Tree1);
_local2.push(Tree1);
_local2.push(Pipe);
_local2.push(Pipe);
_local2.push(FloatObstacle);
_local2.push(PipeRoll);
};
if (_arg1 == 17){
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(Pole);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
};
if (_arg1 == 18){
_local2.push(Pipe);
_local2.push(Pipe);
_local2.push(Pipe);
_local2.push(VertPipe);
_local2.push(VertPipe);
_local2.push(Rock1);
_local2.push(Tree2);
_local2.push(Tree1);
_local2.push(Tree3);
_local2.push(Tree3);
_local2.push(Tree1);
_local2.push(Tree1);
_local2.push(FloatObstacle);
_local2.push(FloatObstacle);
_local2.push(Pipe);
_local2.push(VertPipeRoll);
_local2.push(FloatObstacle);
};
if (_arg1 == 19){
_local2.push(Tree1);
_local2.push(Tree3);
_local2.push(Tree2);
_local2.push(Pipe);
_local2.push(Tree2);
_local2.push(Tree3);
_local2.push(Rock2);
_local2.push(Tree1);
_local2.push(Pipe);
_local2.push(FloatObstacle);
_local2.push(Pole);
_local2.push(Pipe);
_local2.push(Pipe);
_local2.push(FloatObstacle);
_local2.push(PipeRoll);
_local2.push(PipeRoll);
_local2.push(PipeRoll);
};
if (_arg1 == 20){
_local2.push(Pipe);
_local2.push(Pipe);
_local2.push(Pipe);
_local2.push(VertPipe);
_local2.push(VertPipe);
_local2.push(Pipe);
_local2.push(Pipe);
_local2.push(FloatObstacle);
_local2.push(FloatObstacle);
_local2.push(Pole);
_local2.push(Tree2);
_local2.push(Tree3);
_local2.push(Rock1);
_local2.push(Tree3);
_local2.push(Tree1);
_local2.push(Tree3);
_local2.push(Tree1);
_local2.push(VertPipeRoll);
_local2.push(VertPipeRoll);
};
if (_arg1 == 21){
_local2.push(VertPipe);
_local2.push(VertPipe);
_local2.push(FloatObstacle);
_local2.push(Pole);
_local2.push(Rock2);
_local2.push(Tree3);
_local2.push(Tree1);
_local2.push(Tree1);
_local2.push(Tree3);
_local2.push(Tree2);
_local2.push(Pipe);
_local2.push(Pipe);
_local2.push(FloatObstacle);
_local2.push(VertPipe);
_local2.push(VertPipe);
_local2.push(VertPipe);
_local2.push(VertPipeBigRoll);
};
if (_arg1 == 22){
_local2.push(Blimp);
_local2.push(Tree2);
_local2.push(Tree3);
_local2.push(Tree1);
_local2.push(Tree2);
_local2.push(Tree3);
_local2.push(Rock2);
_local2.push(Tree2);
_local2.push(Tree1);
_local2.push(PipeRoll);
_local2.push(Pipe);
_local2.push(Pipe);
_local2.push(Pipe);
_local2.push(Blimp);
_local2.push(PipeBigRoll);
_local2.push(PipeBigRoll);
_local2.push(PipeBigRoll);
};
if (_arg1 == 23){
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
};
if (_arg1 == 24){
_local2.push(PipeRoll);
_local2.push(VertPipeRoll);
_local2.push(VertPipeRoll);
_local2.push(PipeRoll);
_local2.push(Pipe);
_local2.push(VertPipeRoll);
_local2.push(VertPipe);
_local2.push(Tree2);
_local2.push(Tree3);
_local2.push(Tree1);
_local2.push(FloatObstacle);
_local2.push(FloatObstacle);
_local2.push(FloatObstacle);
_local2.push(FloatObstacle);
_local2.push(Pole);
_local2.push(PipeBig);
_local2.push(FloatObstacle);
};
if (_arg1 == 25){
_local2.push(Rock2);
_local2.push(Tree2);
_local2.push(Tree3);
_local2.push(VertPipeBig);
_local2.push(VertPipeRoll);
_local2.push(VertPipe);
_local2.push(VertPipeBigRoll);
_local2.push(FloatObstacle);
_local2.push(PipeBig);
_local2.push(PipeBig);
_local2.push(VertPipeBig);
_local2.push(PipeBig);
_local2.push(VertPipeRoll);
_local2.push(FloatObstacle);
_local2.push(FloatObstacle);
_local2.push(Tree2);
_local2.push(Tree3);
_local2.push(Tree1);
_local2.push(Tree1);
};
if (_arg1 == 26){
_local2.push(PipeBig);
_local2.push(Pipe);
_local2.push(PipeBigRoll);
_local2.push(Rock1);
_local2.push(FloatObstacle);
_local2.push(VertPipeBig);
_local2.push(VertPipeBig);
_local2.push(VertPipeBig);
_local2.push(PipeRoll);
_local2.push(VertPipeBigRoll);
_local2.push(VertPipeBigRoll);
_local2.push(Pipe);
_local2.push(Pipe);
_local2.push(Pipe);
_local2.push(Pipe);
_local2.push(FloatObstacle);
_local2.push(FloatObstacle);
_local2.push(Tree3);
_local2.push(Tree2);
_local2.push(Tree1);
_local2.push(Tree3);
_local2.push(Tree1);
};
if (_arg1 == 27){
_local2.push(Pipe);
_local2.push(Pipe);
_local2.push(Pipe);
_local2.push(Pipe);
_local2.push(Pipe);
_local2.push(Pipe);
_local2.push(Pipe);
_local2.push(Pipe);
_local2.push(Pipe);
_local2.push(Pole);
_local2.push(Blimp);
_local2.push(PipeRoll);
_local2.push(PipeRoll);
_local2.push(Pipe);
_local2.push(Rock1);
_local2.push(Tree2);
_local2.push(Tree3);
_local2.push(Tree1);
};
if (_arg1 == 28){
_local2.push(PipeRoll);
_local2.push(PipeRoll);
_local2.push(VertPipeRoll);
_local2.push(VertPipeRoll);
_local2.push(Pipe);
_local2.push(Pipe);
_local2.push(Pipe);
_local2.push(Pipe);
_local2.push(Tree2);
_local2.push(Tree2);
_local2.push(Tree3);
_local2.push(Tree1);
_local2.push(Pole);
_local2.push(FloatObstacle);
_local2.push(FloatObstacle);
_local2.push(FloatObstacle);
};
if (_arg1 == 29){
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
};
if (_arg1 == 30){
_local2.push(PipeBigRoll);
_local2.push(VertPipeBig);
_local2.push(VertPipe);
_local2.push(VertPipe);
_local2.push(PipeRoll);
_local2.push(VertPipeRoll);
_local2.push(VertPipe);
_local2.push(VertPipe);
_local2.push(VertPipe);
_local2.push(PipeRoll);
_local2.push(Pipe);
_local2.push(Pipe);
_local2.push(Pipe);
_local2.push(Tree1);
_local2.push(Tree2);
_local2.push(Tree3);
_local2.push(Tree1);
_local2.push(Pole);
_local2.push(Tree2);
_local2.push(FloatObstacle);
_local2.push(FloatObstacle);
};
if (_arg1 == 31){
_local2.push(PipeRoll);
_local2.push(VertPipeRoll);
_local2.push(Pole);
_local2.push(Pipe);
_local2.push(Rock1);
_local2.push(Pipe);
_local2.push(PipeBig);
_local2.push(VertPipeRoll);
_local2.push(VertPipeRoll);
_local2.push(VertPipeRoll);
_local2.push(Blimp);
_local2.push(Tree2);
_local2.push(Tree3);
_local2.push(Tree2);
_local2.push(Tree3);
};
if (_arg1 == 32){
_local2.push(PipeRoll);
_local2.push(Pipe);
_local2.push(PipeRoll);
_local2.push(Pipe);
_local2.push(VertPipe);
_local2.push(VertPipe);
_local2.push(PipeRoll);
_local2.push(Pipe);
_local2.push(VertPipe);
_local2.push(VertPipe);
_local2.push(Tree2);
_local2.push(Tree3);
_local2.push(Tree1);
_local2.push(Tree2);
_local2.push(Tree3);
_local2.push(FloatObstacle);
_local2.push(FloatObstacle);
};
if (_arg1 == 33){
_local2.push(Pipe);
_local2.push(Pipe);
_local2.push(Pipe);
_local2.push(Pipe);
_local2.push(Pipe);
_local2.push(Pipe);
_local2.push(Pipe);
_local2.push(VertPipe);
_local2.push(VertPipe);
_local2.push(Pipe);
_local2.push(Pipe);
_local2.push(Pipe);
_local2.push(Pole);
_local2.push(Pipe);
_local2.push(Pipe);
_local2.push(Pipe);
_local2.push(PipeRoll);
_local2.push(PipeRoll);
_local2.push(FloatObstacle);
_local2.push(FloatObstacle);
_local2.push(Tree2);
_local2.push(Tree3);
_local2.push(Tree2);
_local2.push(Tree1);
};
if (_arg1 == 34){
_local2.push(PipeBig);
_local2.push(PipeBig);
_local2.push(PipeBig);
_local2.push(PipeRoll);
_local2.push(Pipe);
_local2.push(Pipe);
_local2.push(VertPipeRoll);
_local2.push(VertPipe);
_local2.push(VertPipe);
_local2.push(Pole);
_local2.push(Pipe);
_local2.push(VertPipe);
_local2.push(Pipe);
_local2.push(VertPipe);
_local2.push(Tree2);
_local2.push(Tree3);
_local2.push(Tree1);
_local2.push(Tree3);
_local2.push(FloatObstacle);
_local2.push(FloatObstacle);
_local2.push(FloatObstacle);
};
if (_arg1 == 35){
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
};
if (_arg1 == 36){
_local2.push(Pipe);
_local2.push(VertPipe);
_local2.push(Pipe);
_local2.push(VertPipeRoll);
_local2.push(PipeBig);
_local2.push(Pipe);
_local2.push(Pipe);
_local2.push(Pipe);
_local2.push(Pipe);
_local2.push(PipeRoll);
_local2.push(PipeRoll);
_local2.push(Tree2);
_local2.push(Tree2);
_local2.push(Tree3);
_local2.push(Tree3);
_local2.push(Tree1);
_local2.push(Tree1);
_local2.push(FloatObstacle);
_local2.push(FloatObstacle);
_local2.push(FloatObstacle);
_local2.push(FloatObstacle);
_local2.push(Rock2);
_local2.push(Tree2);
};
if (_arg1 == 37){
_local2.push(Pipe);
_local2.push(Pipe);
_local2.push(Pipe);
_local2.push(FloatObstacle);
_local2.push(PipeRoll);
_local2.push(FloatObstacle);
_local2.push(PipeRoll);
_local2.push(Pipe);
_local2.push(Pipe);
_local2.push(VertPipeRoll);
_local2.push(VertPipe);
_local2.push(VertPipe);
_local2.push(PipeRoll);
_local2.push(Pipe);
_local2.push(Pipe);
_local2.push(FloatObstacle);
_local2.push(FloatObstacle);
_local2.push(FloatObstacle);
_local2.push(Tree3);
_local2.push(Tree2);
_local2.push(Tree3);
_local2.push(Tree1);
_local2.push(Tree2);
};
if (_arg1 == 38){
_local2.push(Rock1);
_local2.push(Rock2);
_local2.push(Tree3);
_local2.push(Rock1);
_local2.push(Tree3);
_local2.push(Tree3);
_local2.push(Tree2);
_local2.push(Tree3);
_local2.push(Pipe);
_local2.push(Pipe);
_local2.push(PipeRoll);
_local2.push(Pipe);
_local2.push(Pipe);
_local2.push(Pipe);
_local2.push(Pipe);
_local2.push(VertPipeRoll);
_local2.push(VertPipe);
_local2.push(VertPipe);
_local2.push(VertPipe);
_local2.push(Blimp);
_local2.push(Pipe);
_local2.push(VertPipeRoll);
_local2.push(Pipe);
_local2.push(FloatObstacle);
_local2.push(FloatObstacle);
};
if (_arg1 == 39){
_local2.push(PipeBig);
_local2.push(Blimp);
_local2.push(Blimp);
_local2.push(FloatObstacle);
_local2.push(PipeRoll);
_local2.push(Pipe);
_local2.push(Pipe);
_local2.push(Pipe);
_local2.push(Pipe);
_local2.push(Pipe);
_local2.push(Pipe);
_local2.push(FloatObstacle);
_local2.push(FloatObstacle);
_local2.push(PipeBig);
_local2.push(Tree2);
_local2.push(Tree3);
_local2.push(Tree3);
_local2.push(Tree1);
_local2.push(Tree1);
_local2.push(VertPipeRoll);
_local2.push(VertPipeRoll);
_local2.push(VertPipeRoll);
_local2.push(VertPipeRoll);
};
if (_arg1 == 40){
_local2.push(VertPipeRoll);
_local2.push(VertPipeRoll);
_local2.push(Pipe);
_local2.push(Pipe);
_local2.push(Pipe);
_local2.push(Pipe);
_local2.push(FloatObstacle);
_local2.push(FloatObstacle);
_local2.push(FloatObstacle);
_local2.push(Pipe);
_local2.push(Pipe);
_local2.push(PipeRoll);
_local2.push(Tree2);
_local2.push(Tree3);
_local2.push(Tree1);
_local2.push(Tree2);
_local2.push(Tree3);
_local2.push(Tree3);
_local2.push(Blimp);
_local2.push(VertPipe);
_local2.push(VertPipe);
_local2.push(Rock2);
};
if (_arg1 == 41){
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
_local2.push(BonusBalloon);
};
return (_local2);
}
function createLevel32(_arg1:Array, _arg2:GameScene):void{
var _local3:GameObject;
_local3 = new PipeRoll(_arg2, 150.3125, 386.3125);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 297.3125, 424.3125);
_arg1.push(_local3);
_local3 = new PipeRoll(_arg2, 462.3125, 449.3125);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 629.3125, 425.3125);
_arg1.push(_local3);
_local3 = new VertPipe(_arg2, 691.3125, 355.3125);
_arg1.push(_local3);
_local3 = new VertPipe(_arg2, 692.1875, 288.375);
_arg1.push(_local3);
_local3 = new PipeRoll(_arg2, 746.1875, 215.375);
_arg1.push(_local3);
_local3 = new Pipe(_arg2, 800.1875, 204.375);
_arg1.push(_local3);
_local3 = new VertPipe(_arg2, 73, 309.6875);
_arg1.push(_local3);
_local3 = new VertPipe(_arg2, 72, 250.6875);
_arg1.push(_local3);
_local3 = new Tree2(_arg2, 72.3125, 577.625);
_arg1.push(_local3);
_local3 = new Tree3(_arg2, 125.3125, 568.625);
_arg1.push(_local3);
_local3 = new Tree1(_arg2, 488.3125, 567.625);
_arg1.push(_local3);
_local3 = new Tree2(_arg2, 533.3125, 578.625);
_arg1.push(_local3);
_local3 = new Tree3(_arg2, 760.3125, 563.625);
_arg1.push(_local3);
_local3 = new FloatObstacle(_arg2, 51.25, 456.0625);
_arg1.push(_local3);
_local3 = new FloatObstacle(_arg2, 706.0625, 466.875);
_arg1.push(_local3);
}
}
}//package Levels
Section 262
//FlexIntroTest (Miniclip.FlexIntroTest)
package Miniclip {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import com.miniclip.components.*;
public class FlexIntroTest extends MovieClip {
public var ass:Class;
private var intro:GameIntroComponent;
public static var logoSmall:Class = FlexIntroTest_logoSmall;
public function FlexIntroTest(){
intro = new GameIntroComponent();
intro.addEventListener(Event.COMPLETE, introComplete, false, 0, true);
addChild(intro);
}
private function introComplete(_arg1:Event):void{
var _local3:Class;
var _local4:Object;
removeChild(intro);
intro = null;
var _local2:String = root.loaderInfo.url.split("/")[2];
if ((((_local2 == "miniclip.com")) || ((_local2 == "www.miniclip.com")))){
nextFrame();
_local3 = Class(getDefinitionByName("Main"));
if (_local3){
_local4 = new (_local3);
addChild((_local4 as DisplayObject));
};
};
}
}
}//package Miniclip
Section 263
//FlexIntroTest_logoSmall (Miniclip.FlexIntroTest_logoSmall)
package Miniclip {
import mx.core.*;
public class FlexIntroTest_logoSmall extends BitmapAsset {
}
}//package Miniclip
Section 264
//HighscoresLoader (Miniclip.HighscoresLoader)
package Miniclip {
import flash.events.*;
import flash.display.*;
import flash.net.*;
public class HighscoresLoader extends EventDispatcher {
private static const OFFSITE_SWF:String = "highscores_offsite.swf";
private static const ALLOWED_DOMAINS:Array = [".miniclip.com"];
private static const HIGHSCORESBOX_SWF:String = "highscoresbox_v3.swf";
public static var ldr:Loader;
private static var URL_PREFIX:String;
public static var target:DisplayObjectContainer;
public static var score:Number;
private static var localConnectionID:String;
private static var firstrun:Boolean = true;
private static var objLocalConnection:LocalConnection;
private static var singleInstance:HighscoresLoader;
public function HighScoresLoader(){
}
protected static function buildQueryString():String{
var _local3:String;
var _local1 = "?";
var _local2 = "";
for (_local3 in target.stage.loaderInfo.parameters) {
_local1 = (_local1 + (((_local2 + _local3) + "=") + escape(target.stage.loaderInfo.parameters[_local3])));
_local2 = "&";
};
_local1 = (_local1 + ("&mc_lcid=" + localConnectionID));
return (_local1);
}
private static function handleTargetRemoved(_arg1:Event):void{
target = null;
}
protected static function validateDomain():Boolean{
var _local4:Number;
var _local1:Boolean;
var _local2:String = target.stage.loaderInfo.url;
var _local3:String = getDomainName(_local2);
if (_local3 != ""){
_local4 = 0;
while (_local4 < ALLOWED_DOMAINS.length) {
if (_local3.indexOf(ALLOWED_DOMAINS[_local4]) >= (_local3.length - ALLOWED_DOMAINS[_local4].length)){
_local1 = true;
};
_local4++;
};
};
if (getDomainName(_local2).indexOf("/swfcontent/webmastergames/") != -1){
_local1 = false;
};
return (_local1);
}
public static function remove():void{
target.removeChild(ldr);
}
public static function hsbready():void{
sendScore();
}
private static function initialize():void{
var _local1:String;
objLocalConnection = new LocalConnection();
objLocalConnection.client = HighscoresLoader;
objLocalConnection.allowDomain("www.miniclip.com", "cms.miniclip.com", "developers.miniclip.com");
objLocalConnection.connect((localConnectionID + "back"));
if (validateDomain()){
_local1 = buildQueryString();
ldr.load(new URLRequest(((URL_PREFIX + HIGHSCORESBOX_SWF) + _local1)));
} else {
if (target.loaderInfo.parameters["mc_gamename"] != undefined){
_local1 = (("?msg=Play " + target.loaderInfo.parameters["mc_gamename"]) + " on Miniclip.com");
} else {
_local1 = "?msg=Play this game on Miniclip.com";
};
ldr.load(new URLRequest(((URL_PREFIX + OFFSITE_SWF) + _local1)));
};
}
public static function hsbhidden():void{
singleInstance.dispatchEvent(new Event("close"));
}
protected static function getDomainName(_arg1:String):String{
var _local4:String;
var _local5:Array;
var _local2 = "";
var _local3:Number = _arg1.indexOf("://");
if (_local3 > 0){
_local4 = _arg1.substr((_local3 + 3));
_local5 = _local4.split("/");
if (_local5.length > 0){
_local2 = _local5[0];
};
};
return (_local2);
}
private static function onLCStatus(_arg1:Event):void{
}
public static function start(_arg1:Stage, _arg2:Number=undefined):HighscoresLoader{
trace(("HighscoresLoader.start / score:" + _arg2));
URL_PREFIX = ((_arg1.loaderInfo.url.substring(0, 8))=="file:///") ? "http://www.miniclip.com/swfcontent/components/" : "/swfcontent/components/";
HighscoresLoader.score = (isNaN(_arg2)) ? undefined : Number(_arg2);
target = null;
if (target == null){
target = _arg1;
target.addEventListener(Event.REMOVED_FROM_STAGE, handleTargetRemoved);
if (firstrun){
singleInstance = new (HighscoresLoader);
localConnectionID = ("LC" + String(Math.floor((Math.random() * 1000000))));
ldr = new Loader();
target.addChild(ldr);
initialize();
} else {
target.addChild(ldr);
sendScore();
};
} else {
sendScore();
};
return (singleInstance);
}
public static function sendScore():void{
var _local1:LocalConnection = new LocalConnection();
_local1.addEventListener(StatusEvent.STATUS, onLCStatus);
_local1.send(localConnectionID, "setScore", score);
}
}
}//package Miniclip
Section 265
//BitmapAsset (mx.core.BitmapAsset)
package mx.core {
import flash.display.*;
public class BitmapAsset extends FlexBitmap implements IFlexAsset, IFlexDisplayObject {
mx_internal static const VERSION:String = "3.0.0.0";
public function BitmapAsset(_arg1:BitmapData=null, _arg2:String="auto", _arg3:Boolean=false){
super(_arg1, _arg2, _arg3);
}
public function get measuredWidth():Number{
if (bitmapData){
return (bitmapData.width);
};
return (0);
}
public function get measuredHeight():Number{
if (bitmapData){
return (bitmapData.height);
};
return (0);
}
public function setActualSize(_arg1:Number, _arg2:Number):void{
width = _arg1;
height = _arg2;
}
public function move(_arg1:Number, _arg2:Number):void{
this.x = _arg1;
this.y = _arg2;
}
}
}//package mx.core
Section 266
//ByteArrayAsset (mx.core.ByteArrayAsset)
package mx.core {
import flash.utils.*;
public class ByteArrayAsset extends ByteArray implements IFlexAsset {
mx_internal static const VERSION:String = "3.0.0.0";
}
}//package mx.core
Section 267
//EdgeMetrics (mx.core.EdgeMetrics)
package mx.core {
public class EdgeMetrics {
public var top:Number;
public var left:Number;
public var bottom:Number;
public var right:Number;
mx_internal static const VERSION:String = "3.0.0.0";
public static const EMPTY:EdgeMetrics = new EdgeMetrics(0, 0, 0, 0);
;
public function EdgeMetrics(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0){
this.left = _arg1;
this.top = _arg2;
this.right = _arg3;
this.bottom = _arg4;
}
public function clone():EdgeMetrics{
return (new EdgeMetrics(left, top, right, bottom));
}
}
}//package mx.core
Section 268
//FlexBitmap (mx.core.FlexBitmap)
package mx.core {
import flash.display.*;
import mx.utils.*;
public class FlexBitmap extends Bitmap {
mx_internal static const VERSION:String = "3.0.0.0";
public function FlexBitmap(_arg1:BitmapData=null, _arg2:String="auto", _arg3:Boolean=false){
var bitmapData = _arg1;
var pixelSnapping = _arg2;
var smoothing = _arg3;
super(bitmapData, pixelSnapping, smoothing);
try {
name = NameUtil.createUniqueName(this);
} catch(e:Error) {
};
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 269
//FlexMovieClip (mx.core.FlexMovieClip)
package mx.core {
import flash.display.*;
import mx.utils.*;
public class FlexMovieClip extends MovieClip {
mx_internal static const VERSION:String = "3.0.0.0";
public function FlexMovieClip(){
super();
try {
name = NameUtil.createUniqueName(this);
} catch(e:Error) {
};
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 270
//FontAsset (mx.core.FontAsset)
package mx.core {
import flash.text.*;
public class FontAsset extends Font implements IFlexAsset {
mx_internal static const VERSION:String = "3.0.0.0";
}
}//package mx.core
Section 271
//IBorder (mx.core.IBorder)
package mx.core {
public interface IBorder {
function get borderMetrics():EdgeMetrics;
}
}//package mx.core
Section 272
//IFlexAsset (mx.core.IFlexAsset)
package mx.core {
public interface IFlexAsset {
}
}//package mx.core
Section 273
//IFlexDisplayObject (mx.core.IFlexDisplayObject)
package mx.core {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.accessibility.*;
public interface IFlexDisplayObject extends IBitmapDrawable, IEventDispatcher {
function get visible():Boolean;
function get rotation():Number;
function localToGlobal(_arg1:Point):Point;
function get name():String;
function set width(_arg1:Number):void;
function get measuredHeight():Number;
function get blendMode():String;
function get scale9Grid():Rectangle;
function set name(_arg1:String):void;
function set scaleX(_arg1:Number):void;
function set scaleY(_arg1:Number):void;
function get measuredWidth():Number;
function get accessibilityProperties():AccessibilityProperties;
function set scrollRect(_arg1:Rectangle):void;
function get cacheAsBitmap():Boolean;
function globalToLocal(_arg1:Point):Point;
function get height():Number;
function set blendMode(_arg1:String):void;
function get parent():DisplayObjectContainer;
function getBounds(_arg1:DisplayObject):Rectangle;
function get opaqueBackground():Object;
function set scale9Grid(_arg1:Rectangle):void;
function setActualSize(_arg1:Number, _arg2:Number):void;
function set alpha(_arg1:Number):void;
function set accessibilityProperties(_arg1:AccessibilityProperties):void;
function get width():Number;
function hitTestPoint(_arg1:Number, _arg2:Number, _arg3:Boolean=false):Boolean;
function set cacheAsBitmap(_arg1:Boolean):void;
function get scaleX():Number;
function get scaleY():Number;
function get scrollRect():Rectangle;
function get mouseX():Number;
function get mouseY():Number;
function set height(_arg1:Number):void;
function set mask(_arg1:DisplayObject):void;
function getRect(_arg1:DisplayObject):Rectangle;
function get alpha():Number;
function set transform(_arg1:Transform):void;
function move(_arg1:Number, _arg2:Number):void;
function get loaderInfo():LoaderInfo;
function get root():DisplayObject;
function hitTestObject(_arg1:DisplayObject):Boolean;
function set opaqueBackground(_arg1:Object):void;
function set visible(_arg1:Boolean):void;
function get mask():DisplayObject;
function set x(_arg1:Number):void;
function set y(_arg1:Number):void;
function get transform():Transform;
function set filters(_arg1:Array):void;
function get x():Number;
function get y():Number;
function get filters():Array;
function set rotation(_arg1:Number):void;
function get stage():Stage;
}
}//package mx.core
Section 274
//IRepeaterClient (mx.core.IRepeaterClient)
package mx.core {
public interface IRepeaterClient {
function get instanceIndices():Array;
function set instanceIndices(_arg1:Array):void;
function get isDocument():Boolean;
function set repeaters(_arg1:Array):void;
function initializeRepeaterArrays(_arg1:IRepeaterClient):void;
function get repeaters():Array;
function set repeaterIndices(_arg1:Array):void;
function get repeaterIndices():Array;
}
}//package mx.core
Section 275
//MovieClipAsset (mx.core.MovieClipAsset)
package mx.core {
public class MovieClipAsset extends FlexMovieClip implements IFlexAsset, IFlexDisplayObject, IBorder {
private var _measuredHeight:Number;
private var _measuredWidth:Number;
mx_internal static const VERSION:String = "3.0.0.0";
public function MovieClipAsset(){
_measuredWidth = width;
_measuredHeight = height;
}
public function get measuredWidth():Number{
return (_measuredWidth);
}
public function get measuredHeight():Number{
return (_measuredHeight);
}
public function setActualSize(_arg1:Number, _arg2:Number):void{
width = _arg1;
height = _arg2;
}
public function move(_arg1:Number, _arg2:Number):void{
this.x = _arg1;
this.y = _arg2;
}
public function get borderMetrics():EdgeMetrics{
if (scale9Grid == null){
return (EdgeMetrics.EMPTY);
};
return (new EdgeMetrics(scale9Grid.left, scale9Grid.top, Math.ceil((measuredWidth - scale9Grid.right)), Math.ceil((measuredHeight - scale9Grid.bottom))));
}
}
}//package mx.core
Section 276
//MovieClipLoaderAsset (mx.core.MovieClipLoaderAsset)
package mx.core {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.system.*;
public class MovieClipLoaderAsset extends MovieClipAsset implements IFlexAsset, IFlexDisplayObject {
protected var initialHeight:Number;// = 0
private var loader:Loader;// = null
private var initialized:Boolean;// = false
protected var initialWidth:Number;// = 0
private var requestedHeight:Number;
private var requestedWidth:Number;
mx_internal static const VERSION:String = "3.0.0.0";
public function MovieClipLoaderAsset(){
var _local1:LoaderContext = new LoaderContext();
_local1.applicationDomain = new ApplicationDomain(ApplicationDomain.currentDomain);
if (("allowLoadBytesCodeExecution" in _local1)){
_local1["allowLoadBytesCodeExecution"] = true;
};
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
loader.loadBytes(movieClipData, _local1);
addChild(loader);
}
override public function get width():Number{
if (!initialized){
return (initialWidth);
};
return (super.width);
}
override public function set width(_arg1:Number):void{
if (!initialized){
requestedWidth = _arg1;
} else {
loader.width = _arg1;
};
}
override public function get measuredHeight():Number{
return (initialHeight);
}
private function completeHandler(_arg1:Event):void{
initialized = true;
initialWidth = loader.width;
initialHeight = loader.height;
if (!isNaN(requestedWidth)){
loader.width = requestedWidth;
};
if (!isNaN(requestedHeight)){
loader.height = requestedHeight;
};
dispatchEvent(_arg1);
}
override public function set height(_arg1:Number):void{
if (!initialized){
requestedHeight = _arg1;
} else {
loader.height = _arg1;
};
}
override public function get measuredWidth():Number{
return (initialWidth);
}
override public function get height():Number{
if (!initialized){
return (initialHeight);
};
return (super.height);
}
public function get movieClipData():ByteArray{
return (null);
}
}
}//package mx.core
Section 277
//mx_internal (mx.core.mx_internal)
package mx.core {
public namespace mx_internal = "http://www.adobe.com/2006/flex/mx/internal";
}//package mx.core
Section 278
//SoundAsset (mx.core.SoundAsset)
package mx.core {
import flash.media.*;
public class SoundAsset extends Sound implements IFlexAsset {
mx_internal static const VERSION:String = "3.0.0.0";
}
}//package mx.core
Section 279
//PropertyChangeEvent (mx.events.PropertyChangeEvent)
package mx.events {
import flash.events.*;
import mx.core.*;
public class PropertyChangeEvent extends Event {
public var newValue:Object;
public var kind:String;
public var property:Object;
public var oldValue:Object;
public var source:Object;
mx_internal static const VERSION:String = "3.0.0.0";
public static const PROPERTY_CHANGE:String = "propertyChange";
public function PropertyChangeEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:String=null, _arg5:Object=null, _arg6:Object=null, _arg7:Object=null, _arg8:Object=null){
super(_arg1, _arg2, _arg3);
this.kind = _arg4;
this.property = _arg5;
this.oldValue = _arg6;
this.newValue = _arg7;
this.source = _arg8;
}
override public function clone():Event{
return (new PropertyChangeEvent(type, bubbles, cancelable, kind, property, oldValue, newValue, source));
}
public static function createUpdateEvent(_arg1:Object, _arg2:Object, _arg3:Object, _arg4:Object):PropertyChangeEvent{
var _local5:PropertyChangeEvent = new PropertyChangeEvent(PROPERTY_CHANGE);
_local5.kind = PropertyChangeEventKind.UPDATE;
_local5.oldValue = _arg3;
_local5.newValue = _arg4;
_local5.source = _arg1;
_local5.property = _arg2;
return (_local5);
}
}
}//package mx.events
Section 280
//PropertyChangeEventKind (mx.events.PropertyChangeEventKind)
package mx.events {
import mx.core.*;
public final class PropertyChangeEventKind {
mx_internal static const VERSION:String = "3.0.0.0";
public static const UPDATE:String = "update";
public static const DELETE:String = "delete";
}
}//package mx.events
Section 281
//NameUtil (mx.utils.NameUtil)
package mx.utils {
import flash.display.*;
import mx.core.*;
import flash.utils.*;
public class NameUtil {
mx_internal static const VERSION:String = "3.0.0.0";
private static var counter:int = 0;
public static function displayObjectToString(_arg1:DisplayObject):String{
var _local2:String;
var _local4:String;
var _local5:Array;
var _local3:DisplayObject = _arg1;
while (_local3 != null) {
if (((((_local3.parent) && (_local3.stage))) && ((_local3.parent == _local3.stage)))){
break;
};
_local4 = _local3.name;
if ((_local3 is IRepeaterClient)){
_local5 = IRepeaterClient(_local3).instanceIndices;
if (_local5){
_local4 = (_local4 + (("[" + _local5.join("][")) + "]"));
};
};
_local2 = ((_local2 == null)) ? _local4 : ((_local4 + ".") + _local2);
_local3 = _local3.parent;
};
return (_local2);
}
public static function createUniqueName(_arg1:Object):String{
if (!_arg1){
return (null);
};
var _local2:String = getQualifiedClassName(_arg1);
var _local3:int = _local2.indexOf("::");
if (_local3 != -1){
_local2 = _local2.substr((_local3 + 2));
};
var _local4:int = _local2.charCodeAt((_local2.length - 1));
if ((((_local4 >= 48)) && ((_local4 <= 57)))){
_local2 = (_local2 + "_");
};
return ((_local2 + counter++));
}
}
}//package mx.utils
Section 282
//NagScreen (NagScreen.NagScreen)
package NagScreen {
import flash.events.*;
import GameScene.*;
import flash.display.*;
import GameObject.*;
import Layout.*;
import Audio.*;
import Tools.*;
import GlobalSetup.*;
import GameConfig.*;
import flash.external.*;
public class NagScreen extends GameScene {
public var ccc:int;// = 0
public var nextButton:GameObject;
public var allLoaded:Boolean;// = false
public var but1:GameObject;
public var but2:GameObject;
public var leftText:GameObject;
public var iconObjects:Array;
public var OK:GameObject;
public var lastButton:GameObject;
public var gobs:Layout;
public var okClass:Class;
public static var allGames:Array;
public static var nextGame:Class = NagScreen_nextGame;
public static var free2:Class = NagScreen_free2;
public static var lastGame:Class = NagScreen_lastGame;
public static var free1:Class = NagScreen_free1;
public static var dataFetched:Boolean = false;
public static var gameNames:Array = null;
public static var data:SafeRequest;
public static var iconRequests:Array;
public function getTextFromJavascript(_arg1:String):void{
leftText.setText(_arg1);
}
public function getLastGame():NagScreenGame{
if (ccc == 0){
return (allGames[(allGames.length - 1)]);
};
return (allGames[(ccc - 1)]);
}
override public function init():void{
nextButton = new GameObject(this, SimpleButton, "TextLayer", 400, 300);
lastButton = new GameObject(this, SimpleButton, "TextLayer", 400, 300);
nextButton.setupButton(nextGame, "", null, true);
lastButton.setupButton(lastGame, "", null, true);
but1 = new GameObject(this, SimpleButton, "TextLayer", 400, 100);
but2 = new GameObject(this, SimpleButton, "TextLayer", 400, 200);
but1.setupButton(free1, "", null, true);
but2.setupButton(free2, "", null, true);
OK = new GameObject(this, SimpleButton, "TextLayer", 0, 0);
OK.setupButton(Embeds.menu_button_png, "Keep Playing", null, true);
OK.basex = 400;
OK.basey = (600 - 48);
var _local1:NagScreenGame = allGames[0];
gobs = _local1.getGameObjects(this);
nextButton.basey = gobs.getGameObjects()[2].basey;
lastButton.basey = nextButton.basey;
slideGames(gobs, null, 1);
var _local2:Array = gobs.getGameObjects();
LayerFilter.applySlideIn(but1, 0, -800);
LayerFilter.applySlideIn(but2, 0, 800);
LayerFilter.applySqrtSlide(lastButton, -800);
LayerFilter.applySqrtSlide(nextButton, -800);
LayerFilter.applySlideIn(OK, 0, 0, 400);
}
public function buildGames(){
var _local2:String;
var _local3:GameObject;
iconObjects = new Array();
var _local1:int;
while (_local1 < iconRequests.length) {
_local2 = gameNames[_local1];
_local3 = new GameObject(this, SimpleButton, "TextLayer", 0, 0);
_local3.setupButton(iconRequests[_local1].ldr, ("game" + _local1), null, true);
_local3.stripText();
iconObjects.push(_local3);
_local1++;
};
}
override public function _update():void{
var _local4:GameObject;
var _local5:Layout;
var _local6:String;
var _local1:int = ccc;
var _local2:Boolean;
var _local3:Boolean;
getNextGame().cache();
getLastGame().cache();
if (nextButton.mHit()){
_local2 = true;
ccc++;
};
if (lastButton.mHit()){
_local3 = true;
ccc--;
};
if (ccc < 0){
ccc = (allGames.length - 1);
};
if (ccc >= allGames.length){
ccc = 0;
};
if (_local1 != ccc){
_local5 = gobs;
gobs = allGames[ccc].getGameObjects(this);
if (_local2){
slideGames(gobs, _local5, 1);
} else {
slideGames(gobs, _local5, -1);
};
lastButton.changeZOrder("TextLayer");
nextButton.changeZOrder("TextLayer");
};
if (but1.mHit()){
Net.openURL("http://www.rocksolidarcade.com/");
GameSound.globalMusicVolume = 0;
};
if (but2.mHit()){
Net.openURL("http://www.rocksolidarcade.com/");
GameSound.globalMusicVolume = 0;
};
for each (_local4 in gobs.getGameObjects()) {
if (_local4.mHit()){
_local6 = Extern.sendMessage("nav", (("http://www.rocksolidarcade.com/games/" + allGames[ccc].shortName) + "/fn"));
if (_local6 != "ss"){
Net.openURL((("http://www.rocksolidarcade.com/games/" + allGames[ccc].shortName) + "/fn"));
};
GameSound.globalMusicVolume = 0;
};
};
if (OK.mHit()){
pushScene(new okClass(), true);
};
}
public function getNextGame():NagScreenGame{
if (ccc == (allGames.length - 1)){
return (allGames[0]);
};
return (allGames[(ccc + 1)]);
}
public function slideGames(_arg1:Object, _arg2:Object, _arg3:int):void{
vert([but2, but1, horiz([lastButton, _arg1, nextButton])], 32, 400, 270);
lastButton.basex = (lastButton.basex + 800);
nextButton.basex = (nextButton.basex + 800);
lastButton.basex = (lastButton.basex - 2);
lastButton.basey = Layout(_arg1).getGameObjects()[1].basey;
nextButton.basey = lastButton.basey;
if (_arg2){
LayerFilter.applySqrtSlide(_arg2, (-800 * _arg3), 0, 80, true);
LayerFilter.applyAlphaInOut(_arg2, 0, 0, 0, 60);
};
LayerFilter.setLayerOrigin(_arg1, (800 * _arg3), 0);
LayerFilter.applySqrtSlide(_arg1, (-800 * _arg3), 0);
LayerFilter.applyAlphaInOut(_arg1, 20, 60, 9999999, 9);
}
public static function preload():void{
if (GameConfig.nagEnabled == false){
return;
};
if (!data){
data = new SafeRequest(("http://www.rocksolidarcade.com/newrandomselection/" + GameConfig.shortName), finishFetch);
};
}
public static function requestIcons(_arg1:Array){
var _local2:String;
var _local3:SafeImageRequest;
iconRequests = new Array();
gameNames = _arg1;
for each (_local2 in _arg1) {
_local3 = new SafeImageRequest((("http://www.rocksolidarcade.com/static/" + _local2) + "/icon.png"));
iconRequests.push(_local3);
};
}
public static function finishFetch():void{
var _local3:String;
var _local4:NagScreenGame;
dataFetched = true;
var _local1:Array = data.data.split(":::");
var _local2:String = _local1[0];
_local1.splice(0, 1);
_local1.splice((_local1.length - 1), 1);
allGames = new Array();
for each (_local3 in _local1) {
_local4 = NagScreenGame.create(_local3);
if (_local4){
_local4.baseURL = _local2;
allGames.push(_local4);
};
};
if (allGames.length > 0){
allGames[0].cache();
};
}
public static function gamesHaveLoaded():Boolean{
var _local1:SafeImageRequest;
if (allGames){
return (true);
};
return (false);
return (true);
}
public static function create(_arg1:GameScene, _arg2:Class):void{
var _local3:NagScreen;
if (GameConfig.nagEnabled == false){
_arg1.pushScene(new (_arg2), true);
return;
};
if (gamesHaveLoaded()){
_local3 = new (NagScreen);
_local3.okClass = _arg2;
_arg1.pushScene(_local3, true);
} else {
_arg1.pushScene(new (_arg2), true);
};
}
}
}//package NagScreen
Section 283
//NagScreen_free1 (NagScreen.NagScreen_free1)
package NagScreen {
import mx.core.*;
public class NagScreen_free1 extends BitmapAsset {
}
}//package NagScreen
Section 284
//NagScreen_free2 (NagScreen.NagScreen_free2)
package NagScreen {
import mx.core.*;
public class NagScreen_free2 extends BitmapAsset {
}
}//package NagScreen
Section 285
//NagScreen_lastGame (NagScreen.NagScreen_lastGame)
package NagScreen {
import mx.core.*;
public class NagScreen_lastGame extends BitmapAsset {
}
}//package NagScreen
Section 286
//NagScreen_nextGame (NagScreen.NagScreen_nextGame)
package NagScreen {
import mx.core.*;
public class NagScreen_nextGame extends BitmapAsset {
}
}//package NagScreen
Section 287
//NagScreenGame (NagScreen.NagScreenGame)
package NagScreen {
import GameScene.*;
import flash.display.*;
import GameObject.*;
import Layout.*;
import Tools.*;
import GameConfig.*;
public class NagScreenGame {
public var cached:Boolean;// = false
public var shortName:String;
public var name:String;
public var gs:GameScene;
public var baseURL:String;
public function cache():void{
if (cached){
return;
};
cached = true;
var _local1:SafeImageRequest = new SafeImageRequest(((baseURL + shortName) + "/headersmall.png"));
var _local2:SafeImageRequest = new SafeImageRequest(((baseURL + shortName) + "/nagshot1.jpg"));
var _local3:SafeImageRequest = new SafeImageRequest(((baseURL + shortName) + "/nagshot2.jpg"));
}
public function getGameObjects(_arg1:GameScene):Layout{
var _local2:GameObject = new GameObject(_arg1, SimpleButton, "TextLayer", 400, 300);
_local2.helper.lazyLoad(((baseURL + shortName) + "/headersmall.png"));
_local2.baseWidth = 400;
_local2.baseHeight = 83;
var _local3:Array = new Array();
var _local4:int;
while (_local4 < 2) {
_local3[_local4] = new GameObject(_arg1, SimpleButton, "TextLayer", 400, 300);
_local3[_local4].helper.lazyLoad(((((baseURL + shortName) + "/nagshot") + (_local4 + 1)) + ".jpg"));
_local3[_local4].baseWidth = 200;
_local3[_local4].baseHeight = 150;
_local4++;
};
var _local5:Layout = _arg1.vert([_local2, _arg1.horiz(_local3)], 4);
return (_local5);
}
public static function create(_arg1:String):NagScreenGame{
var _local6:NagScreenGame;
var _local2:Array = _arg1.split(",", 3);
var _local3:String = _local2[0];
var _local4:int = int(_local2[1]);
var _local5:String = _local2[2];
if (_local3 != GameConfig.shortName){
_local6 = new (NagScreenGame);
_local6.shortName = _local3;
_local6.name = _local5;
return (_local6);
};
return (null);
}
}
}//package NagScreen
Section 288
//Blimp_constructor (ObjectConstructors.Blimp_constructor)
package ObjectConstructors {
import GameScene.*;
import Particles.*;
import flash.display.*;
import GameObject.*;
import Objects.*;
import GlobalSetup.*;
public class Blimp_constructor {
public static var LayerName:String = "";
public static var child3_embed:Class = Embeds.collisionbig_png;
public static var child1_embed:Class = Embeds.collisionbig_png;
public static var child2_embed:Class = Embeds.collisionbig_png;
public static var child1:BitmapData = new Embeds.collisionbig_png().bitmapData;
public static var baseim_embed:Class = Embeds.blimp_png;
public static var child3:BitmapData = new Embeds.collisionbig_png().bitmapData;
public static var baseim:BitmapData = new Embeds.blimp_png().bitmapData;
public static var child2:BitmapData = new Embeds.collisionbig_png().bitmapData;
public static function setup(_arg1:GameScene, _arg2:GameObject):void{
var _local3:GameObjectFilter;
var _local4:ParticleEmitter;
var _local5:ParticleFilter;
var _local6:GameObject;
var _local7:GameObjectFilter;
_arg2.baseHandleX = 0.5;
_arg2.baseHandleY = 0.5;
_arg2.addConditionalParticleArray(globalParticles.getParticles());
_arg2.animSpeed = 0;
_local6 = new GameObject(_arg1, child1_embed, "", -51, -6);
_local6.name = "Collision";
_local6.baseHandleX = 0.5;
_local6.baseHandleY = 0.5;
_local6.basex = -51;
_local6.basey = -6;
_local6.animSpeed = 0;
_arg2.addChild(_local6);
_local6 = new GameObject(_arg1, child2_embed, "", 0, -5);
_local6.name = "Collision";
_local6.baseHandleX = 0.5;
_local6.baseHandleY = 0.5;
_local6.basex = 0;
_local6.basey = -5;
_local6.animSpeed = 0;
_arg2.addChild(_local6);
_local6 = new GameObject(_arg1, child3_embed, "", 51, -4);
_local6.name = "Collision";
_local6.baseHandleX = 0.5;
_local6.baseHandleY = 0.5;
_local6.basex = 51;
_local6.basey = -4;
_local6.animSpeed = 0;
_arg2.addChild(_local6);
}
}
}//package ObjectConstructors
Section 289
//BonusBalloon_constructor (ObjectConstructors.BonusBalloon_constructor)
package ObjectConstructors {
import GameScene.*;
import Particles.*;
import flash.display.*;
import GameObject.*;
import Objects.*;
import GlobalSetup.*;
public class BonusBalloon_constructor {
public static var child1:BitmapData = new Embeds.collisionbig_png().bitmapData;
public static var par1_embed:Class = Embeds.pop_png;
public static var child1_embed:Class = Embeds.collisionbig_png;
public static var par1:BitmapData = new Embeds.pop_png().bitmapData;
public static var baseim:BitmapData = new Embeds.bonus_ball_png().bitmapData;
public static var baseim_embed:Class = Embeds.bonus_ball_png;
public static var LayerName:String = "ObstacleFront";
public static function setup(_arg1:GameScene, _arg2:GameObject):void{
var _local3:GameObjectFilter;
var _local4:ParticleEmitter;
var _local5:ParticleFilter;
var _local6:GameObject;
var _local7:GameObjectFilter;
_arg2.baseHandleX = 0.5;
_arg2.baseHandleY = 0.5;
_local4 = new ParticleEmitter();
_local4.Name = "Pop";
_local4.x = 0;
_local4.y = -11;
_local4.Frequency = 6;
_local4.lifelow = 45;
_local4.lifehigh = 102;
_local4.gravitylow = 0;
_local4.gravityhigh = 0.00999999978;
_local4.xspeedlow = -1;
_local4.xspeedhigh = 1;
_local4.yspeedlow = -2;
_local4.yspeedhigh = 2;
_local4.startalpha = 1;
_local4.endalpha = 0.200000003;
_local4.rotatespeedtodirection = 1;
_local4.startrotationlow = 0;
_local4.startrotationhigh = 360;
_local4.dRotationLow = -13;
_local4.dRotationHigh = 13;
_local4.startScale = 1.39999998;
_local4.endScale = 0;
_local4.additive = 0;
_local4.layeroverride = "";
_local4.animspeed = 1;
_local4.animspeedrange = 0;
_local4.animframecap = 0;
_local4.Friction = 0;
_local4.Test = 0;
_local4.StayAfterDeath = 0;
_local4.Identifier = "";
_local4.impath = "pop.png";
_local4.image = par1_embed;
_arg2.conditionalParticles.push(_local4);
_arg2.addConditionalParticleArray(globalParticles.getParticles());
_arg2.animSpeed = 0;
_local6 = new GameObject(_arg1, child1_embed, "ObstacleFront", 0, -11);
_local6.name = "CollisionGood";
_local6.baseHandleX = 0.5;
_local6.baseHandleY = 0.5;
_local6.basex = 0;
_local6.basey = -11;
_local6.animSpeed = 0;
_arg2.addChild(_local6);
}
}
}//package ObjectConstructors
Section 290
//FloatObstacle_constructor (ObjectConstructors.FloatObstacle_constructor)
package ObjectConstructors {
import GameScene.*;
import Particles.*;
import flash.display.*;
import GameObject.*;
import Objects.*;
import GlobalSetup.*;
public class FloatObstacle_constructor {
public static var LayerName:String = "ObstacleFront";
public static var child3_embed:Class = Embeds.pipecollision_png;
public static var child1_embed:Class = Embeds.collisionbig_png;
public static var child2_embed:Class = Embeds.pipecollision_png;
public static var child4_embed:Class = Embeds.collisionbig_png;
public static var child1:BitmapData = new Embeds.collisionbig_png().bitmapData;
public static var baseim_embed:Class = Embeds.balloon_png;
public static var child3:BitmapData = new Embeds.pipecollision_png().bitmapData;
public static var baseim:BitmapData = new Embeds.balloon_png().bitmapData;
public static var child2:BitmapData = new Embeds.pipecollision_png().bitmapData;
public static var child4:BitmapData = new Embeds.collisionbig_png().bitmapData;
public static function setup(_arg1:GameScene, _arg2:GameObject):void{
var _local3:GameObjectFilter;
var _local4:ParticleEmitter;
var _local5:ParticleFilter;
var _local6:GameObject;
var _local7:GameObjectFilter;
_arg2.baseHandleX = 0.5;
_arg2.baseHandleY = 0.5;
_arg2.addConditionalParticleArray(globalParticles.getParticles());
_arg2.animSpeed = 0;
_local6 = new GameObject(_arg1, child1_embed, "ObstacleFront", -1, -19);
_local6.name = "Collision";
_local6.baseHandleX = 0.5;
_local6.baseHandleY = 0.5;
_local6.basex = -1;
_local6.basey = -19;
_local6.animSpeed = 0;
_arg2.addChild(_local6);
_local6 = new GameObject(_arg1, child2_embed, "ObstacleFront", 24, -15);
_local6.name = "Collision";
_local6.baseHandleX = 0.5;
_local6.baseHandleY = 0.5;
_local6.basex = 24;
_local6.basey = -15;
_local6.animSpeed = 0;
_arg2.addChild(_local6);
_local6 = new GameObject(_arg1, child3_embed, "ObstacleFront", -25, -15);
_local6.name = "Collision";
_local6.baseHandleX = 0.5;
_local6.baseHandleY = 0.5;
_local6.basex = -25;
_local6.basey = -15;
_local6.animSpeed = 0;
_arg2.addChild(_local6);
_local6 = new GameObject(_arg1, child4_embed, "ObstacleFront", 0, 19);
_local6.name = "Collision";
_local6.baseHandleX = 0.5;
_local6.baseHandleY = 0.5;
_local6.basex = 0;
_local6.basey = 19;
_local6.animSpeed = 0;
_arg2.addChild(_local6);
}
}
}//package ObjectConstructors
Section 291
//globalParticles (ObjectConstructors.globalParticles)
package ObjectConstructors {
import Particles.*;
public class globalParticles {
public static var emitters:Array;
public static function constructParticles():Array{
var _local2:ParticleEmitter;
var _local3:ParticleFilter;
var _local1:Array = new Array();
return (_local1);
}
public static function getParticles():Array{
if (!emitters){
emitters = constructParticles();
};
return (emitters);
}
}
}//package ObjectConstructors
Section 292
//Ground_constructor (ObjectConstructors.Ground_constructor)
package ObjectConstructors {
import GameScene.*;
import Particles.*;
import flash.display.*;
import GameObject.*;
import Objects.*;
import GlobalSetup.*;
public class Ground_constructor {
public static var baseim:BitmapData = new Embeds.ground_png().bitmapData;
public static var LayerName:String = "Ground";
public static var baseim_embed:Class = Embeds.ground_png;
public static function setup(_arg1:GameScene, _arg2:GameObject):void{
var _local3:GameObjectFilter;
var _local4:ParticleEmitter;
var _local5:ParticleFilter;
var _local6:GameObject;
var _local7:GameObjectFilter;
_arg2.baseHandleX = 0.5;
_arg2.baseHandleY = 0.5;
_arg2.addConditionalParticleArray(globalParticles.getParticles());
_arg2.animSpeed = 0;
}
}
}//package ObjectConstructors
Section 293
//LevelPanel_constructor (ObjectConstructors.LevelPanel_constructor)
package ObjectConstructors {
import GameScene.*;
import Particles.*;
import flash.display.*;
import GameObject.*;
import Objects.*;
import GlobalSetup.*;
public class LevelPanel_constructor {
public static var baseim:BitmapData = new Embeds.level_panel_png().bitmapData;
public static var LayerName:String = "AfterTextLayer";
public static var baseim_embed:Class = Embeds.level_panel_png;
public static function setup(_arg1:GameScene, _arg2:GameObject):void{
var _local3:GameObjectFilter;
var _local4:ParticleEmitter;
var _local5:ParticleFilter;
var _local6:GameObject;
var _local7:GameObjectFilter;
_arg2.baseHandleX = 0.5;
_arg2.baseHandleY = 0.5;
_arg2.addConditionalParticleArray(globalParticles.getParticles());
_arg2.animSpeed = 0;
}
}
}//package ObjectConstructors
Section 294
//lifeSprite_constructor (ObjectConstructors.lifeSprite_constructor)
package ObjectConstructors {
import GameScene.*;
import Particles.*;
import flash.display.*;
import GameObject.*;
import Objects.*;
import GlobalSetup.*;
public class lifeSprite_constructor {
public static var baseim:BitmapData = new Embeds.lives_png().bitmapData;
public static var LayerName:String = "TextLayer";
public static var baseim_embed:Class = Embeds.lives_png;
public static function setup(_arg1:GameScene, _arg2:GameObject):void{
var _local3:GameObjectFilter;
var _local4:ParticleEmitter;
var _local5:ParticleFilter;
var _local6:GameObject;
var _local7:GameObjectFilter;
_arg2.baseHandleX = 0.5;
_arg2.baseHandleY = 0.5;
_arg2.addConditionalParticleArray(globalParticles.getParticles());
_arg2.animSpeed = 0;
}
}
}//package ObjectConstructors
Section 295
//Man_constructor (ObjectConstructors.Man_constructor)
package ObjectConstructors {
import GameScene.*;
import Particles.*;
import flash.display.*;
import GameObject.*;
import Objects.*;
import GlobalSetup.*;
public class Man_constructor {
public static var child1:BitmapData = new Embeds.parachute_png().bitmapData;
public static var baseim:BitmapData = new Embeds.man_png().bitmapData;
public static var child1_embed:Class = Embeds.parachute_png;
public static var LayerName:String = "";
public static var baseim_embed:Class = Embeds.man_png;
public static function setup(_arg1:GameScene, _arg2:GameObject):void{
var _local3:GameObjectFilter;
var _local4:ParticleEmitter;
var _local5:ParticleFilter;
var _local6:GameObject;
var _local7:GameObjectFilter;
_arg2.baseHandleX = 0.5;
_arg2.baseHandleY = 0.5;
_arg2.addConditionalParticleArray(globalParticles.getParticles());
_arg2.animSpeed = 0;
_local6 = new GameObject(_arg1, child1_embed, "", -1, -5);
_local6.name = "";
_local6.baseHandleX = 0.5;
_local6.baseHandleY = 1;
_local6.basex = -1;
_local6.basey = -5;
_local6.animSpeed = 0;
_local7 = new GameObjectFilterScaleInOut();
_local6.addFilter(_local7);
GameObjectFilterScaleInOut(_local7).ScaleIn = 1;
GameObjectFilterScaleInOut(_local7).ScaleInDelay = 100;
GameObjectFilterScaleInOut(_local7).ScaleInDuration = 200;
GameObjectFilterScaleInOut(_local7).ScaleInStartX = 0.5;
GameObjectFilterScaleInOut(_local7).ScaleInStartY = 0;
GameObjectFilterScaleInOut(_local7).ScaleOut = 0;
GameObjectFilterScaleInOut(_local7).ScaleOutTime = 0;
GameObjectFilterScaleInOut(_local7).ScaleOutDuration = 0;
GameObjectFilterScaleInOut(_local7).ScaleOutEndX = 1;
GameObjectFilterScaleInOut(_local7).ScaleOutEndY = 1;
_arg2.addChild(_local6);
}
}
}//package ObjectConstructors
Section 296
//Pipe_constructor (ObjectConstructors.Pipe_constructor)
package ObjectConstructors {
import GameScene.*;
import Particles.*;
import flash.display.*;
import GameObject.*;
import Objects.*;
import GlobalSetup.*;
public class Pipe_constructor {
public static var baseim_embed:Class = Embeds.pipe_png;
public static var child1:BitmapData = new Embeds.pipecollision_png().bitmapData;
public static var child2:BitmapData = new Embeds.pipecollision_png().bitmapData;
public static var child3:BitmapData = new Embeds.pipecollisiongood_png().bitmapData;
public static var child4:BitmapData = new Embeds.tick_png().bitmapData;
public static var child5:BitmapData = new Embeds.pipeback_png().bitmapData;
public static var LayerName:String = "ObstacleFront";
public static var child1_embed:Class = Embeds.pipecollision_png;
public static var child3_embed:Class = Embeds.pipecollisiongood_png;
public static var child4_embed:Class = Embeds.tick_png;
public static var child5_embed:Class = Embeds.pipeback_png;
public static var baseim:BitmapData = new Embeds.pipe_png().bitmapData;
public static var child2_embed:Class = Embeds.pipecollision_png;
public static function setup(_arg1:GameScene, _arg2:GameObject):void{
var _local3:GameObjectFilter;
var _local4:ParticleEmitter;
var _local5:ParticleFilter;
var _local6:GameObject;
var _local7:GameObjectFilter;
_arg2.baseHandleX = 0.5;
_arg2.baseHandleY = 0.5;
_arg2.addConditionalParticleArray(globalParticles.getParticles());
_arg2.animSpeed = 0;
_local6 = new GameObject(_arg1, child1_embed, "ObstacleFront", -1, -36);
_local6.name = "Collision";
_local6.baseHandleX = 0.5;
_local6.baseHandleY = 0.5;
_local6.basex = -1;
_local6.basey = -36;
_local6.animSpeed = 0;
_arg2.addChild(_local6);
_local6 = new GameObject(_arg1, child2_embed, "ObstacleFront", 0, 36);
_local6.name = "Collision";
_local6.baseHandleX = 0.5;
_local6.baseHandleY = 0.5;
_local6.basex = 0;
_local6.basey = 36;
_local6.animSpeed = 0;
_arg2.addChild(_local6);
_local6 = new GameObject(_arg1, child3_embed, "ObstacleFront", 0, 0);
_local6.name = "CollisionGood";
_local6.baseHandleX = 0.5;
_local6.baseHandleY = 0.5;
_local6.basex = 0;
_local6.basey = 0;
_local6.animSpeed = 0;
_arg2.addChild(_local6);
_local6 = new GameObject(_arg1, child4_embed, "Stars", 1, -52);
_local6.name = "Success";
_local6.baseHandleX = 0.5;
_local6.baseHandleY = 0.5;
_local6.basex = 1;
_local6.basey = -52;
_local6.animSpeed = 0;
_local7 = new GameObjectFilterDampenInterpolateIn();
_local6.addFilter(_local7);
GameObjectFilterDampenInterpolateIn(_local7).Delay = 0;
GameObjectFilterDampenInterpolateIn(_local7).FadeTime = 100;
GameObjectFilterDampenInterpolateIn(_local7).dx = 0;
GameObjectFilterDampenInterpolateIn(_local7).dy = -100;
_local7 = new GameObjectFilterFadeInOut();
_local6.addFilter(_local7);
GameObjectFilterFadeInOut(_local7).FadeIn = 1;
GameObjectFilterFadeInOut(_local7).FadeInDelay = 0;
GameObjectFilterFadeInOut(_local7).FadeInDuration = 82;
GameObjectFilterFadeInOut(_local7).FadeOut = 0;
GameObjectFilterFadeInOut(_local7).FadeOutTime = 0;
GameObjectFilterFadeInOut(_local7).FadeOutDuration = 0;
_local7 = new GameObjectFilterScaleInOut();
_local6.addFilter(_local7);
GameObjectFilterScaleInOut(_local7).ScaleIn = 1;
GameObjectFilterScaleInOut(_local7).ScaleInDelay = 0;
GameObjectFilterScaleInOut(_local7).ScaleInDuration = 100;
GameObjectFilterScaleInOut(_local7).ScaleInStartX = 1;
GameObjectFilterScaleInOut(_local7).ScaleInStartY = 0;
GameObjectFilterScaleInOut(_local7).ScaleOut = 0;
GameObjectFilterScaleInOut(_local7).ScaleOutTime = 0;
GameObjectFilterScaleInOut(_local7).ScaleOutDuration = 0;
GameObjectFilterScaleInOut(_local7).ScaleOutEndX = 1;
GameObjectFilterScaleInOut(_local7).ScaleOutEndY = 1;
_arg2.addChild(_local6);
_local6 = new GameObject(_arg1, child5_embed, "ObstacleBack", 0, 0);
_local6.name = "";
_local6.baseHandleX = 0.5;
_local6.baseHandleY = 0.5;
_local6.basex = 0;
_local6.basey = 0;
_local6.animSpeed = 0;
_arg2.addChild(_local6);
}
}
}//package ObjectConstructors
Section 297
//PipeBig_constructor (ObjectConstructors.PipeBig_constructor)
package ObjectConstructors {
import GameScene.*;
import Particles.*;
import flash.display.*;
import GameObject.*;
import Objects.*;
import GlobalSetup.*;
public class PipeBig_constructor {
public static var baseim_embed:Class = Embeds.pipebigback_png;
public static var child1:BitmapData = new Embeds.pipecollisiongood_png().bitmapData;
public static var child2:BitmapData = new Embeds.pipecollisiongood_png().bitmapData;
public static var child3:BitmapData = new Embeds.pipecollision_png().bitmapData;
public static var child4:BitmapData = new Embeds.pipecollision_png().bitmapData;
public static var child5:BitmapData = new Embeds.tick_png().bitmapData;
public static var child6:BitmapData = new Embeds.pipebig_png().bitmapData;
public static var LayerName:String = "";
public static var child1_embed:Class = Embeds.pipecollisiongood_png;
public static var child3_embed:Class = Embeds.pipecollision_png;
public static var child4_embed:Class = Embeds.pipecollision_png;
public static var child5_embed:Class = Embeds.tick_png;
public static var child6_embed:Class = Embeds.pipebig_png;
public static var baseim:BitmapData = new Embeds.pipebigback_png().bitmapData;
public static var child2_embed:Class = Embeds.pipecollisiongood_png;
public static function setup(_arg1:GameScene, _arg2:GameObject):void{
var _local3:GameObjectFilter;
var _local4:ParticleEmitter;
var _local5:ParticleFilter;
var _local6:GameObject;
var _local7:GameObjectFilter;
_arg2.baseHandleX = 0.5;
_arg2.baseHandleY = 0.5;
_arg2.addConditionalParticleArray(globalParticles.getParticles());
_arg2.animSpeed = 0;
_local6 = new GameObject(_arg1, child1_embed, "", 0, 13);
_local6.name = "CollisionGood";
_local6.baseHandleX = 0.5;
_local6.baseHandleY = 0.5;
_local6.basex = 0;
_local6.basey = 13;
_local6.animSpeed = 0;
_arg2.addChild(_local6);
_local6 = new GameObject(_arg1, child2_embed, "", -1, -11);
_local6.name = "CollisionGood";
_local6.baseHandleX = 0.5;
_local6.baseHandleY = 0.5;
_local6.basex = -1;
_local6.basey = -11;
_local6.animSpeed = 0;
_arg2.addChild(_local6);
_local6 = new GameObject(_arg1, child3_embed, "", -1, -43);
_local6.name = "Collision";
_local6.baseHandleX = 0.5;
_local6.baseHandleY = 0.5;
_local6.basex = -1;
_local6.basey = -43;
_local6.animSpeed = 0;
_arg2.addChild(_local6);
_local6 = new GameObject(_arg1, child4_embed, "", -1, 42);
_local6.name = "Collision";
_local6.baseHandleX = 0.5;
_local6.baseHandleY = 0.5;
_local6.basex = -1;
_local6.basey = 42;
_local6.animSpeed = 0;
_arg2.addChild(_local6);
_local6 = new GameObject(_arg1, child5_embed, "Stars", -1, -68);
_local6.name = "Success";
_local6.baseHandleX = 0.5;
_local6.baseHandleY = 0.5;
_local6.basex = -1;
_local6.basey = -68;
_local6.animSpeed = 0;
_local7 = new GameObjectFilterDampenInterpolateIn();
_local6.addFilter(_local7);
GameObjectFilterDampenInterpolateIn(_local7).Delay = 0;
GameObjectFilterDampenInterpolateIn(_local7).FadeTime = 100;
GameObjectFilterDampenInterpolateIn(_local7).dx = 0;
GameObjectFilterDampenInterpolateIn(_local7).dy = -100;
_local7 = new GameObjectFilterFadeInOut();
_local6.addFilter(_local7);
GameObjectFilterFadeInOut(_local7).FadeIn = 1;
GameObjectFilterFadeInOut(_local7).FadeInDelay = 0;
GameObjectFilterFadeInOut(_local7).FadeInDuration = 82;
GameObjectFilterFadeInOut(_local7).FadeOut = 0;
GameObjectFilterFadeInOut(_local7).FadeOutTime = 0;
GameObjectFilterFadeInOut(_local7).FadeOutDuration = 0;
_local7 = new GameObjectFilterScaleInOut();
_local6.addFilter(_local7);
GameObjectFilterScaleInOut(_local7).ScaleIn = 1;
GameObjectFilterScaleInOut(_local7).ScaleInDelay = 0;
GameObjectFilterScaleInOut(_local7).ScaleInDuration = 100;
GameObjectFilterScaleInOut(_local7).ScaleInStartX = 1;
GameObjectFilterScaleInOut(_local7).ScaleInStartY = 0;
GameObjectFilterScaleInOut(_local7).ScaleOut = 0;
GameObjectFilterScaleInOut(_local7).ScaleOutTime = 0;
GameObjectFilterScaleInOut(_local7).ScaleOutDuration = 0;
GameObjectFilterScaleInOut(_local7).ScaleOutEndX = 1;
GameObjectFilterScaleInOut(_local7).ScaleOutEndY = 1;
_arg2.addChild(_local6);
_local6 = new GameObject(_arg1, child6_embed, "ObstacleBack", 0, 0);
_local6.name = "";
_local6.baseHandleX = 0.5;
_local6.baseHandleY = 0.5;
_local6.basex = 0;
_local6.basey = 0;
_local6.animSpeed = 0;
_arg2.addChild(_local6);
}
}
}//package ObjectConstructors
Section 298
//PipeBigRoll_constructor (ObjectConstructors.PipeBigRoll_constructor)
package ObjectConstructors {
import GameScene.*;
import Particles.*;
import flash.display.*;
import GameObject.*;
import Objects.*;
import GlobalSetup.*;
public class PipeBigRoll_constructor {
public static var baseim_embed:Class = Embeds.pipebigback_roll_png;
public static var child1:BitmapData = new Embeds.pipecollisiongood_png().bitmapData;
public static var child2:BitmapData = new Embeds.pipecollisiongood_png().bitmapData;
public static var child3:BitmapData = new Embeds.pipecollision_png().bitmapData;
public static var child4:BitmapData = new Embeds.pipecollision_png().bitmapData;
public static var child5:BitmapData = new Embeds.tick_png().bitmapData;
public static var child6:BitmapData = new Embeds.pipebig_roll_png().bitmapData;
public static var LayerName:String = "";
public static var child1_embed:Class = Embeds.pipecollisiongood_png;
public static var child3_embed:Class = Embeds.pipecollision_png;
public static var child4_embed:Class = Embeds.pipecollision_png;
public static var child5_embed:Class = Embeds.tick_png;
public static var child6_embed:Class = Embeds.pipebig_roll_png;
public static var baseim:BitmapData = new Embeds.pipebigback_roll_png().bitmapData;
public static var child2_embed:Class = Embeds.pipecollisiongood_png;
public static function setup(_arg1:GameScene, _arg2:GameObject):void{
var _local3:GameObjectFilter;
var _local4:ParticleEmitter;
var _local5:ParticleFilter;
var _local6:GameObject;
var _local7:GameObjectFilter;
_arg2.baseHandleX = 0.5;
_arg2.baseHandleY = 0.5;
_arg2.addConditionalParticleArray(globalParticles.getParticles());
_arg2.animSpeed = 0;
_local6 = new GameObject(_arg1, child1_embed, "", 0, 13);
_local6.name = "CollisionGood";
_local6.baseHandleX = 0.5;
_local6.baseHandleY = 0.5;
_local6.basex = 0;
_local6.basey = 13;
_local6.animSpeed = 0;
_arg2.addChild(_local6);
_local6 = new GameObject(_arg1, child2_embed, "", -1, -11);
_local6.name = "CollisionGood";
_local6.baseHandleX = 0.5;
_local6.baseHandleY = 0.5;
_local6.basex = -1;
_local6.basey = -11;
_local6.animSpeed = 0;
_arg2.addChild(_local6);
_local6 = new GameObject(_arg1, child3_embed, "", -1, -43);
_local6.name = "Collision";
_local6.baseHandleX = 0.5;
_local6.baseHandleY = 0.5;
_local6.basex = -1;
_local6.basey = -43;
_local6.animSpeed = 0;
_arg2.addChild(_local6);
_local6 = new GameObject(_arg1, child4_embed, "", -1, 42);
_local6.name = "Collision";
_local6.baseHandleX = 0.5;
_local6.baseHandleY = 0.5;
_local6.basex = -1;
_local6.basey = 42;
_local6.animSpeed = 0;
_arg2.addChild(_local6);
_local6 = new GameObject(_arg1, child5_embed, "Stars", -1, -68);
_local6.name = "Success";
_local6.baseHandleX = 0.5;
_local6.baseHandleY = 0.5;
_local6.basex = -1;
_local6.basey = -68;
_local6.animSpeed = 0;
_local7 = new GameObjectFilterDampenInterpolateIn();
_local6.addFilter(_local7);
GameObjectFilterDampenInterpolateIn(_local7).Delay = 0;
GameObjectFilterDampenInterpolateIn(_local7).FadeTime = 100;
GameObjectFilterDampenInterpolateIn(_local7).dx = 0;
GameObjectFilterDampenInterpolateIn(_local7).dy = -100;
_local7 = new GameObjectFilterFadeInOut();
_local6.addFilter(_local7);
GameObjectFilterFadeInOut(_local7).FadeIn = 1;
GameObjectFilterFadeInOut(_local7).FadeInDelay = 0;
GameObjectFilterFadeInOut(_local7).FadeInDuration = 82;
GameObjectFilterFadeInOut(_local7).FadeOut = 0;
GameObjectFilterFadeInOut(_local7).FadeOutTime = 0;
GameObjectFilterFadeInOut(_local7).FadeOutDuration = 0;
_local7 = new GameObjectFilterScaleInOut();
_local6.addFilter(_local7);
GameObjectFilterScaleInOut(_local7).ScaleIn = 1;
GameObjectFilterScaleInOut(_local7).ScaleInDelay = 0;
GameObjectFilterScaleInOut(_local7).ScaleInDuration = 100;
GameObjectFilterScaleInOut(_local7).ScaleInStartX = 1;
GameObjectFilterScaleInOut(_local7).ScaleInStartY = 0;
GameObjectFilterScaleInOut(_local7).ScaleOut = 0;
GameObjectFilterScaleInOut(_local7).ScaleOutTime = 0;
GameObjectFilterScaleInOut(_local7).ScaleOutDuration = 0;
GameObjectFilterScaleInOut(_local7).ScaleOutEndX = 1;
GameObjectFilterScaleInOut(_local7).ScaleOutEndY = 1;
_arg2.addChild(_local6);
_local6 = new GameObject(_arg1, child6_embed, "ObstacleBack", 0, 0);
_local6.name = "";
_local6.baseHandleX = 0.5;
_local6.baseHandleY = 0.5;
_local6.basex = 0;
_local6.basey = 0;
_local6.animSpeed = 0;
_arg2.addChild(_local6);
}
}
}//package ObjectConstructors
Section 299
//PipeRoll_constructor (ObjectConstructors.PipeRoll_constructor)
package ObjectConstructors {
import GameScene.*;
import Particles.*;
import flash.display.*;
import GameObject.*;
import Objects.*;
import GlobalSetup.*;
public class PipeRoll_constructor {
public static var baseim_embed:Class = Embeds.pipe_roll_png;
public static var child1:BitmapData = new Embeds.pipecollision_png().bitmapData;
public static var child2:BitmapData = new Embeds.pipecollision_png().bitmapData;
public static var child3:BitmapData = new Embeds.pipecollisiongood_png().bitmapData;
public static var child4:BitmapData = new Embeds.tick_png().bitmapData;
public static var child5:BitmapData = new Embeds.pipeback_roll_png().bitmapData;
public static var LayerName:String = "ObstacleFront";
public static var child1_embed:Class = Embeds.pipecollision_png;
public static var child3_embed:Class = Embeds.pipecollisiongood_png;
public static var child4_embed:Class = Embeds.tick_png;
public static var child5_embed:Class = Embeds.pipeback_roll_png;
public static var baseim:BitmapData = new Embeds.pipe_roll_png().bitmapData;
public static var child2_embed:Class = Embeds.pipecollision_png;
public static function setup(_arg1:GameScene, _arg2:GameObject):void{
var _local3:GameObjectFilter;
var _local4:ParticleEmitter;
var _local5:ParticleFilter;
var _local6:GameObject;
var _local7:GameObjectFilter;
_arg2.baseHandleX = 0.5;
_arg2.baseHandleY = 0.5;
_arg2.addConditionalParticleArray(globalParticles.getParticles());
_arg2.animSpeed = 0;
_local6 = new GameObject(_arg1, child1_embed, "ObstacleFront", -1, -36);
_local6.name = "Collision";
_local6.baseHandleX = 0.5;
_local6.baseHandleY = 0.5;
_local6.basex = -1;
_local6.basey = -36;
_local6.animSpeed = 0;
_arg2.addChild(_local6);
_local6 = new GameObject(_arg1, child2_embed, "ObstacleFront", 0, 36);
_local6.name = "Collision";
_local6.baseHandleX = 0.5;
_local6.baseHandleY = 0.5;
_local6.basex = 0;
_local6.basey = 36;
_local6.animSpeed = 0;
_arg2.addChild(_local6);
_local6 = new GameObject(_arg1, child3_embed, "ObstacleFront", 0, 0);
_local6.name = "CollisionGood";
_local6.baseHandleX = 0.5;
_local6.baseHandleY = 0.5;
_local6.basex = 0;
_local6.basey = 0;
_local6.animSpeed = 0;
_arg2.addChild(_local6);
_local6 = new GameObject(_arg1, child4_embed, "Stars", 1, -52);
_local6.name = "Success";
_local6.baseHandleX = 0.5;
_local6.baseHandleY = 0.5;
_local6.basex = 1;
_local6.basey = -52;
_local6.animSpeed = 0;
_local7 = new GameObjectFilterDampenInterpolateIn();
_local6.addFilter(_local7);
GameObjectFilterDampenInterpolateIn(_local7).Delay = 0;
GameObjectFilterDampenInterpolateIn(_local7).FadeTime = 100;
GameObjectFilterDampenInterpolateIn(_local7).dx = 0;
GameObjectFilterDampenInterpolateIn(_local7).dy = -100;
_local7 = new GameObjectFilterFadeInOut();
_local6.addFilter(_local7);
GameObjectFilterFadeInOut(_local7).FadeIn = 1;
GameObjectFilterFadeInOut(_local7).FadeInDelay = 0;
GameObjectFilterFadeInOut(_local7).FadeInDuration = 82;
GameObjectFilterFadeInOut(_local7).FadeOut = 0;
GameObjectFilterFadeInOut(_local7).FadeOutTime = 0;
GameObjectFilterFadeInOut(_local7).FadeOutDuration = 0;
_local7 = new GameObjectFilterScaleInOut();
_local6.addFilter(_local7);
GameObjectFilterScaleInOut(_local7).ScaleIn = 1;
GameObjectFilterScaleInOut(_local7).ScaleInDelay = 0;
GameObjectFilterScaleInOut(_local7).ScaleInDuration = 100;
GameObjectFilterScaleInOut(_local7).ScaleInStartX = 1;
GameObjectFilterScaleInOut(_local7).ScaleInStartY = 0;
GameObjectFilterScaleInOut(_local7).ScaleOut = 0;
GameObjectFilterScaleInOut(_local7).ScaleOutTime = 0;
GameObjectFilterScaleInOut(_local7).ScaleOutDuration = 0;
GameObjectFilterScaleInOut(_local7).ScaleOutEndX = 1;
GameObjectFilterScaleInOut(_local7).ScaleOutEndY = 1;
_arg2.addChild(_local6);
_local6 = new GameObject(_arg1, child5_embed, "ObstacleBack", 0, 0);
_local6.name = "";
_local6.baseHandleX = 0.5;
_local6.baseHandleY = 0.5;
_local6.basex = 0;
_local6.basey = 0;
_local6.animSpeed = 0;
_arg2.addChild(_local6);
}
}
}//package ObjectConstructors
Section 300
//Plane_constructor (ObjectConstructors.Plane_constructor)
package ObjectConstructors {
import GameScene.*;
import Particles.*;
import flash.display.*;
import GameObject.*;
import Objects.*;
import GlobalSetup.*;
public class Plane_constructor {
public static var par4_2_embed:Class = Embeds.smoke_a002_png;
public static var par1_6_embed:Class = Embeds.smoke_d006_png;
public static var par5_6_embed:Class = Embeds.smoke_b006_png;
public static var par4_15_embed:Class = Embeds.smoke_a015_png;
public static var roll_24_embed:Class = Embeds.p1_roll024_png;
public static var par5_11_embed:Class = Embeds.smoke_b011_png;
public static var par7_14_embed:Class = Embeds.smoke_a014_png;
public static var par3_3_embed:Class = Embeds.smoke_c003_png;
public static var roll_18_embed:Class = Embeds.p1_roll018_png;
public static var par7_3_embed:Class = Embeds.smoke_a003_png;
public static var par4_7_embed:Class = Embeds.smoke_a007_png;
public static var roll_29_embed:Class = Embeds.p1_roll029_png;
public static var planecrash_embed:Class = Embeds.planecrash_png;
public static var par1_10_embed:Class = Embeds.smoke_d010_png;
public static var par3_13_embed:Class = Embeds.smoke_c013_png;
public static var par5_16_embed:Class = Embeds.smoke_b016_png;
public static var roll:Array = [roll_1, roll_2, roll_3, roll_4, roll_5, roll_6, roll_7, roll_8, roll_9, roll_10, roll_11, roll_12, roll_13, roll_14, roll_15, roll_16, roll_17, roll_18, roll_19, roll_20, roll_21, roll_22, roll_23, roll_24, roll_25, roll_26, roll_27, roll_28, roll_29, roll_30, roll_31, roll_32];
public static var par3_8_embed:Class = Embeds.smoke_c008_png;
public static var par7_8_embed:Class = Embeds.smoke_a008_png;
public static var roll_5_embed:Class = Embeds.p1_roll005_png;
public static var par1_15_embed:Class = Embeds.smoke_d015_png;
public static var roll_12_embed:Class = Embeds.p1_roll012_png;
public static var par4_1_embed:Class = Embeds.smoke_a001_png;
public static var par1_5_embed:Class = Embeds.smoke_d005_png;
public static var par5_5_embed:Class = Embeds.smoke_b005_png;
public static var par4_14_embed:Class = Embeds.smoke_a014_png;
public static var par2_embed:Class = Embeds.shot_png;
public static var roll_23_embed:Class = Embeds.p1_roll023_png;
public static var par5_10_embed:Class = Embeds.smoke_b010_png;
public static var par7_13_embed:Class = Embeds.smoke_a013_png;
public static var roll_1:BitmapData = new Embeds.p1_roll001_png().bitmapData;
public static var roll_2:BitmapData = new Embeds.p1_roll002_png().bitmapData;
public static var roll_3:BitmapData = new Embeds.p1_roll003_png().bitmapData;
public static var roll_4:BitmapData = new Embeds.p1_roll004_png().bitmapData;
public static var roll_5:BitmapData = new Embeds.p1_roll005_png().bitmapData;
public static var roll_6:BitmapData = new Embeds.p1_roll006_png().bitmapData;
public static var roll_7:BitmapData = new Embeds.p1_roll007_png().bitmapData;
public static var roll_8:BitmapData = new Embeds.p1_roll008_png().bitmapData;
public static var roll_9:BitmapData = new Embeds.p1_roll009_png().bitmapData;
public static var par3_2_embed:Class = Embeds.smoke_c002_png;
public static var roll_17_embed:Class = Embeds.p1_roll017_png;
public static var par7_2_embed:Class = Embeds.smoke_a002_png;
public static var par4_6_embed:Class = Embeds.smoke_a006_png;
public static var par1_10:BitmapData = new Embeds.smoke_d010_png().bitmapData;
public static var par1_11:BitmapData = new Embeds.smoke_d011_png().bitmapData;
public static var par1_12:BitmapData = new Embeds.smoke_d012_png().bitmapData;
public static var par1_13:BitmapData = new Embeds.smoke_d013_png().bitmapData;
public static var par1_14:BitmapData = new Embeds.smoke_d014_png().bitmapData;
public static var par1_15:BitmapData = new Embeds.smoke_d015_png().bitmapData;
public static var par1_16:BitmapData = new Embeds.smoke_d016_png().bitmapData;
public static var roll_10:BitmapData = new Embeds.p1_roll010_png().bitmapData;
public static var roll_12:BitmapData = new Embeds.p1_roll012_png().bitmapData;
public static var roll_13:BitmapData = new Embeds.p1_roll013_png().bitmapData;
public static var roll_14:BitmapData = new Embeds.p1_roll014_png().bitmapData;
public static var roll_15:BitmapData = new Embeds.p1_roll015_png().bitmapData;
public static var roll_16:BitmapData = new Embeds.p1_roll016_png().bitmapData;
public static var par3_12_embed:Class = Embeds.smoke_c012_png;
public static var par5_15_embed:Class = Embeds.smoke_b015_png;
public static var roll_19:BitmapData = new Embeds.p1_roll019_png().bitmapData;
public static var roll_17:BitmapData = new Embeds.p1_roll017_png().bitmapData;
public static var roll_18:BitmapData = new Embeds.p1_roll018_png().bitmapData;
public static var roll_11:BitmapData = new Embeds.p1_roll011_png().bitmapData;
public static var roll_28_embed:Class = Embeds.p1_roll028_png;
public static var roll_20:BitmapData = new Embeds.p1_roll020_png().bitmapData;
public static var roll_21:BitmapData = new Embeds.p1_roll021_png().bitmapData;
public static var roll_22:BitmapData = new Embeds.p1_roll022_png().bitmapData;
public static var roll_23:BitmapData = new Embeds.p1_roll023_png().bitmapData;
public static var par3_7_embed:Class = Embeds.smoke_c007_png;
public static var roll_25:BitmapData = new Embeds.p1_roll025_png().bitmapData;
public static var roll_26:BitmapData = new Embeds.p1_roll026_png().bitmapData;
public static var par7_7_embed:Class = Embeds.smoke_a007_png;
public static var roll_29:BitmapData = new Embeds.p1_roll029_png().bitmapData;
public static var roll_24:BitmapData = new Embeds.p1_roll024_png().bitmapData;
public static var roll_28:BitmapData = new Embeds.p1_roll028_png().bitmapData;
public static var roll_4_embed:Class = Embeds.p1_roll004_png;
public static var roll_27:BitmapData = new Embeds.p1_roll027_png().bitmapData;
public static var roll_31:BitmapData = new Embeds.p1_roll031_png().bitmapData;
public static var roll_30:BitmapData = new Embeds.p1_roll030_png().bitmapData;
public static var roll_32:BitmapData = new Embeds.p1_roll032_png().bitmapData;
public static var par1_14_embed:Class = Embeds.smoke_d014_png;
public static var roll_11_embed:Class = Embeds.p1_roll011_png;
public static var par1_4_embed:Class = Embeds.smoke_d004_png;
public static var par5_4_embed:Class = Embeds.smoke_b004_png;
public static var par4_13_embed:Class = Embeds.smoke_a013_png;
public static var roll_9_embed:Class = Embeds.p1_roll009_png;
public static var roll_22_embed:Class = Embeds.p1_roll022_png;
public static var par7_12_embed:Class = Embeds.smoke_a012_png;
public static var par3_1_embed:Class = Embeds.smoke_c001_png;
public static var roll_16_embed:Class = Embeds.p1_roll016_png;
public static var par7_1_embed:Class = Embeds.smoke_a001_png;
public static var par4_5_embed:Class = Embeds.smoke_a005_png;
public static var par1_9_embed:Class = Embeds.smoke_d009_png;
public static var par3_11:BitmapData = new Embeds.smoke_c011_png().bitmapData;
public static var baseim_embed:Class = Embeds.p1_roll001_png;
public static var par3_10:BitmapData = new Embeds.smoke_c010_png().bitmapData;
public static var par3_12:BitmapData = new Embeds.smoke_c012_png().bitmapData;
public static var par3_14:BitmapData = new Embeds.smoke_c014_png().bitmapData;
public static var par3_15:BitmapData = new Embeds.smoke_c015_png().bitmapData;
public static var par3_16:BitmapData = new Embeds.smoke_c016_png().bitmapData;
public static var roll_27_embed:Class = Embeds.p1_roll027_png;
public static var par3_13:BitmapData = new Embeds.smoke_c013_png().bitmapData;
public static var par7_2:BitmapData = new Embeds.smoke_a002_png().bitmapData;
public static var par7_4:BitmapData = new Embeds.smoke_a004_png().bitmapData;
public static var par7_5:BitmapData = new Embeds.smoke_a005_png().bitmapData;
public static var par7_6:BitmapData = new Embeds.smoke_a006_png().bitmapData;
public static var par3_11_embed:Class = Embeds.smoke_c011_png;
public static var par5_14_embed:Class = Embeds.smoke_b014_png;
public static var par7_9:BitmapData = new Embeds.smoke_a009_png().bitmapData;
public static var par6_embed:Class = Embeds.shot2_png;
public static var par5_9_embed:Class = Embeds.smoke_b009_png;
public static var par7_8:BitmapData = new Embeds.smoke_a008_png().bitmapData;
public static var par7_1:BitmapData = new Embeds.smoke_a001_png().bitmapData;
public static var par7_3:BitmapData = new Embeds.smoke_a003_png().bitmapData;
public static var par7_7:BitmapData = new Embeds.smoke_a007_png().bitmapData;
public static var par3_6_embed:Class = Embeds.smoke_c006_png;
public static var par7_6_embed:Class = Embeds.smoke_a006_png;
public static var roll_3_embed:Class = Embeds.p1_roll003_png;
public static var par1_13_embed:Class = Embeds.smoke_d013_png;
public static var par3_16_embed:Class = Embeds.smoke_c016_png;
public static var par4_12:BitmapData = new Embeds.smoke_a012_png().bitmapData;
public static var par4_13:BitmapData = new Embeds.smoke_a013_png().bitmapData;
public static var par4_14:BitmapData = new Embeds.smoke_a014_png().bitmapData;
public static var par4_15:BitmapData = new Embeds.smoke_a015_png().bitmapData;
public static var par4_16:BitmapData = new Embeds.smoke_a016_png().bitmapData;
public static var par4_10:BitmapData = new Embeds.smoke_a010_png().bitmapData;
public static var par4_11:BitmapData = new Embeds.smoke_a011_png().bitmapData;
public static var roll_10_embed:Class = Embeds.p1_roll010_png;
public static var par1_3_embed:Class = Embeds.smoke_d003_png;
public static var par5_3_embed:Class = Embeds.smoke_b003_png;
public static var par4_12_embed:Class = Embeds.smoke_a012_png;
public static var roll_8_embed:Class = Embeds.p1_roll008_png;
public static var roll_21_embed:Class = Embeds.p1_roll021_png;
public static var par7_11_embed:Class = Embeds.smoke_a011_png;
public static var par5_1:BitmapData = new Embeds.smoke_b001_png().bitmapData;
public static var par5_2:BitmapData = new Embeds.smoke_b002_png().bitmapData;
public static var par5_3:BitmapData = new Embeds.smoke_b003_png().bitmapData;
public static var par5_4:BitmapData = new Embeds.smoke_b004_png().bitmapData;
public static var par5_5:BitmapData = new Embeds.smoke_b005_png().bitmapData;
public static var par5_6:BitmapData = new Embeds.smoke_b006_png().bitmapData;
public static var par5_7:BitmapData = new Embeds.smoke_b007_png().bitmapData;
public static var par5_8:BitmapData = new Embeds.smoke_b008_png().bitmapData;
public static var par5_9:BitmapData = new Embeds.smoke_b009_png().bitmapData;
public static var roll_32_embed:Class = Embeds.p1_roll032_png;
public static var roll_15_embed:Class = Embeds.p1_roll015_png;
public static var par1_8_embed:Class = Embeds.smoke_d008_png;
public static var par5_8_embed:Class = Embeds.smoke_b008_png;
public static var par4_4_embed:Class = Embeds.smoke_a004_png;
public static var par5_10:BitmapData = new Embeds.smoke_b010_png().bitmapData;
public static var par5_11:BitmapData = new Embeds.smoke_b011_png().bitmapData;
public static var par5_13:BitmapData = new Embeds.smoke_b013_png().bitmapData;
public static var par5_14:BitmapData = new Embeds.smoke_b014_png().bitmapData;
public static var par5_15:BitmapData = new Embeds.smoke_b015_png().bitmapData;
public static var par5_16:BitmapData = new Embeds.smoke_b016_png().bitmapData;
public static var par5_12:BitmapData = new Embeds.smoke_b012_png().bitmapData;
public static var par4_1:BitmapData = new Embeds.smoke_a001_png().bitmapData;
public static var par4_2:BitmapData = new Embeds.smoke_a002_png().bitmapData;
public static var par4_3:BitmapData = new Embeds.smoke_a003_png().bitmapData;
public static var par4_4:BitmapData = new Embeds.smoke_a004_png().bitmapData;
public static var par4_5:BitmapData = new Embeds.smoke_a005_png().bitmapData;
public static var par4_6:BitmapData = new Embeds.smoke_a006_png().bitmapData;
public static var par4_7:BitmapData = new Embeds.smoke_a007_png().bitmapData;
public static var par4_8:BitmapData = new Embeds.smoke_a008_png().bitmapData;
public static var par3_10_embed:Class = Embeds.smoke_c010_png;
public static var par5_13_embed:Class = Embeds.smoke_b013_png;
public static var par7_16_embed:Class = Embeds.smoke_a016_png;
public static var par4_9:BitmapData = new Embeds.smoke_a009_png().bitmapData;
public static var par3_5_embed:Class = Embeds.smoke_c005_png;
public static var par4_9_embed:Class = Embeds.smoke_a009_png;
public static var planecrash:BitmapData = new Embeds.planecrash_png().bitmapData;
public static var par7_5_embed:Class = Embeds.smoke_a005_png;
public static var roll_2_embed:Class = Embeds.p1_roll002_png;
public static var roll_26_embed:Class = Embeds.p1_roll026_png;
public static var par3_1:BitmapData = new Embeds.smoke_c001_png().bitmapData;
public static var par3_2:BitmapData = new Embeds.smoke_c002_png().bitmapData;
public static var par3_3:BitmapData = new Embeds.smoke_c003_png().bitmapData;
public static var par3_4:BitmapData = new Embeds.smoke_c004_png().bitmapData;
public static var par3_5:BitmapData = new Embeds.smoke_c005_png().bitmapData;
public static var par3_6:BitmapData = new Embeds.smoke_c006_png().bitmapData;
public static var par1_12_embed:Class = Embeds.smoke_d012_png;
public static var par3_15_embed:Class = Embeds.smoke_c015_png;
public static var par3_9:BitmapData = new Embeds.smoke_c009_png().bitmapData;
public static var par3_7:BitmapData = new Embeds.smoke_c007_png().bitmapData;
public static var par3_8:BitmapData = new Embeds.smoke_c008_png().bitmapData;
public static var par1_2_embed:Class = Embeds.smoke_d002_png;
public static var par5_2_embed:Class = Embeds.smoke_b002_png;
public static var par4_11_embed:Class = Embeds.smoke_a011_png;
public static var roll_7_embed:Class = Embeds.p1_roll007_png;
public static var roll_20_embed:Class = Embeds.p1_roll020_png;
public static var par7_10_embed:Class = Embeds.smoke_a010_png;
public static var roll_31_embed:Class = Embeds.p1_roll031_png;
public static var roll_14_embed:Class = Embeds.p1_roll014_png;
public static var par4_3_embed:Class = Embeds.smoke_a003_png;
public static var par1_7_embed:Class = Embeds.smoke_d007_png;
public static var par5_7_embed:Class = Embeds.smoke_b007_png;
public static var par7_10:BitmapData = new Embeds.smoke_a010_png().bitmapData;
public static var par7_11:BitmapData = new Embeds.smoke_a011_png().bitmapData;
public static var par7_12:BitmapData = new Embeds.smoke_a012_png().bitmapData;
public static var par4_16_embed:Class = Embeds.smoke_a016_png;
public static var par7_14:BitmapData = new Embeds.smoke_a014_png().bitmapData;
public static var par7_15:BitmapData = new Embeds.smoke_a015_png().bitmapData;
public static var par7_16:BitmapData = new Embeds.smoke_a016_png().bitmapData;
public static var par7_13:BitmapData = new Embeds.smoke_a013_png().bitmapData;
public static var LayerName:String = "Player";
public static var roll_25_embed:Class = Embeds.p1_roll025_png;
public static var par1_2:BitmapData = new Embeds.smoke_d002_png().bitmapData;
public static var par1_3:BitmapData = new Embeds.smoke_d003_png().bitmapData;
public static var par1_4:BitmapData = new Embeds.smoke_d004_png().bitmapData;
public static var par1_5:BitmapData = new Embeds.smoke_d005_png().bitmapData;
public static var par1_6:BitmapData = new Embeds.smoke_d006_png().bitmapData;
public static var par1_7:BitmapData = new Embeds.smoke_d007_png().bitmapData;
public static var par1_1:BitmapData = new Embeds.smoke_d001_png().bitmapData;
public static var par7_15_embed:Class = Embeds.smoke_a015_png;
public static var par1_8:BitmapData = new Embeds.smoke_d008_png().bitmapData;
public static var par1_9:BitmapData = new Embeds.smoke_d009_png().bitmapData;
public static var par5_12_embed:Class = Embeds.smoke_b012_png;
public static var par3_4_embed:Class = Embeds.smoke_c004_png;
public static var par7_4_embed:Class = Embeds.smoke_a004_png;
public static var roll_1_embed:Class = Embeds.p1_roll001_png;
public static var roll_19_embed:Class = Embeds.p1_roll019_png;
public static var par4_8_embed:Class = Embeds.smoke_a008_png;
public static var par1_11_embed:Class = Embeds.smoke_d011_png;
public static var par3_14_embed:Class = Embeds.smoke_c014_png;
public static var par1:Array = [par1_1, par1_2, par1_3, par1_4, par1_5, par1_6, par1_7, par1_8, par1_9, par1_10, par1_11, par1_12, par1_13, par1_14, par1_15, par1_16];
public static var par2:BitmapData = new Embeds.shot_png().bitmapData;
public static var par3:Array = [par3_1, par3_2, par3_3, par3_4, par3_5, par3_6, par3_7, par3_8, par3_9, par3_10, par3_11, par3_12, par3_13, par3_14, par3_15, par3_16];
public static var par4:Array = [par4_1, par4_2, par4_3, par4_4, par4_5, par4_6, par4_7, par4_8, par4_9, par4_10, par4_11, par4_12, par4_13, par4_14, par4_15, par4_16];
public static var par5:Array = [par5_1, par5_2, par5_3, par5_4, par5_5, par5_6, par5_7, par5_8, par5_9, par5_10, par5_11, par5_12, par5_13, par5_14, par5_15, par5_16];
public static var baseim:BitmapData = new Embeds.p1_roll001_png().bitmapData;
public static var par7:Array = [par7_1, par7_2, par7_3, par7_4, par7_5, par7_6, par7_7, par7_8, par7_9, par7_10, par7_11, par7_12, par7_13, par7_14, par7_15, par7_16];
public static var par1_1_embed:Class = Embeds.smoke_d001_png;
public static var par5_1_embed:Class = Embeds.smoke_b001_png;
public static var par6:BitmapData = new Embeds.shot2_png().bitmapData;
public static var par4_10_embed:Class = Embeds.smoke_a010_png;
public static var par3_9_embed:Class = Embeds.smoke_c009_png;
public static var par7_9_embed:Class = Embeds.smoke_a009_png;
public static var roll_6_embed:Class = Embeds.p1_roll006_png;
public static var par1_16_embed:Class = Embeds.smoke_d016_png;
public static var roll_30_embed:Class = Embeds.p1_roll030_png;
public static var roll_13_embed:Class = Embeds.p1_roll013_png;
public static function setup(_arg1:GameScene, _arg2:GameObject):void{
var _local3:GameObjectFilter;
var _local4:ParticleEmitter;
var _local5:ParticleFilter;
var _local6:GameObject;
var _local7:GameObjectFilter;
_arg2.baseHandleX = 0.5;
_arg2.baseHandleY = 0.5;
_local4 = new ParticleEmitter();
_local4.Name = "Destroy";
_local4.x = 0;
_local4.y = 0;
_local4.Frequency = 5;
_local4.lifelow = 274;
_local4.lifehigh = 342;
_local4.gravitylow = -9.99999975E-5;
_local4.gravityhigh = -0.000199999995;
_local4.xspeedlow = -0.25;
_local4.xspeedhigh = 0.25;
_local4.yspeedlow = -0.0200000014;
_local4.yspeedhigh = -0.0600000024;
_local4.startalpha = 1;
_local4.endalpha = 0;
_local4.rotatespeedtodirection = 1;
_local4.startrotationlow = -35;
_local4.startrotationhigh = 35;
_local4.dRotationLow = 0;
_local4.dRotationHigh = 0;
_local4.startScale = 2.9000001;
_local4.endScale = 1.60000002;
_local4.additive = 0;
_local4.layeroverride = "";
_local4.animspeed = 3;
_local4.animspeedrange = 0;
_local4.animframecap = 0;
_local4.Friction = 0.0450000018;
_local4.Test = 0;
_local4.StayAfterDeath = 0;
_local4.Identifier = "";
_local4.impath = "smoke-d***.png";
_local4.image = par1_1_embed;
_local4.imageSet = par1;
_arg2.conditionalParticles.push(_local4);
_local4 = new ParticleEmitter();
_local4.Name = "SmallDestroy";
_local4.x = 0;
_local4.y = 0;
_local4.Frequency = 8;
_local4.lifelow = 470;
_local4.lifehigh = 567;
_local4.gravitylow = 0.00799999945;
_local4.gravityhigh = 0.0199999996;
_local4.xspeedlow = -0.200000003;
_local4.xspeedhigh = 0.100000001;
_local4.yspeedlow = -0.5;
_local4.yspeedhigh = 0.5;
_local4.startalpha = 1;
_local4.endalpha = 0;
_local4.rotatespeedtodirection = 1;
_local4.startrotationlow = 0;
_local4.startrotationhigh = 5;
_local4.dRotationLow = 0.300000012;
_local4.dRotationHigh = 3;
_local4.startScale = 1;
_local4.endScale = 0.200000003;
_local4.additive = 0;
_local4.layeroverride = "";
_local4.animspeed = 1;
_local4.animspeedrange = 0;
_local4.animframecap = 0;
_local4.Friction = 0;
_local4.Test = 0;
_local4.StayAfterDeath = 0;
_local4.Identifier = "";
_local4.impath = "shot.png";
_local4.image = par2_embed;
_arg2.conditionalParticles.push(_local4);
_local4 = new ParticleEmitter();
_local4.Name = "SmallDestroyTrail";
_local4.x = -6;
_local4.y = 3.5999999;
_local4.Frequency = -1;
_local4.lifelow = 218;
_local4.lifehigh = 250;
_local4.gravitylow = -0.00100000005;
_local4.gravityhigh = -0.00200000009;
_local4.xspeedlow = -0.0209999997;
_local4.xspeedhigh = 0.0209999997;
_local4.yspeedlow = -0.0909999982;
_local4.yspeedhigh = 0.0410000011;
_local4.startalpha = 0.5;
_local4.endalpha = 0.00999999978;
_local4.rotatespeedtodirection = 0;
_local4.startrotationlow = 0;
_local4.startrotationhigh = 360;
_local4.dRotationLow = -0.899999976;
_local4.dRotationHigh = 0.899999976;
_local4.startScale = 0.5;
_local4.endScale = 1;
_local4.additive = 0;
_local4.layeroverride = "";
_local4.animspeed = 8;
_local4.animspeedrange = 0;
_local4.animframecap = 0;
_local4.Friction = 0;
_local4.Test = 0;
_local4.StayAfterDeath = 0;
_local4.Identifier = "";
_local4.impath = "smoke-c***.png";
_local4.image = par3_1_embed;
_local4.imageSet = par3;
_local5 = new ParticleFilterScaleIn();
_local4.addFilter(_local5);
ParticleFilterScaleIn(_local5).Frames = 43.5999985;
_arg2.conditionalParticles.push(_local4);
_local4 = new ParticleEmitter();
_local4.Name = "Smoke";
_local4.x = -6;
_local4.y = 3.5999999;
_local4.Frequency = -2;
_local4.lifelow = 97;
_local4.lifehigh = 179;
_local4.gravitylow = 0;
_local4.gravityhigh = -0.000500004971;
_local4.xspeedlow = -0.0500000007;
_local4.xspeedhigh = 0.0500000007;
_local4.yspeedlow = -0.0399999991;
_local4.yspeedhigh = 0.0399999991;
_local4.startalpha = 0.800000012;
_local4.endalpha = 0;
_local4.rotatespeedtodirection = 0;
_local4.startrotationlow = -20;
_local4.startrotationhigh = 20;
_local4.dRotationLow = 0.100000009;
_local4.dRotationHigh = 0.220000029;
_local4.startScale = 0.5;
_local4.endScale = 0.699999988;
_local4.additive = 0;
_local4.layeroverride = "";
_local4.animspeed = 10;
_local4.animspeedrange = 0;
_local4.animframecap = 0;
_local4.Friction = 0;
_local4.Test = 0;
_local4.StayAfterDeath = 0;
_local4.Identifier = "";
_local4.impath = "smoke-a***.png";
_local4.image = par4_1_embed;
_local4.imageSet = par4;
_local5 = new ParticleFilterScaleIn();
_local4.addFilter(_local5);
ParticleFilterScaleIn(_local5).Frames = 43.5999985;
_arg2.conditionalParticles.push(_local4);
_local4 = new ParticleEmitter();
_local4.Name = "RedSmoke";
_local4.x = -6;
_local4.y = 3.5999999;
_local4.Frequency = -1;
_local4.lifelow = 69;
_local4.lifehigh = 98;
_local4.gravitylow = 0;
_local4.gravityhigh = -0.000500004971;
_local4.xspeedlow = -0.0500000007;
_local4.xspeedhigh = 0.0500000007;
_local4.yspeedlow = -0.0399999991;
_local4.yspeedhigh = 0.0399999991;
_local4.startalpha = 0.900000036;
_local4.endalpha = 0;
_local4.rotatespeedtodirection = 0;
_local4.startrotationlow = -20;
_local4.startrotationhigh = 20;
_local4.dRotationLow = 0.400000006;
_local4.dRotationHigh = 0.720000029;
_local4.startScale = 0.600000024;
_local4.endScale = 0.949999988;
_local4.additive = 0;
_local4.layeroverride = "";
_local4.animspeed = 10;
_local4.animspeedrange = 0;
_local4.animframecap = 0;
_local4.Friction = 0;
_local4.Test = 0;
_local4.StayAfterDeath = 0;
_local4.Identifier = "";
_local4.impath = "smoke-b***.png";
_local4.image = par5_1_embed;
_local4.imageSet = par5;
_local5 = new ParticleFilterScaleIn();
_local4.addFilter(_local5);
ParticleFilterScaleIn(_local5).Frames = 43.5999985;
_arg2.conditionalParticles.push(_local4);
_local4 = new ParticleEmitter();
_local4.Name = "Destroy";
_local4.x = 0;
_local4.y = 0;
_local4.Frequency = 30;
_local4.lifelow = 470;
_local4.lifehigh = 567;
_local4.gravitylow = 0.00999999978;
_local4.gravityhigh = 0.0399999991;
_local4.xspeedlow = -2.0999999;
_local4.xspeedhigh = 2.0999999;
_local4.yspeedlow = -0.5;
_local4.yspeedhigh = -3.5;
_local4.startalpha = 1;
_local4.endalpha = 0.699999988;
_local4.rotatespeedtodirection = 1;
_local4.startrotationlow = 0;
_local4.startrotationhigh = 1;
_local4.dRotationLow = 0.300000012;
_local4.dRotationHigh = 15;
_local4.startScale = 1;
_local4.endScale = 0;
_local4.additive = 0;
_local4.layeroverride = "";
_local4.animspeed = 1;
_local4.animspeedrange = 0;
_local4.animframecap = 0;
_local4.Friction = 0;
_local4.Test = 0;
_local4.StayAfterDeath = 0;
_local4.Identifier = "";
_local4.impath = "shot2.png";
_local4.image = par6_embed;
_arg2.conditionalParticles.push(_local4);
_local4 = new ParticleEmitter();
_local4.Name = "RedSmokeLots";
_local4.x = -6;
_local4.y = 3.5999999;
_local4.Frequency = 0;
_local4.lifelow = 52;
_local4.lifehigh = 76;
_local4.gravitylow = 0;
_local4.gravityhigh = -0.000500004971;
_local4.xspeedlow = -0.0500000007;
_local4.xspeedhigh = 0.0500000007;
_local4.yspeedlow = -0.0399999991;
_local4.yspeedhigh = 0.0399999991;
_local4.startalpha = 0.800000012;
_local4.endalpha = 0;
_local4.rotatespeedtodirection = 0;
_local4.startrotationlow = -20;
_local4.startrotationhigh = 20;
_local4.dRotationLow = 0.400000006;
_local4.dRotationHigh = 0.720000029;
_local4.startScale = 0.600000024;
_local4.endScale = 0.949999988;
_local4.additive = 0;
_local4.layeroverride = "";
_local4.animspeed = 10;
_local4.animspeedrange = 0;
_local4.animframecap = 0;
_local4.Friction = 0;
_local4.Test = 0;
_local4.StayAfterDeath = 0;
_local4.Identifier = "";
_local4.impath = "smoke-a***.png";
_local4.image = par7_1_embed;
_local4.imageSet = par7;
_local5 = new ParticleFilterScaleIn();
_local4.addFilter(_local5);
ParticleFilterScaleIn(_local5).Frames = 43.5999985;
_arg2.conditionalParticles.push(_local4);
_arg2.addConditionalParticleArray(globalParticles.getParticles());
_arg2.animSpeed = 0;
Plane(_arg2).planecrash = planecrash;
Plane(_arg2).roll = roll;
}
}
}//package ObjectConstructors
Section 301
//PlaneProp_constructor (ObjectConstructors.PlaneProp_constructor)
package ObjectConstructors {
import GameScene.*;
import Particles.*;
import flash.display.*;
import GameObject.*;
import Objects.*;
import GlobalSetup.*;
public class PlaneProp_constructor {
public static var baseim:BitmapData = new Embeds.plane_prop_png().bitmapData;
public static var LayerName:String = "Player";
public static var baseim_embed:Class = Embeds.plane_prop_png;
public static function setup(_arg1:GameScene, _arg2:GameObject):void{
var _local3:GameObjectFilter;
var _local4:ParticleEmitter;
var _local5:ParticleFilter;
var _local6:GameObject;
var _local7:GameObjectFilter;
_arg2.baseHandleX = 0.5;
_arg2.baseHandleY = 0.5;
_arg2.addConditionalParticleArray(globalParticles.getParticles());
_arg2.animSpeed = 0;
}
}
}//package ObjectConstructors
Section 302
//Pole_constructor (ObjectConstructors.Pole_constructor)
package ObjectConstructors {
import GameScene.*;
import Particles.*;
import flash.display.*;
import GameObject.*;
import Objects.*;
import GlobalSetup.*;
public class Pole_constructor {
public static var child1:BitmapData = new Embeds.pole_png().bitmapData;
public static var baseim:BitmapData = new Embeds.pole_png().bitmapData;
public static var child1_embed:Class = Embeds.pole_png;
public static var LayerName:String = "ObstacleBack";
public static var baseim_embed:Class = Embeds.pole_png;
public static function setup(_arg1:GameScene, _arg2:GameObject):void{
var _local3:GameObjectFilter;
var _local4:ParticleEmitter;
var _local5:ParticleFilter;
var _local6:GameObject;
var _local7:GameObjectFilter;
_arg2.baseHandleX = 0.5;
_arg2.baseHandleY = 0.5;
_arg2.addConditionalParticleArray(globalParticles.getParticles());
_arg2.animSpeed = 0;
_local6 = new GameObject(_arg1, child1_embed, "ObstacleBack", 0, 0);
_local6.name = "Collision";
_local6.baseHandleX = 0.5;
_local6.baseHandleY = 0.5;
_local6.basex = 0;
_local6.basey = 0;
_local6.animSpeed = 0;
_arg2.addChild(_local6);
}
}
}//package ObjectConstructors
Section 303
//Rock1_constructor (ObjectConstructors.Rock1_constructor)
package ObjectConstructors {
import GameScene.*;
import Particles.*;
import flash.display.*;
import GameObject.*;
import Objects.*;
import GlobalSetup.*;
public class Rock1_constructor {
public static var baseim_embed:Class = Embeds.rock_1_png;
public static var child1:BitmapData = new Embeds.collisiontall_png().bitmapData;
public static var child2:BitmapData = new Embeds.collisionhuge_png().bitmapData;
public static var child3:BitmapData = new Embeds.collisionbig_png().bitmapData;
public static var child4:BitmapData = new Embeds.collisionbig_png().bitmapData;
public static var child5:BitmapData = new Embeds.collisionbig_png().bitmapData;
public static var LayerName:String = "";
public static var child1_embed:Class = Embeds.collisiontall_png;
public static var child3_embed:Class = Embeds.collisionbig_png;
public static var child4_embed:Class = Embeds.collisionbig_png;
public static var child5_embed:Class = Embeds.collisionbig_png;
public static var baseim:BitmapData = new Embeds.rock_1_png().bitmapData;
public static var child2_embed:Class = Embeds.collisionhuge_png;
public static function setup(_arg1:GameScene, _arg2:GameObject):void{
var _local3:GameObjectFilter;
var _local4:ParticleEmitter;
var _local5:ParticleFilter;
var _local6:GameObject;
var _local7:GameObjectFilter;
_arg2.baseHandleX = 0.5;
_arg2.baseHandleY = 0.5;
_arg2.addConditionalParticleArray(globalParticles.getParticles());
_arg2.animSpeed = 0;
_local6 = new GameObject(_arg1, child1_embed, "", -4, -35);
_local6.name = "Collision";
_local6.baseHandleX = 0.5;
_local6.baseHandleY = 0.5;
_local6.basex = -4;
_local6.basey = -35;
_local6.animSpeed = 0;
_arg2.addChild(_local6);
_local6 = new GameObject(_arg1, child2_embed, "", -10, 62);
_local6.name = "Collision";
_local6.baseHandleX = 0.5;
_local6.baseHandleY = 0.5;
_local6.basex = -10;
_local6.basey = 62;
_local6.animSpeed = 0;
_arg2.addChild(_local6);
_local6 = new GameObject(_arg1, child3_embed, "", -33, 82);
_local6.name = "Collision";
_local6.baseHandleX = 0.5;
_local6.baseHandleY = 0.5;
_local6.basex = -33;
_local6.basey = 82;
_local6.animSpeed = 0;
_arg2.addChild(_local6);
_local6 = new GameObject(_arg1, child4_embed, "", 50, 100);
_local6.name = "Collision";
_local6.baseHandleX = 0.5;
_local6.baseHandleY = 0.5;
_local6.basex = 50;
_local6.basey = 100;
_local6.animSpeed = 0;
_arg2.addChild(_local6);
_local6 = new GameObject(_arg1, child5_embed, "", 20, 57);
_local6.name = "Collision";
_local6.baseHandleX = 0.5;
_local6.baseHandleY = 0.5;
_local6.basex = 20;
_local6.basey = 57;
_local6.animSpeed = 0;
_arg2.addChild(_local6);
}
}
}//package ObjectConstructors
Section 304
//Rock2_constructor (ObjectConstructors.Rock2_constructor)
package ObjectConstructors {
import GameScene.*;
import Particles.*;
import flash.display.*;
import GameObject.*;
import Objects.*;
import GlobalSetup.*;
public class Rock2_constructor {
public static var LayerName:String = "";
public static var child3_embed:Class = Embeds.collisionhuge_png;
public static var child1_embed:Class = Embeds.CollisionTall_png;
public static var child2_embed:Class = Embeds.collisionhuge_png;
public static var child1:BitmapData = new Embeds.CollisionTall_png().bitmapData;
public static var baseim_embed:Class = Embeds.rock_2_png;
public static var child3:BitmapData = new Embeds.collisionhuge_png().bitmapData;
public static var baseim:BitmapData = new Embeds.rock_2_png().bitmapData;
public static var child2:BitmapData = new Embeds.collisionhuge_png().bitmapData;
public static function setup(_arg1:GameScene, _arg2:GameObject):void{
var _local3:GameObjectFilter;
var _local4:ParticleEmitter;
var _local5:ParticleFilter;
var _local6:GameObject;
var _local7:GameObjectFilter;
_arg2.baseHandleX = 0.5;
_arg2.baseHandleY = 0.5;
_arg2.addConditionalParticleArray(globalParticles.getParticles());
_arg2.animSpeed = 0;
_local6 = new GameObject(_arg1, child1_embed, "", -1, -18);
_local6.name = "Collision";
_local6.baseHandleX = 0.5;
_local6.baseHandleY = 0.5;
_local6.basex = -1;
_local6.basey = -18;
_local6.animSpeed = 0;
_arg2.addChild(_local6);
_local6 = new GameObject(_arg1, child2_embed, "", 26, 84);
_local6.name = "Collision";
_local6.baseHandleX = 0.5;
_local6.baseHandleY = 0.5;
_local6.basex = 26;
_local6.basey = 84;
_local6.animSpeed = 0;
_arg2.addChild(_local6);
_local6 = new GameObject(_arg1, child3_embed, "", -23, 83);
_local6.name = "Collision";
_local6.baseHandleX = 0.5;
_local6.baseHandleY = 0.5;
_local6.basex = -23;
_local6.basey = 83;
_local6.animSpeed = 0;
_arg2.addChild(_local6);
}
}
}//package ObjectConstructors
Section 305
//Tree1_constructor (ObjectConstructors.Tree1_constructor)
package ObjectConstructors {
import GameScene.*;
import Particles.*;
import flash.display.*;
import GameObject.*;
import Objects.*;
import GlobalSetup.*;
public class Tree1_constructor {
public static var LayerName:String = "";
public static var child1_embed:Class = Embeds.collisionbig_png;
public static var child2_embed:Class = Embeds.pipecollisiongood_png;
public static var child1:BitmapData = new Embeds.collisionbig_png().bitmapData;
public static var baseim_embed:Class = Embeds.tree1_png;
public static var baseim:BitmapData = new Embeds.tree1_png().bitmapData;
public static var child2:BitmapData = new Embeds.pipecollisiongood_png().bitmapData;
public static function setup(_arg1:GameScene, _arg2:GameObject):void{
var _local3:GameObjectFilter;
var _local4:ParticleEmitter;
var _local5:ParticleFilter;
var _local6:GameObject;
var _local7:GameObjectFilter;
_arg2.baseHandleX = 0.5;
_arg2.baseHandleY = 0.5;
_arg2.addConditionalParticleArray(globalParticles.getParticles());
_arg2.animSpeed = 0;
_local6 = new GameObject(_arg1, child1_embed, "", 0, -28);
_local6.name = "Collision";
_local6.baseHandleX = 0.5;
_local6.baseHandleY = 0.5;
_local6.basex = 0;
_local6.basey = -28;
_local6.animSpeed = 0;
_arg2.addChild(_local6);
_local6 = new GameObject(_arg1, child2_embed, "", -2, 8);
_local6.name = "Collision";
_local6.baseHandleX = 0.5;
_local6.baseHandleY = 0.5;
_local6.basex = -2;
_local6.basey = 8;
_local6.animSpeed = 0;
_arg2.addChild(_local6);
}
}
}//package ObjectConstructors
Section 306
//Tree2_constructor (ObjectConstructors.Tree2_constructor)
package ObjectConstructors {
import GameScene.*;
import Particles.*;
import flash.display.*;
import GameObject.*;
import Objects.*;
import GlobalSetup.*;
public class Tree2_constructor {
public static var LayerName:String = "";
public static var child1_embed:Class = Embeds.collisionbig_png;
public static var child2_embed:Class = Embeds.pipecollisiongood_png;
public static var child1:BitmapData = new Embeds.collisionbig_png().bitmapData;
public static var baseim_embed:Class = Embeds.tree2_png;
public static var baseim:BitmapData = new Embeds.tree2_png().bitmapData;
public static var child2:BitmapData = new Embeds.pipecollisiongood_png().bitmapData;
public static function setup(_arg1:GameScene, _arg2:GameObject):void{
var _local3:GameObjectFilter;
var _local4:ParticleEmitter;
var _local5:ParticleFilter;
var _local6:GameObject;
var _local7:GameObjectFilter;
_arg2.baseHandleX = 0.5;
_arg2.baseHandleY = 0.5;
_arg2.addConditionalParticleArray(globalParticles.getParticles());
_arg2.animSpeed = 0;
_local6 = new GameObject(_arg1, child1_embed, "", 0, -25);
_local6.name = "Collision";
_local6.baseHandleX = 0.5;
_local6.baseHandleY = 0.5;
_local6.basex = 0;
_local6.basey = -25;
_local6.animSpeed = 0;
_arg2.addChild(_local6);
_local6 = new GameObject(_arg1, child2_embed, "", 0, 0);
_local6.name = "Collision";
_local6.baseHandleX = 0.5;
_local6.baseHandleY = 0.5;
_local6.basex = 0;
_local6.basey = 0;
_local6.animSpeed = 0;
_arg2.addChild(_local6);
}
}
}//package ObjectConstructors
Section 307
//Tree3_constructor (ObjectConstructors.Tree3_constructor)
package ObjectConstructors {
import GameScene.*;
import Particles.*;
import flash.display.*;
import GameObject.*;
import Objects.*;
import GlobalSetup.*;
public class Tree3_constructor {
public static var LayerName:String = "";
public static var child1_embed:Class = Embeds.collisionbig_png;
public static var child2_embed:Class = Embeds.pipecollisiongood_png;
public static var child1:BitmapData = new Embeds.collisionbig_png().bitmapData;
public static var baseim_embed:Class = Embeds.tree3_png;
public static var baseim:BitmapData = new Embeds.tree3_png().bitmapData;
public static var child2:BitmapData = new Embeds.pipecollisiongood_png().bitmapData;
public static function setup(_arg1:GameScene, _arg2:GameObject):void{
var _local3:GameObjectFilter;
var _local4:ParticleEmitter;
var _local5:ParticleFilter;
var _local6:GameObject;
var _local7:GameObjectFilter;
_arg2.baseHandleX = 0.5;
_arg2.baseHandleY = 0.5;
_arg2.addConditionalParticleArray(globalParticles.getParticles());
_arg2.animSpeed = 0;
_local6 = new GameObject(_arg1, child1_embed, "", 1, -25);
_local6.name = "Collision";
_local6.baseHandleX = 0.5;
_local6.baseHandleY = 0.5;
_local6.basex = 1;
_local6.basey = -25;
_local6.animSpeed = 0;
_arg2.addChild(_local6);
_local6 = new GameObject(_arg1, child2_embed, "", 1, 6);
_local6.name = "Collision";
_local6.baseHandleX = 0.5;
_local6.baseHandleY = 0.5;
_local6.basex = 1;
_local6.basey = 6;
_local6.animSpeed = 0;
_arg2.addChild(_local6);
}
}
}//package ObjectConstructors
Section 308
//VertPipe_constructor (ObjectConstructors.VertPipe_constructor)
package ObjectConstructors {
import GameScene.*;
import Particles.*;
import flash.display.*;
import GameObject.*;
import Objects.*;
import GlobalSetup.*;
public class VertPipe_constructor {
public static var baseim_embed:Class = Embeds.ring3back_png;
public static var child1:BitmapData = new Embeds.ring3_png().bitmapData;
public static var child2:BitmapData = new Embeds.tick_png().bitmapData;
public static var child3:BitmapData = new Embeds.pipecollision_png().bitmapData;
public static var child4:BitmapData = new Embeds.pipecollision_png().bitmapData;
public static var child5:BitmapData = new Embeds.pipecollisiongoodright_png().bitmapData;
public static var child6:BitmapData = new Embeds.pipecollisiongoodright_png().bitmapData;
public static var LayerName:String = "ObstacleFront";
public static var child1_embed:Class = Embeds.ring3_png;
public static var child3_embed:Class = Embeds.pipecollision_png;
public static var child4_embed:Class = Embeds.pipecollision_png;
public static var child5_embed:Class = Embeds.pipecollisiongoodright_png;
public static var child6_embed:Class = Embeds.pipecollisiongoodright_png;
public static var baseim:BitmapData = new Embeds.ring3back_png().bitmapData;
public static var child2_embed:Class = Embeds.tick_png;
public static function setup(_arg1:GameScene, _arg2:GameObject):void{
var _local3:GameObjectFilter;
var _local4:ParticleEmitter;
var _local5:ParticleFilter;
var _local6:GameObject;
var _local7:GameObjectFilter;
_arg2.baseHandleX = 0.5;
_arg2.baseHandleY = 0.5;
_arg2.addConditionalParticleArray(globalParticles.getParticles());
_arg2.animSpeed = 0;
_local6 = new GameObject(_arg1, child1_embed, "ObstacleBack", 0, 0);
_local6.name = "";
_local6.baseHandleX = 0.5;
_local6.baseHandleY = 0.5;
_local6.basex = 0;
_local6.basey = 0;
_local6.animSpeed = 0;
_arg2.addChild(_local6);
_local6 = new GameObject(_arg1, child2_embed, "Stars", 1, -35);
_local6.name = "Success";
_local6.baseHandleX = 0.5;
_local6.baseHandleY = 0.5;
_local6.basex = 1;
_local6.basey = -35;
_local6.animSpeed = 0;
_local7 = new GameObjectFilterDampenInterpolateIn();
_local6.addFilter(_local7);
GameObjectFilterDampenInterpolateIn(_local7).Delay = 0;
GameObjectFilterDampenInterpolateIn(_local7).FadeTime = 100;
GameObjectFilterDampenInterpolateIn(_local7).dx = 0;
GameObjectFilterDampenInterpolateIn(_local7).dy = -100;
_local7 = new GameObjectFilterFadeInOut();
_local6.addFilter(_local7);
GameObjectFilterFadeInOut(_local7).FadeIn = 1;
GameObjectFilterFadeInOut(_local7).FadeInDelay = 0;
GameObjectFilterFadeInOut(_local7).FadeInDuration = 82;
GameObjectFilterFadeInOut(_local7).FadeOut = 0;
GameObjectFilterFadeInOut(_local7).FadeOutTime = 0;
GameObjectFilterFadeInOut(_local7).FadeOutDuration = 0;
_local7 = new GameObjectFilterScaleInOut();
_local6.addFilter(_local7);
GameObjectFilterScaleInOut(_local7).ScaleIn = 1;
GameObjectFilterScaleInOut(_local7).ScaleInDelay = 0;
GameObjectFilterScaleInOut(_local7).ScaleInDuration = 100;
GameObjectFilterScaleInOut(_local7).ScaleInStartX = 1;
GameObjectFilterScaleInOut(_local7).ScaleInStartY = 0;
GameObjectFilterScaleInOut(_local7).ScaleOut = 0;
GameObjectFilterScaleInOut(_local7).ScaleOutTime = 0;
GameObjectFilterScaleInOut(_local7).ScaleOutDuration = 0;
GameObjectFilterScaleInOut(_local7).ScaleOutEndX = 1;
GameObjectFilterScaleInOut(_local7).ScaleOutEndY = 1;
_arg2.addChild(_local6);
_local6 = new GameObject(_arg1, child3_embed, "ObstacleFront", 36, -2);
_local6.name = "Collision";
_local6.baseHandleX = 0.5;
_local6.baseHandleY = 0.5;
_local6.basex = 36;
_local6.basey = -2;
_local6.animSpeed = 0;
_arg2.addChild(_local6);
_local6 = new GameObject(_arg1, child4_embed, "ObstacleFront", -36, -1);
_local6.name = "Collision";
_local6.baseHandleX = 0.5;
_local6.baseHandleY = 0.5;
_local6.basex = -36;
_local6.basey = -1;
_local6.animSpeed = 0;
_arg2.addChild(_local6);
_local6 = new GameObject(_arg1, child5_embed, "ObstacleFront", 0, -1);
_local6.name = "CollisionGood";
_local6.baseHandleX = 0.5;
_local6.baseHandleY = 0.5;
_local6.basex = 0;
_local6.basey = -1;
_local6.animSpeed = 0;
_arg2.addChild(_local6);
_local6 = new GameObject(_arg1, child6_embed, "ObstacleFront", 0, -1);
_local6.name = "CollisionGood";
_local6.baseHandleX = 0.5;
_local6.baseHandleY = 0.5;
_local6.basex = 0;
_local6.basey = -1;
_local6.animSpeed = 0;
_arg2.addChild(_local6);
}
}
}//package ObjectConstructors
Section 309
//VertPipeBig_constructor (ObjectConstructors.VertPipeBig_constructor)
package ObjectConstructors {
import GameScene.*;
import Particles.*;
import flash.display.*;
import GameObject.*;
import Objects.*;
import GlobalSetup.*;
public class VertPipeBig_constructor {
public static var baseim_embed:Class = Embeds.ring2back_png;
public static var child1:BitmapData = new Embeds.ring2_png().bitmapData;
public static var child2:BitmapData = new Embeds.tick_png().bitmapData;
public static var child3:BitmapData = new Embeds.pipecollision_png().bitmapData;
public static var child4:BitmapData = new Embeds.pipecollision_png().bitmapData;
public static var child5:BitmapData = new Embeds.pipecollisiongoodright_png().bitmapData;
public static var child6:BitmapData = new Embeds.pipecollisiongoodright_png().bitmapData;
public static var LayerName:String = "ObstacleFront";
public static var child1_embed:Class = Embeds.ring2_png;
public static var child3_embed:Class = Embeds.pipecollision_png;
public static var child4_embed:Class = Embeds.pipecollision_png;
public static var child5_embed:Class = Embeds.pipecollisiongoodright_png;
public static var child6_embed:Class = Embeds.pipecollisiongoodright_png;
public static var baseim:BitmapData = new Embeds.ring2back_png().bitmapData;
public static var child2_embed:Class = Embeds.tick_png;
public static function setup(_arg1:GameScene, _arg2:GameObject):void{
var _local3:GameObjectFilter;
var _local4:ParticleEmitter;
var _local5:ParticleFilter;
var _local6:GameObject;
var _local7:GameObjectFilter;
_arg2.baseHandleX = 0.5;
_arg2.baseHandleY = 0.5;
_arg2.addConditionalParticleArray(globalParticles.getParticles());
_arg2.animSpeed = 0;
_local6 = new GameObject(_arg1, child1_embed, "ObstacleBack", 0, 0);
_local6.name = "";
_local6.baseHandleX = 0.5;
_local6.baseHandleY = 0.5;
_local6.basex = 0;
_local6.basey = 0;
_local6.animSpeed = 0;
_arg2.addChild(_local6);
_local6 = new GameObject(_arg1, child2_embed, "Stars", 1, -35);
_local6.name = "Success";
_local6.baseHandleX = 0.5;
_local6.baseHandleY = 0.5;
_local6.basex = 1;
_local6.basey = -35;
_local6.animSpeed = 0;
_local7 = new GameObjectFilterDampenInterpolateIn();
_local6.addFilter(_local7);
GameObjectFilterDampenInterpolateIn(_local7).Delay = 0;
GameObjectFilterDampenInterpolateIn(_local7).FadeTime = 100;
GameObjectFilterDampenInterpolateIn(_local7).dx = 0;
GameObjectFilterDampenInterpolateIn(_local7).dy = -100;
_local7 = new GameObjectFilterFadeInOut();
_local6.addFilter(_local7);
GameObjectFilterFadeInOut(_local7).FadeIn = 1;
GameObjectFilterFadeInOut(_local7).FadeInDelay = 0;
GameObjectFilterFadeInOut(_local7).FadeInDuration = 82;
GameObjectFilterFadeInOut(_local7).FadeOut = 0;
GameObjectFilterFadeInOut(_local7).FadeOutTime = 0;
GameObjectFilterFadeInOut(_local7).FadeOutDuration = 0;
_local7 = new GameObjectFilterScaleInOut();
_local6.addFilter(_local7);
GameObjectFilterScaleInOut(_local7).ScaleIn = 1;
GameObjectFilterScaleInOut(_local7).ScaleInDelay = 0;
GameObjectFilterScaleInOut(_local7).ScaleInDuration = 100;
GameObjectFilterScaleInOut(_local7).ScaleInStartX = 1;
GameObjectFilterScaleInOut(_local7).ScaleInStartY = 0;
GameObjectFilterScaleInOut(_local7).ScaleOut = 0;
GameObjectFilterScaleInOut(_local7).ScaleOutTime = 0;
GameObjectFilterScaleInOut(_local7).ScaleOutDuration = 0;
GameObjectFilterScaleInOut(_local7).ScaleOutEndX = 1;
GameObjectFilterScaleInOut(_local7).ScaleOutEndY = 1;
_arg2.addChild(_local6);
_local6 = new GameObject(_arg1, child3_embed, "ObstacleFront", 42, -1);
_local6.name = "Collision";
_local6.baseHandleX = 0.5;
_local6.baseHandleY = 0.5;
_local6.basex = 42;
_local6.basey = -1;
_local6.animSpeed = 0;
_arg2.addChild(_local6);
_local6 = new GameObject(_arg1, child4_embed, "ObstacleFront", -43, -1);
_local6.name = "Collision";
_local6.baseHandleX = 0.5;
_local6.baseHandleY = 0.5;
_local6.basex = -43;
_local6.basey = -1;
_local6.animSpeed = 0;
_arg2.addChild(_local6);
_local6 = new GameObject(_arg1, child5_embed, "ObstacleFront", -14, 0);
_local6.name = "CollisionGood";
_local6.baseHandleX = 0.5;
_local6.baseHandleY = 0.5;
_local6.basex = -14;
_local6.basey = 0;
_local6.animSpeed = 0;
_arg2.addChild(_local6);
_local6 = new GameObject(_arg1, child6_embed, "ObstacleFront", 14, 0);
_local6.name = "CollisionGood";
_local6.baseHandleX = 0.5;
_local6.baseHandleY = 0.5;
_local6.basex = 14;
_local6.basey = 0;
_local6.animSpeed = 0;
_arg2.addChild(_local6);
}
}
}//package ObjectConstructors
Section 310
//VertPipeBigRoll_constructor (ObjectConstructors.VertPipeBigRoll_constructor)
package ObjectConstructors {
import GameScene.*;
import Particles.*;
import flash.display.*;
import GameObject.*;
import Objects.*;
import GlobalSetup.*;
public class VertPipeBigRoll_constructor {
public static var baseim_embed:Class = Embeds.ring2back_roll_png;
public static var child1:BitmapData = new Embeds.ring2_roll_png().bitmapData;
public static var child2:BitmapData = new Embeds.tick_png().bitmapData;
public static var child3:BitmapData = new Embeds.pipecollision_png().bitmapData;
public static var child4:BitmapData = new Embeds.pipecollision_png().bitmapData;
public static var child5:BitmapData = new Embeds.pipecollisiongoodright_png().bitmapData;
public static var child6:BitmapData = new Embeds.pipecollisiongoodright_png().bitmapData;
public static var LayerName:String = "ObstacleFront";
public static var child1_embed:Class = Embeds.ring2_roll_png;
public static var child3_embed:Class = Embeds.pipecollision_png;
public static var child4_embed:Class = Embeds.pipecollision_png;
public static var child5_embed:Class = Embeds.pipecollisiongoodright_png;
public static var child6_embed:Class = Embeds.pipecollisiongoodright_png;
public static var baseim:BitmapData = new Embeds.ring2back_roll_png().bitmapData;
public static var child2_embed:Class = Embeds.tick_png;
public static function setup(_arg1:GameScene, _arg2:GameObject):void{
var _local3:GameObjectFilter;
var _local4:ParticleEmitter;
var _local5:ParticleFilter;
var _local6:GameObject;
var _local7:GameObjectFilter;
_arg2.baseHandleX = 0.5;
_arg2.baseHandleY = 0.5;
_arg2.addConditionalParticleArray(globalParticles.getParticles());
_arg2.animSpeed = 0;
_local6 = new GameObject(_arg1, child1_embed, "ObstacleBack", 0, 0);
_local6.name = "";
_local6.baseHandleX = 0.5;
_local6.baseHandleY = 0.5;
_local6.basex = 0;
_local6.basey = 0;
_local6.animSpeed = 0;
_arg2.addChild(_local6);
_local6 = new GameObject(_arg1, child2_embed, "Stars", 1, -35);
_local6.name = "Success";
_local6.baseHandleX = 0.5;
_local6.baseHandleY = 0.5;
_local6.basex = 1;
_local6.basey = -35;
_local6.animSpeed = 0;
_local7 = new GameObjectFilterDampenInterpolateIn();
_local6.addFilter(_local7);
GameObjectFilterDampenInterpolateIn(_local7).Delay = 0;
GameObjectFilterDampenInterpolateIn(_local7).FadeTime = 100;
GameObjectFilterDampenInterpolateIn(_local7).dx = 0;
GameObjectFilterDampenInterpolateIn(_local7).dy = -100;
_local7 = new GameObjectFilterFadeInOut();
_local6.addFilter(_local7);
GameObjectFilterFadeInOut(_local7).FadeIn = 1;
GameObjectFilterFadeInOut(_local7).FadeInDelay = 0;
GameObjectFilterFadeInOut(_local7).FadeInDuration = 82;
GameObjectFilterFadeInOut(_local7).FadeOut = 0;
GameObjectFilterFadeInOut(_local7).FadeOutTime = 0;
GameObjectFilterFadeInOut(_local7).FadeOutDuration = 0;
_local7 = new GameObjectFilterScaleInOut();
_local6.addFilter(_local7);
GameObjectFilterScaleInOut(_local7).ScaleIn = 1;
GameObjectFilterScaleInOut(_local7).ScaleInDelay = 0;
GameObjectFilterScaleInOut(_local7).ScaleInDuration = 100;
GameObjectFilterScaleInOut(_local7).ScaleInStartX = 1;
GameObjectFilterScaleInOut(_local7).ScaleInStartY = 0;
GameObjectFilterScaleInOut(_local7).ScaleOut = 0;
GameObjectFilterScaleInOut(_local7).ScaleOutTime = 0;
GameObjectFilterScaleInOut(_local7).ScaleOutDuration = 0;
GameObjectFilterScaleInOut(_local7).ScaleOutEndX = 1;
GameObjectFilterScaleInOut(_local7).ScaleOutEndY = 1;
_arg2.addChild(_local6);
_local6 = new GameObject(_arg1, child3_embed, "ObstacleFront", 42, -1);
_local6.name = "Collision";
_local6.baseHandleX = 0.5;
_local6.baseHandleY = 0.5;
_local6.basex = 42;
_local6.basey = -1;
_local6.animSpeed = 0;
_arg2.addChild(_local6);
_local6 = new GameObject(_arg1, child4_embed, "ObstacleFront", -43, -1);
_local6.name = "Collision";
_local6.baseHandleX = 0.5;
_local6.baseHandleY = 0.5;
_local6.basex = -43;
_local6.basey = -1;
_local6.animSpeed = 0;
_arg2.addChild(_local6);
_local6 = new GameObject(_arg1, child5_embed, "ObstacleFront", -14, 0);
_local6.name = "CollisionGood";
_local6.baseHandleX = 0.5;
_local6.baseHandleY = 0.5;
_local6.basex = -14;
_local6.basey = 0;
_local6.animSpeed = 0;
_arg2.addChild(_local6);
_local6 = new GameObject(_arg1, child6_embed, "ObstacleFront", 14, 0);
_local6.name = "CollisionGood";
_local6.baseHandleX = 0.5;
_local6.baseHandleY = 0.5;
_local6.basex = 14;
_local6.basey = 0;
_local6.animSpeed = 0;
_arg2.addChild(_local6);
}
}
}//package ObjectConstructors
Section 311
//VertPipeRoll_constructor (ObjectConstructors.VertPipeRoll_constructor)
package ObjectConstructors {
import GameScene.*;
import Particles.*;
import flash.display.*;
import GameObject.*;
import Objects.*;
import GlobalSetup.*;
public class VertPipeRoll_constructor {
public static var baseim_embed:Class = Embeds.ring3back_roll_png;
public static var child1:BitmapData = new Embeds.ring3_roll_png().bitmapData;
public static var child2:BitmapData = new Embeds.tick_png().bitmapData;
public static var child3:BitmapData = new Embeds.pipecollision_png().bitmapData;
public static var child4:BitmapData = new Embeds.pipecollision_png().bitmapData;
public static var child5:BitmapData = new Embeds.pipecollisiongoodright_png().bitmapData;
public static var child6:BitmapData = new Embeds.pipecollisiongoodright_png().bitmapData;
public static var LayerName:String = "ObstacleFront";
public static var child1_embed:Class = Embeds.ring3_roll_png;
public static var child3_embed:Class = Embeds.pipecollision_png;
public static var child4_embed:Class = Embeds.pipecollision_png;
public static var child5_embed:Class = Embeds.pipecollisiongoodright_png;
public static var child6_embed:Class = Embeds.pipecollisiongoodright_png;
public static var baseim:BitmapData = new Embeds.ring3back_roll_png().bitmapData;
public static var child2_embed:Class = Embeds.tick_png;
public static function setup(_arg1:GameScene, _arg2:GameObject):void{
var _local3:GameObjectFilter;
var _local4:ParticleEmitter;
var _local5:ParticleFilter;
var _local6:GameObject;
var _local7:GameObjectFilter;
_arg2.baseHandleX = 0.5;
_arg2.baseHandleY = 0.5;
_arg2.addConditionalParticleArray(globalParticles.getParticles());
_arg2.animSpeed = 0;
_local6 = new GameObject(_arg1, child1_embed, "ObstacleBack", 0, 0);
_local6.name = "";
_local6.baseHandleX = 0.5;
_local6.baseHandleY = 0.5;
_local6.basex = 0;
_local6.basey = 0;
_local6.animSpeed = 0;
_arg2.addChild(_local6);
_local6 = new GameObject(_arg1, child2_embed, "Stars", 1, -35);
_local6.name = "Success";
_local6.baseHandleX = 0.5;
_local6.baseHandleY = 0.5;
_local6.basex = 1;
_local6.basey = -35;
_local6.animSpeed = 0;
_local7 = new GameObjectFilterDampenInterpolateIn();
_local6.addFilter(_local7);
GameObjectFilterDampenInterpolateIn(_local7).Delay = 0;
GameObjectFilterDampenInterpolateIn(_local7).FadeTime = 100;
GameObjectFilterDampenInterpolateIn(_local7).dx = 0;
GameObjectFilterDampenInterpolateIn(_local7).dy = -100;
_local7 = new GameObjectFilterFadeInOut();
_local6.addFilter(_local7);
GameObjectFilterFadeInOut(_local7).FadeIn = 1;
GameObjectFilterFadeInOut(_local7).FadeInDelay = 0;
GameObjectFilterFadeInOut(_local7).FadeInDuration = 82;
GameObjectFilterFadeInOut(_local7).FadeOut = 0;
GameObjectFilterFadeInOut(_local7).FadeOutTime = 0;
GameObjectFilterFadeInOut(_local7).FadeOutDuration = 0;
_local7 = new GameObjectFilterScaleInOut();
_local6.addFilter(_local7);
GameObjectFilterScaleInOut(_local7).ScaleIn = 1;
GameObjectFilterScaleInOut(_local7).ScaleInDelay = 0;
GameObjectFilterScaleInOut(_local7).ScaleInDuration = 100;
GameObjectFilterScaleInOut(_local7).ScaleInStartX = 1;
GameObjectFilterScaleInOut(_local7).ScaleInStartY = 0;
GameObjectFilterScaleInOut(_local7).ScaleOut = 0;
GameObjectFilterScaleInOut(_local7).ScaleOutTime = 0;
GameObjectFilterScaleInOut(_local7).ScaleOutDuration = 0;
GameObjectFilterScaleInOut(_local7).ScaleOutEndX = 1;
GameObjectFilterScaleInOut(_local7).ScaleOutEndY = 1;
_arg2.addChild(_local6);
_local6 = new GameObject(_arg1, child3_embed, "ObstacleFront", 36, -2);
_local6.name = "Collision";
_local6.baseHandleX = 0.5;
_local6.baseHandleY = 0.5;
_local6.basex = 36;
_local6.basey = -2;
_local6.animSpeed = 0;
_arg2.addChild(_local6);
_local6 = new GameObject(_arg1, child4_embed, "ObstacleFront", -36, -1);
_local6.name = "Collision";
_local6.baseHandleX = 0.5;
_local6.baseHandleY = 0.5;
_local6.basex = -36;
_local6.basey = -1;
_local6.animSpeed = 0;
_arg2.addChild(_local6);
_local6 = new GameObject(_arg1, child5_embed, "ObstacleFront", 0, -1);
_local6.name = "CollisionGood";
_local6.baseHandleX = 0.5;
_local6.baseHandleY = 0.5;
_local6.basex = 0;
_local6.basey = -1;
_local6.animSpeed = 0;
_arg2.addChild(_local6);
_local6 = new GameObject(_arg1, child6_embed, "ObstacleFront", 0, -1);
_local6.name = "CollisionGood";
_local6.baseHandleX = 0.5;
_local6.baseHandleY = 0.5;
_local6.basex = 0;
_local6.basey = -1;
_local6.animSpeed = 0;
_arg2.addChild(_local6);
}
}
}//package ObjectConstructors
Section 312
//Blimp (Objects.Blimp)
package Objects {
import GameScene.*;
import ObjectConstructors.*;
public class Blimp extends Obstacle {
public function Blimp(_arg1:GameScene, _arg2:int, _arg3:int){
super(_arg1, Blimp_constructor.baseim_embed, _arg2, _arg3);
Blimp_constructor.setup(_arg1, this);
}
}
}//package Objects
Section 313
//BonusBalloon (Objects.BonusBalloon)
package Objects {
import GameScene.*;
import ObjectConstructors.*;
public class BonusBalloon extends Obstacle {
public function BonusBalloon(_arg1:GameScene, _arg2:int, _arg3:int){
super(_arg1, BonusBalloon_constructor.baseim_embed, _arg2, _arg3);
BonusBalloon_constructor.setup(_arg1, this);
}
override public function successFunc():void{
baseAlpha = 0;
success = true;
}
}
}//package Objects
Section 314
//FloatObstacle (Objects.FloatObstacle)
package Objects {
import GameScene.*;
import ObjectConstructors.*;
public class FloatObstacle extends Obstacle {
public function FloatObstacle(_arg1:GameScene, _arg2:int, _arg3:int){
super(_arg1, FloatObstacle_constructor.baseim_embed, _arg2, _arg3);
FloatObstacle_constructor.setup(_arg1, this);
}
}
}//package Objects
Section 315
//Ground (Objects.Ground)
package Objects {
import GameScene.*;
import GameObject.*;
import ObjectConstructors.*;
public class Ground extends GameObject {
public function Ground(_arg1:GameScene, _arg2:int, _arg3:int){
super(_arg1, Ground_constructor.baseim_embed, Ground_constructor.LayerName, _arg2, _arg3);
Ground_constructor.setup(_arg1, this);
}
}
}//package Objects
Section 316
//LevelPanel (Objects.LevelPanel)
package Objects {
import GameScene.*;
import GameObject.*;
import ObjectConstructors.*;
public class LevelPanel extends GameObject {
public function LevelPanel(_arg1:GameScene, _arg2:int, _arg3:int){
super(_arg1, LevelPanel_constructor.baseim_embed, LevelPanel_constructor.LayerName, _arg2, _arg3);
LevelPanel_constructor.setup(_arg1, this);
}
}
}//package Objects
Section 317
//lifeSprite (Objects.lifeSprite)
package Objects {
import GameScene.*;
import GameObject.*;
import ObjectConstructors.*;
public class lifeSprite extends GameObject {
public function lifeSprite(_arg1:GameScene, _arg2:int, _arg3:int){
super(_arg1, lifeSprite_constructor.baseim_embed, lifeSprite_constructor.LayerName, _arg2, _arg3);
lifeSprite_constructor.setup(_arg1, this);
}
}
}//package Objects
Section 318
//Man (Objects.Man)
package Objects {
import GameScene.*;
import GameObject.*;
import ObjectConstructors.*;
public class Man extends GameObject {
public var dy:Number;// = 0
public function Man(_arg1:GameScene, _arg2:int, _arg3:int){
super(_arg1, Man_constructor.baseim_embed, Man_constructor.LayerName, _arg2, _arg3);
Man_constructor.setup(_arg1, this);
}
override public function _update():void{
if (ticks < 100){
dy = (dy + 0.03);
} else {
dy = (dy + 0.005);
};
basey = (basey + (dy * 0.5));
dy = (dy * 0.99);
if (basey > 700){
remove();
};
}
}
}//package Objects
Section 319
//Obstacle (Objects.Obstacle)
package Objects {
import GameScene.*;
import GameObject.*;
import Scenes.*;
public class Obstacle extends GameObject {
public var successChildren:Array;
public var success:Boolean;// = false
public var causesRoll:Boolean;// = false
public var goodCollisionSet:GameObjectCollisionSet;
public var collisionSet:GameObjectCollisionSet;
public var firstRun:Boolean;// = true
public var plane:Plane;
public var old:Boolean;// = false
public function Obstacle(_arg1:GameScene, _arg2:Class, _arg3:int, _arg4:int){
super(_arg1, _arg2, "ObstacleFront", _arg3, _arg4);
}
override public function _update():void{
var _local1:GameObject;
var _local4:GameObject;
var _local5:GameObject;
var _local6:int;
var _local7:String;
var _local8:GameObjectFilterShift;
var _local9:GameObjectFilterKill;
var _local10:GameObjectFilterFadeInOut;
var _local11:GameObjectFilter;
if (old){
return;
};
if (firstRun){
collisionSet = GameObjectCollisionSet.fromChildren(children, "Collision");
goodCollisionSet = GameObjectCollisionSet.fromChildren(children, "CollisionGood");
successChildren = findChildrenByName("Success");
plane = Plane(gs.findObjectByClass("Plane"));
firstRun = false;
};
var _local2:Number = (plane.basex - basex);
var _local3:Number = (plane.basey - basey);
if ((this is BonusBalloon)){
if (!success){
baseAlpha = 1;
};
};
if (_local2 < 200){
if (_local2 > -200){
if (_local3 < 200){
if (_local3 > -200){
if (collisionSet.collides(this, plane.basex, plane.basey)){
plane.setOutOfControl();
};
if (goodCollisionSet.collides(this, plane.basex, plane.basey)){
if (!success){
if (!plane.outOfControl){
success = true;
successFunc();
if ((this is BonusBalloon)){
Sounds.bonusBalloonPop.play();
emitConditionalParticles("Pop");
} else {
if (plane.inSpeedUp > 0){
Sounds.obstacleRingFast.play();
} else {
Sounds.obstacleRing.play();
};
};
if (causesRoll){
if (plane.inBarrelRoll == 0){
plane.inBarrelRoll = 1;
};
};
for each (_local4 in successChildren) {
_local5 = new GameObject(gs, null, "TextLayer", (basex + _local4.basex), (basey + _local4.basey));
_local6 = (5 + (5 * plane.consecutiveScore));
_local7 = String(_local6);
MainScene(gs).score = (MainScene(gs).score + _local6);
if (plane.inSpeedUp){
if (plane.consecutiveFastScore > plane.highestConsecutiveScore){
plane.highestConsecutiveScore = plane.consecutiveFastScore;
};
plane.consecutiveFastScore = (plane.consecutiveFastScore + 1);
_local7 = (_local7 + ("x" + String(plane.consecutiveFastScore)));
MainScene(gs).score = (MainScene(gs).score + (_local6 * (plane.consecutiveFastScore - 1)));
};
_local5.setText(_local7, 24);
_local8 = new GameObjectFilterShift();
_local8.dy = -0.5;
_local5.addFilter(_local8);
_local9 = new GameObjectFilterKill();
_local9.time = 100;
_local5.addFilter(_local9);
_local10 = new GameObjectFilterFadeInOut();
_local10.FadeOut = 1;
_local10.FadeOutTime = 60;
_local10.FadeOutDuration = 40;
_local10.FadeOutBlur = 15;
_local5.addFilter(_local10);
};
plane.consecutiveScore = (plane.consecutiveScore + 1);
};
};
};
};
};
};
};
for each (_local1 in successChildren) {
if (success){
_local1.disabled = false;
} else {
_local1.disabled = true;
for each (_local11 in _local1.filters) {
_local11.ticks = 0;
};
};
};
}
public function successFunc():void{
}
public function reset():void{
success = false;
}
}
}//package Objects
Section 320
//Pipe (Objects.Pipe)
package Objects {
import GameScene.*;
import ObjectConstructors.*;
public class Pipe extends Obstacle {
public function Pipe(_arg1:GameScene, _arg2:int, _arg3:int){
super(_arg1, Pipe_constructor.baseim_embed, _arg2, _arg3);
Pipe_constructor.setup(_arg1, this);
}
}
}//package Objects
Section 321
//PipeBig (Objects.PipeBig)
package Objects {
import GameScene.*;
import ObjectConstructors.*;
public class PipeBig extends Obstacle {
public function PipeBig(_arg1:GameScene, _arg2:int, _arg3:int){
super(_arg1, PipeBig_constructor.baseim_embed, _arg2, _arg3);
PipeBig_constructor.setup(_arg1, this);
}
}
}//package Objects
Section 322
//PipeBigRoll (Objects.PipeBigRoll)
package Objects {
import GameScene.*;
import ObjectConstructors.*;
public class PipeBigRoll extends Obstacle {
public function PipeBigRoll(_arg1:GameScene, _arg2:int, _arg3:int){
super(_arg1, PipeBigRoll_constructor.baseim_embed, _arg2, _arg3);
causesRoll = true;
PipeBigRoll_constructor.setup(_arg1, this);
}
}
}//package Objects
Section 323
//PipeRoll (Objects.PipeRoll)
package Objects {
import GameScene.*;
import ObjectConstructors.*;
public class PipeRoll extends Obstacle {
public function PipeRoll(_arg1:GameScene, _arg2:int, _arg3:int){
super(_arg1, PipeRoll_constructor.baseim_embed, _arg2, _arg3);
causesRoll = true;
PipeRoll_constructor.setup(_arg1, this);
}
}
}//package Objects
Section 324
//Plane (Objects.Plane)
package Objects {
import GameScene.*;
import flash.display.*;
import GameObject.*;
import Audio.*;
import Tools.*;
import Scenes.*;
import ObjectConstructors.*;
public class Plane extends GameObject {
public var dRotation:Number;// = 0
public var consecutiveScore:int;// = 1
public var nextStartX:Number;// = 0
public var consecutiveFastScore:int;// = 1
public var dx:Number;// = 0
public var dy:Number;// = 0
public var extraSpeed:Number;// = 0
public var shiftFilter:GameObjectFilterAddOrigin;
public var rollFrameTarget:Number;// = 0
public var planecrash:BitmapData;
public var highestConsecutiveScore:int;// = 0
public var inBarrelRoll:int;// = 0
public var splutter:int;// = 0
public var outOfControl:Boolean;// = false
public var flyOffX:Number;// = 0
public var inSpeedUp:int;// = 0
public var engineChannel:GameSoundChannel;
public var prop:PlaneProp;
public var dead:Boolean;// = false
public var startMoveY:Number;
public var deadTicks:int;// = 0
public var shiftFilterFadeIn:int;// = 0
public var fallingChannel:GameSoundChannel;
public var roll:Array;
public static var gravity:Number = 0.01;
public function Plane(_arg1:GameScene, _arg2:int, _arg3:int){
prop = new PlaneProp(_arg1, _arg2, _arg3);
prop.baseAlpha = 0;
engineChannel = Sounds.planeIdle.play(true);
engineChannel.setVolume(0);
super(_arg1, Plane_constructor.baseim_embed, Plane_constructor.LayerName, _arg2, _arg3);
Plane_constructor.setup(_arg1, this);
className = "Plane";
shiftFilter = new GameObjectFilterAddOrigin();
addFilter(shiftFilter);
}
public function UpKey():int{
if (MainMenu.controlsReversed){
return (Input.i.keyDown(38));
};
return (Input.i.keyDown(40));
}
public function sgn(_arg1:Number):Number{
if (_arg1 == 0){
return (0);
};
if (_arg1 > 0){
return (1);
};
return (-1);
}
public function DownKey():int{
if (MainMenu.controlsReversed){
return (Input.i.keyDown(40));
};
return (Input.i.keyDown(38));
}
public function speedUp():Number{
var _local1:Number = ((0.25 * (MainScene(gs).level - (MainScene(gs).level % 42))) / 42);
if (MainScene(gs).finishedSequence < 20){
return (Interpolation.linearInterpolateLock(0, _local1, (MainScene(gs).finishedSequence / 20)));
};
if (shiftFilterFadeIn < 80){
return (Interpolation.linearInterpolate(0, _local1, (shiftFilterFadeIn / 80)));
};
return (_local1);
}
public function setOutOfControl():void{
var _local1:Man;
if (!outOfControl){
GameSoundScene.forName("main").insertDeadBreak(3000);
emitConditionalParticles("SmallDestroy");
outOfControl = true;
_local1 = new Man(gs, basex, basey);
fallingChannel = Sounds.planeFalling.play();
};
}
public function kill():void{
if (!dead){
if (!outOfControl){
GameSoundScene.forName("main").insertDeadBreak(3000);
};
Logging.Log("stuntpilot", "die", String(MainScene(gs).level));
inSpeedUp = 0;
extraSpeed = 0;
deadTicks = 0;
consecutiveScore = 1;
outOfControl = true;
emitConditionalParticles("Destroy");
Sounds.planeCrash.play();
MainScene(gs).lives--;
Bitmap(obj).bitmapData = Plane_constructor.planecrash;
if (Math.abs(baseRotation) < 180){
baseScaleX = (baseScaleX * -1);
};
baseRotation = 0;
dead = true;
if (fallingChannel){
if (fallingChannel.playing()){
fallingChannel.stop();
fallingChannel = null;
};
};
};
}
override public function _update():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Obstacle;
var _local5:int;
var _local6:Obstacle;
var _local7:int;
if (dead){
baseAlpha = 0;
emitConditionalParticles("dead");
engineChannel.stop();
deadTicks++;
if (deadTicks == 50){
MainScene(gs).finishedSequence = 1;
MainScene(gs).finishedSequenceLost = true;
};
} else {
baseAlpha = 1;
if (engineChannel){
if (!engineChannel.playing()){
if ((((((shiftFilter.dx + basex) - gs.camX) > 800)) || ((((shiftFilter.dx + basex) - gs.camX) < 0)))){
} else {
if (((!((inSpeedUp == 0))) || (!((MainScene(gs).finishedSequence == 0))))){
engineChannel = Sounds.planeIdleFast.play();
} else {
engineChannel = Sounds.planeIdle.play(true);
};
};
};
if (engineChannel){
if ((engineChannel.gs == Sounds.planeIdle) != (((inSpeedUp == 0)) && ((MainScene(gs).finishedSequence == 0)))){
engineChannel.stop();
if (((!((inSpeedUp == 0))) || (!((MainScene(gs).finishedSequence == 0))))){
engineChannel = Sounds.planeIdleFast.play(true);
} else {
engineChannel = Sounds.planeIdle.play(true);
};
};
};
if (engineChannel){
if (!outOfControl){
engineChannel.setVolume((0.6 + (dy / 10)));
};
if (((shiftFilter.dx + basex) - gs.camX) > 800){
engineChannel.setVolume(0);
};
if (((shiftFilter.dx + basex) - gs.camX) < 0){
engineChannel.setVolume(0);
};
};
} else {
engineChannel = Sounds.planeIdle.play(true);
};
Bitmap(obj).bitmapData = Plane_constructor.roll[0];
};
if (inSpeedUp > 0){
extraSpeed = (extraSpeed + 0.01);
} else {
consecutiveFastScore = 1;
};
extraSpeed = (extraSpeed * 0.97);
if (outOfControl){
if (dead){
return;
};
emitConditionalParticles("SmallDestroyTrail");
basex = (basex + (dx * ((0.63 + speedUp()) + extraSpeed)));
basey = (basey + (dy * ((0.63 + speedUp()) + extraSpeed)));
dy = (dy + 0.05);
baseRotation = Interpolation.tendTowardsAngle(baseRotation, ((180 / Math.PI) * Math.atan2(dy, dx)), 1);
splutter++;
if ((splutter % 3) == 0){
_local1 = ((Math.random() * 0.5) * Interpolation.fromTo(splutter, 80, 50));
if (splutter > 80){
_local1 = 0;
};
engineChannel.setVolume(_local1);
};
} else {
if (!dead){
basex = (basex + (dx * ((0.63 + speedUp()) + extraSpeed)));
basey = (basey + (dy * ((0.63 + speedUp()) + extraSpeed)));
baseScaleX = 1;
baseScaleY = 1;
};
if (MainScene(gs).finishedSequence > 50){
emitConditionalParticles("RedSmokeLots");
} else {
if (inSpeedUp > 0){
emitConditionalParticles("RedSmoke");
} else {
emitConditionalParticles("Smoke");
};
};
dx = (dx * 0.96);
dy = (dy * 0.96);
dy = (dy + ((sgn(dy) * dy) / 150));
_local2 = 0.1;
_local2 = (_local2 - (dRotation / 10));
dx = (dx + (cosd(baseRotation) * 0.1));
dy = (dy + (sind(baseRotation) * 0.1));
baseHandleX = 0.4;
if (MainScene(gs).finishedSequence == 0){
if (UpKey()){
dRotation = (dRotation + 0.15);
} else {
if (DownKey()){
dRotation = (dRotation - 0.15);
};
};
if (shiftFilter.dx < 0){
shiftFilterFadeIn = (shiftFilterFadeIn + 1);
shiftFilter.dx = Interpolation.sqrtInterpolateLock(-100, 0, Interpolation.fromTo(shiftFilterFadeIn, 0, 80));
} else {
shiftFilter.dx = 0;
shiftFilterFadeIn = 0;
};
} else {
baseRotation = Interpolation.tendTowardsAngle(baseRotation, 0, 2);
(dRotation == 0);
};
baseRotation = (baseRotation + (dRotation * (1 + extraSpeed)));
dRotation = (dRotation * 0.9);
};
if (Input.i.keyDown(32) != 0){
inSpeedUp = 100;
} else {
inSpeedUp = (inSpeedUp - 1);
};
inSpeedUp = Interpolation.lockValueInt(inSpeedUp, 0, 100);
if (MainScene(gs).finishedSequence != 0){
inSpeedUp = 0;
};
if (inBarrelRoll > 0){
inBarrelRoll++;
if ((inBarrelRoll / 3) >= 32){
inBarrelRoll = 0;
} else {
Bitmap(obj).bitmapData = Plane_constructor.roll[int((inBarrelRoll / 3))];
};
rollFrameTarget = 0;
};
if ((((inBarrelRoll == 0)) || ((MainScene(gs).finishedSequence > 0)))){
_local3 = 0;
if (MainScene(gs).finishedSequence == 0){
if (UpKey()){
_local3 = -1;
} else {
if (DownKey()){
_local3 = 1;
};
};
};
if (MainScene(gs).finishedSequence != 0){
if ((((MainScene(gs).finishedSequence == 50)) || ((MainScene(gs).finishedSequence == 200)))){
if (inBarrelRoll == 0){
inBarrelRoll = 1;
};
};
_local4 = MainScene(gs).nextObstacle();
_local5 = 400;
if (MainScene(gs).finishedSequence == (350 + _local5)){
inBarrelRoll = 1;
};
if (MainScene(gs).finishedSequence < 300){
startMoveY = basey;
};
if ((((MainScene(gs).finishedSequence > 50)) && ((MainScene(gs).finishedSequence < (50 + _local5))))){
shiftFilter.dx = Interpolation.squareInterpolateLock(0, 1200, Interpolation.fromTo(MainScene(gs).finishedSequence, 50, (50 + _local5)));
nextStartX = MainScene(gs).nextLevelStartX();
} else {
if (MainScene(gs).finishedSequence > 400){
_local6 = MainScene(gs).nextObstacle();
if (_local6){
basey = Interpolation.squareSquareInterpolateLock(startMoveY, _local6.basey, Interpolation.fromTo(MainScene(gs).finishedSequence, 400, 600));
};
shiftFilter.dx = -100;
};
};
};
if (outOfControl){
_local3 = 100;
};
rollFrameTarget = Interpolation.tendTowards(rollFrameTarget, _local3, 0.06);
if (inBarrelRoll == 0){
if (outOfControl){
_local7 = int((rollFrameTarget * 3));
} else {
if (rollFrameTarget < 0){
_local7 = int((Math.pow(-(rollFrameTarget), 0.3) * -6));
} else {
_local7 = int((Math.pow(rollFrameTarget, 0.3) * 6));
};
};
if (_local7 > 0){
Bitmap(obj).bitmapData = Plane_constructor.roll[_local7];
} else {
Bitmap(obj).bitmapData = Plane_constructor.roll[(31 + _local7)];
};
};
};
if ((((basey > (600 - MainScene(gs).g.baseHeight))) && ((MainScene(gs).finishedSequence == 0)))){
kill();
};
prop.basex = (basex + shiftFilter.dx);
prop.basey = basey;
prop.baseRotation = baseRotation;
prop.baseHandleX = baseHandleX;
if ((ticks % 4) >= 2){
prop.baseAlpha = 1;
} else {
prop.baseAlpha = 0;
};
if (dead){
prop.baseAlpha = 0;
};
}
}
}//package Objects
Section 325
//PlaneProp (Objects.PlaneProp)
package Objects {
import GameScene.*;
import GameObject.*;
import ObjectConstructors.*;
public class PlaneProp extends GameObject {
public function PlaneProp(_arg1:GameScene, _arg2:int, _arg3:int){
super(_arg1, PlaneProp_constructor.baseim_embed, PlaneProp_constructor.LayerName, _arg2, _arg3);
PlaneProp_constructor.setup(_arg1, this);
}
}
}//package Objects
Section 326
//Pole (Objects.Pole)
package Objects {
import GameScene.*;
import ObjectConstructors.*;
public class Pole extends Obstacle {
public function Pole(_arg1:GameScene, _arg2:int, _arg3:int){
super(_arg1, Pole_constructor.baseim_embed, _arg2, _arg3);
Pole_constructor.setup(_arg1, this);
}
}
}//package Objects
Section 327
//Rock1 (Objects.Rock1)
package Objects {
import GameScene.*;
import ObjectConstructors.*;
public class Rock1 extends Obstacle {
public function Rock1(_arg1:GameScene, _arg2:int, _arg3:int){
super(_arg1, Rock1_constructor.baseim_embed, _arg2, _arg3);
Rock1_constructor.setup(_arg1, this);
}
}
}//package Objects
Section 328
//Rock2 (Objects.Rock2)
package Objects {
import GameScene.*;
import ObjectConstructors.*;
public class Rock2 extends Obstacle {
public function Rock2(_arg1:GameScene, _arg2:int, _arg3:int){
super(_arg1, Rock2_constructor.baseim_embed, _arg2, _arg3);
Rock2_constructor.setup(_arg1, this);
}
}
}//package Objects
Section 329
//Tree1 (Objects.Tree1)
package Objects {
import GameScene.*;
import ObjectConstructors.*;
public class Tree1 extends Obstacle {
public function Tree1(_arg1:GameScene, _arg2:int, _arg3:int){
super(_arg1, Tree1_constructor.baseim_embed, _arg2, _arg3);
Tree1_constructor.setup(_arg1, this);
}
}
}//package Objects
Section 330
//Tree2 (Objects.Tree2)
package Objects {
import GameScene.*;
import ObjectConstructors.*;
public class Tree2 extends Obstacle {
public function Tree2(_arg1:GameScene, _arg2:int, _arg3:int){
super(_arg1, Tree2_constructor.baseim_embed, _arg2, _arg3);
Tree2_constructor.setup(_arg1, this);
}
}
}//package Objects
Section 331
//Tree3 (Objects.Tree3)
package Objects {
import GameScene.*;
import ObjectConstructors.*;
public class Tree3 extends Obstacle {
public function Tree3(_arg1:GameScene, _arg2:int, _arg3:int){
super(_arg1, Tree3_constructor.baseim_embed, _arg2, _arg3);
Tree3_constructor.setup(_arg1, this);
}
}
}//package Objects
Section 332
//VertPipe (Objects.VertPipe)
package Objects {
import GameScene.*;
import ObjectConstructors.*;
public class VertPipe extends Obstacle {
public function VertPipe(_arg1:GameScene, _arg2:int, _arg3:int){
super(_arg1, VertPipe_constructor.baseim_embed, _arg2, _arg3);
VertPipe_constructor.setup(_arg1, this);
}
}
}//package Objects
Section 333
//VertPipeBig (Objects.VertPipeBig)
package Objects {
import GameScene.*;
import ObjectConstructors.*;
public class VertPipeBig extends Obstacle {
public function VertPipeBig(_arg1:GameScene, _arg2:int, _arg3:int){
super(_arg1, VertPipeBig_constructor.baseim_embed, _arg2, _arg3);
VertPipeBig_constructor.setup(_arg1, this);
}
}
}//package Objects
Section 334
//VertPipeBigRoll (Objects.VertPipeBigRoll)
package Objects {
import GameScene.*;
import ObjectConstructors.*;
public class VertPipeBigRoll extends Obstacle {
public function VertPipeBigRoll(_arg1:GameScene, _arg2:int, _arg3:int){
super(_arg1, VertPipeBigRoll_constructor.baseim_embed, _arg2, _arg3);
causesRoll = true;
VertPipeBigRoll_constructor.setup(_arg1, this);
}
}
}//package Objects
Section 335
//VertPipeRoll (Objects.VertPipeRoll)
package Objects {
import GameScene.*;
import ObjectConstructors.*;
public class VertPipeRoll extends Obstacle {
public function VertPipeRoll(_arg1:GameScene, _arg2:int, _arg3:int){
super(_arg1, VertPipeRoll_constructor.baseim_embed, _arg2, _arg3);
causesRoll = true;
VertPipeRoll_constructor.setup(_arg1, this);
}
}
}//package Objects
Section 336
//Particle (Particles.Particle)
package Particles {
import flash.display.*;
import GameObject.*;
import flash.geom.*;
import Tools.*;
import flash.filters.*;
public class Particle {
public var dRotation:Number;// = 0
public var green:Number;// = 0
public var baseScaleX:Number;// = 1
public var imageSet:Array;
public var toKill:Boolean;// = false
public var lockToTForm:Boolean;// = false
public var lockTo:GameObject;
public var x:Number;// = 0
public var red:Number;// = 1
public var lockToX:Number;// = 0
public var dx:Number;// = 0
public var dy:Number;// = 0
public var lastframe:int;// = 0
public var Plugins:Array;
public var Friction:Number;// = 0
public var blue:Number;// = 0
public var Rotation:Number;// = 0
public var identifier:String;
public var baseScaleY:Number;// = 1
public var StartScale:Number;// = 1
public var Blend:String;// = ""
public var lockToY:Number;// = 0
public var animSpeed:Number;// = 1
public var ax:Number;// = 0
public var ay:Number;// = 0
public var TotalLife:Number;// = 0
public var Delayed:int;// = 0
public var StartAlpha:Number;// = 1
public var RenderWhileDelayed:int;// = 0
public var EndScale:Number;// = 1
public var layer:ParticleLayer;
public var StayAfterDeath:Boolean;// = false
public var xscale:Number;// = 1
public var baseHeight:Number;// = 0
public var deathCallback:Function;// = null
public var _deleted:Boolean;// = false
public var EndAlpha:Number;// = 1
public var b:Bitmap;
public var frame:int;// = 0
public var yscale:Number;// = 1
public var CurrentLife:Number;// = 0
public var ticks:int;// = 0
public var y:Number;// = 0
public var filters:Array;
public var baseWidth:Number;// = 0
public var aRotation:Number;// = 0
public function Particle(){
Plugins = new Array();
filters = new Array();
super();
}
public function addFilter(_arg1:ParticleFilter):void{
filters.push(_arg1);
}
public function remove():void{
b.parent.removeChild(b);
}
public function cosd(_arg1:Number):Number{
return (Math.cos((_arg1 * (Math.PI / 180))));
}
public function tint(_arg1:Number, _arg2:Number, _arg3:Number):void{
red = _arg1;
green = _arg2;
blue = _arg3;
var _local4:Array = new Array();
_local4 = _local4.concat([_arg1, _arg2, _arg3, 0, 0]);
_local4 = _local4.concat([_arg3, _arg1, _arg2, 0, 0]);
_local4 = _local4.concat([_arg2, _arg3, _arg1, 0, 0]);
_local4 = _local4.concat([0, 0, 0, 1, 0]);
var _local5:BitmapFilter = new ColorMatrixFilter(_local4);
this.b.filters = new Array(_local5);
}
public function sind(_arg1:Number):Number{
return (Math.sin((_arg1 * (Math.PI / 180))));
}
public function update():void{
var _local1:ParticleFilter;
var _local2:int;
var _local3:Point;
if (Delayed){
Delayed--;
if (Delayed > 0){
if (!RenderWhileDelayed){
b.visible = false;
};
return;
} else {
b.visible = true;
};
};
if (Blend != ""){
b.blendMode = Blend;
};
ticks++;
dx = (dx + ax);
dy = (dy + ay);
if (Friction > 0){
dx = (dx * (1 - Friction));
dy = (dy * (1 - Friction));
};
x = (x + dx);
y = (y + dy);
if (imageSet != null){
frame++;
_local2 = (frame / animSpeed);
if (_local2 >= lastframe){
_local2 = lastframe;
};
b.bitmapData = imageSet[_local2];
};
if (lockTo){
if (lockToTForm){
_local3 = lockTo.tformed(lockToX, lockToY);
x = _local3.x;
x = _local3.x;
y = _local3.y;
} else {
x = (lockTo.basex + lockToX);
y = (lockTo.basey + lockToY);
};
};
if (((((!((StartScale == 1))) || (!((EndScale == 1))))) || ((Math.abs(Rotation) > 4)))){
b.smoothing = true;
};
CurrentLife = (CurrentLife + 1);
baseScaleX = Interpolation.linearInterpolateLock(StartScale, EndScale, Interpolation.fromTo(CurrentLife, 0, TotalLife));
baseScaleY = baseScaleX;
for each (_local1 in filters) {
_local1.update(this);
};
b.alpha = Interpolation.linearInterpolateLock(StartAlpha, EndAlpha, Interpolation.fromTo(CurrentLife, 0, TotalLife));
b.scaleX = baseScaleX;
b.scaleY = baseScaleY;
Rotation = (Rotation + dRotation);
dRotation = (dRotation + aRotation);
b.rotation = Rotation;
b.x = ((x - ((cosd(-(Rotation)) * ((baseWidth * 0.5) * baseScaleY)) + (sind(-(Rotation)) * ((baseHeight * 0.5) * baseScaleX)))) - layer.x);
b.y = ((y - ((-(sind(-(Rotation))) * ((baseWidth * 0.5) * baseScaleX)) + (cosd(-(Rotation)) * ((baseHeight * 0.5) * baseScaleY)))) - layer.y);
if ((((CurrentLife > TotalLife)) || (toKill))){
if (deathCallback){
deathCallback(this);
};
_deleted = true;
};
}
}
}//package Particles
Section 337
//ParticleEmitter (Particles.ParticleEmitter)
package Particles {
import GameScene.*;
import flash.display.*;
import Tools.*;
public class ParticleEmitter {
public var y:Number;
public var startrotationhigh:Number;// = 0
public var imageSet:Array;
public var startScale:Number;// = 0
public var yspeedhigh:Number;// = 0
public var rotatespeedtodirection:int;// = 0
public var Friction:Number;// = 0
public var layeroverride:String;// = ""
public var lifehigh:int;// = 100
public var xspeedlow:Number;// = 0
public var yspeedlow:Number;// = 0
public var animspeedrange:int;// = 0
public var Name:String;
public var endScale:Number;// = 0
public var x:Number;
public var Test:int;// = 0
public var Frequency:int;// = 0
public var startalpha:Number;// = 1
public var dRotationHigh:Number;// = 0
public var gravitylow:Number;// = 0
public var impath:String;
public var Identifier:String;// = ""
public var StayAfterDeath:Boolean;// = false
public var additive:int;// = 0
public var lifelow:int;// = 100
public var image:Class;
public var animspeed:Number;// = 1
public var endalpha:Number;// = 1
public var animframecap:int;// = 0
public var gravityhigh:Number;// = 0
public var xspeedhigh:Number;// = 0
public var dRotationLow:Number;// = 0
public var startrotationlow:Number;// = 0
public var filters:Array;
public function ParticleEmitter(){
filters = new Array();
super();
}
public function emitOnto(_arg1:ParticleLayer, _arg2:Number, _arg3:Number, _arg4:Number=0, _arg5:Function=null):Array{
var _local9:ParticleLayer;
var _local10:Particle;
if (((((isNaN(_arg2)) || (isNaN(_arg3)))) || ((((_arg2 == 0)) && ((_arg3 == 0)))))){
return (new Array());
};
if (((!((layeroverride == ""))) && (!((layeroverride == null))))){
_local9 = GameScene.current().getZOrder(layeroverride).pl;
if (_local9){
_arg1 = _local9;
};
};
var _local6:int;
if (Frequency >= 0){
_local6 = Frequency;
} else {
if (int((Math.random() > (1 - (1 / (1 - Frequency))))) == 1){
_local6 = 1;
};
};
if (Frequency == 0){
_local6 = 1;
};
var _local7:Array = new Array(_local6);
var _local8:int;
while (_local8 < _local6) {
_local10 = _arg1.addParticle(image);
_local7[_local8] = _local10;
_local10.imageSet = imageSet;
if (imageSet){
_local10.lastframe = Random.randInt(((imageSet.length - animframecap) - 1), (imageSet.length - 1));
};
_local10.layer = _arg1;
_local10.x = _arg2;
_local10.y = _arg3;
_local10.TotalLife = rand(lifelow, lifehigh);
_local10.Rotation = (rand(startrotationlow, startrotationhigh) + _arg4);
_local10.dRotation = rand(dRotationLow, dRotationHigh);
_local10.deathCallback = _arg5;
_local10.baseWidth = _local10.b.width;
_local10.baseHeight = _local10.b.height;
_local10.dx = rand(xspeedlow, xspeedhigh);
_local10.dy = rand(yspeedlow, yspeedhigh);
_local10.ay = rand(gravitylow, gravityhigh);
_local10.StartAlpha = startalpha;
_local10.EndAlpha = endalpha;
_local10.StartScale = startScale;
_local10.EndScale = endScale;
_local10.StayAfterDeath = StayAfterDeath;
_local10.b.alpha = _local10.StartAlpha;
_local10.b.scaleX = _local10.StartScale;
_local10.b.scaleY = _local10.StartScale;
_local10.Friction = Friction;
_local10.identifier = Identifier;
_local10.filters = filters;
_local10.animSpeed = (animspeed + Random.randInt(0, animspeedrange));
if (additive){
_local10.Blend = BlendMode.ADD;
};
_local10.update();
_local8++;
};
return (_local7);
}
public function addFilter(_arg1:ParticleFilter):void{
filters.push(_arg1);
}
public function rand(_arg1:Number, _arg2:Number):Number{
return ((_arg1 + (Math.random() * (_arg2 - _arg1))));
}
}
}//package Particles
Section 338
//ParticleFilter (Particles.ParticleFilter)
package Particles {
public class ParticleFilter {
public function update(_arg1:Particle):void{
}
}
}//package Particles
Section 339
//ParticleFilterScaleIn (Particles.ParticleFilterScaleIn)
package Particles {
import Tools.*;
public class ParticleFilterScaleIn extends ParticleFilter {
public var Frames:Number;// = 0
override public function update(_arg1:Particle):void{
var _local2:Number = Interpolation.linearInterpolateLock(0, 1, (Number(_arg1.ticks) / Frames));
_arg1.baseScaleX = (_arg1.baseScaleX * _local2);
_arg1.baseScaleY = (_arg1.baseScaleY * _local2);
}
}
}//package Particles
Section 340
//ParticleLayer (Particles.ParticleLayer)
package Particles {
import flash.display.*;
public class ParticleLayer {
public var parent:MovieClip;
public var x:Number;// = 0
public var y:Number;// = 0
public var particles:Array;
public function ParticleLayer(){
particles = new Array();
super();
}
public function update():void{
var _local1:Particle;
for each (_local1 in particles) {
_local1.update();
if (_local1._deleted){
_local1.remove();
particles.splice(particles.indexOf(_local1), 1);
};
};
}
public function addParticle(_arg1:Class):Particle{
var _local2:Particle = new Particle();
_local2.b = new (_arg1);
parent.addChild(_local2.b);
particles.push(_local2);
return (_local2);
}
public function remove():void{
var _local1:Particle;
for each (_local1 in particles) {
_local1.remove();
};
particles = new Array();
}
}
}//package Particles
Section 341
//MainGameBackground_constructor (SceneConstructors.MainGameBackground_constructor)
package SceneConstructors {
import GameScene.*;
import flash.display.*;
import GameObject.*;
import flash.geom.*;
import GlobalSetup.*;
public class MainGameBackground_constructor {
public static var im1_embed:Class = Embeds.cloud1_png;
public static var im2_embed:Class = Embeds.cloud1_png;
public static var im3_embed:Class = Embeds.cloud1_png;
public static var im4_embed:Class = Embeds.land_png;
public static var im1:BitmapData = new Embeds.cloud1_png().bitmapData;
public static var im2:BitmapData = new Embeds.cloud1_png().bitmapData;
public static var im3:BitmapData = new Embeds.cloud1_png().bitmapData;
public static var im4:BitmapData = new Embeds.land_png().bitmapData;
public function register(_arg1:GameScene, _arg2:Sprite, _arg3:Boolean=false):void{
var _local4:GameObject;
var _local5:GameObjectFilter;
if (!_arg3){
_arg1.m = new MovieClip();
};
var _local6:String = GradientType.LINEAR;
var _local7:Array = [100798, 5880545, 11196394];
var _local8:Array = [100, 100, 100];
var _local9:Array = [0, 128, 0xFF];
var _local10:Matrix = new Matrix();
_local10.createGradientBox(400, 600, (Math.PI / 2), 0, 0);
var _local11:String = SpreadMethod.PAD;
_arg1.m.graphics.beginGradientFill(_local6, _local7, _local8, _local9, _local10, _local11);
_arg1.m.graphics.drawRect(0, 0, 800, 600);
_local4 = new GameObject(_arg1, im1_embed, "", -42, 135);
_local4.baseRotation = 0;
_local5 = new GameObjectFilterDampenOrigin();
_local4.addFilter(_local5);
GameObjectFilterDampenOrigin(_local5).factor = 0.100000001;
GameObjectFilterDampenOrigin(_local5).StickToTop = 0;
GameObjectFilterDampenOrigin(_local5).StickToBottom = 0;
_local5 = new GameObjectFilterStayOnScreen();
_local4.addFilter(_local5);
_local4 = new GameObject(_arg1, im2_embed, "", 425, 19);
_local4.baseRotation = 0;
_local5 = new GameObjectFilterDampenOrigin();
_local4.addFilter(_local5);
GameObjectFilterDampenOrigin(_local5).factor = 0.100000001;
GameObjectFilterDampenOrigin(_local5).StickToTop = 0;
GameObjectFilterDampenOrigin(_local5).StickToBottom = 0;
_local5 = new GameObjectFilterStayOnScreen();
_local4.addFilter(_local5);
_local4 = new GameObject(_arg1, im3_embed, "", 731, 374);
_local4.baseRotation = 0;
_local5 = new GameObjectFilterDampenOrigin();
_local4.addFilter(_local5);
GameObjectFilterDampenOrigin(_local5).factor = 0.100000001;
GameObjectFilterDampenOrigin(_local5).StickToTop = 0;
GameObjectFilterDampenOrigin(_local5).StickToBottom = 0;
_local5 = new GameObjectFilterStayOnScreen();
_local4.addFilter(_local5);
_local4 = new GameObject(_arg1, im4_embed, "", 331, 561);
_local4.baseRotation = 0;
_local5 = new GameObjectFilterDampenOrigin();
_local4.addFilter(_local5);
GameObjectFilterDampenOrigin(_local5).factor = 0.100000001;
GameObjectFilterDampenOrigin(_local5).StickToTop = 0;
GameObjectFilterDampenOrigin(_local5).StickToBottom = 0;
_local5 = new GameObjectFilterRepeats();
_local4.addFilter(_local5);
if (!_arg3){
_arg2.addChild(_arg1.m);
};
}
}
}//package SceneConstructors
Section 342
//MainMenu_constructor (SceneConstructors.MainMenu_constructor)
package SceneConstructors {
import GameScene.*;
import flash.display.*;
import GameObject.*;
import flash.geom.*;
import GlobalSetup.*;
public class MainMenu_constructor {
public static var im1:BitmapData = new Embeds.level_panel_png().bitmapData;
public static var im2:BitmapData = new Embeds.cloud1_png().bitmapData;
public static var im3:BitmapData = new Embeds.menu_logo_png().bitmapData;
public static var im4:BitmapData = new Embeds.menu_button_play_png().bitmapData;
public static var im5:BitmapData = new Embeds.cloud1_png().bitmapData;
public static var im6:BitmapData = new Embeds.land_png().bitmapData;
public static var im7:BitmapData = new Embeds.tree2_png().bitmapData;
public static var im8:BitmapData = new Embeds.cloud1_png().bitmapData;
public static var im9:BitmapData = new Embeds.rock_1_png().bitmapData;
public static var im11_embed:Class = Embeds.blimp_png;
public static var im1_embed:Class = Embeds.level_panel_png;
public static var im5_embed:Class = Embeds.cloud1_png;
public static var im7_embed:Class = Embeds.tree2_png;
public static var im9_embed:Class = Embeds.rock_1_png;
public static var im3_embed:Class = Embeds.menu_logo_png;
public static var im15_embed:Class = Embeds.tree1_png;
public static var im17_embed:Class = Embeds.level_panel_png;
public static var im19_embed:Class = Embeds.content_png;
public static var im13_embed:Class = Embeds.pole_png;
public static var im10:BitmapData = new Embeds.rock_2_png().bitmapData;
public static var im11:BitmapData = new Embeds.blimp_png().bitmapData;
public static var im12:BitmapData = new Embeds.cloud1_png().bitmapData;
public static var im13:BitmapData = new Embeds.pole_png().bitmapData;
public static var im14:BitmapData = new Embeds.tree3_png().bitmapData;
public static var im15:BitmapData = new Embeds.tree1_png().bitmapData;
public static var im16:BitmapData = new Embeds.tree1_png().bitmapData;
public static var im17:BitmapData = new Embeds.level_panel_png().bitmapData;
public static var im19:BitmapData = new Embeds.content_png().bitmapData;
public static var im10_embed:Class = Embeds.rock_2_png;
public static var im12_embed:Class = Embeds.cloud1_png;
public static var im22_embed:Class = Embeds.menu_button_png;
public static var im14_embed:Class = Embeds.tree3_png;
public static var im20:BitmapData = new Embeds.menu_button_png().bitmapData;
public static var im16_embed:Class = Embeds.tree1_png;
public static var im22:BitmapData = new Embeds.menu_button_png().bitmapData;
public static var im18_embed:Class = Embeds.balloon_png;
public static var im2_embed:Class = Embeds.cloud1_png;
public static var im20_embed:Class = Embeds.menu_button_png;
public static var im4_embed:Class = Embeds.menu_button_play_png;
public static var im6_embed:Class = Embeds.land_png;
public static var im18:BitmapData = new Embeds.balloon_png().bitmapData;
public static var im8_embed:Class = Embeds.cloud1_png;
public static var im21:BitmapData = new Embeds.menu_button_png().bitmapData;
public static var im23:BitmapData = new Embeds.menu_button_png().bitmapData;
public static var im21_embed:Class = Embeds.menu_button_png;
public static var im23_embed:Class = Embeds.menu_button_png;
public function register(_arg1:GameScene, _arg2:Sprite, _arg3:Boolean=false):void{
var _local4:GameObject;
var _local5:GameObjectFilter;
if (!_arg3){
_arg1.m = new MovieClip();
};
var _local6:String = GradientType.LINEAR;
var _local7:Array = [100798, 5880545, 11196394];
var _local8:Array = [100, 100, 100];
var _local9:Array = [0, 128, 0xFF];
var _local10:Matrix = new Matrix();
_local10.createGradientBox(400, 600, (Math.PI / 2), 0, 0);
var _local11:String = SpreadMethod.PAD;
_arg1.m.graphics.beginGradientFill(_local6, _local7, _local8, _local9, _local10, _local11);
_arg1.m.graphics.drawRect(0, 0, 800, 600);
_local4 = new GameObject(_arg1, im1_embed, "", 400, 46);
_local4.baseRotation = 0;
_local4 = new GameObject(_arg1, im2_embed, "", 719, 103);
_local4.baseRotation = 0;
_local4 = new GameObject(_arg1, im3_embed, "", 399, 95);
_local4.baseRotation = 0;
_local5 = new GameObjectFilterSqrtInterpolateIn();
_local4.addFilter(_local5);
GameObjectFilterSqrtInterpolateIn(_local5).Delay = 0;
GameObjectFilterSqrtInterpolateIn(_local5).FadeTime = 75;
GameObjectFilterSqrtInterpolateIn(_local5).dx = -1000;
GameObjectFilterSqrtInterpolateIn(_local5).dy = 0;
_local4 = new GameObject(_arg1, SimpleButton, "", 400, 288);
_local4.setupButton(im4_embed, "Play");
_local5 = new GameObjectFilterSqrtInterpolateIn();
_local4.addFilter(_local5);
GameObjectFilterSqrtInterpolateIn(_local5).Delay = 0;
GameObjectFilterSqrtInterpolateIn(_local5).FadeTime = 75;
GameObjectFilterSqrtInterpolateIn(_local5).dx = 800;
GameObjectFilterSqrtInterpolateIn(_local5).dy = 0;
_local4 = new GameObject(_arg1, im5_embed, "", 46, 246);
_local4.baseRotation = 0;
_local4 = new GameObject(_arg1, im6_embed, "", 434, 563);
_local4.baseRotation = 0;
_local4 = new GameObject(_arg1, im7_embed, "", 654, 591);
_local4.baseRotation = 0;
_local4 = new GameObject(_arg1, im8_embed, "", 114, 205);
_local4.baseRotation = 0;
_local4 = new GameObject(_arg1, im9_embed, "", 27, 495);
_local4.baseRotation = 0;
_local4 = new GameObject(_arg1, im10_embed, "", 773, 573);
_local4.baseRotation = 0;
_local4 = new GameObject(_arg1, im11_embed, "", 707, 448);
_local4.baseRotation = 0;
_local4 = new GameObject(_arg1, im12_embed, "", 702, 317);
_local4.baseRotation = 0;
_local4 = new GameObject(_arg1, im13_embed, "", 137, 579);
_local4.baseRotation = 0;
_local4 = new GameObject(_arg1, im14_embed, "", 52, 562);
_local4.baseRotation = 0;
_local4 = new GameObject(_arg1, im15_embed, "", 100, 588);
_local4.baseRotation = 0;
_local4 = new GameObject(_arg1, im16_embed, "", 712, 582);
_local4.baseRotation = 0;
_local4 = new GameObject(_arg1, im17_embed, "", 400, 557);
_local4.baseRotation = -1.34110451E-7;
_local4.baseScaleY = -1;
_local4.tint(0.900000095, 0, 0);
_local4 = new GameObject(_arg1, im18_embed, "", 131, 253);
_local4.baseRotation = 0;
_local4 = new GameObject(_arg1, im19_embed, "", 400, 588);
_local4.baseRotation = 0;
_local4 = new GameObject(_arg1, SimpleButton, "", 400, 379);
_local4.setupButton(im20_embed, "Controls");
_local5 = new GameObjectFilterSqrtInterpolateIn();
_local4.addFilter(_local5);
GameObjectFilterSqrtInterpolateIn(_local5).Delay = 0;
GameObjectFilterSqrtInterpolateIn(_local5).FadeTime = 75;
GameObjectFilterSqrtInterpolateIn(_local5).dx = 800;
GameObjectFilterSqrtInterpolateIn(_local5).dy = 0;
_local4 = new GameObject(_arg1, SimpleButton, "", 400, 333);
_local4.setupButton(im21_embed, "Continue");
_local5 = new GameObjectFilterSqrtInterpolateIn();
_local4.addFilter(_local5);
GameObjectFilterSqrtInterpolateIn(_local5).Delay = 0;
GameObjectFilterSqrtInterpolateIn(_local5).FadeTime = 75;
GameObjectFilterSqrtInterpolateIn(_local5).dx = -800;
GameObjectFilterSqrtInterpolateIn(_local5).dy = 0;
_local4 = new GameObject(_arg1, SimpleButton, "", 400, 427);
_local4.setupButton(im22_embed, "High Scores");
_local5 = new GameObjectFilterSqrtInterpolateIn();
_local4.addFilter(_local5);
GameObjectFilterSqrtInterpolateIn(_local5).Delay = 0;
GameObjectFilterSqrtInterpolateIn(_local5).FadeTime = 75;
GameObjectFilterSqrtInterpolateIn(_local5).dx = -800;
GameObjectFilterSqrtInterpolateIn(_local5).dy = 0;
_local4 = new GameObject(_arg1, SimpleButton, "", 401, 475);
_local4.setupButton(im23_embed, "Credits");
_local5 = new GameObjectFilterSqrtInterpolateIn();
_local4.addFilter(_local5);
GameObjectFilterSqrtInterpolateIn(_local5).Delay = 0;
GameObjectFilterSqrtInterpolateIn(_local5).FadeTime = 75;
GameObjectFilterSqrtInterpolateIn(_local5).dx = 800;
GameObjectFilterSqrtInterpolateIn(_local5).dy = 0;
if (!_arg3){
_arg2.addChild(_arg1.m);
};
}
}
}//package SceneConstructors
Section 343
//HighScoreScreen (Scenes.HighScoreScreen)
package Scenes {
import flash.events.*;
import GameScene.*;
import Miniclip.*;
public class HighScoreScreen extends GameScene {
public var myHighscores:HighscoresLoader;
public static var scoreToSave:int = 0;
override public function init():void{
myHighscores = HighscoresLoader.start(m.stage, scoreToSave);
myHighscores.addEventListener("close", done);
}
public function done(_arg1:Event):void{
HighscoresLoader.remove();
pushScene(new MainMenu());
}
}
}//package Scenes
Section 344
//MainMenu (Scenes.MainMenu)
package Scenes {
import GameScene.*;
import flash.display.*;
import GameObject.*;
import flash.geom.*;
import Audio.*;
import flash.net.*;
import flash.utils.*;
import Tools.*;
import GlobalSetup.*;
import SceneConstructors.*;
import FreeOnlineGames.*;
public class MainMenu extends GameScene {
public var downButton:GameObject;
public var creditSprites:Array;
public var creditsOKButton:GameObject;
public var continueButtons:Array;
public var playTriangle:GameObject;
public var hitMenuButton:Boolean;// = false
public var controlText:GameObject;
public var controlsOKButton:GameObject;
public var upButton:GameObject;
public var embedButton:GameObject;
public var continueText:GameObject;
public var startCountdown:int;// = 0
public var highScoreObjects:Array;
public static var highestLevel:int = 0;
public static var soundButton:GameObject;
public static var sound_button_embed:Class = MainMenu_sound_button_embed;
public static var music_button_embed:Class = MainMenu_music_button_embed;
public static var controlsReversed:Boolean = false;
public static var lastScore:int = 0;
public static var play:Class = MainMenu_play;
public static var musicButton:GameObject;
public static var lastHighScore:int = 0;
public static var off_button_embed:Class = MainMenu_off_button_embed;
public function MainMenu(){
highScoreObjects = new Array();
creditSprites = new Array();
super();
}
public function addFilter(_arg1:GameObject, _arg2:Boolean){
var _local3:GameObjectFilterSqrtInterpolateIn = new GameObjectFilterSqrtInterpolateIn();
_local3.dx = 800;
if (_arg2){
_local3.dx = (_local3.dx * -1);
};
_local3.FadeTime = 100;
_arg1.addFilter(_local3);
}
public function makeControlButtons():void{
var _local2:GameObject;
var _local3:GameObjectFilterFadeInOut;
var _local4:GameObjectFilterSqrtInterpolateIn;
var _local1:int;
while (_local1 < 4) {
if (_local1 == 0){
_local2 = new GameObject(this, null, "GUILayer", 400, 228);
_local2.setText("CHOOSE CONTROL METHOD", 32);
_local3 = new GameObjectFilterFadeInOut();
_local3.FadeIn = 1;
_local3.FadeInDuration = 25;
_local2.addFilter(_local3);
controlText = _local2;
} else {
_local2 = new GameObject(this, SimpleButton, "GUILayer", 400, (306 + ((_local1 - 1) * 80)));
_local4 = new GameObjectFilterSqrtInterpolateIn();
_local4.dx = 800;
if ((_local1 % 2) == 1){
_local4.dx = (_local4.dx * -1);
};
_local4.FadeTime = 100;
_local2.addFilter(_local4);
};
if (_local1 == 1){
_local2.showButtonOnOutline = true;
_local2.setupButton(Embeds.button_control_1_png, "ControlsUp", Embeds.button_control_1_png);
upButton = _local2;
_local2.stripText();
_local2.setButtonOn(controlsReversed);
} else {
if (_local1 == 2){
_local2.showButtonOnOutline = true;
_local2.setupButton(Embeds.button_control_2_png, "ControlsDown", Embeds.button_control_2_png);
downButton = _local2;
_local2.stripText();
_local2.setButtonOn(!(controlsReversed));
} else {
if (_local1 == 3){
_local2.setupButton(Embeds.menu_button_png, "OK");
_local2.basey = (_local2.basey - 8);
controlsOKButton = _local2;
};
};
};
_local1++;
};
}
override public function _register(_arg1:Sprite):void{
var _local2:MainMenu_constructor = new MainMenu_constructor();
_local2.register(this, _arg1, true);
}
public function makeCredits():void{
var _local3:GameObject;
creditSprites = new Array();
var _local1:Array = ["Stunt Pilot", "By Rock Solid Arcade", "", "Programming: Michael Reitzenstein", "Art and Sound: Rod Smith"];
var _local2:int;
while (_local2 < _local1.length) {
_local3 = new GameObject(this, null, "GUILayer", 400, (228 + (_local2 * 40)));
_local3.setText(_local1[_local2], ((_local2 == 0)) ? 48 : 32);
addFilter(_local3, ((_local2 % 2) == 1));
creditSprites.push(_local3);
_local2++;
};
_local3 = new GameObject(this, SimpleButton, "GUILayer", (400 - 110), 470);
_local3.setupButton(Embeds.menu_button_png, "OK");
_local3.basey = (_local3.basey - 8);
addFilter(_local3, 1);
creditsOKButton = _local3;
creditSprites.push(_local3);
_local3 = new GameObject(this, SimpleButton, "GUILayer", 510, 470);
_local3.setupButton(Embeds.menu_button_link_png, "Link");
_local3.stripText();
_local3.basey = (_local3.basey - 8);
addFilter(_local3, 0);
_local3.name = "Link";
creditSprites.push(_local3);
}
public function makeContinueButtons():void{
var _local3:GameObject;
var _local4:GameObjectFilterSqrtInterpolateIn;
continueButtons = new Array();
_local3 = new GameObject(this, null, "GUILayer", 400, (225 - 16));
_local3.setText("CHOOSE STARTING LEVEL", 32);
var _local1:GameObjectFilterFadeInOut = new GameObjectFilterFadeInOut();
_local1.FadeIn = 1;
_local1.FadeInDuration = 25;
_local3.addFilter(_local1);
continueText = _local3;
var _local2:int;
while (_local2 < 6) {
_local3 = new GameObject(this, SimpleButton, "GUILayer", 400, ((268 + (_local2 * 42)) - 16));
_local3.setupButton(Embeds.menu_button_png, ("Level " + String(((_local2 * 6) + 7))));
if (highestLevel < ((_local2 * 6) + 6)){
_local3.disableButton();
};
_local4 = new GameObjectFilterSqrtInterpolateIn();
_local4.dx = 800;
if ((_local2 % 2) == 1){
_local4.dx = (_local4.dx * -1);
};
_local4.FadeTime = 100;
_local3.addFilter(_local4);
continueButtons[_local2] = _local3;
_local2++;
};
}
public function fadeMainMenu(_arg1:Boolean):void{
var _local9:GameObject;
var _local10:GameObjectFilterFadeInOut;
var _local2:GameObject = findObjectByName("Play");
var _local3:GameObject = findObjectByName("Continue");
var _local4:GameObject = findObjectByName("Controls");
var _local5:GameObject = findObjectByName("High Scores");
var _local6:GameObject = findObjectByName("Credits");
var _local7:Array = [_local2, _local3, _local4, _local5, _local6];
hitMenuButton = _arg1;
var _local8:int;
while (_local8 < _local7.length) {
reverseSqrFilter(_local7[_local8]);
_local8++;
};
for each (_local9 in highScoreObjects) {
_local9.filters = new Array();
_local10 = new GameObjectFilterFadeInOut();
if (_arg1){
_local10.FadeOut = 1;
_local10.FadeOutTime = 0;
_local10.FadeOutDuration = 25;
_local10.FadeOutKill = 0;
} else {
_local9.ticks = 0;
_local10.FadeIn = 1;
_local10.FadeInDuration = 25;
};
_local9.addFilter(_local10);
};
}
override public function init():void{
var _local2:GameObject;
var _local3:int;
var _local4:GameObject;
var _local1:GameSoundScene = GameSoundScene.forName("main");
_local1.setBackgroundMusic(Sounds.mainLoop);
readPrefs();
if (lastHighScore > 0){
_local2 = new GameObject(this, null, "GUILayer", 400, 200);
_local2.setGlobal(true);
_local2.setText(("HIGH SCORE " + String(lastHighScore)), 42);
_local2.baseScaleY = 0.8;
highScoreObjects.push(_local2);
_local3 = -1;
while (_local3 <= 1) {
_local4 = new GameObject(this, Embeds.tick_png, "GUILayer", ((400 + (((_local2.baseWidth / 2) + 28) * _local3)) + 4), 200);
highScoreObjects.push(_local4);
_local3 = (_local3 + 2);
};
};
if (lastScore > 0){
_local2 = new GameObject(this, null, "GUILayer", 400, 234);
_local2.setGlobal(true);
_local2.setText(("LAST SCORE " + String(lastScore)), 28);
_local2.baseScaleY = 0.8;
highScoreObjects.push(_local2);
};
musicButton = new GameObject(this, SimpleButton, "GUILayer", ((800 - 13) - 4), ((600 - 13) - 4));
musicButton.setupButton(music_button_embed, "", off_button_embed);
musicButton.setGlobal(true);
musicButton.updateDespitePaused = true;
soundButton = new GameObject(this, SimpleButton, "GUILayer", (((800 - 13) - 4) - (4 + 26)), ((600 - 13) - 4));
soundButton.setupButton(sound_button_embed, "", off_button_embed);
soundButton.setGlobal(true);
soundButton.updateDespitePaused = true;
if (GameSound.globalMusicVolume < 0.5){
musicButton.setButtonOn(true);
};
if (GameSound.globalSoundVolume < 0.5){
soundButton.setButtonOn(true);
};
embedButton = new GameObject(this, SimpleButton, "GUILayer", 400, (600 - 50));
embedButton.setupButton(Embeds.yoursite_png, "");
embedButton.setGlobal(true);
embedButton.updateDespitePaused = true;
}
public function reverseSqrFilter(_arg1:GameObject):void{
var _local2:GameObjectFilter;
var _local3:GameObjectFilterSqrtInterpolateIn;
for each (_local2 in _arg1.filters) {
if ((_local2 is GameObjectFilterSqrtInterpolateIn)){
_local3 = GameObjectFilterSqrtInterpolateIn(_local2);
_local3.useSquare = !(_local3.useSquare);
_local3.ticks = 0;
};
};
}
override public function _update():void{
var _local8:Boolean;
var _local9:Boolean;
var _local10:GameObjectFilterFadeInOut;
var _local11:int;
var _local12:GameObject;
GameScene.stealFocus = (Ticks < 300);
if (musicButton.buttonOn()){
GameSound.globalMusicVolume = 0;
} else {
GameSound.globalMusicVolume = 1;
};
if (soundButton.buttonOn()){
GameSound.globalSoundVolume = 0;
} else {
GameSound.globalSoundVolume = 1;
};
if (((soundButton.mHit()) || (musicButton.mHit()))){
writePrefs();
};
var _local1:GameObject = findObjectByName("Play");
var _local2:GameObject = findObjectByName("Continue");
var _local3:GameObject = findObjectByName("Controls");
var _local4:GameObject = findObjectByName("Link");
var _local5:GameObject = findObjectByName("High Scores");
var _local6:GameObject = findObjectByName("Credits");
var _local7:Array = [_local1, _local2, _local3, _local5, _local6];
if (highestLevel < 6){
_local2.disableButton();
};
if (_local4){
if (_local4.mHit()){
navigateToURL(new URLRequest("http://www.rocksolidarcade.com/home"));
};
};
if (startCountdown != 0){
startCountdown++;
};
if (startCountdown > 80){
pushScene(new MainScene(), true);
};
if (embedButton){
if (embedButton.mHit()){
Net.openURL("http://www.rocksolidarcade.com/embed/stuntpilot/");
};
};
embedButton.hide();
if (hitMenuButton){
if (upButton){
_local8 = upButton.mHit();
_local9 = downButton.mHit();
if (((_local8) || (_local9))){
controlsReversed = _local8;
upButton.setButtonOn(controlsReversed);
downButton.setButtonOn(!(controlsReversed));
writePrefs();
};
};
if (controlsOKButton){
if (controlsOKButton.mHit()){
fadeMainMenu(false);
reverseSqrFilter(upButton);
reverseSqrFilter(downButton);
reverseSqrFilter(controlsOKButton);
controlText.filters = new Array();
_local10 = new GameObjectFilterFadeInOut();
_local10.FadeOutDuration = 25;
_local10.FadeOut = 1;
controlText.addFilter(_local10);
};
};
};
if (startCountdown == 0){
if (continueButtons){
_local11 = 0;
while (_local11 < continueButtons.length) {
if (continueButtons[_local11].mHit()){
for each (_local12 in continueButtons) {
reverseSqrFilter(_local12);
};
MainScene.levelToStart = (6 * (_local11 + 1));
startCountdown = 1;
Sounds.startGame.play();
continueText.filters = new Array();
_local10 = new GameObjectFilterFadeInOut();
_local10.FadeOutDuration = 25;
_local10.FadeOut = 1;
continueText.addFilter(_local10);
};
_local11++;
};
};
};
if ((((startCountdown == 0)) && (!(hitMenuButton)))){
if (_local1){
if (((_local1.mHit()) || (Input.i.keyHit(13)))){
if (startCountdown == 0){
if (CustomPreloader.demo){
navigateToURL(new URLRequest("http://www.rocksolidarcade.com/embed/stuntpilot"));
} else {
for each (_local12 in _local7) {
reverseSqrFilter(_local12);
};
hitMenuButton = true;
MainScene.levelToStart = 0;
startCountdown = 1;
Sounds.startGame.play();
};
};
};
};
if (_local2){
if (_local2.mHit()){
if (CustomPreloader.demo){
navigateToURL(new URLRequest("http://www.rocksolidarcade.com/embed/stuntpilot"));
} else {
fadeMainMenu(true);
makeContinueButtons();
};
};
};
if (_local3){
if (_local3.mHit()){
fadeMainMenu(true);
makeControlButtons();
};
};
if (_local5){
if (_local5.mHit()){
HighScoreScreen.scoreToSave = 0;
gss.pushScene(new HighScoreScreen());
};
};
if (_local6){
if (_local6.mHit()){
fadeMainMenu(true);
makeCredits();
};
};
};
if (creditsOKButton){
if (creditsOKButton.mHit()){
creditsOKButton = null;
for each (_local12 in creditSprites) {
reverseSqrFilter(_local12);
};
fadeMainMenu(false);
};
};
}
public static function writePrefs():void{
var _local1:SharedObject = SharedObject.getLocal("rocksolidprefs");
if (GameSound.globalSoundVolume < 0.5){
_local1.data["sound"] = "off";
} else {
_local1.data["sound"] = "on";
};
if (GameSound.globalMusicVolume < 0.5){
_local1.data["music"] = "off";
} else {
_local1.data["music"] = "on";
};
_local1.data["highscore"] = lastHighScore;
_local1.data["highestlevel"] = highestLevel;
if (controlsReversed){
_local1.data["controls"] = "reversed";
} else {
_local1.data["controls"] = "normal";
};
}
public static function readPrefs():void{
var _local1:SharedObject = SharedObject.getLocal("rocksolidprefs");
if (_local1.data["sound"] == "off"){
GameSound.globalSoundVolume = 0;
};
if (_local1.data["music"] == "off"){
GameSound.globalMusicVolume = 0;
};
if (_local1.data["highscore"]){
lastHighScore = int(_local1.data["highscore"]);
} else {
lastHighScore = 50000;
};
if (_local1.data["highestlevel"]){
highestLevel = int(_local1.data["highestlevel"]);
};
if (_local1.data["controls"] == "reversed"){
controlsReversed = true;
} else {
controlsReversed = false;
};
}
}
}//package Scenes
Section 345
//MainMenu_music_button_embed (Scenes.MainMenu_music_button_embed)
package Scenes {
import mx.core.*;
public class MainMenu_music_button_embed extends BitmapAsset {
}
}//package Scenes
Section 346
//MainMenu_off_button_embed (Scenes.MainMenu_off_button_embed)
package Scenes {
import mx.core.*;
public class MainMenu_off_button_embed extends BitmapAsset {
}
}//package Scenes
Section 347
//MainMenu_play (Scenes.MainMenu_play)
package Scenes {
import mx.core.*;
public class MainMenu_play extends BitmapAsset {
}
}//package Scenes
Section 348
//MainMenu_sound_button_embed (Scenes.MainMenu_sound_button_embed)
package Scenes {
import mx.core.*;
public class MainMenu_sound_button_embed extends BitmapAsset {
}
}//package Scenes
Section 349
//MainScene (Scenes.MainScene)
package Scenes {
import GameScene.*;
import flash.display.*;
import GameObject.*;
import Audio.*;
import Objects.*;
import flash.media.*;
import Tools.*;
import SceneConstructors.*;
import Levels.*;
public class MainScene extends GameScene {
public var deadPlaneX:Number;// = 0
public var deadPlaneY:Number;// = 0
public var level:int;// = 0
public var lifeMultiplierSprite:GameObject;
public var parTime:int;
public var musicStopPosition:Number;
public var completeChannel:SoundChannel;
public var score:int;// = 0
public var finishedSequenceLost:Boolean;// = false
public var musicChannel:SoundChannel;
public var lives:int;// = 3
public var planeCamera:GameSceneCamera;
public var levelWidth:int;// = 700
public var currentTimeTextNormalX:Number;
public var lifeSprites:Array;
public var bonusScore:int;// = 0
public var levelOffset:int;// = 0
public var currentTimeText:GameObject;
public var timerDisplay:GameObject;
public var justFinishedBonusLevel:Boolean;// = false
public var timer:int;// = 0
public var bottomOverlaySprite:GameObject;
public var gameOverSprite:GameObject;
public var planeLevelCamera:GameSceneCamera;
public var scoreDisplay:GameObject;
public var finishedSequence:int;// = 0
public var parTimeDisplay:GameObject;
public var parTimeText:GameObject;
public var cameraLevel:int;// = 0
public var isBonusLevel:Boolean;// = false
public var startLevelScore:int;// = 0
public var g:Ground;
public var p:Plane;
public var topOverlaySprite:GameObject;
public static var lastTickTime:int;
public static var startLevel:int = 0;
public static var levelToStart:int = 0;
public static var pauseButton:GameObject;
public static var levelParTimes:Array = [9, 9, 11, 19, 14, 19, 11, 13, 14, 14, 14, 23, 12, 11, 13, 18, 16, 21, 16, 15, 16, 26, 10, 20, 17, 16, 16, 25, 19, 19, 13, 13, 16, 19, 19, 31, 11, 14, 15, 20, 26, 22];
public static var off_button_embed:Class = MainScene_off_button_embed;
public static var levelSpacing:int = 1700;
public static var soundButton:GameObject;
public static var music_button_embed:Class = MainScene_music_button_embed;
public static var pause_button_embed:Class = MainScene_pause_button_embed;
public static var musicButton:GameObject;
public static var sound_button_embed:Class = MainScene_sound_button_embed;
public static var play_button_embed:Class = MainScene_play_button_embed;
public function MainScene(){
parTime = levelParTimes[0];
lifeSprites = new Array(3);
super();
lives = 5;
createPlaneCamera();
planeLevelCamera = new GameSceneCamera();
planeLevelCamera.maxY = 0;
level = levelToStart;
}
public function createPlaneCamera(_arg1:Boolean=false):void{
if (_arg1){
planeCamera.frameChange = 0.75;
};
planeCamera = new GameSceneCamera();
planeCamera.maxY = 0;
}
public function determineNextStartingPosition():void{
var _local1:Plane = Plane(findObjectByClass("Plane"));
var _local2:Obstacle = nextObstacle();
var _local3:Obstacle = lastObstacle();
levelWidth = (_local3.basex - _local2.basex);
levelOffset = ((levelSpacing - _local2.basex) + _local1.basex);
if (isBonusLevel){
levelOffset = (levelOffset + 500);
};
if ((level % 42) == 0){
levelOffset = (levelOffset + 800);
};
}
public function levelTimeLeft():int{
return (((parTime * 100) - timer));
}
public function perfectRound():Boolean{
var _local1:GameObject;
for each (_local1 in objects) {
if ((_local1 is BonusBalloon)){
if (Obstacle(_local1).old){
if (!Obstacle(_local1).success){
return (false);
};
};
};
};
return (true);
}
public function nextObstacle():Obstacle{
var _local1:Obstacle;
var _local2:GameObject;
var _local3:Obstacle;
for each (_local2 in objects) {
if ((_local2 is Obstacle)){
_local3 = Obstacle(_local2);
if ((((_local3.findChildrenByName("CollisionGood").length > 0)) || ((_local2 is BonusBalloon)))){
if (!_local3.old){
if (_local1 == null){
_local1 = _local3;
};
if (_local3.basex < _local1.basex){
_local1 = _local3;
};
};
};
};
};
return (_local1);
}
public function inBonusLevel():Boolean{
var _local1:GameObject;
for each (_local1 in objects) {
if ((_local1 is Obstacle)){
if (Obstacle(_local1).old == false){
if ((_local1 is BonusBalloon)){
return (true);
};
};
};
};
return (false);
}
override public function _register(_arg1:Sprite):void{
var _local2:MainGameBackground_constructor = new MainGameBackground_constructor();
_local2.register(this, this.parent, true);
}
public function timeFromTicks(_arg1:int):String{
if (_arg1 < 0){
_arg1 = 0;
};
var _local2:String = String(((_arg1 - (_arg1 % 100)) / 100));
var _local3:String = String((_arg1 % 100));
while (_local2.length < 2) {
_local2 = ("0" + _local2);
};
while (_local3.length < 2) {
_local3 = (_local3 + "0");
};
return (((_local2 + ":") + _local3));
}
override public function init():void{
Logging.Log("stuntpilot", "play");
g = new Ground(this, 400, 600);
g.basey = (600 - (g.baseHeight / 2));
g.addFilter(new GameObjectFilterRepeats());
p = new Plane(this, -600, 300);
new DefaultSet().init(level, this);
scoreDisplay = new GameObject(this, null, "TextLayer", 400, 20);
scoreDisplay.setText("000000", 40);
scoreDisplay.setGlobal(true);
scoreDisplay.baseHandleX = 0;
scoreDisplay.basex = (scoreDisplay.basex - (scoreDisplay.baseWidth / 2));
var _local1 = 792;
timerDisplay = new GameObject(this, null, "TextLayer", _local1, 13);
timerDisplay.setText("00:00", 32);
timerDisplay.setGlobal(true);
timerDisplay.baseHandleX = 0;
timerDisplay.basex = (timerDisplay.basex - timerDisplay.baseWidth);
timerDisplay.baseScaleY = 0.6;
parTimeDisplay = new GameObject(this, null, "TextLayer", _local1, 38);
parTimeDisplay.setText("00:00", 32);
parTimeDisplay.setGlobal(true);
parTimeDisplay.baseHandleX = 0;
parTimeDisplay.basex = (parTimeDisplay.basex - parTimeDisplay.baseWidth);
parTimeDisplay.baseScaleY = 0.6;
parTimeText = new GameObject(this, null, "TextLayer", (_local1 - 9), 38);
parTimeText.setText("BEST", 32);
parTimeText.setGlobal(true);
parTimeText.baseHandleX = 0;
parTimeText.basex = (parTimeText.basex - ((parTimeDisplay.baseWidth * 2) - 8));
parTimeText.baseScaleY = 0.6;
currentTimeText = new GameObject(this, null, "TextLayer", (_local1 - 9), 13);
currentTimeText.setText("TIME", 32);
currentTimeText.setGlobal(true);
currentTimeText.baseHandleX = 0;
currentTimeText.basex = (currentTimeText.basex - ((timerDisplay.baseWidth + parTimeDisplay.baseWidth) - 8));
currentTimeText.baseScaleY = 0.6;
currentTimeTextNormalX = currentTimeText.basex;
musicButton = new GameObject(this, SimpleButton, "GUILayer", ((800 - 13) - 4), ((600 - 13) - 4));
musicButton.setupButton(music_button_embed, "", off_button_embed);
musicButton.setGlobal(true);
musicButton.updateDespitePaused = true;
soundButton = new GameObject(this, SimpleButton, "GUILayer", (((800 - 13) - 4) - (4 + 26)), ((600 - 13) - 4));
soundButton.setupButton(sound_button_embed, "", off_button_embed);
soundButton.setGlobal(true);
soundButton.updateDespitePaused = true;
if (GameSound.globalMusicVolume < 0.5){
musicButton.setButtonOn(true);
};
if (GameSound.globalSoundVolume < 0.5){
soundButton.setButtonOn(true);
};
pauseButton = new GameObject(this, SimpleButton, "GUILayer", (((800 - 13) - 4) - (2 * (4 + 26))), ((600 - 13) - 4));
pauseButton.setupButton(pause_button_embed, "", play_button_embed);
pauseButton.setGlobal(true);
pauseButton.updateDespitePaused = true;
var _local2:int;
while (_local2 < 1) {
lifeSprites[_local2] = new lifeSprite(this, (22 + (_local2 * 36)), 22);
GameObject(lifeSprites[_local2]).setGlobal(true);
_local2++;
};
lifeMultiplierSprite = new GameObject(this, null, "TextLayer", (22 + 36), 22);
lifeMultiplierSprite.setText("x3", 36);
lifeMultiplierSprite.setGlobal(true);
_update();
}
public function lastObstacle():Obstacle{
var _local1:Obstacle;
var _local2:GameObject;
var _local3:Obstacle;
for each (_local2 in objects) {
if ((_local2 is Obstacle)){
_local3 = Obstacle(_local2);
if ((((_local3.findChildrenByName("CollisionGood").length > 0)) || ((_local2 is BonusBalloon)))){
if (!_local3.old){
if (_local1 == null){
_local1 = _local3;
};
if (_local3.basex > _local1.basex){
_local1 = _local3;
};
};
};
};
};
return (_local1);
}
public function timeBonusAmount():int{
var _local1:int = (((parTime * 100) - timer) * 2.5);
if (_local1 < 0){
return (0);
};
return (_local1);
}
public function chainBonusAmount():int{
var _local1:Plane = Plane(findObjectByClass("Plane"));
if (_local1.highestConsecutiveScore > 1){
return ((250 * _local1.highestConsecutiveScore));
};
return (0);
}
public function timeBonusText():int{
if (((parTime * 100) - timer) < 0){
return (0);
};
return (((parTime * 100) - timer));
}
public function thisLevelStartX():Number{
return (nextLevelStartX());
}
public function poppedBalloons():int{
var _local2:GameObject;
var _local1:int;
for each (_local2 in objects) {
if ((_local2 is BonusBalloon)){
if (Obstacle(_local2).old){
if (Obstacle(_local2).success){
_local1++;
};
};
};
};
return (_local1);
}
override public function _update():void{
var _local3:GameObject;
var _local6:GameObjectFilterSqrtInterpolateIn;
var _local7:Plane;
var _local8:Obstacle;
var _local9:Plane;
var _local10:Boolean;
var _local11:GameObject;
var _local12:GameObjectFilterFadeInOut;
var _local13:GameObject;
var _local14:GameObject;
var _local15:GameObject;
var _local16:GameObjectFilterSqrtInterpolateIn;
var _local17:GameObject;
var _local18:int;
var _local19:int;
var _local20:GameObject;
var _local21:GameObject;
var _local22:GameObject;
var _local23:GameObject;
var _local24:GameObject;
var _local25:GameObject;
var _local26:GameObject;
var _local27:GameObject;
var _local28:Number;
var _local29:GameObject;
var _local30:GameObject;
var _local31:GameObjectFilterFadeInOut;
var _local32:GameObjectFilterSqrtInterpolateIn;
var _local33:Number;
GameScene.stealFocus = (Ticks < 300);
if (topOverlaySprite){
_local6 = topOverlaySprite.filters[0];
if (finishedSequence == 0){
if (_local6.ticks > _local6.FadeTime){
topOverlaySprite.remove();
bottomOverlaySprite.remove();
};
};
};
if ((((finishedSequence == 0)) && ((paused == 0)))){
_local7 = Plane(findObjectByClass("Plane"));
if ((((_local7.outOfControl == false)) && ((_local7.dead == false)))){
timer++;
};
};
if (((((((((justFinishedBonusLevel) && ((((finishedSequence > 0)) && ((finishedSequence < 650)))))) && (!(finishedSequenceLost)))) || (((isBonusLevel) && ((((finishedSequence == 0)) || ((finishedSequence > 650)))))))) || (((isBonusLevel) && (((!((finishedSequence == 0))) && (finishedSequenceLost))))))){
timerDisplay.setText(timeFromTicks(levelTimeLeft()));
parTimeDisplay.setText("");
currentTimeText.setText("TIME LEFT");
parTimeText.setText("");
currentTimeText.basex = (currentTimeTextNormalX - 46);
} else {
timerDisplay.setText(timeFromTicks(timer));
parTimeDisplay.setText(timeFromTicks((parTime * 100)));
parTimeText.setText("BEST");
currentTimeText.setText("TIME");
currentTimeText.basex = currentTimeTextNormalX;
};
var _local1:int;
while ((((_local1 < lives)) && ((_local1 < 1)))) {
GameObject(lifeSprites[_local1]).baseAlpha = 1;
_local1++;
};
_local1 = lives;
while (_local1 < 1) {
if (_local1 >= 0){
GameObject(lifeSprites[_local1]).baseAlpha = 0;
};
_local1++;
};
if (lives > 0){
lifeMultiplierSprite.setText(("x " + lives));
} else {
lifeMultiplierSprite.setText("");
};
if (musicButton.buttonOn()){
GameSound.globalMusicVolume = 0;
} else {
GameSound.globalMusicVolume = 1;
};
if (this.i.keyHit(80)){
pauseButton.setButtonOn(!(pauseButton.buttonOn()));
};
if (soundButton.buttonOn()){
GameSound.globalSoundVolume = 0;
} else {
GameSound.globalSoundVolume = 1;
};
if (((soundButton.mHit()) || (musicButton.mHit()))){
MainMenu.writePrefs();
};
if (paused){
GameSound.globalSoundVolume = 0;
GameSound.globalMusicVolume = 0;
};
if (pauseButton.buttonOn()){
paused = true;
} else {
paused = false;
};
var _local2:String = String(score);
while (_local2.length < 6) {
_local2 = ("0" + _local2);
};
scoreDisplay.setText(_local2);
if (paused){
return;
};
var _local4:Boolean;
for each (_local3 in objects) {
if ((_local3 is Obstacle)){
_local8 = Obstacle(_local3);
if (_local8.findChildrenByName("CollisionGood").length > 0){
if (!_local8.success){
_local4 = false;
};
};
};
if ((_local3 is BonusBalloon)){
if (!Obstacle(_local3).success){
_local4 = false;
};
};
};
if (finishedSequence == 0){
if (isBonusLevel){
if (levelTimeLeft() == 0){
_local4 = true;
};
};
};
if (_local4){
finishedSequenceLost = false;
};
if (((_local4) || ((finishedSequence > 0)))){
if (_local4){
finishedSequenceLost = false;
};
finishedSequence++;
if ((level % 42) == 0){
if (finishedSequence == 750){
_local11 = new GameObject(this, null, "TextLayer", 400, 300);
_local11.setGlobal(true);
_local11.setText("ALL LEVELS COMPLETE", 56);
_local12 = new GameObjectFilterFadeInOut();
_local12.FadeInBlur = 15;
_local12.FadeInDuration = 80;
_local12.FadeIn = 1;
_local12.FadeOut = 1;
_local12.FadeOutTime = 275;
_local12.FadeOutDuration = 30;
_local11.addFilter(_local12);
_local13 = new GameObject(this, null, "TextLayer", 400, 364);
_local13.setGlobal(true);
_local13.setText("KEEP PLAYING TO BOOST YOUR SCORE", 42);
_local12 = new GameObjectFilterFadeInOut();
_local12.FadeInDuration = 80;
_local12.FadeInDelay = 40;
_local12.FadeIn = 1;
_local12.FadeOut = 1;
_local12.FadeOutTime = 275;
_local12.FadeOutDuration = 30;
_local13.addFilter(_local12);
};
};
if (isBonusLevel){
if (finishedSequence == 750){
_local14 = new GameObject(this, null, "TextLayer", 400, 300);
_local14.setGlobal(true);
_local14.setText("BONUS LEVEL", 56);
_local12 = new GameObjectFilterFadeInOut();
_local12.FadeInBlur = 15;
_local12.FadeInDuration = 80;
_local12.FadeIn = 1;
_local12.FadeOut = 1;
_local12.FadeOutTime = 275;
_local12.FadeOutDuration = 30;
_local14.addFilter(_local12);
_local15 = new GameObject(this, null, "TextLayer", 400, 364);
_local15.setGlobal(true);
_local15.setText("POP THE BALLOONS WITH YOUR PLANE!", 48);
_local12 = new GameObjectFilterFadeInOut();
_local12.FadeInDuration = 80;
_local12.FadeInDelay = 40;
_local12.FadeIn = 1;
_local12.FadeOut = 1;
_local12.FadeOutTime = 275;
_local12.FadeOutDuration = 30;
_local15.addFilter(_local12);
};
};
if (finishedSequence == 1){
if (finishedSequenceLost){
GameSoundScene.forName("main").insertDeadBreak(6000);
} else {
GameSoundScene.forName("main").insertBreak(Sounds.levelComplete);
};
if (!finishedSequenceLost){
for each (_local3 in objects) {
if ((_local3 is Obstacle)){
Obstacle(_local3).old = true;
};
};
level++;
Logging.Log("stuntpilot", "level", String(level));
justFinishedBonusLevel = isBonusLevel;
isBonusLevel = ((level % 6) == 5);
startLevelScore = score;
createPlaneCamera(true);
new DefaultSet().init(((startLevel + level) % 42), this);
determineNextStartingPosition();
for each (_local3 in objects) {
if ((_local3 is Obstacle)){
if (!Obstacle(_local3).old){
_local3.basex = (_local3.basex + nextLevelStartX());
};
};
};
};
if (topOverlaySprite){
topOverlaySprite.remove();
};
if (bottomOverlaySprite){
bottomOverlaySprite.remove();
};
topOverlaySprite = new LevelPanel(this, 400, 0);
topOverlaySprite.basex = 400;
topOverlaySprite.basey = (topOverlaySprite.baseHeight / 2);
topOverlaySprite.setGlobal(true);
_local16 = new GameObjectFilterSqrtInterpolateIn();
_local16.dy = -150;
_local16.FadeTime = 80;
topOverlaySprite.addFilter(_local16);
bottomOverlaySprite = new LevelPanel(this, 400, 0);
bottomOverlaySprite.basex = 400;
bottomOverlaySprite.basey = (600 - (bottomOverlaySprite.baseHeight / 2));
bottomOverlaySprite.baseScaleY = -1;
bottomOverlaySprite.setGlobal(true);
_local16 = new GameObjectFilterSqrtInterpolateIn();
_local16.dy = 150;
_local16.FadeTime = 80;
bottomOverlaySprite.addFilter(_local16);
_local17 = new GameObject(this, null, "TextLayer", 400, 300);
_local17.setGlobal(true);
_local17.setText((("LEVEL " + level) + " COMPLETE"), 64);
if (justFinishedBonusLevel){
if (levelTimeLeft() == 0){
_local17.setText("OUT OF TIME!");
};
};
_local12 = new GameObjectFilterFadeInOut();
_local12.FadeInBlur = 15;
_local12.FadeInDuration = 80;
_local12.FadeIn = 1;
_local12.FadeOut = 1;
_local12.FadeOutTime = 250;
_local12.FadeOutDuration = 30;
_local17.addFilter(_local12);
_local18 = 280;
_local19 = 360;
if (!justFinishedBonusLevel){
_local20 = new GameObject(this, null, "TextLayer", 400, _local18);
_local20.setGlobal(true);
_local20.setText("TIME BONUS: ", 48);
_local20.baseHandleX = 1;
_local20.baseHandleY = 1;
_local12 = new GameObjectFilterFadeInOut();
_local12.FadeInDuration = 40;
_local12.FadeIn = 1;
_local12.FadeInDelay = 330;
_local12.FadeOutDuration = 40;
_local12.FadeOut = 1;
_local12.FadeOutTime = 650;
_local20.addFilter(_local12);
_local21 = new GameObject(this, null, "TextLayer", 400, _local19);
_local21.setGlobal(true);
_local21.setText("CHAIN BONUS: ", 48);
_local21.baseHandleX = 1;
_local21.baseHandleY = 1;
_local12 = new GameObjectFilterFadeInOut();
_local12.FadeInDuration = 40;
_local12.FadeIn = 1;
_local12.FadeInDelay = 350;
_local12.FadeOutDuration = 40;
_local12.FadeOut = 1;
_local12.FadeOutTime = 650;
_local21.addFilter(_local12);
_local22 = new GameObject(this, null, "TextLayer", 400, _local18);
_local22.setGlobal(true);
_local22.setText(String((" = " + timeBonusAmount())));
_local22.baseHandleX = 0;
_local22.baseHandleY = 1;
_local22.className = "TimeNumber";
_local12 = new GameObjectFilterFadeInOut();
_local12.FadeInDuration = 40;
_local12.FadeIn = 1;
_local12.FadeInDelay = 330;
_local12.FadeOutDuration = 40;
_local12.FadeOut = 1;
_local12.FadeOutTime = 650;
_local22.addFilter(_local12);
_local23 = new GameObject(this, null, "TextLayer", 458, _local18);
_local23.setGlobal(true);
_local23.setText(String((timeFromTicks(timeBonusText()) + " x 250 ")), 32);
_local23.baseHandleX = 0.5;
_local23.baseHandleY = 1;
_local23.className = "TimeNumber";
_local12 = new GameObjectFilterFadeInOut();
_local12.FadeInDuration = 40;
_local12.FadeIn = 1;
_local12.FadeInDelay = 330;
_local12.FadeOutDuration = 40;
_local12.FadeOut = 1;
_local12.FadeOutTime = 650;
_local23.addFilter(_local12);
_local22.basex = (_local22.basex + _local23.baseWidth);
_local23.basey = (_local23.basey - (((_local22.baseHeight - _local23.baseHeight) / 2) - 3));
_local24 = new GameObject(this, null, "TextLayer", 400, _local19);
_local24.setGlobal(true);
_local24.setText(String((" = " + chainBonusAmount())));
_local24.baseHandleX = 0;
_local24.baseHandleY = 1;
_local24.className = "BonusNumber";
_local12 = new GameObjectFilterFadeInOut();
_local12.FadeInDuration = 40;
_local12.FadeIn = 1;
_local12.FadeInDelay = 350;
_local12.FadeOutDuration = 40;
_local12.FadeOut = 1;
_local12.FadeOutTime = 650;
_local24.addFilter(_local12);
_local25 = new GameObject(this, null, "TextLayer", 458, _local19);
_local25.setGlobal(true);
_local25.setText((String((chainBonusAmount() / 250)) + " x 250 "), 32);
_local25.baseHandleX = 0.5;
_local25.baseHandleY = 1;
_local25.basey = (_local25.basey - (((_local24.baseHeight - _local25.baseHeight) / 2) - 3));
_local25.className = "BonusNumber";
_local12 = new GameObjectFilterFadeInOut();
_local12.FadeInDuration = 40;
_local12.FadeIn = 1;
_local12.FadeInDelay = 350;
_local12.FadeOutDuration = 40;
_local12.FadeOut = 1;
_local12.FadeOutTime = 650;
_local25.addFilter(_local12);
_local24.basex = (_local24.basex + _local23.baseWidth);
bonusScore = (timeBonusAmount() + chainBonusAmount());
} else {
_local26 = new GameObject(this, null, "TextLayer", 400, 236);
_local26.setGlobal(true);
_local12 = new GameObjectFilterFadeInOut();
_local12.FadeInDuration = 40;
_local12.FadeIn = 1;
_local12.FadeInDelay = 350;
_local12.FadeOutDuration = 40;
_local12.FadeOut = 1;
_local12.FadeOutTime = 650;
_local26.addFilter(_local12);
_local27 = new GameObject(this, null, "TextLayer", 400, 364);
_local27.setGlobal(true);
_local12 = new GameObjectFilterFadeInOut();
_local12.FadeInDuration = 40;
_local12.FadeInDelay = 390;
_local12.FadeIn = 1;
_local12.FadeOutDuration = 40;
_local12.FadeOut = 1;
_local12.FadeOutTime = 650;
_local27.addFilter(_local12);
_local28 = 300;
_local29 = new GameObject(this, null, "TextLayer", 400, _local28);
_local29.setGlobal(true);
_local29.setText(String((" = " + (poppedBalloons() * 200))));
_local29.baseHandleX = 0;
_local29.className = "TimeNumber";
_local12 = new GameObjectFilterFadeInOut();
_local12.FadeInDuration = 40;
_local12.FadeIn = 1;
_local12.FadeInDelay = 370;
_local12.FadeOutDuration = 40;
_local12.FadeOut = 1;
_local12.FadeOutTime = 650;
_local29.addFilter(_local12);
_local30 = new GameObject(this, null, "TextLayer", 400, _local28);
_local30.setGlobal(true);
_local30.setText((String(poppedBalloons()) + " x 200 "), 36);
_local30.baseHandleX = 1;
_local30.className = "TimeNumber";
_local12 = new GameObjectFilterFadeInOut();
_local12.FadeInDuration = 40;
_local12.FadeIn = 1;
_local12.FadeInDelay = 370;
_local12.FadeOutDuration = 40;
_local12.FadeOut = 1;
_local12.FadeOutTime = 650;
_local30.addFilter(_local12);
bonusScore = (poppedBalloons() * 200);
if (perfectRound()){
_local26.setText("ALL BALLOONS POPPED!", 54);
_local27.setText("EXTRA LIFE AWARDED", 48);
lives++;
} else {
_local26.setText("BALLOON BONUS", 54);
_local26.basey = (_local26.basey + 32);
_local29.basey = (_local29.basey + 32);
_local30.basey = (_local30.basey + 32);
};
};
};
if (finishedSequence == 650){
timer = 0;
parTime = levelParTimes[(level % 42)];
};
if (finishedSequence > 390){
if (bonusScore > 0){
score = (score + 100);
bonusScore = (bonusScore - 100);
};
};
_local9 = Plane(findObjectByClass("Plane"));
_local10 = false;
if (finishedSequenceLost){
deadPlaneX = _local9.basex;
deadPlaneY = _local9.basey;
if (lives > 0){
if (finishedSequence > 50){
for each (_local3 in objects) {
if ((_local3 is Obstacle)){
Obstacle(_local3).reset();
};
};
finishedSequence = 0;
deadPlaneX = _local9.basex;
deadPlaneY = _local9.basey;
_local9.basex = (thisLevelStartX() - 600);
_local9.basey = nextObstacle().basey;
_local9.dx = 0;
_local9.dy = 0;
_local9.baseRotation = 0;
_local9.outOfControl = false;
_local9.dead = false;
_local9.dRotation = 0;
_local9.highestConsecutiveScore = 0;
_local9.inBarrelRoll = 0;
_local9.rollFrameTarget = 0;
timer = 0;
parTime = levelParTimes[(level % 42)];
createPlaneCamera();
};
} else {
if (gameOverSprite == null){
gameOverSprite = new GameObject(this, null, "TextLayer", 400, 300);
gameOverSprite.setText("GAME OVER", 64);
gameOverSprite.setGlobal(true);
_local31 = new GameObjectFilterFadeInOut();
_local31.FadeIn = 1;
_local31.FadeInBlur = 15;
_local31.FadeInDuration = 80;
_local31.FadeOut = 1;
_local31.FadeOutDuration = 30;
_local31.FadeOutTime = 250;
MainMenu.lastScore = score;
gameOverSprite.addFilter(_local31);
};
if (finishedSequence > 400){
if (score > MainMenu.lastHighScore){
MainMenu.lastHighScore = score;
};
if (level > MainMenu.highestLevel){
MainMenu.highestLevel = level;
};
MainMenu.lastScore = score;
MainMenu.writePrefs();
HighScoreScreen.scoreToSave = score;
gss.pushScene(new HighScoreScreen());
};
};
} else {
if ((_local9.basex > (nextLevelStartX() - 600))){
finishedSequence = 0;
for each (_local3 in objects) {
if ((_local3 is Obstacle)){
if (Obstacle(_local3).old){
_local3.remove();
};
};
};
cameraLevel++;
_local9.dRotation = 0;
_local9.baseRotation = 0;
_local9.outOfControl = false;
_local9.dead = false;
_local9.dRotation = 0;
_local9.highestConsecutiveScore = 0;
_local9.inBarrelRoll = 0;
_local9.rollFrameTarget = 0;
timer = 0;
parTime = levelParTimes[(level % 42)];
_local32 = topOverlaySprite.filters[0];
_local32.ticks = 0;
_local32.useSquare = true;
_local32 = bottomOverlaySprite.filters[0];
_local32.ticks = 0;
_local32.useSquare = true;
};
};
};
var _local5:Plane = Plane(findObjectByClass("Plane"));
planeCamera.positionInterpolate((_local5.basex - 400), (_local5.basey - 300), ((nextLevelStartX() + (nextLevelWidth() / 2)) - 400), 0);
if ((((((planeCamera.maxX < (_local5.basex - 64))) || ((planeCamera.maxX > 999998)))) && ((level > 0)))){
planeCamera.maxX = (_local5.basex - 64);
};
if (finishedSequence == 0){
_local33 = GameSceneCameraStack.globalCameraX;
if ((((Math.abs(((_local5.basex - 400) - _local33)) > 450)) || ((_local5.basey < -450)))){
if (((_local5.basex - 400) - _local33) < -1){
_local5.baseRotation = 0;
};
if (((_local5.basex - 400) - _local33) > 0){
_local5.baseRotation = -180;
};
if (_local5.basey < -450){
_local5.baseRotation = 90;
};
_local5.dRotation = 0;
};
};
pushCamera(planeCamera);
}
public function nextLevelWidth():Number{
return (levelWidth);
}
public function nextLevelStartX():Number{
return (levelOffset);
}
}
}//package Scenes
Section 350
//MainScene_music_button_embed (Scenes.MainScene_music_button_embed)
package Scenes {
import mx.core.*;
public class MainScene_music_button_embed extends BitmapAsset {
}
}//package Scenes
Section 351
//MainScene_off_button_embed (Scenes.MainScene_off_button_embed)
package Scenes {
import mx.core.*;
public class MainScene_off_button_embed extends BitmapAsset {
}
}//package Scenes
Section 352
//MainScene_pause_button_embed (Scenes.MainScene_pause_button_embed)
package Scenes {
import mx.core.*;
public class MainScene_pause_button_embed extends BitmapAsset {
}
}//package Scenes
Section 353
//MainScene_play_button_embed (Scenes.MainScene_play_button_embed)
package Scenes {
import mx.core.*;
public class MainScene_play_button_embed extends BitmapAsset {
}
}//package Scenes
Section 354
//MainScene_sound_button_embed (Scenes.MainScene_sound_button_embed)
package Scenes {
import mx.core.*;
public class MainScene_sound_button_embed extends BitmapAsset {
}
}//package Scenes
Section 355
//SerializedObject (Serialization.SerializedObject)
package Serialization {
import flash.utils.*;
public class SerializedObject {
public var val:Array;
public var typeName:String;
public function SerializedObject(){
val = new Array();
super();
}
public function applyTo(_arg1:Object):void{
var _local2:int;
while (_local2 < val.length) {
_arg1[val[_local2][0]] = val[_local2][1];
_local2++;
};
}
public function toArray():Array{
return ([typeName, val]);
}
public static function serialize(_arg1:Object):SerializedObject{
var _local6:XML;
var _local7:String;
var _local8:int;
var _local9:Array;
var _local10:Array;
var _local11:int;
var _local2:SerializedObject = new (SerializedObject);
var _local3:XML = describeType(_arg1);
var _local4:Array = _arg1["serializeFields"]();
_local2.typeName = _local3.attribute("name")[0];
var _local5:XMLList = _local3.descendants("variable");
for each (_local6 in _local5) {
_local7 = _local6.attribute("name")[0];
_local8 = 0;
while (_local8 < _local4.length) {
if (_local7 == _local4[_local8]){
if (_local6.attribute("type") == "Array"){
_local9 = _arg1[_local7];
_local10 = new Array(_local9.length);
_local11 = 0;
while (_local11 < _local9.length) {
if (_local9[_local11]){
_local10[_local11] = serialize(_local9[_local11]).toArray();
};
_local11++;
};
_local2.val.push([_local7, _local10, _local6.attribute("type")[0]]);
} else {
_local2.val.push([_local7, _arg1[_local7], _local6.attribute("type")[0]]);
};
};
_local8++;
};
};
return (_local2);
}
public static function fromArray(_arg1:Array):SerializedObject{
var _local2:SerializedObject = new (SerializedObject);
_local2.typeName = _arg1[0];
_local2.val = _arg1[1];
return (_local2);
}
}
}//package Serialization
Section 356
//StoreObject (Serialization.StoreObject)
package Serialization {
import flash.events.*;
import flash.net.*;
import flash.utils.*;
import GameConfig.*;
public class StoreObject {
public static var dirty:Boolean = false;
public static var couldNotFlush:Boolean = false;
public static var lastSharedObject:SharedObject;
public static var ihateflash:SharedObject;
public static function couldFlush():Boolean{
var _local1 = !(couldNotFlush);
couldNotFlush = false;
return (_local1);
}
public static function unPackArray(_arg1:Array):Array{
var _local2:Array = new Array(_arg1.length);
var _local3:int;
while (_local3 < _arg1.length) {
if ((_arg1[_local3] is Array)){
_local2[_local3] = unPackObject(_arg1[_local3]);
} else {
_local2[_local3] = _arg1[_local3];
};
_local3++;
};
return (_local2);
}
public static function unPackField(_arg1:Array){
var _local2:String = _arg1[2];
if (_local2 == "Array"){
return (unPackArray(_arg1[1]));
};
return (_arg1[1]);
}
public static function testStorage():Boolean{
var _local1:SharedObject = getSharedObject();
_local1.flush((0x0200 * 0x0400));
return (true);
}
public static function retrieveArray(_arg1:String):Array{
var _local2:SharedObject = getSharedObject();
var _local3:Array = _local2.data[_arg1];
if (_local3 == null){
return (new Array(0));
};
if (_local3.length > 1000){
return (null);
};
var _local4:Array = unPackArray(_local3);
return (_local4);
}
public static function netHandler(_arg1:NetStatusEvent):void{
if (_arg1.info.code == "SharedObject.Flush.Failed"){
couldNotFlush = true;
} else {
couldNotFlush = false;
};
}
public static function storeValue(_arg1:String, _arg2:Object):void{
var _local3:SharedObject = getSharedObject();
_local3.data[_arg1] = _arg2;
dirty = true;
}
public static function unPackObject(_arg1:Array){
var _local5:Array;
var _local2:String = _arg1[0];
var _local3:Array = _arg1[1];
var _local4:Object = new ((getDefinitionByName(_local2) as Class));
for each (_local5 in _local3) {
_local4[_local5[0]] = unPackField(_local5);
};
return (_local4);
}
public static function flush():void{
if (!dirty){
return;
};
try {
} catch(exp:Error) {
couldNotFlush = true;
};
}
public static function retrieveValue(_arg1:String):Object{
var _local2:SharedObject = getSharedObject();
var _local3:Object = _local2.data[_arg1];
return (_local3);
}
public static function updateStoreObject():void{
if (lastSharedObject){
flush();
ihateflash = lastSharedObject;
lastSharedObject.removeEventListener(NetStatusEvent.NET_STATUS, netHandler);
lastSharedObject = null;
};
}
public static function storeArray(_arg1:String, _arg2:Array):void{
var _local3:SharedObject = getSharedObject();
var _local4:Array = new Array(_arg2.length);
var _local5:int;
while (_local5 < _arg2.length) {
if (_arg2[_local5]){
if ((((_arg2[_local5] is String)) || ((_arg2[_local5] is int)))){
_local4[_local5] = _arg2[_local5];
} else {
_local4[_local5] = SerializedObject.serialize(_arg2[_local5]).toArray();
};
} else {
_local4[_local5] = null;
};
_local5++;
};
_local3.data[_arg1] = _local4;
dirty = true;
}
public static function getSharedObject():SharedObject{
if (!lastSharedObject){
lastSharedObject = SharedObject.getLocal(GameConfig.shortName, "/");
lastSharedObject.addEventListener(NetStatusEvent.NET_STATUS, netHandler);
dirty = false;
};
return (lastSharedObject);
}
public static function describe(_arg1:Array):String{
var _local2 = " [ ";
var _local3:int;
while (_local3 < _arg1.length) {
if ((_arg1[_local3] is Array)){
_local2 = (_local2 + describe(_arg1[_local3]));
} else {
_local2 = (_local2 + String(_arg1[_local3]));
};
if (_local3 < (_arg1.length - 1)){
_local2 = (_local2 + ", ");
};
_local3++;
};
_local2 = (_local2 + " ] ");
return (_local2);
}
}
}//package Serialization
Section 357
//Extern (Tools.Extern)
package Tools {
import flash.external.*;
public class Extern {
public static var messages:Array = new Array();
public static var _setup:Boolean = false;
public static function getMessage(_arg1:String):String{
var _local3:Array;
setup();
var _local2:int;
while (_local2 < messages.length) {
_local3 = messages[_local2].split(",", 2);
if (_local3[0] == _arg1){
messages = messages.splice(_local2, 1);
return (_local3[1]);
};
_local2++;
};
return ("");
}
public static function receive(_arg1:String):void{
messages.push(_arg1);
}
public static function callJavascript(_arg1:String, _arg2:String=""):String{
var o:Object;
var js = _arg1;
var args = _arg2;
try {
try {
o = ExternalInterface.call(js, args);
if ((o is String)){
return (String(o));
} else {
return ("");
};
} catch(err2:Error) {
return ("");
};
} catch(err:SecurityError) {
return ("");
};
return ("");
}
public static function setup():void{
if (!_setup){
return;
};
_setup = true;
ExternalInterface.addCallback("rsaGetText", receive);
}
public static function sendMessage(_arg1:String, _arg2:String=""):String{
setup();
return (callJavascript(_arg1, _arg2));
}
}
}//package Tools
Section 358
//GameTimer (Tools.GameTimer)
package Tools {
import flash.events.*;
import flash.utils.*;
public class GameTimer {
private var ticker:Timer;
private var func:Function;
public function GameTimer(_arg1:int, _arg2:Function){
ticker = new Timer(_arg1);
ticker.addEventListener(TimerEvent.TIMER, onTick);
func = _arg2;
ticker.start();
}
function onTick(_arg1:TimerEvent):void{
func();
}
}
}//package Tools
Section 359
//GraphicsTools (Tools.GraphicsTools)
package Tools {
import flash.display.*;
public class GraphicsTools {
public static function createFilledSprite(_arg1:int, _arg2:int, _arg3:int):Bitmap{
var _local4:BitmapData = new BitmapData(_arg1, _arg2, false, _arg3);
var _local5:Bitmap = new Bitmap(_local4);
return (_local5);
}
}
}//package Tools
Section 360
//Input (Tools.Input)
package Tools {
import flash.events.*;
import flash.display.*;
public class Input {
public var last:FocusEvent;
public var mouseButtonHit:int;// = 0
public var keyStatus:Array;
public var mousex:int;
public var mouseStatus:int;// = 0
public var mousey:int;
public var keysHit:Array;
public static var verboseInput:Boolean = false;
public static var i:Input;
public function Input(_arg1:DisplayObject){
keyStatus = new Array();
keysHit = new Array();
super();
_arg1.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler);
_arg1.addEventListener(KeyboardEvent.KEY_UP, keyUpHandler);
_arg1.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
_arg1.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
_arg1.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler);
_arg1.addEventListener(FocusEvent.FOCUS_OUT, focusOutHandler);
_arg1.addEventListener(FocusEvent.KEY_FOCUS_CHANGE, focusOutHandler);
_arg1.addEventListener(FocusEvent.MOUSE_FOCUS_CHANGE, focusOutHandler);
i = this;
}
public function mouseUpHandler(_arg1:MouseEvent):void{
mouseStatus = 0;
}
public function keyUpHandler(_arg1:KeyboardEvent):void{
keyStatus[_arg1.keyCode] = false;
}
public function mouseX():int{
return (mousex);
}
public function mouseMoveHandler(_arg1:MouseEvent):void{
mousex = _arg1.stageX;
mousey = _arg1.stageY;
}
public function focusOutHandler(_arg1:FocusEvent):void{
var _local2:int;
if (last){
if (_arg1.type == FocusEvent.FOCUS_OUT){
if (last.type != FocusEvent.MOUSE_FOCUS_CHANGE){
_local2 = 0;
while (_local2 < keyStatus.length) {
keyStatus[_local2] = false;
_local2++;
};
mouseStatus = 0;
};
};
};
last = _arg1;
}
public function keyDown(_arg1:int):int{
return (keyStatus[_arg1]);
}
public function mouseDownHandler(_arg1:MouseEvent):void{
mouseStatus = 1;
mouseButtonHit = 1;
}
public function mouseDown():int{
return (mouseStatus);
}
public function keyDownHandler(_arg1:KeyboardEvent):void{
if (keyStatus[_arg1.keyCode] != true){
keysHit[_arg1.keyCode] = true;
};
keyStatus[_arg1.keyCode] = true;
if (verboseInput){
trace(_arg1.keyCode);
};
}
public function keyHit(_arg1:int, _arg2:Boolean=true):int{
var _local3:int = keysHit[_arg1];
if (_arg2){
keysHit[_arg1] = false;
};
return (_local3);
}
public function mouseHit():int{
var _local1:int = mouseButtonHit;
mouseButtonHit = 0;
return (_local1);
}
public function mouseY():int{
return (mousey);
}
}
}//package Tools
Section 361
//Interpolation (Tools.Interpolation)
package Tools {
import flash.geom.*;
public class Interpolation {
public static function squareSquareInterpolateLock(_arg1:Number, _arg2:Number, _arg3:Number):Number{
return (squareSquareInterpolate(_arg1, _arg2, lockValue(_arg3, 0, 1)));
}
public static function distanceToAngle(_arg1:Number, _arg2:Number):Number{
var _local3:Number = (_arg2 - _arg1);
while (abs((_arg2 - _arg1)) > 181) {
_arg2 = (_arg2 - (sgn((_arg2 - _arg1)) * 360));
};
return (abs((_arg2 - _arg1)));
}
public static function squareInterpolate(_arg1:Number, _arg2:Number, _arg3:Number):Number{
return ((_arg1 + ((_arg2 - _arg1) * Math.pow(_arg3, 2))));
}
public static function fromTo(_arg1:Number, _arg2:Number, _arg3:Number):Number{
return (((_arg1 - _arg2) / (_arg3 - _arg2)));
}
public static function lockValue(_arg1:Number, _arg2:Number, _arg3:Number):Number{
if (_arg1 < _arg2){
return (_arg2);
};
if (_arg1 > _arg3){
return (_arg3);
};
return (_arg1);
}
public static function squareSquareInterpolate(_arg1:Number, _arg2:Number, _arg3:Number):Number{
_arg3 = (_arg3 * 2);
if (_arg3 < 1){
return ((_arg1 + (((_arg2 - _arg1) * Math.pow(_arg3, 2)) / 2)));
};
return ((_arg1 + (((_arg2 - _arg1) * (-(Math.pow((_arg3 - 2), 2)) + 2)) / 2)));
}
public static function sqrtInterpolate(_arg1:Number, _arg2:Number, _arg3:Number):Number{
return ((_arg1 + ((_arg2 - _arg1) * Math.sqrt(_arg3))));
}
public static function lockValueInt(_arg1:int, _arg2:int, _arg3:int):int{
if (_arg1 < _arg2){
return (_arg2);
};
if (_arg1 > _arg3){
return (_arg3);
};
return (_arg1);
}
public static function dampenInterpolateLock(_arg1:Number, _arg2:Number, _arg3:Number):Number{
return (dampenInterpolate(_arg1, _arg2, lockValue(_arg3, 0, 1)));
}
public static function sqrtInterpolateLock(_arg1:Number, _arg2:Number, _arg3:Number):Number{
return (sqrtInterpolate(_arg1, _arg2, lockValue(_arg3, 0, 1)));
}
public static function flipAngleLeft(_arg1:Number):Number{
return ((_arg1 - 360));
}
public static function linearInterpolateLock(_arg1:Number, _arg2:Number, _arg3:Number):Number{
return (linearInterpolate(_arg1, _arg2, lockValue(_arg3, 0, 1)));
}
public static function squareInterpolateLock(_arg1:Number, _arg2:Number, _arg3:Number):Number{
return (squareInterpolate(_arg1, _arg2, lockValue(_arg3, 0, 1)));
}
public static function fromToLock(_arg1:Number, _arg2:Number, _arg3:Number):Number{
return (lockValue(fromTo(_arg1, _arg2, _arg3), 0, 1));
}
public static function abs(_arg1:Number):Number{
return (Math.abs(_arg1));
}
public static function tendTowards(_arg1:Number, _arg2:Number, _arg3:Number):Number{
if (Math.abs((_arg2 - _arg1)) < Math.abs(_arg3)){
return (_arg2);
};
if (_arg2 > _arg1){
return ((_arg1 + _arg3));
};
return ((_arg1 - _arg3));
}
public static function flipAngleRight(_arg1:Number):Number{
return ((_arg1 + 360));
}
public static function tendTowardsVector(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number):Point{
var _local6:Number = (_arg3 - _arg1);
var _local7:Number = (_arg4 - _arg2);
if ((((_local6 == 0)) && ((_local7 == 0)))){
return (new Point(_arg3, _arg4));
};
if (((_local6 * _local6) + (_local7 * _local7)) <= (_arg5 * _arg5)){
return (new Point(_arg3, _arg4));
};
var _local8:Number = Math.atan2(_local7, _local6);
var _local9:Number = (_arg1 + (Math.cos(_local8) * _arg5));
var _local10:Number = (_arg2 + (Math.sin(_local8) * _arg5));
return (new Point(_local9, _local10));
}
public static function directionToAngle(_arg1:Number, _arg2:Number):Number{
var _local3:Number = (_arg2 - _arg1);
while (abs((_arg2 - _arg1)) > 181) {
_arg2 = (_arg2 - (sgn((_arg2 - _arg1)) * 360));
};
return (sgn((_arg2 - _arg1)));
}
public static function sgn(_arg1:Number):Number{
if (_arg1 < 0){
return (-1);
};
if (_arg1 == 0){
return (0);
};
return (1);
}
public static function linearInterpolate(_arg1:Number, _arg2:Number, _arg3:Number):Number{
return ((_arg1 + ((_arg2 - _arg1) * _arg3)));
}
public static function tendTowardsAngle(_arg1:Number, _arg2:Number, _arg3:Number):Number{
var _local4:Number = (_arg2 - _arg1);
while (abs((_arg2 - _arg1)) > 181) {
_arg2 = (_arg2 - (sgn((_arg2 - _arg1)) * 360));
};
return (tendTowards(_arg1, _arg2, _arg3));
}
public static function dampenInterpolate(_arg1:Number, _arg2:Number, _arg3:Number):Number{
_arg3 = Math.sqrt(_arg3);
var _local4:Number = (1 - ((Math.sin(((15 * (Math.pow(_arg3, 2.5) - 5)) / Math.PI)) * Math.pow((1 - _arg3), 2)) / 0.95));
return ((_arg1 + (_local4 * (_arg2 - _arg1))));
}
}
}//package Tools
Section 362
//Logging (Tools.Logging)
package Tools {
import flash.events.*;
import flash.net.*;
import flash.system.*;
public class Logging {
public static var loggingEnabled:Boolean = false;
public static var allLoggingConnections:Array = new Array();
public static var lastRequest:URLStream;
private static function ioErrorHandler(_arg1:IOErrorEvent):void{
}
public static function Log(_arg1:String, _arg2:String, _arg3:String="", _arg4:String=""):void{
var gamename = _arg1;
var event = _arg2;
var extradata = _arg3;
var splittest = _arg4;
if (!loggingEnabled){
return;
};
if (Security.sandboxType != Security.REMOTE){
return;
};
splittest = SplitTest.splitTestName;
if (lastRequest){
if (lastRequest.bytesAvailable > 0){
lastRequest.close();
lastRequest = null;
};
};
Security.allowDomain("www.rocksolidarcade.com");
Security.allowInsecureDomain("www.rocksolidarcade.com");
var link = (((("http://www.rocksolidarcade.com/event2/" + gamename) + "/") + event) + "/");
if (splittest != ""){
if (extradata == ""){
extradata = "null";
};
link = (link + (((extradata + "/") + splittest) + "/"));
} else {
if (extradata != ""){
link = (link + (extradata + "/"));
};
};
lastRequest = new URLStream();
try {
lastRequest.load(new URLRequest(link));
lastRequest.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
lastRequest.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
} catch(error:Error) {
};
}
private static function securityErrorHandler(_arg1:SecurityErrorEvent):void{
}
}
}//package Tools
Section 363
//Net (Tools.Net)
package Tools {
import flash.net.*;
public class Net {
public static function openURL(_arg1:String):void{
navigateToURL(new URLRequest(_arg1));
}
public static function postURL(_arg1:String, _arg2:Array):void{
var _local5:Array;
var _local3:URLRequest = new URLRequest(_arg1);
_local3.method = URLRequestMethod.POST;
var _local4:URLVariables = new URLVariables();
for each (_local5 in _arg2) {
_local4[_local5[0]] = _local5[1];
};
_local3.data = _local4;
trace(_local3.method);
navigateToURL(_local3);
}
}
}//package Tools
Section 364
//Random (Tools.Random)
package Tools {
public class Random {
public static function randInt(_arg1:int, _arg2:int):int{
var _local3:Number = (Math.random() - 0.001);
var _local4:int = (_arg1 + int((_local3 * ((_arg2 - _arg1) + 1))));
return (_local4);
}
public static function randArrayElements(_arg1:Array, _arg2:int):Array{
var _local5:int;
var _local3:Array = new Array();
var _local4:Array = new Array();
if (_arg1.length < _arg2){
return (_arg1);
};
while (_local4.length < _arg2) {
_local5 = randInt(0, (_arg1.length - 1));
if (_local3[_local5] != 1){
_local4.push(_arg1[_local5]);
_local3[_local5] = 1;
};
};
return (_local4);
}
}
}//package Tools
Section 365
//SafeImageRequest (Tools.SafeImageRequest)
package Tools {
import flash.events.*;
import flash.display.*;
import flash.net.*;
public class SafeImageRequest {
public var finished:Boolean;// = false
public var finishFunc:Function;// = null
public var ldr:Loader;
public function SafeImageRequest(_arg1:String, _arg2:Function=null){
var url = _arg1;
var finish = _arg2;
super();
ldr = new Loader();
finishFunc = finish;
try {
ldr.load(new URLRequest(url));
ldr.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
ldr.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, complete);
} catch(err:Error) {
};
}
public function securityErrorHandler(_arg1:SecurityErrorEvent):void{
trace("security error");
}
public function ioErrorHandler(_arg1:IOErrorEvent):void{
trace("IO Error");
}
public function complete(_arg1:Event):void{
finished = true;
if (finishFunc != null){
finishFunc();
};
}
}
}//package Tools
Section 366
//SafeRequest (Tools.SafeRequest)
package Tools {
import flash.events.*;
import flash.net.*;
public class SafeRequest {
public var stream:URLStream;
public var data:String;// = ""
public var cancelled:Boolean;// = false
public var finished:Boolean;// = false
public var finishFunc:Function;// = null
public var req:URLRequest;
public function SafeRequest(_arg1:String, _arg2:Function=null){
var ur:URLRequest;
var url = _arg1;
var finish = _arg2;
super();
stream = new URLStream();
finishFunc = finish;
try {
ur = new URLRequest(url);
stream.load(ur);
stream.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
stream.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
stream.addEventListener(Event.COMPLETE, complete);
} catch(error:Error) {
trace("Unable to load requested URL.");
};
}
public function ioErrorHandler(_arg1:IOErrorEvent):void{
}
public function securityErrorHandler(_arg1:SecurityErrorEvent):void{
}
public function complete(_arg1:Event):void{
if (cancelled){
return;
};
finished = true;
data = "";
while (stream.bytesAvailable > 0) {
data = (data + stream.readUTFBytes(1));
};
if (finishFunc != null){
finishFunc();
};
}
public function cancel():void{
cancelled = true;
}
}
}//package Tools
Section 367
//SplitTest (Tools.SplitTest)
package Tools {
import flash.events.*;
import flash.net.*;
import flash.system.*;
public class SplitTest {
public var enabled:Boolean;// = false
public var thisname:String;
public var req:URLStream;
public static var fivelives:SplitTest;
public static var splitTestName:String;
public function SplitTest(_arg1:String){
var name = _arg1;
super();
if (Security.sandboxType != Security.REMOTE){
return;
};
thisname = name;
Security.allowDomain("www.rocksolidarcade.com");
Security.allowInsecureDomain("www.rocksolidarcade.com");
var link = "http://www.rocksolidarcade.com/test/";
req = new URLStream();
try {
req.load(new URLRequest(link));
req.addEventListener(Event.COMPLETE, finishload);
req.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
req.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
} catch(error:Error) {
};
}
public function finishload(_arg1:Event):void{
var _local2 = "";
while (req.bytesAvailable > 0) {
_local2 = (_local2 + req.readUTFBytes(1));
};
_local2 = _local2.toLowerCase();
if (_local2.indexOf(thisname) != -1){
splitTestName = thisname;
enabled = true;
} else {
splitTestName = ("!" + thisname);
};
}
public static function init():void{
}
private static function ioErrorHandler(_arg1:IOErrorEvent):void{
}
private static function securityErrorHandler(_arg1:SecurityErrorEvent):void{
}
}
}//package Tools
Section 368
//Main (Main)
package {
import flash.events.*;
import GameScene.*;
import flash.display.*;
import Miniclip.*;
import Tools.*;
import Scenes.*;
import flash.text.*;
public class Main extends Sprite {
public var mainFont:Class;
public var i:Input;
public var gt:GameTimer;
public static var gss:GameSceneStack = new GameSceneStack();
public function Main():void{
mainFont = Main_mainFont;
super();
Font.registerFont(mainFont);
gt = new GameTimer(10, blah);
gss.mainSprite = this;
gss.pushScene(new MainMenu());
var _local1:Bitmap = new FlexIntroTest.logoSmall();
_local1.x = 10;
_local1.y = ((600 - _local1.height) - 10);
var _local2:SimpleButton = new SimpleButton(_local1, _local1, _local1, _local1);
addChild(_local2);
_local2.addEventListener(MouseEvent.CLICK, launch);
}
public function blah():void{
gss.update();
}
public function launch(_arg1:Event):void{
Net.openURL("http://www.miniclip.com");
}
public function enter():void{
}
}
}//package
Section 369
//Main_mainFont (Main_mainFont)
package {
import mx.core.*;
public class Main_mainFont extends FontAsset {
}
}//package
Section 370
//Sounds (Sounds)
package {
import Audio.*;
public class Sounds {
public static var planeCrash_embed:Class = Sounds_planeCrash_embed;
public static var planeFalling:GameSound = GameSound.forEmbed(planeFalling_embed, 1, 0);
public static var startGame_embed:Class = Sounds_startGame_embed;
public static var planeIdle:GameSound = GameSound.forEmbed(planeIdle_embed, 0.400000006, 0);
public static var planeIdleFast:GameSound = GameSound.forEmbed(planeIdleFast_embed, 0.5, 0);
public static var mainLoop_embed:Class = Sounds_mainLoop_embed;
public static var obstacleRingFast:GameSound = GameSound.forEmbed(obstacleRingFast_embed, 1, 0);
public static var obstacleRing:GameSound = GameSound.forEmbed(obstacleRing_embed, 1, 0);
public static var bonusBalloonPop:GameSound = GameSound.forEmbed(bonusBalloonPop_embed, 0.800000012, 0);
public static var levelComplete:GameSound = GameSound.forEmbed(levelComplete_embed, 0.400000006, 0);
public static var planeFalling_embed:Class = Sounds_planeFalling_embed;
public static var planeIdleFast_embed:Class = Sounds_planeIdleFast_embed;
public static var planeIdle_embed:Class = Sounds_planeIdle_embed;
public static var planeCrash:GameSound = GameSound.forEmbed(planeCrash_embed, 1, 0);
public static var startGame:GameSound = GameSound.forEmbed(startGame_embed, 1, 0);
public static var levelComplete_embed:Class = Sounds_levelComplete_embed;
public static var obstacleRing_embed:Class = Sounds_obstacleRing_embed;
public static var bonusBalloonPop_embed:Class = Sounds_bonusBalloonPop_embed;
public static var obstacleRingFast_embed:Class = Sounds_obstacleRingFast_embed;
public static var mainLoop:GameSound = GameSound.forEmbed(mainLoop_embed, 0.400000006, 0);
}
}//package
Section 371
//Sounds_bonusBalloonPop_embed (Sounds_bonusBalloonPop_embed)
package {
import mx.core.*;
public class Sounds_bonusBalloonPop_embed extends SoundAsset {
}
}//package
Section 372
//Sounds_levelComplete_embed (Sounds_levelComplete_embed)
package {
import mx.core.*;
public class Sounds_levelComplete_embed extends SoundAsset {
}
}//package
Section 373
//Sounds_mainLoop_embed (Sounds_mainLoop_embed)
package {
import mx.core.*;
public class Sounds_mainLoop_embed extends SoundAsset {
}
}//package
Section 374
//Sounds_obstacleRing_embed (Sounds_obstacleRing_embed)
package {
import mx.core.*;
public class Sounds_obstacleRing_embed extends SoundAsset {
}
}//package
Section 375
//Sounds_obstacleRingFast_embed (Sounds_obstacleRingFast_embed)
package {
import mx.core.*;
public class Sounds_obstacleRingFast_embed extends SoundAsset {
}
}//package
Section 376
//Sounds_planeCrash_embed (Sounds_planeCrash_embed)
package {
import mx.core.*;
public class Sounds_planeCrash_embed extends SoundAsset {
}
}//package
Section 377
//Sounds_planeFalling_embed (Sounds_planeFalling_embed)
package {
import mx.core.*;
public class Sounds_planeFalling_embed extends SoundAsset {
}
}//package
Section 378
//Sounds_planeIdle_embed (Sounds_planeIdle_embed)
package {
import mx.core.*;
public class Sounds_planeIdle_embed extends SoundAsset {
}
}//package
Section 379
//Sounds_planeIdleFast_embed (Sounds_planeIdleFast_embed)
package {
import mx.core.*;
public class Sounds_planeIdleFast_embed extends SoundAsset {
}
}//package
Section 380
//Sounds_startGame_embed (Sounds_startGame_embed)
package {
import mx.core.*;
public class Sounds_startGame_embed extends SoundAsset {
}
}//package