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

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

Stunt Pilot Trainer.swf

This is the info page for
Flash #70470

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


ActionScript [AS3]
Section 1
//GameSound (Audio.GameSound) package Audio { import flash.media.*; import Tools.*; public class GameSound { public var embed:Class; public var eqVolume:Number;// = 1 public var sc:SoundChannel; public var s:Sound; public var alternates:Array; 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){ eqVolume = 1; isMusic = false; super(); embed = _arg1; s = new embed(); eqVolume = _arg2; 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:Boolean=false):GameSoundChannel{ var _local5:SoundTransform; var _local6:Boolean; var _local7:GameSoundChannel; if (((alternates) && (!(_arg4)))){ return (alternates[Random.randInt(0, (alternates.length - 1))].play(_arg1, _arg2, _arg3, true)); }; _local5 = new SoundTransform(eqVolume); if (_arg3){ _local5.volume = 0; }; _arg2 = (_arg2 % s.length); sc = null; _local6 = false; while (sc == null) { if (_arg1){ if (_arg2 == 0){ sc = s.play(_arg2, 99, _local5); } else { sc = s.play(_arg2, 0, _local5); }; } else { sc = s.play(_arg2, 0, _local5); }; if (sc == null){ if (_local6){ return (null); }; _local6 = true; s = new embed(); trace("retrying"); }; }; if (sc){ _local7 = new GameSoundChannel(this, sc, _arg1, _arg3); return (_local7); }; return (new GameSoundChannel(null, null)); } public static function forEmbed(_arg1:Class, _arg2:Number):GameSound{ var _local3:Sound; var _local4:GameSound; _local3 = new (_arg1); for each (_local4 in allSounds) { if ((((_local4.s.bytesTotal == _local3.bytesTotal)) && ((_local4.s.length == _local3.length)))){ return (_local4); }; }; return (new GameSound(_arg1, _arg2)); } public static function forEmbedArray(_arg1:Array, _arg2:Number):GameSound{ var _local3:GameSound; var _local4:int; _local3 = forEmbed(_arg1[0], _arg2); if (_local3){ _local4 = 1; while (_local4 < _arg1.length) { _local3.addAlternate(forEmbed(_arg1[_local4], _arg2)); _local4++; }; }; return (_local3); } } }//package Audio
Section 2
//GameSoundChannel (Audio.GameSoundChannel) package Audio { import flash.events.*; import flash.media.*; import Tools.*; public class GameSoundChannel { public var looping:Boolean;// = false 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 gs:GameSound; public var _playing:Boolean;// = true public var chanStart:Number;// = 0 public var currentVolume:Number;// = 1 public var fadeOut:Number;// = 0 public static var allChannels:Array = new Array(); public function GameSoundChannel(_arg1:GameSound, _arg2:SoundChannel, _arg3:Boolean=false, _arg4:Number=0){ _playing = true; chanStart = 0; fadeIn = 0; fadeOut = 0; fadeOutTime = 0; fullVolumeSet = false; looping = false; currentVolume = 1; _remove = false; super(); 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())); 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())); chan.soundTransform = _local3; } else { fullVolumeSet = true; _local3 = new SoundTransform(vol()); chan.soundTransform = _local3; }; } else { _local3 = new SoundTransform(vol()); chan.soundTransform = _local3; }; if (fadeOut != 0){ if (chan.position > (fadeOutTime + fadeOut)){ stop(); }; }; } 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; _local1 = (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 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.*; public class GameSoundScene { public var breakLoop:GameSound; public var mainLoopChannel:GameSoundChannel; public var mainLoopStopped:Number;// = 0 public var sceneName:String; public var breakLoopChannel:GameSoundChannel; public var deadBreak:Boolean;// = false public var restartTime:Number; public var mainLoop:GameSound; public static var allScenes:Array = new Array(); public function GameSoundScene(_arg1:String){ mainLoopStopped = 0; deadBreak = false; super(); sceneName = _arg1; allScenes.push(this); } public function update():void{ 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; }; }; } public function insertDeadBreak(_arg1:Number):void{ mainLoopStopped = mainLoopChannel.position(); mainLoopChannel.stop(2000); deadBreak = true; restartTime = (getTimer() + _arg1); } public function setBackgroundMusic(_arg1:GameSound):void{ if (mainLoop){ return; }; mainLoop = _arg1; _arg1.isMusic = true; mainLoopChannel = _arg1.play(true, 0, 500); } 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
//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 5
//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 6
//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){ var _local4:b2CircleDef; var _local5:b2AABB; var _local6:b2BroadPhase; m_localPosition = new b2Vec2(); super(_arg1, _arg2); _local4 = (_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); _local5 = 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)); _local6 = 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 ResetProxy(_arg1:b2BroadPhase){ var _local2:b2Proxy; var _local3:int; var _local4:uint; var _local5:uint; var _local6:b2AABB; if (m_proxyId == b2Pair.b2_nullProxy){ return; }; _local2 = _arg1.GetProxy(m_proxyId); _local3 = _local2.groupIndex; _local4 = _local2.categoryBits; _local5 = _local2.maskBits; _arg1.DestroyProxy(m_proxyId); _local2 = null; _local6 = 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 Support(_arg1:Number, _arg2:Number):b2Vec2{ var _local3:Number; _local3 = 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)))); } override public function Synchronize(_arg1:b2Vec2, _arg2:b2Mat22){ var _local3:b2AABB; var _local4:b2BroadPhase; m_R.SetM(_arg2); m_position.SetV(m_localPosition); m_position.MulM(_arg2); m_position.Add(_arg1); if (m_proxyId == b2Pair.b2_nullProxy){ return; }; _local3 = 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)); _local4 = 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 TestPoint(_arg1:b2Vec2):Boolean{ var _local2:b2Vec2; _local2 = new b2Vec2(); _local2.SetV(_arg1); _local2.Subtract(m_position); return ((b2Math.b2Dot(_local2, _local2) <= (m_radius * m_radius))); } } }//package Engine.Collision.Shapes
Section 7
//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(){ mass = 0; center = new b2Vec2(0, 0); I = 0; super(); } } }//package Engine.Collision.Shapes
Section 8
//b2PolyDef (Engine.Collision.Shapes.b2PolyDef) package Engine.Collision.Shapes { import Engine.Common.Math.*; import Engine.Common.*; public class b2PolyDef extends b2ShapeDef { public var vertexCount:int; public var vertices:Array; public function b2PolyDef(){ var _local1:int; vertices = new Array(b2Settings.b2_maxPolyVertices); super(); type = b2Shape.e_polyShape; vertexCount = 0; _local1 = 0; while (_local1 < b2Settings.b2_maxPolyVertices) { vertices[_local1] = new b2Vec2(); _local1++; }; } } }//package Engine.Collision.Shapes
Section 9
//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_vertices:Array; public var m_normals:Array; public var m_nextVert:Array; public var m_localOBB:b2OBB; public var m_vertexCount:int; public function b2PolyShape(_arg1:b2ShapeDef, _arg2:b2Body, _arg3:b2Vec2){ var _local4:int; var _local5:b2Vec2; var _local6:b2Vec2; var _local7:b2AABB; var _local8:b2Mat22; var _local9:Number; var _local10:Number; var _local11:b2Vec2; var _local12:b2Vec2; var _local13:b2Mat22; var _local14:b2Mat22; var _local15:b2Vec2; var _local16:b2BroadPhase; var _local17:b2BoxDef; var _local18:b2PolyDef; var _local19:b2Vec2; m_localOBB = new b2OBB(); super(_arg1, _arg2); _local7 = 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++; }; }; _local11 = new b2Vec2(Number.MAX_VALUE, Number.MAX_VALUE); _local12 = 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); _local13 = b2Math.b2MulMM(m_R, m_localOBB.R); _local14 = b2Math.b2AbsM(_local13); _local5 = b2Math.b2MulMV(_local14, m_localOBB.extents); _local15 = 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); _local16 = m_body.m_world.m_broadPhase; if (_local16.InRange(_local7)){ m_proxyId = _local16.CreateProxy(_local7, _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 ResetProxy(_arg1:b2BroadPhase){ var _local2:b2Proxy; var _local3:int; var _local4:uint; var _local5:uint; var _local6:b2Mat22; var _local7:b2Mat22; var _local8:b2Vec2; var _local9:b2Vec2; var _local10:b2AABB; if (m_proxyId == b2Pair.b2_nullProxy){ return; }; _local2 = _arg1.GetProxy(m_proxyId); _local3 = _local2.groupIndex; _local4 = _local2.categoryBits; _local5 = _local2.maskBits; _arg1.DestroyProxy(m_proxyId); _local2 = null; _local6 = b2Math.b2MulMM(m_R, m_localOBB.R); _local7 = b2Math.b2AbsM(_local6); _local8 = b2Math.b2MulMV(_local7, m_localOBB.extents); _local9 = b2Math.b2MulMV(m_R, m_localOBB.center); _local9.Add(m_position); _local10 = 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(); }; } override public function Support(_arg1:Number, _arg2:Number):b2Vec2{ var _local3:Number; var _local4:Number; var _local5:int; var _local6:Number; var _local7:int; var _local8:Number; _local3 = ((_arg1 * m_R.col1.x) + (_arg2 * m_R.col1.y)); _local4 = ((_arg1 * m_R.col2.x) + (_arg2 * m_R.col2.y)); _local5 = 0; _local6 = ((m_vertices[0].x * _local3) + (m_vertices[0].y * _local4)); _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){ var _local3:b2Mat22; var _local4:b2Mat22; var _local5:b2Vec2; var _local6:b2Vec2; var _local7:b2AABB; var _local8:b2BroadPhase; m_R.SetM(_arg2); m_position.SetV(_arg1); if (m_proxyId == b2Pair.b2_nullProxy){ return; }; _local3 = b2Math.b2MulMM(m_R, m_localOBB.R); _local4 = b2Math.b2AbsM(_local3); _local5 = b2Math.b2MulMV(_local4, m_localOBB.extents); _local6 = b2Math.b2MulMV(m_R, m_localOBB.center); _local6.Add(m_position); _local7 = new b2AABB(); _local7.minVertex.SetV(_local6); _local7.minVertex.Subtract(_local5); _local7.maxVertex.SetV(_local6); _local7.maxVertex.Add(_local5); _local8 = 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 _local2:b2Vec2; var _local3:int; var _local4:b2Vec2; var _local5:Number; _local2 = new b2Vec2(); _local2.SetV(_arg1); _local2.Subtract(m_position); _local2.MulTM(m_R); _local3 = 0; 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); } } }//package Engine.Collision.Shapes
Section 10
//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_type:int; public var m_friction:Number; 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_userData = null; 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 GetPosition():b2Vec2{ return (m_position); } 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 ResetProxy(_arg1:b2BroadPhase){ } 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 _local5:b2Vec2; var _local6:Number; var _local7:Number; var _local8:b2Vec2; var _local9:Number; var _local10:int; 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; _local5 = new b2Vec2(); _local5.SetZero(); _local6 = 0; _local7 = 0; _local8 = new b2Vec2(0, 0); _local9 = (1 / 3); _local10 = 0; 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 11
//b2ShapeDef (Engine.Collision.Shapes.b2ShapeDef) package Engine.Collision.Shapes { import Engine.Common.Math.*; import Engine.Common.*; public class b2ShapeDef { public var groupIndex:int; public var categoryBits:int; public var localRotation:Number; public var restitution:Number; public var userData;// = null public var density:Number; public var maskBits:int; public var type:int; public var localPosition:b2Vec2; public var friction:Number; public function b2ShapeDef(){ userData = null; super(); 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 12
//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; var _local2:Number; var _local3:Boolean; _local1 = maxVertex.x; _local2 = maxVertex.y; _local1 = maxVertex.x; _local2 = maxVertex.y; _local1 = (_local1 - minVertex.x); _local2 = (_local2 - minVertex.y); _local3 = (((_local1 >= 0)) && ((_local2 >= 0))); _local3 = ((((_local3) && (minVertex.IsValid()))) && (maxVertex.IsValid())); return (_local3); } } }//package Engine.Collision
Section 13
//b2Bound (Engine.Collision.b2Bound) package Engine.Collision { public class b2Bound { public var proxyId:uint; public var stabbingCount:uint; public var value:uint; public function Swap(_arg1:b2Bound){ var _local2:uint; var _local3:uint; var _local4:uint; _local2 = value; _local3 = proxyId; _local4 = stabbingCount; value = _arg1.value; proxyId = _arg1.proxyId; stabbingCount = _arg1.stabbingCount; _arg1.value = _local2; _arg1.proxyId = _local3; _arg1.stabbingCount = _local4; } public function IsLower():Boolean{ return (((value & 1) == 0)); } public function IsUpper():Boolean{ return (((value & 1) == 1)); } } }//package Engine.Collision
Section 14
//b2BroadPhase (Engine.Collision.b2BroadPhase) package Engine.Collision { import Engine.Common.Math.*; import Engine.Common.*; public class b2BroadPhase { public var m_quantizationFactor:b2Vec2; public var m_pairBuffer:Array; public var m_worldAABB:b2AABB; public var m_bounds:Array; public var m_freeProxy:uint; public var m_pairCallback:b2PairCallback; public var m_proxyCount:int; public var m_proxyPool:Array; public var m_queryResultCount:int; 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 _local4:Number; var _local5:Number; 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++; }; _local4 = _arg1.maxVertex.x; _local5 = _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 _local1:uint; var _local2:int; var _local3:b2Pair; var _local4:b2Proxy; var _local5:b2Proxy; _local1 = m_pairManager.GetCount(); m_pairBuffer.sortOn(["proxyId1", "proxyId2"], Array.NUMERIC); _local2 = 0; 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 QueryAABB(_arg1:b2AABB, _arg2, _arg3:int):int{ var _local4:Array; var _local5:Array; var _local6:uint; var _local7:uint; var _local8:Array; var _local9:Array; var _local10:int; var _local11:int; var _local12:b2Proxy; _local4 = new Array(); _local5 = new Array(); ComputeBounds(_local4, _local5, _arg1); _local8 = [_local6]; _local9 = [_local7]; Query(_local8, _local9, _local4[0], _local5[0], m_bounds[0], (2 * m_proxyCount), 0); Query(_local8, _local9, _local4[1], _local5[1], m_bounds[1], (2 * m_proxyCount), 1); _local10 = 0; _local11 = 0; while ((((_local11 < m_queryResultCount)) && ((_local10 < _arg3)))) { _local12 = m_proxyPool[m_queryResults[_local11]]; _arg2[_local11] = _local12.userData; _local11++; _local10++; }; m_queryResultCount = 0; IncrementTimeStamp(); return (_local10); } private function RemoveBufferedPair(_arg1:uint, _arg2:uint){ var _local3:b2Pair; _local3 = 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 GetProxy(_arg1:int):b2Proxy{ if ((((_arg1 == b2Pair.b2_nullProxy)) || ((m_proxyPool[_arg1].IsValid() == false)))){ return (null); }; return (m_proxyPool[_arg1]); } public function Flush(){ var _local1:int; var _local2:int; var _local3:b2Pair; var _local4:b2Proxy; var _local5:b2Proxy; _local2 = 0; _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 _local8:uint; var _local9:uint; var _local10:uint; var _local11:int; var _local12:int; var _local13:b2Proxy; _local8 = BinarySearch(_arg5, _arg6, _arg3); _local9 = BinarySearch(_arg5, _arg6, _arg4); _local10 = _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; var _local5:Number; var _local6:Number; var _local7:Number; _local4 = _arg3.minVertex.x; _local5 = _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); _local6 = _arg3.maxVertex.x; _local7 = _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; var _local4:b2Proxy; var _local5:Boolean; _local3 = m_proxyPool[_arg1]; _local4 = m_proxyPool[_arg2]; if ((((_local3.groupIndex == _local4.groupIndex)) && (!((_local3.groupIndex == 0))))){ return ((_local3.groupIndex > 0)); }; _local5 = ((!(((_local3.maskBits & _local4.categoryBits) == 0))) && (!(((_local3.categoryBits & _local4.maskBits) == 0)))); return (_local5); } public function CreateProxy(_arg1:b2AABB, _arg2:int, _arg3:int, _arg4:int, _arg5):uint{ var _local6:uint; var _local7:b2Proxy; var _local8:uint; var _local9:uint; var _local10:Array; var _local11:Array; var _local12:int; var _local13:int; 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(); _local8 = 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; _local9 = (2 * m_proxyCount); _local10 = new Array(); _local11 = new Array(); ComputeBounds(_local10, _local11, _arg1); _local12 = 0; 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++; _local13 = 0; 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 _local2:b2Proxy; var _local3:uint; var _local4:int; var _local5:int; 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(); _local2 = m_proxyPool[_arg1]; _local3 = (2 * m_proxyCount); _local4 = 0; 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++; }; _local5 = 0; 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 _local3:int; var _local4:Array; _local3 = 0; 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 _local5:int; var _local6:Array; var _local7:uint; var _local8:int; var _local9:int; var _local10:b2Bound; var _local11:uint; var _local12:uint; var _local13:uint; var _local14:b2Bound; var _local15:uint; var _local16:b2Proxy; var _local17:b2Bound; _local5 = 0; 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++; }; _local6 = m_pairManager.GetPairs(); _local7 = m_pairManager.GetCount(); m_pairBuffer.sortOn(["proxyId1", "proxyId2"], Array.NUMERIC); _local8 = 0; 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++; }; _local9 = 0; 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; _local2 = m_proxyPool[_arg1]; if (_local2.timeStamp < m_timeStamp){ _local2.timeStamp = m_timeStamp; _local2.overlapCount = 1; } else { _local2.overlapCount = 2; m_queryResults[m_queryResultCount] = _arg1; m_queryResultCount++; }; } public function InRange(_arg1:b2AABB):Boolean{ var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; _local2 = _arg1.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){ var _local3:b2Pair; if (ShouldCollide(_arg1, _arg2) == false){ return; }; _local3 = 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 _local9:uint; var _local10:b2Proxy; var _local11:Array; var _local12:Array; var _local13:uint; 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; }; _local9 = (2 * m_proxyCount); _local10 = m_proxyPool[_arg1]; _local11 = new Array(); _local12 = new Array(); ComputeBounds(_local11, _local12, _arg2); _local13 = 0; 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 _local4:int; var _local5:int; var _local6:int; _local4 = 0; _local5 = (_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 15
//b2BufferedPair (Engine.Collision.b2BufferedPair) package Engine.Collision { public class b2BufferedPair { public var proxyId1:uint; public var proxyId2:uint; } }//package Engine.Collision
Section 16
//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; private static var b2CollidePolyTempVec:b2Vec2 = new b2Vec2(); public static function EdgeSeparation(_arg1:b2PolyShape, _arg2:int, _arg3:b2PolyShape):Number{ var _local4:int; var _local5:Array; var _local6:int; var _local7:Array; var _local8:int; var _local9:int; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:b2Mat22; var _local17:Number; var _local18:Number; var _local19:int; var _local20:Number; var _local21:int; var _local22:b2Vec2; var _local23:b2Vec2; var _local24:Number; var _local25:b2Vec2; var _local26:Number; _local4 = _arg1.m_vertexCount; _local5 = _arg1.m_vertices; _local6 = _arg3.m_vertexCount; _local7 = _arg3.m_vertices; _local8 = _arg2; _local9 = (((_arg2 + 1) == _local4)) ? 0 : (_arg2 + 1); _local10 = (_local5[_local9].x - _local5[_local8].x); _local11 = (_local5[_local9].y - _local5[_local8].y); _local12 = _local10; _local10 = _local11; _local11 = -(_local12); _local13 = (1 / Math.sqrt(((_local10 * _local10) + (_local11 * _local11)))); _local10 = (_local10 * _local13); _local11 = (_local11 * _local13); _local14 = _local10; _local15 = _local11; _local12 = _local14; _local16 = _arg1.m_R; _local14 = ((_local16.col1.x * _local12) + (_local16.col2.x * _local15)); _local15 = ((_local16.col1.y * _local12) + (_local16.col2.y * _local15)); _local17 = _local14; _local18 = _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; _local19 = 0; _local20 = Number.MAX_VALUE; _local21 = 0; while (_local21 < _local6) { _local25 = _local7[_local21]; _local26 = ((_local25.x * _local17) + (_local25.y * _local18)); if (_local26 < _local20){ _local20 = _local26; _local19 = _local21; }; _local21++; }; _local22 = new b2Vec2(); _local22.SetV(_local5[_local8]); _local22.MulM(_arg1.m_R); _local22.Add(_arg1.m_position); _local23 = new b2Vec2(); _local23.SetV(_local7[_local19]); _local23.MulM(_arg3.m_R); _local23.Add(_arg3.m_position); _local23.Subtract(_local22); _local24 = ((_local23.x * _local14) + (_local23.y * _local15)); return (_local24); } public static function b2TestOverlap(_arg1:b2AABB, _arg2:b2AABB):Boolean{ var _local3:b2Vec2; var _local4:b2Vec2; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; _local3 = _arg2.minVertex; _local4 = _arg1.maxVertex; _local5 = (_local3.x - _local4.x); _local6 = (_local3.y - _local4.y); _local3 = _arg1.minVertex; _local4 = _arg2.maxVertex; _local7 = (_local3.x - _local4.x); _local8 = (_local3.y - _local4.y); if ((((_local5 > 0)) || ((_local6 > 0)))){ return (false); }; if ((((_local7 > 0)) || ((_local8 > 0)))){ return (false); }; return (true); } public static function FindIncidentEdge(_arg1:Array, _arg2:b2PolyShape, _arg3:int, _arg4:b2PolyShape){ var _local5:int; var _local6:Array; var _local7:int; var _local8:Array; var _local9:int; var _local10:int; var _local11:b2Vec2; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:b2Mat22; var _local19:Number; var _local20:Number; var _local21:int; var _local22:int; var _local23:Number; var _local24:int; var _local25:ClipVertex; var _local26:int; var _local27:int; var _local28:Number; var _local29:Number; var _local30:Number; _local5 = _arg2.m_vertexCount; _local6 = _arg2.m_vertices; _local7 = _arg4.m_vertexCount; _local8 = _arg4.m_vertices; _local9 = _arg3; _local10 = (((_arg3 + 1) == _local5)) ? 0 : (_arg3 + 1); _local11 = _local6[_local10]; _local12 = _local11.x; _local13 = _local11.y; _local11 = _local6[_local9]; _local12 = (_local12 - _local11.x); _local13 = (_local13 - _local11.y); _local14 = _local12; _local12 = _local13; _local13 = -(_local14); _local15 = (1 / Math.sqrt(((_local12 * _local12) + (_local13 * _local13)))); _local12 = (_local12 * _local15); _local13 = (_local13 * _local15); _local16 = _local12; _local17 = _local13; _local14 = _local16; _local18 = _arg2.m_R; _local16 = ((_local18.col1.x * _local14) + (_local18.col2.x * _local17)); _local17 = ((_local18.col1.y * _local14) + (_local18.col2.y * _local17)); _local19 = _local16; _local20 = _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; _local23 = Number.MAX_VALUE; _local24 = 0; 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 b2CollidePolyAndCircle(_arg1:b2Manifold, _arg2:b2PolyShape, _arg3:b2CircleShape){ var _local4:b2ContactPoint; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:b2Mat22; var _local10:Number; var _local11:Number; var _local12:int; var _local13:Number; var _local14:Number; var _local15:int; var _local16:int; var _local17:int; var _local18:Number; var _local19:Number; var _local20:Number; var _local21:Number; var _local22:Number; var _local23:Number; var _local24:Number; var _local25:b2Vec2; _arg1.pointCount = 0; _local7 = (_arg3.m_position.x - _arg2.m_position.x); _local8 = (_arg3.m_position.y - _arg2.m_position.y); _local9 = _arg2.m_R; _local10 = ((_local7 * _local9.col1.x) + (_local8 * _local9.col1.y)); _local8 = ((_local7 * _local9.col2.x) + (_local8 * _local9.col2.y)); _local7 = _local10; _local12 = 0; _local13 = -(Number.MAX_VALUE); _local14 = _arg3.m_radius; _local15 = 0; 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; }; _local16 = _local12; _local17 = _arg2.m_nextVert[_local16]; _local18 = (_arg2.m_vertices[_local17].x - _arg2.m_vertices[_local16].x); _local19 = (_arg2.m_vertices[_local17].y - _arg2.m_vertices[_local16].y); _local20 = 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; }; _local21 = (((_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 FindMaxSeparation(_arg1:Array, _arg2:b2PolyShape, _arg3:b2PolyShape):Number{ var _local4:int; var _local5:Array; var _local6:b2Vec2; var _local7:b2Vec2; var _local8:int; var _local9:Number; var _local10:int; var _local11:int; var _local12:Number; var _local13:int; var _local14:Number; var _local15:int; var _local16:Number; var _local17:int; var _local18:Number; var _local19:int; var _local20:Number; _local4 = _arg2.m_vertexCount; _local5 = _arg2.m_vertices; _local6 = new b2Vec2(); _local6.SetV(_arg3.m_position); _local6.Subtract(_arg2.m_position); _local7 = new b2Vec2(); _local7.SetV(_local6); _local7.MulTM(_arg2.m_R); _local8 = 0; _local9 = -(Number.MAX_VALUE); _local10 = 0; while (_local10 < _local4) { _local18 = b2Math.b2Dot(_local5[_local10], _local7); if (_local18 > _local9){ _local9 = _local18; _local8 = _local10; }; _local10++; }; _local11 = (((_local8 - 1) >= 0)) ? (_local8 - 1) : (_local4 - 1); _local12 = EdgeSeparation(_arg2, _local11, _arg3); if (_local12 > 0){ return (_local12); }; _local13 = _local8; _local14 = EdgeSeparation(_arg2, _local13, _arg3); if (_local14 > 0){ return (_local14); }; if (_local12 > _local14){ _local17 = -1; _local15 = _local11; _local16 = _local12; } else { _local17 = 1; _local15 = _local13; _local16 = _local14; }; while (true) { if (_local17 == -1){ _local19 = (((_local15 - 1) >= 0)) ? (_local15 - 1) : (_local4 - 1); } else { _local19 = (((_local15 + 1) < _local4)) ? (_local15 + 1) : 0; }; _local20 = EdgeSeparation(_arg2, _local19, _arg3); if (_local20 > 0){ return (_local20); }; if (_local20 > _local16){ _local15 = _local19; _local16 = _local20; } else { break; }; }; _arg1[0] = _local15; return (_local16); } public static function ClipSegmentToLine(_arg1:Array, _arg2:Array, _arg3:b2Vec2, _arg4:Number):int{ var _local5:int; var _local6:b2Vec2; var _local7:b2Vec2; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:b2Vec2; _local5 = 0; _local6 = _arg2[0].v; _local7 = _arg2[1].v; _local8 = (b2Math.b2Dot(_arg3, _arg2[0].v) - _arg4); _local9 = (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 _local4:int; var _local5:Array; var _local6:Number; var _local7:int; var _local8:Array; var _local9:Number; var _local10:b2PolyShape; var _local11:b2PolyShape; var _local12:int; var _local13:int; var _local14:Number; var _local15:Number; var _local16:Array; var _local17:int; var _local18:Array; var _local19:b2Vec2; var _local20:b2Vec2; var _local21:Number; var _local22:Number; var _local23:Number; var _local24:Number; var _local25:Number; var _local26:b2Mat22; 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:Array; var _local38:Array; var _local39:int; var _local40:int; var _local41:int; var _local42:b2Vec2; var _local43:Number; var _local44:b2ContactPoint; _arg1.pointCount = 0; _local4 = 0; _local5 = [_local4]; _local6 = FindMaxSeparation(_local5, _arg2, _arg3); _local4 = _local5[0]; if (_local6 > 0){ return; }; _local7 = 0; _local8 = [_local7]; _local9 = FindMaxSeparation(_local8, _arg3, _arg2); _local7 = _local8[0]; if (_local9 > 0){ return; }; _local14 = 0.98; _local15 = 0.001; if (_local9 > ((_local14 * _local6) + _local15)){ _local10 = _arg3; _local11 = _arg2; _local12 = _local7; _local13 = 1; } else { _local10 = _arg2; _local11 = _arg3; _local12 = _local4; _local13 = 0; }; _local16 = [new ClipVertex(), new ClipVertex()]; FindIncidentEdge(_local16, _local10, _local12, _local11); _local17 = _local10.m_vertexCount; _local18 = _local10.m_vertices; _local19 = _local18[_local12]; _local20 = (((_local12 + 1) < _local17)) ? _local18[(_local12 + 1)] : _local18[0]; _local21 = (_local20.x - _local19.x); _local22 = (_local20.y - _local19.y); _local23 = (_local20.x - _local19.x); _local24 = (_local20.y - _local19.y); _local25 = _local23; _local26 = _local10.m_R; _local23 = ((_local26.col1.x * _local25) + (_local26.col2.x * _local24)); _local24 = ((_local26.col1.y * _local25) + (_local26.col2.y * _local24)); _local27 = (1 / Math.sqrt(((_local23 * _local23) + (_local24 * _local24)))); _local23 = (_local23 * _local27); _local24 = (_local24 * _local27); _local28 = _local23; _local29 = _local24; _local25 = _local28; _local28 = _local29; _local29 = -(_local25); _local30 = _local19.x; _local31 = _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); _local32 = _local20.x; _local33 = _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); _local34 = ((_local28 * _local30) + (_local29 * _local31)); _local35 = -(((_local23 * _local30) + (_local24 * _local31))); _local36 = ((_local23 * _local32) + (_local24 * _local33)); _local37 = [new ClipVertex(), new ClipVertex()]; _local38 = [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); }; _local40 = 0; _local41 = 0; 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 _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:b2ContactPoint; var _local10:Number; var _local11:Number; _arg1.pointCount = 0; _local4 = (_arg3.m_position.x - _arg2.m_position.x); _local5 = (_arg3.m_position.y - _arg2.m_position.y); _local6 = ((_local4 * _local4) + (_local5 * _local5)); _local7 = (_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; _local9 = _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 17
//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; _local1 = new b2ContactID(); _local1.key = key; return (_local1); } public function get key():uint{ return (_key); } 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); } } }//package Engine.Collision
Section 18
//b2ContactPoint (Engine.Collision.b2ContactPoint) package Engine.Collision { import Engine.Common.Math.*; public class b2ContactPoint { public var separation:Number; public var position:b2Vec2; public var normalImpulse:Number; public var tangentImpulse:Number; public var id:b2ContactID; public function b2ContactPoint(){ position = new b2Vec2(); id = new b2ContactID(); super(); } } }//package Engine.Collision
Section 19
//b2Manifold (Engine.Collision.b2Manifold) package Engine.Collision { import Engine.Common.Math.*; import Engine.Common.*; public class b2Manifold { public var points:Array; public var pointCount:int; public var normal:b2Vec2; public function b2Manifold(){ var _local1:int; super(); points = new Array(b2Settings.b2_maxManifoldPoints); _local1 = 0; while (_local1 < b2Settings.b2_maxManifoldPoints) { points[_local1] = new b2ContactPoint(); _local1++; }; normal = new b2Vec2(); } } }//package Engine.Collision
Section 20
//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 21
//b2Pair (Engine.Collision.b2Pair) package Engine.Collision { public class b2Pair { public var userData;// = null public var proxyId1:uint; 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 b2Pair(){ userData = null; super(); } 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 22
//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 23
//b2PairManager (Engine.Collision.b2PairManager) package Engine.Collision { import Engine.Common.Math.*; import Engine.Common.*; public class b2PairManager { public var m_next:Array; public var m_pairs:Array; public var m_pairCount:int; public var m_hashTable: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 _local3:uint; var _local4:uint; var _local5:uint; if (_arg1 > _arg2){ _local5 = _arg1; _arg1 = _arg2; _arg2 = _local5; }; _local3 = (Hash(_arg1, _arg2) & b2Pair.b2_tableMask); _local4 = 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 _local3:uint; var _local4:int; var _local5:b2Pair; var _local6:uint; if (_arg1 > _arg2){ _local6 = _arg1; _arg1 = _arg2; _arg2 = _local6; }; _local3 = (Hash(_arg1, _arg2) & b2Pair.b2_tableMask); _local4 = FindHash(_arg1, _arg2, _local3); _local5 = ((_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 GetPairs():Array{ return (m_pairs); } public function Remove(_arg1:uint, _arg2:uint){ var _local3:uint; var _local4:int; var _local5:b2Pair; var _local6:*; var _local7:uint; var _local8:uint; var _local9:uint; var _local10:b2Pair; var _local11:uint; var _local12:uint; if (_arg1 > _arg2){ _local12 = _arg1; _arg1 = _arg2; _arg2 = _local12; }; _local3 = (Hash(_arg1, _arg2) & b2Pair.b2_tableMask); _local4 = FindHash(_arg1, _arg2, _local3); _local5 = ((_local4)!=b2Settings.USHRT_MAX) ? m_pairs[_local4] : null; if (_local5 == null){ return (null); }; _local6 = _local5.userData; _local7 = m_hashTable[_local3]; _local8 = 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]; }; _local9 = (m_pairCount - 1); if (_local9 == _local4){ m_pairCount--; return (_local6); }; _local10 = m_pairs[_local9]; _local11 = (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); } public function GetCount():int{ return (m_pairCount); } private function FindHash(_arg1:uint, _arg2:uint, _arg3:uint):int{ var _local4:uint; _local4 = 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 static function Hash(_arg1:uint, _arg2:uint):uint{ var _local3:uint; _local3 = (((_arg2 << 16) & 4294901760) | _arg1); _local3 = (~(_local3) + ((_local3 << 15) & 4294934528)); _local3 = (_local3 ^ ((_local3 >> 12) & 1048575)); _local3 = (_local3 + ((_local3 << 2) & 4294967292)); _local3 = (_local3 ^ ((_local3 >> 4) & 268435455)); _local3 = (_local3 * 2057); _local3 = (_local3 ^ ((_local3 >> 16) & 0xFFFF)); return (_local3); } public static function Equals(_arg1:b2Pair, _arg2:uint, _arg3:uint):Boolean{ return ((((_arg1.proxyId1 == _arg2)) && ((_arg1.proxyId2 == _arg3)))); } } }//package Engine.Collision
Section 24
//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)]; userData = null; 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 25
//ClipVertex (Engine.Collision.ClipVertex) package Engine.Collision { import Engine.Common.Math.*; public class ClipVertex { public var v:b2Vec2; public var id:b2ContactID; public function ClipVertex(){ v = new b2Vec2(); id = new b2ContactID(); super(); } } }//package Engine.Collision
Section 26
//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 set flip(_arg1:int){ _flip = _arg1; _m_id._key = ((_m_id._key & 0xFFFFFF) | ((_flip << 24) & 4278190080)); } public function get incidentVertex():int{ return (_incidentVertex); } public function set incidentEdge(_arg1:int){ _incidentEdge = _arg1; _m_id._key = ((_m_id._key & 4294902015) | ((_incidentEdge << 8) & 0xFF00)); } } }//package Engine.Collision
Section 27
//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 Set(_arg1:Number){ var _local2:Number; var _local3:Number; _local2 = Math.cos(_arg1); _local3 = Math.sin(_arg1); col1.x = _local2; col2.x = -(_local3); col1.y = _local3; col2.y = _local2; } public function SetVV(_arg1:b2Vec2, _arg2:b2Vec2){ col1.SetV(_arg1); col2.SetV(_arg2); } 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 _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; _local2 = col1.x; _local3 = col2.x; _local4 = col1.y; _local5 = col2.y; _local6 = ((_local2 * _local5) - (_local3 * _local4)); _local6 = (1 / _local6); _arg1.col1.x = (_local6 * _local5); _arg1.col2.x = (-(_local6) * _local3); _arg1.col1.y = (-(_local6) * _local4); _arg1.col2.y = (_local6 * _local2); return (_arg1); } public function Solve(_arg1:b2Vec2, _arg2:Number, _arg3:Number):b2Vec2{ var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; _local4 = col1.x; _local5 = col2.x; _local6 = col1.y; _local7 = col2.y; _local8 = ((_local4 * _local7) - (_local5 * _local6)); _local8 = (1 / _local8); _arg1.x = (_local8 * ((_local7 * _arg2) - (_local5 * _arg3))); _arg1.y = (_local8 * ((_local4 * _arg3) - (_local6 * _arg2))); return (_arg1); } } }//package Engine.Common.Math
Section 28
//b2Math (Engine.Common.Math.b2Math) package Engine.Common.Math { public class b2Math { public static function b2CrossVF(_arg1:b2Vec2, _arg2:Number):b2Vec2{ var _local3:b2Vec2; _local3 = new b2Vec2((_arg2 * _arg1.y), (-(_arg2) * _arg1.x)); return (_local3); } public static function AddVV(_arg1:b2Vec2, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2; _local3 = new b2Vec2((_arg1.x + _arg2.x), (_arg1.y + _arg2.y)); return (_local3); } public static function b2IsValid(_arg1:Number){ return (isFinite(_arg1)); } public static function b2Swap(_arg1:Array, _arg2:Array){ var _local3:*; _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; _local2 = new b2Mat22(0, b2AbsV(_arg1.col1), b2AbsV(_arg1.col2)); return (_local2); } public static function SubtractVV(_arg1:b2Vec2, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2; _local3 = new b2Vec2((_arg1.x - _arg2.x), (_arg1.y - _arg2.y)); return (_local3); } public static function 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; _local2 = new b2Vec2(b2Abs(_arg1.x), b2Abs(_arg1.y)); return (_local2); } public static function b2MinV(_arg1:b2Vec2, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2; _local3 = new b2Vec2(b2Min(_arg1.x, _arg2.x), b2Min(_arg1.y, _arg2.y)); return (_local3); } public static function b2Dot(_arg1:b2Vec2, _arg2:b2Vec2):Number{ return (((_arg1.x * _arg2.x) + (_arg1.y * _arg2.y))); } public static function b2CrossFV(_arg1:Number, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2; _local3 = new b2Vec2((-(_arg1) * _arg2.y), (_arg1 * _arg2.x)); return (_local3); } public static function AddMM(_arg1:b2Mat22, _arg2:b2Mat22):b2Mat22{ var _local3:b2Mat22; _local3 = new b2Mat22(0, AddVV(_arg1.col1, _arg2.col1), AddVV(_arg1.col2, _arg2.col2)); return (_local3); } public static function b2MulTMM(_arg1:b2Mat22, _arg2:b2Mat22):b2Mat22{ var _local3:b2Vec2; var _local4:b2Vec2; var _local5:b2Mat22; _local3 = new b2Vec2(b2Dot(_arg1.col1, _arg2.col1), b2Dot(_arg1.col2, _arg2.col1)); _local4 = new b2Vec2(b2Dot(_arg1.col1, _arg2.col2), b2Dot(_arg1.col2, _arg2.col2)); _local5 = new b2Mat22(0, _local3, _local4); return (_local5); } public static function b2MaxV(_arg1:b2Vec2, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2; _local3 = new b2Vec2(b2Max(_arg1.x, _arg2.x), b2Max(_arg1.y, _arg2.y)); return (_local3); } public static function b2IsPowerOfTwo(_arg1:uint):Boolean{ var _local2:Boolean; _local2 = (((_arg1 > 0)) && (((_arg1 & (_arg1 - 1)) == 0))); return (_local2); } public static function b2ClampV(_arg1:b2Vec2, _arg2:b2Vec2, _arg3:b2Vec2):b2Vec2{ return (b2MaxV(_arg2, b2MinV(_arg1, _arg3))); } public static function MulFV(_arg1:Number, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2; _local3 = new b2Vec2((_arg1 * _arg2.x), (_arg1 * _arg2.y)); return (_local3); } public static function b2MulTMV(_arg1:b2Mat22, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2; _local3 = new b2Vec2(b2Dot(_arg2, _arg1.col1), b2Dot(_arg2, _arg1.col2)); return (_local3); } public static function b2Min(_arg1:Number, _arg2:Number):Number{ return (((_arg1 < _arg2)) ? _arg1 : _arg2); } public static function b2Random():Number{ return (((Math.random() * 2) - 1)); } public static function b2MulMM(_arg1:b2Mat22, _arg2:b2Mat22):b2Mat22{ var _local3:b2Mat22; _local3 = new b2Mat22(0, b2MulMV(_arg1, _arg2.col1), b2MulMV(_arg1, _arg2.col2)); return (_local3); } public static function b2NextPowerOfTwo(_arg1:uint):uint{ _arg1 = (_arg1 | ((_arg1 >> 1) & 2147483647)); _arg1 = (_arg1 | ((_arg1 >> 2) & 1073741823)); _arg1 = (_arg1 | ((_arg1 >> 4) & 268435455)); _arg1 = (_arg1 | ((_arg1 >> 8) & 0xFFFFFF)); _arg1 = (_arg1 | ((_arg1 >> 16) & 0xFFFF)); return ((_arg1 + 1)); } public static function b2Max(_arg1:Number, _arg2:Number):Number{ return (((_arg1 > _arg2)) ? _arg1 : _arg2); } public static function b2MulMV(_arg1:b2Mat22, _arg2:b2Vec2):b2Vec2{ var _local3:b2Vec2; _local3 = new b2Vec2(((_arg1.col1.x * _arg2.x) + (_arg1.col2.x * _arg2.y)), ((_arg1.col1.y * _arg2.x) + (_arg1.col2.y * _arg2.y))); return (_local3); } } }//package Engine.Common.Math
Section 29
//b2Vec2 (Engine.Common.Math.b2Vec2) package Engine.Common.Math { public class b2Vec2 { public var x:Number; public var y:Number; public function b2Vec2(_arg1:Number=0, _arg2:Number=0){ x = _arg1; y = _arg2; } 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 Add(_arg1:b2Vec2){ x = (x + _arg1.x); y = (y + _arg1.y); } public function SetZero(){ x = 0; y = 0; } public function CrossVF(_arg1:Number){ var _local2:Number; _local2 = 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 Abs(){ x = Math.abs(x); y = Math.abs(y); } public function Copy():b2Vec2{ return (new b2Vec2(x, y)); } public function MulTM(_arg1:b2Mat22){ var _local2:Number; _local2 = b2Math.b2Dot(this, _arg1.col1); y = b2Math.b2Dot(this, _arg1.col2); x = _local2; } public function IsValid():Boolean{ return (((b2Math.b2IsValid(x)) && (b2Math.b2IsValid(y)))); } public function MinV(_arg1:b2Vec2){ x = ((x < _arg1.x)) ? x : _arg1.x; y = ((y < _arg1.y)) ? y : _arg1.y; } public function MulM(_arg1:b2Mat22){ var _local2:Number; _local2 = x; x = ((_arg1.col1.x * _local2) + (_arg1.col2.x * y)); y = ((_arg1.col1.y * _local2) + (_arg1.col2.y * y)); } public function Normalize():Number{ var _local1:Number; var _local2:Number; _local1 = Length(); if (_local1 < Number.MIN_VALUE){ return (0); }; _local2 = (1 / _local1); x = (x * _local2); y = (y * _local2); return (_local1); } public function Subtract(_arg1:b2Vec2){ x = (x - _arg1.x); y = (y - _arg1.y); } public function CrossFV(_arg1:Number){ var _local2:Number; _local2 = x; x = (-(_arg1) * y); y = (_arg1 * _local2); } public static function Make(_arg1:Number, _arg2:Number):b2Vec2{ return (new b2Vec2(_arg1, _arg2)); } } }//package Engine.Common.Math
Section 30
//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 31
//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 GetManifolds():Array{ return (m_manifold); } 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; }; } 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 32
//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_prev:b2Contact; public var m_next: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 GetNext():b2Contact{ return (m_next); } public function GetShape2():b2Shape{ return (m_shape2); } public function GetManifoldCount():int{ return (m_manifoldCount); } public function GetManifolds():Array{ return (null); } public function Evaluate(){ } public static function InitializeRegisters(){ var _local1:int; var _local2:int; s_registers = new Array(b2Shape.e_shapeTypeCount); _local1 = 0; while (_local1 < b2Shape.e_shapeTypeCount) { s_registers[_local1] = new Array(b2Shape.e_shapeTypeCount); _local2 = 0; while (_local2 < b2Shape.e_shapeTypeCount) { s_registers[_local1][_local2] = new b2ContactRegister(); _local2++; }; _local1++; }; AddType(b2CircleContact.Create, b2CircleContact.Destroy, b2Shape.e_circleShape, b2Shape.e_circleShape); AddType(b2PolyAndCircleContact.Create, b2PolyAndCircleContact.Destroy, b2Shape.e_polyShape, b2Shape.e_circleShape); AddType(b2PolyContact.Create, b2PolyContact.Destroy, b2Shape.e_polyShape, b2Shape.e_polyShape); } public static function Destroy(_arg1:b2Contact, _arg2){ var _local3:int; var _local4:int; var _local5:*; if (_arg1.GetManifoldCount() > 0){ _arg1.m_shape1.m_body.WakeUp(); _arg1.m_shape2.m_body.WakeUp(); }; _local3 = _arg1.m_shape1.m_type; _local4 = _arg1.m_shape2.m_type; _local5 = s_registers[_local3][_local4].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 _local4:int; var _local5:int; var _local6:*; var _local7:b2Contact; var _local8:int; var _local9:b2Manifold; if (s_initialized == false){ InitializeRegisters(); s_initialized = true; }; _local4 = _arg1.m_type; _local5 = _arg2.m_type; _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 33
//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 restitution:Number; public var body1:b2Body; public var manifold:b2Manifold; public var normal:b2Vec2; public var body2:b2Body; public var friction:Number; public var pointCount:int; public function b2ContactConstraint(){ var _local1:int; normal = new b2Vec2(); super(); points = new Array(b2Settings.b2_maxManifoldPoints); _local1 = 0; while (_local1 < b2Settings.b2_maxManifoldPoints) { points[_local1] = new b2ContactConstraintPoint(); _local1++; }; } } }//package Engine.Dynamics.Contacts
Section 34
//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 35
//b2ContactNode (Engine.Dynamics.Contacts.b2ContactNode) package Engine.Dynamics.Contacts { import Engine.Dynamics.*; public class b2ContactNode { public var next:b2ContactNode; public var other:b2Body; public var contact:b2Contact; public var prev:b2ContactNode; } }//package Engine.Dynamics.Contacts
Section 36
//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 37
//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 _local7:int; 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++; }; _local7 = 0; _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 SolvePositionConstraints(_arg1:Number):Boolean{ var _local2:Number; var _local3:b2Mat22; var _local4:b2Vec2; var _local5:int; var _local6:b2ContactConstraint; var _local7:b2Body; var _local8:b2Body; var _local9:b2Vec2; var _local10:Number; var _local11:b2Vec2; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19: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; _local2 = 0; _local5 = 0; 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 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 _local15:int; 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; _local15 = 0; 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 _local4:int; 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; _local4 = 0; 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 PostSolve(){ var _local1:int; var _local2:b2ContactConstraint; var _local3:b2Manifold; var _local4:int; var _local5:b2ContactPoint; var _local6:b2ContactConstraintPoint; _local1 = 0; while (_local1 < m_constraintCount) { _local2 = m_constraints[_local1]; _local3 = _local2.manifold; _local4 = 0; while (_local4 < _local2.pointCount) { _local5 = _local3.points[_local4]; _local6 = _local2.points[_local4]; _local5.normalImpulse = _local6.normalImpulse; _local5.tangentImpulse = _local6.tangentImpulse; _local4++; }; _local1++; }; } } }//package Engine.Dynamics.Contacts
Section 38
//b2NullContact (Engine.Dynamics.Contacts.b2NullContact) package Engine.Dynamics.Contacts { public class b2NullContact extends b2Contact { override public function GetManifolds():Array{ return (null); } override public function Evaluate(){ } } }//package Engine.Dynamics.Contacts
Section 39
//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 GetManifolds():Array{ return (m_manifold); } 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; }; } 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 40
//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 GetManifolds():Array{ return (m_manifold); } override public function Evaluate(){ var _local1:b2Manifold; var _local2:Array; var _local3:int; 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; _local1 = m_manifold[0]; _local2 = m0.points; _local3 = 0; 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; }; } 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 41
//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_localAnchor2:b2Vec2; public var m_mass:Number; public var m_localAnchor1:b2Vec2; public var m_u:b2Vec2; public var m_impulse:Number; public var m_length:Number; public function b2DistanceJoint(_arg1:b2DistanceJointDef){ var _local2:b2Mat22; var _local3:Number; var _local4:Number; m_localAnchor1 = new b2Vec2(); m_localAnchor2 = new b2Vec2(); m_u = new b2Vec2(); super(_arg1); _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 SolveVelocityConstraints(_arg1:b2StepInfo){ var _local2:b2Mat22; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; _local2 = m_body1.m_R; _local3 = ((_local2.col1.x * m_localAnchor1.x) + (_local2.col2.x * m_localAnchor1.y)); _local4 = ((_local2.col1.y * m_localAnchor1.x) + (_local2.col2.y * m_localAnchor1.y)); _local2 = m_body2.m_R; _local5 = ((_local2.col1.x * m_localAnchor2.x) + (_local2.col2.x * m_localAnchor2.y)); _local6 = ((_local2.col1.y * m_localAnchor2.x) + (_local2.col2.y * m_localAnchor2.y)); _local7 = (m_body1.m_linearVelocity.x + (-(m_body1.m_angularVelocity) * _local4)); _local8 = (m_body1.m_linearVelocity.y + (m_body1.m_angularVelocity * _local3)); _local9 = (m_body2.m_linearVelocity.x + (-(m_body2.m_angularVelocity) * _local6)); _local10 = (m_body2.m_linearVelocity.y + (m_body2.m_angularVelocity * _local5)); _local11 = ((m_u.x * (_local9 - _local7)) + (m_u.y * (_local10 - _local8))); _local12 = (-(m_mass) * _local11); m_impulse = (m_impulse + _local12); _local13 = (_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)))); } 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 PrepareVelocitySolver(){ var _local1:b2Mat22; var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8: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); _local6 = 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(); }; _local7 = ((_local2 * m_u.y) - (_local3 * m_u.x)); _local8 = ((_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 GetReactionTorque(_arg1:Number):Number{ return (0); } override public function GetReactionForce(_arg1:Number):b2Vec2{ var _local2:b2Vec2; _local2 = new b2Vec2(); _local2.SetV(m_u); _local2.Multiply((m_impulse * _arg1)); return (_local2); } override public function SolvePositionConstraints():Boolean{ var _local1:b2Mat22; var _local2:Number; 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; _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)); _local6 = (((m_body2.m_position.x + _local4) - m_body1.m_position.x) - _local2); _local7 = (((m_body2.m_position.y + _local5) - m_body1.m_position.y) - _local3); _local8 = Math.sqrt(((_local6 * _local6) + (_local7 * _local7))); _local6 = (_local6 / _local8); _local7 = (_local7 / _local8); _local9 = (_local8 - m_length); _local9 = b2Math.b2Clamp(_local9, -(b2Settings.b2_maxLinearCorrection), b2Settings.b2_maxLinearCorrection); _local10 = (-(m_mass) * _local9); m_u.Set(_local6, _local7); _local11 = (_local10 * m_u.x); _local12 = (_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)); } } }//package Engine.Dynamics.Joints
Section 42
//b2DistanceJointDef (Engine.Dynamics.Joints.b2DistanceJointDef) package Engine.Dynamics.Joints { import Engine.Common.Math.*; public class b2DistanceJointDef extends b2JointDef { public var anchorPoint2:b2Vec2; public var anchorPoint1:b2Vec2; public function b2DistanceJointDef(){ anchorPoint1 = new b2Vec2(); anchorPoint2 = new b2Vec2(); super(); type = b2Joint.e_distanceJoint; } } }//package Engine.Dynamics.Joints
Section 43
//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_impulse:Number; public var m_mass:Number; public var m_prismatic1:b2PrismaticJoint; public var m_prismatic2:b2PrismaticJoint; public var m_ground1:b2Body; public var m_ground2:b2Body; public var m_constant:Number; public var m_revolute1:b2RevoluteJoint; public var m_revolute2:b2RevoluteJoint; public var m_groundAnchor1:b2Vec2; public var m_groundAnchor2:b2Vec2; public var m_localAnchor1:b2Vec2; public var m_localAnchor2:b2Vec2; public var m_ratio:Number; public var m_J:b2Jacobian; public function b2GearJoint(_arg1:b2GearJointDef){ var _local2: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; _local1 = 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; _local1 = 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: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 _local12:Number; _local1 = m_ground1; _local2 = m_ground2; _local3 = m_body1; _local4 = m_body2; _local12 = 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 GetReactionForce(_arg1:Number):b2Vec2{ return (new b2Vec2()); } override public function SolvePositionConstraints():Boolean{ var _local1:Number; var _local2:b2Body; var _local3:b2Body; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; _local1 = 0; _local2 = m_body1; _local3 = m_body2; if (m_revolute1){ _local4 = m_revolute1.GetJointAngle(); } else { _local4 = m_prismatic1.GetJointTranslation(); }; if (m_revolute2){ _local5 = m_revolute2.GetJointAngle(); } else { _local5 = m_prismatic2.GetJointTranslation(); }; _local6 = (m_constant - (_local4 + (m_ratio * _local5))); _local7 = (-(m_mass) * _local6); _local2.m_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)); } override public function GetReactionTorque(_arg1:Number):Number{ return (0); } public function GetRatio():Number{ return (m_ratio); } override public function SolveVelocityConstraints(_arg1:b2StepInfo){ var _local2:b2Body; var _local3:b2Body; var _local4:Number; var _local5:Number; _local2 = m_body1; _local3 = m_body2; _local4 = m_J.Compute(_local2.m_linearVelocity, _local2.m_angularVelocity, _local3.m_linearVelocity, _local3.m_angularVelocity); _local5 = (-(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 44
//b2GearJointDef (Engine.Dynamics.Joints.b2GearJointDef) package Engine.Dynamics.Joints { public class b2GearJointDef extends b2JointDef { public var joint2:b2Joint; public var joint1:b2Joint; public var ratio:Number; public function b2GearJointDef(){ type = b2Joint.e_gearJoint; joint1 = null; joint2 = null; ratio = 1; } } }//package Engine.Dynamics.Joints
Section 45
//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 angular2:Number; public var angular1:Number; public function b2Jacobian(){ linear1 = new b2Vec2(); linear2 = new b2Vec2(); super(); } public function Set(_arg1:b2Vec2, _arg2:Number, _arg3:b2Vec2, _arg4:Number){ 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 46
//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 GetBody2():b2Body{ return (m_body2); } 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 SolveVelocityConstraints(_arg1:b2StepInfo){ } public static function Destroy(_arg1:b2Joint, _arg2){ } public static function Create(_arg1:b2JointDef, _arg2):b2Joint{ var _local3:b2Joint; _local3 = null; switch (_arg1.type){ case e_distanceJoint: _local3 = new b2DistanceJoint((_arg1 as b2DistanceJointDef)); break; case e_mouseJoint: _local3 = new b2MouseJoint((_arg1 as b2MouseJointDef)); break; case e_prismaticJoint: _local3 = new b2PrismaticJoint((_arg1 as b2PrismaticJointDef)); break; case e_revoluteJoint: _local3 = new b2RevoluteJoint((_arg1 as b2RevoluteJointDef)); break; case e_pulleyJoint: _local3 = new b2PulleyJoint((_arg1 as b2PulleyJointDef)); break; case e_gearJoint: _local3 = new b2GearJoint((_arg1 as b2GearJointDef)); break; default: break; }; return (_local3); } } }//package Engine.Dynamics.Joints
Section 47
//b2JointDef (Engine.Dynamics.Joints.b2JointDef) package Engine.Dynamics.Joints { import Engine.Dynamics.*; public class b2JointDef { public var collideConnected:Boolean; public var body1:b2Body; public var body2:b2Body; public var userData; public var type:int; public function b2JointDef(){ type = b2Joint.e_unknownJoint; userData = null; body1 = null; body2 = null; collideConnected = false; } } }//package Engine.Dynamics.Joints
Section 48
//b2JointNode (Engine.Dynamics.Joints.b2JointNode) package Engine.Dynamics.Joints { import Engine.Dynamics.*; public class b2JointNode { public var joint:b2Joint; public var other:b2Body; public var next:b2JointNode; public var prev:b2JointNode; } }//package Engine.Dynamics.Joints
Section 49
//b2MouseJoint (Engine.Dynamics.Joints.b2MouseJoint) package Engine.Dynamics.Joints { import Engine.Common.Math.*; import Engine.Dynamics.*; import Engine.Common.*; public class b2MouseJoint extends b2Joint { public var m_beta:Number; public var m_target:b2Vec2; public var m_impulse:b2Vec2; public var m_ptpMass:b2Mat22; public var m_localAnchor:b2Vec2; private var K1:b2Mat22; private var K2:b2Mat22; private var K:b2Mat22; public var m_gamma:Number; public var m_C:b2Vec2; public var m_maxForce:Number; public function b2MouseJoint(_arg1:b2MouseJointDef){ var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7: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); _local2 = (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(); _local4 = m_body2.m_mass; _local5 = ((2 * b2Settings.b2_pi) * _arg1.frequencyHz); _local6 = (((2 * _local4) * _arg1.dampingRatio) * _local5); _local7 = ((_local4 * _local5) * _local5); m_gamma = (1 / (_local6 + (_arg1.timeStep * _local7))); m_beta = ((_arg1.timeStep * _local7) / (_local6 + (_arg1.timeStep * _local7))); } override public function GetAnchor1():b2Vec2{ return (m_target); } override public function GetAnchor2():b2Vec2{ var _local1:b2Vec2; _local1 = b2Math.b2MulMV(m_body2.m_R, m_localAnchor); _local1.Add(m_body2.m_position); return (_local1); } override public function PrepareVelocitySolver(){ var _local1:b2Body; var _local2:b2Mat22; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8: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); _local7 = m_impulse.x; _local8 = 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 GetReactionForce(_arg1:Number):b2Vec2{ var _local2:b2Vec2; _local2 = new b2Vec2(); _local2.SetV(m_impulse); _local2.Multiply(_arg1); return (_local2); } override public function SolvePositionConstraints():Boolean{ return (true); } override public function GetReactionTorque(_arg1:Number):Number{ return (0); } public function SetTarget(_arg1:b2Vec2){ m_body2.WakeUp(); m_target = _arg1; } override public function SolveVelocityConstraints(_arg1:b2StepInfo){ var _local2:b2Body; var _local3:b2Mat22; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; _local2 = m_body2; _local3 = _local2.m_R; _local4 = ((_local3.col1.x * m_localAnchor.x) + (_local3.col2.x * m_localAnchor.y)); _local5 = ((_local3.col1.y * m_localAnchor.x) + (_local3.col2.y * m_localAnchor.y)); _local6 = (_local2.m_linearVelocity.x + (-(_local2.m_angularVelocity) * _local5)); _local7 = (_local2.m_linearVelocity.y + (_local2.m_angularVelocity * _local4)); _local3 = m_ptpMass; _local8 = ((_local6 + ((m_beta * _arg1.inv_dt) * m_C.x)) + (m_gamma * m_impulse.x)); _local9 = ((_local7 + ((m_beta * _arg1.inv_dt) * m_C.y)) + (m_gamma * m_impulse.y)); _local10 = -(((_local3.col1.x * _local8) + (_local3.col2.x * _local9))); _local11 = -(((_local3.col1.y * _local8) + (_local3.col2.y * _local9))); _local12 = m_impulse.x; _local13 = m_impulse.y; m_impulse.x = (m_impulse.x + _local10); m_impulse.y = (m_impulse.y + _local11); _local14 = m_impulse.Length(); if (_local14 > (_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 50
//b2MouseJointDef (Engine.Dynamics.Joints.b2MouseJointDef) package Engine.Dynamics.Joints { import Engine.Common.Math.*; public class b2MouseJointDef extends b2JointDef { public var frequencyHz:Number; public var dampingRatio:Number; public var maxForce:Number; public var target:b2Vec2; public var timeStep:Number; public function b2MouseJointDef(){ target = new b2Vec2(); super(); type = b2Joint.e_mouseJoint; maxForce = 0; frequencyHz = 5; dampingRatio = 0.7; timeStep = (1 / 60); } } }//package Engine.Dynamics.Joints
Section 51
//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_lowerTranslation:Number; public var m_localXAxis1:b2Vec2; public var m_enableLimit:Boolean; public var m_maxMotorForce:Number; public var m_angularMass:Number; public var m_localYAxis1:b2Vec2; public var m_linearImpulse:Number; public var m_localAnchor1:b2Vec2; public var m_localAnchor2:b2Vec2; public var m_motorMass:Number; public var m_limitState:int; public var m_linearMass:Number; public var m_upperTranslation:Number; public var m_angularImpulse:Number; public var m_motorImpulse:Number; public var m_motorJacobian:b2Jacobian; public var m_limitImpulse:Number; public var m_motorSpeed:Number; public var m_enableMotor:Boolean; public var m_limitPositionImpulse:Number; 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; var _local2:b2Vec2; _local1 = m_body1; _local2 = 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; var _local2:b2Vec2; _local1 = m_body2; _local2 = new b2Vec2(); _local2.SetV(m_localAnchor2); _local2.MulM(_local1.m_R); _local2.Add(_local1.m_position); return (_local2); } override public function PrepareVelocitySolver(){ var _local1:b2Body; var _local2:b2Body; var _local3:b2Mat22; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:Number; var _local21:Number; var _local22:Number; var _local23:Number; var _local24:Number; var _local25:Number; var _local26:Number; _local1 = m_body1; _local2 = m_body2; _local3 = _local1.m_R; _local4 = ((_local3.col1.x * m_localAnchor1.x) + (_local3.col2.x * m_localAnchor1.y)); _local5 = ((_local3.col1.y * m_localAnchor1.x) + (_local3.col2.y * m_localAnchor1.y)); _local3 = _local2.m_R; _local6 = ((_local3.col1.x * m_localAnchor2.x) + (_local3.col2.x * m_localAnchor2.y)); _local7 = ((_local3.col1.y * m_localAnchor2.x) + (_local3.col2.y * m_localAnchor2.y)); _local8 = _local1.m_invMass; _local9 = _local2.m_invMass; _local10 = _local1.m_invI; _local11 = _local2.m_invI; _local3 = _local1.m_R; _local12 = ((_local3.col1.x * m_localYAxis1.x) + (_local3.col2.x * m_localYAxis1.y)); _local13 = ((_local3.col1.y * m_localYAxis1.x) + (_local3.col2.y * m_localYAxis1.y)); _local14 = ((_local2.m_position.x + _local6) - _local1.m_position.x); _local15 = ((_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 _local1:b2Body; var _local2:b2Body; var _local3:b2Mat22; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; _local1 = m_body1; _local2 = m_body2; _local3 = _local1.m_R; _local4 = ((_local3.col1.x * m_localAnchor1.x) + (_local3.col2.x * m_localAnchor1.y)); _local5 = ((_local3.col1.y * m_localAnchor1.x) + (_local3.col2.y * m_localAnchor1.y)); _local3 = _local2.m_R; _local6 = ((_local3.col1.x * m_localAnchor2.x) + (_local3.col2.x * m_localAnchor2.y)); _local7 = ((_local3.col1.y * m_localAnchor2.x) + (_local3.col2.y * m_localAnchor2.y)); _local8 = (_local1.m_position.x + _local4); _local9 = (_local1.m_position.y + _local5); _local10 = (_local2.m_position.x + _local6); _local11 = (_local2.m_position.y + _local7); _local12 = (_local10 - _local8); _local13 = (_local11 - _local9); _local3 = _local1.m_R; _local14 = ((_local3.col1.x * m_localXAxis1.x) + (_local3.col2.x * m_localXAxis1.y)); _local15 = ((_local3.col1.y * m_localXAxis1.x) + (_local3.col2.y * m_localXAxis1.y)); _local16 = ((_local14 * _local12) + (_local15 * _local13)); return (_local16); } override public function GetReactionForce(_arg1:Number):b2Vec2{ var _local2:Number; var _local3:b2Mat22; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; _local2 = (_arg1 * m_limitImpulse); _local3 = m_body1.m_R; _local4 = (_local2 * ((_local3.col1.x * m_localXAxis1.x) + (_local3.col2.x * m_localXAxis1.y))); _local5 = (_local2 * ((_local3.col1.y * m_localXAxis1.x) + (_local3.col2.y * m_localXAxis1.y))); _local6 = (_local2 * ((_local3.col1.x * m_localYAxis1.x) + (_local3.col2.x * m_localYAxis1.y))); _local7 = (_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 _local3:b2Body; var _local4:b2Body; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:b2Mat22; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:Number; var _local21:Number; var _local22:Number; var _local23:Number; var _local24:Number; var _local25:Number; var _local26:Number; var _local27:Number; var _local28:Number; var _local29:Number; var _local30:Number; var _local31:Number; _local3 = m_body1; _local4 = m_body2; _local5 = _local3.m_invMass; _local6 = _local4.m_invMass; _local7 = _local3.m_invI; _local8 = _local4.m_invI; _local9 = _local3.m_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; _local20 = ((_local9.col1.x * m_localYAxis1.x) + (_local9.col2.x * m_localYAxis1.y)); _local21 = ((_local9.col1.y * m_localYAxis1.x) + (_local9.col2.y * m_localYAxis1.y)); _local22 = ((_local20 * _local18) + (_local21 * _local19)); _local22 = b2Math.b2Clamp(_local22, -(b2Settings.b2_maxLinearCorrection), b2Settings.b2_maxLinearCorrection); _local23 = (-(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)); _local24 = b2Math.b2Abs(_local22); _local25 = ((_local4.m_rotation - _local3.m_rotation) - m_initialAngle); _local25 = b2Math.b2Clamp(_local25, -(b2Settings.b2_maxAngularCorrection), b2Settings.b2_maxAngularCorrection); _local26 = (-(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); _local27 = 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 GetJointSpeed():Number{ var _local1:b2Body; var _local2:b2Body; var _local3:b2Mat22; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:b2Vec2; var _local17:b2Vec2; var _local18:Number; var _local19:Number; var _local20:Number; _local1 = m_body1; _local2 = m_body2; _local3 = _local1.m_R; _local4 = ((_local3.col1.x * m_localAnchor1.x) + (_local3.col2.x * m_localAnchor1.y)); _local5 = ((_local3.col1.y * m_localAnchor1.x) + (_local3.col2.y * m_localAnchor1.y)); _local3 = _local2.m_R; _local6 = ((_local3.col1.x * m_localAnchor2.x) + (_local3.col2.x * m_localAnchor2.y)); _local7 = ((_local3.col1.y * m_localAnchor2.x) + (_local3.col2.y * m_localAnchor2.y)); _local8 = (_local1.m_position.x + _local4); _local9 = (_local1.m_position.y + _local5); _local10 = (_local2.m_position.x + _local6); _local11 = (_local2.m_position.y + _local7); _local12 = (_local10 - _local8); _local13 = (_local11 - _local9); _local3 = _local1.m_R; _local14 = ((_local3.col1.x * m_localXAxis1.x) + (_local3.col2.x * m_localXAxis1.y)); _local15 = ((_local3.col1.y * m_localXAxis1.x) + (_local3.col2.y * m_localXAxis1.y)); _local16 = _local1.m_linearVelocity; _local17 = _local2.m_linearVelocity; _local18 = _local1.m_angularVelocity; _local19 = _local2.m_angularVelocity; _local20 = (((_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 SetMotorSpeed(_arg1:Number){ m_motorSpeed = _arg1; } 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 _local2:b2Body; var _local3:b2Body; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:*; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; _local2 = m_body1; _local3 = m_body2; _local4 = _local2.m_invMass; _local5 = _local3.m_invMass; _local6 = _local2.m_invI; _local7 = _local3.m_invI; _local9 = m_linearJacobian.Compute(_local2.m_linearVelocity, _local2.m_angularVelocity, _local3.m_linearVelocity, _local3.m_angularVelocity); _local10 = (-(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)); _local11 = (_local3.m_angularVelocity - _local2.m_angularVelocity); _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 52
//b2PrismaticJointDef (Engine.Dynamics.Joints.b2PrismaticJointDef) package Engine.Dynamics.Joints { import Engine.Common.Math.*; public class b2PrismaticJointDef extends b2JointDef { public var motorSpeed:Number; public var anchorPoint:b2Vec2; public var axis:b2Vec2; public var upperTranslation:Number; public var lowerTranslation:Number; public var enableMotor:Boolean; public var motorForce:Number; public var enableLimit:Boolean; 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 53
//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_ground:b2Body; public var m_maxLength2:Number; public var m_limitState1:int; public var m_maxLength1:Number; public var m_pulleyImpulse:Number; public var m_limitPositionImpulse1:Number; public var m_constant:Number; public var m_ratio:Number; public var m_groundAnchor1:b2Vec2; public var m_groundAnchor2:b2Vec2; public var m_limitPositionImpulse2:Number; public var m_localAnchor1:b2Vec2; public var m_localAnchor2:b2Vec2; public var m_limitState2:int; public var m_limitMass2:Number; public var m_limitMass1:Number; public var m_limitImpulse2:Number; public var m_u1:b2Vec2; public var m_u2:b2Vec2; public var m_limitImpulse1:Number; public var m_pulleyMass:Number; public static var b2_minPulleyLength:Number = 1; public function b2PulleyJoint(_arg1:b2PulleyJointDef){ var _local2:b2Mat22; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8: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); _local5 = Math.sqrt(((_local3 * _local3) + (_local4 * _local4))); _local3 = (_arg1.groundPoint2.x - _arg1.anchorPoint2.x); _local4 = (_arg1.groundPoint2.y - _arg1.anchorPoint2.y); _local6 = Math.sqrt(((_local3 * _local3) + (_local4 * _local4))); _local7 = b2Math.b2Max((0.5 * b2_minPulleyLength), _local5); _local8 = 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; var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; _local1 = m_body1.m_R; _local2 = (m_body1.m_position.x + ((_local1.col1.x * m_localAnchor1.x) + (_local1.col2.x * m_localAnchor1.y))); _local3 = (m_body1.m_position.y + ((_local1.col1.y * m_localAnchor1.x) + (_local1.col2.y * m_localAnchor1.y))); _local4 = (_local2 - (m_ground.m_position.x + m_groundAnchor1.x)); _local5 = (_local3 - (m_ground.m_position.y + m_groundAnchor1.y)); return (Math.sqrt(((_local4 * _local4) + (_local5 * _local5)))); } override public function GetAnchor1():b2Vec2{ var _local1:b2Mat22; _local1 = 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; _local1 = 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 _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:Number; var _local21:Number; var _local22:Number; var _local23:Number; _local1 = m_body1; _local2 = m_body2; _local3 = _local1.m_R; _local4 = ((_local3.col1.x * m_localAnchor1.x) + (_local3.col2.x * m_localAnchor1.y)); _local5 = ((_local3.col1.y * m_localAnchor1.x) + (_local3.col2.y * m_localAnchor1.y)); _local3 = _local2.m_R; _local6 = ((_local3.col1.x * m_localAnchor2.x) + (_local3.col2.x * m_localAnchor2.y)); _local7 = ((_local3.col1.y * m_localAnchor2.x) + (_local3.col2.y * m_localAnchor2.y)); _local8 = (_local1.m_position.x + _local4); _local9 = (_local1.m_position.y + _local5); _local10 = (_local2.m_position.x + _local6); _local11 = (_local2.m_position.y + _local7); _local12 = (m_ground.m_position.x + m_groundAnchor1.x); _local13 = (m_ground.m_position.y + m_groundAnchor1.y); _local14 = (m_ground.m_position.x + m_groundAnchor2.x); _local15 = (m_ground.m_position.y + m_groundAnchor2.y); m_u1.Set((_local8 - _local12), (_local9 - _local13)); m_u2.Set((_local10 - _local14), (_local11 - _local15)); _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(); }; 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; }; _local18 = ((_local4 * m_u1.y) - (_local5 * m_u1.x)); _local19 = ((_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); _local20 = ((-(m_pulleyImpulse) - m_limitImpulse1) * m_u1.x); _local21 = ((-(m_pulleyImpulse) - m_limitImpulse1) * m_u1.y); _local22 = (((-(m_ratio) * m_pulleyImpulse) - m_limitImpulse2) * m_u2.x); _local23 = (((-(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 _local1:b2Body; var _local2:b2Body; var _local3:b2Mat22; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:Number; var _local21:Number; _local1 = m_body1; _local2 = m_body2; _local4 = (m_ground.m_position.x + m_groundAnchor1.x); _local5 = (m_ground.m_position.y + m_groundAnchor1.y); _local6 = (m_ground.m_position.x + m_groundAnchor2.x); _local7 = (m_ground.m_position.y + m_groundAnchor2.y); _local21 = 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 GetGroundPoint1():b2Vec2{ return (new b2Vec2((m_ground.m_position.x + m_groundAnchor1.x), (m_ground.m_position.y + m_groundAnchor1.y))); } 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 GetRatio():Number{ return (m_ratio); } public function GetLength2():Number{ var _local1:b2Mat22; var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; _local1 = m_body2.m_R; _local2 = (m_body2.m_position.x + ((_local1.col1.x * m_localAnchor2.x) + (_local1.col2.x * m_localAnchor2.y))); _local3 = (m_body2.m_position.y + ((_local1.col1.y * m_localAnchor2.x) + (_local1.col2.y * m_localAnchor2.y))); _local4 = (_local2 - (m_ground.m_position.x + m_groundAnchor2.x)); _local5 = (_local3 - (m_ground.m_position.y + m_groundAnchor2.y)); return (Math.sqrt(((_local4 * _local4) + (_local5 * _local5)))); } override public function SolveVelocityConstraints(_arg1:b2StepInfo){ var _local2:b2Body; var _local3:b2Body; var _local4:b2Mat22; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; _local2 = m_body1; _local3 = m_body2; _local4 = _local2.m_R; _local5 = ((_local4.col1.x * m_localAnchor1.x) + (_local4.col2.x * m_localAnchor1.y)); _local6 = ((_local4.col1.y * m_localAnchor1.x) + (_local4.col2.y * m_localAnchor1.y)); _local4 = _local3.m_R; _local7 = ((_local4.col1.x * m_localAnchor2.x) + (_local4.col2.x * m_localAnchor2.y)); _local8 = ((_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)))); }; } } }//package Engine.Dynamics.Joints
Section 54
//b2PulleyJointDef (Engine.Dynamics.Joints.b2PulleyJointDef) package Engine.Dynamics.Joints { import Engine.Common.Math.*; public class b2PulleyJointDef extends b2JointDef { public var groundPoint1:b2Vec2; public var groundPoint2:b2Vec2; public var ratio:Number; public var maxLength1: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 55
//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_intialAngle:Number; 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 K3:b2Mat22; private var K:b2Mat22; public var m_limitImpulse:Number; public var m_motorImpulse:Number; public var m_enableMotor:Boolean; public var m_lowerAngle:Number; public var m_limitPositionImpulse:Number; public var m_maxMotorTorque:Number; public var m_upperAngle:Number; public var m_motorSpeed:Number; public var m_ptpImpulse:b2Vec2; 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; _local1 = 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; _local1 = 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 _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; _local1 = m_body1; _local2 = m_body2; _local3 = _local1.m_R; _local4 = ((_local3.col1.x * m_localAnchor1.x) + (_local3.col2.x * m_localAnchor1.y)); _local5 = ((_local3.col1.y * m_localAnchor1.x) + (_local3.col2.y * m_localAnchor1.y)); _local3 = _local2.m_R; _local6 = ((_local3.col1.x * m_localAnchor2.x) + (_local3.col2.x * m_localAnchor2.y)); _local7 = ((_local3.col1.y * m_localAnchor2.x) + (_local3.col2.y * m_localAnchor2.y)); _local8 = _local1.m_invMass; _local9 = _local2.m_invMass; _local10 = _local1.m_invI; _local11 = _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; _local2 = m_ptpImpulse.Copy(); _local2.Multiply(_arg1); return (_local2); } override public function SolvePositionConstraints():Boolean{ var _local1:Number; var _local2:Number; var _local3:b2Body; var _local4:b2Body; var _local5:Number; var _local6:b2Mat22; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:Number; var _local21:Number; var _local22:Number; var _local23:Number; var _local24:Number; var _local25:Number; _local3 = m_body1; _local4 = m_body2; _local5 = 0; _local6 = _local3.m_R; _local7 = ((_local6.col1.x * m_localAnchor1.x) + (_local6.col2.x * m_localAnchor1.y)); _local8 = ((_local6.col1.y * m_localAnchor1.x) + (_local6.col2.y * m_localAnchor1.y)); _local6 = _local4.m_R; _local9 = ((_local6.col1.x * m_localAnchor2.x) + (_local6.col2.x * m_localAnchor2.y)); _local10 = ((_local6.col1.y * m_localAnchor2.x) + (_local6.col2.y * m_localAnchor2.y)); _local11 = (_local3.m_position.x + _local7); _local12 = (_local3.m_position.y + _local8); _local13 = (_local4.m_position.x + _local9); _local14 = (_local4.m_position.y + _local10); _local15 = (_local13 - _local11); _local16 = (_local14 - _local12); _local5 = Math.sqrt(((_local15 * _local15) + (_local16 * _local16))); _local17 = _local3.m_invMass; _local18 = _local4.m_invMass; _local19 = _local3.m_invI; _local20 = _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)); _local21 = tImpulse.x; _local22 = 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); _local23 = 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 GetJointSpeed():Number{ return ((m_body2.m_angularVelocity - m_body1.m_angularVelocity)); } public function SetMotorSpeed(_arg1:Number){ m_motorSpeed = _arg1; } 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 _local2:b2Body; var _local3:b2Body; var _local4:b2Mat22; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; _local2 = m_body1; _local3 = m_body2; _local4 = _local2.m_R; _local5 = ((_local4.col1.x * m_localAnchor1.x) + (_local4.col2.x * m_localAnchor1.y)); _local6 = ((_local4.col1.y * m_localAnchor1.x) + (_local4.col2.y * m_localAnchor1.y)); _local4 = _local3.m_R; _local7 = ((_local4.col1.x * m_localAnchor2.x) + (_local4.col2.x * m_localAnchor2.y)); _local8 = ((_local4.col1.y * m_localAnchor2.x) + (_local4.col2.y * m_localAnchor2.y)); _local10 = (((_local3.m_linearVelocity.x + (-(_local3.m_angularVelocity) * _local8)) - _local2.m_linearVelocity.x) - (-(_local2.m_angularVelocity) * _local6)); _local11 = (((_local3.m_linearVelocity.y + (_local3.m_angularVelocity * _local7)) - _local2.m_linearVelocity.y) - (_local2.m_angularVelocity * _local5)); _local12 = -(((m_ptpMass.col1.x * _local10) + (m_ptpMass.col2.x * _local11))); _local13 = -(((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 56
//b2RevoluteJointDef (Engine.Dynamics.Joints.b2RevoluteJointDef) package Engine.Dynamics.Joints { import Engine.Common.Math.*; public class b2RevoluteJointDef extends b2JointDef { public var upperAngle:Number; public var lowerAngle:Number; public var motorSpeed:Number; public var anchorPoint:b2Vec2; public var motorTorque:Number; public var enableMotor:Boolean; public var enableLimit:Boolean; 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 57
//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_mass:Number; public var m_contactList:b2ContactNode; public var m_angularVelocity:Number; public var m_rotation:Number; public var m_shapeList:b2Shape; public var m_R:b2Mat22; public var m_force:b2Vec2; public var m_torque:Number; public var m_userData; 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_invI:Number; public var m_shapeCount:int; 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 _local6:Array; 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; _local6 = 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){ var _local3:b2Shape; if (IsFrozen()){ return; }; m_rotation = _arg2; m_R.Set(m_rotation); m_position.SetV(_arg1); _local3 = 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 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 GetLinearVelocity():b2Vec2{ return (m_linearVelocity); } 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; _local1 = 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 GetAngularVelocity():Number{ return (m_angularVelocity); } public function GetMass():Number{ return (m_mass); } public function GetShapeList():b2Shape{ return (m_shapeList); } public function SetOriginPosition(_arg1:b2Vec2, _arg2:Number){ var _local3:b2Shape; if (IsFrozen()){ return; }; m_rotation = _arg2; m_R.Set(m_rotation); m_position = b2Math.AddVV(_arg1, b2Math.b2MulMV(m_R, m_center)); _local3 = 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 _local1:b2Shape; var _local2:b2Shape; _local1 = 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; _local2 = 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 GetCenterPosition():b2Vec2{ return (m_position); } public function ApplyTorque(_arg1:Number){ if (IsSleeping() == false){ m_torque = (m_torque + _arg1); }; } public function AllowSleeping(_arg1:Boolean){ if (_arg1){ m_flags = (m_flags | e_allowSleepFlag); } else { m_flags = (m_flags & ~(e_allowSleepFlag)); WakeUp(); }; } public function WakeUp(){ m_flags = (m_flags & ~(e_sleepFlag)); m_sleepTime = 0; } } }//package Engine.Dynamics
Section 58
//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 rotation:Number; public var allowSleep:Boolean; public var userData; public var linearDamping:Number; public var angularVelocity:Number; public var linearVelocity:b2Vec2; public var position:b2Vec2; public var shapes:Array; public var isSleeping:Boolean; public var preventRotation:Boolean; public function b2BodyDef(){ var _local1:int; shapes = new Array(); super(); userData = null; _local1 = 0; 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; _local2 = 0; while (_local2 < b2Settings.b2_maxShapesPerBody) { if (shapes[_local2] == null){ shapes[_local2] = _arg1; break; }; _local2++; }; } } }//package Engine.Dynamics
Section 59
//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 _local5:b2Contact; var _local6:int; var _local7:int; _local5 = 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 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 PairAdded(_arg1, _arg2){ var _local3:b2Shape; var _local4:b2Shape; var _local5:b2Body; var _local6:b2Body; var _local7:b2Contact; var _local8:b2Shape; var _local9:b2Body; _local3 = (_arg1 as b2Shape); _local4 = (_arg2 as b2Shape); _local5 = _local3.m_body; _local6 = _local4.m_body; if (((_local5.IsStatic()) && (_local6.IsStatic()))){ return (m_nullContact); }; if (_local3.m_body == _local4.m_body){ return (m_nullContact); }; if (_local6.m_invMass == 0){ _local8 = _local3; _local3 = _local4; _local4 = _local8; _local9 = _local5; _local5 = _local6; _local6 = _local9; }; if (_local6.IsConnected(_local5)){ return (m_nullContact); }; _local7 = 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); } public function CleanContactList(){ var _local1:b2Contact; var _local2:b2Contact; _local1 = m_world.m_contactList; while (_local1 != null) { _local2 = _local1; _local1 = _local1.m_next; if ((_local2.m_flags & b2Contact.e_destroyFlag)){ DestroyContact(_local2); _local2 = null; }; }; } override public function PairRemoved(_arg1, _arg2, _arg3){ var _local4:b2Contact; if (_arg3 == null){ return; }; _local4 = (_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); }; }; } } }//package Engine.Dynamics
Section 60
//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 Solve(_arg1:b2StepInfo, _arg2:b2Vec2){ var _local3:int; var _local4:b2Body; var _local5:b2ContactSolver; 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++; }; _local5 = 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 AddContact(_arg1:b2Contact){ var _local2 = m_contactCount++; m_contacts[_local2] = _arg1; } 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; var _local5:Number; var _local6:Number; _local4 = Number.MAX_VALUE; _local5 = (b2Settings.b2_linearSleepTolerance * b2Settings.b2_linearSleepTolerance); _local6 = (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 61
//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 62
//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_blockAllocator; public var m_contactList:b2Contact; 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){ var _local4:b2BodyDef; 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); _local4 = new b2BodyDef(); m_groundBody = CreateBody(_local4); } public function GetContactList():b2Contact{ return (m_contactList); } public function CreateJoint(_arg1:b2JointDef):b2Joint{ var _local2:b2Joint; var _local3:b2Body; var _local4:b2Shape; _local2 = b2Joint.Create(_arg1, m_blockAllocator); _local2.m_prev = null; _local2.m_next = m_jointList; if (m_jointList){ m_jointList.m_prev = _local2; }; m_jointList = _local2; m_jointCount++; _local2.m_node1.joint = _local2; _local2.m_node1.other = _local2.m_body2; _local2.m_node1.prev = null; _local2.m_node1.next = _local2.m_body1.m_jointList; if (_local2.m_body1.m_jointList){ _local2.m_body1.m_jointList.prev = _local2.m_node1; }; _local2.m_body1.m_jointList = _local2.m_node1; _local2.m_node2.joint = _local2; _local2.m_node2.other = _local2.m_body1; _local2.m_node2.prev = null; _local2.m_node2.next = _local2.m_body2.m_jointList; if (_local2.m_body2.m_jointList){ _local2.m_body2.m_jointList.prev = _local2.m_node2; }; _local2.m_body2.m_jointList = _local2.m_node2; if (_arg1.collideConnected == false){ _local3 = ((_arg1.body1.m_shapeCount < _arg1.body2.m_shapeCount)) ? _arg1.body1 : _arg1.body2; _local4 = _local3.m_shapeList; while (_local4) { _local4.ResetProxy(m_broadPhase); _local4 = _local4.m_next; }; }; return (_local2); } public function DestroyJoint(_arg1:b2Joint){ var _local2:Boolean; var _local3:b2Body; var _local4:b2Body; var _local5:b2Body; var _local6:b2Shape; _local2 = _arg1.m_collideConnected; if (_arg1.m_prev){ _arg1.m_prev.m_next = _arg1.m_next; }; if (_arg1.m_next){ _arg1.m_next.m_prev = _arg1.m_prev; }; if (_arg1 == m_jointList){ m_jointList = _arg1.m_next; }; _local3 = _arg1.m_body1; _local4 = _arg1.m_body2; _local3.WakeUp(); _local4.WakeUp(); if (_arg1.m_node1.prev){ _arg1.m_node1.prev.next = _arg1.m_node1.next; }; if (_arg1.m_node1.next){ _arg1.m_node1.next.prev = _arg1.m_node1.prev; }; if (_arg1.m_node1 == _local3.m_jointList){ _local3.m_jointList = _arg1.m_node1.next; }; _arg1.m_node1.prev = null; _arg1.m_node1.next = null; if (_arg1.m_node2.prev){ _arg1.m_node2.prev.next = _arg1.m_node2.next; }; if (_arg1.m_node2.next){ _arg1.m_node2.next.prev = _arg1.m_node2.prev; }; if (_arg1.m_node2 == _local4.m_jointList){ _local4.m_jointList = _arg1.m_node2.next; }; _arg1.m_node2.prev = null; _arg1.m_node2.next = null; b2Joint.Destroy(_arg1, m_blockAllocator); m_jointCount--; if (_local2 == false){ _local5 = ((_local3.m_shapeCount < _local4.m_shapeCount)) ? _local3 : _local4; _local6 = _local5.m_shapeList; while (_local6) { _local6.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; _local2 = new b2Body(_arg1, this); _local2.m_prev = null; _local2.m_next = m_bodyList; if (m_bodyList){ m_bodyList.m_prev = _local2; }; m_bodyList = _local2; m_bodyCount++; return (_local2); } public function GetGroundBody():b2Body{ return (m_groundBody); } public function Query(_arg1:b2AABB, _arg2:Array, _arg3:int):int{ var _local4:Array; var _local5:int; var _local6:int; _local4 = new Array(); _local5 = m_broadPhase.QueryAABB(_arg1, _local4, _arg3); _local6 = 0; while (_local6 < _local5) { _arg2[_local6] = (_local4[_local6] as b2Shape); _local6++; }; return (_local5); } public function CleanBodyList(){ var _local1:b2Body; var _local2:b2Body; var _local3:b2JointNode; var _local4:b2JointNode; m_contactManager.m_destroyImmediate = true; _local1 = 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 _local5:b2Island; var _local6:b2Contact; var _local7:b2Joint; var _local8:int; var _local9:Array; var _local10:int; var _local11: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(); _local5 = 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; }; _local6 = m_contactList; while (_local6 != null) { _local6.m_flags = (_local6.m_flags & ~(b2Contact.e_islandFlag)); _local6 = _local6.m_next; }; _local7 = m_jointList; while (_local7 != null) { _local7.m_islandFlag = false; _local7 = _local7.m_next; }; _local8 = m_bodyCount; _local9 = new Array(m_bodyCount); _local10 = 0; while (_local10 < m_bodyCount) { _local9[_local10] = null; _local10++; }; _local11 = 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 63
//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 NotifyBoundaryViolated(_arg1:b2Body):uint{ return (b2_freezeBody); } public function NotifyJointDestroyed(_arg1:b2Joint){ } } }//package Engine.Dynamics
Section 64
//GameConfig (GameConfig.GameConfig) package GameConfig { public class GameConfig { public static var fontColor:int = 0xFFCD00; public static var inDevelopment:Boolean = false; public static var shortName:String = "stuntpilottrainer"; public static var version:String = "1.0"; public static var fontName:String = "Agency FB"; public static var mochiadsCode:String = "c94944f3d5a0e68d"; public static var startClass:Class; } }//package GameConfig
Section 65
//GameObject (GameObject.GameObject) package GameObject { import GameScene.*; import Particles.*; import flash.display.*; import flash.events.*; import flash.geom.*; import flash.text.*; import flash.net.*; import GameConfig.*; import flash.filters.*; public class GameObject { public var imageSet:Array; public var loaded:Boolean;// = false public var baseAlpha:Number;// = 1 public var modifiedAlpha:Number;// = 1 public var mainLayer:ParticleLayer; public var id:int;// = 0 public var dampenOrigin:Number;// = 1 public var baseHandleY:Number;// = 0.5 public var _removed:Boolean;// = false public var className:String; public var buttonBitmapDataOff:BitmapData; public var zOrderString:String; public var baseHandleX:Number;// = 0.5 public var _mHasHit:Boolean;// = false public var collision:GameObjectCollision; public var updateDespitePaused:Boolean;// = false public var _toRemove:Boolean;// = false public var oldScaleX:Number; public var oldScaleY:Number; public var baseHeight:Number; public var modifiedRotation:Number;// = 0 public var m:MovieClip; public var baseRotation:Number;// = 0 public var isGlobal:Boolean;// = false public var baseWidth:Number; public var ticks:int;// = 0 public var modifiedScaleX:Number;// = 1 public var modifiedScaleY:Number;// = 1 public var disabled:Boolean;// = false public var _on:Boolean;// = false public var defaultCol:int; public var baseScaleY:Number;// = 1 public var lastX:Number;// = 0 public var lastY:Number;// = 0 public var baseScaleX:Number;// = 1 public var buttonBitmapDataOn:BitmapData; public var name:String; public var oldAlpha:Number; public var showButtonOnOutline:Boolean;// = false public var defaultTextNum:int;// = 48 public var parent:GameObject; public var particles:Array; public var hidden:Boolean;// = false public var imClass:Class; public var animSpeed:Number;// = 0 public var oldstr:String;// = "oldstrdefaultvalue" public var oldRotation:Number; public var basex:Number; public var basey:Number; public var additive:Boolean;// = false public var modifiedx:Number; public var modifiedy:Number; public var buttonDisabled:Boolean;// = false public var conditionalParticles:Array; public var animFrame:Number;// = 0 public var gs:GameScene; public var obj:DisplayObject; public var filters:Array; public var children:Array; public static var idBase:int = 0; public function GameObject(_arg1:GameScene, _arg2:Object, _arg3:String, _arg4:int, _arg5:int):void{ var _local6:Class; animSpeed = 0; animFrame = 0; lastX = 0; lastY = 0; baseAlpha = 1; baseRotation = 0; baseHandleX = 0.5; baseHandleY = 0.5; baseScaleX = 1; baseScaleY = 1; modifiedAlpha = 1; modifiedScaleX = 1; modifiedScaleY = 1; modifiedRotation = 0; filters = new Array(); particles = new Array(); conditionalParticles = new Array(); children = new Array(); additive = false; disabled = false; hidden = false; ticks = 0; isGlobal = false; dampenOrigin = 1; _toRemove = false; _removed = false; _mHasHit = false; _on = false; showButtonOnOutline = false; defaultTextNum = 48; updateDespitePaused = false; oldstr = "oldstrdefaultvalue"; buttonDisabled = false; id = 0; loaded = false; super(); idBase++; id = idBase; defaultCol = GameConfig.fontColor; if (_arg2 == null){ obj = new TextField(); } 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 addChild(_arg1:GameObject):void{ _arg1.parent = this; children.push(_arg1); } public function mask():void{ var _local1:Bitmap; var _local2:BitmapData; var _local3:int; var _local4:int; if ((!(obj) is Bitmap)){ return; }; _local1 = Bitmap(obj); _local2 = _local1.bitmapData; _local2.lock(); _local3 = 0; 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 globalX():Number{ var _local1:Number; _local1 = basex; if (parent){ _local1 = parent.tformedX(basex, basey); }; return (_local1); } public function globalY():Number{ var _local1:Number; _local1 = 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 (_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){ if (_on){ obj.filters = [new GlowFilter(0xFFCD00, 1, 12, 12, 3)]; } else { obj.filters = new Array(); }; }; } 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 disableButton():void{ var _local1:SimpleButton; if ((obj is SimpleButton)){ _local1 = SimpleButton(obj); _local1.enabled = false; baseAlpha = 0.5; buttonDisabled = true; }; } public function setupButton(_arg1:Object, _arg2:String, _arg3:Class=null, _arg4:Boolean=false):void{ var _local5:DisplayObject; var _local6:DisplayObject; var _local7:DisplayObject; var _local8:SimpleButton; var _local9:GameObject; var _local10:Class; this.name = _arg2; if ((_arg1 is Class)){ _local10 = Class(_arg1); _local5 = new (_local10); _local6 = new (_local10); _local7 = new (_local10); } else { _local5 = DisplayObject(_arg1); _local6 = DisplayObject(_arg1); _local7 = DisplayObject(_arg1); }; _local5.scaleX = 0.95; _local5.scaleY = 0.95; _local5.x = (0.025 * _local5.width); _local5.y = (0.025 * _local5.height); _local7.filters = [new GlowFilter(0xFFFFFF, 0.6)]; _local5.filters = [new GlowFilter(0xFFFFFF, 1)]; _local8 = SimpleButton(obj); _local8.upState = _local6; _local8.overState = _local7; _local8.downState = _local5; _local8.useHandCursor = true; _local8.hitTestState = _local6; _local8.useHandCursor = _arg4; baseWidth = _local5.width; baseHeight = _local5.height; _local8.addEventListener(MouseEvent.CLICK, _mHit); _local9 = new GameObject(gs, null, zOrderString, 4, 0); _local9.setText(_arg2.toUpperCase(), 26); addChild(_local9); if (_arg3){ buttonBitmapDataOn = Bitmap(new (_arg3)).bitmapData; buttonBitmapDataOff = Bitmap(_local6).bitmapData; }; } public function show():void{ hidden = false; } public function hide():void{ hidden = true; } public function remoteLoad(_arg1:String):void{ var _local2:Loader; if ((!(obj) is Loader)){ return; }; _local2 = Loader(obj); _local2.load(new URLRequest(_arg1)); _local2.contentLoaderInfo.addEventListener(Event.COMPLETE, objectLoaded); } public function pushScale(_arg1:Number, _arg2:Number):void{ modifiedScaleX = (modifiedScaleX * _arg1); modifiedScaleY = (modifiedScaleY * _arg2); } public function objectLoaded(_arg1:Event=null):void{ baseWidth = obj.width; baseHeight = obj.height; loaded = true; } public function emitConditionalParticles(_arg1:String, _arg2:Number=0, _arg3:Number=0, _arg4:Boolean=false):int{ var _local5:int; var _local6:ParticleEmitter; _local5 = 0; for each (_local6 in conditionalParticles) { if (_local6.Name == _arg1){ _local5++; if (_arg4){ _local6.emitOnto(mainLayer, _arg2, _arg3); } else { _local6.emitOnto(mainLayer, tformedX((_local6.x + _arg2), (_local6.y + _arg3)), tformedY((_local6.x + _arg2), (_local6.y + _arg3))); }; }; }; return (_local5); } public function syncObj():void{ var _local1:Number; var _local2:Number; var _local3:Number; var _local4:Number; if (parent){ modifiedx = (modifiedx + parent.modifiedx); modifiedy = (modifiedy + parent.modifiedy); modifiedAlpha = (modifiedAlpha * parent.modifiedAlpha); }; _local1 = modifiedx; _local2 = modifiedy; if (parent){ }; if (!isGlobal){ _local1 = (_local1 - (gs.camX * dampenOrigin)); _local2 = (_local2 - (gs.camY * dampenOrigin)); }; _local3 = (_local1 - ((cosd(-(modifiedRotation)) * int(((baseWidth * baseHandleX) * modifiedScaleX))) + (sind(-(modifiedRotation)) * int(((baseHeight * baseHandleY) * modifiedScaleY))))); _local4 = (_local2 - ((-(sind(-(modifiedRotation))) * int(((baseWidth * baseHandleX) * modifiedScaleX))) + (cosd(-(modifiedRotation)) * int(((baseHeight * baseHandleY) * modifiedScaleY))))); if (parent){ }; obj.x = _local3; obj.y = _local4; if (((_local3 + (baseWidth * modifiedScaleX)) + 20) < 0){ obj.visible = false; if (collision){ collision.synchronize(this); }; return; } else { if (((_local3 - (baseWidth * modifiedScaleX)) - 20) > 800){ if (collision){ collision.synchronize(this); }; obj.visible = false; return; } else { obj.visible = true; 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; }; if (collision){ collision.synchronize(this); }; } public function addConditionalParticleArray(_arg1:Array):void{ var _local2:int; if (!_arg1){ return; }; _local2 = 0; while (_local2 < _arg1.length) { conditionalParticles.push(_arg1[_local2]); _local2++; }; } public function tformedX(_arg1:Number, _arg2:Number):Number{ return (tformed(_arg1, _arg2).x); } public function collidesWith(_arg1:GameObject):Boolean{ if (((!(collision)) || (!(_arg1.collision)))){ return (false); }; return (collision.collidesWith(_arg1.collision)); } public function stripText():void{ var _local1:GameObject; for each (_local1 in children) { _local1.remove(); }; } public function tformedY(_arg1:Number, _arg2:Number):Number{ return (tformed(_arg1, _arg2).y); } public function rotate(_arg1:Number):void{ baseRotation = _arg1; } public function pushAlpha(_arg1:Number):void{ modifiedAlpha = (modifiedAlpha * _arg1); } public function addFilter(_arg1:GameObjectFilter):void{ filters.push(_arg1); } 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); m.removeChild(obj); for each (_local1 in filters) { _local1.remove(this); }; for each (_local2 in children) { _local2.remove(); }; _remove(); _removed = true; } public function sind(_arg1:Number):Number{ return (Math.sin((_arg1 * (Math.PI / 180)))); } public function angleToObject(_arg1:GameObject):Number{ return (((Math.atan2((_arg1.globalY() - globalY()), (_arg1.globalX() - globalX())) * 180) / Math.PI)); } public function screenBaseX():Number{ return ((basex - gs.camX)); } public function _remove():void{ } public function setGlobal(_arg1:Boolean):void{ var _local2:GameObject; isGlobal = _arg1; for each (_local2 in children) { _local2.setGlobal(_arg1); }; } public function screenBaseY():Number{ return ((basey - gs.camY)); } public function distanceToObject(_arg1:GameObject):Number{ var _local2:Number; var _local3:Number; _local2 = (_arg1.basex - basex); _local3 = (_arg1.basey - basey); return (Math.sqrt(((_local2 * _local2) + (_local3 * _local3)))); } public function drawToImage(_arg1:Bitmap, _arg2:int, _arg3:int, _arg4:int=0, _arg5:Number=1, _arg6:Number=1, _arg7:String="erase"){ var _local8:BitmapData; _local8 = Bitmap(obj).bitmapData; _arg1.scaleX = _arg5; _arg1.scaleY = _arg6; _arg1.rotation = _arg4; _arg1.x = (((_arg2 - basex) + (_local8.width / 2)) - (_arg1.width / 2)); _arg1.y = (((_arg3 - basey) + (_local8.height / 2)) - (_arg1.height / 2)); _local8.draw(_arg1, _arg1.transform.matrix, null, _arg7); } public function cosd(_arg1:Number):Number{ return (Math.cos((_arg1 * (Math.PI / 180)))); } public function setText(_arg1:String, _arg2:int=-1, _arg3:int=-1):void{ var _local4:TextField; var _local5:int; var _local6:TextField; 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; 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(GameConfig.fontName, _arg2, _arg3, true); _local4.text = _arg1; _local4.embedFonts = true; baseWidth = _local4.textWidth; baseHeight = _local4.textHeight; _local4.width = 0x0400; _local4.height = 64; _local4.selectable = false; _local4.mouseEnabled = false; if (_local4.filters.length < 1){ _local4.filters = [new DropShadowFilter((4 * (_arg2 / 48)), 45, 0, 1, 0, 0, 1, 0)]; }; }; } public function buttonOn():Boolean{ return (_on); } public function update():void{ var _local1:int; var _local2:ParticleEmitter; var _local3:GameObject; var _local4:int; lastX = basex; lastY = basey; if (_removed){ return; }; if (disabled){ obj.alpha = 0; return; }; if (imageSet){ if (animSpeed > 0){ animFrame = (animFrame + (1 / animSpeed)); _local4 = (int(animFrame) % imageSet.length); Bitmap(obj).bitmapData = imageSet[_local4]; }; }; ticks++; modifiedRotation = baseRotation; modifiedx = basex; modifiedy = basey; modifiedScaleX = baseScaleX; modifiedScaleY = baseScaleY; if (parent != null){ modifiedRotation = (parent.modifiedRotation + baseRotation); }; modifiedAlpha = baseAlpha; _local1 = 0; while (_local1 < filters.length) { GameObjectFilter(filters[_local1]).update(this); _local1++; }; for each (_local2 in particles) { _local2.emitOnto(mainLayer, tformedX(_local2.x, _local2.y), tformedY(_local2.x, _local2.y)); }; for each (_local3 in children) { _local3.update(); }; mainLayer.x = gs.camX; mainLayer.y = gs.camY; if (mainLayer.particles.length > 0){ mainLayer.update(); }; _update(); if (_toRemove){ remove(); }; } public function move(_arg1:Number, _arg2:Number):void{ var _local3:Number; var _local4:Number; _local3 = ((_arg1 * cosd(-(baseRotation))) + (sind(-(baseRotation)) * _arg2)); _local4 = ((_arg1 * -(sind(-(baseRotation)))) + (cosd(-(baseRotation)) * _arg2)); basex = (basex + _local3); basey = (basey + _local4); } public function _mHit(_arg1:Event):void{ if (buttonDisabled){ return; }; if (buttonBitmapDataOn){ setButtonOn(!(_on)); }; _mHasHit = true; } public function tformed(_arg1:Number, _arg2:Number):Point{ var _local3:Number; var _local4:Number; _local3 = ((modifiedx + ((cosd(-(baseRotation)) * _arg1) * baseScaleX)) + ((sind(-(baseRotation)) * _arg2) * baseScaleY)); _local4 = ((modifiedy + ((-(sind(-(baseRotation))) * _arg1) * baseScaleX)) + ((cosd(-(baseRotation)) * _arg2) * baseScaleY)); return (new Point(_local3, _local4)); } public function mHit():Boolean{ var _local1:Boolean; _local1 = _mHasHit; _mHasHit = false; return (_local1); } public function _update():void{ } } }//package GameObject
Section 66
//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 body:b2Body; public var bodydef:b2BodyDef; public var children:Array; public var approxRadius:Number; public var type:int;// = 0 public var approxX:Number; public var approxY:Number; public static var world:b2World; public function GameObjectCollision(){ var _local1:b2AABB; var _local2:b2Vec2; var _local3:Boolean; type = 0; children = new Array(); 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 synchronize(_arg1:GameObject):void{ var _local2:b2Shape; var _local3:Number; var _local4:int; _local2 = body.m_shapeList; _local3 = ((_arg1.baseRotation / 180) * Math.PI); body.m_flags = (body.m_flags & ~(b2Body.e_frozenFlag)); body.SetOriginPosition(new b2Vec2(_arg1.basex, _arg1.basey), _local3); body.SynchronizeShapes(); _local4 = 0; while (_local4 < body.m_shapeCount) { children[_local4].tformedX = (((Math.cos(-(_local3)) * children[_local4].approxX) + (Math.sin(-(_local3)) * children[_local4].approxY)) + _arg1.basex); children[_local4].tformedY = (((-(Math.sin(-(_local3))) * children[_local4].approxX) + (Math.cos(-(_local3)) * children[_local4].approxY)) + _arg1.basey); _local2 = _local2.m_next; _local4++; }; } public function finalize():void{ body = new b2Body(bodydef, world); } public function collidesWith(_arg1:GameObjectCollision):Boolean{ var _local2:b2Shape; var _local3:int; var _local4:int; var _local5:b2Shape; var _local6:int; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Boolean; var _local12:b2Manifold; _local2 = body.m_shapeList; _local3 = 0; _local4 = (body.m_shapeCount - 1); while (_local4 >= 0) { _local5 = _arg1.body.m_shapeList; _local6 = (_arg1.body.m_shapeCount - 1); while (_local6 >= 0) { _local7 = (children[_local4].tformedX - _arg1.children[_local6].tformedX); _local8 = (children[_local4].tformedY - _arg1.children[_local6].tformedY); _local9 = ((_local7 * _local7) + (_local8 * _local8)); _local10 = (children[_local4].approxRadius + _arg1.children[_local6].approxRadius); _local11 = false; if (_local9 < (_local10 * _local10)){ _local11 = true; }; if (_local11){ _local12 = new b2Manifold(); b2Collision.b2CollidePoly(_local12, b2PolyShape(_local2), b2PolyShape(_local5)); if (_local12.points[0].separation < 9999999){ return (true); }; }; _local5 = _local5.m_next; _local6--; }; _local2 = _local2.m_next; _local4--; }; return (false); } } }//package GameObject
Section 67
//GameObjectCollisionPoly (GameObject.GameObjectCollisionPoly) package GameObject { import Engine.Collision.Shapes.*; public class GameObjectCollisionPoly { public var points:Array; public var approxX:Number; public var tformedX: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{ var _local1:int; polyDef = new b2PolyDef(); polyDef.vertexCount = points.length; _local1 = (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 68
//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 _local4:Number; var _local5:Number; var _local6:int; var _local7:GameObject; _local4 = (_arg2 - _arg1.basex); _local5 = (_arg3 - _arg1.basey); _local6 = 0; 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 _local3:GameObjectCollisionSet; var _local4:GameObject; _local3 = new (GameObjectCollisionSet); for each (_local4 in _arg1) { if (_local4.name == _arg2){ _local4.remove(); _local3.children.push(_local4); }; }; return (_local3); } } }//package GameObject
Section 69
//GameObjectFilter (GameObject.GameObjectFilter) package GameObject { public class GameObjectFilter { public var ticks:int;// = 0 public function GameObjectFilter(){ ticks = 0; super(); } public function removeWhenDone():void{ } public function reverse():void{ } public function remove(_arg1:GameObject):void{ } public function update(_arg1:GameObject):void{ } } }//package GameObject
Section 70
//GameObjectFilterAddOrigin (GameObject.GameObjectFilterAddOrigin) package GameObject { public class GameObjectFilterAddOrigin extends GameObjectFilter { public var dx:Number;// = 0 public var dy:Number;// = 0 public function GameObjectFilterAddOrigin(){ dx = 0; dy = 0; super(); } override public function update(_arg1:GameObject):void{ _arg1.modifiedx = (_arg1.modifiedx + dx); _arg1.modifiedy = (_arg1.modifiedy + dy); } } }//package GameObject
Section 71
//GameObjectFilterDampenInterpolateIn (GameObject.GameObjectFilterDampenInterpolateIn) package GameObject { import Tools.*; public class GameObjectFilterDampenInterpolateIn extends GameObjectFilter { public var Delay:int; public var FadeTime:int; public var dx:Number;// = 0 public var dy:Number;// = 0 public function GameObjectFilterDampenInterpolateIn(){ dx = 0; dy = 0; super(); } override public function update(_arg1:GameObject):void{ var _local2:Number; var _local3:Number; ticks = (ticks + 1); _local2 = Interpolation.dampenInterpolateLock(dx, 0, Interpolation.fromTo(ticks, Delay, (Delay + FadeTime))); _local3 = Interpolation.dampenInterpolateLock(dy, 0, Interpolation.fromTo(ticks, Delay, (Delay + FadeTime))); _arg1.modifiedx = (_arg1.modifiedx + _local2); _arg1.modifiedy = (_arg1.modifiedy + _local3); } } }//package GameObject
Section 72
//GameObjectFilterDampenOrigin (GameObject.GameObjectFilterDampenOrigin) package GameObject { public class GameObjectFilterDampenOrigin extends GameObjectFilter { public var StickToTop:int;// = 0 public var factor:Number;// = 0 public var StickToBottom:int;// = 0 public function GameObjectFilterDampenOrigin(){ factor = 0; StickToTop = 0; StickToBottom = 0; super(); } override public function update(_arg1:GameObject):void{ _arg1.dampenOrigin = factor; } } }//package GameObject
Section 73
//GameObjectFilterFadeInOut (GameObject.GameObjectFilterFadeInOut) package GameObject { import Tools.*; public class GameObjectFilterFadeInOut extends GameObjectFilter { public var FadeOutDuration:Number;// = 0 public var FadeOut:int;// = 0 public var FadeInDuration:Number;// = 0 public var FadeOutKill:int;// = 1 public var FadeOutBlur:int;// = 0 public var FadeIn:int;// = 0 public var FadeInBlur:int;// = 0 public var FadeInDelay:Number;// = 0 public var FadeOutTime:Number;// = 0 public function GameObjectFilterFadeInOut(){ FadeIn = 0; FadeInDelay = 0; FadeInDuration = 0; FadeInBlur = 0; FadeOut = 0; FadeOutTime = 0; FadeOutDuration = 0; FadeOutBlur = 0; FadeOutKill = 1; super(); } override public function update(_arg1:GameObject):void{ var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Array; ticks = (ticks + 1); _local2 = 1; _local3 = 1; _local4 = 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 74
//GameObjectFilterKill (GameObject.GameObjectFilterKill) package GameObject { public class GameObjectFilterKill extends GameObjectFilter { public var time:Number;// = 0 public function GameObjectFilterKill(){ time = 0; super(); } override public function update(_arg1:GameObject):void{ if (_arg1.ticks > time){ _arg1._toRemove = true; }; } } }//package GameObject
Section 75
//GameObjectFilterRepeats (GameObject.GameObjectFilterRepeats) package GameObject { public class GameObjectFilterRepeats extends GameObjectFilter { public var others:Array; public var created:Boolean;// = false public function GameObjectFilterRepeats(){ others = new Array(); created = false; 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:GameObjectFilterStayOnScreen; var _local4:int; var _local5:GameObject; var _local6:GameObjectFilter; var _local7:GameObjectFilterDampenOrigin; if (!created){ _local2 = ((800 / _arg1.baseWidth) + 2); _local3 = new GameObjectFilterStayOnScreen(); _local3.multiplier = _local2; _local4 = 0; while (_local4 < _local2) { _local5 = new GameObject(_arg1.gs, _arg1.imClass, _arg1.zOrderString, (_arg1.basex + (_local4 * _arg1.baseWidth)), _arg1.basey); _local5.addFilter(_local3); others.push(_local5); for each (_local6 in _arg1.filters) { if ((_local6 is GameObjectFilterDampenOrigin)){ _local7 = new GameObjectFilterDampenOrigin(); _local7.factor = GameObjectFilterDampenOrigin(_local6).factor; _local5.addFilter(_local7); }; }; _local4++; }; _arg1.addFilter(_local3); created = true; }; } } }//package GameObject
Section 76
//GameObjectFilterScaleInOut (GameObject.GameObjectFilterScaleInOut) package GameObject { import Tools.*; public class GameObjectFilterScaleInOut extends GameObjectFilter { public var ScaleInStartX:Number;// = 1 public var ScaleOut:int;// = 0 public var ScaleInStartY:Number;// = 1 public var ScaleOutEndX:Number;// = 0 public var ScaleOutEndY:Number;// = 0 public var ScaleInDelay:Number;// = 0 public var ScaleInDuration:Number;// = 0 public var ScaleIn:int;// = 0 public var ScaleOutTime:Number;// = 0 public var ScaleOutDuration:Number;// = 0 public function GameObjectFilterScaleInOut(){ ScaleIn = 0; ScaleInDelay = 0; ScaleInDuration = 0; ScaleInStartX = 1; ScaleInStartY = 1; ScaleOut = 0; ScaleOutTime = 0; ScaleOutDuration = 0; ScaleOutEndX = 0; ScaleOutEndY = 0; super(); } override public function update(_arg1:GameObject):void{ var _local2:Number; var _local3:Number; ticks = (ticks + 1); _local2 = 1; _local3 = 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 77
//GameObjectFilterShift (GameObject.GameObjectFilterShift) package GameObject { public class GameObjectFilterShift extends GameObjectFilter { public var dx:Number;// = 0 public var dy:Number;// = 0 public function GameObjectFilterShift(){ dx = 0; dy = 0; super(); } override public function update(_arg1:GameObject):void{ _arg1.basex = (_arg1.basex + dx); _arg1.basey = (_arg1.basey + dy); } } }//package GameObject
Section 78
//GameObjectFilterSqrtInterpolateIn (GameObject.GameObjectFilterSqrtInterpolateIn) package GameObject { import Tools.*; public class GameObjectFilterSqrtInterpolateIn extends GameObjectFilter { public var Delay:int; public var FadeTime:int; public var useSquare:Boolean;// = false public var dx:Number;// = 0 public var dy:Number;// = 0 public var useAlpha:Boolean;// = false public var killWhenDone:Boolean;// = false public function GameObjectFilterSqrtInterpolateIn(){ dx = 0; dy = 0; useAlpha = false; useSquare = false; killWhenDone = false; super(); } override public function removeWhenDone():void{ killWhenDone = true; } override public function reverse():void{ useSquare = !(useSquare); ticks = 0; } override public function update(_arg1:GameObject):void{ var _local2:Number; var _local3:Number; var _local4:int; var _local5:int; ticks = (ticks + 1); _local2 = 0; _local3 = 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 (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 (killWhenDone){ if (ticks > (Delay + FadeTime)){ _arg1.remove(); }; }; } } }//package GameObject
Section 79
//GameObjectFilterStayOnScreen (GameObject.GameObjectFilterStayOnScreen) package GameObject { public class GameObjectFilterStayOnScreen extends GameObjectFilter { public var multiplier:int;// = 0 public var overridedx:Number;// = 0 public function GameObjectFilterStayOnScreen(){ multiplier = 0; overridedx = 0; super(); } override public function update(_arg1:GameObject):void{ var _local2:Number; _local2 = 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 80
//GameScene (GameScene.GameScene) package GameScene { import Particles.*; import flash.display.*; import GameObject.*; import Layout.*; import Audio.*; import Tools.*; import NagScreen.*; import GlobalSetup.*; public class GameScene { 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 Ticks:int;// = 0 public var camX:Number;// = 0 public var camY:Number;// = 0 public var m:MovieClip; public var cameras:Array; public var orphanedParticleLayers:Array; public var i:Input; public var zOrders:Array; public static var currentindex:int = 0; public static var currentScene:GameScene; public function GameScene(){ objects = new Array(); Ticks = 0; camX = 0; camY = 0; zOrders = new Array(); cameras = new Array(); paused = false; orphanedParticleLayers = new Array(); fadeToBlack = false; fadeToBlackTicks = 0; defaultTextSize = 24; 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 init():void{ } public function pushScene(_arg1:GameScene, _arg2:Boolean=false):void{ gss.pushScene(_arg1, _arg2); } 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 findRandomObjectByClass(_arg1:String):GameObject{ var _local2:Array; var _local3:GameObject; _local2 = 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); }; }; 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{ var _local5:GameObject; if (_arg2 < 0){ _arg2 = defaultTextSize; }; _local5 = new GameObject(this, null, "TextLayer", 0, 0); _local5.setText(_arg1, _arg2); _local5.baseHandleX = _arg3; _local5.baseHandleY = _arg4; return (_local5); } public function horiz(_arg1:Array, _arg2:int=8, _arg3:Number=0, _arg4:Number=0):Layout{ return (Layout.Horiz(_arg1, _arg2, _arg3, _arg4)); } public function update():void{ var nc:GameSceneCamera; var lgo:GameObject; var gss:GameSceneCameraStack; var zo:GameSceneZOrder; var pl:ParticleLayer; if (!paused){ for each (gss in cameras) { gss.decay(); }; }; nc = GameSceneCameraStack.flatten(cameras); camX = nc.x; camY = nc.y; GameSoundScene.updateAll(); if (!paused){ Ticks = (Ticks + 1); }; 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(); }; }; _update(); objects = objects.filter(function (_arg1:GameObject, _arg2:int, _arg3:Array):Boolean{ return (!(_arg1._removed)); }); if (!paused){ for each (zo in zOrders) { 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 _update():void{ } public function getZOrder(_arg1:String):GameSceneZOrder{ var _local2:GameSceneZOrder; for each (_local2 in zOrders) { if (_local2.name == _arg1){ return (_local2); }; }; return (null); } public function addOrphanedParticleLayer(_arg1:ParticleLayer):void{ orphanedParticleLayers.push(_arg1); } public function mousex():int{ return (i.mouseX()); } public function mousey():int{ return (i.mouseY()); } public function addZOrder(_arg1:String):void{ var _local2:GameSceneZOrder; _local2 = 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 static function current():GameScene{ return (currentScene); } } }//package GameScene
Section 81
//GameSceneCamera (GameScene.GameSceneCamera) package GameScene { public class GameSceneCamera { 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 frameChange:Number;// = 1 public var x:Number;// = 0 public var y:Number;// = 0 public var totalTicks:Number;// = 300 public function GameSceneCamera(){ minY = -9999999; maxY = 9999999; minX = -9999999; maxX = 9999999; x = 0; y = 0; totalTicks = 300; linear = false; frameChange = 1; super(); } 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 82
//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 GameSceneCameraStack(){ ticks = 0; super(); } 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 _local2:Number; var _local3:Number; var _local4:Number; var _local5:GameSceneCameraStack; var _local6:GameSceneCamera; var _local7:Number; _local2 = 0; _local3 = 0; _local4 = 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 83
//GameSceneStack (GameScene.GameSceneStack) package GameScene { import flash.display.*; import GameObject.*; import Tools.*; import flash.utils.*; public class GameSceneStack { public var lastTicks:int; public var fadeSprite:Bitmap; public var stack:Array; public var i:Input; public var fading:Boolean;// = false public var fadeTicks:int;// = 0 public var killedLife:int;// = 0 public var elapsedTicks:int; public var mainSprite:Sprite; public function GameSceneStack(){ stack = new Array(); killedLife = 0; fadeTicks = 0; fading = false; super(); } public function pushScene(_arg1:GameScene, _arg2:Boolean=false):void{ _arg1.gss = this; _arg1.i = i; _arg1.register(mainSprite); _arg1.init(); stack.push(_arg1); if (_arg2){ fadeSprite = GraphicsTools.createFilledSprite(800, 600, 0); mainSprite.addChild(fadeSprite); fadeTicks = 0; fading = true; _arg1.fadeToBlack = true; } else { fading = false; }; } public function update():void{ var _local1:int; var _local2:int; var _local3:int; var _local4:Boolean; var _local5:int; var _local6:GameScene; var _local7:int; var _local8:Boolean; var _local9:GameObject; if (i == null){ if (Input.i){ i = Input.i; } else { i = new Input(mainSprite.stage); }; }; mainSprite.stage.focus = mainSprite; mainSprite.focusRect = null; mainSprite.stage.stageFocusRect = false; _local1 = getTimer(); elapsedTicks = (elapsedTicks + (_local1 - lastTicks)); lastTicks = _local1; _local2 = ((elapsedTicks - (elapsedTicks % 10)) / 10); elapsedTicks = (elapsedTicks % 10); if (_local2 > 5){ _local2 = 5; }; _local3 = 0; while (_local3 < _local2) { _local4 = (_local3 == (_local2 - 1)); _local5 = getTimer(); _local6 = GameScene(stack[(stack.length - 1)]); if (((!(fading)) || ((fadeTicks > 60)))){ _local6.update(); }; 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, 100))); if ((((fadeTicks > 100)) && (_local4))){ fadeTicks = 0; fading = false; mainSprite.removeChild(fadeSprite); }; }; _local3++; }; _local3 = 0; while (_local3 < _local2) { _local7 = 0; while (_local7 < (stack.length - 1)) { _local6 = GameScene(stack[_local7]); _local8 = false; if (_local6.fadeToBlack){ _local6.fadeToBlackTicks = (_local6.fadeToBlackTicks + 1); _local8 = (_local6.fadeToBlackTicks > 50); } else { _local6.m.alpha = (_local6.m.alpha - 0.02); _local8 = (_local6.m.alpha < 0); }; if (((_local8) && ((_local3 == (_local2 - 1))))){ _local6.flushParticles(); for each (_local9 in _local6.objects) { _local9.remove(); }; mainSprite.removeChild(_local6.m); stack = [stack.pop()]; return; }; _local7++; }; _local3++; }; } } }//package GameScene
Section 84
//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 85
//Embeds (GlobalSetup.Embeds) package GlobalSetup { public class Embeds { public static var menu_button_link_png:Class = Embeds_menu_button_link_png; 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 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 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 button_play_png:Class = Embeds_button_play_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 shot2_png:Class = Embeds_shot2_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; } }//package GlobalSetup
Section 86
//Embeds_balloon_png (GlobalSetup.Embeds_balloon_png) package GlobalSetup { import mx.core.*; public class Embeds_balloon_png extends BitmapAsset { } }//package GlobalSetup
Section 87
//Embeds_blimp_png (GlobalSetup.Embeds_blimp_png) package GlobalSetup { import mx.core.*; public class Embeds_blimp_png extends BitmapAsset { } }//package GlobalSetup
Section 88
//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 89
//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 90
//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 91
//Embeds_button_play_png (GlobalSetup.Embeds_button_play_png) package GlobalSetup { import mx.core.*; public class Embeds_button_play_png extends BitmapAsset { } }//package GlobalSetup
Section 92
//Embeds_cloud1_png (GlobalSetup.Embeds_cloud1_png) package GlobalSetup { import mx.core.*; public class Embeds_cloud1_png extends BitmapAsset { } }//package GlobalSetup
Section 93
//Embeds_cloud2_png (GlobalSetup.Embeds_cloud2_png) package GlobalSetup { import mx.core.*; public class Embeds_cloud2_png extends BitmapAsset { } }//package GlobalSetup
Section 94
//Embeds_collisionbig_png (GlobalSetup.Embeds_collisionbig_png) package GlobalSetup { import mx.core.*; public class Embeds_collisionbig_png extends BitmapAsset { } }//package GlobalSetup
Section 95
//Embeds_collisionhuge_png (GlobalSetup.Embeds_collisionhuge_png) package GlobalSetup { import mx.core.*; public class Embeds_collisionhuge_png extends BitmapAsset { } }//package GlobalSetup
Section 96
//Embeds_CollisionTall_png (GlobalSetup.Embeds_CollisionTall_png) package GlobalSetup { import mx.core.*; public class Embeds_CollisionTall_png extends BitmapAsset { } }//package GlobalSetup
Section 97
//Embeds_collisiontall_png (GlobalSetup.Embeds_collisiontall_png) package GlobalSetup { import mx.core.*; public class Embeds_collisiontall_png extends BitmapAsset { } }//package GlobalSetup
Section 98
//Embeds_content_png (GlobalSetup.Embeds_content_png) package GlobalSetup { import mx.core.*; public class Embeds_content_png extends BitmapAsset { } }//package GlobalSetup
Section 99
//Embeds_games_png (GlobalSetup.Embeds_games_png) package GlobalSetup { import mx.core.*; public class Embeds_games_png extends BitmapAsset { } }//package GlobalSetup
Section 100
//Embeds_ground_png (GlobalSetup.Embeds_ground_png) package GlobalSetup { import mx.core.*; public class Embeds_ground_png extends BitmapAsset { } }//package GlobalSetup
Section 101
//Embeds_land_png (GlobalSetup.Embeds_land_png) package GlobalSetup { import mx.core.*; public class Embeds_land_png extends BitmapAsset { } }//package GlobalSetup
Section 102
//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 103
//Embeds_lives_png (GlobalSetup.Embeds_lives_png) package GlobalSetup { import mx.core.*; public class Embeds_lives_png extends BitmapAsset { } }//package GlobalSetup
Section 104
//Embeds_man_png (GlobalSetup.Embeds_man_png) package GlobalSetup { import mx.core.*; public class Embeds_man_png extends BitmapAsset { } }//package GlobalSetup
Section 105
//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 106
//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 107
//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 108
//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 109
//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 110
//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 111
//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 112
//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 113
//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 114
//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 115
//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 116
//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 117
//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 118
//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 119
//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 120
//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 121
//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 122
//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 123
//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 124
//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 125
//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 126
//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 127
//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 128
//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 129
//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 130
//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 131
//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 132
//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 133
//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 134
//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 135
//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 136
//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 137
//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 138
//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 139
//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 140
//Embeds_parachute_png (GlobalSetup.Embeds_parachute_png) package GlobalSetup { import mx.core.*; public class Embeds_parachute_png extends BitmapAsset { } }//package GlobalSetup
Section 141
//Embeds_pipe_png (GlobalSetup.Embeds_pipe_png) package GlobalSetup { import mx.core.*; public class Embeds_pipe_png extends BitmapAsset { } }//package GlobalSetup
Section 142
//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 143
//Embeds_pipeback_png (GlobalSetup.Embeds_pipeback_png) package GlobalSetup { import mx.core.*; public class Embeds_pipeback_png extends BitmapAsset { } }//package GlobalSetup
Section 144
//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 145
//Embeds_pipebig_png (GlobalSetup.Embeds_pipebig_png) package GlobalSetup { import mx.core.*; public class Embeds_pipebig_png extends BitmapAsset { } }//package GlobalSetup
Section 146
//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 147
//Embeds_pipebigback_png (GlobalSetup.Embeds_pipebigback_png) package GlobalSetup { import mx.core.*; public class Embeds_pipebigback_png extends BitmapAsset { } }//package GlobalSetup
Section 148
//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 149
//Embeds_pipecollision_png (GlobalSetup.Embeds_pipecollision_png) package GlobalSetup { import mx.core.*; public class Embeds_pipecollision_png extends BitmapAsset { } }//package GlobalSetup
Section 150
//Embeds_pipecollisiongood_png (GlobalSetup.Embeds_pipecollisiongood_png) package GlobalSetup { import mx.core.*; public class Embeds_pipecollisiongood_png extends BitmapAsset { } }//package GlobalSetup
Section 151
//Embeds_pipecollisiongoodright_png (GlobalSetup.Embeds_pipecollisiongoodright_png) package GlobalSetup { import mx.core.*; public class Embeds_pipecollisiongoodright_png extends BitmapAsset { } }//package GlobalSetup
Section 152
//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 153
//Embeds_planecrash_png (GlobalSetup.Embeds_planecrash_png) package GlobalSetup { import mx.core.*; public class Embeds_planecrash_png extends BitmapAsset { } }//package GlobalSetup
Section 154
//Embeds_pole_png (GlobalSetup.Embeds_pole_png) package GlobalSetup { import mx.core.*; public class Embeds_pole_png extends BitmapAsset { } }//package GlobalSetup
Section 155
//Embeds_pop_png (GlobalSetup.Embeds_pop_png) package GlobalSetup { import mx.core.*; public class Embeds_pop_png extends BitmapAsset { } }//package GlobalSetup
Section 156
//Embeds_ring2_png (GlobalSetup.Embeds_ring2_png) package GlobalSetup { import mx.core.*; public class Embeds_ring2_png extends BitmapAsset { } }//package GlobalSetup
Section 157
//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 158
//Embeds_ring2back_png (GlobalSetup.Embeds_ring2back_png) package GlobalSetup { import mx.core.*; public class Embeds_ring2back_png extends BitmapAsset { } }//package GlobalSetup
Section 159
//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 160
//Embeds_ring3_png (GlobalSetup.Embeds_ring3_png) package GlobalSetup { import mx.core.*; public class Embeds_ring3_png extends BitmapAsset { } }//package GlobalSetup
Section 161
//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 162
//Embeds_ring3back_png (GlobalSetup.Embeds_ring3back_png) package GlobalSetup { import mx.core.*; public class Embeds_ring3back_png extends BitmapAsset { } }//package GlobalSetup
Section 163
//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 164
//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 165
//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 166
//Embeds_rock_png (GlobalSetup.Embeds_rock_png) package GlobalSetup { import mx.core.*; public class Embeds_rock_png extends BitmapAsset { } }//package GlobalSetup
Section 167
//Embeds_shot_png (GlobalSetup.Embeds_shot_png) package GlobalSetup { import mx.core.*; public class Embeds_shot_png extends BitmapAsset { } }//package GlobalSetup
Section 168
//Embeds_shot2_png (GlobalSetup.Embeds_shot2_png) package GlobalSetup { import mx.core.*; public class Embeds_shot2_png extends BitmapAsset { } }//package GlobalSetup
Section 169
//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 170
//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 171
//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 172
//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 173
//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 174
//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 175
//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 176
//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 177
//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 178
//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 179
//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 180
//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 181
//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 182
//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 183
//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 184
//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 185
//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 186
//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 187
//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 188
//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 189
//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 190
//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 191
//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 192
//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 193
//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 194
//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 195
//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 196
//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 197
//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 198
//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 199
//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 200
//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 201
//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 202
//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 203
//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 204
//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 205
//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 206
//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 207
//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 208
//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 209
//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 210
//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 211
//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 212
//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 213
//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 214
//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 215
//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 216
//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 217
//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 218
//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 219
//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 220
//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 221
//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 222
//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 223
//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 224
//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 225
//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 226
//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 227
//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 228
//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 229
//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 230
//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 231
//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 232
//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 233
//Embeds_solid_png (GlobalSetup.Embeds_solid_png) package GlobalSetup { import mx.core.*; public class Embeds_solid_png extends BitmapAsset { } }//package GlobalSetup
Section 234
//Embeds_tick_png (GlobalSetup.Embeds_tick_png) package GlobalSetup { import mx.core.*; public class Embeds_tick_png extends BitmapAsset { } }//package GlobalSetup
Section 235
//Embeds_tree1_png (GlobalSetup.Embeds_tree1_png) package GlobalSetup { import mx.core.*; public class Embeds_tree1_png extends BitmapAsset { } }//package GlobalSetup
Section 236
//Embeds_tree2_png (GlobalSetup.Embeds_tree2_png) package GlobalSetup { import mx.core.*; public class Embeds_tree2_png extends BitmapAsset { } }//package GlobalSetup
Section 237
//Embeds_tree3_png (GlobalSetup.Embeds_tree3_png) package GlobalSetup { import mx.core.*; public class Embeds_tree3_png extends BitmapAsset { } }//package GlobalSetup
Section 238
//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 239
//LayerFilter (Layout.LayerFilter) package Layout { import GameObject.*; public class LayerFilter { public static function applyAlphaInOut(_arg1:Object, _arg2:int, _arg3:int, _arg4:int, _arg5:int){ var _local6:Array; var _local7:GameObject; var _local8:GameObjectFilterFadeInOut; _local6 = 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; _local7 = 0; _local8 = Layout(_arg1); for each (_arg1 in _local8.children) { applyAlphaInOut(_arg1, (_arg2 + (_arg6 * _local7)), _arg3, _arg4, _arg5); _local7++; }; } public static function getObjectsArray(_arg1:Object):Array{ var _local2:Array; if ((_arg1 is Layout)){ _local2 = Layout(_arg1).getGameObjects(); }; if ((_arg1 is GameObject)){ _local2 = [_arg1]; }; return (_local2); } public static function applyDampenIn(_arg1:Object, _arg2:int=800, _arg3:int=0, _arg4:int=5):void{ var _local5:Array; var _local6:int; var _local7:GameObject; var _local8:GameObjectFilterDampenInterpolateIn; _local5 = getObjectsArray(_arg1); _local6 = 0; 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 applySlideIn(_arg1:Object, _arg2:int=0, _arg3:int=800, _arg4:int=0, _arg5:Boolean=false):void{ var _local6:Array; var _local7:int; var _local8:GameObject; var _local9:GameObjectFilterSqrtInterpolateIn; _local6 = getObjectsArray(_arg1); _local7 = 1; for each (_local8 in _local6) { _local9 = new GameObjectFilterSqrtInterpolateIn(); if (_arg2 != 0){ _local7 = _arg2; }; _local9.dx = (_local7 * _arg3); _local9.dy = _arg4; _local9.FadeTime = 80; _local9.useAlpha = _arg5; _local8.addFilter(_local9); _local7 = (_local7 * -1); }; } } }//package Layout
Section 240
//Layout (Layout.Layout) package Layout { import GameObject.*; public class Layout { public var spacing:Number;// = 0 public var leaf:GameObject; public var dir:int;// = 0 public var globalx:Number;// = 0 public var globaly:Number;// = 0 public var x:Number;// = 0 public var y:Number;// = 0 public var children:Array; public function Layout(){ dir = 0; spacing = 0; x = 0; y = 0; globalx = 0; globaly = 0; super(); } public function width():Number{ var _local1:Number; var _local2:Layout; if (leaf){ return (leaf.baseWidth); }; _local1 = 0; if (dir == 0){ _local1 = (spacing * (children.length - 1)); for each (_local2 in children) { _local1 = (_local1 + _local2.width()); }; } else { for each (_local2 in children) { _local1 = Math.max(_local1, (_local2.width() + spacing)); }; }; return (_local1); } public function height():Number{ var _local1:Number; var _local2:Layout; if (leaf){ return (leaf.baseHeight); }; _local1 = 0; if (dir == 1){ _local1 = (spacing * (children.length - 1)); for each (_local2 in children) { _local1 = (_local1 + _local2.height()); }; } else { for each (_local2 in children) { _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) { children[_local3].layout((_arg1 + children[_local3].x), (_arg2 + children[_local3].y)); _local3++; }; } 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 static function createLeaves(_arg1:Array):Array{ var _local2:Array; var _local3:int; var _local4:Object; var _local5:Layout; _local2 = new Array(); _local3 = 0; 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{ var _local5:Layout; _arg1 = createLeaves(_arg1); _local5 = 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{ var _local5:Layout; _arg1 = createLeaves(_arg1); _local5 = new (Layout); _local5.dir = 0; _local5.spacing = _arg2; _local5.children = _arg1; _local5.layout(_arg3, _arg4); return (_local5); } } }//package Layout
Section 241
//DefaultSet (Levels.DefaultSet) package Levels { import GameScene.*; import Objects.*; public class DefaultSet { public function init(_arg1:int, _arg2:GameScene):void{ if (_arg1 == 0){ new PipeBig(_arg2, 215.25, 322.5); new PipeBig(_arg2, 658.0625, 282.8125); new PipeBig(_arg2, 447.9375, 317.8125); new Tree2(_arg2, 658.6875, 574.0625); new Tree1(_arg2, 326.25, 565.25); new Tree2(_arg2, 287.6875, 576.5); new Tree3(_arg2, 606, 567); new Tree3(_arg2, 787, 567); new Tree3(_arg2, 67, 569); new Blimp(_arg2, 434.5, 143); }; if (_arg1 == 1){ new PipeBig(_arg2, 163.3125, 365.0625); new PipeBig(_arg2, 417, 312); new Tree2(_arg2, 345.3125, 568.5); new Tree3(_arg2, 275.3125, 563.5); new Tree1(_arg2, 778.4375, 562.9375); new PipeBig(_arg2, 644.5, 260.6875); new Rock2(_arg2, 441, 521); new Tree1(_arg2, 98, 565); new Tree2(_arg2, 114, 571); new Tree2(_arg2, 793, 573); new Tree2(_arg2, 589, 571); new FloatObstacle(_arg2, 641, 427); new FloatObstacle(_arg2, 247, 174); }; if (_arg1 == 2){ new Tree3(_arg2, 299.1875, 559.9375); new Tree1(_arg2, 207.1875, 564.9375); new Tree2(_arg2, 714.1875, 570.9375); new Tree1(_arg2, 496.1875, 565.9375); new Tree3(_arg2, 444.1875, 584.9375); new PipeBig(_arg2, 174.8125, 429.5); new PipeBig(_arg2, 339.8125, 426.5); new PipeBig(_arg2, 577.8125, 308.5); new PipeBig(_arg2, 723.8125, 309.5); new Rock2(_arg2, 621.8125, 526.5); new Blimp(_arg2, 326, 210); }; if (_arg1 == 3){ new Tree2(_arg2, 787.6875, 573.1875); new Tree3(_arg2, 157.6875, 574.1875); new PipeBig(_arg2, 265.875, 416.375); new PipeBig(_arg2, 448.875, 439.375); new Tree1(_arg2, 220.125, 592.1875); new Tree1(_arg2, 717.3125, 566.375); new Tree2(_arg2, -115.75, 588.875); new Tree3(_arg2, -222.75, 578.875); new Tree1(_arg2, -271.75, 589.875); new PipeBig(_arg2, 616.5625, 404.9375); new PipeBig(_arg2, 613.5625, 171.9375); new PipeBig(_arg2, 447.5625, 150.9375); new PipeBig(_arg2, 262.5625, 173.9375); new Tree2(_arg2, 285.1875, 578.5); new Tree1(_arg2, 325.1875, 572.5); new Tree3(_arg2, 662.1875, 566.5); new FloatObstacle(_arg2, 452.1875, 292); new FloatObstacle(_arg2, 794.1875, 295); }; if (_arg1 == 4){ new PipeBig(_arg2, 288.75, 251.6875); new PipeBig(_arg2, 659.5625, 375.375); new PipeBig(_arg2, 474.5625, 414.375); new FloatObstacle(_arg2, 573, 182.3125); new Tree2(_arg2, 100, 573.3125); new Tree2(_arg2, 766, 581.3125); new Tree1(_arg2, 407, 573.3125); new Tree3(_arg2, 51.625, 567.75); new Tree3(_arg2, 451.4375, 589); new PipeBig(_arg2, 103.875, 207.375); new Rock2(_arg2, 578.8125, 545.1875); new Tree2(_arg2, 271.125, 577.5); new Tree2(_arg2, 646.125, 596.5); new Tree3(_arg2, 246.125, 577.5); }; if (_arg1 == 5){ new BonusBalloon(_arg2, 137.9375, 396.875); new BonusBalloon(_arg2, 196.9375, 387.875); new BonusBalloon(_arg2, 254.9375, 399.875); new BonusBalloon(_arg2, 740.5625, 398.75); new Tree3(_arg2, 123.0625, 563.4375); new Tree2(_arg2, 184.0625, 581.4375); new Tree1(_arg2, 740.0625, 568.4375); new Tree2(_arg2, 690.0625, 580.4375); new BonusBalloon(_arg2, 142.5625, 153); new BonusBalloon(_arg2, 201.5625, 144); new BonusBalloon(_arg2, 258.5625, 155); new BonusBalloon(_arg2, 628.5625, 150); new BonusBalloon(_arg2, 685.5625, 140); new BonusBalloon(_arg2, 742.5625, 149); new BonusBalloon(_arg2, 681.5625, 384); new BonusBalloon(_arg2, 626.5625, 396); new Rock2(_arg2, 445.5625, 537); }; if (_arg1 == 6){ new VertPipeBig(_arg2, 215.0625, 265.25); new VertPipeBig(_arg2, 675.0625, 269); new Tree3(_arg2, 682.0625, 571); new Tree1(_arg2, 9.0625, 567); new Tree3(_arg2, -165.4375, 572.8125); new PipeBig(_arg2, 29.375, 420.625); new Tree3(_arg2, 207.375, 570.3125); new Tree1(_arg2, 271.375, 584.3125); new PipeBig(_arg2, 862.0625, 413.3125); new Rock1(_arg2, 458.0625, 516.125); new Blimp(_arg2, 452.3125, 265.75); new Tree1(_arg2, 722.3125, 580.75); new Tree1(_arg2, 869.3125, 573.75); }; if (_arg1 == 7){ new Tree2(_arg2, 78.6875, 571.5625); new Tree3(_arg2, -114.875, 559.5625); new Tree1(_arg2, 476.125, 562.5625); new Tree2(_arg2, 832.5625, 569); new VertPipeBig(_arg2, 743.4375, 370.4375); new PipeBig(_arg2, 368.625, 439.6875); new PipeBig(_arg2, 604.625, 155.6875); new VertPipeBig(_arg2, 744.5, 279.0625); new PipeBig(_arg2, 368, 159); new Blimp(_arg2, 496.4375, 296.5); new Tree3(_arg2, 531.4375, 561.5); new PipeBig(_arg2, 179, 440.875); new Tree2(_arg2, 696, 570.875); new Tree3(_arg2, 707, 561.875); new Tree3(_arg2, 284, 561.875); }; if (_arg1 == 8){ new Blimp(_arg2, 203.9375, 272.125); new PipeBig(_arg2, 307.9375, 405.125); new Tree1(_arg2, 98.9375, 570.375); new Tree2(_arg2, 134.9375, 580.375); new Tree3(_arg2, 308.9375, 566.375); new VertPipeBig(_arg2, 536, 259.5); new VertPipeBig(_arg2, 537, 182.5); new VertPipeBig(_arg2, 799.625, 179.125); new VertPipeBig(_arg2, 799.625, 261.125); new FloatObstacle(_arg2, 669.4375, 203.125); new Tree2(_arg2, 843, 577.25); new Tree1(_arg2, 772, 569.25); new Tree3(_arg2, 1016.0625, 568.125); new PipeBig(_arg2, 77.25, 404.25); new PipeBig(_arg2, 654.5, 47.8125); new Rock2(_arg2, 480.8125, 532.0625); new Rock1(_arg2, 598.8125, 511.0625); }; if (_arg1 == 9){ new Tree1(_arg2, -161, 558.9375); new Tree1(_arg2, 242, 566.9375); new Tree1(_arg2, 958.3125, 569.625); new Tree2(_arg2, 323.3125, 581.625); new Tree3(_arg2, 758.3125, 566.625); new Tree2(_arg2, 710.3125, 580.625); new Tree1(_arg2, 373.3125, 568.625); new Tree2(_arg2, 8.0625, 575.875); new Tree3(_arg2, 55.0625, 565.875); new Rock1(_arg2, 530.875, 512.3125); new Rock2(_arg2, 146.9375, 522.875); new PipeBig(_arg2, 142.9375, 363.875); new Tree3(_arg2, 590.3125, 580.875); new Tree1(_arg2, 117.3125, 599.875); new Rock2(_arg2, 1104.75, 532.5625); new PipeBig(_arg2, 779.125, 396.5625); new PipeBig(_arg2, 523.125, 292.0625); new Blimp(_arg2, 519.625, 135.125); new PipeBig(_arg2, 1087.625, 298.125); new PipeBig(_arg2, 334.625, 343.125); new PipeBig(_arg2, 946.625, 367.125); new FloatObstacle(_arg2, 890.25, 206.8125); new FloatObstacle(_arg2, 157.25, 176.8125); }; if (_arg1 == 10){ new PipeBig(_arg2, 420.125, 502.0625); new PipeBig(_arg2, 714.9375, 346.25); new PipeBig(_arg2, 801.1875, 293.875); new Tree2(_arg2, 629.625, 584.25); new Tree3(_arg2, 183.625, 572.25); new Tree1(_arg2, 1.625, 580.25); new Rock2(_arg2, 948.8125, 530.3125); new Tree2(_arg2, 953.8125, 585.3125); new Tree1(_arg2, 849.8125, 574.3125); new Tree3(_arg2, 1024.8125, 571.3125); new PipeBig(_arg2, 65.9375, 395.375); new PipeBig(_arg2, 800.4375, 129.125); new PipeBig(_arg2, 714.4375, 59.125); new PipeBig(_arg2, 264.9375, 434.5); new Blimp(_arg2, 446.9375, 227.5625); new Tree1(_arg2, 140.4375, 578.25); new Tree2(_arg2, 50.4375, 584.25); new Tree1(_arg2, 593.4375, 583.25); }; if (_arg1 == 11){ new BonusBalloon(_arg2, 59.9375, 149.375); new BonusBalloon(_arg2, 107.9375, 169.375); new BonusBalloon(_arg2, 217.9375, 173.375); new BonusBalloon(_arg2, 267.9375, 149.375); new BonusBalloon(_arg2, 269.25, 395.0625); new BonusBalloon(_arg2, 212.25, 396.0625); new Rock2(_arg2, 111.1875, 524.75); new BonusBalloon(_arg2, 399.75, 451.5); new Rock1(_arg2, 599.625, 505.4375); new BonusBalloon(_arg2, 471.625, 129.4375); new BonusBalloon(_arg2, 657.625, 205.4375); new BonusBalloon(_arg2, 472.625, 184.4375); new BonusBalloon(_arg2, 658.625, 266.4375); new Tree2(_arg2, 676.6875, 578.625); new Tree3(_arg2, 24.6875, 568.625); new Tree3(_arg2, 484.6875, 571.625); new Tree1(_arg2, 237.6875, 571.625); new Tree2(_arg2, 256.6875, 578.625); new Tree2(_arg2, 451.6875, 581.625); new BonusBalloon(_arg2, 458.6875, 450.625); }; if (_arg1 == 12){ new PipeBig(_arg2, 525.9375, 399.875); new Blimp(_arg2, 425.9375, 157.1875); new Rock1(_arg2, 337.8125, 505.4375); new Rock2(_arg2, 696.3125, 527.3125); new Tree1(_arg2, 643.3125, 591.3125); new Tree3(_arg2, 279.3125, 575.3125); new Tree2(_arg2, 748.3125, 589.3125); new PipeBig(_arg2, 56.9375, 280.5); new PipeBig(_arg2, 283.9375, 295.5); new PipeBig(_arg2, 166.9375, 287.5); new VertPipeBig(_arg2, 687.4375, 221.3125); new Tree2(_arg2, 27.4375, 576.125); new Tree1(_arg2, 79.4375, 571.125); new Tree2(_arg2, 517.1875, 583.5625); }; if (_arg1 == 13){ new Pipe(_arg2, 152.75, 206.3125); new Pipe(_arg2, 446.75, 309.3125); new Tree3(_arg2, 572, 565); new Tree2(_arg2, 527, 581); new Blimp(_arg2, 435, 451); new PipeBig(_arg2, 671.3125, 399.6875); new Tree3(_arg2, 64.75, 569.125); new Tree1(_arg2, 139.75, 578.125); new Tree2(_arg2, 18.75, 590.125); new Tree3(_arg2, 397.75, 574.125); new Tree1(_arg2, 340.75, 579.125); new Tree2(_arg2, 293.75, 587.125); new Tree1(_arg2, 888.4375, 579.6875); new Tree2(_arg2, 816.4375, 588.6875); new Blimp(_arg2, 436.8125, 173.4375); new VertPipeBig(_arg2, 824.8125, 305.4375); }; if (_arg1 == 14){ new Pipe(_arg2, 139.0625, 463.5); new Pipe(_arg2, 417.0625, 461.5); new VertPipeBig(_arg2, 536.25, 306.25); new VertPipeBig(_arg2, 537.25, 139.25); new Pipe(_arg2, 658.5625, 45.625); new Tree3(_arg2, 525, 575.8125); new Tree2(_arg2, 493, 594.8125); new Tree2(_arg2, 76.3125, 573.5); new Tree1(_arg2, 153.3125, 575.5); new Tree3(_arg2, 344.3125, 568.5); new Tree1(_arg2, 374.3125, 581.5); new Tree2(_arg2, 295.3125, 586.5); new Rock2(_arg2, 614.4375, 523.8125); new Tree2(_arg2, 785.5625, 579.6875); }; if (_arg1 == 15){ new FloatObstacle(_arg2, 295.9375, 340.25); new Pipe(_arg2, 292.9375, 447.25); new FloatObstacle(_arg2, 739.5625, 331.9375); new Pipe(_arg2, 767.5625, 449.9375); new FloatObstacle(_arg2, 526.5625, 333.9375); new Pipe(_arg2, 528.5625, 494.9375); new Tree2(_arg2, 258.6875, 576.625); new Tree3(_arg2, 731.6875, 581.625); new Tree2(_arg2, 810.0625, 582.8125); new Tree3(_arg2, 35.6875, 563.375); new Tree1(_arg2, 456.6875, 576.375); new Tree2(_arg2, 615.6875, 581.375); new Blimp(_arg2, 530.6875, 39.3125); new Pipe(_arg2, 444.5, 206.8125); new Pipe(_arg2, 588.5, 208.8125); new Rock1(_arg2, 939.5, 515.8125); new Tree2(_arg2, 471.5, 584.8125); new Tree3(_arg2, 238.5, 573.8125); }; if (_arg1 == 16){ new VertPipe(_arg2, 445.75, 379.875); new Pipe(_arg2, 768.0625, 446.875); new FloatObstacle(_arg2, 283.8125, 230.8125); new Tree2(_arg2, 807.8125, 579.8125); new Tree3(_arg2, 77.8125, 568.8125); new Tree1(_arg2, 154.8125, 580.8125); new Tree1(_arg2, 484.8125, 574.8125); new Pipe(_arg2, 768.9375, 247.625); new Pipe(_arg2, 531.9375, 159.625); new FloatObstacle(_arg2, 646.25, 326.75); new Rock1(_arg2, 369.25, 509.875); new Rock2(_arg2, 900.25, 529.875); new Pipe(_arg2, 184, 329.3125); new Tree1(_arg2, 646, 579.3125); new Tree3(_arg2, 616, 577.3125); }; if (_arg1 == 17){ new BonusBalloon(_arg2, 172.3125, 62.9375); new BonusBalloon(_arg2, 140.3125, 100.9375); new BonusBalloon(_arg2, 126.3125, 149.9375); new BonusBalloon(_arg2, 148.3125, 197.9375); new BonusBalloon(_arg2, 181.3125, 232.9375); new BonusBalloon(_arg2, 223.3125, 257.9375); new BonusBalloon(_arg2, 720.25, 150.875); new BonusBalloon(_arg2, 704.25, 198.875); new BonusBalloon(_arg2, 666.25, 234.875); new BonusBalloon(_arg2, 619.25, 258.875); new BonusBalloon(_arg2, 704.25, 97.875); new BonusBalloon(_arg2, 668.25, 57.875); new Pole(_arg2, 426.9375, 554.75); new BonusBalloon(_arg2, 377.9375, 408.75); new BonusBalloon(_arg2, 351.9375, 457.75); new BonusBalloon(_arg2, 311.9375, 496.75); new BonusBalloon(_arg2, 259.9375, 509.75); new BonusBalloon(_arg2, 467.9375, 407.75); new BonusBalloon(_arg2, 488.9375, 460.75); new BonusBalloon(_arg2, 523.9375, 496.75); new BonusBalloon(_arg2, 573.9375, 514.75); }; if (_arg1 == 18){ new Pipe(_arg2, 115.5625, 410.75); new Pipe(_arg2, 206.5625, 375.75); new Pipe(_arg2, 336.5625, 180.75); new VertPipe(_arg2, 578.5625, 408.75); new VertPipe(_arg2, 881.5, 413.25); new Rock1(_arg2, 414.5, 503.25); new Tree2(_arg2, 359.9375, 586); new Tree1(_arg2, 468.9375, 579); new Tree3(_arg2, 97.9375, 578); new Tree3(_arg2, 798.9375, 571); new Tree1(_arg2, 749.9375, 585); new Tree1(_arg2, 164.9375, 578); new FloatObstacle(_arg2, 391.9375, 296); new FloatObstacle(_arg2, 742.3125, 339.4375); new Pipe(_arg2, 437.9375, 180.5); new VertPipeRoll(_arg2, 534.125, 247.5); new FloatObstacle(_arg2, 343.4375, 379.875); }; if (_arg1 == 19){ new Tree1(_arg2, 164.375, 558.6875); new Tree3(_arg2, 225.375, 581.6875); new Tree2(_arg2, 98.375, 568.6875); new Pipe(_arg2, 210.0625, 476.625); new Tree2(_arg2, 420.5625, 569.9375); new Tree3(_arg2, 760.5625, 567.9375); new Rock2(_arg2, 351.5625, 521.9375); new Tree1(_arg2, 319.4375, 571.4375); new Pipe(_arg2, 415.4375, 398.4375); new FloatObstacle(_arg2, 419.4375, 306.4375); new Pole(_arg2, 801.4375, 548.375); new Pipe(_arg2, 500.5625, 436.5625); new Pipe(_arg2, 588.5625, 465.5625); new FloatObstacle(_arg2, 495.375, 220.3125); new PipeRoll(_arg2, 239.8125, 248.8125); new PipeRoll(_arg2, 321.8125, 198.8125); new PipeRoll(_arg2, 412.8125, 146.8125); }; if (_arg1 == 20){ new Pipe(_arg2, 97, 304.1875); new Pipe(_arg2, 182, 349.1875); new Pipe(_arg2, 265, 391.1875); new VertPipe(_arg2, 683.5625, 400.25); new VertPipe(_arg2, 675.5625, 195.25); new Pipe(_arg2, 744.5625, 119.375); new Pipe(_arg2, 844.5625, 174.375); new FloatObstacle(_arg2, 783.5625, 235.375); new FloatObstacle(_arg2, 581.4375, 384.9375); new Pole(_arg2, 762.4375, 551.9375); new Tree2(_arg2, 275.4375, 572.9375); new Tree3(_arg2, 209.4375, 560.9375); new Rock1(_arg2, 414.4375, 511.9375); new Tree3(_arg2, 797.125, 572.875); new Tree1(_arg2, 722.125, 576.875); new Tree3(_arg2, 370.125, 570.875); new Tree1(_arg2, 43.6875, 562.375); new VertPipeRoll(_arg2, 658.0625, 296.25); new VertPipeRoll(_arg2, 503, 418); }; if (_arg1 == 21){ new VertPipe(_arg2, 318.6875, 359.1875); new VertPipe(_arg2, 636.6875, 249.1875); new FloatObstacle(_arg2, 638.0625, 420.0625); new Pole(_arg2, 325.0625, 551.0625); new Rock2(_arg2, 40.5625, 522.875); new Tree3(_arg2, 368.5625, 561.875); new Tree1(_arg2, 808.5, 568.75); new Tree1(_arg2, -19.3125, 574.6875); new Tree3(_arg2, 97.6875, 574.6875); new Tree2(_arg2, 287.6875, 577.6875); new Pipe(_arg2, 774.4375, 171.875); new Pipe(_arg2, 873.4375, 170.875); new FloatObstacle(_arg2, 383, 165.625); new VertPipe(_arg2, 501.1875, 199.8125); new VertPipe(_arg2, 478.1875, 354.8125); new VertPipe(_arg2, 150.1875, 361.8125); new VertPipeBigRoll(_arg2, 478, 295.9375); }; if (_arg1 == 22){ new Blimp(_arg2, 611.375, 242.25); new Tree2(_arg2, 621.5, 572.5625); new Tree3(_arg2, 664.5, 563.5625); new Tree1(_arg2, 133.5, 563.5625); new Tree2(_arg2, 178.5, 574.5625); new Tree3(_arg2, 252.5, 564.5625); new Rock2(_arg2, 417.5, 524.5625); new Tree2(_arg2, 476.5, 570.5625); new Tree1(_arg2, 367.5, 566.5625); new PipeRoll(_arg2, 31.5625, 316.625); new Pipe(_arg2, 155.625, 365.375); new Pipe(_arg2, 387.625, 256.375); new Pipe(_arg2, 611.625, 137.375); new Blimp(_arg2, 153.625, 258.375); new PipeBigRoll(_arg2, 271, 325); new PipeBigRoll(_arg2, 492, 191); new PipeBigRoll(_arg2, 714, 177); }; if (_arg1 == 23){ new BonusBalloon(_arg2, 184.8125, 256.5); new BonusBalloon(_arg2, 340.8125, 202.5); new BonusBalloon(_arg2, 407.8125, 161.5); new BonusBalloon(_arg2, 473.8125, 204.5); new BonusBalloon(_arg2, 509.8125, 269.5); new BonusBalloon(_arg2, 475.8125, 338.5); new BonusBalloon(_arg2, 409.8125, 373.5); new BonusBalloon(_arg2, 341.8125, 340.5); new BonusBalloon(_arg2, 303.8125, 267.5); new BonusBalloon(_arg2, 134.625, 268.25); new BonusBalloon(_arg2, 84.625, 256.25); new BonusBalloon(_arg2, 625.9375, 253.8125); new BonusBalloon(_arg2, 672.9375, 271.8125); new BonusBalloon(_arg2, 718.9375, 253.8125); new BonusBalloon(_arg2, 412.6875, 476.25); new BonusBalloon(_arg2, 366.6875, 464.25); new BonusBalloon(_arg2, 458.6875, 462.25); new BonusBalloon(_arg2, 246.9375, 143.625); new BonusBalloon(_arg2, 310.9375, 83.625); new BonusBalloon(_arg2, 406.9375, 46.625); new BonusBalloon(_arg2, 497.9375, 86.625); new BonusBalloon(_arg2, 551.9375, 147.625); }; if (_arg1 == 24){ new PipeRoll(_arg2, 83.25, 418.1875); new VertPipeRoll(_arg2, 202.25, 270.1875); new VertPipeRoll(_arg2, 202.625, 84.6875); new PipeRoll(_arg2, 362.625, 41.8125); new Pipe(_arg2, 538.625, 37.8125); new VertPipeRoll(_arg2, 646.625, 152.8125); new VertPipe(_arg2, 648.75, 283.875); new Tree2(_arg2, 458.8125, 573.0625); new Tree3(_arg2, 226.8125, 564.0625); new Tree1(_arg2, 158.375, 566.5625); new FloatObstacle(_arg2, 129.9375, 278.8125); new FloatObstacle(_arg2, 275.9375, 277.8125); new FloatObstacle(_arg2, 573.9375, 294.8125); new FloatObstacle(_arg2, 723.9375, 291.8125); new Pole(_arg2, 651.5625, 555.25); new PipeBig(_arg2, 774.8125, 425.4375); new FloatObstacle(_arg2, 433.5, 144.5625); }; if (_arg1 == 25){ new Rock2(_arg2, 363.5625, 538.25); new Tree2(_arg2, 305.5625, 576.25); new Tree3(_arg2, 250.5625, 571.25); new VertPipeBig(_arg2, 358.5625, 355.25); new VertPipeRoll(_arg2, 357.5625, 272.25); new VertPipe(_arg2, 165.375, 158.4375); new VertPipeBigRoll(_arg2, 166.375, 245.4375); new FloatObstacle(_arg2, 107.25, 108.1875); new PipeBig(_arg2, 531.3125, 392.6875); new PipeBig(_arg2, 614.3125, 392.6875); new VertPipeBig(_arg2, 731.3125, 327.6875); new PipeBig(_arg2, 820.3125, 98.75); new VertPipeRoll(_arg2, 744.3125, 207.75); new FloatObstacle(_arg2, 717.125, 439.5); new FloatObstacle(_arg2, 738.375, 65.375); new Tree2(_arg2, 636.3125, 574.75); new Tree3(_arg2, 584.3125, 567.75); new Tree1(_arg2, 508.3125, 573.75); new Tree1(_arg2, 812.875, 569.0625); }; if (_arg1 == 26){ new PipeBig(_arg2, 57.4375, 493.4375); new Pipe(_arg2, 139.4375, 494.4375); new PipeBigRoll(_arg2, 210.4375, 494.4375); new Rock1(_arg2, 345.4375, 503.4375); new FloatObstacle(_arg2, 208.4375, 375.4375); new VertPipeBig(_arg2, 283.25, 302.5); new VertPipeBig(_arg2, 309.25, 221.5); new VertPipeBig(_arg2, 341.25, 148.5); new PipeRoll(_arg2, 445.9375, 72.875); new VertPipeBigRoll(_arg2, 522.9375, 148.875); new VertPipeBigRoll(_arg2, 522.9375, 421.875); new Pipe(_arg2, 694.0625, 480.5); new Pipe(_arg2, 758.0625, 460.5); new Pipe(_arg2, 817.0625, 438.5); new Pipe(_arg2, 876.0625, 417.5); new FloatObstacle(_arg2, 457.25, 296.6875); new FloatObstacle(_arg2, 592.25, 297.6875); new Tree3(_arg2, 421.375, 567.0625); new Tree2(_arg2, 270.375, 585.0625); new Tree1(_arg2, 784.625, 572.875); new Tree3(_arg2, 724.625, 583.875); new Tree1(_arg2, -0.625, 577.5); }; if (_arg1 == 27){ new Pipe(_arg2, 32.875, 292.75); new Pipe(_arg2, 96.875, 276.75); new Pipe(_arg2, 157.875, 261.75); new Pipe(_arg2, 252.875, 433.75); new Pipe(_arg2, 374.875, 471.75); new Pipe(_arg2, 510.875, 300.75); new Pipe(_arg2, 566.875, 274.75); new Pipe(_arg2, 629.375, 88.625); new Pipe(_arg2, 760.375, 120.625); new Pole(_arg2, 200.375, 556.0625); new Blimp(_arg2, 767.5625, 213.8125); new PipeRoll(_arg2, 314.625, 453.125); new PipeRoll(_arg2, 697.5, 105.25); new Pipe(_arg2, 449.875, 327.25); new Rock1(_arg2, 585, 504.4375); new Tree2(_arg2, 241, 582.4375); new Tree3(_arg2, 154.5, 578.0625); new Tree1(_arg2, 34.5, 570.0625); }; if (_arg1 == 28){ new PipeRoll(_arg2, 86.6875, 448.5); new PipeRoll(_arg2, 304.5, 27.3125); new VertPipeRoll(_arg2, 410.875, 168.3125); new VertPipeRoll(_arg2, 414.875, 453.75); new Pipe(_arg2, 552.875, 488.75); new Pipe(_arg2, 202.875, 244.75); new Pipe(_arg2, 679.8125, 315.25); new Pipe(_arg2, 747.375, 85.3125); new Tree2(_arg2, 155.4375, 574.4375); new Tree2(_arg2, 666.4375, 571.4375); new Tree3(_arg2, 634.4375, 561.4375); new Tree1(_arg2, 291.4375, 565.4375); new Pole(_arg2, 224.4375, 551.4375); new FloatObstacle(_arg2, 462.0625, 59.375); new FloatObstacle(_arg2, 303.5, 160.1875); new FloatObstacle(_arg2, 766.75, 228.9375); }; if (_arg1 == 29){ new BonusBalloon(_arg2, 270.75, 287.125); new BonusBalloon(_arg2, 528.75, 286.125); new BonusBalloon(_arg2, 328.75, 320.125); new BonusBalloon(_arg2, 472.75, 319.125); new BonusBalloon(_arg2, 405.75, 329.125); new BonusBalloon(_arg2, 268.4375, 163.9375); new BonusBalloon(_arg2, 325.4375, 128.9375); new BonusBalloon(_arg2, 402.4375, 114.9375); new BonusBalloon(_arg2, 475.4375, 131.9375); new BonusBalloon(_arg2, 541.4375, 166.9375); new BonusBalloon(_arg2, 169.1875, 227.25); new BonusBalloon(_arg2, 123.1875, 259.25); new BonusBalloon(_arg2, 78.1875, 290.25); new BonusBalloon(_arg2, 32.1875, 324.25); new BonusBalloon(_arg2, 614.25, 235.8125); new BonusBalloon(_arg2, 656.25, 265.8125); new BonusBalloon(_arg2, 697.25, 296.8125); new BonusBalloon(_arg2, 740.25, 331.8125); new BonusBalloon(_arg2, 351.5, 441.3125); new BonusBalloon(_arg2, 404.5, 442.3125); new BonusBalloon(_arg2, 457.5, 442.3125); }; if (_arg1 == 30){ new PipeBigRoll(_arg2, 79.6875, 378.375); new VertPipeBig(_arg2, 189.6875, 279.375); new VertPipe(_arg2, 201.8125, 191.375); new VertPipe(_arg2, 209.8125, 128.375); new PipeRoll(_arg2, 285.125, 32.8125); new VertPipeRoll(_arg2, 441.5, 132.9375); new VertPipe(_arg2, 449.5, 195.9375); new VertPipe(_arg2, 457.5, 259.9375); new VertPipe(_arg2, 469.5, 323.9375); new PipeRoll(_arg2, 604.875, 404.0625); new Pipe(_arg2, 670.875, 412.0625); new Pipe(_arg2, 734.875, 423.0625); new Pipe(_arg2, 789.875, 433.0625); new Tree1(_arg2, 197.75, 563.9375); new Tree2(_arg2, 140.75, 576.9375); new Tree3(_arg2, 482.75, 563.9375); new Tree1(_arg2, 543.75, 573.9375); new Pole(_arg2, 680.4375, 552.1875); new Tree2(_arg2, 780.4375, 578.1875); new FloatObstacle(_arg2, 477, -6.5625); new FloatObstacle(_arg2, 217.1875, 410.125); }; if (_arg1 == 31){ new PipeRoll(_arg2, 56.4375, 288.875); new VertPipeRoll(_arg2, 162.4375, 386.875); new Pole(_arg2, 292.4375, 550.875); new Pipe(_arg2, 289.4375, 441.875); new Rock1(_arg2, 460.4375, 508.875); new Pipe(_arg2, 516.4375, 400.875); new PipeBig(_arg2, 611.1875, 485.4375); new VertPipeRoll(_arg2, 693.1875, 398.4375); new VertPipeRoll(_arg2, 721.1875, 264.4375); new VertPipeRoll(_arg2, 745.1875, 136.4375); new Blimp(_arg2, 385.4375, 250.6875); new Tree2(_arg2, 328.0625, 579.5625); new Tree3(_arg2, 13.0625, 569.5625); new Tree2(_arg2, 567.125, 578); new Tree3(_arg2, 636.125, 570); }; if (_arg1 == 32){ new PipeRoll(_arg2, 150.3125, 386.3125); new Pipe(_arg2, 297.3125, 424.3125); new PipeRoll(_arg2, 462.3125, 449.3125); new Pipe(_arg2, 629.3125, 425.3125); new VertPipe(_arg2, 691.3125, 355.3125); new VertPipe(_arg2, 692.1875, 288.375); new PipeRoll(_arg2, 746.1875, 215.375); new Pipe(_arg2, 800.1875, 204.375); new VertPipe(_arg2, 73, 309.6875); new VertPipe(_arg2, 72, 250.6875); new Tree2(_arg2, 72.3125, 577.625); new Tree3(_arg2, 125.3125, 568.625); new Tree1(_arg2, 488.3125, 567.625); new Tree2(_arg2, 533.3125, 578.625); new Tree3(_arg2, 760.3125, 563.625); new FloatObstacle(_arg2, 51.25, 456.0625); new FloatObstacle(_arg2, 706.0625, 466.875); }; if (_arg1 == 33){ new Pipe(_arg2, 35.5625, 182.875); new Pipe(_arg2, 121.5625, 160.875); new Pipe(_arg2, 204.5625, 149.875); new Pipe(_arg2, 283.5625, 156.875); new Pipe(_arg2, 352.5625, 190.875); new Pipe(_arg2, 588.5625, 227.875); new Pipe(_arg2, 669.5625, 194.875); new VertPipe(_arg2, 748.1875, 287.25); new VertPipe(_arg2, 750.1875, 370.25); new Pipe(_arg2, 677.1875, 458.25); new Pipe(_arg2, 524.1875, 502.25); new Pipe(_arg2, 445.1875, 520.25); new Pole(_arg2, 126.1875, 550.25); new Pipe(_arg2, 268.1875, 415.25); new Pipe(_arg2, 190.1875, 395.25); new Pipe(_arg2, 112.1875, 377.25); new PipeRoll(_arg2, 500.6875, 248.75); new PipeRoll(_arg2, 599.9375, 479.4375); new FloatObstacle(_arg2, 811.5, 136.5625); new FloatObstacle(_arg2, 439.6875, 168.6875); new Tree2(_arg2, 40.125, 572.625); new Tree3(_arg2, 770.3125, 565.4375); new Tree2(_arg2, 737.3125, 583.4375); new Tree1(_arg2, 90.3125, 568.4375); }; if (_arg1 == 34){ new PipeBig(_arg2, 62.6875, 140.4375); new PipeBig(_arg2, 134.6875, 98.4375); new PipeBig(_arg2, 207.6875, 63.4375); new PipeRoll(_arg2, 271.25, 56.3125); new Pipe(_arg2, 339.25, 78.3125); new Pipe(_arg2, 399.25, 101.3125); new VertPipeRoll(_arg2, 458.8125, 217.5); new VertPipe(_arg2, 452.8125, 285.5); new VertPipe(_arg2, 446.8125, 352.5); new Pole(_arg2, 372.8125, 553.5); new Pipe(_arg2, 574.3125, 483); new VertPipe(_arg2, 645.3125, 404); new Pipe(_arg2, 704.3125, 319); new VertPipe(_arg2, 771.3125, 232); new Tree2(_arg2, 334.5, 576.1875); new Tree3(_arg2, 679.5, 569.1875); new Tree1(_arg2, 37.5, 565.1875); new Tree3(_arg2, 105.5, 570.1875); new FloatObstacle(_arg2, 67.5625, 251.375); new FloatObstacle(_arg2, 71, 34.75); new FloatObstacle(_arg2, 542.6875, 104.9375); }; if (_arg1 == 35){ new BonusBalloon(_arg2, 36.5625, 360.375); new BonusBalloon(_arg2, 101.5625, 362.375); new BonusBalloon(_arg2, 162.5625, 357.375); new BonusBalloon(_arg2, 218.5625, 331.375); new BonusBalloon(_arg2, 254.5625, 284.375); new BonusBalloon(_arg2, 274.5625, 226.375); new BonusBalloon(_arg2, 510.4375, 225.625); new BonusBalloon(_arg2, 525.4375, 280.625); new BonusBalloon(_arg2, 554.4375, 332.625); new BonusBalloon(_arg2, 604.4375, 361.625); new BonusBalloon(_arg2, 668.4375, 366.625); new BonusBalloon(_arg2, 731.4375, 363.625); new BonusBalloon(_arg2, 396.5, 66.3125); new BonusBalloon(_arg2, 367.5, 106.3125); new BonusBalloon(_arg2, 428.5, 107.3125); new BonusBalloon(_arg2, 397.5, 149.3125); new BonusBalloon(_arg2, 122.5, 440.6875); new BonusBalloon(_arg2, 91.5, 481.6875); new BonusBalloon(_arg2, 155.5, 481.6875); new BonusBalloon(_arg2, 124.5, 523.6875); new BonusBalloon(_arg2, 646.8125, 515.875); new BonusBalloon(_arg2, 643.8125, 431.875); new BonusBalloon(_arg2, 608.8125, 473.875); new BonusBalloon(_arg2, 679.8125, 473.875); }; if (_arg1 == 36){ new Pipe(_arg2, 93.125, 310.8125); new VertPipe(_arg2, 182.125, 255.8125); new Pipe(_arg2, 254.125, 184.8125); new VertPipeRoll(_arg2, 338.4375, 127.9375); new PipeBig(_arg2, 404.0625, 51.5); new Pipe(_arg2, 477.0625, 60.5); new Pipe(_arg2, 535.0625, 88.5); new Pipe(_arg2, 729.0625, 198.5); new Pipe(_arg2, 787.0625, 218.5); new PipeRoll(_arg2, 592.375, 123.8125); new PipeRoll(_arg2, 18.75, 310.5625); new Tree2(_arg2, 44.1875, 575.6875); new Tree2(_arg2, 687.1875, 572.6875); new Tree3(_arg2, 620.1875, 564.6875); new Tree3(_arg2, 90.1875, 567.6875); new Tree1(_arg2, 154.1875, 577.6875); new Tree1(_arg2, 546.1875, 566.6875); new FloatObstacle(_arg2, 19.25, 392.9375); new FloatObstacle(_arg2, 21.25, 226.9375); new FloatObstacle(_arg2, 649.875, 233); new FloatObstacle(_arg2, 669.5, 83.3125); new Rock2(_arg2, 485.25, 525.875); new Tree2(_arg2, 425.25, 578.875); }; if (_arg1 == 37){ new Pipe(_arg2, 136.1875, 482.125); new Pipe(_arg2, 232.1875, 501.125); new Pipe(_arg2, 311.1875, 508.125); new FloatObstacle(_arg2, 395.1875, 385.125); new PipeRoll(_arg2, 35.1875, 472.125); new FloatObstacle(_arg2, 39.375, 380.6875); new PipeRoll(_arg2, 420, 460.625); new Pipe(_arg2, 513, 414.625); new Pipe(_arg2, 614, 408.625); new VertPipeRoll(_arg2, 703.5625, 331.5); new VertPipe(_arg2, 703.5625, 234.5); new VertPipe(_arg2, 701.5625, 142.5); new PipeRoll(_arg2, 499.8125, 128.125); new Pipe(_arg2, 392.8125, 168.125); new Pipe(_arg2, 308.8125, 168.125); new FloatObstacle(_arg2, 702.25, 14.0625); new FloatObstacle(_arg2, 354.25, 99.0625); new FloatObstacle(_arg2, 355.25, 234.0625); new Tree3(_arg2, 83.3125, 564.625); new Tree2(_arg2, 133.3125, 579.625); new Tree3(_arg2, 772.3125, 559.625); new Tree1(_arg2, 710.3125, 569.625); new Tree2(_arg2, 431.3125, 582.625); }; if (_arg1 == 38){ new Rock1(_arg2, 62.8125, 519.0625); new Rock2(_arg2, 493.8125, 534.0625); new Tree3(_arg2, 767.9375, 568.3125); new Rock1(_arg2, 829.9375, 533.3125); new Tree3(_arg2, 891.9375, 571.3125); new Tree3(_arg2, 433.9375, 575.3125); new Tree2(_arg2, 107, 583.4375); new Tree3(_arg2, -3, 572.4375); new Pipe(_arg2, 219.875, 465.8125); new Pipe(_arg2, 268.875, 486.8125); new PipeRoll(_arg2, 319.875, 486.8125); new Pipe(_arg2, 364.875, 468.8125); new Pipe(_arg2, 589.6875, 466.8125); new Pipe(_arg2, 661.6875, 480.8125); new Pipe(_arg2, 721.6875, 459.8125); new VertPipeRoll(_arg2, 783, 329.3125); new VertPipe(_arg2, 777, 269.3125); new VertPipe(_arg2, 753, 208.3125); new VertPipe(_arg2, 713, 152.3125); new Blimp(_arg2, 685.4375, 41.5625); new Pipe(_arg2, 528.4375, 152.5625); new VertPipeRoll(_arg2, 453.4375, 217.5625); new Pipe(_arg2, 366.4375, 270.5625); new FloatObstacle(_arg2, 492.4375, 316.5625); new FloatObstacle(_arg2, 116.625, 294.8125); }; if (_arg1 == 39){ new PipeBig(_arg2, 77.5625, 290.125); new Blimp(_arg2, 88.5625, 426.125); new Blimp(_arg2, 71.5625, 179.125); new FloatObstacle(_arg2, 209.5625, 276.25); new PipeRoll(_arg2, 207.5625, 371.25); new Pipe(_arg2, 289.5625, 352.25); new Pipe(_arg2, 372.5625, 351.25); new Pipe(_arg2, 457.5625, 380.25); new Pipe(_arg2, 582.375, 447.5); new Pipe(_arg2, 673.375, 495.5); new Pipe(_arg2, 758.375, 486.5); new FloatObstacle(_arg2, 546.375, 355.5); new FloatObstacle(_arg2, 535.375, 499.5); new PipeBig(_arg2, 825.875, 465.5625); new Tree2(_arg2, 442.25, 572.3125); new Tree3(_arg2, 476.25, 564.3125); new Tree3(_arg2, 98.25, 561.3125); new Tree1(_arg2, 151.25, 569.3125); new Tree1(_arg2, 781.25, 564.3125); new VertPipeRoll(_arg2, 732.1875, 188.4375); new VertPipeRoll(_arg2, 582.1875, 152.4375); new VertPipeRoll(_arg2, 435.1875, 112.4375); new VertPipeRoll(_arg2, 283.1875, 76.4375); }; if (_arg1 == 40){ new VertPipeRoll(_arg2, 86.5625, 471.25); new VertPipeRoll(_arg2, 199.5625, 307.25); new Pipe(_arg2, 376.5625, 181.25); new Pipe(_arg2, 423.5625, 200.25); new Pipe(_arg2, 494.5625, 275.25); new Pipe(_arg2, 538.5625, 298.25); new FloatObstacle(_arg2, 508.5625, 170.25); new FloatObstacle(_arg2, 58.5625, 387.25); new FloatObstacle(_arg2, 419.5625, 313.25); new Pipe(_arg2, 713.0625, 392.375); new Pipe(_arg2, 771.0625, 392.375); new PipeRoll(_arg2, 650.0625, 392.375); new Tree2(_arg2, 119.4375, 574.5); new Tree3(_arg2, 158.4375, 563.5); new Tree1(_arg2, 603.6875, 561.6875); new Tree2(_arg2, 648.6875, 573.6875); new Tree3(_arg2, 769.6875, 559.6875); new Tree3(_arg2, 307.6875, 564.6875); new Blimp(_arg2, 705.6875, 293.6875); new VertPipe(_arg2, 149.4375, 390.5); new VertPipe(_arg2, 243.4375, 230.5); new Rock2(_arg2, 699.5, 522.9375); }; if (_arg1 == 41){ new BonusBalloon(_arg2, 101.375, 436.75); new BonusBalloon(_arg2, 143.375, 405.75); new BonusBalloon(_arg2, 182.375, 375.75); new BonusBalloon(_arg2, 221.375, 348.75); new BonusBalloon(_arg2, 299.9375, 172.0625); new BonusBalloon(_arg2, 338.9375, 140.0625); new BonusBalloon(_arg2, 377.9375, 109.0625); new BonusBalloon(_arg2, 415.9375, 78.0625); new BonusBalloon(_arg2, 573.25, 77.125); new BonusBalloon(_arg2, 610.25, 105.125); new BonusBalloon(_arg2, 648.25, 136.125); new BonusBalloon(_arg2, 683.25, 164.125); new BonusBalloon(_arg2, 404.1875, 310.6875); new BonusBalloon(_arg2, 452.1875, 311.6875); new BonusBalloon(_arg2, 503.1875, 311.6875); new BonusBalloon(_arg2, 552.1875, 311.6875); new BonusBalloon(_arg2, 599.1875, 308.6875); new BonusBalloon(_arg2, 505.375, 362.5625); new BonusBalloon(_arg2, 506.375, 410.5625); new BonusBalloon(_arg2, 507.375, 461.5625); new BonusBalloon(_arg2, 769.5625, 350.75); new BonusBalloon(_arg2, 806.5625, 380.75); new BonusBalloon(_arg2, 844.5625, 408.75); new BonusBalloon(_arg2, 883.5625, 437.75); }; } } }//package Levels
Section 242
//IAutomationObject (mx.automation.IAutomationObject) package mx.automation { import flash.events.*; public interface IAutomationObject { function createAutomationIDPart(_arg1:IAutomationObject):Object; function get automationName():String; function get automationDelegate():Object; function set automationName(_arg1:String):void; function getAutomationChildAt(_arg1:int):IAutomationObject; function get showInAutomationHierarchy():Boolean; function get automationTabularData():Object; function resolveAutomationIDPart(_arg1:Object):Array; function replayAutomatableEvent(_arg1:Event):Boolean; function set automationDelegate(_arg1:Object):void; function get automationValue():Array; function get numAutomationChildren():int; function set showInAutomationHierarchy(_arg1:Boolean):void; } }//package mx.automation
Section 243
//Binding (mx.binding.Binding) package mx.binding { import mx.collections.errors.*; public class Binding { mx_internal var destFunc:Function; mx_internal var srcFunc:Function; mx_internal var destString:String; mx_internal var document:Object; private var hasHadValue:Boolean; mx_internal var isExecuting:Boolean; mx_internal var isHandlingEvent:Boolean; public var twoWayCounterpart:Binding; private var wrappedFunctionSuccessful:Boolean; public var uiComponentWatcher:int; private var lastValue:Object; mx_internal static const VERSION:String = "2.0.1.0"; public function Binding(_arg1:Object, _arg2:Function, _arg3:Function, _arg4:String){ this.document = _arg1; this.srcFunc = _arg2; this.destFunc = _arg3; this.destString = _arg4; isExecuting = false; isHandlingEvent = false; hasHadValue = false; uiComponentWatcher = -1; BindingManager.addBinding(_arg1, _arg4, this); } public function watcherFired(_arg1:Boolean, _arg2:int):void{ var commitEvent = _arg1; var cloneIndex = _arg2; if (isHandlingEvent){ return; }; try { isHandlingEvent = true; execute(cloneIndex); } finally { isHandlingEvent = false; }; } protected function wrapFunctionCall(_arg1:Object, _arg2:Function, _arg3:Object=null, ... _args):Object{ var result:Object; var thisArg = _arg1; var wrappedFunction = _arg2; var object = _arg3; var args = _args; wrappedFunctionSuccessful = false; try { result = wrappedFunction.apply(thisArg, args); wrappedFunctionSuccessful = true; return (result); } catch(itemPendingError:ItemPendingError) { itemPendingError.addResponder(new EvalBindingResponder(this, object)); if (BindingManager.debugDestinationStrings[destString]){ trace(((("Binding: destString = " + destString) + ", error = ") + itemPendingError)); }; } catch(rangeError:RangeError) { if (BindingManager.debugDestinationStrings[destString]){ trace(((("Binding: destString = " + destString) + ", error = ") + rangeError)); }; } catch(error:Error) { if (((((((((!((error.errorID == 1006))) && (!((error.errorID == 1009))))) && (!((error.errorID == 1010))))) && (!((error.errorID == 1055))))) && (!((error.errorID == 1069))))){ throw (error); } else { if (BindingManager.debugDestinationStrings[destString]){ trace(((("Binding: destString = " + destString) + ", error = ") + error)); }; }; }; return (null); } public function execute(_arg1:Object=null):void{ var o = _arg1; if (((isExecuting) || (((twoWayCounterpart) && (twoWayCounterpart.isExecuting))))){ hasHadValue = true; return; }; try { isExecuting = true; wrapFunctionCall(this, innerExecute, o); } finally { isExecuting = false; }; } private function nodeSeqEqual(_arg1:XMLList, _arg2:XMLList):Boolean{ var _local3:uint; var _local4:uint; _local3 = _arg1.length(); if (_local3 == _arg2.length()){ _local4 = 0; while ((((_local4 < _local3)) && ((_arg1[_local4] === _arg2[_local4])))) { _local4++; }; return ((_local4 == _local3)); //unresolved jump }; return (false); } private function innerExecute():void{ var _local1:Object; _local1 = wrapFunctionCall(document, srcFunc); if (BindingManager.debugDestinationStrings[destString]){ trace(((("Binding: destString = " + destString) + ", srcFunc result = ") + _local1)); }; if (((hasHadValue) || (wrappedFunctionSuccessful))){ if (((!((((((lastValue is XML)) && (lastValue.hasComplexContent()))) && ((lastValue === _local1))))) && (!((((((((lastValue is XMLList)) && (lastValue.hasComplexContent()))) && ((_local1 is XMLList)))) && (nodeSeqEqual((lastValue as XMLList), (_local1 as XMLList)))))))){ destFunc.call(document, _local1); lastValue = _local1; hasHadValue = true; }; }; } } }//package mx.binding
Section 244
//BindingManager (mx.binding.BindingManager) package mx.binding { public class BindingManager { mx_internal static const VERSION:String = "2.0.1.0"; static var debugDestinationStrings:Object = {}; public static function executeBindings(_arg1:Object, _arg2:String, _arg3:Object):void{ var _local4:String; if (((!(_arg2)) || ((_arg2 == "")))){ return; }; if (((((((_arg1) && (_arg1._bindingsByDestination))) && (_arg1._bindingsBeginWithWord))) && (_arg1._bindingsBeginWithWord[getFirstWord(_arg2)]))){ for (_local4 in _arg1._bindingsByDestination) { if (_local4.charAt(0) == _arg2.charAt(0)){ if ((((((_local4.indexOf((_arg2 + ".")) == 0)) || ((_local4.indexOf((_arg2 + "[")) == 0)))) || ((_local4 == _arg2)))){ _arg1._bindingsByDestination[_local4].execute(_arg3); }; }; }; }; } public static function addBinding(_arg1:Object, _arg2:String, _arg3:Binding):void{ if (!_arg1._bindingsByDestination){ _arg1._bindingsByDestination = {}; _arg1._bindingsBeginWithWord = {}; }; _arg1._bindingsByDestination[_arg2] = _arg3; _arg1._bindingsBeginWithWord[getFirstWord(_arg2)] = true; } public static function debugBinding(_arg1:String):void{ debugDestinationStrings[_arg1] = true; } private static function getFirstWord(_arg1:String):String{ var _local2:int; var _local3:int; var _local4:int; _local2 = _arg1.indexOf("."); _local3 = _arg1.indexOf("["); if (_local2 == _local3){ return (_arg1); }; _local4 = Math.min(_local2, _local3); if (_local4 == -1){ _local4 = Math.max(_local2, _local3); }; return (_arg1.substr(0, _local4)); } public static function getUIComponentWatcherForDestination(_arg1:Object, _arg2:String):int{ var _local3:String; if (_arg1._bindingsByDestination){ for (_local3 in _arg1._bindingsByDestination) { if ((((_local3 == _arg2)) && (!((_arg1._bindingsByDestination[_local3].uiComponentWatcher == -1))))){ return (_arg1._bindingsByDestination[_local3].uiComponentWatcher); }; }; }; return (-1); } } }//package mx.binding
Section 245
//EvalBindingResponder (mx.binding.EvalBindingResponder) package mx.binding { import mx.rpc.*; public class EvalBindingResponder implements IResponder { private var binding:Binding; private var object:Object; mx_internal static const VERSION:String = "2.0.1.0"; public function EvalBindingResponder(_arg1:Binding, _arg2:Object){ this.binding = _arg1; this.object = _arg2; } public function fault(_arg1:Object):void{ } public function result(_arg1:Object):void{ binding.execute(object); } } }//package mx.binding
Section 246
//ItemPendingError (mx.collections.errors.ItemPendingError) package mx.collections.errors { import mx.rpc.*; public class ItemPendingError extends Error { private var _responders:Array; mx_internal static const VERSION:String = "2.0.1.0"; public function ItemPendingError(_arg1:String){ super(_arg1); } public function addResponder(_arg1:IResponder):void{ if (!_responders){ _responders = []; }; _responders.push(_arg1); } public function get responders():Array{ return (_responders); } } }//package mx.collections.errors
Section 247
//ApplicationLayout (mx.containers.utilityClasses.ApplicationLayout) package mx.containers.utilityClasses { import mx.core.*; public class ApplicationLayout extends BoxLayout { mx_internal static const VERSION:String = "2.0.1.0"; override public function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local3:Container; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:int; var _local9:int; var _local10:IFlexDisplayObject; super.updateDisplayList(_arg1, _arg2); _local3 = super.target; if (((((_local3.horizontalScrollBar) && ((getHorizontalAlignValue() > 0)))) || (((_local3.verticalScrollBar) && ((getVerticalAlignValue() > 0)))))){ _local4 = _local3.getStyle("paddingLeft"); _local5 = _local3.getStyle("paddingTop"); _local6 = 0; _local7 = 0; _local8 = _local3.numChildren; _local9 = 0; while (_local9 < _local8) { _local10 = IFlexDisplayObject(_local3.getChildAt(_local9)); if (_local10.x < _local4){ _local6 = Math.max(_local6, (_local4 - _local10.x)); }; if (_local10.y < _local5){ _local7 = Math.max(_local7, (_local5 - _local10.y)); }; _local9++; }; if (((!((_local6 == 0))) || (!((_local7 == 0))))){ _local9 = 0; while (_local9 < _local8) { _local10 = IFlexDisplayObject(_local3.getChildAt(_local9)); IFlexDisplayObject(_local3.getChildAt(_local9)).move((_local10.x + _local6), (_local10.y + _local7)); _local9++; }; }; }; } } }//package mx.containers.utilityClasses
Section 248
//BoxLayout (mx.containers.utilityClasses.BoxLayout) package mx.containers.utilityClasses { import mx.core.*; import mx.controls.scrollClasses.*; import mx.containers.*; public class BoxLayout extends Layout { public var direction:String;// = "vertical" mx_internal static const VERSION:String = "2.0.1.0"; public function BoxLayout(){ direction = BoxDirection.VERTICAL; super(); } private function isVertical():Boolean{ return (!((direction == BoxDirection.HORIZONTAL))); } override public function measure():void{ var _local1:Container; var _local2:Boolean; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:int; var _local8:int; var _local9:int; var _local10:Number; var _local11:Number; var _local12:IUIComponent; var _local13:Number; var _local14:Number; _local1 = super.target; _local2 = isVertical(); _local3 = 0; _local4 = 0; _local5 = 0; _local6 = 0; _local7 = _local1.numChildren; _local8 = _local7; _local9 = 0; while (_local9 < _local7) { _local12 = IUIComponent(_local1.getChildAt(_local9)); if (!_local12.includeInLayout){ _local8--; } else { _local13 = _local12.getExplicitOrMeasuredWidth(); _local14 = _local12.getExplicitOrMeasuredHeight(); if (_local2){ _local3 = Math.max((isNaN(_local12.percentWidth)) ? _local13 : _local12.minWidth, _local3); _local5 = Math.max(_local13, _local5); _local4 = (_local4 + (isNaN(_local12.percentHeight)) ? _local14 : _local12.minHeight); _local6 = (_local6 + _local14); } else { _local3 = (_local3 + (isNaN(_local12.percentWidth)) ? _local13 : _local12.minWidth); _local5 = (_local5 + _local13); _local4 = Math.max((isNaN(_local12.percentHeight)) ? _local14 : _local12.minHeight, _local4); _local6 = Math.max(_local14, _local6); }; }; _local9++; }; _local10 = widthPadding(_local8); _local11 = heightPadding(_local8); _local1.measuredMinWidth = (_local3 + _local10); _local1.measuredMinHeight = (_local4 + _local11); _local1.measuredWidth = (_local5 + _local10); _local1.measuredHeight = (_local6 + _local11); } mx_internal function getHorizontalAlignValue():Number{ var _local1:String; _local1 = target.getStyle("horizontalAlign"); if (_local1 == "center"){ return (0.5); }; if (_local1 == "right"){ return (1); }; return (0); } mx_internal function heightPadding(_arg1:Number):Number{ var _local2:EdgeMetrics; var _local3:Number; _local2 = target.viewMetricsAndPadding; _local3 = (_local2.top + _local2.bottom); if ((((_arg1 > 1)) && (isVertical()))){ _local3 = (_local3 + (target.getStyle("verticalGap") * (_arg1 - 1))); }; return (_local3); } mx_internal function widthPadding(_arg1:Number):Number{ var _local2:EdgeMetrics; var _local3:Number; _local2 = target.viewMetricsAndPadding; _local3 = (_local2.left + _local2.right); if ((((_arg1 > 1)) && ((isVertical() == false)))){ _local3 = (_local3 + (target.getStyle("horizontalGap") * (_arg1 - 1))); }; return (_local3); } override public function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local3:Container; var _local4:int; var _local5:EdgeMetrics; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:ScrollBar; var _local15:ScrollBar; var _local16:Number; var _local17:int; var _local18:Number; var _local19:Number; var _local20:Number; var _local21:int; var _local22:IUIComponent; var _local23:IUIComponent; var _local24:Number; var _local25:Number; var _local26:Number; var _local27:Number; _local3 = super.target; _local4 = _local3.numChildren; if (_local4 == 0){ return; }; _local5 = _local3.viewMetricsAndPadding; _local6 = _local3.getStyle("paddingLeft"); _local7 = _local3.getStyle("paddingTop"); _local8 = getHorizontalAlignValue(); _local9 = getVerticalAlignValue(); _local10 = ((((_local3.scaleX > 0)) && (!((_local3.scaleX == 1))))) ? (_local3.minWidth / Math.abs(_local3.scaleX)) : _local3.minWidth; _local11 = ((((_local3.scaleY > 0)) && (!((_local3.scaleY == 1))))) ? (_local3.minHeight / Math.abs(_local3.scaleY)) : _local3.minHeight; _local12 = ((Math.max(_arg1, _local10) - _local5.right) - _local5.left); _local13 = ((Math.max(_arg2, _local11) - _local5.bottom) - _local5.top); _local14 = _local3.horizontalScrollBar; _local15 = _local3.verticalScrollBar; if (_local4 == 1){ _local23 = IUIComponent(_local3.getChildAt(0)); _local24 = _local23.percentWidth; _local25 = _local23.percentHeight; if (_local24){ _local26 = Math.max(_local23.minWidth, Math.min(_local23.maxWidth, ((_local24)>=100) ? _local12 : ((_local12 * _local24) / 100))); } else { _local26 = _local23.getExplicitOrMeasuredWidth(); }; if (_local25){ _local27 = Math.max(_local23.minHeight, Math.min(_local23.maxHeight, ((_local25)>=100) ? _local13 : ((_local13 * _local25) / 100))); } else { _local27 = _local23.getExplicitOrMeasuredHeight(); }; if ((((_local23.scaleX == 1)) && ((_local23.scaleY == 1)))){ _local23.setActualSize(Math.floor(_local26), Math.floor(_local27)); } else { _local23.setActualSize(_local26, _local27); }; if (((!((_local15 == null))) && ((_local3.verticalScrollPolicy == ScrollPolicy.AUTO)))){ _local12 = (_local12 + _local15.minWidth); }; if (((!((_local14 == null))) && ((_local3.horizontalScrollPolicy == ScrollPolicy.AUTO)))){ _local13 = (_local13 + _local14.minHeight); }; _local20 = (((_local12 - _local23.width) * _local8) + _local6); _local19 = (((_local13 - _local23.height) * _local9) + _local7); _local23.move(Math.floor(_local20), Math.floor(_local19)); } else { if (isVertical()){ _local16 = _local3.getStyle("verticalGap"); _local17 = _local4; _local21 = 0; while (_local21 < _local4) { if (!IUIComponent(_local3.getChildAt(_local21)).includeInLayout){ _local17--; }; _local21++; }; _local18 = Flex.flexChildHeightsProportionally(_local3, (_local13 - ((_local17 - 1) * _local16)), _local12); if (((!((_local14 == null))) && ((_local3.horizontalScrollPolicy == ScrollPolicy.AUTO)))){ _local18 = (_local18 + _local14.minHeight); }; if (((!((_local15 == null))) && ((_local3.verticalScrollPolicy == ScrollPolicy.AUTO)))){ _local12 = (_local12 + _local15.minWidth); }; _local19 = (_local7 + (_local18 * _local9)); _local21 = 0; while (_local21 < _local4) { _local22 = IUIComponent(_local3.getChildAt(_local21)); _local20 = (((_local12 - _local22.width) * _local8) + _local6); _local22.move(Math.floor(_local20), Math.floor(_local19)); if (_local22.includeInLayout){ _local19 = (_local19 + (_local22.height + _local16)); }; _local21++; }; } else { _local16 = _local3.getStyle("horizontalGap"); _local17 = _local4; _local21 = 0; while (_local21 < _local4) { if (!IUIComponent(_local3.getChildAt(_local21)).includeInLayout){ _local17--; }; _local21++; }; _local18 = Flex.flexChildWidthsProportionally(_local3, (_local12 - ((_local17 - 1) * _local16)), _local13); if (((!((_local14 == null))) && ((_local3.horizontalScrollPolicy == ScrollPolicy.AUTO)))){ _local13 = (_local13 + _local14.minHeight); }; if (((!((_local15 == null))) && ((_local3.verticalScrollPolicy == ScrollPolicy.AUTO)))){ _local18 = (_local18 + _local15.minWidth); }; _local20 = (_local6 + (_local18 * _local8)); _local21 = 0; while (_local21 < _local4) { _local22 = IUIComponent(_local3.getChildAt(_local21)); _local19 = (((_local13 - _local22.height) * _local9) + _local7); _local22.move(Math.floor(_local20), Math.floor(_local19)); if (_local22.includeInLayout){ _local20 = (_local20 + (_local22.width + _local16)); }; _local21++; }; }; }; } mx_internal function getVerticalAlignValue():Number{ var _local1:String; _local1 = target.getStyle("verticalAlign"); if (_local1 == "middle"){ return (0.5); }; if (_local1 == "bottom"){ return (1); }; return (0); } } }//package mx.containers.utilityClasses
Section 249
//CanvasLayout (mx.containers.utilityClasses.CanvasLayout) package mx.containers.utilityClasses { import mx.core.*; import flash.display.*; import mx.styles.*; import flash.geom.*; import mx.events.*; public class CanvasLayout extends Layout { private var _contentArea:Rectangle; mx_internal static const VERSION:String = "2.0.1.0"; private static var r:Rectangle = new Rectangle(); private function applyAnchorStylesDuringUpdateDisplayList(_arg1:Number, _arg2:Number, _arg3:IUIComponent):void{ var _local4:IStyleClient; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Boolean; var _local16:Boolean; _local4 = (_arg3 as IStyleClient); if (!_local4){ return; }; _local5 = _local4.getStyle("left"); _local6 = _local4.getStyle("right"); _local7 = _local4.getStyle("horizontalCenter"); _local8 = _local4.getStyle("top"); _local9 = _local4.getStyle("bottom"); _local10 = _local4.getStyle("verticalCenter"); _local15 = false; _local16 = false; if (((!(isNaN(_local5))) && (!(isNaN(_local6))))){ _local11 = ((_arg1 - _local5) - _local6); if (_local11 < _arg3.minWidth){ _local11 = _arg3.minWidth; }; } else { if (!isNaN(_arg3.percentWidth)){ _local11 = ((_arg3.percentWidth / 100) * _arg1); _local11 = bound(_local11, _arg3.minWidth, _arg3.maxWidth); _local15 = true; } else { _local11 = _arg3.getExplicitOrMeasuredWidth(); }; }; if (((!(isNaN(_local8))) && (!(isNaN(_local9))))){ _local12 = ((_arg2 - _local8) - _local9); if (_local12 < _arg3.minHeight){ _local12 = _arg3.minHeight; }; } else { if (!isNaN(_arg3.percentHeight)){ _local12 = ((_arg3.percentHeight / 100) * _arg2); _local12 = bound(_local12, _arg3.minHeight, _arg3.maxHeight); _local16 = true; } else { _local12 = _arg3.getExplicitOrMeasuredHeight(); }; }; if (!isNaN(_local7)){ _local13 = Math.round((((_arg1 - _local11) / 2) + _local7)); } else { if (!isNaN(_local5)){ _local13 = _local5; } else { if (!isNaN(_local6)){ _local13 = ((_arg1 - _local6) - _local11); }; }; }; if (!isNaN(_local10)){ _local14 = Math.round((((_arg2 - _local12) / 2) + _local10)); } else { if (!isNaN(_local8)){ _local14 = _local8; } else { if (!isNaN(_local9)){ _local14 = ((_arg2 - _local9) - _local12); }; }; }; _local13 = (isNaN(_local13)) ? _arg3.x : _local13; _local14 = (isNaN(_local14)) ? _arg3.y : _local14; _arg3.move(_local13, _local14); if (_local15){ if ((_local13 + _local11) > _arg1){ _local11 = Math.max((_arg1 - _local13), _arg3.minWidth); }; }; if (_local16){ if ((_local14 + _local12) > _arg2){ _local12 = Math.max((_arg2 - _local14), _arg3.minHeight); }; }; if (((!(isNaN(_local11))) && (!(isNaN(_local12))))){ _arg3.setActualSize(_local11, _local12); }; } override public function set target(_arg1:Container):void{ var _local2:Container; var _local3:int; var _local4:int; _local2 = super.target; if (_arg1 != _local2){ if (_local2){ _local2.removeEventListener(ChildExistenceChangedEvent.CHILD_ADD, target_childAddHandler); _local2.removeEventListener(ChildExistenceChangedEvent.CHILD_REMOVE, target_childRemoveHandler); _local4 = _local2.numChildren; _local3 = 0; while (_local3 < _local4) { DisplayObject(_local2.getChildAt(_local3)).removeEventListener(MoveEvent.MOVE, child_moveHandler); _local3++; }; }; if (_arg1){ _arg1.addEventListener(ChildExistenceChangedEvent.CHILD_ADD, target_childAddHandler); _arg1.addEventListener(ChildExistenceChangedEvent.CHILD_REMOVE, target_childRemoveHandler); _local4 = _arg1.numChildren; _local3 = 0; while (_local3 < _local4) { DisplayObject(_arg1.getChildAt(_local3)).addEventListener(MoveEvent.MOVE, child_moveHandler); _local3++; }; }; super.target = _arg1; }; } override public function measure():void{ var _local1:Container; var _local2:Number; var _local3:Number; var _local4:EdgeMetrics; var _local5:Rectangle; _local1 = super.target; _local2 = 0; _local3 = 0; _local4 = _local1.viewMetrics; _contentArea = null; _local5 = measureContentArea(); _local1.measuredWidth = ((_local5.width + _local4.left) + _local4.right); _local1.measuredHeight = ((_local5.height + _local4.top) + _local4.bottom); } private function target_childAddHandler(_arg1:ChildExistenceChangedEvent):void{ DisplayObject(_arg1.relatedObject).addEventListener(MoveEvent.MOVE, child_moveHandler); } private function measureContentArea():Rectangle{ var _local1:int; var _local2:int; var _local3:IUIComponent; var _local4:IStyleClient; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; if (_contentArea){ return (_contentArea); }; _contentArea = new Rectangle(); _local1 = target.numChildren; _local2 = 0; while (_local2 < _local1) { _local3 = (target.getChildAt(_local2) as IUIComponent); _local4 = (_local3 as IStyleClient); if (!_local3.includeInLayout){ } else { _local5 = _local3.x; _local6 = _local3.y; _local7 = _local3.getExplicitOrMeasuredWidth(); _local8 = _local3.getExplicitOrMeasuredHeight(); if (((!(isNaN(_local3.percentWidth))) || (((((_local4) && (!(isNaN(_local4.getStyle("left")))))) && (!(isNaN(_local4.getStyle("right")))))))){ _local7 = _local3.minWidth; }; if (((!(isNaN(_local3.percentHeight))) || (((((_local4) && (!(isNaN(_local4.getStyle("top")))))) && (!(isNaN(_local4.getStyle("bottom")))))))){ _local8 = _local3.minHeight; }; r.x = _local5; r.y = _local6; r.width = _local7; r.height = _local8; applyAnchorStylesDuringMeasure(_local3, r); _local5 = r.x; _local6 = r.y; _local7 = r.width; _local8 = r.height; if (isNaN(_local5)){ _local5 = _local3.x; }; if (isNaN(_local6)){ _local6 = _local3.y; }; _local9 = _local5; _local10 = _local6; if (isNaN(_local7)){ _local7 = _local3.width; }; if (isNaN(_local8)){ _local8 = _local3.height; }; _local9 = (_local9 + _local7); _local10 = (_local10 + _local8); _contentArea.right = Math.max(_contentArea.right, _local9); _contentArea.bottom = Math.max(_contentArea.bottom, _local10); }; _local2++; }; return (_contentArea); } private function child_moveHandler(_arg1:MoveEvent):void{ var _local2:Container; if ((_arg1.target is IUIComponent)){ if (!IUIComponent(_arg1.target).includeInLayout){ return; }; }; _local2 = super.target; if (_local2){ _local2.invalidateSize(); _local2.invalidateDisplayList(); _contentArea = null; }; } override public function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local3:Container; var _local4:EdgeMetrics; var _local5:Number; var _local6:Number; var _local7:int; var _local8:int; var _local9:IUIComponent; _local3 = super.target; _local3.mx_internal::doingLayout = false; _local4 = _local3.viewMetrics; _local3.mx_internal::doingLayout = true; _local5 = ((_arg1 - _local4.left) - _local4.right); _local6 = ((_arg2 - _local4.top) - _local4.bottom); _local7 = _local3.numChildren; _local8 = 0; while (_local8 < _local7) { _local9 = (_local3.getChildAt(_local8) as IUIComponent); applyAnchorStylesDuringUpdateDisplayList(_local5, _local6, _local9); _local8++; }; } private function applyAnchorStylesDuringMeasure(_arg1:IUIComponent, _arg2:Rectangle):void{ var _local3:IStyleClient; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; _local3 = (_arg1 as IStyleClient); if (!_local3){ return; }; _local4 = _local3.getStyle("left"); _local5 = _local3.getStyle("right"); _local6 = _local3.getStyle("horizontalCenter"); if (!isNaN(_local6)){ _arg2.x = Math.round((((target.width - _arg1.width) / 2) + _local6)); } else { if (((!(isNaN(_local4))) && (!(isNaN(_local5))))){ _arg2.x = _local4; _arg2.width = (_arg2.width + _local5); } else { if (!isNaN(_local4)){ _arg2.x = _local4; } else { if (!isNaN(_local5)){ _arg2.x = 0; _arg2.width = (_arg2.width + _local5); }; }; }; }; _local7 = _local3.getStyle("top"); _local8 = _local3.getStyle("bottom"); _local9 = _local3.getStyle("verticalCenter"); if (!isNaN(_local9)){ _arg2.y = Math.round((((target.height - _arg1.height) / 2) + _local9)); } else { if (((!(isNaN(_local7))) && (!(isNaN(_local8))))){ _arg2.y = _local7; _arg2.height = (_arg2.height + _local8); } else { if (!isNaN(_local7)){ _arg2.y = _local7; } else { if (!isNaN(_local8)){ _arg2.y = 0; _arg2.height = (_arg2.height + _local8); }; }; }; }; } private function bound(_arg1:Number, _arg2:Number, _arg3:Number):Number{ if (_arg1 < _arg2){ _arg1 = _arg2; } else { if (_arg1 > _arg3){ _arg1 = _arg3; } else { _arg1 = Math.floor(_arg1); }; }; return (_arg1); } private function target_childRemoveHandler(_arg1:ChildExistenceChangedEvent):void{ DisplayObject(_arg1.relatedObject).removeEventListener(MoveEvent.MOVE, child_moveHandler); } } }//package mx.containers.utilityClasses
Section 250
//Flex (mx.containers.utilityClasses.Flex) package mx.containers.utilityClasses { import mx.core.*; public class Flex { mx_internal static const VERSION:String = "2.0.1.0"; public static function flexChildWidthsProportionally(_arg1:Container, _arg2:Number, _arg3:Number):Number{ var _local4:Number; var _local5:Number; var _local6:Array; var _local7:FlexChildInfo; var _local8:IUIComponent; var _local9:int; var _local10:int; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; _local4 = _arg2; _local5 = 0; _local6 = []; _local10 = _arg1.numChildren; _local9 = 0; while (_local9 < _local10) { _local8 = IUIComponent(_arg1.getChildAt(_local9)); _local11 = _local8.percentWidth; _local12 = _local8.percentHeight; if (((!(isNaN(_local12))) && (_local8.includeInLayout))){ _local13 = Math.max(_local8.minHeight, Math.min(_local8.maxHeight, ((_local12)>=100) ? _arg3 : ((_arg3 * _local12) / 100))); } else { _local13 = _local8.getExplicitOrMeasuredHeight(); }; if (((!(isNaN(_local11))) && (_local8.includeInLayout))){ _local5 = (_local5 + _local11); _local7 = new FlexChildInfo(); _local7.percent = _local11; _local7.min = _local8.minWidth; _local7.max = _local8.maxWidth; _local7.height = _local13; _local7.child = _local8; _local6.push(_local7); } else { _local14 = _local8.getExplicitOrMeasuredWidth(); if ((((_local8.scaleX == 1)) && ((_local8.scaleY == 1)))){ _local8.setActualSize(Math.floor(_local14), Math.floor(_local13)); } else { _local8.setActualSize(_local14, _local13); }; if (_local8.includeInLayout){ _local4 = (_local4 - _local8.width); }; }; _local9++; }; if (_local5){ _local4 = flexChildrenProportionally(_arg2, _local4, _local5, _local6); _local10 = _local6.length; _local9 = 0; while (_local9 < _local10) { _local7 = _local6[_local9]; _local8 = _local7.child; if ((((_local8.scaleX == 1)) && ((_local8.scaleY == 1)))){ _local8.setActualSize(Math.floor(_local7.size), Math.floor(_local7.height)); } else { _local8.setActualSize(_local7.size, _local7.height); }; _local9++; }; }; return (_local4); } public static function flexChildHeightsProportionally(_arg1:Container, _arg2:Number, _arg3:Number):Number{ var _local4:Number; var _local5:Number; var _local6:Array; var _local7:FlexChildInfo; var _local8:IUIComponent; var _local9:int; var _local10:int; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; _local4 = _arg2; _local5 = 0; _local6 = []; _local10 = _arg1.numChildren; _local9 = 0; while (_local9 < _local10) { _local8 = IUIComponent(_arg1.getChildAt(_local9)); _local11 = _local8.percentWidth; _local12 = _local8.percentHeight; if (((!(isNaN(_local11))) && (_local8.includeInLayout))){ _local13 = Math.max(_local8.minWidth, Math.min(_local8.maxWidth, ((_local11)>=100) ? _arg3 : ((_arg3 * _local11) / 100))); } else { _local13 = _local8.getExplicitOrMeasuredWidth(); }; if (((!(isNaN(_local12))) && (_local8.includeInLayout))){ _local5 = (_local5 + _local12); _local7 = new FlexChildInfo(); _local7.percent = _local12; _local7.min = _local8.minHeight; _local7.max = _local8.maxHeight; _local7.width = _local13; _local7.child = _local8; _local6.push(_local7); } else { _local14 = _local8.getExplicitOrMeasuredHeight(); if ((((_local8.scaleX == 1)) && ((_local8.scaleY == 1)))){ _local8.setActualSize(Math.floor(_local13), Math.floor(_local14)); } else { _local8.setActualSize(_local13, _local14); }; if (_local8.includeInLayout){ _local4 = (_local4 - _local8.height); }; }; _local9++; }; if (_local5){ _local4 = flexChildrenProportionally(_arg2, _local4, _local5, _local6); _local10 = _local6.length; _local9 = 0; while (_local9 < _local10) { _local7 = _local6[_local9]; _local8 = _local7.child; if ((((_local8.scaleX == 1)) && ((_local8.scaleY == 1)))){ _local8.setActualSize(Math.floor(_local7.width), Math.floor(_local7.size)); } else { _local8.setActualSize(_local7.width, _local7.size); }; _local9++; }; }; return (_local4); } public static function flexChildrenProportionally(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Array):Number{ var _local5:int; var _local6:Number; var _local7:Boolean; var _local8:Number; var _local9:*; var _local10:*; var _local11:*; var _local12:*; var _local13:*; var _local14:*; _local5 = _arg4.length; _local8 = (_arg2 - ((_arg1 * _arg3) / 100)); if (_local8 > 0){ _arg2 = (_arg2 - _local8); }; do { _local6 = 0; _local7 = true; _local9 = (_arg2 / _arg3); _local10 = 0; while (_local10 < _local5) { _local11 = _arg4[_local10]; _local12 = (_local11.percent * _local9); if (_local12 < _local11.min){ _local13 = _local11.min; _local11.size = _local13; --_local5; _arg4[_local10] = _arg4[_local5]; _arg4[_local5] = _local11; _arg3 = (_arg3 - _local11.percent); _arg2 = (_arg2 - _local13); _local7 = false; break; } else { if (_local12 > _local11.max){ _local14 = _local11.max; _local11.size = _local14; --_local5; _arg4[_local10] = _arg4[_local5]; _arg4[_local5] = _local11; _arg3 = (_arg3 - _local11.percent); _arg2 = (_arg2 - _local14); _local7 = false; break; } else { _local11.size = _local12; _local6 = (_local6 + _local12); }; }; _local10++; }; } while (!(_local7)); return (Math.max(0, Math.floor((_arg2 - _local6)))); } } }//package mx.containers.utilityClasses
Section 251
//FlexChildInfo (mx.containers.utilityClasses.FlexChildInfo) package mx.containers.utilityClasses { import mx.core.*; public class FlexChildInfo { public var size:Number;// = 0 public var percent:Number; public var width:Number; public var max:Number; public var height:Number; public var preferred:Number;// = 0 public var min:Number; public var flex:Number;// = 0 public var child:IUIComponent; mx_internal static const VERSION:String = "2.0.1.0"; public function FlexChildInfo(){ size = 0; preferred = 0; flex = 0; super(); } } }//package mx.containers.utilityClasses
Section 252
//Layout (mx.containers.utilityClasses.Layout) package mx.containers.utilityClasses { import mx.core.*; public class Layout { private var _target:Container; mx_internal static const VERSION:String = "2.0.1.0"; public function set target(_arg1:Container):void{ _target = _arg1; } public function measure():void{ } public function updateDisplayList(_arg1:Number, _arg2:Number):void{ } public function get target():Container{ return (_target); } } }//package mx.containers.utilityClasses
Section 253
//BoxDirection (mx.containers.BoxDirection) package mx.containers { public final class BoxDirection { public static const HORIZONTAL:String = "horizontal"; public static const VERTICAL:String = "vertical"; mx_internal static const VERSION:String = "2.0.1.0"; } }//package mx.containers
Section 254
//DataGridListData (mx.controls.dataGridClasses.DataGridListData) package mx.controls.dataGridClasses { import mx.core.*; import mx.controls.listClasses.*; public class DataGridListData extends BaseListData { public var dataField:String; mx_internal static const VERSION:String = "2.0.1.0"; public function DataGridListData(_arg1:String, _arg2:String, _arg3:int, _arg4:String, _arg5:IUIComponent, _arg6:int=0){ super(_arg1, _arg4, _arg5, _arg6, _arg3); this.dataField = _arg2; } } }//package mx.controls.dataGridClasses
Section 255
//BaseListData (mx.controls.listClasses.BaseListData) package mx.controls.listClasses { import mx.core.*; public class BaseListData { private var _uid:String; public var label:String; public var rowIndex:int; public var owner:IUIComponent; public var columnIndex:int; mx_internal static const VERSION:String = "2.0.1.0"; public function BaseListData(_arg1:String, _arg2:String, _arg3:IUIComponent, _arg4:int=0, _arg5:int=0){ this.label = _arg1; this.uid = _arg2; this.owner = _arg3; this.rowIndex = _arg4; this.columnIndex = _arg5; } public function set uid(_arg1:String):void{ _uid = _arg1; } public function get uid():String{ return (_uid); } } }//package mx.controls.listClasses
Section 256
//IDropInListItemRenderer (mx.controls.listClasses.IDropInListItemRenderer) package mx.controls.listClasses { public interface IDropInListItemRenderer { function set listData(_arg1:BaseListData):void; function get listData():BaseListData; } }//package mx.controls.listClasses
Section 257
//IListItemRenderer (mx.controls.listClasses.IListItemRenderer) package mx.controls.listClasses { import mx.core.*; import flash.events.*; import mx.styles.*; import mx.managers.*; public interface IListItemRenderer extends IDataRenderer, IEventDispatcher, IFlexDisplayObject, ILayoutManagerClient, ISimpleStyleClient, IUIComponent { } }//package mx.controls.listClasses
Section 258
//ScrollBar (mx.controls.scrollClasses.ScrollBar) package mx.controls.scrollClasses { import mx.core.*; import flash.display.*; import flash.events.*; import mx.styles.*; import flash.geom.*; import mx.events.*; import flash.utils.*; import mx.controls.*; import flash.ui.*; public class ScrollBar extends UIComponent { mx_internal var isScrolling:Boolean; mx_internal var oldPosition:Number; mx_internal var downArrow:Button; private var _pageSize:Number;// = 0 mx_internal var _minHeight:Number;// = 32 private var trackScrolling:Boolean;// = false private var trackScrollRepeatDirection:int; private var _scrollPosition:Number;// = 0 private var _lineScrollSize:Number;// = 1 private var _direction:String;// = "vertical" mx_internal var upArrow:Button; private var trackScrollTimer:Timer; mx_internal var scrollTrack:DisplayObject; private var _pageScrollSize:Number;// = 0 private var _maxScrollPosition:Number;// = 0 mx_internal var scrollThumb:ScrollThumb; private var _minScrollPosition:Number;// = 0 private var trackPosition:Number; mx_internal var _minWidth:Number;// = 16 mx_internal static const VERSION:String = "2.0.1.0"; public static const THICKNESS:Number = 16; public function ScrollBar(){ _minWidth = 16; _minHeight = 32; trackScrolling = false; _direction = ScrollBarDirection.VERTICAL; _lineScrollSize = 1; _maxScrollPosition = 0; _minScrollPosition = 0; _pageSize = 0; _pageScrollSize = 0; _scrollPosition = 0; super(); } private function downArrow_buttonDownHandler(_arg1:FlexEvent):void{ if (isNaN(oldPosition)){ oldPosition = scrollPosition; }; lineScroll(1); } public function set minScrollPosition(_arg1:Number):void{ _minScrollPosition = _arg1; } mx_internal function get virtualHeight():Number{ return (unscaledHeight); } mx_internal function get lineMinusDetail():String{ return (((direction == ScrollBarDirection.VERTICAL)) ? ScrollEventDetail.LINE_UP : ScrollEventDetail.LINE_LEFT); } public function setScrollProperties(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number=0):void{ var _local5:Number; this.pageSize = _arg1; _pageScrollSize = ((_arg4)>0) ? _arg4 : _arg1; this.minScrollPosition = Math.max(_arg2, 0); this.maxScrollPosition = Math.max(_arg3, 0); _scrollPosition = Math.max(this.minScrollPosition, _scrollPosition); _scrollPosition = Math.min(this.maxScrollPosition, _scrollPosition); if (((((this.maxScrollPosition - this.minScrollPosition) > 0)) && (enabled))){ upArrow.enabled = true; downArrow.enabled = true; addEventListener(MouseEvent.MOUSE_DOWN, scrollTrack_mouseDownHandler); addEventListener(MouseEvent.MOUSE_OVER, scrollTrack_mouseOverHandler); addEventListener(MouseEvent.MOUSE_OUT, scrollTrack_mouseOutHandler); if (!scrollThumb){ scrollThumb = new ScrollThumb(); scrollThumb.focusEnabled = false; addChildAt(scrollThumb, getChildIndex(downArrow)); scrollThumb.styleName = this; scrollThumb.upSkinName = "thumbUpSkin"; scrollThumb.overSkinName = "thumbOverSkin"; scrollThumb.downSkinName = "thumbDownSkin"; scrollThumb.iconName = "thumbIcon"; }; _local5 = ((trackHeight < 0)) ? 0 : Math.round(((_arg1 / ((this.maxScrollPosition - this.minScrollPosition) + _arg1)) * trackHeight)); if (_local5 < scrollThumb.minHeight){ if (trackHeight < scrollThumb.minHeight){ scrollThumb.visible = false; } else { _local5 = scrollThumb.minHeight; scrollThumb.visible = true; scrollThumb.setActualSize(_minWidth, scrollThumb.minHeight); }; } else { scrollThumb.visible = true; scrollThumb.setActualSize(_minWidth, _local5); }; scrollThumb.setRange((upArrow.getExplicitOrMeasuredHeight() + 0), ((virtualHeight - downArrow.getExplicitOrMeasuredHeight()) - scrollThumb.height), this.minScrollPosition, this.maxScrollPosition); scrollPosition = Math.max(Math.min(scrollPosition, this.maxScrollPosition), this.minScrollPosition); } else { upArrow.enabled = false; downArrow.enabled = false; if (scrollThumb){ scrollThumb.visible = false; }; }; } public function get pageScrollSize():Number{ return (_pageScrollSize); } private function get trackY():Number{ return (upArrow.getExplicitOrMeasuredHeight()); } public function set pageScrollSize(_arg1:Number):void{ _pageScrollSize = _arg1; } mx_internal function isScrollBarKey(_arg1:uint):Boolean{ var _local2:Number; if (_arg1 == Keyboard.HOME){ if (scrollPosition != 0){ _local2 = scrollPosition; scrollPosition = 0; dispatchScrollEvent(_local2, minDetail); }; return (true); } else { if (_arg1 == Keyboard.END){ if (scrollPosition < maxScrollPosition){ _local2 = scrollPosition; scrollPosition = maxScrollPosition; dispatchScrollEvent(_local2, maxDetail); }; return (true); }; }; return (false); } private function trackScrollTimerHandler(_arg1:Event):void{ if (trackScrollRepeatDirection == 1){ if ((scrollThumb.y + scrollThumb.height) > trackPosition){ return; }; }; if (trackScrollRepeatDirection == -1){ if (scrollThumb.y < trackPosition){ return; }; }; pageScroll(trackScrollRepeatDirection); if (((trackScrollTimer) && ((trackScrollTimer.repeatCount == 1)))){ trackScrollTimer.delay = getStyle("repeatInterval"); trackScrollTimer.repeatCount = 0; }; } private function scrollTrack_mouseUpHandler(_arg1:MouseEvent):void{ scrollTrack_mouseLeaveHandler(_arg1); } private function get minDetail():String{ return (((direction == ScrollBarDirection.VERTICAL)) ? ScrollEventDetail.AT_TOP : ScrollEventDetail.AT_LEFT); } override protected function measure():void{ super.measure(); upArrow.validateSize(); downArrow.validateSize(); _minWidth = upArrow.getExplicitOrMeasuredWidth(); _minHeight = (upArrow.getExplicitOrMeasuredHeight() + downArrow.getExplicitOrMeasuredHeight()); } public function get maxScrollPosition():Number{ return (_maxScrollPosition); } mx_internal function get linePlusDetail():String{ return (((direction == ScrollBarDirection.VERTICAL)) ? ScrollEventDetail.LINE_DOWN : ScrollEventDetail.LINE_RIGHT); } private function stage_scrollTrack_mouseMoveHandler(_arg1:MouseEvent):void{ if (_arg1.target != stage){ return; }; scrollTrack_mouseMoveHandler(_arg1); } private function upArrow_buttonDownHandler(_arg1:FlexEvent):void{ if (isNaN(oldPosition)){ oldPosition = scrollPosition; }; lineScroll(-1); } private function scrollTrack_mouseOverHandler(_arg1:MouseEvent):void{ if (_arg1.target != this){ return; }; if (trackScrolling){ trackScrollTimer.start(); }; } private function scrollTrack_mouseDownHandler(_arg1:MouseEvent):void{ if (_arg1.target != this){ return; }; trackScrolling = true; systemManager.addEventListener(MouseEvent.MOUSE_UP, scrollTrack_mouseUpHandler, true); systemManager.addEventListener(MouseEvent.MOUSE_MOVE, scrollTrack_mouseMoveHandler, true); systemManager.stage.addEventListener(MouseEvent.MOUSE_MOVE, stage_scrollTrack_mouseMoveHandler); systemManager.stage.addEventListener(Event.MOUSE_LEAVE, scrollTrack_mouseLeaveHandler); trackPosition = _arg1.localY; if (isNaN(oldPosition)){ oldPosition = scrollPosition; }; trackScrollRepeatDirection = (((scrollThumb.y + scrollThumb.height) < _arg1.localY)) ? 1 : ((scrollThumb.y > _arg1.localY)) ? -1 : 0; pageScroll(trackScrollRepeatDirection); if (!trackScrollTimer){ trackScrollTimer = new Timer(getStyle("repeatDelay"), 1); trackScrollTimer.addEventListener(TimerEvent.TIMER, trackScrollTimerHandler); }; trackScrollTimer.start(); } public function get minScrollPosition():Number{ return (_minScrollPosition); } override public function set doubleClickEnabled(_arg1:Boolean):void{ } public function set scrollPosition(_arg1:Number):void{ var _local2:Number; var _local3:Number; _scrollPosition = _arg1; if (scrollThumb){ if (!cacheAsBitmap){ cacheHeuristic = (scrollThumb.cacheHeuristic = true); }; if (!isScrolling){ _arg1 = Math.min(_arg1, maxScrollPosition); _arg1 = Math.max(_arg1, minScrollPosition); _local2 = (maxScrollPosition - minScrollPosition); _local3 = ((((_local2 == 0)) || (isNaN(_local2)))) ? 0 : ((((_arg1 - minScrollPosition) * (trackHeight - scrollThumb.height)) / _local2) + trackY); scrollThumb.move(0, Math.round(_local3)); }; }; } mx_internal function pageScroll(_arg1:int):void{ var _local2:Number; var _local3:Number; var _local4:Number; var _local5:String; _local2 = ((_pageScrollSize)!=0) ? _pageScrollSize : pageSize; _local3 = (_scrollPosition + (_arg1 * _local2)); if (_local3 > maxScrollPosition){ _local3 = maxScrollPosition; } else { if (_local3 < minScrollPosition){ _local3 = minScrollPosition; }; }; if (_local3 != scrollPosition){ _local4 = scrollPosition; scrollPosition = _local3; _local5 = ((_arg1 < 0)) ? pageMinusDetail : pagePlusDetail; dispatchScrollEvent(_local4, _local5); }; } private function scrollTrack_mouseLeaveHandler(_arg1:Event):void{ var _local2:String; trackScrolling = false; systemManager.removeEventListener(MouseEvent.MOUSE_UP, scrollTrack_mouseUpHandler, true); systemManager.removeEventListener(MouseEvent.MOUSE_MOVE, scrollTrack_mouseMoveHandler, true); systemManager.stage.removeEventListener(MouseEvent.MOUSE_MOVE, stage_scrollTrack_mouseMoveHandler); systemManager.stage.removeEventListener(Event.MOUSE_LEAVE, scrollTrack_mouseLeaveHandler); if (trackScrollTimer){ trackScrollTimer.reset(); }; if (_arg1.target != this){ return; }; _local2 = ((oldPosition > scrollPosition)) ? pageMinusDetail : pagePlusDetail; dispatchScrollEvent(oldPosition, _local2); oldPosition = NaN; } private function get trackHeight():Number{ return ((virtualHeight - (upArrow.getExplicitOrMeasuredHeight() + downArrow.getExplicitOrMeasuredHeight()))); } public function set pageSize(_arg1:Number):void{ _pageSize = _arg1; } mx_internal function get pagePlusDetail():String{ return (((direction == ScrollBarDirection.VERTICAL)) ? ScrollEventDetail.PAGE_DOWN : ScrollEventDetail.PAGE_RIGHT); } override public function set enabled(_arg1:Boolean):void{ super.enabled = _arg1; invalidateDisplayList(); } mx_internal function get pageMinusDetail():String{ return (((direction == ScrollBarDirection.VERTICAL)) ? ScrollEventDetail.PAGE_UP : ScrollEventDetail.PAGE_LEFT); } private function get maxDetail():String{ return (((direction == ScrollBarDirection.VERTICAL)) ? ScrollEventDetail.AT_BOTTOM : ScrollEventDetail.AT_RIGHT); } private function scrollTrack_mouseOutHandler(_arg1:MouseEvent):void{ if (trackScrolling){ trackScrollTimer.stop(); }; } mx_internal function dispatchScrollEvent(_arg1:Number, _arg2:String):void{ var _local3:ScrollEvent; _local3 = new ScrollEvent(ScrollEvent.SCROLL); _local3.detail = _arg2; _local3.position = scrollPosition; _local3.delta = (scrollPosition - _arg1); _local3.direction = direction; dispatchEvent(_local3); } public function set lineScrollSize(_arg1:Number):void{ _lineScrollSize = _arg1; } public function set direction(_arg1:String):void{ _direction = _arg1; invalidateSize(); invalidateDisplayList(); dispatchEvent(new Event("directionChanged")); } public function get scrollPosition():Number{ return (_scrollPosition); } override protected function createChildren():void{ var _local1:Class; super.createChildren(); if (!scrollTrack){ _local1 = getStyle("trackSkin"); scrollTrack = new (_local1); if ((scrollTrack is ISimpleStyleClient)){ ISimpleStyleClient(scrollTrack).styleName = this; }; addChild(scrollTrack); }; if (!upArrow){ upArrow = new Button(); upArrow.enabled = false; upArrow.autoRepeat = true; upArrow.focusEnabled = false; upArrow.upSkinName = "upArrowUpSkin"; upArrow.overSkinName = "upArrowOverSkin"; upArrow.downSkinName = "upArrowDownSkin"; upArrow.disabledSkinName = "upArrowDisabledSkin"; upArrow.upIconName = ""; upArrow.overIconName = ""; upArrow.downIconName = ""; upArrow.disabledIconName = ""; addChild(upArrow); upArrow.styleName = this; upArrow.validateProperties(); upArrow.addEventListener(FlexEvent.BUTTON_DOWN, upArrow_buttonDownHandler); }; if (!downArrow){ downArrow = new Button(); downArrow.enabled = false; downArrow.autoRepeat = true; downArrow.focusEnabled = false; downArrow.upSkinName = "downArrowUpSkin"; downArrow.overSkinName = "downArrowOverSkin"; downArrow.downSkinName = "downArrowDownSkin"; downArrow.disabledSkinName = "downArrowDisabledSkin"; downArrow.upIconName = ""; downArrow.overIconName = ""; downArrow.downIconName = ""; downArrow.disabledIconName = ""; addChild(downArrow); downArrow.styleName = this; downArrow.validateProperties(); downArrow.addEventListener(FlexEvent.BUTTON_DOWN, downArrow_buttonDownHandler); }; } public function set maxScrollPosition(_arg1:Number):void{ _maxScrollPosition = _arg1; } public function get pageSize():Number{ return (_pageSize); } public function get direction():String{ return (_direction); } public function get lineScrollSize():Number{ return (_lineScrollSize); } mx_internal function lineScroll(_arg1:int):void{ var _local2:Number; var _local3:Number; var _local4:Number; var _local5:String; _local2 = _lineScrollSize; _local3 = (_scrollPosition + (_arg1 * _local2)); if (_local3 > maxScrollPosition){ _local3 = maxScrollPosition; } else { if (_local3 < minScrollPosition){ _local3 = minScrollPosition; }; }; if (_local3 != scrollPosition){ _local4 = scrollPosition; scrollPosition = _local3; _local5 = ((_arg1 < 0)) ? lineMinusDetail : linePlusDetail; dispatchScrollEvent(_local4, _local5); }; } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ if ($height == 1){ return; }; if (!upArrow){ return; }; super.updateDisplayList(_arg1, _arg2); if (cacheAsBitmap){ cacheHeuristic = (scrollThumb.cacheHeuristic = false); }; upArrow.move(0, 0); upArrow.setActualSize(upArrow.getExplicitOrMeasuredWidth(), upArrow.getExplicitOrMeasuredHeight()); scrollTrack.y = 0; scrollTrack.height = virtualHeight; downArrow.move(0, (virtualHeight - downArrow.getExplicitOrMeasuredHeight())); downArrow.setActualSize(downArrow.getExplicitOrMeasuredWidth(), downArrow.getExplicitOrMeasuredHeight()); setScrollProperties(pageSize, minScrollPosition, maxScrollPosition, _pageScrollSize); scrollPosition = _scrollPosition; } private function scrollTrack_mouseMoveHandler(_arg1:MouseEvent):void{ var _local2:Point; if (trackScrolling){ _local2 = new Point(_arg1.stageX, _arg1.stageY); _local2 = globalToLocal(_local2); trackPosition = _local2.y; }; } } }//package mx.controls.scrollClasses
Section 259
//ScrollBarDirection (mx.controls.scrollClasses.ScrollBarDirection) package mx.controls.scrollClasses { public final class ScrollBarDirection { public static const HORIZONTAL:String = "horizontal"; public static const VERTICAL:String = "vertical"; mx_internal static const VERSION:String = "2.0.1.0"; } }//package mx.controls.scrollClasses
Section 260
//ScrollThumb (mx.controls.scrollClasses.ScrollThumb) package mx.controls.scrollClasses { import flash.events.*; import flash.geom.*; import mx.events.*; import mx.controls.*; public class ScrollThumb extends Button { private var lastY:Number; private var datamax:Number; private var datamin:Number; private var ymax:Number; private var ymin:Number; mx_internal static const VERSION:String = "2.0.1.0"; public function ScrollThumb(){ explicitMinHeight = 10; stickyHighlighting = true; } private function mouseMoveHandler(_arg1:MouseEvent):void{ var _local2:Point; var _local3:Number; var _local4:ScrollBar; var _local5:Number; var _local6:Number; if (ymin == ymax){ return; }; _local2 = new Point(_arg1.stageX, _arg1.stageY); _local2 = globalToLocal(_local2); _local3 = (_local2.y - lastY); _local3 = (_local3 + y); if (_local3 < ymin){ _local3 = ymin; } else { if (_local3 > ymax){ _local3 = ymax; }; }; _local4 = ScrollBar(parent); _local4.isScrolling = true; $y = _local3; _local5 = _local4.scrollPosition; _local6 = (Math.round((((datamax - datamin) * (y - ymin)) / (ymax - ymin))) + datamin); _local4.scrollPosition = _local6; _local4.dispatchScrollEvent(_local5, ScrollEventDetail.THUMB_TRACK); } override protected function measure():void{ super.measure(); measuredWidth = 14; measuredHeight = 10; } mx_internal function setRange(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):void{ this.ymin = _arg1; this.ymax = _arg2; this.datamin = _arg3; this.datamax = _arg4; } override protected function mouseDownHandler(_arg1:MouseEvent):void{ var _local2:ScrollBar; super.mouseDownHandler(_arg1); _local2 = ScrollBar(parent); _local2.oldPosition = _local2.scrollPosition; lastY = _arg1.localY; systemManager.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler, true); systemManager.stage.addEventListener(MouseEvent.MOUSE_MOVE, stage_mouseMoveHandler); } override mx_internal function buttonReleased():void{ super.buttonReleased(); stopDragThumb(); } private function stopDragThumb():void{ var _local1:ScrollBar; _local1 = ScrollBar(parent); _local1.isScrolling = false; _local1.dispatchScrollEvent(_local1.oldPosition, ScrollEventDetail.THUMB_POSITION); _local1.oldPosition = NaN; systemManager.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler, true); systemManager.stage.removeEventListener(MouseEvent.MOUSE_MOVE, stage_mouseMoveHandler); } private function stage_mouseMoveHandler(_arg1:MouseEvent):void{ if (_arg1.target != stage){ return; }; mouseMoveHandler(_arg1); } } }//package mx.controls.scrollClasses
Section 261
//Button (mx.controls.Button) package mx.controls { import mx.core.*; import flash.display.*; import flash.events.*; import mx.styles.*; import mx.events.*; import mx.managers.*; import flash.text.*; import mx.controls.listClasses.*; import flash.utils.*; import mx.skins.*; import mx.controls.dataGridClasses.*; import flash.ui.*; public class Button extends UIComponent implements IDataRenderer, IDropInListItemRenderer, IFocusManagerComponent, IListItemRenderer { private var enabledChanged:Boolean;// = false private var skinMeasuredWidth:Number; mx_internal var disabledSkinName:String;// = "disabledSkin" mx_internal var downSkinName:String;// = "downSkin" mx_internal var _labelPlacement:String;// = "right" private var _data:Object; private var _phase:String;// = "up" mx_internal var _toggle:Boolean;// = false mx_internal var selectedOverSkinName:String;// = "selectedOverSkin" mx_internal var selectedDisabledSkinName:String;// = "selectedDisabledSkin" private var labelSet:Boolean; mx_internal var toggleChanged:Boolean;// = false private var labelChanged:Boolean;// = false private var autoRepeatTimer:Timer; mx_internal var disabledIconName:String;// = "disabledIcon" mx_internal var upSkinName:String;// = "upSkin" private var toolTipSet:Boolean;// = false mx_internal var downIconName:String;// = "downIcon" mx_internal var currentIcon:IFlexDisplayObject; private var styleChangedFlag:Boolean;// = true private var _autoRepeat:Boolean;// = false mx_internal var selectedOverIconName:String;// = "selectedOverIcon" private var _label:String;// = "" mx_internal var selectedDisabledIconName:String;// = "selectedDisabledIcon" mx_internal var extraSpacing:Number; mx_internal var selectedUpSkinName:String;// = "selectedUpSkin" mx_internal var upIconName:String;// = "upIcon" mx_internal var buttonOffset:Number;// = 0 private var skinMeasuredHeight:Number; mx_internal var centerContent:Boolean;// = true private var oldUnscaledWidth:Number; private var skins:Array; mx_internal var overSkinName:String;// = "overSkin" mx_internal var currentSkin:IFlexDisplayObject; mx_internal var selectedDownSkinName:String;// = "selectedDownSkin" private var _listData:BaseListData; mx_internal var iconName:String;// = "icon" mx_internal var _emphasized:Boolean;// = false public var selectedField:String;// = null private var icons:Array; public var stickyHighlighting:Boolean;// = false mx_internal var selectedUpIconName:String;// = "selectedUpIcon" mx_internal var selectedDownIconName:String;// = "selectedDownIcon" mx_internal var overIconName:String;// = "overIcon" private var selectedSet:Boolean; protected var textField:UITextField; mx_internal var _selected:Boolean;// = false mx_internal static const VERSION:String = "2.0.1.0"; mx_internal static var createAccessibilityImplementation:Function; public function Button(){ skins = []; icons = []; buttonOffset = 0; centerContent = true; extraSpacing = (10 + 10); styleChangedFlag = true; upSkinName = "upSkin"; overSkinName = "overSkin"; downSkinName = "downSkin"; disabledSkinName = "disabledSkin"; selectedUpSkinName = "selectedUpSkin"; selectedOverSkinName = "selectedOverSkin"; selectedDownSkinName = "selectedDownSkin"; selectedDisabledSkinName = "selectedDisabledSkin"; iconName = "icon"; upIconName = "upIcon"; overIconName = "overIcon"; downIconName = "downIcon"; disabledIconName = "disabledIcon"; selectedUpIconName = "selectedUpIcon"; selectedOverIconName = "selectedOverIcon"; selectedDownIconName = "selectedDownIcon"; selectedDisabledIconName = "selectedDisabledIcon"; enabledChanged = false; toolTipSet = false; _autoRepeat = false; _emphasized = false; _label = ""; labelChanged = false; _labelPlacement = ButtonLabelPlacement.RIGHT; _phase = ButtonPhase.UP; _selected = false; selectedField = null; stickyHighlighting = false; _toggle = false; toggleChanged = false; super(); mouseChildren = false; addEventListener(MouseEvent.ROLL_OVER, rollOverHandler); addEventListener(MouseEvent.ROLL_OUT, rollOutHandler); addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler); addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler); addEventListener(MouseEvent.CLICK, clickHandler); } override protected function adjustFocusRect(_arg1:DisplayObject=null):void{ super.adjustFocusRect((currentSkin) ? this : DisplayObject(currentIcon)); } mx_internal function getCurrentIcon():IFlexDisplayObject{ var _local1:String; var _local2:IFlexDisplayObject; var _local3:Class; _local1 = getCurrentIconName(); if (!_local1){ return (null); }; _local2 = IFlexDisplayObject(getChildByName(_local1)); if (_local2 == null){ _local3 = Class(getStyle(_local1)); if (_local3 == null){ _local3 = Class(getStyle(iconName)); }; if (_local3 != null){ _local2 = IFlexDisplayObject(new (_local3)); _local2.name = _local1; if ((_local2 is ISimpleStyleClient)){ ISimpleStyleClient(_local2).styleName = this; }; addChild(DisplayObject(_local2)); icons.push(_local2); }; }; return (_local2); } mx_internal function layoutContents(_arg1:Number, _arg2:Number, _arg3:Boolean):void{ var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:TextLineMetrics; var _local21:Number; var _local22:String; var _local23:EdgeMetrics; var _local24:Number; var _local25:Number; var _local26:Number; var _local27:Number; var _local28:Number; _local4 = 0; _local5 = 0; _local6 = 0; _local7 = 0; _local8 = 0; _local9 = 0; _local10 = 0; _local11 = 0; _local12 = 2; _local13 = 2; _local14 = getStyle("paddingLeft"); _local15 = getStyle("paddingRight"); _local16 = getStyle("paddingTop"); _local17 = getStyle("paddingBottom"); _local18 = 0; _local19 = 0; if (label){ _local20 = measureText(label); if (_local20.width > 0){ _local18 = (((_local14 + _local15) + getStyle("textIndent")) + _local20.width); }; _local19 = _local20.height; } else { _local20 = measureText("Wj"); _local19 = _local20.height; }; _local21 = (_arg3) ? buttonOffset : 0; _local22 = getStyle("textAlign"); _local23 = (((currentSkin) && ((currentSkin is RectangularBorder)))) ? RectangularBorder(currentSkin).borderMetrics : null; _local24 = _arg1; _local25 = ((_arg2 - _local16) - _local17); if (_local23){ _local24 = (_local24 - (_local23.left + _local23.right)); _local25 = (_local25 - (_local23.top + _local23.bottom)); }; if (currentIcon){ _local8 = currentIcon.width; _local9 = currentIcon.height; }; if ((((labelPlacement == ButtonLabelPlacement.LEFT)) || ((labelPlacement == ButtonLabelPlacement.RIGHT)))){ _local12 = getStyle("horizontalGap"); if ((((_local8 == 0)) || ((_local18 == 0)))){ _local12 = 0; }; if (_local18 > 0){ _local4 = Math.max(((((_local24 - _local8) - _local12) - _local14) - _local15), 0); textField.width = _local4; } else { _local4 = 0; textField.width = _local4; }; _local5 = Math.min((_local25 + 2), (_local19 + UITextField.TEXT_HEIGHT_PADDING)); textField.height = _local5; if (labelPlacement == ButtonLabelPlacement.RIGHT){ _local6 = (_local8 + _local12); if (centerContent){ if (_local22 == "left"){ _local6 = (_local6 + _local14); } else { if (_local22 == "right"){ _local6 = (_local6 + ((((_local24 - _local4) - _local8) - _local12) - _local14)); } else { _local28 = ((((_local24 - _local4) - _local8) - _local12) / 2); _local6 = (_local6 + Math.max(_local28, _local14)); }; }; }; _local10 = (_local6 - (_local8 + _local12)); if (!centerContent){ _local6 = (_local6 + _local14); }; } else { _local6 = ((((_local24 - _local4) - _local8) - _local12) - _local15); if (centerContent){ if (_local22 == "left"){ _local6 = 2; } else { if (_local22 == "right"){ _local6--; } else { if (_local6 > 0){ _local6 = (_local6 / 2); }; }; }; }; _local10 = ((_local6 + _local4) + _local12); }; _local7 = 0; _local11 = _local7; if (centerContent){ _local11 = (Math.round(((_local25 - _local9) / 2)) + _local16); _local7 = (Math.round(((_local25 - _local5) / 2)) + _local16); } else { _local7 = (_local7 + (Math.max(0, ((_local25 - _local5) / 2)) + _local16)); _local11 = (_local11 + (Math.max(0, (((_local25 - _local9) / 2) - 1)) + _local16)); }; } else { _local13 = getStyle("verticalGap"); if ((((_local9 == 0)) || ((_local19 == 0)))){ _local13 = 0; }; if (_local18 > 0){ _local4 = Math.min(_local24, (_local18 + UITextField.TEXT_WIDTH_PADDING)); textField.width = _local4; _local5 = Math.min(((_local25 - _local9) + 1), (_local19 + 5)); textField.height = _local5; } else { _local4 = 0; textField.width = _local4; _local5 = 0; textField.height = _local5; }; _local6 = ((_local24 - _local4) / 2); _local10 = ((_local24 - _local8) / 2); if (labelPlacement == ButtonLabelPlacement.TOP){ _local7 = (((_local25 - _local5) - _local9) - _local13); if (((centerContent) && ((_local7 > 0)))){ _local7 = (_local7 / 2); }; _local7 = (_local7 + _local16); _local11 = (((_local7 + _local5) + _local13) - 3); } else { _local7 = ((_local9 + _local13) + _local16); if (centerContent){ _local7 = (_local7 + (((((_local25 - _local5) - _local9) - _local13) / 2) + 1)); }; _local11 = (((_local7 - _local9) - _local13) + 3); }; }; _local26 = _local21; _local27 = _local21; if (_local23){ _local26 = (_local26 + _local23.left); _local27 = (_local27 + _local23.top); }; textField.x = (_local6 + _local26); textField.y = (_local7 + _local27); if (currentIcon){ _local10 = (_local10 + _local26); _local11 = (_local11 + _local27); currentIcon.x = Math.round(_local10); currentIcon.y = Math.round(_local11); }; if (currentSkin){ setChildIndex(DisplayObject(currentSkin), (numChildren - 1)); }; if (currentIcon){ setChildIndex(DisplayObject(currentIcon), (numChildren - 1)); }; if (textField){ setChildIndex(textField, (numChildren - 1)); }; } override protected function keyDownHandler(_arg1:KeyboardEvent):void{ if (!enabled){ return; }; if (_arg1.keyCode == Keyboard.SPACE){ buttonPressed(); }; } public function get autoRepeat():Boolean{ return (_autoRepeat); } protected function rollOutHandler(_arg1:MouseEvent):void{ if (phase == ButtonPhase.OVER){ phase = ButtonPhase.UP; _arg1.updateAfterEvent(); } else { if ((((phase == ButtonPhase.DOWN)) && (!(stickyHighlighting)))){ phase = ButtonPhase.OVER; _arg1.updateAfterEvent(); if (autoRepeatTimer){ autoRepeatTimer.stop(); }; }; }; } override protected function keyUpHandler(_arg1:KeyboardEvent):void{ if (!enabled){ return; }; if (_arg1.keyCode == Keyboard.SPACE){ buttonReleased(); if (phase == ButtonPhase.DOWN){ dispatchEvent(new MouseEvent(MouseEvent.CLICK)); }; phase = ButtonPhase.UP; }; } public function set autoRepeat(_arg1:Boolean):void{ _autoRepeat = _arg1; if (_arg1){ autoRepeatTimer = new Timer(1); } else { autoRepeatTimer = null; }; } mx_internal function buttonPressed():void{ phase = ButtonPhase.DOWN; dispatchEvent(new FlexEvent(FlexEvent.BUTTON_DOWN)); if (autoRepeat){ autoRepeatTimer.delay = getStyle("repeatDelay"); autoRepeatTimer.addEventListener(TimerEvent.TIMER, autoRepeatTimer_timerDelayHandler); autoRepeatTimer.start(); }; } mx_internal function viewIcon():void{ var _local1:String; _local1 = getCurrentIconName(); viewIconForPhase(_local1); } mx_internal function changeSkins():void{ var _local1:int; var _local2:int; _local1 = skins.length; _local2 = 0; while (_local2 < _local1) { removeChild(skins[_local2]); _local2++; }; skins = []; } private function autoRepeatTimer_timerHandler(_arg1:Event):void{ if (!enabled){ return; }; dispatchEvent(new FlexEvent(FlexEvent.BUTTON_DOWN)); } private function systemManager_mouseUpHandler(_arg1:MouseEvent):void{ if (contains(DisplayObject(_arg1.target))){ return; }; phase = ButtonPhase.UP; buttonReleased(); _arg1.updateAfterEvent(); } protected function mouseUpHandler(_arg1:MouseEvent):void{ if (!enabled){ return; }; phase = ButtonPhase.OVER; buttonReleased(); _arg1.updateAfterEvent(); } public function set labelPlacement(_arg1:String):void{ _labelPlacement = _arg1; invalidateSize(); invalidateDisplayList(); dispatchEvent(new Event("labelPlacementChanged")); } mx_internal function viewIconForPhase(_arg1:String):void{ var _local2:IFlexDisplayObject; var _local3:Class; _local2 = IFlexDisplayObject(getChildByName(_arg1)); if (_local2 == null){ _local3 = Class(getStyle(_arg1)); if (_local3 == null){ _local3 = Class(getStyle(iconName)); }; if (_local3 != null){ _local2 = IFlexDisplayObject(new (_local3)); _local2.name = _arg1; if ((_local2 is ISimpleStyleClient)){ ISimpleStyleClient(_local2).styleName = this; }; addChild(DisplayObject(_local2)); icons.push(_local2); }; }; if (currentIcon != null){ currentIcon.visible = false; }; currentIcon = _local2; if (currentIcon != null){ currentIcon.visible = true; }; } mx_internal function getTextField():UITextField{ return (textField); } mx_internal function setSelected(_arg1:Boolean):void{ if (_selected != _arg1){ _selected = _arg1; invalidateDisplayList(); if (toggle){ dispatchEvent(new Event(Event.CHANGE)); }; dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT)); }; } protected function clickHandler(_arg1:MouseEvent):void{ if (!enabled){ _arg1.stopImmediatePropagation(); return; }; if (toggle){ setSelected(!(selected)); }; } mx_internal function getCurrentIconName():String{ var _local1:String; if (!enabled){ _local1 = (selected) ? selectedDisabledIconName : disabledIconName; } else { if (phase == ButtonPhase.UP){ _local1 = (selected) ? selectedUpIconName : upIconName; } else { if (phase == ButtonPhase.OVER){ _local1 = (selected) ? selectedOverIconName : overIconName; } else { if (phase == ButtonPhase.DOWN){ _local1 = (selected) ? selectedDownIconName : downIconName; }; }; }; }; return (_local1); } public function get emphasized():Boolean{ return (_emphasized); } override protected function measure():void{ var textWidth:Number; var textHeight:Number; var bm:EdgeMetrics; var tempCurrentIcon:IFlexDisplayObject; var iconWidth:Number; var iconHeight:Number; var w:Number; var h:Number; var lineMetrics:TextLineMetrics; super.measure(); textWidth = 0; textHeight = 0; if (label){ lineMetrics = measureText(label); textWidth = lineMetrics.width; textHeight = lineMetrics.height; textWidth = (textWidth + ((getStyle("paddingLeft") + getStyle("paddingRight")) + getStyle("textIndent"))); textHeight = (textHeight + (getStyle("paddingTop") + getStyle("paddingBottom"))); }; try { bm = currentSkin["borderMetrics"]; } catch(e:Error) { bm = new EdgeMetrics(3, 3, 3, 3); }; tempCurrentIcon = getCurrentIcon(); iconWidth = (tempCurrentIcon) ? tempCurrentIcon.width : 0; iconHeight = (tempCurrentIcon) ? tempCurrentIcon.height : 0; w = 0; h = 0; if ((((labelPlacement == ButtonLabelPlacement.LEFT)) || ((labelPlacement == ButtonLabelPlacement.RIGHT)))){ w = (textWidth + iconWidth); if (iconWidth != 0){ w = (w + (getStyle("horizontalGap") - 2)); }; h = Math.max(textHeight, (iconHeight + 6)); } else { w = Math.max(textWidth, iconWidth); h = (textHeight + iconHeight); if (iconHeight != 0){ h = (h + getStyle("verticalGap")); }; }; if (bm){ w = (w + (bm.left + bm.right)); h = (h + (bm.top + bm.bottom)); }; if (((label) && (!((label.length == 0))))){ w = (w + extraSpacing); } else { w = (w + 6); }; if (((currentSkin) && (((isNaN(skinMeasuredWidth)) || (isNaN(skinMeasuredHeight)))))){ skinMeasuredWidth = currentSkin.measuredWidth; skinMeasuredHeight = currentSkin.measuredHeight; }; if (!isNaN(skinMeasuredWidth)){ w = Math.max(skinMeasuredWidth, w); }; if (!isNaN(skinMeasuredHeight)){ h = Math.max(skinMeasuredHeight, h); }; measuredMinWidth = (measuredWidth = w); measuredMinHeight = (measuredHeight = h); } mx_internal function get phase():String{ return (_phase); } public function set selected(_arg1:Boolean):void{ selectedSet = true; setSelected(_arg1); } mx_internal function changeIcons():void{ var _local1:int; var _local2:int; _local1 = icons.length; _local2 = 0; while (_local2 < _local1) { removeChild(icons[_local2]); _local2++; }; icons = []; } override protected function commitProperties():void{ super.commitProperties(); if (!initialized){ viewSkin(); viewIcon(); }; if (enabledChanged){ textField.enabled = enabled; enabledChanged = false; }; if (toggleChanged){ if (!toggle){ selected = false; }; toggleChanged = false; }; } public function get listData():BaseListData{ return (_listData); } mx_internal function viewSkin():void{ var _local1:String; if (!enabled){ _local1 = (selected) ? selectedDisabledSkinName : disabledSkinName; } else { if (phase == ButtonPhase.UP){ _local1 = (selected) ? selectedUpSkinName : upSkinName; } else { if (phase == ButtonPhase.OVER){ _local1 = (selected) ? selectedOverSkinName : overSkinName; } else { if (phase == ButtonPhase.DOWN){ _local1 = (selected) ? selectedDownSkinName : downSkinName; }; }; }; }; viewSkinForPhase(_local1); } public function set label(_arg1:String):void{ labelSet = true; if (_label != _arg1){ _label = _arg1; labelChanged = true; invalidateSize(); invalidateDisplayList(); dispatchEvent(new Event("labelChanged")); }; } mx_internal function viewSkinForPhase(_arg1:String):void{ var _local2:IFlexDisplayObject; var _local3:Number; var _local4:Class; var _local5:ISimpleStyleClient; _local2 = IFlexDisplayObject(getChildByName(_arg1)); if (!_local2){ _local4 = Class(getStyle(_arg1)); if (_local4){ _local2 = IFlexDisplayObject(new (_local4)); _local2.name = _arg1; _local5 = (_local2 as ISimpleStyleClient); if (_local5){ _local5.styleName = this; }; addChild(DisplayObject(_local2)); _local2.setActualSize(unscaledWidth, unscaledHeight); if ((((_local2 is IInvalidating)) && (initialized))){ IInvalidating(_local2).validateNow(); } else { if ((((_local2 is ProgrammaticSkin)) && (initialized))){ ProgrammaticSkin(_local2).validateDisplayList(); }; }; skins.push(_local2); }; }; if (currentSkin){ currentSkin.visible = false; }; currentSkin = _local2; if (currentSkin){ currentSkin.visible = true; }; if (enabled){ if (phase == ButtonPhase.OVER){ _local3 = textField.getStyle("textRollOverColor"); } else { if (phase == ButtonPhase.DOWN){ _local3 = textField.getStyle("textSelectedColor"); } else { _local3 = textField.getStyle("color"); }; }; textField.setColor(_local3); }; } private function autoRepeatTimer_timerDelayHandler(_arg1:Event):void{ if (!enabled){ return; }; dispatchEvent(new FlexEvent(FlexEvent.BUTTON_DOWN)); if (autoRepeat){ autoRepeatTimer.reset(); autoRepeatTimer.removeEventListener(TimerEvent.TIMER, autoRepeatTimer_timerDelayHandler); autoRepeatTimer.delay = getStyle("repeatInterval"); autoRepeatTimer.addEventListener(TimerEvent.TIMER, autoRepeatTimer_timerHandler); autoRepeatTimer.start(); }; } protected function mouseDownHandler(_arg1:MouseEvent):void{ if (!enabled){ return; }; systemManager.addEventListener(MouseEvent.MOUSE_UP, systemManager_mouseUpHandler, true); systemManager.stage.addEventListener(Event.MOUSE_LEAVE, stage_mouseLeaveHandler); buttonPressed(); _arg1.updateAfterEvent(); } override public function set enabled(_arg1:Boolean):void{ if (super.enabled == _arg1){ return; }; super.enabled = _arg1; enabledChanged = true; invalidateProperties(); invalidateDisplayList(); } public function get labelPlacement():String{ return (_labelPlacement); } override public function get baselinePosition():Number{ var _local1:String; var _local2:TextLineMetrics; _local1 = label; if (!_local1){ _local1 = "Wj"; }; validateNow(); if (((!(label)) && ((((labelPlacement == ButtonLabelPlacement.TOP)) || ((labelPlacement == ButtonLabelPlacement.BOTTOM)))))){ _local2 = measureText(_local1); return ((((measuredHeight - _local2.height) / 2) + _local2.ascent)); }; return ((textField.y + measureText(_local1).ascent)); } public function set toggle(_arg1:Boolean):void{ _toggle = _arg1; toggleChanged = true; invalidateProperties(); invalidateDisplayList(); dispatchEvent(new Event("toggleChanged")); } public function set emphasized(_arg1:Boolean):void{ _emphasized = _arg1; changeSkins(); invalidateDisplayList(); } public function get selected():Boolean{ return (_selected); } mx_internal function buttonReleased():void{ systemManager.removeEventListener(MouseEvent.MOUSE_UP, systemManager_mouseUpHandler, true); systemManager.stage.removeEventListener(Event.MOUSE_LEAVE, stage_mouseLeaveHandler); if (autoRepeatTimer){ autoRepeatTimer.removeEventListener(TimerEvent.TIMER, autoRepeatTimer_timerDelayHandler); autoRepeatTimer.removeEventListener(TimerEvent.TIMER, autoRepeatTimer_timerHandler); autoRepeatTimer.reset(); }; } public function set listData(_arg1:BaseListData):void{ _listData = _arg1; } mx_internal function set phase(_arg1:String):void{ _phase = _arg1; invalidateSize(); invalidateDisplayList(); } private function stage_mouseLeaveHandler(_arg1:Event):void{ phase = ButtonPhase.UP; buttonReleased(); } public function get label():String{ return (_label); } override protected function focusOutHandler(_arg1:FocusEvent):void{ super.focusOutHandler(_arg1); if (phase != ButtonPhase.UP){ phase = ButtonPhase.UP; }; } override protected function createChildren():void{ super.createChildren(); if (!textField){ textField = new UITextField(); textField.styleName = this; addChild(textField); }; } protected function rollOverHandler(_arg1:MouseEvent):void{ if (phase == ButtonPhase.UP){ if (_arg1.buttonDown){ return; }; phase = ButtonPhase.OVER; _arg1.updateAfterEvent(); } else { if (phase == ButtonPhase.OVER){ phase = ButtonPhase.DOWN; _arg1.updateAfterEvent(); if (autoRepeatTimer){ autoRepeatTimer.start(); }; }; }; } public function set data(_arg1:Object):void{ var _local2:*; var _local3:*; _data = _arg1; if (((_listData) && ((_listData is DataGridListData)))){ _local2 = _data[DataGridListData(_listData).dataField]; _local3 = ""; } else { if (_listData){ if (selectedField){ _local2 = _data[selectedField]; }; _local3 = _listData.label; } else { _local2 = _data; }; }; if (((!((_local2 === undefined))) && (!(selectedSet)))){ selected = (_local2 as Boolean); selectedSet = false; }; if (((!((_local3 === undefined))) && (!(labelSet)))){ label = _local3; labelSet = false; }; dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE)); } override protected function initializeAccessibility():void{ if (Button.createAccessibilityImplementation != null){ Button.createAccessibilityImplementation(this); }; } public function get data():Object{ if (!_data){ _data = {}; }; return (_data); } public function get toggle():Boolean{ return (_toggle); } override public function styleChanged(_arg1:String):void{ styleChangedFlag = true; super.styleChanged(_arg1); if (((!(_arg1)) || ((_arg1 == "styleName")))){ changeSkins(); changeIcons(); } else { if (_arg1.toLowerCase().indexOf("skin") != -1){ changeSkins(); } else { if (_arg1.toLowerCase().indexOf("icon") != -1){ changeIcons(); invalidateSize(); }; }; }; } override public function set toolTip(_arg1:String):void{ super.toolTip = _arg1; if (_arg1){ toolTipSet = true; } else { toolTipSet = false; invalidateDisplayList(); }; } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local3:int; var _local4:int; var _local5:IFlexDisplayObject; var _local6:Boolean; super.updateDisplayList(_arg1, _arg2); _local3 = skins.length; _local4 = 0; while (_local4 < _local3) { _local5 = IFlexDisplayObject(skins[_local4]); _local5.setActualSize(_arg1, _arg2); _local4++; }; viewSkin(); viewIcon(); if (((currentIcon) && ((currentIcon is IUIComponent)))){ IUIComponent(currentIcon).enabled = enabled; }; layoutContents(_arg1, _arg2, (phase == ButtonPhase.DOWN)); if ((((((((oldUnscaledWidth > _arg1)) || (!((textField.text == label))))) || (labelChanged))) || (styleChangedFlag))){ textField.text = label; _local6 = textField.truncateToFit(); if (!toolTipSet){ if (_local6){ super.toolTip = label; } else { super.toolTip = null; }; }; styleChangedFlag = false; labelChanged = false; }; oldUnscaledWidth = _arg1; } } }//package mx.controls
Section 262
//ButtonLabelPlacement (mx.controls.ButtonLabelPlacement) package mx.controls { public final class ButtonLabelPlacement { public static const TOP:String = "top"; public static const LEFT:String = "left"; mx_internal static const VERSION:String = "2.0.1.0"; public static const BOTTOM:String = "bottom"; public static const RIGHT:String = "right"; } }//package mx.controls
Section 263
//ButtonPhase (mx.controls.ButtonPhase) package mx.controls { public final class ButtonPhase { public static const DOWN:String = "down"; public static const OVER:String = "over"; mx_internal static const VERSION:String = "2.0.1.0"; public static const UP:String = "up"; } }//package mx.controls
Section 264
//HScrollBar (mx.controls.HScrollBar) package mx.controls { import mx.controls.scrollClasses.*; import flash.ui.*; public class HScrollBar extends ScrollBar { mx_internal static const VERSION:String = "2.0.1.0"; public function HScrollBar(){ super.direction = ScrollBarDirection.HORIZONTAL; scaleX = -1; rotation = -90; } override mx_internal function get virtualHeight():Number{ return (unscaledWidth); } override mx_internal function isScrollBarKey(_arg1:uint):Boolean{ if (_arg1 == Keyboard.LEFT){ lineScroll(-1); return (true); }; if (_arg1 == Keyboard.RIGHT){ lineScroll(1); return (true); }; return (super.isScrollBarKey(_arg1)); } override protected function measure():void{ super.measure(); measuredWidth = _minHeight; measuredHeight = _minWidth; } override public function get minHeight():Number{ return (_minWidth); } override public function get minWidth():Number{ return (_minHeight); } override public function set direction(_arg1:String):void{ } } }//package mx.controls
Section 265
//ToolTip (mx.controls.ToolTip) package mx.controls { import mx.core.*; import flash.display.*; import mx.styles.*; import flash.text.*; import mx.skins.*; public class ToolTip extends UIComponent implements IToolTip { mx_internal var border:IFlexDisplayObject; private var textChanged:Boolean; private var _text:String; protected var textField:UITextField; mx_internal static const VERSION:String = "2.0.1.0"; public static var maxWidth:Number = 300; public function ToolTip(){ mouseEnabled = false; } mx_internal function getTextField():UITextField{ return (textField); } public function get text():String{ return (_text); } override protected function measure():void{ var _local1:EdgeMetrics; var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; super.measure(); _local1 = borderMetrics; _local2 = (_local1.left + getStyle("paddingLeft")); _local3 = (_local1.top + getStyle("paddingTop")); _local4 = (_local1.right + getStyle("paddingRight")); _local5 = (_local1.bottom + getStyle("paddingBottom")); _local6 = (_local2 + _local4); _local7 = (_local3 + _local5); textField.wordWrap = false; if ((textField.textWidth + _local6) > ToolTip.maxWidth){ textField.width = (ToolTip.maxWidth - _local6); textField.wordWrap = true; }; measuredWidth = (textField.width + _local6); measuredHeight = (textField.height + _local7); } override protected function commitProperties():void{ var _local1:TextFormat; super.commitProperties(); if (textChanged){ _local1 = textField.getTextFormat(); _local1.leftMargin = 0; _local1.rightMargin = 0; textField.defaultTextFormat = _local1; textField.text = _text; textChanged = false; }; } public function set text(_arg1:String):void{ _text = _arg1; textChanged = true; invalidateProperties(); invalidateSize(); invalidateDisplayList(); } override protected function createChildren():void{ var _local1:Class; super.createChildren(); if (!border){ _local1 = getStyle("borderSkin"); border = new (_local1); if ((border is ISimpleStyleClient)){ ISimpleStyleClient(border).styleName = this; }; addChild(DisplayObject(border)); }; if (!textField){ textField = new UITextField(); textField.autoSize = TextFieldAutoSize.LEFT; textField.mouseEnabled = false; textField.multiline = true; textField.selectable = false; textField.wordWrap = false; textField.styleName = this; addChild(textField); }; } private function get borderMetrics():EdgeMetrics{ if ((border is RectangularBorder)){ return (RectangularBorder(border).borderMetrics); }; return (EdgeMetrics.EMPTY); } override public function styleChanged(_arg1:String):void{ super.styleChanged(_arg1); if ((((((_arg1 == "borderStyle")) || ((_arg1 == "styleName")))) || ((_arg1 == null)))){ invalidateDisplayList(); }; } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local3:EdgeMetrics; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; super.updateDisplayList(_arg1, _arg2); _local3 = borderMetrics; _local4 = (_local3.left + getStyle("paddingLeft")); _local5 = (_local3.top + getStyle("paddingTop")); _local6 = (_local3.right + getStyle("paddingRight")); _local7 = (_local3.bottom + getStyle("paddingBottom")); _local8 = (_local4 + _local6); _local9 = (_local5 + _local7); border.setActualSize(_arg1, _arg2); textField.move(_local4, _local5); textField.setActualSize((_arg1 - _local8), (_arg2 - _local9)); } } }//package mx.controls
Section 266
//VScrollBar (mx.controls.VScrollBar) package mx.controls { import mx.controls.scrollClasses.*; import flash.ui.*; public class VScrollBar extends ScrollBar { mx_internal static const VERSION:String = "2.0.1.0"; public function VScrollBar(){ super.direction = ScrollBarDirection.VERTICAL; } override mx_internal function isScrollBarKey(_arg1:uint):Boolean{ if (_arg1 == Keyboard.UP){ lineScroll(-1); return (true); }; if (_arg1 == Keyboard.DOWN){ lineScroll(1); return (true); }; if (_arg1 == Keyboard.PAGE_UP){ pageScroll(-1); return (true); }; if (_arg1 == Keyboard.PAGE_DOWN){ pageScroll(1); return (true); }; return (super.isScrollBarKey(_arg1)); } override protected function measure():void{ super.measure(); measuredWidth = _minWidth; measuredHeight = _minHeight; } override public function get minHeight():Number{ return (_minHeight); } override public function get minWidth():Number{ return (_minWidth); } override public function set direction(_arg1:String):void{ } } }//package mx.controls
Section 267
//Application (mx.core.Application) package mx.core { import mx.resources.*; import flash.system.*; import flash.display.*; import flash.events.*; import mx.styles.*; import mx.events.*; import mx.managers.*; import mx.effects.*; import flash.net.*; import flash.utils.*; import mx.containers.utilityClasses.*; import flash.external.*; import flash.ui.*; public class Application extends LayoutContainer { public var frameRate:Number; private var _viewSourceURL:String; public var scriptTimeLimit:Number; public var resetHistory:Boolean;// = true mx_internal var _url:String; public var preloader:Object; public var pageTitle:String; private var processingCreationQueue:Boolean;// = false private var creationQueue:Array; private var resizeWidth:Boolean;// = true public var controlBar:IUIComponent; private var _applicationViewMetrics:EdgeMetrics; private var preloadObj:Object; public var usePreloader:Boolean; private var resizeHandlerAdded:Boolean;// = false private var resizeHeight:Boolean;// = true public var scriptRecursionLimit:int; mx_internal var _parameters:Object; mx_internal static const VERSION:String = "2.0.1.0"; private static var viewSourceMenuItem:String; mx_internal static var useProgressiveLayout:Boolean = false; private static var packageResources:ResourceBundle = ResourceBundle.getResourceBundle("core", ApplicationDomain.currentDomain); public function Application(){ resizeHandlerAdded = false; creationQueue = []; processingCreationQueue = false; resizeWidth = true; resizeHeight = true; resetHistory = true; name = "application"; UIComponentGlobals.layoutManager = (Singleton.getInstance("mx.managers::ILayoutManager") as ILayoutManager); UIComponentGlobals.layoutManager.usePhasedInstantiation = true; if (!ApplicationGlobals.application){ ApplicationGlobals.application = this; }; super(); layoutObject = new ApplicationLayout(); layoutObject.target = this; boxLayoutClass = ApplicationLayout; showInAutomationHierarchy = true; } mx_internal function dockControlBar(_arg1:IUIComponent, _arg2:Boolean):void{ var controlBar = _arg1; var dock = _arg2; if (dock){ try { removeChild(DisplayObject(controlBar)); } catch(e:Error) { return; }; rawChildren.addChildAt(DisplayObject(controlBar), firstChildIndex); setControlBar(controlBar); } else { try { rawChildren.removeChild(DisplayObject(controlBar)); } catch(e:Error) { return; }; setControlBar(null); addChildAt(DisplayObject(controlBar), 0); }; } override mx_internal function initThemeColor():Boolean{ var _local1:Boolean; var _local2:Object; var _local3:Number; var _local4:Number; var _local5:CSSStyleDeclaration; _local1 = super.initThemeColor(); if (!_local1){ _local5 = StyleManager.getStyleDeclaration("global"); if (_local5){ _local2 = _local5.getStyle("themeColor"); _local3 = _local5.getStyle("rollOverColor"); _local4 = _local5.getStyle("selectionColor"); }; if (((((_local2) && (isNaN(_local3)))) && (isNaN(_local4)))){ setThemeColor(_local2); }; _local1 = true; }; return (_local1); } private function resizeHandler(_arg1:Event):void{ var _local2:Number; var _local3:Number; if (resizeWidth){ if (isNaN(percentWidth)){ _local2 = DisplayObject(systemManager).width; } else { super.percentWidth = Math.max(percentWidth, 0); super.percentWidth = Math.min(percentWidth, 100); _local2 = ((percentWidth * screen.width) / 100); }; if (!isNaN(explicitMaxWidth)){ _local2 = Math.min(_local2, explicitMaxWidth); }; if (!isNaN(explicitMinWidth)){ _local2 = Math.max(_local2, explicitMinWidth); }; } else { _local2 = width; }; if (resizeHeight){ if (isNaN(percentHeight)){ _local3 = DisplayObject(systemManager).height; } else { super.percentHeight = Math.max(percentHeight, 0); super.percentHeight = Math.min(percentHeight, 100); _local3 = ((percentHeight * screen.height) / 100); }; if (!isNaN(explicitMaxHeight)){ _local3 = Math.min(_local3, explicitMaxHeight); }; if (!isNaN(explicitMinHeight)){ _local3 = Math.max(_local3, explicitMinHeight); }; } else { _local3 = height; }; if (((!((_local2 == width))) || (!((_local3 == height))))){ invalidateProperties(); invalidateSize(); }; setActualSize(_local2, _local3); invalidateDisplayList(); } override public function set tabIndex(_arg1:int):void{ } public function set viewSourceURL(_arg1:String):void{ _viewSourceURL = _arg1; } override mx_internal function get usePadding():Boolean{ return (!((layout == ContainerLayout.ABSOLUTE))); } private function initContextMenu():void{ var _local1:ContextMenu; var _local2:ContextMenuItem; _local1 = new ContextMenu(); _local1.hideBuiltInItems(); _local1.builtInItems.print = true; if (_viewSourceURL){ _local2 = new ContextMenuItem(viewSourceMenuItem, true); _local2.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, menuItemSelectHandler); _local1.customItems.push(_local2); }; contextMenu = _local1; } override public function set icon(_arg1:Class):void{ } override public function set percentWidth(_arg1:Number):void{ super.percentWidth = _arg1; invalidateDisplayList(); } override public function getChildIndex(_arg1:DisplayObject):int{ if (((controlBar) && ((_arg1 == controlBar)))){ return (-1); }; return (super.getChildIndex(_arg1)); } override public function get id():String{ if (((((!(super.id)) && ((this == Application.application)))) && (ExternalInterface.available))){ return (ExternalInterface.objectID); }; return (super.id); } override protected function measure():void{ var _local1:EdgeMetrics; var _local2:Number; super.measure(); _local1 = borderMetrics; if (((controlBar) && (controlBar.includeInLayout))){ _local2 = ((controlBar.getExplicitOrMeasuredWidth() + _local1.left) + _local1.right); measuredWidth = Math.max(measuredWidth, _local2); measuredMinWidth = Math.max(measuredMinWidth, _local2); }; } public function get url():String{ return (_url); } private function debugTickler():void{ var _local1:int; _local1 = 0; } override public function finishPrint(_arg1:Object, _arg2:IFlexDisplayObject):void{ if (_arg2 == this){ setActualSize(_arg1.width, _arg1.height); if (horizontalScrollBar){ horizontalScrollBar.visible = _arg1.horizontalScrollBarVisible; }; if (verticalScrollBar){ verticalScrollBar.visible = _arg1.verticalScrollBarVisible; }; if (whiteBox){ whiteBox.visible = _arg1.whiteBoxVisible; }; horizontalScrollPosition = _arg1.horizontalScrollPosition; verticalScrollPosition = _arg1.verticalScrollPosition; updateDisplayList(unscaledWidth, unscaledHeight); }; super.finishPrint(_arg1.scrollRect, _arg2); } override public function set label(_arg1:String):void{ } public function get parameters():Object{ return (_parameters); } override public function prepareToPrint(_arg1:IFlexDisplayObject):Object{ var _local2:Object; _local2 = {}; if (_arg1 == this){ _local2.width = width; _local2.height = height; _local2.verticalScrollPosition = verticalScrollPosition; _local2.horizontalScrollPosition = horizontalScrollPosition; _local2.horizontalScrollBarVisible = !((horizontalScrollBar == null)); _local2.verticalScrollBarVisible = !((verticalScrollBar == null)); _local2.whiteBoxVisible = !((whiteBox == null)); setActualSize(measuredWidth, measuredHeight); horizontalScrollPosition = 0; verticalScrollPosition = 0; if (horizontalScrollBar){ horizontalScrollBar.visible = false; }; if (verticalScrollBar){ verticalScrollBar.visible = false; }; if (whiteBox){ whiteBox.visible = false; }; updateDisplayList(unscaledWidth, unscaledHeight); }; _local2.scrollRect = super.prepareToPrint(_arg1); return (_local2); } public function get viewSourceURL():String{ return (_viewSourceURL); } override protected function layoutChrome(_arg1:Number, _arg2:Number):void{ var _local3:EdgeMetrics; var _local4:Number; var _local5:EdgeMetrics; super.layoutChrome(_arg1, _arg2); if (!doingLayout){ createBorder(); }; _local3 = borderMetrics; _local4 = getStyle("borderThickness"); _local5 = new EdgeMetrics(); _local5.left = (_local3.left - _local4); _local5.top = (_local3.top - _local4); _local5.right = (_local3.right - _local4); _local5.bottom = (_local3.bottom - _local4); if (((controlBar) && (controlBar.includeInLayout))){ if ((controlBar is IInvalidating)){ IInvalidating(controlBar).invalidateDisplayList(); }; controlBar.setActualSize((width - (_local5.left + _local5.right)), controlBar.getExplicitOrMeasuredHeight()); controlBar.move(_local5.left, _local5.top); }; } override public function get viewMetrics():EdgeMetrics{ var _local1:EdgeMetrics; var _local2:EdgeMetrics; var _local3:Number; if (!_applicationViewMetrics){ _applicationViewMetrics = new EdgeMetrics(); }; _local1 = _applicationViewMetrics; _local2 = super.viewMetrics; _local3 = getStyle("borderThickness"); _local1.left = _local2.left; _local1.top = _local2.top; _local1.right = _local2.right; _local1.bottom = _local2.bottom; if (((controlBar) && (controlBar.includeInLayout))){ _local1.top = (_local1.top - _local3); _local1.top = (_local1.top + Math.max(controlBar.getExplicitOrMeasuredHeight(), _local3)); }; return (_local1); } private function addedHandler(_arg1:Event):void{ if ((((_arg1.target == this)) && ((creationQueue.length > 0)))){ doNextQueueItem(); }; } private function menuItemSelectHandler(_arg1:Event):void{ navigateToURL(new URLRequest(_viewSourceURL), "_blank"); } private function doNextQueueItem(_arg1:FlexEvent=null):void{ processingCreationQueue = true; Application.useProgressiveLayout = true; callLater(processNextQueueItem); } private function setControlBar(_arg1:IUIComponent):void{ if (_arg1 == controlBar){ return; }; if (((controlBar) && ((controlBar is IStyleClient)))){ IStyleClient(controlBar).clearStyle("cornerRadius"); IStyleClient(controlBar).clearStyle("docked"); }; controlBar = _arg1; if (((controlBar) && ((controlBar is IStyleClient)))){ IStyleClient(controlBar).setStyle("cornerRadius", 0); IStyleClient(controlBar).setStyle("docked", true); }; invalidateSize(); invalidateDisplayList(); invalidateViewMetricsAndPadding(); } override public function initialize():void{ var _local1:ISystemManager; var _local2:Object; _local1 = systemManager; _url = _local1.loaderInfo.url; _parameters = _local1.loaderInfo.parameters; initManagers(_local1); _descriptor = null; if (documentDescriptor){ (creationPolicy == documentDescriptor.properties.creationPolicy); if ((((creationPolicy == null)) || ((creationPolicy.length == 0)))){ creationPolicy = ContainerCreationPolicy.AUTO; }; _local2 = documentDescriptor.properties; if (_local2.width != null){ width = _local2.width; delete _local2.width; }; if (_local2.height != null){ height = _local2.height; delete _local2.height; }; documentDescriptor.events = null; }; initContextMenu(); super.initialize(); addEventListener(Event.ADDED, addedHandler); if (((_local1.isTopLevel()) && ((Capabilities.isDebugger == true)))){ setInterval(debugTickler, 1500); }; } private function initManagers(_arg1:ISystemManager):void{ if (_arg1.isTopLevel()){ focusManager = new FocusManager(this); _arg1.activate(this); }; } override public function set percentHeight(_arg1:Number):void{ super.percentHeight = _arg1; invalidateDisplayList(); } private function printCreationQueue():void{ var _local1:String; var _local2:Number; var _local3:int; var _local4:Object; _local1 = ""; _local2 = creationQueue.length; _local3 = 0; while (_local3 < _local2) { _local4 = creationQueue[_local3]; _local1 = (_local1 + (((((" [" + _local3) + "] ") + _local4.id) + " ") + _local4.index)); _local3++; }; } override public function set toolTip(_arg1:String):void{ } override public function styleChanged(_arg1:String):void{ super.styleChanged(_arg1); if ((((_arg1 == "backgroundColor")) && ((getStyle("backgroundImage") == getStyle("defaultBackgroundImage"))))){ clearStyle("backgroundImage"); }; } private function processNextQueueItem():void{ var queueItem:Object; var nextChild:IUIComponent; if (EffectManager.effectsPlaying.length > 0){ callLater(processNextQueueItem); } else { if (creationQueue.length > 0){ queueItem = creationQueue.shift(); try { nextChild = ((queueItem.id is String)) ? document[queueItem.id] : queueItem.id; if ((nextChild is Container)){ Container(nextChild).createComponentsFromDescriptors(true); }; if ((((nextChild is Container)) && ((Container(nextChild).creationPolicy == ContainerCreationPolicy.QUEUED)))){ doNextQueueItem(); } else { nextChild.addEventListener("childrenCreationComplete", doNextQueueItem); }; } catch(e:Error) { processNextQueueItem(); }; } else { processingCreationQueue = false; Application.useProgressiveLayout = false; }; }; } public function addToCreationQueue(_arg1:Object, _arg2:int=-1, _arg3:Function=null, _arg4:IFlexDisplayObject=null):void{ var _local5:int; var _local6:Object; var _local7:Boolean; var _local8:int; var _local9:int; var _local10:int; var _local11:int; var _local12:int; _local5 = creationQueue.length; _local6 = {}; _local7 = false; _local6.id = _arg1; _local6.parent = _arg4; _local6.callbackFunc = _arg3; _local6.index = _arg2; _local11 = 0; while (_local11 < _local5) { _local9 = creationQueue[_local11].index; _local10 = (creationQueue[_local11].parent) ? creationQueue[_local11].parent.nestLevel : 0; if (_local6.index != -1){ if ((((_local9 == -1)) || ((_local6.index < _local9)))){ _local8 = _local11; _local7 = true; break; }; } else { _local12 = (_local6.parent) ? _local6.parent.nestLevel : 0; if ((((_local9 == -1)) && ((_local10 < _local12)))){ _local8 = _local11; _local7 = true; break; }; }; _local11++; }; if (!_local7){ creationQueue.push(_local6); _local7 = true; } else { creationQueue.splice(_local8, 0, _local6); }; if (((initialized) && (!(processingCreationQueue)))){ doNextQueueItem(); }; } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ super.updateDisplayList(_arg1, _arg2); resizeWidth = isNaN(explicitWidth); resizeHeight = isNaN(explicitHeight); if (((resizeWidth) || (resizeHeight))){ resizeHandler(new Event(Event.RESIZE)); if (!resizeHandlerAdded){ systemManager.addEventListener(Event.RESIZE, resizeHandler, false, 0, true); resizeHandlerAdded = true; }; } else { if (resizeHandlerAdded){ systemManager.removeEventListener(Event.RESIZE, resizeHandler); resizeHandlerAdded = false; }; }; createBorder(); } private static function loadResources():void{ viewSourceMenuItem = packageResources.getString("viewSource"); } public static function get application():Object{ return (ApplicationGlobals.application); } loadResources(); } }//package mx.core
Section 268
//ApplicationGlobals (mx.core.ApplicationGlobals) package mx.core { public class ApplicationGlobals { public static var application:Object; } }//package mx.core
Section 269
//BitmapAsset (mx.core.BitmapAsset) package mx.core { import flash.display.*; public class BitmapAsset extends FlexBitmap implements IFlexAsset, IFlexDisplayObject { mx_internal static const VERSION:String = "2.0.1.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 270
//ComponentDescriptor (mx.core.ComponentDescriptor) package mx.core { public class ComponentDescriptor { public var events:Object; public var document:Object; public var type:Class; public var propertiesFactory:Function; private var _properties:Object; public var id:String; mx_internal static const VERSION:String = "2.0.1.0"; public function ComponentDescriptor(_arg1:Object){ var _local2:String; super(); for (_local2 in _arg1) { this[_local2] = _arg1[_local2]; }; } public function toString():String{ return (("ComponentDescriptor_" + id)); } public function invalidateProperties():void{ _properties = null; } public function get properties():Object{ var _local1:Array; var _local2:int; var _local3:int; if (_properties){ return (_properties); }; if (propertiesFactory != null){ _properties = propertiesFactory.call(document); }; if (_properties){ _local1 = _properties.childDescriptors; if (_local1){ _local2 = _local1.length; _local3 = 0; while (_local3 < _local2) { _local1[_local3].document = document; _local3++; }; }; } else { _properties = {}; }; return (_properties); } } }//package mx.core
Section 271
//Container (mx.core.Container) package mx.core { import mx.resources.*; import flash.system.*; import flash.display.*; import flash.events.*; import mx.styles.*; import flash.geom.*; import mx.events.*; import mx.managers.*; import flash.text.*; import mx.graphics.*; import mx.controls.scrollClasses.*; import mx.binding.*; import mx.controls.listClasses.*; import mx.skins.*; import mx.controls.*; import flash.ui.*; public class Container extends UIComponent implements IContainer, IDataRenderer, IFocusManagerContainer, IListItemRenderer, IRawChildrenContainer { private var _horizontalLineScrollSize:Number;// = 5 mx_internal var border:IFlexDisplayObject; private var _viewMetricsAndPadding:EdgeMetrics; private var scrollableWidth:Number;// = 0 private var _rawChildren:ContainerRawChildrenList; private var _data:Object; private var _viewMetrics:EdgeMetrics; private var changedStyles:String;// = null private var _verticalPageScrollSize:Number;// = 0 private var mouseEventReferenceCount:int;// = 0 protected var whiteBox:Shape; private var _verticalScrollBar:ScrollBar; private var _horizontalPageScrollSize:Number;// = 0 private var _clipContent:Boolean;// = true private var _icon:Class;// = null mx_internal var doingLayout:Boolean;// = false private var _createdComponents:Array; private var _firstChildIndex:int;// = 0 private var scrollableHeight:Number;// = 0 mx_internal var _numChildren:int;// = 0 private var recursionFlag:Boolean;// = true private var forceLayout:Boolean;// = false mx_internal var blocker:Sprite; private var _label:String;// = "" private var _numChildrenCreated:int;// = -1 protected var actualCreationPolicy:String; private var _childRepeaters:Array; private var _childDescriptors:Array; private var scrollPropertiesChanged:Boolean;// = false private var scrollPositionChanged:Boolean;// = true private var _focusPane:Sprite; private var _defaultButton:IFlexDisplayObject; private var _forceClippingCount:int; mx_internal var creatingContentPane:Boolean;// = false private var _creationPolicy:String; private var _creationIndex:int;// = -1 private var _verticalScrollPosition:Number;// = 0 private var _autoLayout:Boolean;// = true private var _horizontalScrollBar:ScrollBar; private var viewableHeight:Number;// = 0 private var viewableWidth:Number;// = 0 mx_internal var contentPane:Sprite;// = null private var numChildrenBefore:int; private var _verticalLineScrollSize:Number;// = 5 private var _horizontalScrollPosition:Number;// = 0 mx_internal var _horizontalScrollPolicy:String;// = "auto" private var verticalScrollPositionPending:Number; mx_internal var _verticalScrollPolicy:String;// = "auto" private var horizontalScrollPositionPending:Number; private static const MULTIPLE_PROPERTIES:String = "<MULTIPLE>"; mx_internal static const VERSION:String = "2.0.1.0"; private static var resourceMultipleChildSets_ClassAndInstance:String; private static var resourceMultipleChildSets_ClassAndSubclass:String; private static var resourceScrollDirection:String; private static var packageResources:ResourceBundle = ResourceBundle.getResourceBundle("core", ApplicationDomain.currentDomain); public function Container(){ recursionFlag = true; forceLayout = false; doingLayout = false; changedStyles = null; creatingContentPane = false; contentPane = null; scrollPropertiesChanged = false; scrollPositionChanged = true; scrollableWidth = 0; scrollableHeight = 0; viewableWidth = 0; viewableHeight = 0; mouseEventReferenceCount = 0; _numChildren = 0; _autoLayout = true; _clipContent = true; _creationIndex = -1; _firstChildIndex = 0; _horizontalLineScrollSize = 5; _horizontalPageScrollSize = 0; _horizontalScrollPosition = 0; _horizontalScrollPolicy = ScrollPolicy.AUTO; _icon = null; _label = ""; _numChildrenCreated = -1; _verticalLineScrollSize = 5; _verticalPageScrollSize = 0; _verticalScrollPosition = 0; _verticalScrollPolicy = ScrollPolicy.AUTO; super(); tabChildren = true; tabEnabled = false; showInAutomationHierarchy = false; } mx_internal function get firstChildIndex():int{ return (_firstChildIndex); } mx_internal function rawChildren_getObjectsUnderPoint(_arg1:Point):Array{ return (super.getObjectsUnderPoint(_arg1)); } protected function scrollChildren():void{ var _local1:EdgeMetrics; var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Rectangle; if (!contentPane){ return; }; _local1 = viewMetrics; _local2 = 0; _local3 = 0; _local4 = ((unscaledWidth - _local1.left) - _local1.right); _local5 = ((unscaledHeight - _local1.top) - _local1.bottom); if (_clipContent){ _local2 = (_local2 + _horizontalScrollPosition); if (horizontalScrollBar){ _local4 = viewableWidth; }; _local3 = (_local3 + _verticalScrollPosition); if (verticalScrollBar){ _local5 = viewableHeight; }; } else { _local4 = scrollableWidth; _local5 = scrollableHeight; }; _local6 = getScrollableRect(); if ((((((((((((((_local2 == 0)) && ((_local3 == 0)))) && ((_local4 >= _local6.right)))) && ((_local5 >= _local6.bottom)))) && ((_local6.left >= 0)))) && ((_local6.top >= 0)))) && ((_forceClippingCount <= 0)))){ contentPane.scrollRect = null; contentPane.opaqueBackground = null; contentPane.cacheAsBitmap = false; } else { contentPane.scrollRect = new Rectangle(_local2, _local3, _local4, _local5); }; if (focusPane){ focusPane.scrollRect = contentPane.scrollRect; }; if (((((border) && ((border is RectangularBorder)))) && (RectangularBorder(border).hasBackgroundImage))){ RectangularBorder(border).adjustBackgroundImage(); }; } mx_internal function get createdComponents():Array{ return (_createdComponents); } public function get childDescriptors():Array{ return (_childDescriptors); } public function get verticalScrollPosition():Number{ if (!isNaN(verticalScrollPositionPending)){ return (verticalScrollPositionPending); }; return (_verticalScrollPosition); } mx_internal function set createdComponents(_arg1:Array):void{ _createdComponents = _arg1; } mx_internal function get childRepeaters():Array{ return (_childRepeaters); } public function get horizontalScrollPosition():Number{ if (!isNaN(horizontalScrollPositionPending)){ return (horizontalScrollPositionPending); }; return (_horizontalScrollPosition); } override public function get focusPane():Sprite{ return (_focusPane); } private function createOrDestroyScrollbars(_arg1:Boolean, _arg2:Boolean, _arg3:Boolean):Boolean{ var _local4:Boolean; var _local5:IFocusManager; var _local6:String; var _local7:String; var _local8:Graphics; _local4 = false; if (((((_arg1) || (_arg2))) || (_arg3))){ createContentPane(); }; if (_arg1){ if (!horizontalScrollBar){ horizontalScrollBar = new HScrollBar(); horizontalScrollBar.name = "horizontalScrollBar"; _local6 = getStyle("horizontalScrollBarStyleName"); if (((_local6) && ((horizontalScrollBar is ISimpleStyleClient)))){ ISimpleStyleClient(horizontalScrollBar).styleName = _local6; }; rawChildren.addChild(DisplayObject(horizontalScrollBar)); horizontalScrollBar.lineScrollSize = horizontalLineScrollSize; horizontalScrollBar.pageScrollSize = horizontalPageScrollSize; horizontalScrollBar.addEventListener(ScrollEvent.SCROLL, horizontalScrollBar_scrollHandler); horizontalScrollBar.enabled = enabled; if ((horizontalScrollBar is IInvalidating)){ IInvalidating(horizontalScrollBar).validateNow(); }; invalidateDisplayList(); invalidateViewMetricsAndPadding(); _local4 = true; if (!verticalScrollBar){ addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler); }; }; } else { if (horizontalScrollBar){ horizontalScrollBar.removeEventListener(ScrollEvent.SCROLL, horizontalScrollBar_scrollHandler); rawChildren.removeChild(DisplayObject(horizontalScrollBar)); horizontalScrollBar = null; viewableWidth = (scrollableWidth = 0); if (_horizontalScrollPosition != 0){ _horizontalScrollPosition = 0; scrollPositionChanged = true; }; invalidateDisplayList(); invalidateViewMetricsAndPadding(); _local4 = true; _local5 = focusManager; if (((!(verticalScrollBar)) && (((!(_local5)) || (!((_local5.getFocus() == this))))))){ removeEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler); }; }; }; if (_arg2){ if (!verticalScrollBar){ verticalScrollBar = new VScrollBar(); verticalScrollBar.name = "verticalScrollBar"; _local7 = getStyle("verticalScrollBarStyleName"); if (((_local7) && ((verticalScrollBar is ISimpleStyleClient)))){ ISimpleStyleClient(verticalScrollBar).styleName = _local7; }; rawChildren.addChild(DisplayObject(verticalScrollBar)); verticalScrollBar.lineScrollSize = verticalLineScrollSize; verticalScrollBar.pageScrollSize = verticalPageScrollSize; verticalScrollBar.addEventListener(ScrollEvent.SCROLL, verticalScrollBar_scrollHandler); verticalScrollBar.enabled = enabled; if ((verticalScrollBar is IInvalidating)){ IInvalidating(verticalScrollBar).validateNow(); }; invalidateDisplayList(); invalidateViewMetricsAndPadding(); _local4 = true; if (!horizontalScrollBar){ addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler); }; addEventListener(MouseEvent.MOUSE_WHEEL, mouseWheelHandler); }; } else { if (verticalScrollBar){ verticalScrollBar.removeEventListener(ScrollEvent.SCROLL, verticalScrollBar_scrollHandler); rawChildren.removeChild(DisplayObject(verticalScrollBar)); verticalScrollBar = null; viewableHeight = (scrollableHeight = 0); if (_verticalScrollPosition != 0){ _verticalScrollPosition = 0; scrollPositionChanged = true; }; invalidateDisplayList(); invalidateViewMetricsAndPadding(); _local4 = true; _local5 = focusManager; if (((!(horizontalScrollBar)) && (((!(_local5)) || (!((_local5.getFocus() == this))))))){ removeEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler); }; removeEventListener(MouseEvent.MOUSE_WHEEL, mouseWheelHandler); }; }; if (((horizontalScrollBar) && (verticalScrollBar))){ if (!whiteBox){ whiteBox = new FlexShape(); whiteBox.name = "whiteBox"; _local8 = whiteBox.graphics; _local8.beginFill(0xFFFFFF); _local8.drawRect(0, 0, verticalScrollBar.minWidth, horizontalScrollBar.minHeight); _local8.endFill(); rawChildren.addChild(whiteBox); }; } else { if (whiteBox){ rawChildren.removeChild(whiteBox); whiteBox = null; }; }; return (_local4); } override protected function keyDownHandler(_arg1:KeyboardEvent):void{ var _local2:Object; var _local3:String; var _local4:Number; _local2 = getFocus(); if ((_local2 is TextField)){ return; }; if (verticalScrollBar){ _local3 = ScrollEventDirection.VERTICAL; _local4 = verticalScrollPosition; switch (_arg1.keyCode){ case Keyboard.DOWN: verticalScrollPosition = (verticalScrollPosition + verticalLineScrollSize); dispatchScrollEvent(_local3, _local4, verticalScrollPosition, ScrollEventDetail.LINE_DOWN); _arg1.stopPropagation(); break; case Keyboard.UP: verticalScrollPosition = (verticalScrollPosition - verticalLineScrollSize); dispatchScrollEvent(_local3, _local4, verticalScrollPosition, ScrollEventDetail.LINE_UP); _arg1.stopPropagation(); break; case Keyboard.PAGE_UP: verticalScrollPosition = (verticalScrollPosition - verticalPageScrollSize); dispatchScrollEvent(_local3, _local4, verticalScrollPosition, ScrollEventDetail.PAGE_UP); _arg1.stopPropagation(); break; case Keyboard.PAGE_DOWN: verticalScrollPosition = (verticalScrollPosition + verticalPageScrollSize); dispatchScrollEvent(_local3, _local4, verticalScrollPosition, ScrollEventDetail.PAGE_DOWN); _arg1.stopPropagation(); break; case Keyboard.HOME: verticalScrollPosition = verticalScrollBar.minScrollPosition; dispatchScrollEvent(_local3, _local4, verticalScrollPosition, ScrollEventDetail.AT_TOP); _arg1.stopPropagation(); break; case Keyboard.END: verticalScrollPosition = verticalScrollBar.maxScrollPosition; dispatchScrollEvent(_local3, _local4, verticalScrollPosition, ScrollEventDetail.AT_BOTTOM); _arg1.stopPropagation(); break; }; }; if (horizontalScrollBar){ _local3 = ScrollEventDirection.HORIZONTAL; _local4 = horizontalScrollPosition; switch (_arg1.keyCode){ case Keyboard.LEFT: horizontalScrollPosition = (horizontalScrollPosition - horizontalLineScrollSize); dispatchScrollEvent(_local3, _local4, horizontalScrollPosition, ScrollEventDetail.LINE_LEFT); _arg1.stopPropagation(); break; case Keyboard.RIGHT: horizontalScrollPosition = (horizontalScrollPosition + horizontalLineScrollSize); dispatchScrollEvent(_local3, _local4, horizontalScrollPosition, ScrollEventDetail.LINE_RIGHT); _arg1.stopPropagation(); break; }; }; } protected function createBorder():void{ var _local1:Class; if (((!(border)) && (isBorderNeeded()))){ _local1 = getStyle("borderSkin"); border = new (_local1); border.name = "border"; if ((border is IUIComponent)){ IUIComponent(border).enabled = enabled; }; if ((border is ISimpleStyleClient)){ ISimpleStyleClient(border).styleName = this; }; rawChildren.addChildAt(DisplayObject(border), 0); invalidateDisplayList(); }; } public function set verticalScrollPosition(_arg1:Number):void{ if (_verticalScrollPosition == _arg1){ return; }; _verticalScrollPosition = _arg1; scrollPositionChanged = true; if (!initialized){ verticalScrollPositionPending = _arg1; }; invalidateDisplayList(); dispatchEvent(new Event("viewChanged")); } private function horizontalScrollBar_scrollHandler(_arg1:Event):void{ var _local2:Number; if ((_arg1 is ScrollEvent)){ _local2 = horizontalScrollPosition; horizontalScrollPosition = horizontalScrollBar.scrollPosition; dispatchScrollEvent(ScrollEventDirection.HORIZONTAL, _local2, horizontalScrollPosition, ScrollEvent(_arg1).detail); }; } public function get icon():Class{ return (_icon); } public function set horizontalScrollBar(_arg1:ScrollBar):void{ _horizontalScrollBar = _arg1; } mx_internal function set childRepeaters(_arg1:Array):void{ _childRepeaters = _arg1; } public function createComponentFromDescriptor(_arg1:ComponentDescriptor, _arg2:Boolean):IFlexDisplayObject{ var _local3:UIComponentDescriptor; var _local4:Object; var _local5:Class; var _local6:IDeferredInstantiationUIComponent; var _local7:String; var _local8:Object; var _local9:Array; var _local10:IRepeaterClient; var _local11:IStyleClient; var _local12:String; var _local13:String; _local3 = UIComponentDescriptor(_arg1); _local4 = _local3.properties; if (((((((!((numChildrenBefore == 0))) || (!((numChildrenCreated == -1))))) && ((_local3.instanceIndices == null)))) && (hasChildMatchingDescriptor(_local3)))){ return (null); }; UIComponentGlobals.layoutManager.usePhasedInstantiation = true; _local5 = _local3.type; _local6 = new (_local5); _local6.id = _local3.id; if (((_local6.id) && (!((_local6.id == ""))))){ _local6.name = _local6.id; }; _local6.descriptor = _local3; if (((_local4.childDescriptors) && ((_local6 is Container)))){ Container(_local6)._childDescriptors = _local4.childDescriptors; delete _local4.childDescriptors; }; for (_local7 in _local4) { _local6[_local7] = _local4[_local7]; }; if ((_local6 is Container)){ Container(_local6).recursionFlag = _arg2; }; if (_local3.instanceIndices){ if ((_local6 is IRepeaterClient)){ _local10 = IRepeaterClient(_local6); _local10.instanceIndices = _local3.instanceIndices; _local10.repeaters = _local3.repeaters; _local10.repeaterIndices = _local3.repeaterIndices; }; }; if ((_local6 is IStyleClient)){ _local11 = IStyleClient(_local6); if (_local3.stylesFactory != null){ if (!_local11.styleDeclaration){ _local11.styleDeclaration = new CSSStyleDeclaration(); }; _local11.styleDeclaration.factory = _local3.stylesFactory; }; }; _local8 = _local3.events; if (_local8){ for (_local12 in _local8) { _local13 = _local8[_local12]; _local6.addEventListener(_local12, _local3.document[_local13]); }; }; _local9 = _local3.effects; if (_local9){ _local6.registerEffects(_local9); }; if ((_local6 is IRepeaterClient)){ IRepeaterClient(_local6).initializeRepeaterArrays(this); }; _local6.createReferenceOnParentDocument(IFlexDisplayObject(_local3.document)); if (!_local6.document){ _local6.document = _local3.document; }; if ((_local6 is IRepeater)){ if (!childRepeaters){ childRepeaters = []; }; childRepeaters.push(_local6); _local6.executeBindings(); IRepeater(_local6).initializeRepeater(this, _arg2); } else { addChild(DisplayObject(_local6)); _local6.executeBindings(); if ((((creationPolicy == ContainerCreationPolicy.QUEUED)) || ((creationPolicy == ContainerCreationPolicy.NONE)))){ _local6.addEventListener(FlexEvent.CREATION_COMPLETE, creationCompleteHandler); }; }; return (_local6); } mx_internal function get usePadding():Boolean{ return (true); } public function set horizontalScrollPosition(_arg1:Number):void{ if (_horizontalScrollPosition == _arg1){ return; }; _horizontalScrollPosition = _arg1; scrollPositionChanged = true; if (!initialized){ horizontalScrollPositionPending = _arg1; }; invalidateDisplayList(); dispatchEvent(new Event("viewChanged")); } override public function set focusPane(_arg1:Sprite):void{ var _local2:Boolean; var _local3:Boolean; _local2 = invalidateSizeFlag; _local3 = invalidateDisplayListFlag; invalidateSizeFlag = true; invalidateDisplayListFlag = true; if (_arg1){ rawChildren.addChild(_arg1); _arg1.x = 0; _arg1.y = 0; _arg1.scrollRect = null; _focusPane = _arg1; } else { rawChildren.removeChild(_focusPane); _focusPane = null; }; if (((_arg1) && (contentPane))){ _arg1.x = contentPane.x; _arg1.y = contentPane.y; _arg1.scrollRect = contentPane.scrollRect; }; invalidateSizeFlag = _local2; invalidateDisplayListFlag = _local3; } public function get horizontalScrollPolicy():String{ return (_horizontalScrollPolicy); } public function get horizontalLineScrollSize():Number{ return (_horizontalLineScrollSize); } private function updateBackgroundImageRect():void{ var _local1:RectangularBorder; var _local2:EdgeMetrics; var _local3:Number; var _local4:Number; _local1 = (border as RectangularBorder); if (!_local1){ return; }; if ((((viewableWidth == 0)) && ((viewableHeight == 0)))){ _local1.backgroundImageRect = null; return; }; _local2 = viewMetrics; _local3 = (viewableWidth) ? viewableWidth : ((unscaledWidth - _local2.left) - _local2.right); _local4 = (viewableHeight) ? viewableHeight : ((unscaledHeight - _local2.top) - _local2.bottom); if (getStyle("backgroundAttachment") == "fixed"){ _local1.backgroundImageRect = new Rectangle(_local2.left, _local2.top, _local3, _local4); } else { _local1.backgroundImageRect = new Rectangle(_local2.left, _local2.top, Math.max(scrollableWidth, _local3), Math.max(scrollableHeight, _local4)); }; } mx_internal function invalidateViewMetricsAndPadding():void{ _viewMetricsAndPadding = null; } public function get verticalLineScrollSize():Number{ return (_verticalLineScrollSize); } private function mouseWheelHandler(_arg1:MouseEvent):void{ var _local2:int; var _local3:int; var _local4:Number; var _local5:Number; if (verticalScrollBar){ _arg1.stopPropagation(); _local2 = ((_arg1.delta <= 0)) ? 1 : -1; _local3 = (verticalScrollBar) ? verticalScrollBar.lineScrollSize : 1; _local4 = Math.max(Math.abs(_arg1.delta), _local3); _local5 = verticalScrollPosition; verticalScrollPosition = (verticalScrollPosition + ((3 * _local4) * _local2)); dispatchScrollEvent(ScrollEventDirection.VERTICAL, _local5, verticalScrollPosition, ((_arg1.delta <= 0)) ? ScrollEventDetail.LINE_UP : ScrollEventDetail.LINE_DOWN); }; } mx_internal function createContentPane():void{ var _local1:int; var _local2:Sprite; var _local3:int; var _local4:int; var _local5:IUIComponent; if (contentPane){ return; }; creatingContentPane = true; _local1 = numChildren; _local2 = new FlexSprite(); _local2.name = "contentPane"; _local2.tabChildren = true; if (border){ _local3 = (rawChildren.getChildIndex(DisplayObject(border)) + 1); if ((((border is RectangularBorder)) && (RectangularBorder(border).hasBackgroundImage))){ _local3++; }; } else { _local3 = 0; }; rawChildren.addChildAt(_local2, _local3); _local4 = 0; while (_local4 < _local1) { _local5 = IUIComponent(super.getChildAt(_firstChildIndex)); _local2.addChild(DisplayObject(_local5)); _local5.parentChanged(_local2); _numChildren--; _local4++; }; contentPane = _local2; creatingContentPane = false; contentPane.visible = true; } public function get creationPolicy():String{ return (_creationPolicy); } public function get defaultButton():IFlexDisplayObject{ return (_defaultButton); } public function get verticalScrollPolicy():String{ return (_verticalScrollPolicy); } private function verticalScrollBar_scrollHandler(_arg1:Event):void{ var _local2:Number; if ((_arg1 is ScrollEvent)){ _local2 = verticalScrollPosition; verticalScrollPosition = verticalScrollBar.scrollPosition; dispatchScrollEvent(ScrollEventDirection.VERTICAL, _local2, verticalScrollPosition, ScrollEvent(_arg1).detail); }; } mx_internal function rawChildren_removeChild(_arg1:DisplayObject):DisplayObject{ var _local2:int; _local2 = rawChildren_getChildIndex(_arg1); return (rawChildren_removeChildAt(_local2)); } final mx_internal function get $numChildren():int{ return (super.numChildren); } override public function addChild(_arg1:DisplayObject):DisplayObject{ return (addChildAt(_arg1, numChildren)); } override public function getChildIndex(_arg1:DisplayObject):int{ var _local2:int; if (contentPane){ return (contentPane.getChildIndex(_arg1)); }; _local2 = (super.getChildIndex(_arg1) - _firstChildIndex); return (_local2); } public function set icon(_arg1:Class):void{ _icon = _arg1; dispatchEvent(new Event("iconChanged")); } mx_internal function rawChildren_contains(_arg1:DisplayObject):Boolean{ return (super.contains(_arg1)); } override public function executeBindings(_arg1:Boolean=false):void{ var _local2:Object; _local2 = (((descriptor) && (descriptor.document))) ? descriptor.document : parentDocument; BindingManager.executeBindings(_local2, id, this); if (_arg1){ executeChildBindings(_arg1); }; } mx_internal function rawChildren_getChildIndex(_arg1:DisplayObject):int{ return (super.getChildIndex(_arg1)); } public function set verticalLineScrollSize(_arg1:Number):void{ scrollPropertiesChanged = true; _verticalLineScrollSize = _arg1; invalidateDisplayList(); dispatchEvent(new Event("verticalLineScrollSizeChanged")); } mx_internal function getScrollableRect():Rectangle{ var _local1:Number; var _local2:Number; var _local3:Number; var _local4:Number; var _local5:int; var _local6:int; var _local7:EdgeMetrics; var _local8:Rectangle; var _local9:DisplayObject; _local1 = 0; _local2 = 0; _local3 = 0; _local4 = 0; _local5 = numChildren; _local6 = 0; while (_local6 < _local5) { _local9 = getChildAt(_local6); if ((((_local9 is IUIComponent)) && (!(IUIComponent(_local9).includeInLayout)))){ } else { _local1 = Math.min(_local1, _local9.x); _local2 = Math.min(_local2, _local9.y); if (!isNaN(_local9.width)){ _local3 = Math.max(_local3, (_local9.x + _local9.width)); }; if (!isNaN(_local9.height)){ _local4 = Math.max(_local4, (_local9.y + _local9.height)); }; }; _local6++; }; _local7 = viewMetrics; _local8 = new Rectangle(); _local8.left = _local1; _local8.top = _local2; _local8.right = _local3; _local8.bottom = _local4; if (usePadding){ _local8.right = (_local8.right + getStyle("paddingRight")); _local8.bottom = (_local8.bottom + getStyle("paddingBottom")); }; return (_local8); } mx_internal function get numRepeaters():int{ return ((childRepeaters) ? childRepeaters.length : 0); } public function get creationIndex():int{ return (_creationIndex); } override mx_internal function childAdded(_arg1:DisplayObject):void{ var _local2:ChildExistenceChangedEvent; dispatchEvent(new Event("childrenChanged")); _local2 = new ChildExistenceChangedEvent(ChildExistenceChangedEvent.CHILD_ADD); _local2.relatedObject = _arg1; dispatchEvent(_local2); _arg1.dispatchEvent(new FlexEvent(FlexEvent.ADD)); super.childAdded(_arg1); } public function set horizontalScrollPolicy(_arg1:String):void{ if (_horizontalScrollPolicy != _arg1){ _horizontalScrollPolicy = _arg1; invalidateDisplayList(); dispatchEvent(new Event("horizontalScrollPolicyChanged")); }; } override public function removeChildAt(_arg1:int):DisplayObject{ return (removeChild(getChildAt(_arg1))); } override mx_internal function fillOverlay(_arg1:UIComponent, _arg2:uint, _arg3:RoundedRectangle=null):void{ var _local4:EdgeMetrics; var _local5:Number; var _local6:Graphics; _local4 = viewMetrics; _local5 = 0; if (!_arg3){ _arg3 = new RoundedRectangle(_local4.left, _local4.top, ((unscaledWidth - _local4.right) - _local4.left), ((unscaledHeight - _local4.bottom) - _local4.top), _local5); }; if (((((((((isNaN(_arg3.x)) || (isNaN(_arg3.y)))) || (isNaN(_arg3.width)))) || (isNaN(_arg3.height)))) || (isNaN(_arg3.cornerRadius)))){ return; }; _local6 = _arg1.graphics; _local6.clear(); _local6.beginFill(_arg2); _local6.drawRoundRect(_arg3.x, _arg3.y, _arg3.width, _arg3.height, (_arg3.cornerRadius * 2), (_arg3.cornerRadius * 2)); _local6.endFill(); } public function createComponentsFromDescriptors(_arg1:Boolean=true):void{ var _local2:int; var _local3:int; var _local4:IFlexDisplayObject; numChildrenBefore = numChildren; createdComponents = []; _local2 = (childDescriptors) ? childDescriptors.length : 0; _local3 = 0; while (_local3 < _local2) { _local4 = createComponentFromDescriptor(childDescriptors[_local3], _arg1); createdComponents.push(_local4); _local3++; }; if ((((creationPolicy == ContainerCreationPolicy.QUEUED)) || ((creationPolicy == ContainerCreationPolicy.NONE)))){ UIComponentGlobals.layoutManager.usePhasedInstantiation = false; }; numChildrenCreated = (numChildren - numChildrenBefore); processedDescriptors = true; } override public function globalToContent(_arg1:Point):Point{ if (contentPane){ return (contentPane.globalToLocal(_arg1)); }; return (globalToLocal(_arg1)); } override mx_internal function removingChild(_arg1:DisplayObject):void{ var _local2:ChildExistenceChangedEvent; super.removingChild(_arg1); _arg1.dispatchEvent(new FlexEvent(FlexEvent.REMOVE)); _local2 = new ChildExistenceChangedEvent(ChildExistenceChangedEvent.CHILD_REMOVE); _local2.relatedObject = _arg1; dispatchEvent(_local2); } private function isBorderNeeded():Boolean{ var _local1:Object; _local1 = getStyle("borderStyle"); if (_local1){ if (((!((_local1 == "none"))) || ((((_local1 == "none")) && (getStyle("mouseShield")))))){ return (true); }; }; _local1 = getStyle("backgroundColor"); if (((!((_local1 === null))) && (!((_local1 === ""))))){ return (true); }; _local1 = getStyle("backgroundImage"); return (((!((_local1 == null))) && (!((_local1 == ""))))); } mx_internal function rawChildren_removeChildAt(_arg1:int):DisplayObject{ var _local2:DisplayObject; _local2 = super.getChildAt(_arg1); super.removingChild(_local2); $removeChildAt(_arg1); super.childRemoved(_local2); if ((((_firstChildIndex < _arg1)) && ((_arg1 < (_firstChildIndex + _numChildren))))){ _numChildren--; } else { if ((((_numChildren == 0)) || ((_arg1 < _firstChildIndex)))){ _firstChildIndex--; }; }; invalidateSize(); invalidateDisplayList(); dispatchEvent(new Event("childrenChanged")); return (_local2); } public function get verticalPageScrollSize():Number{ return (_verticalPageScrollSize); } override public function validateDisplayList():void{ var _local1:EdgeMetrics; var _local2:Number; var _local3:Number; var _local4:Object; var _local5:Number; var _local6:Number; var _local7:Number; if (((_autoLayout) || (forceLayout))){ doingLayout = true; super.validateDisplayList(); doingLayout = false; } else { layoutChrome(unscaledWidth, unscaledHeight); }; invalidateDisplayListFlag = true; if (createContentPaneAndScrollbarsIfNeeded()){ if (((_autoLayout) || (forceLayout))){ doingLayout = true; super.validateDisplayList(); doingLayout = false; }; createContentPaneAndScrollbarsIfNeeded(); }; if (contentPane){ _local1 = viewMetrics; if (overlay){ overlay.x = 0; overlay.y = 0; overlay.width = unscaledWidth; overlay.height = unscaledHeight; }; if (((horizontalScrollBar) || (verticalScrollBar))){ if (((verticalScrollBar) && ((verticalScrollPolicy == ScrollPolicy.ON)))){ _local1.right = (_local1.right - verticalScrollBar.minWidth); }; if (((horizontalScrollBar) && ((horizontalScrollPolicy == ScrollPolicy.ON)))){ _local1.bottom = (_local1.bottom - horizontalScrollBar.minHeight); }; if (horizontalScrollBar){ _local2 = ((unscaledWidth - _local1.left) - _local1.right); if (verticalScrollBar){ _local2 = (_local2 - verticalScrollBar.minWidth); }; horizontalScrollBar.setActualSize(_local2, horizontalScrollBar.minHeight); horizontalScrollBar.move(_local1.left, ((unscaledHeight - _local1.bottom) - horizontalScrollBar.minHeight)); }; if (verticalScrollBar){ _local3 = ((unscaledHeight - _local1.top) - _local1.bottom); if (horizontalScrollBar){ _local3 = (_local3 - horizontalScrollBar.minHeight); }; verticalScrollBar.setActualSize(verticalScrollBar.minWidth, _local3); verticalScrollBar.move(((unscaledWidth - _local1.right) - verticalScrollBar.minWidth), _local1.top); }; if (whiteBox){ whiteBox.x = verticalScrollBar.x; whiteBox.y = horizontalScrollBar.y; }; }; contentPane.x = _local1.left; contentPane.y = _local1.top; if (focusPane){ focusPane.x = _local1.left; focusPane.y = _local1.top; }; scrollChildren(); }; invalidateDisplayListFlag = false; if (blocker){ _local1 = viewMetrics; _local4 = (enabled) ? null : getStyle("backgroundDisabledColor"); if (!_local4){ _local4 = getStyle("backgroundColor"); }; if ((((_local4 === null)) || (isNaN(Number(_local4))))){ _local4 = 0xFFFFFF; }; _local5 = getStyle("disabledOverlayAlpha"); if (isNaN(_local5)){ _local5 = 0.6; }; blocker.x = _local1.left; blocker.y = _local1.top; _local6 = (unscaledWidth - (_local1.left + _local1.right)); _local7 = (unscaledHeight - (_local1.top + _local1.bottom)); blocker.graphics.clear(); blocker.graphics.beginFill(uint(_local4), _local5); blocker.graphics.drawRect(0, 0, _local6, _local7); blocker.graphics.endFill(); rawChildren.setChildIndex(blocker, (rawChildren.numChildren - 1)); }; } public function set horizontalLineScrollSize(_arg1:Number):void{ scrollPropertiesChanged = true; _horizontalLineScrollSize = _arg1; invalidateDisplayList(); dispatchEvent(new Event("horizontalLineScrollSizeChanged")); } override public function contentToGlobal(_arg1:Point):Point{ if (contentPane){ return (contentPane.localToGlobal(_arg1)); }; return (localToGlobal(_arg1)); } mx_internal function set forceClipping(_arg1:Boolean):void{ if (_clipContent){ if (_arg1){ _forceClippingCount++; } else { _forceClippingCount--; }; createContentPane(); scrollChildren(); }; } public function get horizontalPageScrollSize():Number{ return (_horizontalPageScrollSize); } public function set defaultButton(_arg1:IFlexDisplayObject):void{ _defaultButton = _arg1; ContainerGlobals.focusedContainer = null; } private function hasChildMatchingDescriptor(_arg1:UIComponentDescriptor):Boolean{ var _local2:String; var _local3:int; var _local4:int; var _local5:IUIComponent; _local2 = _arg1.id; if (((!((_local2 == null))) && ((document[_local2] == null)))){ return (false); }; _local3 = numChildren; _local4 = 0; while (_local4 < _local3) { _local5 = IUIComponent(getChildAt(_local4)); if ((((_local5 is IDeferredInstantiationUIComponent)) && ((IDeferredInstantiationUIComponent(_local5).descriptor == _arg1)))){ return (true); }; _local4++; }; if (childRepeaters){ _local3 = childRepeaters.length; _local4 = 0; while (_local4 < _local3) { if (IDeferredInstantiationUIComponent(childRepeaters[_local4]).descriptor == _arg1){ return (true); }; _local4++; }; }; return (false); } override protected function commitProperties():void{ var _local1:String; super.commitProperties(); if (changedStyles){ _local1 = ((changedStyles == MULTIPLE_PROPERTIES)) ? null : changedStyles; super.notifyStyleChangeInChildren(_local1, true); changedStyles = null; }; createOrDestroyBlocker(); } override public function finishPrint(_arg1:Object, _arg2:IFlexDisplayObject):void{ if (_arg1){ contentPane.scrollRect = Rectangle(_arg1); }; super.finishPrint(_arg1, _arg2); } public function get autoLayout():Boolean{ return (_autoLayout); } public function get maxHorizontalScrollPosition():Number{ return ((horizontalScrollBar) ? horizontalScrollBar.maxScrollPosition : Math.max((scrollableWidth - viewableWidth), 0)); } public function set creationPolicy(_arg1:String):void{ _creationPolicy = _arg1; setActualCreationPolicies(_arg1); } public function set verticalScrollPolicy(_arg1:String):void{ if (_verticalScrollPolicy != _arg1){ _verticalScrollPolicy = _arg1; invalidateDisplayList(); dispatchEvent(new Event("verticalScrollPolicyChanged")); }; } override public function prepareToPrint(_arg1:IFlexDisplayObject):Object{ var _local2:Rectangle; _local2 = (((contentPane) && (contentPane.scrollRect))) ? contentPane.scrollRect : null; if (_local2){ contentPane.scrollRect = null; }; super.prepareToPrint(_arg1); return (_local2); } public function set label(_arg1:String):void{ _label = _arg1; dispatchEvent(new Event("labelChanged")); } override protected function initializationComplete():void{ } override mx_internal function addingChild(_arg1:DisplayObject):void{ var _local2:IUIComponent; _local2 = IUIComponent(_arg1); super.addingChild(_arg1); invalidateSize(); invalidateDisplayList(); if (!contentPane){ if (_numChildren == 0){ _firstChildIndex = super.numChildren; }; _numChildren++; }; if (((contentPane) && (!(autoLayout)))){ forceLayout = true; UIComponentGlobals.layoutManager.addEventListener("updateComplete", layoutCompleteHandler, false, 0, true); }; } mx_internal function setActualCreationPolicies(_arg1:String):void{ var _local2:String; var _local3:int; var _local4:int; var _local5:IFlexDisplayObject; var _local6:Container; actualCreationPolicy = _arg1; _local2 = _arg1; if (_arg1 == ContainerCreationPolicy.QUEUED){ _local2 = ContainerCreationPolicy.AUTO; }; _local3 = numChildren; _local4 = 0; while (_local4 < _local3) { _local5 = IFlexDisplayObject(getChildAt(_local4)); if ((_local5 is Container)){ _local6 = Container(_local5); if (_local6.creationPolicy == null){ _local6.setActualCreationPolicies(_local2); }; }; _local4++; }; } override public function set doubleClickEnabled(_arg1:Boolean):void{ var _local2:int; var _local3:int; var _local4:InteractiveObject; super.doubleClickEnabled = _arg1; if (contentPane){ _local2 = contentPane.numChildren; _local3 = 0; while (_local3 < _local2) { _local4 = (contentPane.getChildAt(_local3) as InteractiveObject); if (_local4){ _local4.doubleClickEnabled = _arg1; }; _local3++; }; }; } override public function contains(_arg1:DisplayObject):Boolean{ if (contentPane){ return (contentPane.contains(_arg1)); }; return (super.contains(_arg1)); } public function set clipContent(_arg1:Boolean):void{ if (_clipContent != _arg1){ _clipContent = _arg1; invalidateDisplayList(); }; } override public function notifyStyleChangeInChildren(_arg1:String, _arg2:Boolean):void{ var _local3:int; var _local4:int; var _local5:ISimpleStyleClient; _local3 = super.numChildren; _local4 = 0; while (_local4 < _local3) { if (((((contentPane) || ((_local4 < _firstChildIndex)))) || ((_local4 >= (_firstChildIndex + _numChildren))))){ _local5 = (super.getChildAt(_local4) as ISimpleStyleClient); if (_local5){ _local5.styleChanged(_arg1); if ((_local5 is IStyleClient)){ IStyleClient(_local5).notifyStyleChangeInChildren(_arg1, _arg2); }; }; }; _local4++; }; if (_arg2){ changedStyles = (((!((changedStyles == null))) || ((_arg1 == null)))) ? MULTIPLE_PROPERTIES : _arg1; invalidateProperties(); }; } override public function get contentMouseX():Number{ if (contentPane){ return (contentPane.mouseX); }; return (super.contentMouseX); } override public function get contentMouseY():Number{ if (contentPane){ return (contentPane.mouseY); }; return (super.contentMouseY); } override public function validateSize(_arg1:Boolean=false):void{ var _local2:int; var _local3:int; var _local4:DisplayObject; if ((((autoLayout == false)) && ((forceLayout == false)))){ if (_arg1){ _local2 = super.numChildren; _local3 = 0; while (_local3 < _local2) { _local4 = super.getChildAt(_local3); if ((_local4 is ILayoutManagerClient)){ ILayoutManagerClient(_local4).validateSize(true); }; _local3++; }; }; adjustSizesForScaleChanges(); } else { super.validateSize(_arg1); }; } override public function getChildAt(_arg1:int):DisplayObject{ if (contentPane){ return (contentPane.getChildAt(_arg1)); }; return (super.getChildAt((_firstChildIndex + _arg1))); } protected function layoutChrome(_arg1:Number, _arg2:Number):void{ if (border){ updateBackgroundImageRect(); border.move(0, 0); border.setActualSize(_arg1, _arg2); }; } override public function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{ super.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5); if ((((((((((((((((_arg1 == MouseEvent.CLICK)) || ((_arg1 == MouseEvent.DOUBLE_CLICK)))) || ((_arg1 == MouseEvent.MOUSE_DOWN)))) || ((_arg1 == MouseEvent.MOUSE_MOVE)))) || ((_arg1 == MouseEvent.MOUSE_OVER)))) || ((_arg1 == MouseEvent.MOUSE_OUT)))) || ((_arg1 == MouseEvent.MOUSE_UP)))) || ((_arg1 == MouseEvent.MOUSE_WHEEL)))){ if ((((mouseEventReferenceCount < 2147483647)) && ((mouseEventReferenceCount++ == 0)))){ setStyle("mouseShield", true); setStyle("mouseShieldChildren", true); }; }; } override protected function attachOverlay():void{ rawChildren_addChild(overlay); } override public function localToContent(_arg1:Point):Point{ if (!contentPane){ return (_arg1); }; _arg1 = localToGlobal(_arg1); return (globalToContent(_arg1)); } public function get rawChildren():IChildList{ if (!_rawChildren){ _rawChildren = new ContainerRawChildrenList(this); }; return (_rawChildren); } public function get viewMetrics():EdgeMetrics{ var _local1:EdgeMetrics; var _local2:Boolean; var _local3:Boolean; _local1 = borderMetrics; _local2 = ((!((verticalScrollBar == null))) && (((doingLayout) || ((verticalScrollPolicy == ScrollPolicy.ON))))); _local3 = ((!((horizontalScrollBar == null))) && (((doingLayout) || ((horizontalScrollPolicy == ScrollPolicy.ON))))); if (((!(_local2)) && (!(_local3)))){ return (_local1); }; if (!_viewMetrics){ _viewMetrics = _local1.clone(); } else { _viewMetrics.left = _local1.left; _viewMetrics.right = _local1.right; _viewMetrics.top = _local1.top; _viewMetrics.bottom = _local1.bottom; }; if (_local2){ _viewMetrics.right = (_viewMetrics.right + verticalScrollBar.minWidth); }; if (_local3){ _viewMetrics.bottom = (_viewMetrics.bottom + horizontalScrollBar.minHeight); }; return (_viewMetrics); } public function set creationIndex(_arg1:int):void{ _creationIndex = _arg1; } public function executeChildBindings(_arg1:Boolean):void{ var _local2:int; var _local3:int; var _local4:IUIComponent; _local2 = numChildren; _local3 = 0; while (_local3 < _local2) { _local4 = IUIComponent(getChildAt(_local3)); if ((_local4 is IDeferredInstantiationUIComponent)){ IDeferredInstantiationUIComponent(_local4).executeBindings(_arg1); }; _local3++; }; } public function set verticalScrollBar(_arg1:ScrollBar):void{ _verticalScrollBar = _arg1; } public function get horizontalScrollBar():ScrollBar{ return (_horizontalScrollBar); } private function createOrDestroyBlocker():void{ var _local1:DisplayObject; var _local2:ISystemManager; if (enabled){ if (blocker){ rawChildren.removeChild(blocker); blocker = null; }; } else { if (!blocker){ blocker = new FlexSprite(); blocker.name = "blocker"; blocker.mouseEnabled = true; rawChildren.addChild(blocker); blocker.addEventListener(MouseEvent.CLICK, blocker_clickHandler); _local1 = (focusManager) ? DisplayObject(focusManager.getFocus()) : null; while (_local1) { if (_local1 == this){ _local2 = systemManager; if (((_local2) && (_local2.stage))){ _local2.stage.focus = null; }; break; }; _local1 = _local1.parent; }; }; }; } override public function set enabled(_arg1:Boolean):void{ super.enabled = _arg1; if (horizontalScrollBar){ horizontalScrollBar.enabled = _arg1; }; if (verticalScrollBar){ verticalScrollBar.enabled = _arg1; }; invalidateProperties(); } override public function getChildByName(_arg1:String):DisplayObject{ var _local2:DisplayObject; var _local3:int; if (contentPane){ return (contentPane.getChildByName(_arg1)); }; _local2 = super.getChildByName(_arg1); if (!_local2){ return (null); }; _local3 = (super.getChildIndex(_local2) - _firstChildIndex); if ((((_local3 < 0)) || ((_local3 >= _numChildren)))){ return (null); }; return (_local2); } override public function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{ addingChild(_arg1); if (contentPane){ contentPane.addChildAt(_arg1, _arg2); } else { $addChildAt(_arg1, (_firstChildIndex + _arg2)); }; childAdded(_arg1); return (_arg1); } override public function get baselinePosition():Number{ var _local1:IUIComponent; if ((((getStyle("verticalAlign") == "top")) && ((numChildren > 0)))){ _local1 = (getChildAt(0) as IUIComponent); if (_local1){ return ((_local1.y + _local1.baselinePosition)); }; }; return (super.baselinePosition); } private function blocker_clickHandler(_arg1:Event):void{ _arg1.stopPropagation(); } public function get maxVerticalScrollPosition():Number{ return ((verticalScrollBar) ? verticalScrollBar.maxScrollPosition : Math.max((scrollableHeight - viewableHeight), 0)); } public function set verticalPageScrollSize(_arg1:Number):void{ scrollPropertiesChanged = true; _verticalPageScrollSize = _arg1; invalidateDisplayList(); dispatchEvent(new Event("verticalPageScrollSizeChanged")); } private function creationCompleteHandler(_arg1:FlexEvent):void{ numChildrenCreated--; if (numChildrenCreated <= 0){ dispatchEvent(new FlexEvent("childrenCreationComplete")); }; } override public function contentToLocal(_arg1:Point):Point{ if (!contentPane){ return (_arg1); }; _arg1 = contentToGlobal(_arg1); return (globalToLocal(_arg1)); } override public function removeChild(_arg1:DisplayObject):DisplayObject{ removingChild(_arg1); if (contentPane){ contentPane.removeChild(_arg1); } else { $removeChild(_arg1); }; childRemoved(_arg1); return (_arg1); } private function dispatchScrollEvent(_arg1:String, _arg2:Number, _arg3:Number, _arg4:String):void{ var _local5:ScrollEvent; _local5 = new ScrollEvent(ScrollEvent.SCROLL); _local5.direction = _arg1; _local5.position = _arg3; _local5.delta = (_arg3 - _arg2); _local5.detail = _arg4; dispatchEvent(_local5); } public function get label():String{ return (_label); } mx_internal function setDocumentDescriptor(_arg1:UIComponentDescriptor):void{ if (processedDescriptors){ return; }; if (((_documentDescriptor) && (_documentDescriptor.properties.childDescriptors))){ if (_arg1.properties.childDescriptors){ throw (new Error(resourceMultipleChildSets_ClassAndSubclass)); }; } else { _documentDescriptor = _arg1; _documentDescriptor.document = this; }; } override public function setChildIndex(_arg1:DisplayObject, _arg2:int):void{ var _local3:int; var _local4:int; var _local5:int; var _local6:IndexChangedEvent; _local4 = _local3; _local5 = _arg2; if (contentPane){ contentPane.setChildIndex(_arg1, _arg2); if (((_autoLayout) || (forceLayout))){ invalidateDisplayList(); }; } else { _local3 = super.getChildIndex(_arg1); _arg2 = (_arg2 + _firstChildIndex); if (_arg2 == _local3){ return; }; super.setChildIndex(_arg1, _arg2); invalidateDisplayList(); _local4 = (_local3 - _firstChildIndex); _local5 = (_arg2 - _firstChildIndex); }; _local6 = new IndexChangedEvent(IndexChangedEvent.CHILD_INDEX_CHANGE); _local6.relatedObject = _arg1; _local6.oldIndex = _local4; _local6.newIndex = _local5; dispatchEvent(_local6); dispatchEvent(new Event("childrenChanged")); } override public function regenerateStyleCache(_arg1:Boolean):void{ var _local2:int; var _local3:int; var _local4:DisplayObject; super.regenerateStyleCache(_arg1); if (contentPane){ _local2 = contentPane.numChildren; _local3 = 0; while (_local3 < _local2) { _local4 = getChildAt(_local3); if (((_arg1) && ((_local4 is UIComponent)))){ if (UIComponent(_local4).inheritingStyles != UIComponent.STYLE_UNINITIALIZED){ UIComponent(_local4).regenerateStyleCache(_arg1); }; } else { if ((((_local4 is UITextField)) && (UITextField(_local4).inheritingStyles))){ StyleProtoChain.initTextField(UITextField(_local4)); }; }; _local3++; }; }; } override protected function createChildren():void{ var _local1:Application; super.createChildren(); createBorder(); createOrDestroyScrollbars((horizontalScrollPolicy == ScrollPolicy.ON), (verticalScrollPolicy == ScrollPolicy.ON), (((horizontalScrollPolicy == ScrollPolicy.ON)) || ((verticalScrollPolicy == ScrollPolicy.ON)))); if (creationPolicy != null){ actualCreationPolicy = creationPolicy; } else { if ((parent is Container)){ if (Container(parent).actualCreationPolicy == ContainerCreationPolicy.QUEUED){ actualCreationPolicy = ContainerCreationPolicy.AUTO; } else { actualCreationPolicy = Container(parent).actualCreationPolicy; }; }; }; if (actualCreationPolicy == ContainerCreationPolicy.NONE){ actualCreationPolicy = ContainerCreationPolicy.AUTO; } else { if (actualCreationPolicy == ContainerCreationPolicy.QUEUED){ _local1 = (parentApplication) ? Application(parentApplication) : Application(Application.application); _local1.addToCreationQueue(this, creationIndex, null, this); } else { if (recursionFlag){ createComponentsFromDescriptors(); }; }; }; if (autoLayout == false){ forceLayout = true; }; UIComponentGlobals.layoutManager.addEventListener("updateComplete", layoutCompleteHandler, false, 0, true); } mx_internal function set numChildrenCreated(_arg1:int):void{ _numChildrenCreated = _arg1; } public function get borderMetrics():EdgeMetrics{ return ((((border) && ((border is RectangularBorder)))) ? RectangularBorder(border).borderMetrics : EdgeMetrics.EMPTY); } public function get clipContent():Boolean{ return (_clipContent); } mx_internal function rawChildren_setChildIndex(_arg1:DisplayObject, _arg2:int):void{ var _local3:int; _local3 = super.getChildIndex(_arg1); super.setChildIndex(_arg1, _arg2); if ((((_local3 < _firstChildIndex)) && ((_arg2 >= _firstChildIndex)))){ _firstChildIndex--; } else { if ((((_local3 >= _firstChildIndex)) && ((_arg2 <= _firstChildIndex)))){ _firstChildIndex++; }; }; dispatchEvent(new Event("childrenChanged")); } mx_internal function rawChildren_getChildAt(_arg1:int):DisplayObject{ return (super.getChildAt(_arg1)); } public function get verticalScrollBar():ScrollBar{ return (_verticalScrollBar); } public function get viewMetricsAndPadding():EdgeMetrics{ var _local1:EdgeMetrics; var _local2:EdgeMetrics; if (((((_viewMetricsAndPadding) && (((!(horizontalScrollBar)) || ((horizontalScrollPolicy == ScrollPolicy.ON)))))) && (((!(verticalScrollBar)) || ((verticalScrollPolicy == ScrollPolicy.ON)))))){ return (_viewMetricsAndPadding); }; if (!_viewMetricsAndPadding){ _viewMetricsAndPadding = new EdgeMetrics(); }; _local1 = _viewMetricsAndPadding; _local2 = viewMetrics; _local1.left = (_local2.left + getStyle("paddingLeft")); _local1.right = (_local2.right + getStyle("paddingRight")); _local1.top = (_local2.top + getStyle("paddingTop")); _local1.bottom = (_local2.bottom + getStyle("paddingBottom")); return (_local1); } public function set horizontalPageScrollSize(_arg1:Number):void{ scrollPropertiesChanged = true; _horizontalPageScrollSize = _arg1; invalidateDisplayList(); dispatchEvent(new Event("horizontalPageScrollSizeChanged")); } private function layoutCompleteHandler(_arg1:Event):void{ var _local2:Boolean; UIComponentGlobals.layoutManager.removeEventListener("updateComplete", layoutCompleteHandler); forceLayout = false; _local2 = false; if (!isNaN(horizontalScrollPositionPending)){ if (horizontalScrollPositionPending < 0){ horizontalScrollPositionPending = 0; } else { if (horizontalScrollPositionPending > maxHorizontalScrollPosition){ horizontalScrollPositionPending = maxHorizontalScrollPosition; }; }; if (((horizontalScrollBar) && (!((horizontalScrollBar.scrollPosition == horizontalScrollPositionPending))))){ _horizontalScrollPosition = horizontalScrollPositionPending; horizontalScrollBar.scrollPosition = horizontalScrollPositionPending; _local2 = true; }; horizontalScrollPositionPending = NaN; }; if (!isNaN(verticalScrollPositionPending)){ if (verticalScrollPositionPending < 0){ verticalScrollPositionPending = 0; } else { if (verticalScrollPositionPending > maxVerticalScrollPosition){ verticalScrollPositionPending = maxVerticalScrollPosition; }; }; if (((verticalScrollBar) && (!((verticalScrollBar.scrollPosition == verticalScrollPositionPending))))){ _verticalScrollPosition = verticalScrollPositionPending; verticalScrollBar.scrollPosition = verticalScrollPositionPending; _local2 = true; }; verticalScrollPositionPending = NaN; }; if (_local2){ scrollChildren(); }; } override public function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{ super.removeEventListener(_arg1, _arg2, _arg3); if ((((((((((((((((_arg1 == MouseEvent.CLICK)) || ((_arg1 == MouseEvent.DOUBLE_CLICK)))) || ((_arg1 == MouseEvent.MOUSE_DOWN)))) || ((_arg1 == MouseEvent.MOUSE_MOVE)))) || ((_arg1 == MouseEvent.MOUSE_OVER)))) || ((_arg1 == MouseEvent.MOUSE_OUT)))) || ((_arg1 == MouseEvent.MOUSE_UP)))) || ((_arg1 == MouseEvent.MOUSE_WHEEL)))){ if ((((mouseEventReferenceCount > 0)) && ((--mouseEventReferenceCount == 0)))){ setStyle("mouseShield", false); setStyle("mouseShieldChildren", false); }; }; } public function set autoLayout(_arg1:Boolean):void{ var _local2:IInvalidating; _autoLayout = _arg1; if (_arg1){ invalidateSize(); invalidateDisplayList(); _local2 = (parent as IInvalidating); if (_local2){ _local2.invalidateSize(); _local2.invalidateDisplayList(); }; }; } mx_internal function rawChildren_getChildByName(_arg1:String):DisplayObject{ return (super.getChildByName(_arg1)); } mx_internal function get numChildrenCreated():int{ return (_numChildrenCreated); } override public function initialize():void{ var _local1:*; if (((((isDocument) && (documentDescriptor))) && (!(processedDescriptors)))){ _local1 = documentDescriptor.properties; if (((_local1) && (_local1.childDescriptors))){ if (_childDescriptors){ throw (new Error(resourceMultipleChildSets_ClassAndInstance)); }; _childDescriptors = _local1.childDescriptors; }; }; super.initialize(); } mx_internal function rawChildren_addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{ if ((((_firstChildIndex < _arg2)) && ((_arg2 < ((_firstChildIndex + $numChildren) + 1))))){ _numChildren++; } else { if (_arg2 <= _firstChildIndex){ _firstChildIndex++; }; }; super.addingChild(_arg1); $addChildAt(_arg1, _arg2); super.childAdded(_arg1); dispatchEvent(new Event("childrenChanged")); return (_arg1); } public function set data(_arg1:Object):void{ _data = _arg1; dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE)); invalidateDisplayList(); } private function createScrollbarsIfNeeded(_arg1:Rectangle):Boolean{ var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Boolean; var _local7:EdgeMetrics; var _local8:Boolean; var _local9:Boolean; var _local10:Boolean; var _local11:Boolean; _local2 = _arg1.right; _local3 = _arg1.bottom; _local4 = unscaledWidth; _local5 = unscaledHeight; _local6 = (((_arg1.left < 0)) || ((_arg1.top < 0))); _local7 = viewMetrics; if (scaleX != 1){ _local4 = (_local4 + (1 / Math.abs(scaleX))); }; if (scaleY != 1){ _local5 = (_local5 + (1 / Math.abs(scaleY))); }; _local4 = Math.floor(_local4); _local5 = Math.floor(_local5); _local2 = Math.floor(_local2); _local3 = Math.floor(_local3); if (((horizontalScrollBar) && (!((horizontalScrollPolicy == ScrollPolicy.ON))))){ _local5 = (_local5 - horizontalScrollBar.minHeight); }; if (((verticalScrollBar) && (!((verticalScrollPolicy == ScrollPolicy.ON))))){ _local4 = (_local4 - verticalScrollBar.minWidth); }; _local4 = (_local4 - (_local7.left + _local7.right)); _local5 = (_local5 - (_local7.top + _local7.bottom)); _local8 = (horizontalScrollPolicy == ScrollPolicy.ON); _local9 = (verticalScrollPolicy == ScrollPolicy.ON); _local10 = ((((((((((_local8) || (_local9))) || (_local6))) || (!((overlay == null))))) || ((_local7.left > 0)))) || ((_local7.top > 0))); if (_local4 < _local2){ _local10 = true; if ((((((horizontalScrollPolicy == ScrollPolicy.AUTO)) && ((((unscaledHeight - _local7.top) - _local7.bottom) >= 18)))) && ((((unscaledWidth - _local7.left) - _local7.right) >= 32)))){ _local8 = true; }; }; if (_local5 < _local3){ _local10 = true; if ((((((verticalScrollPolicy == ScrollPolicy.AUTO)) && ((((unscaledWidth - _local7.left) - _local7.right) >= 18)))) && ((((unscaledHeight - _local7.top) - _local7.bottom) >= 32)))){ _local9 = true; }; }; if (((((((((((((((_local8) && (_local9))) && ((horizontalScrollPolicy == ScrollPolicy.AUTO)))) && ((verticalScrollPolicy == ScrollPolicy.AUTO)))) && (horizontalScrollBar))) && (verticalScrollBar))) && (((_local4 + verticalScrollBar.minWidth) >= _local2)))) && (((_local5 + horizontalScrollBar.minHeight) >= _local3)))){ _local9 = false; _local8 = _local9; } else { if (((((((((_local8) && (!(_local9)))) && (verticalScrollBar))) && ((horizontalScrollPolicy == ScrollPolicy.AUTO)))) && (((_local4 + verticalScrollBar.minWidth) >= _local2)))){ _local8 = false; }; }; _local11 = createOrDestroyScrollbars(_local8, _local9, _local10); if (((((!((scrollableWidth == _local2))) || (!((viewableWidth == _local4))))) || (_local11))){ if (horizontalScrollBar){ horizontalScrollBar.setScrollProperties((_local4 - borderMetrics.right), 0, (_local2 - _local4), horizontalPageScrollSize); scrollPositionChanged = true; }; viewableWidth = _local4; scrollableWidth = _local2; }; if (((((!((scrollableHeight == _local3))) || (!((viewableHeight == _local5))))) || (_local11))){ if (verticalScrollBar){ verticalScrollBar.setScrollProperties((_local5 - borderMetrics.bottom), 0, (_local3 - _local5), verticalPageScrollSize); scrollPositionChanged = true; }; viewableHeight = _local5; scrollableHeight = _local3; }; return (_local11); } public function getChildren():Array{ var _local1:Array; var _local2:int; var _local3:int; _local1 = []; _local2 = numChildren; _local3 = 0; while (_local3 < _local2) { _local1.push(getChildAt(_local3)); _local3++; }; return (_local1); } public function removeAllChildren():void{ while (numChildren > 0) { removeChildAt(0); }; } override mx_internal function childRemoved(_arg1:DisplayObject):void{ super.childRemoved(_arg1); invalidateSize(); invalidateDisplayList(); if (!contentPane){ _numChildren--; if (_numChildren == 0){ _firstChildIndex = super.numChildren; }; }; if (((contentPane) && (!(autoLayout)))){ forceLayout = true; UIComponentGlobals.layoutManager.addEventListener("updateComplete", layoutCompleteHandler, false, 0, true); }; dispatchEvent(new Event("childrenChanged")); } override public function get numChildren():int{ return ((contentPane) ? contentPane.numChildren : _numChildren); } public function get data():Object{ return (_data); } override public function styleChanged(_arg1:String):void{ var _local2:Boolean; var _local3:String; var _local4:String; _local2 = (((_arg1 == null)) || ((_arg1 == "styleName"))); if (((_local2) || (StyleManager.isSizeInvalidatingStyle(_arg1)))){ invalidateDisplayList(); }; if (((_local2) || ((_arg1 == "borderSkin")))){ if (border){ rawChildren.removeChild(DisplayObject(border)); border = null; createBorder(); }; }; if (((((((((((_local2) || ((_arg1 == "borderStyle")))) || ((_arg1 == "backgroundColor")))) || ((_arg1 == "backgroundImage")))) || ((_arg1 == "mouseShield")))) || ((_arg1 == "mouseShieldChildren")))){ createBorder(); }; super.styleChanged(_arg1); if (((_local2) || (StyleManager.isSizeInvalidatingStyle(_arg1)))){ invalidateViewMetricsAndPadding(); }; if (((_local2) || ((_arg1 == "horizontalScrollBarStyleName")))){ if (((horizontalScrollBar) && ((horizontalScrollBar is ISimpleStyleClient)))){ _local3 = getStyle("horizontalScrollBarStyleName"); ISimpleStyleClient(horizontalScrollBar).styleName = _local3; }; }; if (((_local2) || ((_arg1 == "verticalScrollBarStyleName")))){ if (((verticalScrollBar) && ((verticalScrollBar is ISimpleStyleClient)))){ _local4 = getStyle("verticalScrollBarStyleName"); ISimpleStyleClient(verticalScrollBar).styleName = _local4; }; }; } private function createContentPaneAndScrollbarsIfNeeded():Boolean{ var _local1:Rectangle; var _local2:Boolean; if (_clipContent){ _local1 = getScrollableRect(); _local2 = createScrollbarsIfNeeded(_local1); if (border){ updateBackgroundImageRect(); }; return (_local2); //unresolved jump }; _local2 = createOrDestroyScrollbars(false, false, false); _local1 = getScrollableRect(); scrollableWidth = _local1.right; scrollableHeight = _local1.bottom; if (((_local2) && (border))){ updateBackgroundImageRect(); }; return (_local2); } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local3:Object; var _local4:Number; super.updateDisplayList(_arg1, _arg2); layoutChrome(_arg1, _arg2); if (scrollPositionChanged){ if (_horizontalScrollPosition < 0){ _horizontalScrollPosition = 0; } else { if (_horizontalScrollPosition > maxHorizontalScrollPosition){ _horizontalScrollPosition = maxHorizontalScrollPosition; }; }; if (((horizontalScrollBar) && (!((horizontalScrollBar.scrollPosition == _horizontalScrollPosition))))){ horizontalScrollBar.scrollPosition = _horizontalScrollPosition; }; if (_verticalScrollPosition < 0){ _verticalScrollPosition = 0; } else { if (_verticalScrollPosition > maxVerticalScrollPosition){ _verticalScrollPosition = maxVerticalScrollPosition; }; }; if (((verticalScrollBar) && (!((verticalScrollBar.scrollPosition == _verticalScrollPosition))))){ verticalScrollBar.scrollPosition = _verticalScrollPosition; }; scrollChildren(); scrollPositionChanged = false; }; if (scrollPropertiesChanged){ if (horizontalScrollBar){ horizontalScrollBar.lineScrollSize = horizontalLineScrollSize; horizontalScrollBar.pageScrollSize = horizontalPageScrollSize; }; if (verticalScrollBar){ verticalScrollBar.lineScrollSize = verticalLineScrollSize; verticalScrollBar.pageScrollSize = verticalPageScrollSize; }; scrollPropertiesChanged = false; }; if (((contentPane) && (contentPane.scrollRect))){ _local3 = (enabled) ? null : getStyle("backgroundDisabledColor"); if (!_local3){ _local3 = getStyle("backgroundColor"); }; _local4 = getStyle("backgroundAlpha"); if (((((((!(_clipContent)) || (isNaN(Number(_local3))))) || ((_local3 === "")))) || (((!(((horizontalScrollBar) || (verticalScrollBar)))) && (!(cacheAsBitmap)))))){ _local3 = null; } else { if (((getStyle("backgroundImage")) || (getStyle("background")))){ _local3 = null; } else { if (_local4 != 1){ _local3 = null; }; }; }; contentPane.opaqueBackground = _local3; contentPane.cacheAsBitmap = !((_local3 == null)); }; } mx_internal function rawChildren_addChild(_arg1:DisplayObject):DisplayObject{ if (_numChildren == 0){ _firstChildIndex++; }; super.addingChild(_arg1); $addChild(_arg1); super.childAdded(_arg1); dispatchEvent(new Event("childrenChanged")); return (_arg1); } private static function loadResources():void{ resourceScrollDirection = packageResources.getString("scrollDirection"); resourceMultipleChildSets_ClassAndInstance = packageResources.getString("multipleChildSets_ClassAndInstance"); resourceMultipleChildSets_ClassAndSubclass = packageResources.getString("multipleChildSets_ClassAndSubclass"); } mx_internal static function checkFocus(_arg1:InteractiveObject, _arg2:InteractiveObject):void{ var _local3:InteractiveObject; var _local4:InteractiveObject; var _local5:IUIComponent; var _local6:IFocusManager; var _local7:Button; _local3 = _arg2; _local4 = _arg2; _local5 = null; if (((!((_arg2 == null))) && ((_arg1 == _arg2)))){ return; }; while (_local4) { if (_local4.parent){ _local3 = _local4.parent; } else { _local3 = null; }; if ((_local4 is IUIComponent)){ _local5 = IUIComponent(_local4); }; _local4 = _local3; if (((((_local4) && ((_local4 is Container)))) && (Container(_local4).defaultButton))){ break; }; }; if (ContainerGlobals.focusedContainer != _local4){ if (!_local4){ _local4 = InteractiveObject(_local5); }; if (((_local4) && ((_local4 is Container)))){ _local6 = UIComponent(_local4).focusManager; _local7 = (Container(_local4).defaultButton as Button); if (_local7){ ContainerGlobals.focusedContainer = Container(_local4); _local6.defaultButton = _local7; } else { ContainerGlobals.focusedContainer = Container(_local4); _local6.defaultButton = null; }; }; }; } loadResources(); } }//package mx.core
Section 272
//ContainerCreationPolicy (mx.core.ContainerCreationPolicy) package mx.core { public final class ContainerCreationPolicy { public static const ALL:String = "all"; public static const QUEUED:String = "queued"; public static const NONE:String = "none"; mx_internal static const VERSION:String = "2.0.1.0"; public static const AUTO:String = "auto"; } }//package mx.core
Section 273
//ContainerGlobals (mx.core.ContainerGlobals) package mx.core { import flash.display.*; public class ContainerGlobals { public static var focusedContainer:InteractiveObject; } }//package mx.core
Section 274
//ContainerLayout (mx.core.ContainerLayout) package mx.core { public final class ContainerLayout { public static const HORIZONTAL:String = "horizontal"; public static const VERTICAL:String = "vertical"; public static const ABSOLUTE:String = "absolute"; mx_internal static const VERSION:String = "2.0.1.0"; } }//package mx.core
Section 275
//ContainerRawChildrenList (mx.core.ContainerRawChildrenList) package mx.core { import flash.display.*; import flash.geom.*; public class ContainerRawChildrenList implements IChildList { private var owner:Container; mx_internal static const VERSION:String = "2.0.1.0"; public function ContainerRawChildrenList(_arg1:Container){ this.owner = _arg1; } public function getChildAt(_arg1:int):DisplayObject{ return (owner.mx_internal::rawChildren_getChildAt(_arg1)); } public function getChildByName(_arg1:String):DisplayObject{ return (owner.mx_internal::rawChildren_getChildByName(_arg1)); } public function removeChildAt(_arg1:int):DisplayObject{ return (owner.mx_internal::rawChildren_removeChildAt(_arg1)); } public function getChildIndex(_arg1:DisplayObject):int{ return (owner.mx_internal::rawChildren_getChildIndex(_arg1)); } public function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{ return (owner.mx_internal::rawChildren_addChildAt(_arg1, _arg2)); } public function getObjectsUnderPoint(_arg1:Point):Array{ return (owner.mx_internal::rawChildren_getObjectsUnderPoint(_arg1)); } public function setChildIndex(_arg1:DisplayObject, _arg2:int):void{ var _local3 = owner; _local3.mx_internal::rawChildren_setChildIndex(_arg1, _arg2); } public function get numChildren():int{ return (owner.mx_internal::$numChildren); } public function contains(_arg1:DisplayObject):Boolean{ return (owner.mx_internal::rawChildren_contains(_arg1)); } public function removeChild(_arg1:DisplayObject):DisplayObject{ return (owner.mx_internal::rawChildren_removeChild(_arg1)); } public function addChild(_arg1:DisplayObject):DisplayObject{ return (owner.mx_internal::rawChildren_addChild(_arg1)); } } }//package mx.core
Section 276
//DragSource (mx.core.DragSource) package mx.core { public class DragSource { private var formatHandlers:Object; private var dataHolder:Object; private var _formats:Array; mx_internal static const VERSION:String = "2.0.1.0"; public function DragSource(){ dataHolder = {}; formatHandlers = {}; _formats = []; super(); } public function dataForFormat(_arg1:String):Object{ var _local2:Object; _local2 = dataHolder[_arg1]; if (_local2){ return (_local2); }; if (formatHandlers[_arg1]){ return (formatHandlers[_arg1]()); }; return (null); } public function addHandler(_arg1:Function, _arg2:String):void{ _formats.push(_arg2); formatHandlers[_arg2] = _arg1; } public function addData(_arg1:Object, _arg2:String):void{ _formats.push(_arg2); dataHolder[_arg2] = _arg1; } public function hasFormat(_arg1:String):Boolean{ var _local2:int; var _local3:int; _local2 = _formats.length; _local3 = 0; while (_local3 < _local2) { if (_formats[_local3] == _arg1){ return (true); }; _local3++; }; return (false); } public function get formats():Array{ return (_formats); } } }//package mx.core
Section 277
//EdgeMetrics (mx.core.EdgeMetrics) package mx.core { public class EdgeMetrics { public var bottom:Number; public var top:Number; public var right:Number; public var left:Number; mx_internal static const VERSION:String = "2.0.1.0"; public static var 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 278
//EventPriority (mx.core.EventPriority) package mx.core { public final class EventPriority { public static const DEFAULT:int = 0; public static const BINDING:int = 100; public static const DEFAULT_HANDLER:int = -50; public static const EFFECT:int = -100; public static const CURSOR_MANAGEMENT:int = 200; mx_internal static const VERSION:String = "2.0.1.0"; } }//package mx.core
Section 279
//FlexBitmap (mx.core.FlexBitmap) package mx.core { import flash.display.*; import mx.utils.*; public class FlexBitmap extends Bitmap { mx_internal static const VERSION:String = "2.0.1.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 280
//FlexLoader (mx.core.FlexLoader) package mx.core { import flash.display.*; import mx.utils.*; public class FlexLoader extends Loader { mx_internal static const VERSION:String = "2.0.1.0"; public function FlexLoader(){ super(); try { name = NameUtil.createUniqueName(this); } catch(e:Error) { }; } override public function toString():String{ return (NameUtil.displayObjectToString(this)); } } }//package mx.core
Section 281
//FlexShape (mx.core.FlexShape) package mx.core { import flash.display.*; import mx.utils.*; public class FlexShape extends Shape { mx_internal static const VERSION:String = "2.0.1.0"; public function FlexShape(){ super(); try { name = NameUtil.createUniqueName(this); } catch(e:Error) { }; } override public function toString():String{ return (NameUtil.displayObjectToString(this)); } } }//package mx.core
Section 282
//FlexSprite (mx.core.FlexSprite) package mx.core { import flash.display.*; import mx.utils.*; public class FlexSprite extends Sprite { mx_internal static const VERSION:String = "2.0.1.0"; public function FlexSprite(){ super(); try { name = NameUtil.createUniqueName(this); } catch(e:Error) { }; } override public function toString():String{ return (NameUtil.displayObjectToString(this)); } } }//package mx.core
Section 283
//FlexTextField (mx.core.FlexTextField) package mx.core { import flash.text.*; import mx.utils.*; public class FlexTextField extends TextField { mx_internal static const VERSION:String = "2.0.1.0"; public function FlexTextField(){ super(); try { name = NameUtil.createUniqueName(this); } catch(e:Error) { }; } override public function toString():String{ return (NameUtil.displayObjectToString(this)); } } }//package mx.core
Section 284
//FontAsset (mx.core.FontAsset) package mx.core { import flash.text.*; public class FontAsset extends Font implements IFlexAsset { mx_internal static const VERSION:String = "2.0.1.0"; } }//package mx.core
Section 285
//IChildList (mx.core.IChildList) package mx.core { import flash.display.*; import flash.geom.*; public interface IChildList { function get numChildren():int; function contains(_arg1:DisplayObject):Boolean; function getChildByName(_arg1:String):DisplayObject; function removeChildAt(_arg1:int):DisplayObject; function getChildIndex(_arg1:DisplayObject):int; function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject; function getObjectsUnderPoint(_arg1:Point):Array; function removeChild(_arg1:DisplayObject):DisplayObject; function getChildAt(_arg1:int):DisplayObject; function addChild(_arg1:DisplayObject):DisplayObject; function setChildIndex(_arg1:DisplayObject, _arg2:int):void; } }//package mx.core
Section 286
//IContainer (mx.core.IContainer) package mx.core { public interface IContainer { } }//package mx.core
Section 287
//IDataRenderer (mx.core.IDataRenderer) package mx.core { public interface IDataRenderer { function set data(_arg1:Object):void; function get data():Object; } }//package mx.core
Section 288
//IDeferredInstantiationUIComponent (mx.core.IDeferredInstantiationUIComponent) package mx.core { public interface IDeferredInstantiationUIComponent extends IUIComponent { function get descriptor():UIComponentDescriptor; function createReferenceOnParentDocument(_arg1:IFlexDisplayObject):void; function set descriptor(_arg1:UIComponentDescriptor):void; function deleteReferenceOnParentDocument(_arg1:IFlexDisplayObject):void; function executeBindings(_arg1:Boolean=false):void; function get id():String; function set cacheHeuristic(_arg1:Boolean):void; function get cachePolicy():String; function registerEffects(_arg1:Array):void; function set id(_arg1:String):void; } }//package mx.core
Section 289
//IFlexAsset (mx.core.IFlexAsset) package mx.core { public interface IFlexAsset { } }//package mx.core
Section 290
//IFlexDisplayObject (mx.core.IFlexDisplayObject) package mx.core { import flash.events.*; import flash.display.*; public interface IFlexDisplayObject extends IBitmapDrawable, IEventDispatcher { function get name():String; function set width(_arg1:Number):void; function get measuredHeight():Number; function set height(_arg1:Number):void; function get scaleY():Number; function move(_arg1:Number, _arg2:Number):void; function get scaleX():Number; function set mask(_arg1:DisplayObject):void; function set scaleX(_arg1:Number):void; function set name(_arg1:String):void; function set scaleY(_arg1:Number):void; function get visible():Boolean; function get measuredWidth():Number; function set visible(_arg1:Boolean):void; function get alpha():Number; function get height():Number; function get width():Number; function get parent():DisplayObjectContainer; function get mask():DisplayObject; function set x(_arg1:Number):void; function setActualSize(_arg1:Number, _arg2:Number):void; function set y(_arg1:Number):void; function get x():Number; function get y():Number; function set alpha(_arg1:Number):void; } }//package mx.core
Section 291
//IFlexModule (mx.core.IFlexModule) package mx.core { public interface IFlexModule { function set moduleFactory(_arg1:IFlexModuleFactory):void; function get moduleFactory():IFlexModuleFactory; } }//package mx.core
Section 292
//IFlexModuleFactory (mx.core.IFlexModuleFactory) package mx.core { public interface IFlexModuleFactory { function create(... _args):Object; function info():Object; } }//package mx.core
Section 293
//IIMESupport (mx.core.IIMESupport) package mx.core { public interface IIMESupport { function get imeMode():String; function set imeMode(_arg1:String):void; } }//package mx.core
Section 294
//IInvalidating (mx.core.IInvalidating) package mx.core { public interface IInvalidating { function validateNow():void; function invalidateDisplayList():void; function invalidateSize():void; function invalidateProperties():void; } }//package mx.core
Section 295
//IPropertyChangeNotifier (mx.core.IPropertyChangeNotifier) package mx.core { import flash.events.*; public interface IPropertyChangeNotifier extends IEventDispatcher, IUID { } }//package mx.core
Section 296
//IRawChildrenContainer (mx.core.IRawChildrenContainer) package mx.core { public interface IRawChildrenContainer { function get rawChildren():IChildList; } }//package mx.core
Section 297
//IRepeater (mx.core.IRepeater) package mx.core { public interface IRepeater { function get container():Container; function set recycleChildren(_arg1:Boolean):void; function get startingIndex():int; function set startingIndex(_arg1:int):void; function get currentItem():Object; function get count():int; function get recycleChildren():Boolean; function executeChildBindings():void; function set dataProvider(_arg1:Object):void; function initializeRepeater(_arg1:Container, _arg2:Boolean):void; function get currentIndex():int; function get dataProvider():Object; function set count(_arg1:int):void; } }//package mx.core
Section 298
//IRepeaterClient (mx.core.IRepeaterClient) package mx.core { public interface IRepeaterClient { function set instanceIndices(_arg1:Array):void; function get isDocument():Boolean; function get repeaters():Array; function get instanceIndices():Array; function set repeaters(_arg1:Array):void; function initializeRepeaterArrays(_arg1:IRepeaterClient):void; function set repeaterIndices(_arg1:Array):void; function get repeaterIndices():Array; } }//package mx.core
Section 299
//IToolTip (mx.core.IToolTip) package mx.core { import flash.geom.*; public interface IToolTip extends IUIComponent { function get screen():Rectangle; function get text():String; function set text(_arg1:String):void; } }//package mx.core
Section 300
//IUIComponent (mx.core.IUIComponent) package mx.core { import flash.display.*; import flash.geom.*; import mx.managers.*; public interface IUIComponent extends IFlexDisplayObject { function set enabled(_arg1:Boolean):void; function set measuredMinWidth(_arg1:Number):void; function set isPopUp(_arg1:Boolean):void; function get percentWidth():Number; function set percentWidth(_arg1:Number):void; function get baselinePosition():Number; function initialize():void; function getExplicitOrMeasuredWidth():Number; function set percentHeight(_arg1:Number):void; function get minHeight():Number; function getExplicitOrMeasuredHeight():Number; function get document():Object; function get explicitMaxWidth():Number; function set scrollRect(_arg1:Rectangle):void; function get cacheAsBitmap():Boolean; function get maxHeight():Number; function get minWidth():Number; function owns(_arg1:DisplayObject):Boolean; function get opaqueBackground():Object; function setVisible(_arg1:Boolean, _arg2:Boolean=false):void; function get owner():DisplayObjectContainer; function set document(_arg1:Object):void; function get tweeningProperties():Array; function get enabled():Boolean; function get isPopUp():Boolean; function get explicitMinHeight():Number; function set focusPane(_arg1:Sprite):void; function get maxWidth():Number; function get percentHeight():Number; function set tweeningProperties(_arg1:Array):void; function get explicitMaxHeight():Number; function get focusPane():Sprite; function parentChanged(_arg1:DisplayObjectContainer):void; function set opaqueBackground(_arg1:Object):void; function set measuredMinHeight(_arg1:Number):void; function set cacheAsBitmap(_arg1:Boolean):void; function get scrollRect():Rectangle; function set explicitWidth(_arg1:Number):void; function set owner(_arg1:DisplayObjectContainer):void; function set includeInLayout(_arg1:Boolean):void; function get explicitMinWidth():Number; function get explicitWidth():Number; function get measuredMinHeight():Number; function set explicitHeight(_arg1:Number):void; function get includeInLayout():Boolean; function get measuredMinWidth():Number; function get explicitHeight():Number; function set systemManager(_arg1:ISystemManager):void; function get systemManager():ISystemManager; } }//package mx.core
Section 301
//IUID (mx.core.IUID) package mx.core { public interface IUID { function get uid():String; function set uid(_arg1:String):void; } }//package mx.core
Section 302
//LayoutContainer (mx.core.LayoutContainer) package mx.core { import mx.resources.*; import flash.system.*; import flash.events.*; import mx.containers.utilityClasses.*; import mx.containers.*; public class LayoutContainer extends Container { private var _layout:String;// = "vertical" private var processingCreationQueue:Boolean;// = false private var creationQueue:Array; protected var boxLayoutClass:Class; private var preloadObj:Object; private var resizeHandlerAdded:Boolean;// = false protected var layoutObject:Layout; protected var canvasLayoutClass:Class; mx_internal static const VERSION:String = "2.0.1.0"; private static var viewSourceMenuItem:String; mx_internal static var useProgressiveLayout:Boolean = false; private static var packageResources:ResourceBundle = ResourceBundle.getResourceBundle("core", ApplicationDomain.currentDomain); public function LayoutContainer(){ layoutObject = new BoxLayout(); canvasLayoutClass = CanvasLayout; boxLayoutClass = BoxLayout; resizeHandlerAdded = false; creationQueue = []; processingCreationQueue = false; _layout = ContainerLayout.VERTICAL; super(); layoutObject.target = this; } override mx_internal function get usePadding():Boolean{ return (!((layout == ContainerLayout.ABSOLUTE))); } override protected function measure():void{ super.measure(); layoutObject.measure(); } override protected function layoutChrome(_arg1:Number, _arg2:Number):void{ super.layoutChrome(_arg1, _arg2); if (!doingLayout){ createBorder(); }; } public function set layout(_arg1:String):void{ if (_layout != _arg1){ _layout = _arg1; if (layoutObject){ layoutObject.target = null; }; if (_layout == ContainerLayout.ABSOLUTE){ layoutObject = new canvasLayoutClass(); } else { layoutObject = new boxLayoutClass(); if (_layout == ContainerLayout.VERTICAL){ BoxLayout(layoutObject).direction = BoxDirection.VERTICAL; } else { BoxLayout(layoutObject).direction = BoxDirection.HORIZONTAL; }; }; if (layoutObject){ layoutObject.target = this; }; invalidateSize(); invalidateDisplayList(); dispatchEvent(new Event("layoutChanged")); }; } public function get layout():String{ return (_layout); } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ super.updateDisplayList(_arg1, _arg2); layoutObject.updateDisplayList(_arg1, _arg2); createBorder(); } private static function loadResources():void{ viewSourceMenuItem = packageResources.getString("viewSource"); } loadResources(); } }//package mx.core
Section 303
//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 304
//ScrollPolicy (mx.core.ScrollPolicy) package mx.core { public final class ScrollPolicy { public static const AUTO:String = "auto"; public static const ON:String = "on"; mx_internal static const VERSION:String = "2.0.1.0"; public static const OFF:String = "off"; } }//package mx.core
Section 305
//Singleton (mx.core.Singleton) package mx.core { public class Singleton { private static var classMap:Object = {}; public static function getClass(_arg1:String):Class{ return (classMap[_arg1]); } public static function getInstance(_arg1:String):Object{ var _local2:Class; _local2 = classMap[_arg1]; return (Object(_local2).getInstance()); } public static function registerClass(_arg1:String, _arg2:Class):void{ var _local3:Class; _local3 = classMap[_arg1]; if (!_local3){ classMap[_arg1] = _arg2; }; } } }//package mx.core
Section 306
//SoundAsset (mx.core.SoundAsset) package mx.core { import flash.media.*; public class SoundAsset extends Sound implements IFlexAsset { mx_internal static const VERSION:String = "2.0.1.0"; } }//package mx.core
Section 307
//UIComponent (mx.core.UIComponent) package mx.core { import mx.resources.*; import flash.system.*; import flash.display.*; import flash.events.*; import mx.styles.*; import flash.geom.*; import mx.modules.*; import mx.events.*; import mx.managers.*; import mx.automation.*; import flash.text.*; import mx.states.*; import mx.effects.*; import mx.graphics.*; import mx.binding.*; import flash.utils.*; import mx.skins.*; import mx.utils.*; import mx.validators.*; public class UIComponent extends FlexSprite implements IAutomationObject, IChildList, IDeferredInstantiationUIComponent, IFlexDisplayObject, IFlexModule, IInvalidating, ILayoutManagerClient, IPropertyChangeNotifier, IRepeaterClient, ISimpleStyleClient, IStyleClient, IToolTipManagerClient, IUIComponent, IValidatorListener { private var errorStringChanged:Boolean;// = false mx_internal var overlay:UIComponent; mx_internal var automaticRadioButtonGroups:Object; private var _currentState:String; private var _isPopUp:Boolean; private var _repeaters:Array; private var packageResources:ResourceBundle; private var _systemManager:ISystemManager; private var _measuredWidth:Number;// = 0 private var methodQueue:Array; mx_internal var _width:Number; private var _tweeningProperties:Array; private var _validationSubField:String; private var _endingEffectInstances:Array; mx_internal var saveBorderColor:Boolean;// = true mx_internal var overlayColor:uint; private var _repeaterIndices:Array; private var oldExplicitWidth:Number; mx_internal var _descriptor:UIComponentDescriptor; private var _initialized:Boolean;// = false private var requestedCurrentState:String; private var _focusEnabled:Boolean;// = true private var cacheAsBitmapCount:int;// = 0 mx_internal var overlayReferenceCount:int;// = 0 private var listeningForRender:Boolean;// = false mx_internal var invalidateDisplayListFlag:Boolean;// = false private var oldScaleX:Number;// = 1 private var oldScaleY:Number;// = 1 mx_internal var _explicitMaxHeight:Number; mx_internal var invalidatePropertiesFlag:Boolean;// = false private var hasFocusRect:Boolean;// = false private var _scaleX:Number;// = 1 private var _scaleY:Number;// = 1 mx_internal var invalidateSizeFlag:Boolean;// = false private var _styleDeclaration:CSSStyleDeclaration; mx_internal var _documentDescriptor:UIComponentDescriptor; mx_internal var _affectedProperties:Object; private var _processedDescriptors:Boolean;// = false mx_internal var origBorderColor:Number; private var _focusManager:IFocusManager; private var _cachePolicy:String;// = "auto" private var _measuredHeight:Number;// = 0 private var _id:String; private var _owner:DisplayObjectContainer; public var transitions:Array; mx_internal var _parent:DisplayObjectContainer; private var _measuredMinWidth:Number;// = 0 private var oldMinWidth:Number; private var _enabled:Boolean;// = false public var states:Array; private var _explicitWidth:Number; private var _mouseFocusEnabled:Boolean;// = true private var oldHeight:Number;// = 0 private var _currentStateChanged:Boolean; private var cachedTextFormat:UITextFormat; private var _automationDelegate:IAutomationObject; mx_internal var _height:Number; private var _percentWidth:Number; private var _automationName:String;// = null private var _isEffectStarted:Boolean;// = false private var _styleName:Object; mx_internal var _document:Object; private var _errorString:String;// = "" private var oldExplicitHeight:Number; private var _nestLevel:int;// = 0 private var _explicitHeight:Number; private var _filters:Array; private var _toolTip:String; private var _focusPane:Sprite; private var playStateTransition:Boolean;// = true private var _nonInheritingStyles:Object; private var _showInAutomationHierarchy:Boolean;// = true private var _moduleFactory:IFlexModuleFactory; private var oldX:Number;// = 0 private var oldY:Number;// = 0 private var _instanceIndices:Array; private var _visible:Boolean;// = true private var _inheritingStyles:Object; private var _includeInLayout:Boolean;// = true mx_internal var _effectsStarted:Array; private var _explicitMinWidth:Number; private var resourceStateUndefined:String;// = null mx_internal var _explicitMaxWidth:Number; private var _measuredMinHeight:Number;// = 0 private var _uid:String; private var _currentTransitionEffect:Effect; private var _updateCompletePendingFlag:Boolean;// = false private var oldMinHeight:Number; mx_internal var _explicitMinHeight:Number; private var _percentHeight:Number; private var oldWidth:Number;// = 0 public static const DEFAULT_MEASURED_WIDTH:Number = 160; public static const DEFAULT_MAX_WIDTH:Number = 10000; public static const DEFAULT_MEASURED_MIN_HEIGHT:Number = 22; public static const DEFAULT_MAX_HEIGHT:Number = 10000; public static const DEFAULT_MEASURED_HEIGHT:Number = 22; mx_internal static const VERSION:String = "2.0.1.0"; public static const DEFAULT_MEASURED_MIN_WIDTH:Number = 40; mx_internal static var dispatchEventHook:Function; private static var fakeMouseY:QName = new QName(mx_internal, "_mouseY"); mx_internal static var createAccessibilityImplementation:Function; mx_internal static var STYLE_UNINITIALIZED:Object = {}; private static var fakeMouseX:QName = new QName(mx_internal, "_mouseX"); public function UIComponent(){ packageResources = ResourceBundle.getResourceBundle("core", ApplicationDomain.currentDomain); resourceStateUndefined = null; listeningForRender = false; methodQueue = []; hasFocusRect = false; _initialized = false; _processedDescriptors = false; _updateCompletePendingFlag = false; invalidatePropertiesFlag = false; invalidateSizeFlag = false; invalidateDisplayListFlag = false; oldX = 0; oldY = 0; oldWidth = 0; oldHeight = 0; oldScaleX = 1; oldScaleY = 1; overlayReferenceCount = 0; saveBorderColor = true; _scaleX = 1; _scaleY = 1; _visible = true; _enabled = false; _nestLevel = 0; _inheritingStyles = UIComponent.STYLE_UNINITIALIZED; _nonInheritingStyles = UIComponent.STYLE_UNINITIALIZED; _cachePolicy = UIComponentCachePolicy.AUTO; cacheAsBitmapCount = 0; _focusEnabled = true; _mouseFocusEnabled = true; _measuredMinWidth = 0; _measuredMinHeight = 0; _measuredWidth = 0; _measuredHeight = 0; _includeInLayout = true; playStateTransition = true; states = []; transitions = []; _automationName = null; _showInAutomationHierarchy = true; _errorString = ""; errorStringChanged = false; _effectsStarted = []; _affectedProperties = {}; _isEffectStarted = false; _endingEffectInstances = []; super(); focusRect = false; tabEnabled = (this is IFocusManagerComponent); tabChildren = false; enabled = true; $visible = false; addEventListener(Event.ADDED, addedHandler); addEventListener(Event.REMOVED, removedHandler); if ((this is IFocusManagerComponent)){ addEventListener(FocusEvent.FOCUS_IN, focusInHandler); addEventListener(FocusEvent.FOCUS_OUT, focusOutHandler); addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler); addEventListener(KeyboardEvent.KEY_UP, keyUpHandler); }; _width = super.width; _height = super.height; } public function getStyle(_arg1:String){ return ((StyleManager.inheritingStyles[_arg1]) ? _inheritingStyles[_arg1] : _nonInheritingStyles[_arg1]); } public function get toolTip():String{ return (_toolTip); } private function transition_effectEndHandler(_arg1:EffectEvent):void{ _currentTransitionEffect = null; } public function get nestLevel():int{ return (_nestLevel); } protected function adjustFocusRect(_arg1:DisplayObject=null):void{ var _local2:IFocusManager; var _local3:IFlexDisplayObject; var _local4:Number; var _local5:Number; var _local6:Point; var _local7:Number; if (!_arg1){ _arg1 = this; }; if (((isNaN(_arg1.width)) || (isNaN(_arg1.height)))){ return; }; _local2 = focusManager; if (!_local2){ return; }; _local3 = IFlexDisplayObject(getFocusObject()); if (_local3){ if (((errorString) && (!((errorString == ""))))){ _local4 = getStyle("errorColor"); } else { _local4 = getStyle("themeColor"); }; _local5 = getStyle("focusThickness"); if ((_local3 is IStyleClient)){ IStyleClient(_local3).setStyle("focusColor", _local4); }; _local3.setActualSize((_arg1.width + (2 * _local5)), (_arg1.height + (2 * _local5))); if (rotation){ _local7 = ((rotation * Math.PI) / 180); _local6 = new Point((_arg1.x - (_local5 * (Math.cos(_local7) - Math.sin(_local7)))), (_arg1.y - (_local5 * (Math.cos(_local7) + Math.sin(_local7))))); DisplayObject(_local3).rotation = rotation; } else { _local6 = new Point((_arg1.x - _local5), (_arg1.y - _local5)); }; if (_arg1.parent == this){ _local6.x = (_local6.x + x); _local6.y = (_local6.y + y); }; _local6 = parent.localToGlobal(_local6); _local6 = parent.globalToLocal(_local6); _local3.move(_local6.x, _local6.y); if ((_local3 is IInvalidating)){ IInvalidating(_local3).validateNow(); } else { if ((_local3 is ProgrammaticSkin)){ ProgrammaticSkin(_local3).validateNow(); }; }; }; } public function set nestLevel(_arg1:int):void{ var _local2:IChildList; var _local3:int; var _local4:int; var _local5:ILayoutManagerClient; var _local6:UITextField; if ((((_arg1 > 1)) && (!((_nestLevel == _arg1))))){ _nestLevel = _arg1; updateCallbacks(); _local2 = ((this is IRawChildrenContainer)) ? IRawChildrenContainer(this).rawChildren : IChildList(this); _local3 = _local2.numChildren; _local4 = 0; while (_local4 < _local3) { _local5 = (_local2.getChildAt(_local4) as ILayoutManagerClient); if (_local5){ _local5.nestLevel = (_arg1 + 1); } else { _local6 = (_local2.getChildAt(_local4) as UITextField); if (_local6){ _local6.nestLevel = (_arg1 + 1); }; }; _local4++; }; }; } public function getExplicitOrMeasuredHeight():Number{ return ((isNaN(explicitHeight)) ? measuredHeight : explicitHeight); } private function callLaterDispatcher(_arg1:Event):void{ var layoutErrorEvent:DynamicEvent; var event = _arg1; UIComponentGlobals.callLaterDispatcherCount++; if (!UIComponentGlobals.designTime){ callLaterDispatcher2(event); } else { try { callLaterDispatcher2(event); } catch(e:Error) { layoutErrorEvent = new DynamicEvent("layoutError"); layoutErrorEvent.error = e; systemManager.dispatchEvent(layoutErrorEvent); }; }; UIComponentGlobals.callLaterDispatcherCount--; } final mx_internal function get $width():Number{ return (super.width); } public function get className():String{ var _local1:String; var _local2:int; _local1 = getQualifiedClassName(this); _local2 = _local1.indexOf("::"); if (_local2 != -1){ _local1 = _local1.substr((_local2 + 2)); }; return (_local1); } public function verticalGradientMatrix(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Matrix{ UIComponentGlobals.tempMatrix.createGradientBox(_arg3, _arg4, (Math.PI / 2), _arg1, _arg2); return (UIComponentGlobals.tempMatrix); } public function setCurrentState(_arg1:String, _arg2:Boolean=true):void{ if (((!((_arg1 == currentState))) && (!(((isBaseState(_arg1)) && (isBaseState(currentState))))))){ requestedCurrentState = _arg1; playStateTransition = _arg2; if (initialized){ commitCurrentState(); } else { _currentStateChanged = true; addEventListener(FlexEvent.CREATION_COMPLETE, creationCompleteHandler); }; }; } private function getBaseStates(_arg1:State):Array{ var _local2:Array; _local2 = []; while (((_arg1) && (!((_arg1.basedOn == ""))))) { _local2.push(_arg1.basedOn); _arg1 = getState(_arg1.basedOn); }; return (_local2); } public function set minHeight(_arg1:Number):void{ if (explicitMinHeight == _arg1){ return; }; explicitMinHeight = _arg1; } public function get errorString():String{ return (_errorString); } protected function isOurFocus(_arg1:DisplayObject):Boolean{ return ((_arg1 == this)); } public function get automationName():String{ if (_automationName){ return (_automationName); }; if (automationDelegate){ return (automationDelegate.automationName); }; return (""); } final mx_internal function set $width(_arg1:Number):void{ super.width = _arg1; } public function invalidateDisplayList():void{ if (!invalidateDisplayListFlag){ invalidateDisplayListFlag = true; if (((parent) && (UIComponentGlobals.layoutManager))){ UIComponentGlobals.layoutManager.invalidateDisplayList(this); }; }; } override public function get scaleX():Number{ return (_scaleX); } override public function get scaleY():Number{ return (_scaleY); } mx_internal function initThemeColor():Boolean{ var _local1:Object; var _local2:Object; var _local3:Number; var _local4:Number; var _local5:Object; var _local6:Array; var _local7:int; var _local8:CSSStyleDeclaration; _local1 = _styleName; if (_styleDeclaration){ _local2 = _styleDeclaration.getStyle("themeColor"); _local3 = _styleDeclaration.getStyle("rollOverColor"); _local4 = _styleDeclaration.getStyle("selectionColor"); }; if (((((!(_local2)) && (_local1))) && (!((_local1 is ISimpleStyleClient))))){ _local5 = ((_local1 is String)) ? StyleManager.getStyleDeclaration(("." + _local1)) : _local1; if (_local5){ _local2 = _local5.getStyle("themeColor"); _local3 = _local5.getStyle("rollOverColor"); _local4 = _local5.getStyle("selectionColor"); }; }; if (!_local2){ _local6 = getClassStyleDeclarations(); _local7 = 0; while (_local7 < _local6.length) { _local8 = _local6[_local7]; if (_local8){ _local2 = _local8.getStyle("themeColor"); _local3 = _local8.getStyle("rollOverColor"); _local4 = _local8.getStyle("selectionColor"); }; if (_local2){ break; }; _local7++; }; }; if (((((_local2) && (isNaN(_local3)))) && (isNaN(_local4)))){ setThemeColor(_local2); return (true); }; return (((((_local2) && (!(isNaN(_local3))))) && (!(isNaN(_local4))))); } override public function get mouseX():Number{ if (((!(root)) || ((root[fakeMouseX] === undefined)))){ return (super.mouseX); }; return (globalToLocal(new Point(root[fakeMouseX], 0)).x); } override public function get mouseY():Number{ if (((!(root)) || ((root[fakeMouseY] === undefined)))){ return (super.mouseY); }; return (globalToLocal(new Point(0, root[fakeMouseY])).y); } override public function stopDrag():void{ super.stopDrag(); invalidateProperties(); dispatchEvent(new Event("xChanged")); dispatchEvent(new Event("yChanged")); } public function get uid():String{ if (!_uid){ _uid = toString(); }; return (_uid); } public function set tweeningProperties(_arg1:Array):void{ _tweeningProperties = _arg1; } public function get focusPane():Sprite{ return (_focusPane); } public function horizontalGradientMatrix(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Matrix{ UIComponentGlobals.tempMatrix.createGradientBox(_arg3, _arg4, 0, _arg1, _arg2); return (UIComponentGlobals.tempMatrix); } public function set validationSubField(_arg1:String):void{ _validationSubField = _arg1; } protected function keyDownHandler(_arg1:KeyboardEvent):void{ } public function get isDocument():Boolean{ return ((document == this)); } mx_internal function addOverlay(_arg1:uint, _arg2:RoundedRectangle=null):void{ if (!overlay){ overlayColor = _arg1; overlay = new UIComponent(); overlay.name = "overlay"; fillOverlay(overlay, _arg1, _arg2); attachOverlay(); if (!_arg2){ addEventListener(ResizeEvent.RESIZE, overlay_resizeHandler); }; overlay.x = 0; overlay.y = 0; invalidateDisplayList(); overlayReferenceCount = 1; } else { overlayReferenceCount++; }; dispatchEvent(new ChildExistenceChangedEvent(ChildExistenceChangedEvent.OVERLAY_CREATED, true, false, overlay)); } override public function get visible():Boolean{ return (_visible); } public function get screen():Rectangle{ var _local1:ISystemManager; _local1 = systemManager; return ((_local1) ? _local1.screen : null); } override public function get x():Number{ return (super.x); } override public function get y():Number{ return (super.y); } public function get explicitHeight():Number{ return (_explicitHeight); } protected function focusInHandler(_arg1:FocusEvent):void{ var _local2:IFocusManager; if (isOurFocus(DisplayObject(_arg1.target))){ _local2 = focusManager; if (((_local2) && (_local2.showFocusIndicator))){ drawFocus(true); }; Container.checkFocus(_arg1.relatedObject, this); }; } private function focusObj_scrollHandler(_arg1:Event):void{ adjustFocusRect(); } public function get percentWidth():Number{ return (_percentWidth); } public function set automationName(_arg1:String):void{ _automationName = _arg1; } public function get mouseFocusEnabled():Boolean{ return (_mouseFocusEnabled); } public function set explicitMinHeight(_arg1:Number):void{ var _local2:IInvalidating; if (_explicitMinHeight == _arg1){ return; }; _explicitMinHeight = _arg1; invalidateSize(); _local2 = (parent as IInvalidating); if (_local2){ _local2.invalidateSize(); _local2.invalidateDisplayList(); }; dispatchEvent(new Event("explicitMinHeightChanged")); } public function stylesInitialized():void{ } public function set errorString(_arg1:String):void{ ToolTipManager.registerErrorString(this, _arg1); _errorString = _arg1; errorStringChanged = true; invalidateProperties(); dispatchEvent(new Event("errorStringChanged")); } public function getExplicitOrMeasuredWidth():Number{ return ((isNaN(explicitWidth)) ? measuredWidth : explicitWidth); } final mx_internal function set $height(_arg1:Number):void{ super.height = _arg1; } final mx_internal function $removeChild(_arg1:DisplayObject):DisplayObject{ return (super.removeChild(_arg1)); } override public function set scaleX(_arg1:Number):void{ if (_scaleX == _arg1){ return; }; _scaleX = _arg1; invalidateProperties(); invalidateSize(); dispatchEvent(new Event("scaleXChanged")); } override public function set scaleY(_arg1:Number):void{ if (_scaleY == _arg1){ return; }; _scaleY = _arg1; invalidateProperties(); invalidateSize(); dispatchEvent(new Event("scaleYChanged")); } protected function keyUpHandler(_arg1:KeyboardEvent):void{ } override public function get parent():DisplayObjectContainer{ return ((_parent) ? _parent : super.parent); } mx_internal function get isEffectStarted():Boolean{ return (_isEffectStarted); } public function set uid(_arg1:String):void{ this._uid = _arg1; } mx_internal function adjustSizesForScaleChanges():void{ var _local1:Number; var _local2:Number; var _local3:Number; _local1 = scaleX; _local2 = scaleY; if (_local1 != oldScaleX){ _local3 = Math.abs((_local1 / oldScaleX)); if (explicitMinWidth){ explicitMinWidth = (explicitMinWidth * _local3); }; if (!isNaN(explicitWidth)){ explicitWidth = (explicitWidth * _local3); }; if (explicitMaxWidth){ explicitMaxWidth = (explicitMaxWidth * _local3); }; oldScaleX = _local1; }; if (_local2 != oldScaleY){ _local3 = Math.abs((_local2 / oldScaleY)); if (explicitMinHeight){ explicitMinHeight = (explicitMinHeight * _local3); }; if (explicitHeight){ explicitHeight = (explicitHeight * _local3); }; if (explicitMaxHeight){ explicitMaxHeight = (explicitMaxHeight * _local3); }; oldScaleY = _local2; }; } public function set focusPane(_arg1:Sprite):void{ if (_arg1){ addChild(_arg1); _arg1.x = 0; _arg1.y = 0; _arg1.scrollRect = null; _focusPane = _arg1; } else { removeChild(_focusPane); _focusPane = null; }; } public function determineTextFormatFromStyles():UITextFormat{ var _local1:UITextFormat; _local1 = cachedTextFormat; if (!_local1){ _local1 = new UITextFormat(systemManager); _local1.align = _inheritingStyles.textAlign; _local1.bold = (_inheritingStyles.fontWeight == "bold"); _local1.color = (enabled) ? _inheritingStyles.color : _inheritingStyles.disabledColor; _local1.font = StringUtil.trimArrayElements(_inheritingStyles.fontFamily, ","); _local1.indent = _inheritingStyles.textIndent; _local1.italic = (_inheritingStyles.fontStyle == "italic"); _local1.kerning = _inheritingStyles.kerning; _local1.leading = _nonInheritingStyles.leading; _local1.leftMargin = _nonInheritingStyles.paddingLeft; _local1.letterSpacing = _inheritingStyles.letterSpacing; _local1.rightMargin = _nonInheritingStyles.paddingRight; _local1.size = _inheritingStyles.fontSize; _local1.underline = (_nonInheritingStyles.textDecoration == "underline"); _local1.antiAliasType = _inheritingStyles.fontAntiAliasType; _local1.gridFitType = _inheritingStyles.fontGridFitType; _local1.sharpness = _inheritingStyles.fontSharpness; _local1.thickness = _inheritingStyles.fontThickness; cachedTextFormat = _local1; }; return (_local1); } public function getAutomationChildAt(_arg1:int):IAutomationObject{ if (automationDelegate){ return (automationDelegate.getAutomationChildAt(_arg1)); }; return (null); } private function focusObj_resizeHandler(_arg1:ResizeEvent):void{ adjustFocusRect(); } public function validationResultHandler(_arg1:ValidationResultEvent):void{ var _local2:String; var _local3:ValidationResult; var _local4:int; if (_arg1.type == ValidationResultEvent.VALID){ if (errorString != ""){ errorString = ""; dispatchEvent(new FlexEvent(FlexEvent.VALID)); }; } else { if (((((!((validationSubField == null))) && (!((validationSubField == ""))))) && (_arg1.results))){ _local4 = 0; while (_local4 < _arg1.results.length) { _local3 = _arg1.results[_local4]; if (_local3.subField == validationSubField){ if (_local3.isError){ _local2 = _local3.errorMessage; } else { if (errorString != ""){ errorString = ""; dispatchEvent(new FlexEvent(FlexEvent.VALID)); }; }; break; }; _local4++; }; } else { if (((_arg1.results) && ((_arg1.results.length > 0)))){ _local2 = _arg1.results[0].errorMessage; }; }; if (((_local2) && (!((errorString == _local2))))){ errorString = _local2; dispatchEvent(new FlexEvent(FlexEvent.INVALID)); }; }; } public function invalidateProperties():void{ if (!invalidatePropertiesFlag){ invalidatePropertiesFlag = true; if (((parent) && (UIComponentGlobals.layoutManager))){ UIComponentGlobals.layoutManager.invalidateProperties(this); }; }; } public function get inheritingStyles():Object{ return (_inheritingStyles); } public function setActualSize(_arg1:Number, _arg2:Number):void{ var _local3:Boolean; _local3 = false; if (_width != _arg1){ _width = _arg1; dispatchEvent(new Event("widthChanged")); _local3 = true; }; if (_height != _arg2){ _height = _arg2; dispatchEvent(new Event("heightChanged")); _local3 = true; }; if (_local3){ invalidateDisplayList(); dispatchResizeEvent(); }; } final mx_internal function get $x():Number{ return (super.x); } final mx_internal function get $y():Number{ return (super.y); } override public function set visible(_arg1:Boolean):void{ setVisible(_arg1); } public function registerEffects(_arg1:Array):void{ var _local2:int; var _local3:int; var _local4:String; _local2 = _arg1.length; _local3 = 0; while (_local3 < _local2) { _local4 = EffectManager.getEventForEffectTrigger(_arg1[_local3]); if (((!((_local4 == null))) && (!((_local4 == ""))))){ addEventListener(_local4, EffectManager.eventHandler, false, EventPriority.EFFECT); }; _local3++; }; } public function createAutomationIDPart(_arg1:IAutomationObject):Object{ if (automationDelegate){ return (automationDelegate.createAutomationIDPart(_arg1)); }; return (null); } public function get explicitMinWidth():Number{ return (_explicitMinWidth); } private function filterChangeHandler(_arg1:Event):void{ super.filters = _filters; } override public function set x(_arg1:Number):void{ if (super.x == _arg1){ return; }; super.x = _arg1; invalidateProperties(); dispatchEvent(new Event("xChanged")); } override public function set y(_arg1:Number):void{ if (super.y == _arg1){ return; }; super.y = _arg1; invalidateProperties(); dispatchEvent(new Event("yChanged")); } public function set explicitHeight(_arg1:Number):void{ var _local2:IInvalidating; if (_explicitHeight == _arg1){ return; }; if (!isNaN(_arg1)){ _percentHeight = NaN; }; _explicitHeight = _arg1; invalidateSize(); _local2 = (parent as IInvalidating); if (((_local2) && (includeInLayout))){ _local2.invalidateSize(); _local2.invalidateDisplayList(); }; dispatchEvent(new Event("explicitHeightChanged")); } public function set showInAutomationHierarchy(_arg1:Boolean):void{ _showInAutomationHierarchy = _arg1; } public function set systemManager(_arg1:ISystemManager):void{ _systemManager = _arg1; } mx_internal function getFocusObject():DisplayObject{ var _local1:IFocusManager; _local1 = focusManager; if (((!(_local1)) || (!(_local1.focusPane)))){ return (null); }; return (((_local1.focusPane.numChildren == 0)) ? null : _local1.focusPane.getChildAt(0)); } override public function addChild(_arg1:DisplayObject):DisplayObject{ var _local2:int; _local2 = (((overlayReferenceCount) && (!((_arg1 == overlay))))) ? Math.max(0, (super.numChildren - 1)) : super.numChildren; addingChild(_arg1); $addChildAt(_arg1, _local2); childAdded(_arg1); return (_arg1); } public function get moduleFactory():IFlexModuleFactory{ return (_moduleFactory); } public function set percentWidth(_arg1:Number):void{ var _local2:IInvalidating; if (_percentWidth == _arg1){ return; }; if (!isNaN(_arg1)){ _explicitWidth = NaN; }; _percentWidth = _arg1; _local2 = (parent as IInvalidating); if (_local2){ _local2.invalidateSize(); _local2.invalidateDisplayList(); }; } public function get document():Object{ return (_document); } public function set mouseFocusEnabled(_arg1:Boolean):void{ _mouseFocusEnabled = _arg1; } final mx_internal function $addChild(_arg1:DisplayObject):DisplayObject{ return (super.addChild(_arg1)); } mx_internal function setThemeColor(_arg1:Object):void{ var _local2:Number; var _local3:Number; var _local4:Number; if ((_local2 is String)){ _local2 = parseInt(String(_arg1)); } else { _local2 = Number(_arg1); }; if (isNaN(_local2)){ _local2 = StyleManager.getColorName(_arg1); }; _local3 = ColorUtil.adjustBrightness2(_local2, 50); _local4 = ColorUtil.adjustBrightness2(_local2, 70); setStyle("selectionColor", _local3); setStyle("rollOverColor", _local4); } override public function get height():Number{ return (_height); } public function get id():String{ return (_id); } public function set minWidth(_arg1:Number):void{ if (explicitMinWidth == _arg1){ return; }; explicitMinWidth = _arg1; } public function set currentState(_arg1:String):void{ setCurrentState(_arg1, true); } public function getRepeaterItem(_arg1:int=-1):Object{ var _local2:Array; _local2 = repeaters; if (_arg1 == -1){ _arg1 = (_local2.length - 1); }; return (_local2[_arg1].getItemAt(repeaterIndices[_arg1])); } public function executeBindings(_arg1:Boolean=false):void{ var _local2:Object; _local2 = (((descriptor) && (descriptor.document))) ? descriptor.document : parentDocument; BindingManager.executeBindings(_local2, id, this); } public function replayAutomatableEvent(_arg1:Event):Boolean{ if (automationDelegate){ return (automationDelegate.replayAutomatableEvent(_arg1)); }; return (false); } public function get instanceIndex():int{ return ((_instanceIndices) ? _instanceIndices[(_instanceIndices.length - 1)] : -1); } public function get explicitMaxWidth():Number{ return (_explicitMaxWidth); } public function effectFinished(_arg1:EffectInstance):void{ _endingEffectInstances.push(_arg1); invalidateProperties(); UIComponentGlobals.layoutManager.addEventListener(FlexEvent.UPDATE_COMPLETE, updateCompleteHandler, false, 0, true); } public function set measuredWidth(_arg1:Number):void{ _measuredWidth = _arg1; } override public function removeChildAt(_arg1:int):DisplayObject{ var _local2:DisplayObject; _local2 = getChildAt(_arg1); removingChild(_local2); $removeChild(_local2); childRemoved(_local2); return (_local2); } mx_internal function set isEffectStarted(_arg1:Boolean):void{ _isEffectStarted = _arg1; } mx_internal function fillOverlay(_arg1:UIComponent, _arg2:uint, _arg3:RoundedRectangle=null):void{ var _local4:Graphics; if (!_arg3){ _arg3 = new RoundedRectangle(0, 0, unscaledWidth, unscaledHeight, 0); }; _local4 = _arg1.graphics; _local4.clear(); _local4.beginFill(_arg2); _local4.drawRoundRect(_arg3.x, _arg3.y, _arg3.width, _arg3.height, (_arg3.cornerRadius * 2), (_arg3.cornerRadius * 2)); _local4.endFill(); } mx_internal function childAdded(_arg1:DisplayObject):void{ if ((_arg1 is UIComponent)){ if (!UIComponent(_arg1).initialized){ UIComponent(_arg1).initialize(); }; } else { if ((_arg1 is IUIComponent)){ IUIComponent(_arg1).initialize(); }; }; } public function globalToContent(_arg1:Point):Point{ return (globalToLocal(_arg1)); } public function get instanceIndices():Array{ return ((_instanceIndices) ? _instanceIndices.slice(0) : null); } mx_internal function removingChild(_arg1:DisplayObject):void{ } private function getTransition(_arg1:String, _arg2:String):Effect{ var _local3:Effect; var _local4:int; var _local5:int; var _local6:Transition; _local3 = null; _local4 = 0; if (!transitions){ return (null); }; if (!_arg1){ _arg1 = ""; }; if (!_arg2){ _arg2 = ""; }; _local5 = 0; while (_local5 < transitions.length) { _local6 = transitions[_local5]; if ((((((_local6.fromState == "*")) && ((_local6.toState == "*")))) && ((_local4 < 1)))){ _local3 = _local6.effect; _local4 = 1; } else { if ((((((_local6.fromState == _arg1)) && ((_local6.toState == "*")))) && ((_local4 < 2)))){ _local3 = _local6.effect; _local4 = 2; } else { if ((((((_local6.fromState == "*")) && ((_local6.toState == _arg2)))) && ((_local4 < 3)))){ _local3 = _local6.effect; _local4 = 3; } else { if ((((((_local6.fromState == _arg1)) && ((_local6.toState == _arg2)))) && ((_local4 < 4)))){ _local3 = _local6.effect; _local4 = 4; break; }; }; }; }; _local5++; }; return (_local3); } public function set owner(_arg1:DisplayObjectContainer):void{ _owner = _arg1; } mx_internal function getEffectsForProperty(_arg1:String):Array{ return (((_affectedProperties[_arg1])!=undefined) ? _affectedProperties[_arg1] : []); } protected function get unscaledWidth():Number{ return ((width / Math.abs(scaleX))); } public function set processedDescriptors(_arg1:Boolean):void{ _processedDescriptors = _arg1; if (_arg1){ dispatchEvent(new FlexEvent(FlexEvent.INITIALIZE)); }; } private function processEffectFinished(_arg1:Array):void{ var _local2:int; var _local3:int; var _local4:EffectInstance; var _local5:EffectInstance; var _local6:Array; var _local7:int; var _local8:String; var _local9:int; _local2 = (_effectsStarted.length - 1); while (_local2 >= 0) { _local3 = 0; while (_local3 < _arg1.length) { _local4 = _arg1[_local3]; if (_local4 == _effectsStarted[_local2]){ _local5 = _effectsStarted[_local2]; _effectsStarted.splice(_local2, 1); _local6 = _local5.effect.getAffectedProperties(); _local7 = 0; while (_local7 < _local6.length) { _local8 = _local6[_local7]; if (_affectedProperties[_local8] != undefined){ _local9 = 0; while (_local9 < _affectedProperties[_local8].length) { if (_affectedProperties[_local8][_local9] == _local4){ _affectedProperties[_local8].splice(_local9, 1); break; }; _local9++; }; if (_affectedProperties[_local8].length == 0){ delete _affectedProperties[_local8]; }; }; _local7++; }; break; }; _local3++; }; _local2--; }; isEffectStarted = ((_effectsStarted.length > 0)) ? true : false; } protected function measure():void{ measuredWidth = (isNaN(_width)) ? 0 : _width; measuredHeight = (isNaN(_height)) ? 0 : _height; } private function dispatchResizeEvent():void{ var _local1:ResizeEvent; _local1 = new ResizeEvent(ResizeEvent.RESIZE); _local1.oldWidth = oldWidth; _local1.oldHeight = oldHeight; dispatchEvent(_local1); oldWidth = width; oldHeight = height; } public function get includeInLayout():Boolean{ return (_includeInLayout); } public function set maxWidth(_arg1:Number):void{ if (explicitMaxWidth == _arg1){ return; }; explicitMaxWidth = _arg1; } public function validateDisplayList():void{ var _local1:ISystemManager; if (invalidateDisplayListFlag){ _local1 = (parent as ISystemManager); if (_local1){ if ((((_local1 == systemManager.topLevelSystemManager)) && (!((_local1.document == this))))){ setActualSize(getExplicitOrMeasuredWidth(), getExplicitOrMeasuredHeight()); }; }; updateDisplayList(((scaleX == 0)) ? 0 : (width / scaleX), ((scaleY == 0)) ? 0 : (height / scaleY)); invalidateDisplayListFlag = false; }; } public function contentToGlobal(_arg1:Point):Point{ return (localToGlobal(_arg1)); } public function resolveAutomationIDPart(_arg1:Object):Array{ if (automationDelegate){ return (automationDelegate.resolveAutomationIDPart(_arg1)); }; return ([]); } public function setFocus():void{ var _local1:ISystemManager; _local1 = systemManager; if (((_local1) && (_local1.stage))){ if (UIComponentGlobals.callLaterDispatcherCount == 0){ _local1.stage.focus = this; UIComponentGlobals.nextFocusObject = null; } else { UIComponentGlobals.nextFocusObject = this; _local1.stage.addEventListener(Event.ENTER_FRAME, setFocusLater); }; } else { UIComponentGlobals.nextFocusObject = this; callLater(setFocusLater); }; } public function set inheritingStyles(_arg1:Object):void{ _inheritingStyles = _arg1; } public function set initialized(_arg1:Boolean):void{ _initialized = _arg1; if (_arg1){ setVisible(_visible, true); dispatchEvent(new FlexEvent(FlexEvent.CREATION_COMPLETE)); }; } public function owns(_arg1:DisplayObject):Boolean{ var _local2:IChildList; _local2 = ((this is IRawChildrenContainer)) ? IRawChildrenContainer(this).rawChildren : IChildList(this); if (_local2.contains(_arg1)){ return (true); }; while (((_arg1) && (!((_arg1 == this))))) { if ((_arg1 is IUIComponent)){ _arg1 = IUIComponent(_arg1).owner; } else { _arg1 = _arg1.parent; }; }; return ((_arg1 == this)); } public function setVisible(_arg1:Boolean, _arg2:Boolean=false):void{ _visible = _arg1; if (!initialized){ return; }; if ($visible == _arg1){ return; }; $visible = _arg1; if (!_arg2){ dispatchEvent(new FlexEvent((_arg1) ? FlexEvent.SHOW : FlexEvent.HIDE)); }; } final mx_internal function set $y(_arg1:Number):void{ super.y = _arg1; } final mx_internal function $addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{ return (super.addChildAt(_arg1, _arg2)); } public function deleteReferenceOnParentDocument(_arg1:IFlexDisplayObject):void{ var _local2:Array; var _local3:Object; var _local4:Array; var _local5:int; var _local6:int; var _local7:int; var _local8:Object; var _local9:PropertyChangeEvent; if (((id) && (!((id == ""))))){ _local2 = _instanceIndices; if (!_local2){ _arg1[id] = null; } else { _local3 = _arg1[id]; if (!_local3){ return; }; _local4 = []; _local4.push(_local3); _local5 = _local2.length; _local6 = 0; while (_local6 < (_local5 - 1)) { _local8 = _local3[_local2[_local6]]; if (!_local8){ return; }; _local3 = _local8; _local4.push(_local3); _local6++; }; _local3.splice(_local2[(_local5 - 1)], 1); _local7 = (_local4.length - 1); while (_local7 > 0) { if (_local4[_local7].length == 0){ _local4[(_local7 - 1)].splice(_local2[_local7], 1); }; _local7--; }; if ((((_local4.length > 0)) && ((_local4[0].length == 0)))){ _arg1[id] = null; } else { _local9 = PropertyChangeEvent.createUpdateEvent(_arg1, id, _arg1[id], _arg1[id]); _arg1.dispatchEvent(_local9); }; }; }; } private function commitCurrentState():void{ var _local1:Effect; var _local2:String; var _local3:StateChangeEvent; var _local4:String; var _local5:State; _local1 = (playStateTransition) ? getTransition(_currentState, requestedCurrentState) : null; _local2 = findCommonBaseState(_currentState, requestedCurrentState); _local4 = (_currentState) ? _currentState : ""; _local5 = getState(requestedCurrentState); if (_currentTransitionEffect){ _currentTransitionEffect.end(); }; initializeState(requestedCurrentState); if (_local1){ _local1.captureStartValues(); }; _local3 = new StateChangeEvent(StateChangeEvent.CURRENT_STATE_CHANGING); _local3.oldState = _local4; _local3.newState = (requestedCurrentState) ? requestedCurrentState : ""; dispatchEvent(_local3); if (isBaseState(_currentState)){ dispatchEvent(new FlexEvent(FlexEvent.EXIT_STATE)); }; removeState(_currentState, _local2); _currentState = requestedCurrentState; if (isBaseState(currentState)){ dispatchEvent(new FlexEvent(FlexEvent.ENTER_STATE)); } else { applyState(_currentState, _local2); }; _local3 = new StateChangeEvent(StateChangeEvent.CURRENT_STATE_CHANGE); _local3.oldState = _local4; _local3.newState = (_currentState) ? _currentState : ""; dispatchEvent(_local3); if (_local1){ UIComponentGlobals.layoutManager.validateNow(); _currentTransitionEffect = _local1; _local1.addEventListener(EffectEvent.EFFECT_END, transition_effectEndHandler); _local1.play(); }; } public function get nonInheritingStyles():Object{ return (_nonInheritingStyles); } final mx_internal function set $x(_arg1:Number):void{ super.x = _arg1; } private function applyState(_arg1:String, _arg2:String):void{ var _local3:State; var _local4:Array; var _local5:int; _local3 = getState(_arg1); if (_local3){ if (_local3.basedOn != _arg2){ applyState(_local3.basedOn, _arg2); }; _local4 = _local3.overrides; _local5 = 0; while (_local5 < _local4.length) { _local4[_local5].apply(this); _local5++; }; _local3.dispatchEnterState(); }; } override public function get width():Number{ return (_width); } public function effectStarted(_arg1:EffectInstance):void{ var _local2:Array; var _local3:int; var _local4:String; _effectsStarted.push(_arg1); _local2 = _arg1.effect.getAffectedProperties(); _local3 = 0; while (_local3 < _local2.length) { _local4 = _local2[_local3]; if (_affectedProperties[_local4] == undefined){ _affectedProperties[_local4] = []; }; _affectedProperties[_local4].push(_arg1); _local3++; }; isEffectStarted = true; } protected function commitProperties():void{ var _local1:Number; var _local2:Number; if (_scaleX != oldScaleX){ _local1 = Math.abs((_scaleX / oldScaleX)); if (!isNaN(explicitMinWidth)){ explicitMinWidth = (explicitMinWidth * _local1); }; if (!isNaN(explicitWidth)){ explicitWidth = (explicitWidth * _local1); }; if (!isNaN(explicitMaxWidth)){ explicitMaxWidth = (explicitMaxWidth * _local1); }; _width = (_width * _local1); super.scaleX = (oldScaleX = _scaleX); }; if (_scaleY != oldScaleY){ _local2 = Math.abs((_scaleY / oldScaleY)); if (!isNaN(explicitMinHeight)){ explicitMinHeight = (explicitMinHeight * _local2); }; if (!isNaN(explicitHeight)){ explicitHeight = (explicitHeight * _local2); }; if (!isNaN(explicitMaxHeight)){ explicitMaxHeight = (explicitMaxHeight * _local2); }; _height = (_height * _local2); super.scaleY = (oldScaleY = _scaleY); }; if (((!((x == oldX))) || (!((y == oldY))))){ dispatchMoveEvent(); }; if (((!((width == oldWidth))) || (!((height == oldHeight))))){ dispatchResizeEvent(); }; if (errorStringChanged){ errorStringChanged = false; setBorderColorForErrorString(); }; } public function get percentHeight():Number{ return (_percentHeight); } final mx_internal function get $parent():DisplayObjectContainer{ return (super.parent); } public function set explicitMinWidth(_arg1:Number):void{ var _local2:IInvalidating; if (_explicitMinWidth == _arg1){ return; }; _explicitMinWidth = _arg1; invalidateSize(); _local2 = (parent as IInvalidating); if (_local2){ _local2.invalidateSize(); _local2.invalidateDisplayList(); }; dispatchEvent(new Event("explicitMinWidthChanged")); } public function get isPopUp():Boolean{ return (_isPopUp); } private function measureSizes():Boolean{ var _local1:Boolean; var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; _local1 = false; if (!invalidateSizeFlag){ return (_local1); }; if (((isNaN(explicitWidth)) || (isNaN(explicitHeight)))){ _local4 = Math.abs(scaleX); _local5 = Math.abs(scaleY); if (_local4 != 1){ _measuredMinWidth = (_measuredMinWidth / _local4); _measuredWidth = (_measuredWidth / _local4); }; if (_local5 != 1){ _measuredMinHeight = (_measuredMinHeight / _local5); _measuredHeight = (_measuredHeight / _local5); }; measure(); invalidateSizeFlag = false; if (((!(isNaN(explicitMinWidth))) && ((measuredWidth < explicitMinWidth)))){ measuredWidth = explicitMinWidth; }; if (((!(isNaN(explicitMaxWidth))) && ((measuredWidth > explicitMaxWidth)))){ measuredWidth = explicitMaxWidth; }; if (((!(isNaN(explicitMinHeight))) && ((measuredHeight < explicitMinHeight)))){ measuredHeight = explicitMinHeight; }; if (((!(isNaN(explicitMaxHeight))) && ((measuredHeight > explicitMaxHeight)))){ measuredHeight = explicitMaxHeight; }; if (_local4 != 1){ _measuredMinWidth = (_measuredMinWidth * _local4); _measuredWidth = (_measuredWidth * _local4); }; if (_local5 != 1){ _measuredMinHeight = (_measuredMinHeight * _local5); _measuredHeight = (_measuredHeight * _local5); }; } else { invalidateSizeFlag = false; _measuredMinWidth = 0; _measuredMinHeight = 0; }; adjustSizesForScaleChanges(); if (isNaN(oldMinWidth)){ oldMinWidth = (isNaN(explicitMinWidth)) ? measuredMinWidth : explicitMinWidth; oldMinHeight = (isNaN(explicitMinHeight)) ? measuredMinHeight : explicitMinHeight; oldExplicitWidth = (isNaN(explicitWidth)) ? measuredWidth : explicitWidth; oldExplicitHeight = (isNaN(explicitHeight)) ? measuredHeight : explicitHeight; _local1 = true; } else { _local3 = (isNaN(explicitMinWidth)) ? measuredMinWidth : explicitMinWidth; if (_local3 != oldMinWidth){ oldMinWidth = _local3; _local1 = true; }; _local3 = (isNaN(explicitMinHeight)) ? measuredMinHeight : explicitMinHeight; if (_local3 != oldMinHeight){ oldMinHeight = _local3; _local1 = true; }; _local3 = (isNaN(explicitWidth)) ? measuredWidth : explicitWidth; if (_local3 != oldExplicitWidth){ oldExplicitWidth = _local3; _local1 = true; }; _local3 = (isNaN(explicitHeight)) ? measuredHeight : explicitHeight; if (_local3 != oldExplicitHeight){ oldExplicitHeight = _local3; _local1 = true; }; }; return (_local1); } public function get automationTabularData():Object{ if (automationDelegate){ return (automationDelegate.automationTabularData); }; return (null); } public function validateNow():void{ UIComponentGlobals.layoutManager.validateClient(this); } public function finishPrint(_arg1:Object, _arg2:IFlexDisplayObject):void{ } public function get repeaters():Array{ return ((_repeaters) ? _repeaters.slice(0) : []); } private function dispatchMoveEvent():void{ var _local1:MoveEvent; _local1 = new MoveEvent(MoveEvent.MOVE); _local1.oldX = oldX; _local1.oldY = oldY; dispatchEvent(_local1); oldX = x; oldY = y; } public function get measuredMinHeight():Number{ return (_measuredMinHeight); } public function drawFocus(_arg1:Boolean):void{ var _local2:DisplayObject; var _local3:Sprite; var _local4:DisplayObjectContainer; var _local5:Class; if (!parent){ return; }; _local2 = getFocusObject(); _local3 = (focusManager) ? focusManager.focusPane : null; if (((_arg1) && (!(isEffectStarted)))){ _local4 = _local3.parent; if (_local4 != parent){ if (_local4){ if ((_local4 is ISystemManager)){ ISystemManager(_local4).focusPane = null; } else { IUIComponent(_local4).focusPane = null; }; }; if ((parent is ISystemManager)){ ISystemManager(parent).focusPane = _local3; } else { IUIComponent(parent).focusPane = _local3; }; }; _local5 = getStyle("focusSkin"); if (((_local2) && (!((_local2 is _local5))))){ _local3.removeChild(_local2); _local2 = null; }; if (!_local2){ _local2 = new (_local5); _local2.name = "focus"; _local3.addChild(_local2); }; if ((_local2 is ILayoutManagerClient)){ ILayoutManagerClient(_local2).nestLevel = nestLevel; }; if ((_local2 is ISimpleStyleClient)){ ISimpleStyleClient(_local2).styleName = this; }; addEventListener(MoveEvent.MOVE, focusObj_moveHandler, true); addEventListener(MoveEvent.MOVE, focusObj_moveHandler); addEventListener(ResizeEvent.RESIZE, focusObj_resizeHandler, true); addEventListener(ResizeEvent.RESIZE, focusObj_resizeHandler); addEventListener(Event.REMOVED, focusObj_removedHandler, true); _local2.visible = true; hasFocusRect = true; adjustFocusRect(); } else { if (hasFocusRect){ if (_local2){ _local2.visible = false; }; removeEventListener(MoveEvent.MOVE, focusObj_moveHandler); removeEventListener(MoveEvent.MOVE, focusObj_moveHandler, true); removeEventListener(ResizeEvent.RESIZE, focusObj_resizeHandler, true); removeEventListener(ResizeEvent.RESIZE, focusObj_resizeHandler); removeEventListener(Event.REMOVED, focusObj_removedHandler, true); }; }; } private function get indexedID():String{ var _local1:String; var _local2:Array; _local1 = id; _local2 = instanceIndices; if (_local2){ _local1 = (_local1 + (("[" + _local2.join("][")) + "]")); }; return (_local1); } mx_internal function addingChild(_arg1:DisplayObject):void{ if ((((_arg1 is IUIComponent)) && (!(IUIComponent(_arg1).document)))){ IUIComponent(_arg1).document = (document) ? document : Application.application; }; if ((_arg1 is IUIComponent)){ IUIComponent(_arg1).parentChanged(this); }; if ((_arg1 is ILayoutManagerClient)){ ILayoutManagerClient(_arg1).nestLevel = (nestLevel + 1); } else { if ((_arg1 is UITextField)){ UITextField(_arg1).nestLevel = (nestLevel + 1); }; }; if ((_arg1 is InteractiveObject)){ if (doubleClickEnabled){ InteractiveObject(_arg1).doubleClickEnabled = true; }; }; if ((_arg1 is IStyleClient)){ IStyleClient(_arg1).regenerateStyleCache(true); } else { if ((((_arg1 is UITextField)) && (UITextField(_arg1).inheritingStyles))){ StyleProtoChain.initTextField(UITextField(_arg1)); }; }; if ((_arg1 is ISimpleStyleClient)){ ISimpleStyleClient(_arg1).styleChanged(null); }; if ((_arg1 is IStyleClient)){ IStyleClient(_arg1).notifyStyleChangeInChildren(null, true); }; if ((_arg1 is UIComponent)){ UIComponent(_arg1).initThemeColor(); }; if ((_arg1 is UIComponent)){ UIComponent(_arg1).stylesInitialized(); }; } protected function initializationComplete():void{ processedDescriptors = true; } public function set moduleFactory(_arg1:IFlexModuleFactory):void{ _moduleFactory = _arg1; } public function set repeaterIndices(_arg1:Array):void{ _repeaterIndices = _arg1; } private function focusObj_removedHandler(_arg1:Event):void{ var _local2:DisplayObject; if (_arg1.target != this){ return; }; _local2 = getFocusObject(); if (_local2){ _local2.visible = false; }; } mx_internal function updateCallbacks():void{ if (invalidateDisplayListFlag){ UIComponentGlobals.layoutManager.invalidateDisplayList(this); }; if (invalidateSizeFlag){ UIComponentGlobals.layoutManager.invalidateSize(this); }; if (invalidatePropertiesFlag){ UIComponentGlobals.layoutManager.invalidateProperties(this); }; if (systemManager){ if ((((methodQueue.length > 0)) && (!(listeningForRender)))){ _systemManager.stage.addEventListener(Event.RENDER, callLaterDispatcher); _systemManager.stage.addEventListener(Event.ENTER_FRAME, callLaterDispatcher); listeningForRender = true; }; _systemManager.stage.invalidate(); }; } public function set styleDeclaration(_arg1:CSSStyleDeclaration):void{ _styleDeclaration = _arg1; } override public function set doubleClickEnabled(_arg1:Boolean):void{ var _local2:IChildList; var _local3:int; var _local4:InteractiveObject; super.doubleClickEnabled = _arg1; if ((this is IRawChildrenContainer)){ _local2 = IRawChildrenContainer(this).rawChildren; } else { _local2 = IChildList(this); }; _local3 = 0; while (_local3 < _local2.numChildren) { _local4 = (_local2.getChildAt(_local3) as InteractiveObject); if (_local4){ _local4.doubleClickEnabled = _arg1; }; _local3++; }; } public function prepareToPrint(_arg1:IFlexDisplayObject):Object{ return (null); } public function get minHeight():Number{ if (!isNaN(explicitMinHeight)){ return (explicitMinHeight); }; return (measuredMinHeight); } public function notifyStyleChangeInChildren(_arg1:String, _arg2:Boolean):void{ var _local3:int; var _local4:int; var _local5:ISimpleStyleClient; cachedTextFormat = null; _local3 = numChildren; _local4 = 0; while (_local4 < _local3) { _local5 = (getChildAt(_local4) as ISimpleStyleClient); if (_local5){ _local5.styleChanged(_arg1); if ((_local5 is IStyleClient)){ IStyleClient(_local5).notifyStyleChangeInChildren(_arg1, _arg2); }; }; _local4++; }; } public function get contentMouseX():Number{ return (mouseX); } public function get contentMouseY():Number{ return (mouseY); } public function get tweeningProperties():Array{ return (_tweeningProperties); } public function set explicitMaxWidth(_arg1:Number):void{ var _local2:IInvalidating; if (_explicitMaxWidth == _arg1){ return; }; _explicitMaxWidth = _arg1; invalidateSize(); _local2 = (parent as IInvalidating); if (_local2){ _local2.invalidateSize(); _local2.invalidateDisplayList(); }; dispatchEvent(new Event("explicitMaxWidthChanged")); } public function set document(_arg1:Object):void{ var _local2:int; var _local3:int; var _local4:IUIComponent; _local2 = numChildren; _local3 = 0; while (_local3 < _local2) { _local4 = (getChildAt(_local3) as IUIComponent); if (!_local4){ } else { if ((((_local4.document == _document)) || ((_local4.document == Application.application)))){ _local4.document = _arg1; }; }; _local3++; }; _document = _arg1; } public function validateSize(_arg1:Boolean=false):void{ var _local2:int; var _local3:DisplayObject; var _local4:Boolean; var _local5:IInvalidating; if (_arg1){ _local2 = 0; while (_local2 < numChildren) { _local3 = getChildAt(_local2); if ((_local3 is ILayoutManagerClient)){ (_local3 as ILayoutManagerClient).validateSize(true); }; _local2++; }; }; if (invalidateSizeFlag){ _local4 = measureSizes(); if (((_local4) && (includeInLayout))){ invalidateDisplayList(); _local5 = (parent as IInvalidating); if (_local5){ _local5.invalidateSize(); _local5.invalidateDisplayList(); }; }; }; } override public function dispatchEvent(_arg1:Event):Boolean{ if (dispatchEventHook != null){ dispatchEventHook(_arg1, this); }; return (super.dispatchEvent(_arg1)); } public function set updateCompletePendingFlag(_arg1:Boolean):void{ _updateCompletePendingFlag = _arg1; } final mx_internal function get $height():Number{ return (super.height); } override public function set height(_arg1:Number):void{ var _local2:IInvalidating; if (explicitHeight != _arg1){ explicitHeight = _arg1; invalidateSize(); }; if (_height != _arg1){ invalidateProperties(); invalidateDisplayList(); _local2 = (parent as IInvalidating); if (((_local2) && (includeInLayout))){ _local2.invalidateSize(); _local2.invalidateDisplayList(); }; _height = _arg1; dispatchEvent(new Event("heightChanged")); }; } protected function attachOverlay():void{ addChild(overlay); } private function overlay_resizeHandler(_arg1:Event):void{ fillOverlay(overlay, overlayColor, null); } public function get numAutomationChildren():int{ if (automationDelegate){ return (automationDelegate.numAutomationChildren); }; return (0); } public function get explicitMinHeight():Number{ return (_explicitMinHeight); } public function localToContent(_arg1:Point):Point{ return (_arg1); } public function set id(_arg1:String):void{ _id = _arg1; } public function get parentApplication():Object{ var _local1:Object; var _local2:UIComponent; _local1 = systemManager.document; if (_local1 == this){ _local2 = (_local1.systemManager.parent as UIComponent); _local1 = (_local2) ? _local2.systemManager.document : null; }; return (_local1); } private function removeState(_arg1:String, _arg2:String):void{ var _local3:State; var _local4:Array; var _local5:int; _local3 = getState(_arg1); if (_local3){ _local3.dispatchExitState(); _local4 = _local3.overrides; _local5 = _local4.length; while (_local5) { _local4[(_local5 - 1)].remove(this); _local5--; }; if (_local3.basedOn != _arg2){ removeState(_local3.basedOn, _arg2); }; }; } public function setStyle(_arg1:String, _arg2):void{ var _local3:Boolean; var _local4:Boolean; var _local5:Boolean; if (_arg1 == "styleName"){ styleName = _arg2; return; }; if (EffectManager.getEventForEffectTrigger(_arg1) != ""){ EffectManager.setStyle(_arg1, this); }; _local3 = StyleManager.isInheritingStyle(_arg1); _local4 = !((inheritingStyles == UIComponent.STYLE_UNINITIALIZED)); _local5 = !((getStyle(_arg1) == _arg2)); if (!_styleDeclaration){ _styleDeclaration = new CSSStyleDeclaration(); _styleDeclaration.setStyle(_arg1, _arg2); if (_local4){ regenerateStyleCache(_local3); }; } else { _styleDeclaration.setStyle(_arg1, _arg2); }; if (((_local4) && (_local5))){ styleChanged(_arg1); notifyStyleChangeInChildren(_arg1, _local3); }; } public function get validationSubField():String{ return (_validationSubField); } public function get systemManager():ISystemManager{ var _local1:DisplayObject; var _local2:DisplayObjectContainer; var _local3:IUIComponent; if (!_systemManager){ _local1 = root; if (_local1){ _systemManager = (_local1 as ISystemManager); } else { _local2 = parent; while (_local2) { _local3 = (_local2 as IUIComponent); if (_local3){ _systemManager = _local3.systemManager; break; }; _local2 = _local2.parent; }; }; }; return (_systemManager); } public function get showInAutomationHierarchy():Boolean{ return (_showInAutomationHierarchy); } private function isBaseState(_arg1:String):Boolean{ return (((!(_arg1)) || ((_arg1 == "")))); } override public function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{ if (((overlayReferenceCount) && (!((_arg1 == overlay))))){ _arg2 = Math.min(_arg2, Math.max(0, (super.numChildren - 1))); }; addingChild(_arg1); $addChildAt(_arg1, _arg2); childAdded(_arg1); return (_arg1); } public function set enabled(_arg1:Boolean):void{ _enabled = _arg1; cachedTextFormat = null; invalidateDisplayList(); dispatchEvent(new Event("enabledChanged")); } public function get minWidth():Number{ if (!isNaN(explicitMinWidth)){ return (explicitMinWidth); }; return (measuredMinWidth); } private function setFocusLater(_arg1:Event=null):void{ var _local2:ISystemManager; _local2 = systemManager; if (((_local2) && (_local2.stage))){ _local2.stage.removeEventListener(Event.ENTER_FRAME, setFocusLater); if (UIComponentGlobals.nextFocusObject){ _local2.stage.focus = UIComponentGlobals.nextFocusObject; }; UIComponentGlobals.nextFocusObject = null; }; } public function get currentState():String{ return ((_currentStateChanged) ? requestedCurrentState : _currentState); } public function set focusEnabled(_arg1:Boolean):void{ _focusEnabled = _arg1; } public function get measuredWidth():Number{ return (_measuredWidth); } public function get baselinePosition():Number{ return (NaN); } public function set cachePolicy(_arg1:String):void{ if (_cachePolicy != _arg1){ _cachePolicy = _arg1; if (_arg1 == UIComponentCachePolicy.OFF){ cacheAsBitmap = false; } else { if (_arg1 == UIComponentCachePolicy.ON){ cacheAsBitmap = true; } else { cacheAsBitmap = (cacheAsBitmapCount > 0); }; }; }; } public function get automationValue():Array{ if (automationDelegate){ return (automationDelegate.automationValue); }; return ([]); } public function set instanceIndices(_arg1:Array):void{ _instanceIndices = _arg1; } public function get repeaterIndex():int{ return ((_repeaterIndices) ? _repeaterIndices[(_repeaterIndices.length - 1)] : -1); } public function parentChanged(_arg1:DisplayObjectContainer):void{ if (!_arg1){ _parent = null; _nestLevel = 0; } else { if ((_arg1 is IStyleClient)){ _parent = _arg1; } else { if ((_arg1 is SystemManager)){ _parent = _arg1; } else { _parent = _arg1.parent; }; }; }; } public function get owner():DisplayObjectContainer{ return ((_owner) ? _owner : parent); } public function get processedDescriptors():Boolean{ return (_processedDescriptors); } override public function set alpha(_arg1:Number):void{ super.alpha = _arg1; dispatchEvent(new Event("alphaChanged")); } public function initializeRepeaterArrays(_arg1:IRepeaterClient):void{ if (((((((_arg1) && (_arg1.instanceIndices))) && (!(_instanceIndices)))) && (!(_arg1.isDocument)))){ _instanceIndices = _arg1.instanceIndices; _repeaters = _arg1.repeaters; _repeaterIndices = _arg1.repeaterIndices; }; } public function get maxWidth():Number{ return ((isNaN(explicitMaxWidth)) ? DEFAULT_MAX_WIDTH : explicitMaxWidth); } private function removedHandler(_arg1:Event):void{ if (_arg1.eventPhase != EventPhase.AT_TARGET){ return; }; if ((((parent is Container)) && (Container(parent).creatingContentPane))){ _arg1.stopImmediatePropagation(); return; }; } public function callLater(_arg1:Function, _arg2:Array=null):void{ var _local3:ISystemManager; methodQueue.push(new MethodQueueElement(_arg1, _arg2)); _local3 = systemManager; if (((_local3) && (_local3.stage))){ if (!listeningForRender){ _local3.stage.addEventListener(Event.RENDER, callLaterDispatcher); _local3.stage.addEventListener(Event.ENTER_FRAME, callLaterDispatcher); listeningForRender = true; }; _local3.stage.invalidate(); }; } private function addedHandler(_arg1:Event):void{ if (_arg1.eventPhase != EventPhase.AT_TARGET){ return; }; if ((((parent is Container)) && (Container(parent).creatingContentPane))){ _arg1.stopImmediatePropagation(); return; }; } public function get initialized():Boolean{ return (_initialized); } private function callLaterDispatcher2(_arg1:Event):void{ var _local2:ISystemManager; var _local3:Array; var _local4:int; var _local5:int; var _local6:MethodQueueElement; if (UIComponentGlobals.callLaterSuspendCount > 0){ return; }; _local2 = systemManager; if (((((_local2) && (_local2.stage))) && (listeningForRender))){ _local2.stage.removeEventListener(Event.RENDER, callLaterDispatcher); _local2.stage.removeEventListener(Event.ENTER_FRAME, callLaterDispatcher); listeningForRender = false; }; _local3 = methodQueue; methodQueue = []; _local4 = _local3.length; _local5 = 0; while (_local5 < _local4) { _local6 = MethodQueueElement(_local3[_local5]); _local6.method.apply(null, _local6.args); _local5++; }; } public function measureHTMLText(_arg1:String):TextLineMetrics{ return (determineTextFormatFromStyles().measureHTMLText(_arg1)); } public function set descriptor(_arg1:UIComponentDescriptor):void{ _descriptor = _arg1; } private function getState(_arg1:String):State{ var _local2:int; if (((!(states)) || (isBaseState(_arg1)))){ return (null); }; _local2 = 0; while (_local2 < states.length) { if (states[_local2].name == _arg1){ return (states[_local2]); }; _local2++; }; if (resourceStateUndefined == null){ loadResources(); }; throw (new ArgumentError(StringUtil.substitute(resourceStateUndefined, _arg1))); } mx_internal function get documentDescriptor():UIComponentDescriptor{ return (_documentDescriptor); } public function set includeInLayout(_arg1:Boolean):void{ var _local2:IInvalidating; if (_includeInLayout != _arg1){ _includeInLayout = _arg1; _local2 = (parent as IInvalidating); if (_local2){ _local2.invalidateSize(); _local2.invalidateDisplayList(); }; dispatchEvent(new Event("includeInLayoutChanged")); }; } public function getClassStyleDeclarations():Array{ var myApplicationDomain:ApplicationDomain; var factory:IFlexModuleFactory; var className:String; var cache:Array; var decls:Array; var classNames:Array; var caches:Array; var declcache:Array; var myRoot:DisplayObject; var s:CSSStyleDeclaration; factory = ModuleManager.getAssociatedFactory(this); if (factory != null){ myApplicationDomain = ApplicationDomain(factory.info()["currentDomain"]); } else { myRoot = SystemManager.getSWFRoot(this); if (!myRoot){ return ([]); }; myApplicationDomain = myRoot.loaderInfo.applicationDomain; }; className = getQualifiedClassName(this); className = className.replace("::", "."); cache = StyleManager.typeSelectorCache[className]; if (cache){ return (cache); }; decls = []; classNames = []; caches = []; declcache = []; while (((((!((className == null))) && (!((className == "mx.core.UIComponent"))))) && (!((className == "mx.core.UITextField"))))) { cache = StyleManager.typeSelectorCache[className]; if (cache){ decls = decls.concat(cache); break; }; s = StyleManager.getStyleDeclaration(className); if (s){ decls.unshift(s); classNames.push(className); caches.push(classNames); declcache.push(decls); decls = []; classNames = []; } else { classNames.push(className); }; try { className = getQualifiedSuperclassName(myApplicationDomain.getDefinition(className)); className = className.replace("::", "."); } catch(e:ReferenceError) { className = null; }; }; caches.push(classNames); declcache.push(decls); decls = []; while (caches.length) { classNames = caches.pop(); decls = decls.concat(declcache.pop()); while (classNames.length) { StyleManager.typeSelectorCache[classNames.pop()] = decls; }; }; return (decls); } public function validateProperties():void{ if (invalidatePropertiesFlag){ commitProperties(); invalidatePropertiesFlag = false; }; } public function set measuredMinWidth(_arg1:Number):void{ _measuredMinWidth = _arg1; } override public function removeChild(_arg1:DisplayObject):DisplayObject{ removingChild(_arg1); $removeChild(_arg1); childRemoved(_arg1); return (_arg1); } private function initializeState(_arg1:String):void{ var _local2:State; _local2 = getState(_arg1); while (_local2) { _local2.initialize(); _local2 = getState(_local2.basedOn); }; } private function focusObj_moveHandler(_arg1:MoveEvent):void{ adjustFocusRect(); } public function get styleDeclaration():CSSStyleDeclaration{ return (_styleDeclaration); } override public function get doubleClickEnabled():Boolean{ return (super.doubleClickEnabled); } mx_internal function initProtoChain():void{ var _local1:CSSStyleDeclaration; var _local2:Object; var _local3:IStyleClient; var _local4:Array; var _local5:int; var _local6:int; var _local7:Object; var _local8:CSSStyleDeclaration; if (styleName){ if ((styleName is CSSStyleDeclaration)){ _local1 = CSSStyleDeclaration(styleName); } else { if ((styleName is IFlexDisplayObject)){ StyleProtoChain.initProtoChainForUIComponentStyleName(this); return; }; if ((styleName is String)){ _local1 = StyleManager.getStyleDeclaration(("." + styleName)); }; }; }; _local2 = StyleManager.stylesRoot; if (((_local2) && (_local2.effects))){ registerEffects(_local2.effects); }; _local3 = (parent as IStyleClient); if (_local3){ _local7 = _local3.inheritingStyles; if (_local7 == UIComponent.STYLE_UNINITIALIZED){ _local7 = _local2; }; } else { if (isPopUp){ _local7 = Application.application.inheritingStyles; } else { _local7 = StyleManager.stylesRoot; }; }; _local4 = getClassStyleDeclarations(); _local5 = _local4.length; _local6 = 0; while (_local6 < _local5) { _local8 = _local4[_local6]; _local7 = _local8.addStyleToProtoChain(_local7, this); _local2 = _local8.addStyleToProtoChain(_local2, this); if (_local8.effects){ registerEffects(_local8.effects); }; _local6++; }; if (_local1){ _local7 = _local1.addStyleToProtoChain(_local7, this); _local2 = _local1.addStyleToProtoChain(_local2, this); if (_local1.effects){ registerEffects(_local1.effects); }; }; inheritingStyles = (_styleDeclaration) ? _styleDeclaration.addStyleToProtoChain(_local7, this) : _local7; nonInheritingStyles = (_styleDeclaration) ? _styleDeclaration.addStyleToProtoChain(_local2, this) : _local2; } public function get repeaterIndices():Array{ return ((_repeaterIndices) ? _repeaterIndices.slice() : []); } private function creationCompleteHandler(_arg1:FlexEvent):void{ if (_currentStateChanged){ _currentStateChanged = false; commitCurrentState(); validateNow(); }; removeEventListener(FlexEvent.CREATION_COMPLETE, creationCompleteHandler); } override public function setChildIndex(_arg1:DisplayObject, _arg2:int):void{ if (((overlayReferenceCount) && (!((_arg1 == overlay))))){ _arg2 = Math.min(_arg2, Math.max(0, (super.numChildren - 2))); }; super.setChildIndex(_arg1, _arg2); } public function set measuredHeight(_arg1:Number):void{ _measuredHeight = _arg1; } protected function createChildren():void{ } public function regenerateStyleCache(_arg1:Boolean):void{ var _local2:IChildList; var _local3:int; var _local4:int; var _local5:DisplayObject; initProtoChain(); _local2 = ((this is IRawChildrenContainer)) ? IRawChildrenContainer(this).rawChildren : IChildList(this); _local3 = _local2.numChildren; _local4 = 0; while (_local4 < _local3) { _local5 = _local2.getChildAt(_local4); if ((_local5 is IStyleClient)){ if (IStyleClient(_local5).inheritingStyles != UIComponent.STYLE_UNINITIALIZED){ IStyleClient(_local5).regenerateStyleCache(_arg1); }; } else { if ((_local5 is UITextField)){ if (UITextField(_local5).inheritingStyles){ StyleProtoChain.initTextField(UITextField(_local5)); }; }; }; _local4++; }; } public function get updateCompletePendingFlag():Boolean{ return (_updateCompletePendingFlag); } protected function focusOutHandler(_arg1:FocusEvent):void{ if (isOurFocus(DisplayObject(_arg1.target))){ drawFocus(false); }; } public function contentToLocal(_arg1:Point):Point{ return (_arg1); } public function getFocus():InteractiveObject{ var _local1:ISystemManager; _local1 = systemManager; if (!_local1){ return (null); }; if (UIComponentGlobals.nextFocusObject){ return (UIComponentGlobals.nextFocusObject); }; return (_local1.stage.focus); } public function endEffectsStarted():void{ var _local1:int; var _local2:int; _local1 = _effectsStarted.length; _local2 = 0; while (_local2 < _local1) { _effectsStarted[_local2].end(); _local2++; }; } protected function get unscaledHeight():Number{ return ((height / Math.abs(scaleY))); } public function get enabled():Boolean{ return (_enabled); } override public function set cacheAsBitmap(_arg1:Boolean):void{ super.cacheAsBitmap = _arg1; cacheAsBitmapCount = (_arg1) ? 1 : 0; } public function get focusEnabled():Boolean{ return (_focusEnabled); } mx_internal function removeOverlay():void{ if ((((((overlayReferenceCount > 0)) && ((--overlayReferenceCount == 0)))) && (overlay))){ removeEventListener("resize", overlay_resizeHandler); if (super.getChildByName("overlay")){ $removeChild(overlay); }; overlay = null; }; } public function set cacheHeuristic(_arg1:Boolean):void{ if (_cachePolicy == UIComponentCachePolicy.AUTO){ if (_arg1){ cacheAsBitmapCount++; } else { if (cacheAsBitmapCount != 0){ cacheAsBitmapCount--; }; }; super.cacheAsBitmap = !((cacheAsBitmapCount == 0)); }; } public function get cachePolicy():String{ return (_cachePolicy); } public function set maxHeight(_arg1:Number):void{ if (explicitMaxHeight == _arg1){ return; }; explicitMaxHeight = _arg1; } public function set focusManager(_arg1:IFocusManager):void{ _focusManager = _arg1; } public function clearStyle(_arg1:String):void{ setStyle(_arg1, undefined); } public function get descriptor():UIComponentDescriptor{ return (_descriptor); } public function set nonInheritingStyles(_arg1:Object):void{ _nonInheritingStyles = _arg1; } public function set automationDelegate(_arg1:Object):void{ _automationDelegate = (_arg1 as IAutomationObject); } public function get measuredMinWidth():Number{ return (_measuredMinWidth); } public function createReferenceOnParentDocument(_arg1:IFlexDisplayObject):void{ var _local2:Array; var _local3:Object; var _local4:int; var _local5:int; var _local6:PropertyChangeEvent; var _local7:Object; if (((id) && (!((id == ""))))){ _local2 = _instanceIndices; if (!_local2){ _arg1[id] = this; } else { _local3 = _arg1[id]; if (!(_local3 is Array)){ _local3 = (_arg1[id] = []); }; _local4 = _local2.length; _local5 = 0; while (_local5 < (_local4 - 1)) { _local7 = _local3[_local2[_local5]]; if (!(_local7 is Array)){ _local7 = (_local3[_local2[_local5]] = []); }; _local3 = _local7; _local5++; }; _local3[_local2[(_local4 - 1)]] = this; _local6 = PropertyChangeEvent.createUpdateEvent(_arg1, id, _arg1[id], _arg1[id]); _arg1.dispatchEvent(_local6); }; }; } public function set isPopUp(_arg1:Boolean):void{ _isPopUp = _arg1; } override public function set width(_arg1:Number):void{ var _local2:IInvalidating; if (explicitWidth != _arg1){ explicitWidth = _arg1; invalidateSize(); }; if (_width != _arg1){ invalidateProperties(); invalidateDisplayList(); _local2 = (parent as IInvalidating); if (((_local2) && (includeInLayout))){ _local2.invalidateSize(); _local2.invalidateDisplayList(); }; _width = _arg1; dispatchEvent(new Event("widthChanged")); }; } public function get measuredHeight():Number{ return (_measuredHeight); } public function get repeater():IRepeater{ return ((_repeaters) ? _repeaters[(_repeaters.length - 1)] : null); } public function initialize():void{ if (initialized){ return; }; dispatchEvent(new FlexEvent(FlexEvent.PREINITIALIZE)); createChildren(); childrenCreated(); initializeAccessibility(); initializationComplete(); } public function set percentHeight(_arg1:Number):void{ var _local2:IInvalidating; if (_percentHeight == _arg1){ return; }; if (!isNaN(_arg1)){ _explicitHeight = NaN; }; _percentHeight = _arg1; _local2 = (parent as IInvalidating); if (_local2){ _local2.invalidateSize(); _local2.invalidateDisplayList(); }; } final mx_internal function set $visible(_arg1:Boolean):void{ super.visible = _arg1; } protected function initializeAccessibility():void{ if (UIComponent.createAccessibilityImplementation != null){ UIComponent.createAccessibilityImplementation(this); }; } private function findCommonBaseState(_arg1:String, _arg2:String):String{ var _local3:State; var _local4:State; var _local5:Array; var _local6:Array; var _local7:String; _local3 = getState(_arg1); _local4 = getState(_arg2); if (((!(_local3)) || (!(_local4)))){ return (""); }; if (((isBaseState(_local3.basedOn)) || (isBaseState(_local4.basedOn)))){ return (""); }; _local5 = getBaseStates(_local3); _local6 = getBaseStates(_local4); _local7 = ""; while (_local5[_local5.length] == _local6[_local6.length]) { _local7 = _local5.pop(); _local6.pop(); if (((!(_local5.length)) || (!(_local6.length)))){ break; }; }; return (_local7); } mx_internal function childRemoved(_arg1:DisplayObject):void{ if ((_arg1 is IUIComponent)){ if (IUIComponent(_arg1).document != _arg1){ IUIComponent(_arg1).document = null; }; IUIComponent(_arg1).parentChanged(null); }; } final mx_internal function $removeChildAt(_arg1:int):DisplayObject{ return (super.removeChildAt(_arg1)); } public function get maxHeight():Number{ return ((isNaN(explicitMaxHeight)) ? DEFAULT_MAX_HEIGHT : explicitMaxHeight); } public function get focusManager():IFocusManager{ var _local1:DisplayObject; if (_focusManager){ return (_focusManager); }; _local1 = parent; while (_local1) { if ((_local1 is IFocusManagerContainer)){ return (IFocusManagerContainer(_local1).focusManager); }; _local1 = _local1.parent; }; return (null); } public function set styleName(_arg1:Object):void{ if (_styleName === _arg1){ return; }; _styleName = _arg1; if (inheritingStyles == UIComponent.STYLE_UNINITIALIZED){ return; }; regenerateStyleCache(true); initThemeColor(); styleChanged("styleName"); notifyStyleChangeInChildren("styleName", true); } public function get automationDelegate():Object{ return (_automationDelegate); } public function set explicitMaxHeight(_arg1:Number):void{ var _local2:IInvalidating; if (_explicitMaxHeight == _arg1){ return; }; _explicitMaxHeight = _arg1; invalidateSize(); _local2 = (parent as IInvalidating); if (_local2){ _local2.invalidateSize(); _local2.invalidateDisplayList(); }; dispatchEvent(new Event("explicitMaxHeightChanged")); } mx_internal function cancelAllCallLaters():void{ var _local1:ISystemManager; _local1 = systemManager; if (((_local1) && (_local1.stage))){ if (listeningForRender){ _local1.stage.removeEventListener(Event.RENDER, callLaterDispatcher); _local1.stage.removeEventListener(Event.ENTER_FRAME, callLaterDispatcher); listeningForRender = false; }; }; methodQueue.splice(0); } private function updateCompleteHandler(_arg1:Event):void{ UIComponentGlobals.layoutManager.removeEventListener(FlexEvent.UPDATE_COMPLETE, updateCompleteHandler); processEffectFinished(_endingEffectInstances); _endingEffectInstances = []; } public function styleChanged(_arg1:String):void{ if (((((!(_arg1)) || ((_arg1 == "styleName")))) || (StyleManager.isSizeInvalidatingStyle(_arg1)))){ invalidateSize(); }; if (((((!(_arg1)) || ((_arg1 == "styleName")))) || ((_arg1 == "themeColor")))){ initThemeColor(); }; invalidateDisplayList(); if ((parent is IInvalidating)){ if (StyleManager.isParentSizeInvalidatingStyle(_arg1)){ IInvalidating(parent).invalidateSize(); }; if (StyleManager.isParentDisplayListInvalidatingStyle(_arg1)){ IInvalidating(parent).invalidateDisplayList(); }; }; } final mx_internal function get $visible():Boolean{ return (super.visible); } public function drawRoundRect(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null, _arg6:Object=null, _arg7:Object=null, _arg8:Object=null, _arg9:String=null, _arg10:Array=null, _arg11:Object=null):void{ var _local12:Graphics; var _local13:Number; var _local14:Array; var _local15:Matrix; var _local16:Object; _local12 = graphics; if (((!(_arg3)) || (!(_arg4)))){ return; }; if (_arg6 !== null){ if ((_arg6 is Array)){ if ((_arg7 is Array)){ _local14 = (_arg7 as Array); } else { _local14 = [_arg7, _arg7]; }; if (!_arg10){ _arg10 = [0, 0xFF]; }; _local15 = null; if (_arg8){ if ((_arg8 is Matrix)){ _local15 = Matrix(_arg8); } else { _local15 = new Matrix(); if ((_arg8 is Number)){ _local15.createGradientBox(_arg3, _arg4, ((Number(_arg8) * Math.PI) / 180), _arg1, _arg2); } else { _local15.createGradientBox(_arg8.w, _arg8.h, _arg8.r, _arg8.x, _arg8.y); }; }; }; if (_arg9 == GradientType.RADIAL){ _local12.beginGradientFill(GradientType.RADIAL, (_arg6 as Array), _local14, _arg10, _local15); } else { _local12.beginGradientFill(GradientType.LINEAR, (_arg6 as Array), _local14, _arg10, _local15); }; } else { _local12.beginFill(Number(_arg6), Number(_arg7)); }; }; if (!_arg5){ _local12.drawRect(_arg1, _arg2, _arg3, _arg4); } else { if ((_arg5 is Number)){ _local13 = (Number(_arg5) * 2); _local12.drawRoundRect(_arg1, _arg2, _arg3, _arg4, _local13, _local13); } else { GraphicsUtil.drawRoundRectComplex(_local12, _arg1, _arg2, _arg3, _arg4, _arg5.tl, _arg5.tr, _arg5.bl, _arg5.br); }; }; if (_arg11){ _local16 = _arg11.r; if ((_local16 is Number)){ _local13 = (Number(_local16) * 2); _local12.drawRoundRect(_arg11.x, _arg11.y, _arg11.w, _arg11.h, _local13, _local13); } else { GraphicsUtil.drawRoundRectComplex(_local12, _arg11.x, _arg11.y, _arg11.w, _arg11.h, _local16.tl, _local16.tr, _local16.bl, _local16.br); }; }; if (_arg6 !== null){ _local12.endFill(); }; } public function move(_arg1:Number, _arg2:Number):void{ var _local3:Boolean; _local3 = false; if (_arg1 != super.x){ super.x = _arg1; dispatchEvent(new Event("xChanged")); _local3 = true; }; if (_arg2 != super.y){ super.y = _arg2; dispatchEvent(new Event("yChanged")); _local3 = true; }; if (_local3){ dispatchMoveEvent(); }; } public function set toolTip(_arg1:String):void{ ToolTipManager.registerToolTip(this, _arg1); _toolTip = _arg1; dispatchEvent(new Event("toolTipChanged")); } public function set repeaters(_arg1:Array):void{ _repeaters = _arg1; } public function get explicitMaxHeight():Number{ return (_explicitMaxHeight); } public function get styleName():Object{ return (_styleName); } private function loadResources():void{ resourceStateUndefined = packageResources.getString("stateUndefined"); } public function set explicitWidth(_arg1:Number):void{ var _local2:IInvalidating; if (_explicitWidth == _arg1){ return; }; if (!isNaN(_arg1)){ _percentWidth = NaN; }; _explicitWidth = _arg1; invalidateSize(); _local2 = (parent as IInvalidating); if (((_local2) && (includeInLayout))){ _local2.invalidateSize(); _local2.invalidateDisplayList(); }; dispatchEvent(new Event("explicitWidthChanged")); } public function get parentDocument():Object{ var _local1:IUIComponent; var _local2:ISystemManager; if (document == this){ _local1 = (parent as IUIComponent); if (_local1){ return (_local1.document); }; _local2 = (parent as ISystemManager); if (_local2){ return (_local2.document); }; return (null); //unresolved jump }; return (document); } public function set measuredMinHeight(_arg1:Number):void{ _measuredMinHeight = _arg1; } protected function childrenCreated():void{ invalidateProperties(); invalidateSize(); invalidateDisplayList(); } private function setBorderColorForErrorString():void{ var _local1:IFocusManager; var _local2:DisplayObject; if (((!(_errorString)) || ((_errorString.length == 0)))){ setStyle("borderColor", origBorderColor); saveBorderColor = true; } else { if (saveBorderColor){ saveBorderColor = false; origBorderColor = getStyle("borderColor"); }; setStyle("borderColor", getStyle("errorColor")); }; styleChanged("themeColor"); _local1 = focusManager; _local2 = (_local1) ? DisplayObject(_local1.getFocus()) : null; if (((((_local1) && (_local1.showFocusIndicator))) && ((_local2 == this)))){ drawFocus(true); }; } public function measureText(_arg1:String):TextLineMetrics{ return (determineTextFormatFromStyles().measureText(_arg1)); } public function get explicitWidth():Number{ return (_explicitWidth); } public function invalidateSize():void{ if (!invalidateSizeFlag){ invalidateSizeFlag = true; if (((parent) && (UIComponentGlobals.layoutManager))){ UIComponentGlobals.layoutManager.invalidateSize(this); }; }; } override public function set filters(_arg1:Array):void{ var _local2:int; var _local3:int; var _local4:IEventDispatcher; if (_filters){ _local2 = _filters.length; _local3 = 0; while (_local3 < _local2) { _local4 = (_filters[_local3] as IEventDispatcher); if (_local4){ _local4.removeEventListener("change", filterChangeHandler); }; _local3++; }; }; _filters = _arg1; if (_filters){ _local2 = _filters.length; _local3 = 0; while (_local3 < _local2) { _local4 = (_filters[_local3] as IEventDispatcher); if (_local4){ _local4.addEventListener("change", filterChangeHandler); }; _local3++; }; }; super.filters = _filters; } protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ } override public function get filters():Array{ return ((_filters) ? _filters : super.filters); } public static function resumeBackgroundProcessing():void{ var _local1:SystemManager; if (UIComponentGlobals.callLaterSuspendCount > 0){ UIComponentGlobals.callLaterSuspendCount--; if (UIComponentGlobals.callLaterSuspendCount == 0){ _local1 = SystemManagerGlobals.topLevelSystemManagers[0]; if (((_local1) && (_local1.stage))){ _local1.stage.invalidate(); }; }; }; } public static function suspendBackgroundProcessing():void{ UIComponentGlobals.callLaterSuspendCount++; } } }//package mx.core class MethodQueueElement { public var method:Function; public var args:Array; private function MethodQueueElement(_arg1:Function, _arg2:Array=null){ this.method = _arg1; this.args = _arg2; } }
Section 308
//UIComponentCachePolicy (mx.core.UIComponentCachePolicy) package mx.core { public final class UIComponentCachePolicy { public static const AUTO:String = "auto"; public static const ON:String = "on"; mx_internal static const VERSION:String = "2.0.1.0"; public static const OFF:String = "off"; } }//package mx.core
Section 309
//UIComponentDescriptor (mx.core.UIComponentDescriptor) package mx.core { public class UIComponentDescriptor extends ComponentDescriptor { public var effects:Array; public var stylesFactory:Function; mx_internal var instanceIndices:Array; mx_internal var repeaters:Array; mx_internal var repeaterIndices:Array; mx_internal static const VERSION:String = "2.0.1.0"; public function UIComponentDescriptor(_arg1:Object){ super(_arg1); } override public function toString():String{ return (("UIComponentDescriptor_" + id)); } } }//package mx.core
Section 310
//UIComponentGlobals (mx.core.UIComponentGlobals) package mx.core { import flash.display.*; import flash.geom.*; import mx.managers.*; public class UIComponentGlobals { mx_internal static var callLaterSuspendCount:int = 0; mx_internal static var layoutManager:ILayoutManager; mx_internal static var nextFocusObject:InteractiveObject; mx_internal static var designTime:Boolean = false; mx_internal static var tempMatrix:Matrix = new Matrix(); mx_internal static var callLaterDispatcherCount:int = 0; } }//package mx.core
Section 311
//UITextField (mx.core.UITextField) package mx.core { import mx.resources.*; import flash.system.*; import flash.display.*; import flash.events.*; import mx.styles.*; import mx.managers.*; import mx.automation.*; import flash.text.*; import flash.utils.*; import mx.utils.*; public class UITextField extends FlexTextField implements IAutomationObject, IIMESupport, IFlexModule, IInvalidating, ISimpleStyleClient, IToolTipManagerClient, IUIComponent { private var _initialized:Boolean;// = false private var invalidateDisplayListFlag:Boolean;// = true mx_internal var explicitColor:uint;// = 4294967295 private var _processedDescriptors:Boolean;// = true private var explicitHTMLText:String;// = null private var _owner:DisplayObjectContainer; mx_internal var _parent:DisplayObjectContainer; mx_internal var styleChangedFlag:Boolean;// = true private var _explicitWidth:Number; private var _enabled:Boolean;// = true private var cachedTextFormat:TextFormat; private var _automationDelegate:IAutomationObject; private var _automationName:String; private var _document:Object; private var _styleName:Object; private var _nestLevel:int;// = 0 private var _explicitHeight:Number; private var _toolTip:String; private var _nonInheritingStyles:Object; private var _moduleFactory:IFlexModuleFactory; private var _inheritingStyles:Object; private var _includeInLayout:Boolean;// = true private var _updateCompletePendingFlag:Boolean;// = false private var _imeMode:String;// = null private var _ignorePadding:Boolean;// = true mx_internal static const VERSION:String = "2.0.1.0"; mx_internal static const TEXT_HEIGHT_PADDING:int = 4; mx_internal static const TEXT_WIDTH_PADDING:int = 5; private static var packageResources:ResourceBundle = ResourceBundle.getResourceBundle("core", ApplicationDomain.currentDomain); private static var resourceTruncationIndicator:String; public function UITextField(){ invalidateDisplayListFlag = true; styleChangedFlag = true; explicitHTMLText = null; explicitColor = StyleManager.NOT_A_COLOR; _enabled = true; _ignorePadding = true; _imeMode = null; _includeInLayout = true; _inheritingStyles = UIComponent.STYLE_UNINITIALIZED; _initialized = false; _nestLevel = 0; _nonInheritingStyles = UIComponent.STYLE_UNINITIALIZED; _processedDescriptors = true; _updateCompletePendingFlag = false; super(); focusRect = false; selectable = false; tabEnabled = false; addEventListener(Event.CHANGE, changeHandler); addEventListener("textFieldStyleChange", textFieldStyleChangeHandler); } public function get nestLevel():int{ return (_nestLevel); } public function set nestLevel(_arg1:int):void{ if ((((_arg1 > 1)) && (!((_nestLevel == _arg1))))){ _nestLevel = _arg1; StyleProtoChain.initTextField(this); styleChangedFlag = true; validateNow(); }; } public function getExplicitOrMeasuredHeight():Number{ return ((isNaN(explicitHeight)) ? measuredHeight : explicitHeight); } public function get className():String{ var _local1:String; var _local2:int; _local1 = getQualifiedClassName(this); _local2 = _local1.indexOf("::"); if (_local2 != -1){ _local1 = _local1.substr((_local2 + 2)); }; return (_local1); } public function setColor(_arg1:uint):void{ explicitColor = _arg1; styleChangedFlag = true; invalidateDisplayListFlag = true; validateNow(); } public function get automationName():String{ if (_automationName){ return (_automationName); }; if (automationDelegate){ return (automationDelegate.automationName); }; return (""); } private function creatingSystemManager():ISystemManager{ return ((((!((moduleFactory == null))) && ((moduleFactory is ISystemManager)))) ? ISystemManager(moduleFactory) : systemManager); } public function set tweeningProperties(_arg1:Array):void{ } public function invalidateDisplayList():void{ invalidateDisplayListFlag = true; } public function get focusPane():Sprite{ return (null); } public function getExplicitOrMeasuredWidth():Number{ return ((isNaN(explicitWidth)) ? measuredWidth : explicitWidth); } public function getTextStyles():TextFormat{ var _local1:TextFormat; _local1 = new TextFormat(); _local1.align = getStyle("textAlign"); _local1.bold = (getStyle("fontWeight") == "bold"); if (enabled){ if (explicitColor == StyleManager.NOT_A_COLOR){ _local1.color = getStyle("color"); } else { _local1.color = explicitColor; }; } else { _local1.color = getStyle("disabledColor"); }; _local1.font = StringUtil.trimArrayElements(getStyle("fontFamily"), ","); _local1.indent = getStyle("textIndent"); _local1.italic = (getStyle("fontStyle") == "italic"); _local1.kerning = getStyle("kerning"); _local1.leading = getStyle("leading"); _local1.leftMargin = (ignorePadding) ? 0 : getStyle("paddingLeft"); _local1.letterSpacing = getStyle("letterSpacing"); _local1.rightMargin = (ignorePadding) ? 0 : getStyle("paddingRight"); _local1.size = getStyle("fontSize"); _local1.underline = (getStyle("textDecoration") == "underline"); cachedTextFormat = _local1; return (_local1); } public function get explicitHeight():Number{ return (_explicitHeight); } public function set automationName(_arg1:String):void{ _automationName = _arg1; } public function get percentWidth():Number{ return (NaN); } public function createAutomationIDPart(_arg1:IAutomationObject):Object{ return (null); } override public function get parent():DisplayObjectContainer{ return ((_parent) ? _parent : super.parent); } public function setActualSize(_arg1:Number, _arg2:Number):void{ if (width != _arg1){ width = _arg1; }; if (height != _arg2){ height = _arg2; }; } public function set focusPane(_arg1:Sprite):void{ } public function getAutomationChildAt(_arg1:int):IAutomationObject{ return (null); } public function get inheritingStyles():Object{ return (_inheritingStyles); } public function invalidateProperties():void{ } public function get explicitMinWidth():Number{ return (NaN); } public function set explicitHeight(_arg1:Number):void{ _explicitHeight = _arg1; } public function set showInAutomationHierarchy(_arg1:Boolean):void{ } public function set systemManager(_arg1:ISystemManager):void{ } public function get moduleFactory():IFlexModuleFactory{ return (_moduleFactory); } public function set percentWidth(_arg1:Number):void{ } public function get imeMode():String{ return (_imeMode); } public function get document():Object{ return (_document); } public function get explicitMaxWidth():Number{ return (NaN); } public function replayAutomatableEvent(_arg1:Event):Boolean{ if (automationDelegate){ return (automationDelegate.replayAutomatableEvent(_arg1)); }; return (false); } public function set owner(_arg1:DisplayObjectContainer):void{ _owner = _arg1; } public function set processedDescriptors(_arg1:Boolean):void{ _processedDescriptors = _arg1; } public function get includeInLayout():Boolean{ return (_includeInLayout); } private function changeHandler(_arg1:Event):void{ explicitHTMLText = null; } override public function setTextFormat(_arg1:TextFormat, _arg2:int=-1, _arg3:int=-1):void{ if (styleSheet){ return; }; super.setTextFormat(_arg1, _arg2, _arg3); dispatchEvent(new Event("textFormatChange")); } public function resolveAutomationIDPart(_arg1:Object):Array{ return ([]); } public function set inheritingStyles(_arg1:Object):void{ _inheritingStyles = _arg1; } public function setFocus():void{ systemManager.stage.focus = this; } public function set initialized(_arg1:Boolean):void{ _initialized = _arg1; } public function owns(_arg1:DisplayObject):Boolean{ return ((_arg1 == this)); } public function setVisible(_arg1:Boolean, _arg2:Boolean=false):void{ this.visible = _arg1; } public function get nonInheritingStyles():Object{ return (_nonInheritingStyles); } public function get isPopUp():Boolean{ return (false); } public function get percentHeight():Number{ return (NaN); } public function truncateToFit(_arg1:String=null):Boolean{ var _local2:String; var _local3:Number; var _local4:String; if (!_arg1){ _arg1 = resourceTruncationIndicator; }; validateNow(); _local2 = super.text; _local3 = width; if (((!((_local2 == ""))) && (((textWidth + TEXT_WIDTH_PADDING) > _local3)))){ var _local5 = _local2; super.text = _local5; _local4 = _local5; _local2.slice(0, Math.floor(((_local3 / (textWidth + TEXT_WIDTH_PADDING)) * _local2.length))); while ((((_local4.length > 1)) && (((textWidth + TEXT_WIDTH_PADDING) > _local3)))) { _local4 = _local4.slice(0, -1); super.text = (_local4 + _arg1); }; return (true); }; return (false); } public function validateNow():void{ var _local1:TextFormat; var _local2:ISystemManager; if (!parent){ return; }; if (((!(isNaN(explicitWidth))) && (!((super.width == explicitWidth))))){ super.width = ((explicitWidth)>4) ? explicitWidth : 4; }; if (((!(isNaN(explicitHeight))) && (!((super.height == explicitHeight))))){ super.height = explicitHeight; }; if (styleChangedFlag){ _local1 = getTextStyles(); _local2 = creatingSystemManager(); embedFonts = (_local1.font) ? ((!((_local2 == null))) && (_local2.isFontFaceEmbedded(_local1))) : getStyle("embedFonts"); antiAliasType = getStyle("fontAntiAliasType"); gridFitType = getStyle("fontGridFitType"); sharpness = getStyle("fontSharpness"); thickness = getStyle("fontThickness"); if (!styleSheet){ super.setTextFormat(_local1); defaultTextFormat = _local1; }; dispatchEvent(new Event("textFieldStyleChange")); }; styleChangedFlag = false; invalidateDisplayListFlag = false; } public function get ignorePadding():Boolean{ return (_ignorePadding); } public function get automationTabularData():Object{ return (null); } private function textFieldStyleChangeHandler(_arg1:Event):void{ if (explicitHTMLText != null){ super.htmlText = explicitHTMLText; }; } public function set moduleFactory(_arg1:IFlexModuleFactory):void{ _moduleFactory = _arg1; } public function set imeMode(_arg1:String):void{ _imeMode = _arg1; } public function get measuredMinHeight():Number{ return (0); } public function get minHeight():Number{ return (0); } public function get tweeningProperties():Array{ return (null); } public function set document(_arg1:Object):void{ _document = _arg1; } public function set updateCompletePendingFlag(_arg1:Boolean):void{ _updateCompletePendingFlag = _arg1; } public function get explicitMinHeight():Number{ return (NaN); } override public function set text(_arg1:String):void{ if (!_arg1){ _arg1 = ""; }; if (((!(isHTML)) && ((super.text == _arg1)))){ return; }; super.text = _arg1; explicitHTMLText = null; if (invalidateDisplayListFlag){ validateNow(); }; } public function get numAutomationChildren():int{ return (0); } public function setStyle(_arg1:String, _arg2):void{ } public function get showInAutomationHierarchy():Boolean{ return (true); } public function get systemManager():ISystemManager{ var _local1:DisplayObject; var _local2:IUIComponent; _local1 = parent; while (_local1) { _local2 = (_local1 as IUIComponent); if (_local2){ return (_local2.systemManager); }; _local1 = _local1.parent; }; return (null); } public function get baselinePosition():Number{ var _local1:TextLineMetrics; _local1 = getLineMetrics(0); return (((height - 4) - _local1.descent)); } public function set enabled(_arg1:Boolean):void{ mouseEnabled = _arg1; _enabled = _arg1; styleChanged("color"); } public function get minWidth():Number{ return (0); } public function get automationValue():Array{ if (automationDelegate){ return (automationDelegate.automationValue); }; return ([""]); } public function get measuredWidth():Number{ validateNow(); return ((textWidth + TEXT_WIDTH_PADDING)); } public function parentChanged(_arg1:DisplayObjectContainer):void{ if (!_arg1){ _parent = null; _nestLevel = 0; } else { if ((_arg1 is IStyleClient)){ _parent = _arg1; } else { if ((_arg1 is SystemManager)){ _parent = _arg1; } else { _parent = _arg1.parent; }; }; }; } public function get processedDescriptors():Boolean{ return (_processedDescriptors); } public function get owner():DisplayObjectContainer{ return ((_owner) ? _owner : parent); } public function get maxWidth():Number{ return (UIComponent.DEFAULT_MAX_WIDTH); } public function get initialized():Boolean{ return (_initialized); } public function set includeInLayout(_arg1:Boolean):void{ var _local2:IInvalidating; if (_includeInLayout != _arg1){ _includeInLayout = _arg1; _local2 = (parent as IInvalidating); if (_local2){ _local2.invalidateSize(); _local2.invalidateDisplayList(); }; }; } override public function set htmlText(_arg1:String):void{ if (!_arg1){ _arg1 = ""; }; if (((isHTML) && ((super.htmlText == _arg1)))){ return; }; if (((cachedTextFormat) && ((styleSheet == null)))){ defaultTextFormat = cachedTextFormat; }; super.htmlText = _arg1; explicitHTMLText = _arg1; if (invalidateDisplayListFlag){ validateNow(); }; } public function set measuredMinWidth(_arg1:Number):void{ } public function get updateCompletePendingFlag():Boolean{ return (_updateCompletePendingFlag); } public function get enabled():Boolean{ return (_enabled); } public function set nonInheritingStyles(_arg1:Object):void{ _nonInheritingStyles = _arg1; } public function set automationDelegate(_arg1:Object):void{ _automationDelegate = (_arg1 as IAutomationObject); } public function get measuredMinWidth():Number{ return (0); } public function set isPopUp(_arg1:Boolean):void{ } public function get measuredHeight():Number{ validateNow(); return ((textHeight + TEXT_HEIGHT_PADDING)); } public function getUITextFormat():UITextFormat{ var _local1:UITextFormat; validateNow(); _local1 = new UITextFormat(creatingSystemManager()); _local1.copyFrom(getTextFormat()); _local1.antiAliasType = antiAliasType; _local1.gridFitType = gridFitType; _local1.sharpness = sharpness; _local1.thickness = thickness; return (_local1); } public function initialize():void{ } public function set percentHeight(_arg1:Number):void{ } public function get maxHeight():Number{ return (UIComponent.DEFAULT_MAX_HEIGHT); } public function set styleName(_arg1:Object):void{ if (_styleName === _arg1){ return; }; _styleName = _arg1; if (parent){ StyleProtoChain.initTextField(this); styleChanged("styleName"); }; } public function get automationDelegate():Object{ return (_automationDelegate); } public function set ignorePadding(_arg1:Boolean):void{ _ignorePadding = _arg1; styleChanged(null); } public function set toolTip(_arg1:String):void{ ToolTipManager.registerToolTip(this, _arg1); _toolTip = _arg1; } public function styleChanged(_arg1:String):void{ styleChangedFlag = true; if (!invalidateDisplayListFlag){ invalidateDisplayListFlag = true; UIComponent(parent).callLater(validateNow); }; } private function get isHTML():Boolean{ return (!((explicitHTMLText == null))); } public function get explicitMaxHeight():Number{ return (NaN); } public function invalidateSize():void{ invalidateDisplayListFlag = true; } public function set explicitWidth(_arg1:Number):void{ _explicitWidth = _arg1; } public function move(_arg1:Number, _arg2:Number):void{ if (this.x != _arg1){ this.x = _arg1; }; if (this.y != _arg2){ this.y = _arg2; }; } public function get toolTip():String{ return (_toolTip); } public function set measuredMinHeight(_arg1:Number):void{ } public function get explicitWidth():Number{ return (_explicitWidth); } public function getStyle(_arg1:String){ if (StyleManager.inheritingStyles[_arg1]){ return ((inheritingStyles) ? inheritingStyles[_arg1] : IStyleClient(parent).getStyle(_arg1)); //unresolved jump }; return ((nonInheritingStyles) ? nonInheritingStyles[_arg1] : IStyleClient(parent).getStyle(_arg1)); } public function get styleName():Object{ return (_styleName); } private static function loadResources():void{ resourceTruncationIndicator = packageResources.getString("truncationIndicator"); } loadResources(); } }//package mx.core
Section 312
//UITextFormat (mx.core.UITextFormat) package mx.core { import mx.managers.*; import flash.text.*; public class UITextFormat extends TextFormat { public var sharpness:Number; public var gridFitType:String; public var antiAliasType:String; public var thickness:Number; private var systemManager:ISystemManager; mx_internal static const VERSION:String = "2.0.1.0"; private static var measurementTextField:TextField; public function UITextFormat(_arg1:ISystemManager, _arg2:String=null, _arg3:Object=null, _arg4:Object=null, _arg5:Object=null, _arg6:Object=null, _arg7:Object=null, _arg8:String=null, _arg9:String=null, _arg10:String=null, _arg11:Object=null, _arg12:Object=null, _arg13:Object=null, _arg14:Object=null){ this.systemManager = _arg1; super(_arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10, _arg11, _arg12, _arg13, _arg14); } public function measureText(_arg1:String):TextLineMetrics{ return (measure(_arg1, false)); } mx_internal function copyFrom(_arg1:TextFormat):void{ font = _arg1.font; size = _arg1.size; color = _arg1.color; bold = _arg1.bold; italic = _arg1.italic; underline = _arg1.underline; url = _arg1.url; target = _arg1.target; align = _arg1.align; leftMargin = _arg1.leftMargin; rightMargin = _arg1.rightMargin; indent = _arg1.indent; leading = _arg1.leading; } public function measureHTMLText(_arg1:String):TextLineMetrics{ return (measure(_arg1, true)); } private function measure(_arg1:String, _arg2:Boolean):TextLineMetrics{ var _local3:ISystemManager; var _local4:TextLineMetrics; if (!_arg1){ _arg1 = ""; }; if (!measurementTextField){ measurementTextField = new TextField(); }; if (_arg2){ measurementTextField.htmlText = ""; } else { measurementTextField.text = ""; }; measurementTextField.defaultTextFormat = this; _local3 = systemManager; if (font){ measurementTextField.embedFonts = ((!((_local3 == null))) && (_local3.isFontFaceEmbedded(this))); } else { measurementTextField.embedFonts = false; }; measurementTextField.antiAliasType = antiAliasType; measurementTextField.gridFitType = gridFitType; measurementTextField.sharpness = sharpness; measurementTextField.thickness = thickness; if (_arg2){ measurementTextField.htmlText = _arg1; } else { measurementTextField.text = _arg1; }; _local4 = measurementTextField.getLineMetrics(0); _local4.width = Math.ceil(_local4.width); _local4.height = Math.ceil(_local4.height); return (_local4); } } }//package mx.core
Section 313
//AddRemoveEffectTargetFilter (mx.effects.effectClasses.AddRemoveEffectTargetFilter) package mx.effects.effectClasses { import mx.effects.*; public class AddRemoveEffectTargetFilter extends EffectTargetFilter { public var add:Boolean;// = true mx_internal static const VERSION:String = "2.0.1.0"; public function AddRemoveEffectTargetFilter(){ add = true; super(); filterProperties = ["parent"]; } override protected function defaultFilterFunction(_arg1:Array, _arg2:Object):Boolean{ var _local3:int; var _local4:int; var _local5:PropertyChanges; _local3 = _arg1.length; _local4 = 0; while (_local4 < _local3) { _local5 = _arg1[_local4]; if (_local5.target == _arg2){ if (add){ return ((((_local5.start["parent"] == null)) && (!((_local5.end["parent"] == null))))); }; return (((!((_local5.start["parent"] == null))) && ((_local5.end["parent"] == null)))); }; _local4++; }; return (false); } } }//package mx.effects.effectClasses
Section 314
//HideShowEffectTargetFilter (mx.effects.effectClasses.HideShowEffectTargetFilter) package mx.effects.effectClasses { import mx.effects.*; public class HideShowEffectTargetFilter extends EffectTargetFilter { public var show:Boolean;// = true mx_internal static const VERSION:String = "2.0.1.0"; public function HideShowEffectTargetFilter(){ show = true; super(); filterProperties = ["visible"]; } override protected function defaultFilterFunction(_arg1:Array, _arg2:Object):Boolean{ var _local3:int; var _local4:int; var _local5:PropertyChanges; _local3 = _arg1.length; _local4 = 0; while (_local4 < _local3) { _local5 = _arg1[_local4]; if (_local5.target == _arg2){ return ((_local5.end["visible"] == show)); }; _local4++; }; return (false); } } }//package mx.effects.effectClasses
Section 315
//PropertyChanges (mx.effects.effectClasses.PropertyChanges) package mx.effects.effectClasses { import mx.core.*; public class PropertyChanges { public var start:Object; public var target:IUIComponent; public var end:Object; mx_internal static const VERSION:String = "2.0.1.0"; public function PropertyChanges(_arg1:IUIComponent){ end = {}; start = {}; super(); this.target = _arg1; } } }//package mx.effects.effectClasses
Section 316
//TweenEffectInstance (mx.effects.effectClasses.TweenEffectInstance) package mx.effects.effectClasses { import mx.core.*; import mx.events.*; import mx.effects.*; public class TweenEffectInstance extends EffectInstance { mx_internal var needToLayout:Boolean;// = false private var _seekTime:Number;// = 0 public var tween:Tween; public var easingFunction:Function; mx_internal static const VERSION:String = "2.0.1.0"; public function TweenEffectInstance(_arg1:Object){ needToLayout = false; _seekTime = 0; super(_arg1); } override public function get playheadTime():Number{ if (tween){ return ((tween.playheadTime + super.playheadTime)); }; return (0); } override mx_internal function set playReversed(_arg1:Boolean):void{ super.playReversed = _arg1; if (tween){ tween.playReversed = _arg1; }; } override public function resume():void{ super.resume(); if (tween){ tween.resume(); }; } public function onTweenUpdate(_arg1:Object):void{ } mx_internal function applyTweenStartValues():void{ if (duration > 0){ onTweenUpdate(tween.getCurrentValue(0)); }; } protected function createTween(_arg1:Object, _arg2:Object, _arg3:Object, _arg4:Number=-1, _arg5:Number=-1):Tween{ var _local6:Tween; _local6 = new Tween(_arg1, _arg2, _arg3, _arg4, _arg5); _local6.addEventListener(TweenEvent.TWEEN_START, tweenEventHandler); _local6.addEventListener(TweenEvent.TWEEN_UPDATE, tweenEventHandler); _local6.addEventListener(TweenEvent.TWEEN_END, tweenEventHandler); if (easingFunction != null){ _local6.easingFunction = easingFunction; }; if (_seekTime > 0){ _local6.seek(_seekTime); }; _local6.playReversed = playReversed; return (_local6); } override public function end():void{ stopRepeat = true; if (delayTimer){ delayTimer.reset(); }; if (tween){ tween.endTween(); tween = null; }; } override public function reverse():void{ super.reverse(); if (tween){ tween.reverse(); }; super.playReversed = !(playReversed); } private function tweenEventHandler(_arg1:TweenEvent):void{ dispatchEvent(_arg1); } public function seek(_arg1:Number):void{ if (tween){ tween.seek(_arg1); } else { _seekTime = _arg1; }; } override public function pause():void{ super.pause(); if (tween){ tween.pause(); }; } public function onTweenEnd(_arg1:Object):void{ onTweenUpdate(_arg1); tween = null; if (needToLayout){ UIComponentGlobals.layoutManager.validateNow(); }; finishRepeat(); } } }//package mx.effects.effectClasses
Section 317
//ZoomInstance (mx.effects.effectClasses.ZoomInstance) package mx.effects.effectClasses { import mx.core.*; import flash.events.*; import mx.events.*; import mx.effects.*; public class ZoomInstance extends TweenEffectInstance { private var show:Boolean;// = true private var origPercentHeight:Number; public var zoomWidthFrom:Number; private var origX:Number; private var origY:Number; private var scaledOriginY:Number; private var scaledOriginX:Number; private var origPercentWidth:Number; public var zoomWidthTo:Number; public var zoomHeightFrom:Number; private var newX:Number; private var newY:Number; public var captureRollEvents:Boolean; private var origScaleX:Number; private var origScaleY:Number; public var originX:Number; public var originY:Number; public var zoomHeightTo:Number; private var _mouseHasMoved:Boolean;// = false mx_internal static const VERSION:String = "2.0.1.0"; public function ZoomInstance(_arg1:Object){ _mouseHasMoved = false; show = true; super(_arg1); } override public function finishEffect():void{ if (captureRollEvents){ target.removeEventListener(MouseEvent.ROLL_OVER, mouseEventHandler, false); target.removeEventListener(MouseEvent.ROLL_OUT, mouseEventHandler, false); target.removeEventListener(MouseEvent.MOUSE_MOVE, mouseEventHandler, false); }; super.finishEffect(); } private function getScaleFromWidth(_arg1:Number):Number{ return ((_arg1 / (target.width / Math.abs(target.scaleX)))); } private function getScaleFromHeight(_arg1:Number):Number{ return ((_arg1 / (target.height / Math.abs(target.scaleY)))); } override public function play():void{ super.play(); applyPropertyChanges(); if (((((((isNaN(zoomWidthFrom)) && (isNaN(zoomWidthTo)))) && (isNaN(zoomHeightFrom)))) && (isNaN(zoomHeightTo)))){ if (show){ zoomWidthFrom = (zoomHeightFrom = 0); zoomWidthTo = target.scaleX; zoomHeightTo = target.scaleY; } else { zoomWidthFrom = target.scaleX; zoomHeightFrom = target.scaleY; zoomWidthTo = (zoomHeightTo = 0); }; } else { if (((isNaN(zoomWidthFrom)) && (isNaN(zoomWidthTo)))){ zoomWidthFrom = (zoomWidthTo = target.scaleX); } else { if (((isNaN(zoomHeightFrom)) && (isNaN(zoomHeightTo)))){ zoomHeightFrom = (zoomHeightTo = target.scaleY); }; }; if (isNaN(zoomWidthFrom)){ zoomWidthFrom = target.scaleX; } else { if (isNaN(zoomWidthTo)){ zoomWidthTo = ((zoomWidthFrom)==1) ? 0 : 1; }; }; if (isNaN(zoomHeightFrom)){ zoomHeightFrom = target.scaleY; } else { if (isNaN(zoomHeightTo)){ zoomHeightTo = ((zoomHeightFrom)==1) ? 0 : 1; }; }; }; if (zoomWidthFrom < 0.01){ zoomWidthFrom = 0.01; }; if (zoomWidthTo < 0.01){ zoomWidthTo = 0.01; }; if (zoomHeightFrom < 0.01){ zoomHeightFrom = 0.01; }; if (zoomHeightTo < 0.01){ zoomHeightTo = 0.01; }; origScaleX = target.scaleX; origScaleY = target.scaleY; newX = (origX = target.x); newY = (origY = target.y); if (isNaN(originX)){ scaledOriginX = (target.width / 2); } else { scaledOriginX = (originX * origScaleX); }; if (isNaN(originY)){ scaledOriginY = (target.height / 2); } else { scaledOriginY = (originY * origScaleY); }; scaledOriginX = Number(scaledOriginX.toFixed(1)); scaledOriginY = Number(scaledOriginY.toFixed(1)); origPercentWidth = target.percentWidth; if (!isNaN(origPercentWidth)){ target.width = target.width; }; origPercentHeight = target.percentHeight; if (!isNaN(origPercentHeight)){ target.height = target.height; }; tween = createTween(this, [zoomWidthFrom, zoomHeightFrom], [zoomWidthTo, zoomHeightTo], duration); if (captureRollEvents){ target.addEventListener(MouseEvent.ROLL_OVER, mouseEventHandler, false); target.addEventListener(MouseEvent.ROLL_OUT, mouseEventHandler, false); target.addEventListener(MouseEvent.MOUSE_MOVE, mouseEventHandler, false); }; } override public function onTweenEnd(_arg1:Object):void{ var _local2:Number; var _local3:Number; if (!isNaN(origPercentWidth)){ _local2 = target.width; target.percentWidth = origPercentWidth; if (((target.parent) && ((target.parent.autoLayout == false)))){ target._width = _local2; }; }; if (!isNaN(origPercentHeight)){ _local3 = target.height; target.percentHeight = origPercentHeight; if (((target.parent) && ((target.parent.autoLayout == false)))){ target._height = _local3; }; }; super.onTweenEnd(_arg1); if (mx_internal::hideOnEffectEnd){ EffectManager.suspendEventHandling(); target.scaleX = origScaleX; target.scaleY = origScaleY; target.move(origX, origY); EffectManager.resumeEventHandling(); }; } private function mouseEventHandler(_arg1:MouseEvent):void{ if (_arg1.type == MouseEvent.MOUSE_MOVE){ _mouseHasMoved = true; } else { if ((((_arg1.type == MouseEvent.ROLL_OUT)) || ((_arg1.type == MouseEvent.ROLL_OVER)))){ if (!_mouseHasMoved){ _arg1.stopImmediatePropagation(); }; _mouseHasMoved = false; }; }; } override public function onTweenUpdate(_arg1:Object):void{ var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; EffectManager.suspendEventHandling(); if (Math.abs((newX - Number(target.x.toFixed(1)))) > 0.1){ origX = (origX + (Number(target.x.toFixed(1)) - newX)); }; if (Math.abs((newY - Number(target.y.toFixed(1)))) > 0.1){ origY = (origY + (Number(target.y.toFixed(1)) - newY)); }; target.scaleX = _arg1[0]; target.scaleY = _arg1[1]; _local2 = (_arg1[0] / origScaleX); _local3 = (_arg1[1] / origScaleY); _local4 = (scaledOriginX * _local2); _local5 = (scaledOriginY * _local3); newX = ((scaledOriginX - _local4) + origX); newY = ((scaledOriginY - _local5) + origY); newX = Number(newX.toFixed(1)); newY = Number(newY.toFixed(1)); target.move(newX, newY); tween.mx_internal::needToLayout = true; EffectManager.resumeEventHandling(); } override public function initEffect(_arg1:Event):void{ super.initEffect(_arg1); if ((((_arg1.type == FlexEvent.HIDE)) || ((_arg1.type == Event.REMOVED)))){ show = false; }; } private function applyPropertyChanges():void{ var _local1:PropertyChanges; var _local2:Boolean; var _local3:Boolean; _local1 = propertyChanges; if (_local1){ _local2 = false; _local3 = false; if (_local1.end["scaleX"] !== undefined){ zoomWidthFrom = (isNaN(zoomWidthFrom)) ? target.scaleX : zoomWidthFrom; zoomWidthTo = (isNaN(zoomWidthTo)) ? _local1.end["scaleX"] : zoomWidthTo; _local3 = true; }; if (_local1.end["scaleY"] !== undefined){ zoomHeightFrom = (isNaN(zoomHeightFrom)) ? target.scaleY : zoomHeightFrom; zoomHeightTo = (isNaN(zoomHeightTo)) ? _local1.end["scaleY"] : zoomHeightTo; _local3 = true; }; if (_local3){ return; }; if (_local1.end["width"] !== undefined){ zoomWidthFrom = (isNaN(zoomWidthFrom)) ? getScaleFromWidth(target.width) : zoomWidthFrom; zoomWidthTo = (isNaN(zoomWidthTo)) ? getScaleFromWidth(_local1.end["width"]) : zoomWidthTo; _local2 = true; }; if (_local1.end["height"] !== undefined){ zoomHeightFrom = (isNaN(zoomHeightFrom)) ? getScaleFromHeight(target.height) : zoomHeightFrom; zoomHeightTo = (isNaN(zoomHeightTo)) ? getScaleFromHeight(_local1.end["height"]) : zoomHeightTo; _local2 = true; }; if (_local2){ return; }; if (_local1.end["visible"] !== undefined){ show = _local1.end["visible"]; }; }; } } }//package mx.effects.effectClasses
Section 318
//Effect (mx.effects.Effect) package mx.effects { import mx.core.*; import flash.events.*; import mx.events.*; import mx.managers.*; import mx.effects.effectClasses.*; import flash.utils.*; public class Effect extends EventDispatcher { mx_internal var applyActualDimensions:Boolean;// = true private var _instances:Array; private var _filter:String; private var _customFilter:EffectTargetFilter; mx_internal var durationExplicitlySet:Boolean;// = false public var repeatCount:int;// = 1 public var repeatDelay:int;// = 0 public var suspendBackgroundProcessing:Boolean;// = false public var startDelay:int;// = 0 private var _targets:Array; mx_internal var propertyChangesArray:Array; private var _relevantProperties:Array; mx_internal var filterObject:EffectTargetFilter; private var _callValidateNow:Boolean;// = false mx_internal var initEvent:Event; public var instanceClass:Class; private var _duration:Number;// = 500 private var _relevantStyles:Array; private var isPaused:Boolean;// = false mx_internal static const VERSION:String = "2.0.1.0"; public function Effect(_arg1:Object=null){ _instances = []; _callValidateNow = false; isPaused = false; applyActualDimensions = true; _duration = 500; durationExplicitlySet = false; _relevantStyles = []; instanceClass = IEffectInstance; repeatCount = 1; repeatDelay = 0; startDelay = 0; suspendBackgroundProcessing = false; _targets = []; super(); this.target = _arg1; } public function set targets(_arg1:Array):void{ var _local2:int; var _local3:int; _local2 = _arg1.length; _local3 = (_local2 - 1); while (_local3 > 0) { if (_arg1[_local3] == null){ _arg1.splice(_local3, 1); }; _local3--; }; _targets = _arg1; } public function end(_arg1:IEffectInstance=null):void{ var _local2:int; var _local3:int; var _local4:IEffectInstance; if (_arg1){ _arg1.end(); } else { _local2 = _instances.length; _local3 = _local2; while (_local3 >= 0) { _local4 = IEffectInstance(_instances[_local3]); if (_local4){ _local4.end(); }; _local3--; }; }; } protected function filterInstance(_arg1:Array, _arg2:Object):Boolean{ if (filterObject){ return (filterObject.filterFunction(_arg1, _arg2)); }; return (true); } public function get target():Object{ if (_targets.length > 0){ return (_targets[0]); }; return (null); } public function get duration():Number{ return (_duration); } protected function getValueFromTarget(_arg1:Object, _arg2:String){ if ((_arg2 in _arg1)){ return (_arg1[_arg2]); }; return (undefined); } public function set customFilter(_arg1:EffectTargetFilter):void{ _customFilter = _arg1; filterObject = _arg1; } public function get targets():Array{ return (_targets); } public function captureStartValues():void{ var _local1:int; var _local2:int; if (targets.length > 0){ propertyChangesArray = []; _callValidateNow = true; _local1 = targets.length; _local2 = 0; while (_local2 < _local1) { propertyChangesArray.push(new PropertyChanges(targets[_local2])); _local2++; }; propertyChangesArray = captureValues(propertyChangesArray, true); }; } public function set target(_arg1:Object):void{ _targets.splice(0); if (_arg1){ _targets[0] = _arg1; }; } public function get className():String{ var _local1:String; var _local2:int; _local1 = getQualifiedClassName(this); _local2 = _local1.indexOf("::"); if (_local2 != -1){ _local1 = _local1.substr((_local2 + 2)); }; return (_local1); } public function get isPlaying():Boolean{ return (((_instances) && ((_instances.length > 0)))); } mx_internal function captureValues(_arg1:Array, _arg2:Boolean):Array{ var _local3:Array; var _local4:Object; var _local5:Object; var _local6:int; var _local7:int; var _local8:int; var _local9:int; var _local10:Array; _local3 = (filterObject) ? mergeArrays(relevantProperties, filterObject.filterProperties) : relevantProperties; if (((_local3) && ((_local3.length > 0)))){ _local6 = _arg1.length; _local7 = 0; while (_local7 < _local6) { _local5 = _arg1[_local7].target; _local4 = (_arg2) ? _arg1[_local7].start : _arg1[_local7].end; _local8 = _local3.length; _local9 = 0; while (_local9 < _local8) { _local4[_local3[_local9]] = getValueFromTarget(_local5, _local3[_local9]); _local9++; }; _local7++; }; }; _local10 = (filterObject) ? mergeArrays(relevantStyles, filterObject.filterStyles) : relevantStyles; if (((_local10) && ((_local10.length > 0)))){ _local6 = _arg1.length; _local7 = 0; while (_local7 < _local6) { _local5 = _arg1[_local7].target; _local4 = (_arg2) ? _arg1[_local7].start : _arg1[_local7].end; _local8 = _local10.length; _local9 = 0; while (_local9 < _local8) { _local4[_local10[_local9]] = _local5.getStyle(_local10[_local9]); _local9++; }; _local7++; }; }; return (_arg1); } public function set duration(_arg1:Number):void{ durationExplicitlySet = true; _duration = _arg1; } public function get relevantProperties():Array{ if (_relevantProperties){ return (_relevantProperties); }; return (getAffectedProperties()); } public function createInstance(_arg1:Object=null):IEffectInstance{ var _local2:IEffectInstance; var _local3:PropertyChanges; var _local4:Boolean; var _local5:Boolean; var _local6:int; var _local7:int; if (!_arg1){ _arg1 = this.target; }; _local2 = null; _local3 = null; _local4 = true; _local5 = false; if (propertyChangesArray){ _local5 = true; _local4 = filterInstance(propertyChangesArray, _arg1); }; if (_local4){ _local2 = IEffectInstance(new instanceClass(_arg1)); initInstance(_local2); if (_local5){ _local6 = propertyChangesArray.length; _local7 = 0; while (_local7 < _local6) { if (propertyChangesArray[_local7].target == _arg1){ _local2.propertyChanges = propertyChangesArray[_local7]; }; _local7++; }; }; EventDispatcher(_local2).addEventListener(EffectEvent.EFFECT_START, effectStartHandler); EventDispatcher(_local2).addEventListener(EffectEvent.EFFECT_END, effectEndHandler); _instances.push(_local2); if (initEvent){ _local2.initEffect(initEvent); }; }; return (_local2); } protected function applyValueToTarget(_arg1:Object, _arg2:String, _arg3, _arg4:Object):void{ var target = _arg1; var property = _arg2; var value = _arg3; var props = _arg4; if ((property in target)){ try { if (((((applyActualDimensions) && ((target is IFlexDisplayObject)))) && ((property == "height")))){ target.setActualSize(target.width, value); } else { if (((((applyActualDimensions) && ((target is IFlexDisplayObject)))) && ((property == "width")))){ target.setActualSize(value, target.height); } else { target[property] = value; }; }; } catch(e:Error) { }; }; } protected function effectStartHandler(_arg1:EffectEvent):void{ dispatchEvent(_arg1); } public function play(_arg1:Array=null, _arg2:Boolean=false):Array{ var _local3:Array; var _local4:int; var _local5:int; var _local6:IEffectInstance; if ((((_arg1 == null)) && (!((propertyChangesArray == null))))){ if (_callValidateNow){ LayoutManager.getInstance().validateNow(); }; propertyChangesArray = captureValues(propertyChangesArray, false); propertyChangesArray = stripUnchangedValues(propertyChangesArray); applyStartValues(propertyChangesArray, this.targets); }; _local3 = createInstances(_arg1); _local4 = _local3.length; _local5 = 0; while (_local5 < _local4) { _local6 = IEffectInstance(_local3[_local5]); Object(_local6).playReversed = _arg2; _local6.startEffect(); _local5++; }; return (_local3); } public function resume():void{ var _local1:int; var _local2:int; if (((isPlaying) && (isPaused))){ isPaused = false; _local1 = _instances.length; _local2 = 0; while (_local2 < _local1) { IEffectInstance(_instances[_local2]).resume(); _local2++; }; }; } public function set relevantStyles(_arg1:Array):void{ _relevantStyles = _arg1; } public function getAffectedProperties():Array{ return ([]); } protected function initInstance(_arg1:IEffectInstance):void{ _arg1.duration = duration; Object(_arg1).durationExplicitlySet = durationExplicitlySet; _arg1.effect = this; _arg1.repeatCount = repeatCount; _arg1.repeatDelay = repeatDelay; _arg1.startDelay = startDelay; _arg1.suspendBackgroundProcessing = suspendBackgroundProcessing; } public function get customFilter():EffectTargetFilter{ return (_customFilter); } mx_internal function applyStartValues(_arg1:Array, _arg2:Array):void{ var _local3:Array; var _local4:int; var _local5:int; var _local6:int; var _local7:int; var _local8:Object; var _local9:Boolean; _local3 = relevantProperties; _local4 = _arg1.length; _local5 = 0; while (_local5 < _local4) { _local8 = _arg1[_local5].target; _local9 = false; _local6 = _arg2.length; _local7 = 0; while (_local7 < _local6) { if (_arg2[_local7] == _local8){ _local9 = filterInstance(_arg1, _local8); break; }; _local7++; }; if (_local9){ _local6 = _local3.length; _local7 = 0; while (_local7 < _local6) { if ((((_local3[_local7] in _arg1[_local5].start)) && ((_local3[_local7] in _local8)))){ applyValueToTarget(_local8, _local3[_local7], _arg1[_local5].start[_local3[_local7]], _arg1[_local5].start); }; _local7++; }; _local6 = relevantStyles.length; _local7 = 0; while (_local7 < _local6) { if ((relevantStyles[_local7] in _arg1[_local5].start)){ _local8.setStyle(relevantStyles[_local7], _arg1[_local5].start[relevantStyles[_local7]]); }; _local7++; }; }; _local5++; }; } public function get relevantStyles():Array{ return (_relevantStyles); } public function set relevantProperties(_arg1:Array):void{ _relevantProperties = _arg1; } public function createInstances(_arg1:Array=null):Array{ var _local2:Array; var _local3:int; var _local4:int; var _local5:IEffectInstance; if (!_arg1){ _arg1 = this.targets; }; _local2 = []; _local3 = _arg1.length; _local4 = 0; while (_local4 < _local3) { _local5 = createInstance(_arg1[_local4]); if (_local5){ _local2.push(_local5); }; _local4++; }; initEvent = null; return (_local2); } protected function effectEndHandler(_arg1:EffectEvent):void{ var _local2:IEffectInstance; var _local3:int; var _local4:int; _local2 = IEffectInstance(_arg1.effectInstance); EventDispatcher(_local2).removeEventListener(EffectEvent.EFFECT_START, effectStartHandler); EventDispatcher(_local2).removeEventListener(EffectEvent.EFFECT_END, effectEndHandler); _local3 = _instances.length; _local4 = 0; while (_local4 < _local3) { if (_instances[_local4] === _local2){ _instances.splice(_local4, 1); }; _local4++; }; dispatchEvent(_arg1); } public function reverse():void{ var _local1:int; var _local2:int; if (isPlaying){ _local1 = _instances.length; _local2 = 0; while (_local2 < _local1) { IEffectInstance(_instances[_local2]).reverse(); _local2++; }; }; } public function set filter(_arg1:String):void{ if (!customFilter){ _filter = _arg1; switch (_arg1){ case "add": case "remove": filterObject = new AddRemoveEffectTargetFilter(); AddRemoveEffectTargetFilter(filterObject).add = (_arg1 == "add"); break; case "hide": case "show": filterObject = new HideShowEffectTargetFilter(); HideShowEffectTargetFilter(filterObject).show = (_arg1 == "show"); break; case "move": filterObject = new EffectTargetFilter(); filterObject.filterProperties = ["x", "y"]; break; case "resize": filterObject = new EffectTargetFilter(); filterObject.filterProperties = ["width", "height"]; break; default: filterObject = null; break; }; }; } public function pause():void{ var _local1:int; var _local2:int; if (((isPlaying) && (!(isPaused)))){ isPaused = true; _local1 = _instances.length; _local2 = 0; while (_local2 < _local1) { IEffectInstance(_instances[_local2]).pause(); _local2++; }; }; } public function get filter():String{ return (_filter); } private static function mergeArrays(_arg1:Array, _arg2:Array):Array{ var _local3:int; var _local4:Boolean; var _local5:int; if (_arg2){ _local3 = 0; while (_local3 < _arg2.length) { _local4 = true; _local5 = 0; while (_local5 < _arg1.length) { if (_arg1[_local5] == _arg2[_local3]){ _local4 = false; break; }; _local5++; }; if (_local4){ _arg1.push(_arg2[_local3]); }; _local3++; }; }; return (_arg1); } private static function stripUnchangedValues(_arg1:Array):Array{ var _local2:int; var _local3:Object; _local2 = 0; while (_local2 < _arg1.length) { for (_local3 in _arg1[_local2].start) { if ((((_arg1[_local2].start[_local3] == _arg1[_local2].end[_local3])) || ((((((((typeof(_arg1[_local2].start[_local3]) == "number")) && ((typeof(_arg1[_local2].end[_local3]) == "number")))) && (isNaN(_arg1[_local2].start[_local3])))) && (isNaN(_arg1[_local2].end[_local3])))))){ delete _arg1[_local2].start[_local3]; delete _arg1[_local2].end[_local3]; }; }; _local2++; }; return (_arg1); } } }//package mx.effects
Section 319
//EffectInstance (mx.effects.EffectInstance) package mx.effects { import mx.core.*; import flash.events.*; import mx.events.*; import mx.effects.effectClasses.*; import flash.utils.*; public class EffectInstance extends EventDispatcher implements IEffectInstance { private var delayStartTime:Number;// = 0 private var playCount:int;// = 0 mx_internal var stopRepeat:Boolean;// = false private var _repeatCount:int; private var _suspendBackgroundProcessing:Boolean;// = false mx_internal var delayTimer:Timer; private var _triggerEvent:Event; mx_internal var parentCompositeEffectInstance:EffectInstance; mx_internal var durationExplicitlySet:Boolean;// = false private var _effect:Effect; private var _target:Object; mx_internal var hideOnEffectEnd:Boolean;// = false private var _startDelay:int;// = 0 private var delayElapsedTime:Number;// = 0 private var _repeatDelay:int;// = 0 private var _propertyChanges:PropertyChanges; private var _duration:Number;// = 500 private var _playReversed:Boolean; mx_internal static const VERSION:String = "2.0.1.0"; public function EffectInstance(_arg1:Object){ delayStartTime = 0; delayElapsedTime = 0; durationExplicitlySet = false; hideOnEffectEnd = false; playCount = 0; stopRepeat = false; _duration = 500; _repeatDelay = 0; _startDelay = 0; _suspendBackgroundProcessing = false; super(); this.target = _arg1; } public function get playheadTime():Number{ return ((((Math.max((playCount - 1), 0) * duration) + (Math.max((playCount - 2), 0) * repeatDelay)) + (playReversed) ? 0 : startDelay)); } public function finishEffect():void{ playCount = 0; dispatchEvent(new EffectEvent(EffectEvent.EFFECT_END, false, false, this)); if (target){ target.dispatchEvent(new EffectEvent(EffectEvent.EFFECT_END, false, false, this)); }; if ((target is IUIComponent)){ Object(target).effectFinished(this); }; } public function finishRepeat():void{ if (((((!(stopRepeat)) && (!((playCount == 0))))) && ((((playCount < repeatCount)) || ((repeatCount == 0)))))){ if (repeatDelay > 0){ delayTimer = new Timer(repeatDelay, 1); delayStartTime = getTimer(); delayTimer.addEventListener(TimerEvent.TIMER, delayTimerHandler); delayTimer.start(); } else { play(); }; } else { finishEffect(); }; } mx_internal function get playReversed():Boolean{ return (_playReversed); } public function set effect(_arg1:Effect):void{ _effect = _arg1; } public function get className():String{ var _local1:String; var _local2:int; _local1 = getQualifiedClassName(this); _local2 = _local1.indexOf("::"); if (_local2 != -1){ _local1 = _local1.substr((_local2 + 2)); }; return (_local1); } public function set duration(_arg1:Number):void{ durationExplicitlySet = true; _duration = _arg1; } mx_internal function set playReversed(_arg1:Boolean):void{ _playReversed = _arg1; } public function resume():void{ if (((((delayTimer) && (!(delayTimer.running)))) && (!(isNaN(delayElapsedTime))))){ delayTimer.delay = (playReversed) ? delayElapsedTime : (delayTimer.delay - delayElapsedTime); delayTimer.start(); }; } public function get propertyChanges():PropertyChanges{ return (_propertyChanges); } public function set target(_arg1:Object):void{ _target = _arg1; } public function get repeatCount():int{ return (_repeatCount); } mx_internal function playWithNoDuration():void{ duration = 0; repeatCount = 1; repeatDelay = 0; startDelay = 0; startEffect(); } public function get startDelay():int{ return (_startDelay); } mx_internal function get actualDuration():Number{ var _local1:Number; _local1 = NaN; if (repeatCount > 0){ _local1 = (((duration * repeatCount) + ((repeatDelay * repeatCount) - 1)) + startDelay); }; return (_local1); } public function get suspendBackgroundProcessing():Boolean{ return (_suspendBackgroundProcessing); } public function play():void{ playCount++; dispatchEvent(new EffectEvent(EffectEvent.EFFECT_START, false, false, this)); if (target){ target.dispatchEvent(new EffectEvent(EffectEvent.EFFECT_START, false, false, this)); }; } public function set repeatDelay(_arg1:int):void{ _repeatDelay = _arg1; } public function set propertyChanges(_arg1:PropertyChanges):void{ _propertyChanges = _arg1; } mx_internal function eventHandler(_arg1:Event):void{ if ((((_arg1.type == FlexEvent.SHOW)) && ((hideOnEffectEnd == true)))){ hideOnEffectEnd = false; _arg1.target.removeEventListener(FlexEvent.SHOW, eventHandler); }; } public function set repeatCount(_arg1:int):void{ _repeatCount = _arg1; } private function delayTimerHandler(_arg1:TimerEvent):void{ delayTimer.reset(); delayStartTime = NaN; delayElapsedTime = NaN; play(); } public function set suspendBackgroundProcessing(_arg1:Boolean):void{ _suspendBackgroundProcessing = _arg1; } public function set triggerEvent(_arg1:Event):void{ _triggerEvent = _arg1; } public function set startDelay(_arg1:int):void{ _startDelay = _arg1; } public function get effect():Effect{ return (_effect); } public function get duration():Number{ if (((!(durationExplicitlySet)) && (parentCompositeEffectInstance))){ return (parentCompositeEffectInstance.duration); }; return (_duration); } public function get target():Object{ return (_target); } public function startEffect():void{ if ((target is IUIComponent)){ Object(target).effectStarted(this); Object(target).drawFocus(false); }; if ((((startDelay > 0)) && (!(playReversed)))){ delayTimer = new Timer(startDelay, 1); delayStartTime = getTimer(); delayTimer.addEventListener(TimerEvent.TIMER, delayTimerHandler); delayTimer.start(); } else { play(); }; } public function get repeatDelay():int{ return (_repeatDelay); } public function initEffect(_arg1:Event):void{ triggerEvent = _arg1; switch (_arg1.type){ case "resizeStart": case "resizeEnd": if (!durationExplicitlySet){ duration = 250; }; break; case FlexEvent.HIDE: target.setVisible(true, true); hideOnEffectEnd = true; target.addEventListener(FlexEvent.SHOW, eventHandler); break; }; } public function get triggerEvent():Event{ return (_triggerEvent); } public function end():void{ if (delayTimer){ delayTimer.reset(); }; stopRepeat = true; finishEffect(); } public function reverse():void{ if (repeatCount > 0){ playCount = ((repeatCount - playCount) + 1); }; } public function pause():void{ if (((((delayTimer) && (delayTimer.running))) && (!(isNaN(delayStartTime))))){ delayTimer.stop(); delayElapsedTime = (getTimer() - delayStartTime); }; } } }//package mx.effects
Section 320
//EffectManager (mx.effects.EffectManager) package mx.effects { import mx.core.*; import mx.resources.*; import flash.system.*; import flash.display.*; import flash.events.*; import mx.events.*; public class EffectManager extends EventDispatcher { mx_internal static const VERSION:String = "2.0.1.0"; private static var resourceIncorrectTrigger:String; mx_internal static var effectsPlaying:Array = []; private static var targetsInfo:Array = []; private static var effectTriggersForEvent:Object = {}; mx_internal static var lastEffectCreated:Effect; private static var eventHandlingSuspendCount:Number = 0; private static var eventsForEffectTriggers:Object = {}; private static var packageResources:ResourceBundle = ResourceBundle.getResourceBundle("effects", ApplicationDomain.currentDomain); private static function createAndPlayEffect(_arg1:Event, _arg2:Object):void{ var _local3:Effect; var _local4:int; var _local5:int; var _local6:int; var _local7:int; var _local8:Array; var _local9:String; var _local10:Array; var _local11:Array; var _local12:Array; var _local13:Array; var _local14:EffectInstance; _local3 = createEffectForType(_arg2, _arg1.type); if (!_local3){ return; }; if ((((_local3 is Zoom)) && ((_arg1.type == MoveEvent.MOVE)))){ throw (new Error(resourceIncorrectTrigger)); }; if (_arg2.initialized == false){ _local9 = _arg1.type; if ((((((((((_local9 == MoveEvent.MOVE)) || ((_local9 == ResizeEvent.RESIZE)))) || ((_local9 == FlexEvent.SHOW)))) || ((_local9 == FlexEvent.HIDE)))) || ((_local9 == Event.CHANGE)))){ _local3 = null; return; }; }; if ((_local3.target is IUIComponent)){ _local10 = IUIComponent(_local3.target).tweeningProperties; if (((_local10) && ((_local10.length > 0)))){ _local11 = _local3.getAffectedProperties(); _local4 = _local10.length; _local6 = _local11.length; _local5 = 0; while (_local5 < _local4) { _local7 = 0; while (_local7 < _local6) { if (_local10[_local5] == _local11[_local7]){ _local3 = null; return; }; _local7++; }; _local5++; }; }; }; if ((((_local3.target is UIComponent)) && (UIComponent(_local3.target).isEffectStarted))){ _local12 = _local3.getAffectedProperties(); _local5 = 0; while (_local5 < _local12.length) { _local13 = _local3.target.getEffectsForProperty(_local12[_local5]); if (_local13.length > 0){ if (_arg1.type == ResizeEvent.RESIZE){ return; }; _local7 = 0; while (_local7 < _local13.length) { _local14 = _local13[_local7]; if ((((_arg1.type == FlexEvent.SHOW)) && (_local14.hideOnEffectEnd))){ _local14.target.removeEventListener(FlexEvent.SHOW, _local14.eventHandler); _local14.hideOnEffectEnd = false; }; _local14.end(); _local7++; }; }; _local5++; }; }; _local3.initEvent = _arg1; _local3.addEventListener(EffectEvent.EFFECT_END, EffectManager.effectEndHandler); lastEffectCreated = _local3; _local8 = _local3.play(); _local4 = _local8.length; _local5 = 0; while (_local5 < _local4) { effectsPlaying.push(new EffectNode(_local3, _local8[_local5])); _local5++; }; if (_local3.suspendBackgroundProcessing){ UIComponent.suspendBackgroundProcessing(); }; } public static function suspendEventHandling():void{ eventHandlingSuspendCount++; } mx_internal static function registerEffectTrigger(_arg1:String, _arg2:String):void{ var _local3:Number; if (_arg1 != ""){ if (_arg2 == ""){ _local3 = _arg1.length; if ((((_local3 > 6)) && ((_arg1.substring((_local3 - 6)) == "Effect")))){ _arg2 = _arg1.substring(0, (_local3 - 6)); }; }; if (_arg2 != ""){ effectTriggersForEvent[_arg2] = _arg1; eventsForEffectTriggers[_arg1] = _arg2; }; }; } private static function removedEffectHandler(_arg1:DisplayObject, _arg2:DisplayObjectContainer, _arg3:int, _arg4:Event):void{ suspendEventHandling(); _arg2.addChildAt(_arg1, _arg3); resumeEventHandling(); createAndPlayEffect(_arg4, _arg1); } mx_internal static function endVectorEffect(_arg1:IUIComponent):void{ cacheOrUncacheTargetAsBitmap(_arg1, false, false); } public static function endEffectsForTarget(_arg1:IUIComponent):void{ var _local2:int; var _local3:int; var _local4:EffectInstance; _local2 = effectsPlaying.length; _local3 = (_local2 - 1); while (_local3 >= 0) { _local4 = effectsPlaying[_local3].instance; if (_local4.target == _arg1){ _local4.end(); }; _local3--; }; } private static function cacheOrUncacheTargetAsBitmap(_arg1:IUIComponent, _arg2:Boolean=true, _arg3:Boolean=true):void{ var _local4:int; var _local5:int; var _local6:Object; _local6 = null; _local4 = targetsInfo.length; _local5 = 0; while (_local5 < _local4) { if (targetsInfo[_local5].target == _arg1){ _local6 = targetsInfo[_local5]; break; }; _local5++; }; if (!_local6){ _local6 = {target:_arg1, bitmapEffectsCount:0, vectorEffectsCount:0}; targetsInfo.push(_local6); }; if (_arg2){ if (_arg3){ _local6.bitmapEffectsCount++; if ((((_local6.vectorEffectsCount == 0)) && ((_arg1 is IDeferredInstantiationUIComponent)))){ IDeferredInstantiationUIComponent(_arg1).cacheHeuristic = true; }; } else { if ((((((_local6.vectorEffectsCount++ == 0)) && ((_arg1 is IDeferredInstantiationUIComponent)))) && ((IDeferredInstantiationUIComponent(_arg1).cachePolicy == UIComponentCachePolicy.AUTO)))){ _arg1.cacheAsBitmap = false; }; }; } else { if (_arg3){ if (_local6.bitmapEffectsCount != 0){ _local6.bitmapEffectsCount--; }; if ((_arg1 is IDeferredInstantiationUIComponent)){ IDeferredInstantiationUIComponent(_arg1).cacheHeuristic = false; }; } else { if (_local6.vectorEffectsCount != 0){ if ((((--_local6.vectorEffectsCount == 0)) && (!((_local6.bitmapEffectsCount == 0))))){ _local4 = _local6.bitmapEffectsCount; _local5 = 0; while (_local5 < _local4) { if ((_arg1 is IDeferredInstantiationUIComponent)){ IDeferredInstantiationUIComponent(_arg1).cacheHeuristic = true; }; _local5++; }; }; }; }; if ((((_local6.bitmapEffectsCount == 0)) && ((_local6.vectorEffectsCount == 0)))){ _local4 = targetsInfo.length; _local5 = 0; while (_local5 < _local4) { if (targetsInfo[_local5].target == _arg1){ targetsInfo.splice(_local5, 1); break; }; _local5++; }; }; }; } mx_internal static function eventHandler(_arg1:Event):void{ var _local2:FocusEvent; var _local3:DisplayObject; var _local4:int; var _local5:DisplayObjectContainer; var _local6:int; if (!(_arg1.currentTarget is IFlexDisplayObject)){ return; }; if (eventHandlingSuspendCount > 0){ return; }; if ((((_arg1 is FocusEvent)) && ((((_arg1.type == FocusEvent.FOCUS_OUT)) || ((_arg1.type == FocusEvent.FOCUS_IN)))))){ _local2 = FocusEvent(_arg1); if (((_local2.relatedObject) && (((_local2.currentTarget.contains(_local2.relatedObject)) || ((_local2.currentTarget == _local2.relatedObject)))))){ return; }; }; if ((((((_arg1.type == Event.ADDED)) || ((_arg1.type == Event.REMOVED)))) && (!((_arg1.target == _arg1.currentTarget))))){ return; }; if (_arg1.type == Event.REMOVED){ if ((_arg1.target is UIComponent)){ if (UIComponent(_arg1.target).initialized == false){ return; }; if (UIComponent(_arg1.target).isEffectStarted){ _local4 = 0; while (_local4 < UIComponent(_arg1.target)._effectsStarted.length) { if (UIComponent(_arg1.target)._effectsStarted[_local4].triggerEvent.type == Event.REMOVED){ return; }; _local4++; }; }; }; _local3 = (_arg1.target as DisplayObject); if (_local3 != null){ _local5 = (_local3.parent as DisplayObjectContainer); if (_local5 != null){ _local6 = _local5.getChildIndex(_local3); if (_local6 >= 0){ if ((_local3 is UIComponent)){ UIComponent(_local3).callLater(removedEffectHandler, [_local3, _local5, _local6, _arg1]); }; }; }; }; } else { createAndPlayEffect(_arg1, _arg1.currentTarget); }; } mx_internal static function endBitmapEffect(_arg1:IUIComponent):void{ cacheOrUncacheTargetAsBitmap(_arg1, false, true); } private static function animateSameProperty(_arg1:Effect, _arg2:Effect, _arg3:EffectInstance):Boolean{ var _local4:Array; var _local5:Array; var _local6:int; var _local7:int; var _local8:int; var _local9:int; if (_arg1.target == _arg3.target){ _local4 = _arg1.getAffectedProperties(); _local5 = _arg2.getAffectedProperties(); _local6 = _local4.length; _local7 = _local5.length; _local8 = 0; while (_local8 < _local6) { _local9 = 0; while (_local9 < _local7) { if (_local4[_local8] == _local5[_local9]){ return (true); }; _local9++; }; _local8++; }; }; return (false); } private static function loadResources():void{ resourceIncorrectTrigger = packageResources.getString("incorrectTrigger"); } mx_internal static function effectEndHandler(_arg1:EffectEvent):void{ var _local2:IEffectInstance; var _local3:int; var _local4:int; var _local5:DisplayObject; var _local6:DisplayObjectContainer; _local2 = _arg1.effectInstance; _local3 = effectsPlaying.length; _local4 = (_local3 - 1); while (_local4 >= 0) { if (effectsPlaying[_local4].instance == _local2){ effectsPlaying.splice(_local4, 1); break; }; _local4--; }; if (Object(_local2).hideOnEffectEnd == true){ _local2.target.removeEventListener(FlexEvent.SHOW, Object(_local2).eventHandler); _local2.target.setVisible(false, true); }; if (((_local2.triggerEvent) && ((_local2.triggerEvent.type == Event.REMOVED)))){ _local5 = (_local2.target as DisplayObject); if (_local5 != null){ _local6 = (_local5.parent as DisplayObjectContainer); if (_local6 != null){ suspendEventHandling(); _local6.removeChild(_local5); resumeEventHandling(); }; }; }; if (_local2.suspendBackgroundProcessing){ UIComponent.resumeBackgroundProcessing(); }; } mx_internal static function startBitmapEffect(_arg1:IUIComponent):void{ cacheOrUncacheTargetAsBitmap(_arg1, true, true); } mx_internal static function setStyle(_arg1:String, _arg2):void{ var _local3:String; _local3 = eventsForEffectTriggers[_arg1]; if (((!((_local3 == null))) && (!((_local3 == ""))))){ _arg2.addEventListener(_local3, EffectManager.eventHandler, false, EventPriority.EFFECT); }; } mx_internal static function getEventForEffectTrigger(_arg1:String):String{ var effectTrigger = _arg1; if (eventsForEffectTriggers){ try { return (eventsForEffectTriggers[effectTrigger]); } catch(e:Error) { return (""); }; }; return (""); } mx_internal static function createEffectForType(_arg1:Object, _arg2:String):Effect{ var trigger:String; var value:Object; var effectClass:Class; var cls:Class; var effectObj:Effect; var doc:Object; var target = _arg1; var type = _arg2; trigger = effectTriggersForEvent[type]; if (trigger == ""){ trigger = (type + "Effect"); }; value = target.getStyle(trigger); if (!value){ return (null); }; if ((value is Class)){ cls = Class(value); return (new cls(target)); }; try { if ((value is String)){ doc = target.parentDocument; if (!doc){ doc = Application.application; }; effectObj = doc[value]; } else { if ((value is Effect)){ effectObj = Effect(value); }; }; if (effectObj){ effectObj.target = target; return (effectObj); }; } catch(e:Error) { }; effectClass = Class(target.systemManager.getDefinitionByName(("mx.effects." + value))); if (effectClass){ return (new effectClass(target)); }; return (null); } public static function resumeEventHandling():void{ eventHandlingSuspendCount--; } mx_internal static function startVectorEffect(_arg1:IUIComponent):void{ cacheOrUncacheTargetAsBitmap(_arg1, true, false); } loadResources(); } }//package mx.effects class EffectNode { public var instance:EffectInstance; public var factory:Effect; private function EffectNode(_arg1:Effect, _arg2:EffectInstance){ this.factory = _arg1; this.instance = _arg2; } }
Section 321
//EffectTargetFilter (mx.effects.EffectTargetFilter) package mx.effects { import mx.effects.effectClasses.*; public class EffectTargetFilter { public var filterFunction:Function; public var filterStyles:Array; public var filterProperties:Array; mx_internal static const VERSION:String = "2.0.1.0"; public function EffectTargetFilter(){ filterFunction = defaultFilterFunction; filterProperties = []; filterStyles = []; super(); } protected function defaultFilterFunction(_arg1:Array, _arg2:Object):Boolean{ var _local3:int; var _local4:int; var _local5:PropertyChanges; var _local6:Array; var _local7:int; var _local8:int; _local3 = _arg1.length; _local4 = 0; while (_local4 < _local3) { _local5 = _arg1[_local4]; if (_local5.target == _arg2){ _local6 = filterProperties.concat(filterStyles); _local7 = _local6.length; _local8 = 0; while (_local8 < _local7) { if (((!((_local5.start[_local6[_local8]] === undefined))) && (!((_local5.end[_local6[_local8]] == _local5.start[_local6[_local8]]))))){ return (true); }; _local8++; }; }; _local4++; }; return (false); } } }//package mx.effects
Section 322
//IEffectInstance (mx.effects.IEffectInstance) package mx.effects { import flash.events.*; import mx.effects.effectClasses.*; public interface IEffectInstance { function set startDelay(_arg1:int):void; function set triggerEvent(_arg1:Event):void; function get playheadTime():Number; function get triggerEvent():Event; function finishEffect():void; function finishRepeat():void; function initEffect(_arg1:Event):void; function get effect():Effect; function startEffect():void; function get duration():Number; function set repeatDelay(_arg1:int):void; function get target():Object; function get startDelay():int; function end():void; function set propertyChanges(_arg1:PropertyChanges):void; function set effect(_arg1:Effect):void; function get className():String; function get repeatDelay():int; function set target(_arg1:Object):void; function resume():void; function get propertyChanges():PropertyChanges; function set duration(_arg1:Number):void; function reverse():void; function get repeatCount():int; function pause():void; function set repeatCount(_arg1:int):void; function set suspendBackgroundProcessing(_arg1:Boolean):void; function play():void; function get suspendBackgroundProcessing():Boolean; } }//package mx.effects
Section 323
//Tween (mx.effects.Tween) package mx.effects { import mx.core.*; import flash.events.*; import mx.events.*; import flash.utils.*; public class Tween extends EventDispatcher { private var started:Boolean;// = false public var duration:Number;// = 3000 private var id:int; private var arrayMode:Boolean; private var _isPlaying:Boolean;// = true private var startValue:Object; public var listener:Object; private var userEquation:Function; private var previousUpdateTime:Number; mx_internal var needToLayout:Boolean;// = false private var updateFunction:Function; private var _doSeek:Boolean;// = false mx_internal var startTime:Number; private var endFunction:Function; private var endValue:Object; private var _doReverse:Boolean;// = false private var _playheadTime:Number;// = 0 private var _invertValues:Boolean;// = false private var maxDelay:Number;// = 87.5 mx_internal static const VERSION:String = "2.0.1.0"; private static var timer:Timer = null; private static var interval:Number = 10; private static var activeTweens:Array = []; mx_internal static var intervalTime:Number = NAN; public function Tween(_arg1:Object, _arg2:Object, _arg3:Object, _arg4:Number=-1, _arg5:Number=-1){ needToLayout = false; maxDelay = 87.5; _doSeek = false; _isPlaying = true; _doReverse = false; userEquation = defaultEasingFunction; started = false; duration = 3000; _playheadTime = 0; _invertValues = false; super(); if (!_arg1){ return; }; if ((_arg2 is Array)){ arrayMode = true; }; this.listener = _arg1; this.startValue = _arg2; this.endValue = _arg3; if (((!(isNaN(_arg4))) && (!((_arg4 == -1))))){ this.duration = _arg4; }; if (((!(isNaN(_arg5))) && (!((_arg5 == -1))))){ maxDelay = (1000 / _arg5); }; if (_arg4 == 0){ endTween(); } else { Tween.addTween(this); }; } public function pause():void{ _isPlaying = false; } mx_internal function get playheadTime():Number{ return (_playheadTime); } mx_internal function get playReversed():Boolean{ return (_invertValues); } public function resume():void{ _isPlaying = true; startTime = (intervalTime - _playheadTime); if (_doReverse){ reverse(); _doReverse = false; }; } public function setTweenHandlers(_arg1:Function, _arg2:Function):void{ this.updateFunction = _arg1; this.endFunction = _arg2; } mx_internal function set playReversed(_arg1:Boolean):void{ _invertValues = _arg1; } public function set easingFunction(_arg1:Function):void{ userEquation = _arg1; } private function defaultEasingFunction(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return ((((_arg3 / 2) * (Math.sin((Math.PI * ((_arg1 / _arg4) - 0.5))) + 1)) + _arg2)); } public function endTween():void{ var _local1:TweenEvent; var _local2:Object; _local1 = new TweenEvent(TweenEvent.TWEEN_END); _local2 = getCurrentValue(duration); _local1.value = _local2; dispatchEvent(_local1); if (endFunction != null){ endFunction(_local2); } else { listener.onTweenEnd(_local2); }; Tween.removeTweenAt(id); } public function reverse():void{ if (_isPlaying){ _doReverse = false; seek((duration - _playheadTime)); _invertValues = !(_invertValues); } else { _doReverse = !(_doReverse); }; } mx_internal function doInterval():Boolean{ var _local1:Boolean; var _local2:Number; var _local3:Object; var _local4:TweenEvent; var _local5:TweenEvent; _local1 = false; previousUpdateTime = intervalTime; if (((_isPlaying) || (_doSeek))){ _local2 = (intervalTime - startTime); _playheadTime = _local2; _local3 = getCurrentValue(_local2); if ((((_local2 >= duration)) && (!(_doSeek)))){ endTween(); _local1 = true; } else { if (!started){ _local5 = new TweenEvent(TweenEvent.TWEEN_START); dispatchEvent(_local5); started = true; }; _local4 = new TweenEvent(TweenEvent.TWEEN_UPDATE); _local4.value = _local3; dispatchEvent(_local4); if (updateFunction != null){ updateFunction(_local3); } else { listener.onTweenUpdate(_local3); }; }; _doSeek = false; }; return (_local1); } public function seek(_arg1:Number):void{ var _local2:Number; _local2 = intervalTime; previousUpdateTime = _local2; startTime = (_local2 - _arg1); _doSeek = true; } mx_internal function getCurrentValue(_arg1:Number):Object{ var _local2:Array; var _local3:int; var _local4:int; if (duration == 0){ return (endValue); }; if (_invertValues){ _arg1 = (duration - _arg1); }; if (arrayMode){ _local2 = []; _local3 = startValue.length; _local4 = 0; while (_local4 < _local3) { _local2[_local4] = userEquation(_arg1, startValue[_local4], (endValue[_local4] - startValue[_local4]), duration); _local4++; }; return (_local2); //unresolved jump }; return (userEquation(_arg1, startValue, (Number(endValue) - Number(startValue)), duration)); } mx_internal static function removeTween(_arg1:Tween):void{ removeTweenAt(_arg1.id); } private static function addTween(_arg1:Tween):void{ _arg1.id = activeTweens.length; activeTweens.push(_arg1); if (!timer){ timer = new Timer(interval); timer.addEventListener(TimerEvent.TIMER, timerHandler); timer.start(); } else { timer.start(); }; if (isNaN(intervalTime)){ intervalTime = getTimer(); }; _arg1.startTime = (_arg1.previousUpdateTime = intervalTime); } private static function timerHandler(_arg1:TimerEvent):void{ var _local2:Boolean; var _local3:Number; var _local4:int; var _local5:int; var _local6:Tween; _local2 = false; _local3 = intervalTime; intervalTime = getTimer(); _local4 = activeTweens.length; _local5 = _local4; while (_local5 >= 0) { _local6 = Tween(activeTweens[_local5]); if (_local6){ _local6.needToLayout = false; _local6.doInterval(); if (_local6.needToLayout){ _local2 = true; }; }; _local5--; }; if (_local2){ UIComponentGlobals.layoutManager.validateNow(); }; _arg1.updateAfterEvent(); } private static function removeTweenAt(_arg1:int):void{ var _local2:int; var _local3:int; var _local4:Tween; if ((((_arg1 >= activeTweens.length)) || ((_arg1 < 0)))){ return; }; activeTweens.splice(_arg1, 1); _local2 = activeTweens.length; _local3 = _arg1; while (_local3 < _local2) { _local4 = Tween(activeTweens[_local3]); _local4.id--; _local3++; }; if (_local2 == 0){ intervalTime = NaN; timer.reset(); }; } } }//package mx.effects
Section 324
//TweenEffect (mx.effects.TweenEffect) package mx.effects { import flash.events.*; import mx.events.*; import mx.effects.effectClasses.*; public class TweenEffect extends Effect { public var easingFunction:Function;// = null mx_internal static const VERSION:String = "2.0.1.0"; public function TweenEffect(_arg1:Object=null){ easingFunction = null; super(_arg1); instanceClass = TweenEffectInstance; } override protected function initInstance(_arg1:IEffectInstance):void{ super.initInstance(_arg1); TweenEffectInstance(_arg1).easingFunction = easingFunction; EventDispatcher(_arg1).addEventListener(TweenEvent.TWEEN_START, tweenEventHandler); EventDispatcher(_arg1).addEventListener(TweenEvent.TWEEN_UPDATE, tweenEventHandler); EventDispatcher(_arg1).addEventListener(TweenEvent.TWEEN_END, tweenEventHandler); } protected function tweenEventHandler(_arg1:TweenEvent):void{ dispatchEvent(_arg1); } } }//package mx.effects
Section 325
//Zoom (mx.effects.Zoom) package mx.effects { import mx.effects.effectClasses.*; public class Zoom extends TweenEffect { public var originY:Number; public var zoomWidthFrom:Number; public var zoomWidthTo:Number; public var zoomHeightFrom:Number; public var captureRollEvents:Boolean; public var zoomHeightTo:Number; public var originX:Number; mx_internal static const VERSION:String = "2.0.1.0"; private static var AFFECTED_PROPERTIES:Array = ["scaleX", "scaleY", "x", "y", "width", "height"]; public function Zoom(_arg1:Object=null){ super(_arg1); instanceClass = ZoomInstance; applyActualDimensions = false; relevantProperties = ["scaleX", "scaleY", "width", "height", "visible"]; } override public function getAffectedProperties():Array{ return (AFFECTED_PROPERTIES); } override protected function initInstance(_arg1:IEffectInstance):void{ var _local2:ZoomInstance; super.initInstance(_arg1); _local2 = ZoomInstance(_arg1); _local2.zoomWidthFrom = zoomWidthFrom; _local2.zoomWidthTo = zoomWidthTo; _local2.zoomHeightFrom = zoomHeightFrom; _local2.zoomHeightTo = zoomHeightTo; _local2.originX = originX; _local2.originY = originY; _local2.captureRollEvents = captureRollEvents; } } }//package mx.effects
Section 326
//ChildExistenceChangedEvent (mx.events.ChildExistenceChangedEvent) package mx.events { import flash.display.*; import flash.events.*; public class ChildExistenceChangedEvent extends Event { public var relatedObject:DisplayObject; public static const CHILD_REMOVE:String = "childRemove"; mx_internal static const VERSION:String = "2.0.1.0"; public static const OVERLAY_CREATED:String = "overlayCreated"; public static const CHILD_ADD:String = "childAdd"; public function ChildExistenceChangedEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:DisplayObject=null){ super(_arg1, _arg2, _arg3); this.relatedObject = _arg4; } override public function clone():Event{ return (new ChildExistenceChangedEvent(type, bubbles, cancelable, relatedObject)); } } }//package mx.events
Section 327
//DragEvent (mx.events.DragEvent) package mx.events { import mx.core.*; import flash.events.*; public class DragEvent extends MouseEvent { public var action:String; public var draggedItem:Object; public var dragSource:DragSource; public var dragInitiator:IUIComponent; public static const DRAG_DROP:String = "dragDrop"; public static const DRAG_COMPLETE:String = "dragComplete"; public static const DRAG_EXIT:String = "dragExit"; public static const DRAG_ENTER:String = "dragEnter"; public static const DRAG_START:String = "dragStart"; mx_internal static const VERSION:String = "2.0.1.0"; public static const DRAG_OVER:String = "dragOver"; public function DragEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=true, _arg4:IUIComponent=null, _arg5:DragSource=null, _arg6:String=null, _arg7:Boolean=false, _arg8:Boolean=false, _arg9:Boolean=false){ super(_arg1, _arg2, _arg3); this.dragInitiator = _arg4; this.dragSource = _arg5; this.action = _arg6; this.ctrlKey = _arg7; this.altKey = _arg8; this.shiftKey = _arg9; } override public function clone():Event{ var _local1:DragEvent; _local1 = new DragEvent(type, bubbles, cancelable, dragInitiator, dragSource, action, ctrlKey, altKey, shiftKey); _local1.relatedObject = this.relatedObject; _local1.localX = this.localX; _local1.localY = this.localY; return (_local1); } } }//package mx.events
Section 328
//DynamicEvent (mx.events.DynamicEvent) package mx.events { import flash.events.*; public dynamic class DynamicEvent extends Event { mx_internal static const VERSION:String = "2.0.1.0"; public function DynamicEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){ super(_arg1, _arg2, _arg3); } override public function clone():Event{ return (new DynamicEvent(type, bubbles, cancelable)); } } }//package mx.events
Section 329
//EffectEvent (mx.events.EffectEvent) package mx.events { import flash.events.*; import mx.effects.*; public class EffectEvent extends Event { public var effectInstance:IEffectInstance; public static const EFFECT_START:String = "effectStart"; mx_internal static const VERSION:String = "2.0.1.0"; public static const EFFECT_END:String = "effectEnd"; public function EffectEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:IEffectInstance=null){ super(_arg1, _arg2, _arg3); this.effectInstance = _arg4; } override public function clone():Event{ return (new EffectEvent(type, bubbles, cancelable, effectInstance)); } } }//package mx.events
Section 330
//FlexEvent (mx.events.FlexEvent) package mx.events { import flash.events.*; public class FlexEvent extends Event { public static const ADD:String = "add"; public static const TRANSFORM_CHANGE:String = "transformChange"; public static const INIT_COMPLETE:String = "initComplete"; public static const REMOVE:String = "remove"; public static const BUTTON_DOWN:String = "buttonDown"; public static const EXIT_STATE:String = "exitState"; public static const CREATION_COMPLETE:String = "creationComplete"; public static const REPEAT:String = "repeat"; public static const LOADING:String = "loading"; public static const REPEAT_START:String = "repeatStart"; public static const INITIALIZE:String = "initialize"; public static const ENTER_STATE:String = "enterState"; public static const URL_CHANGED:String = "urlChanged"; public static const REPEAT_END:String = "repeatEnd"; mx_internal static const VERSION:String = "2.0.1.0"; public static const HIDE:String = "hide"; public static const ENTER:String = "enter"; public static const PRELOADER_DONE:String = "preloaderDone"; public static const CURSOR_UPDATE:String = "cursorUpdate"; public static const PREINITIALIZE:String = "preinitialize"; public static const INVALID:String = "invalid"; public static const IDLE:String = "idle"; public static const VALID:String = "valid"; public static const DATA_CHANGE:String = "dataChange"; public static const APPLICATION_COMPLETE:String = "applicationComplete"; public static const VALUE_COMMIT:String = "valueCommit"; public static const UPDATE_COMPLETE:String = "updateComplete"; public static const INIT_PROGRESS:String = "initProgress"; public static const SHOW:String = "show"; public function FlexEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){ super(_arg1, _arg2, _arg3); } override public function clone():Event{ return (new FlexEvent(type, bubbles, cancelable)); } } }//package mx.events
Section 331
//FlexMouseEvent (mx.events.FlexMouseEvent) package mx.events { import flash.display.*; import flash.events.*; public class FlexMouseEvent extends MouseEvent { public static const MOUSE_DOWN_OUTSIDE:String = "mouseDownOutside"; public static const MOUSE_WHEEL_OUTSIDE:String = "mouseWheelOutside"; mx_internal static const VERSION:String = "2.0.1.0"; public function FlexMouseEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Number=0, _arg5:Number=0, _arg6:InteractiveObject=null, _arg7:Boolean=false, _arg8:Boolean=false, _arg9:Boolean=false, _arg10:Boolean=false, _arg11:int=0){ super(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10, _arg11); } override public function clone():Event{ return (new FlexMouseEvent(type, bubbles, cancelable, localX, localY, relatedObject, ctrlKey, altKey, shiftKey, buttonDown, delta)); } } }//package mx.events
Section 332
//IndexChangedEvent (mx.events.IndexChangedEvent) package mx.events { import flash.display.*; import flash.events.*; public class IndexChangedEvent extends Event { public var triggerEvent:Event; public var relatedObject:DisplayObject; public var newIndex:Number; public var oldIndex:Number; public static const HEADER_SHIFT:String = "headerShift"; public static const CHANGE:String = "change"; mx_internal static const VERSION:String = "2.0.1.0"; public static const CHILD_INDEX_CHANGE:String = "childIndexChange"; public function IndexChangedEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:DisplayObject=null, _arg5:Number=-1, _arg6:Number=-1, _arg7:Event=null){ super(_arg1, _arg2, _arg3); this.relatedObject = _arg4; this.oldIndex = _arg5; this.newIndex = _arg6; this.triggerEvent = _arg7; } override public function clone():Event{ return (new IndexChangedEvent(type, bubbles, cancelable, relatedObject, oldIndex, newIndex, triggerEvent)); } } }//package mx.events
Section 333
//ModuleEvent (mx.events.ModuleEvent) package mx.events { import flash.events.*; import mx.modules.*; public class ModuleEvent extends ProgressEvent { public var errorText:String; mx_internal static const VERSION:String = "2.0.1.0"; public static var READY:String = "ready"; public static var ERROR:String = "error"; public static var PROGRESS:String = "progress"; public static var SETUP:String = "setup"; public static var UNLOAD:String = "unload"; public function ModuleEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:uint=0, _arg5:uint=0, _arg6:String=null){ super(_arg1, _arg2, _arg3, _arg4, _arg5); this.errorText = _arg6; } public function get module():IModuleInfo{ return ((target as IModuleInfo)); } override public function clone():Event{ return (new ModuleEvent(type, bubbles, cancelable, bytesLoaded, bytesTotal, errorText)); } } }//package mx.events
Section 334
//MoveEvent (mx.events.MoveEvent) package mx.events { import flash.events.*; public class MoveEvent extends Event { public var oldY:Number; public var oldX:Number; mx_internal static const VERSION:String = "2.0.1.0"; public static const MOVE:String = "move"; public function MoveEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Number=NaN, _arg5:Number=NaN){ super(_arg1, _arg2, _arg3); this.oldX = _arg4; this.oldY = _arg5; } override public function clone():Event{ return (new MoveEvent(type, bubbles, cancelable, oldX, oldY)); } } }//package mx.events
Section 335
//PropertyChangeEvent (mx.events.PropertyChangeEvent) package mx.events { import flash.events.*; public class PropertyChangeEvent extends Event { public var oldValue:Object; public var property:Object; public var source:Object; public var kind:String; public var newValue:Object; mx_internal static const VERSION:String = "2.0.1.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; _local5 = 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 336
//PropertyChangeEventKind (mx.events.PropertyChangeEventKind) package mx.events { public final class PropertyChangeEventKind { mx_internal static const VERSION:String = "2.0.1.0"; public static const UPDATE:String = "update"; public static const DELETE:String = "delete"; } }//package mx.events
Section 337
//ResizeEvent (mx.events.ResizeEvent) package mx.events { import flash.events.*; public class ResizeEvent extends Event { public var oldHeight:Number; public var oldWidth:Number; mx_internal static const VERSION:String = "2.0.1.0"; public static const RESIZE:String = "resize"; public function ResizeEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Number=NaN, _arg5:Number=NaN){ super(_arg1, _arg2, _arg3); this.oldWidth = _arg4; this.oldHeight = _arg5; } override public function clone():Event{ return (new ResizeEvent(type, bubbles, cancelable, oldWidth, oldHeight)); } } }//package mx.events
Section 338
//RSLEvent (mx.events.RSLEvent) package mx.events { import flash.events.*; import flash.net.*; public class RSLEvent extends ProgressEvent { public var errorText:String; public var rslIndex:int; public var rslTotal:int; public var url:URLRequest; public static const RSL_PROGRESS:String = "rslProgress"; public static const RSL_ERROR:String = "rslError"; mx_internal static const VERSION:String = "2.0.1.0"; public static const RSL_COMPLETE:String = "rslComplete"; public function RSLEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:int=-1, _arg5:int=-1, _arg6:int=-1, _arg7:int=-1, _arg8:URLRequest=null, _arg9:String=null){ super(_arg1, _arg2, _arg3, _arg4, _arg5); this.rslIndex = _arg6; this.rslTotal = _arg7; this.url = _arg8; this.errorText = _arg9; } override public function clone():Event{ return (new RSLEvent(type, bubbles, cancelable, bytesLoaded, bytesTotal, rslIndex, rslTotal, url, errorText)); } } }//package mx.events
Section 339
//ScrollEvent (mx.events.ScrollEvent) package mx.events { import flash.events.*; public class ScrollEvent extends Event { public var detail:String; public var position:Number; public var delta:Number; public var direction:String; mx_internal static const VERSION:String = "2.0.1.0"; public static const SCROLL:String = "scroll"; public function ScrollEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:String=null, _arg5:Number=NaN, _arg6:String=null, _arg7:Number=NaN){ super(_arg1, _arg2, _arg3); this.detail = _arg4; this.position = _arg5; this.direction = _arg6; this.delta = _arg7; } override public function clone():Event{ return (new ScrollEvent(type, bubbles, cancelable, detail, position, direction, delta)); } } }//package mx.events
Section 340
//ScrollEventDetail (mx.events.ScrollEventDetail) package mx.events { public final class ScrollEventDetail { public static const LINE_UP:String = "lineUp"; public static const AT_RIGHT:String = "atRight"; public static const PAGE_UP:String = "pageUp"; public static const LINE_DOWN:String = "lineDown"; public static const PAGE_DOWN:String = "pageDown"; public static const AT_LEFT:String = "atLeft"; public static const PAGE_RIGHT:String = "pageRight"; public static const THUMB_POSITION:String = "thumbPosition"; public static const AT_TOP:String = "atTop"; public static const LINE_LEFT:String = "lineLeft"; public static const AT_BOTTOM:String = "atBottom"; public static const LINE_RIGHT:String = "lineRight"; public static const THUMB_TRACK:String = "thumbTrack"; public static const PAGE_LEFT:String = "pageLeft"; mx_internal static const VERSION:String = "2.0.1.0"; } }//package mx.events
Section 341
//ScrollEventDirection (mx.events.ScrollEventDirection) package mx.events { public final class ScrollEventDirection { public static const HORIZONTAL:String = "horizontal"; public static const VERTICAL:String = "vertical"; mx_internal static const VERSION:String = "2.0.1.0"; } }//package mx.events
Section 342
//StateChangeEvent (mx.events.StateChangeEvent) package mx.events { import flash.events.*; public class StateChangeEvent extends Event { public var oldState:String; public var newState:String; public static const CURRENT_STATE_CHANGING:String = "currentStateChanging"; public static const CURRENT_STATE_CHANGE:String = "currentStateChange"; mx_internal static const VERSION:String = "2.0.1.0"; public function StateChangeEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:String=null, _arg5:String=null){ super(_arg1, _arg2, _arg3); this.oldState = _arg4; this.newState = _arg5; } override public function clone():Event{ return (new StateChangeEvent(type, bubbles, cancelable, oldState, newState)); } } }//package mx.events
Section 343
//StyleEvent (mx.events.StyleEvent) package mx.events { import flash.events.*; public class StyleEvent extends ProgressEvent { public var errorText:String; mx_internal static const VERSION:String = "2.0.1.0"; public static const COMPLETE:String = "complete"; public static const PROGRESS:String = "progress"; public static const ERROR:String = "error"; public function StyleEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:uint=0, _arg5:uint=0, _arg6:String=null){ super(_arg1, _arg2, _arg3, _arg4, _arg5); this.errorText = _arg6; } override public function clone():Event{ return (new StyleEvent(type, bubbles, cancelable, bytesLoaded, bytesTotal, errorText)); } } }//package mx.events
Section 344
//ToolTipEvent (mx.events.ToolTipEvent) package mx.events { import mx.core.*; import flash.events.*; public class ToolTipEvent extends Event { public var toolTip:IToolTip; public static const TOOL_TIP_SHOWN:String = "toolTipShown"; public static const TOOL_TIP_CREATE:String = "toolTipCreate"; public static const TOOL_TIP_SHOW:String = "toolTipShow"; public static const TOOL_TIP_HIDE:String = "toolTipHide"; public static const TOOL_TIP_END:String = "toolTipEnd"; mx_internal static const VERSION:String = "2.0.1.0"; public static const TOOL_TIP_START:String = "toolTipStart"; public function ToolTipEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:IToolTip=null){ super(_arg1, _arg2, _arg3); this.toolTip = _arg4; } override public function clone():Event{ return (new ToolTipEvent(type, bubbles, cancelable, toolTip)); } } }//package mx.events
Section 345
//TweenEvent (mx.events.TweenEvent) package mx.events { import flash.events.*; public class TweenEvent extends Event { public var value:Object; public static const TWEEN_END:String = "tweenEnd"; mx_internal static const VERSION:String = "2.0.1.0"; public static const TWEEN_UPDATE:String = "tweenUpdate"; public static const TWEEN_START:String = "tweenStart"; public function TweenEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Object=null){ super(_arg1, _arg2, _arg3); this.value = _arg4; } override public function clone():Event{ return (new TweenEvent(type, bubbles, cancelable, value)); } } }//package mx.events
Section 346
//ValidationResultEvent (mx.events.ValidationResultEvent) package mx.events { import flash.events.*; public class ValidationResultEvent extends Event { public var results:Array; public var field:String; public static const INVALID:String = "invalid"; mx_internal static const VERSION:String = "2.0.1.0"; public static const VALID:String = "valid"; public function ValidationResultEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:String=null, _arg5:Array=null){ super(_arg1, _arg2, _arg3); this.field = _arg4; this.results = _arg5; } public function get message():String{ var _local1:String; var _local2:int; var _local3:int; _local1 = ""; _local2 = results.length; _local3 = 0; while (_local3 < _local2) { if (results[_local3].isError){ _local1 = (_local1 + ((_local1 == "")) ? "" : "\n"); _local1 = (_local1 + results[_local3].errorMessage); }; _local3++; }; return (_local1); } override public function clone():Event{ return (new ValidationResultEvent(type, bubbles, cancelable, field, results)); } } }//package mx.events
Section 347
//RectangularDropShadow (mx.graphics.RectangularDropShadow) package mx.graphics { import mx.core.*; import flash.display.*; import flash.geom.*; import mx.utils.*; import flash.filters.*; public class RectangularDropShadow { private var leftShadow:BitmapData; private var _tlRadius:Number;// = 0 private var _angle:Number;// = 45 private var topShadow:BitmapData; private var _distance:Number;// = 4 private var rightShadow:BitmapData; private var _alpha:Number;// = 0.4 private var shadow:BitmapData; private var _brRadius:Number;// = 0 private var _blRadius:Number;// = 0 private var _color:int;// = 0 private var _trRadius:Number;// = 0 private var bottomShadow:BitmapData; private var changed:Boolean;// = true mx_internal static const VERSION:String = "2.0.1.0"; public function RectangularDropShadow(){ changed = true; _alpha = 0.4; _angle = 45; _color = 0; _distance = 4; _tlRadius = 0; _trRadius = 0; _blRadius = 0; _brRadius = 0; super(); } public function set trRadius(_arg1:Number):void{ if (_trRadius != _arg1){ _trRadius = _arg1; changed = true; }; } public function get blRadius():Number{ return (_blRadius); } public function set brRadius(_arg1:Number):void{ if (_brRadius != _arg1){ _brRadius = _arg1; changed = true; }; } public function set color(_arg1:int):void{ if (_color != _arg1){ _color = _arg1; changed = true; }; } public function drawShadow(_arg1:Graphics, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number):void{ var _local6:int; var _local7:int; var _local8:int; var _local9:int; var _local10:int; var _local11:int; var _local12:Number; var _local13:Number; var _local14:Matrix; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:Number; var _local21:Number; var _local22:Number; if (changed){ createShadowBitmaps(); changed = false; }; _arg4 = Math.ceil(_arg4); _arg5 = Math.ceil(_arg5); _local6 = (leftShadow) ? leftShadow.width : 0; _local7 = (rightShadow) ? rightShadow.width : 0; _local8 = (topShadow) ? topShadow.height : 0; _local9 = (bottomShadow) ? bottomShadow.height : 0; _local10 = (_local6 + _local7); _local11 = (_local8 + _local9); _local12 = ((_arg5 + _local11) / 2); _local13 = ((_arg4 + _local10) / 2); _local14 = new Matrix(); if (((leftShadow) || (topShadow))){ _local15 = Math.min((tlRadius + _local10), _local13); _local16 = Math.min((tlRadius + _local11), _local12); _local14.tx = (_arg2 - _local6); _local14.ty = (_arg3 - _local8); _arg1.beginBitmapFill(shadow, _local14); _arg1.drawRect((_arg2 - _local6), (_arg3 - _local8), _local15, _local16); _arg1.endFill(); }; if (((rightShadow) || (topShadow))){ _local17 = Math.min((trRadius + _local10), _local13); _local18 = Math.min((trRadius + _local11), _local12); _local14.tx = (((_arg2 + _arg4) + _local7) - shadow.width); _local14.ty = (_arg3 - _local8); _arg1.beginBitmapFill(shadow, _local14); _arg1.drawRect((((_arg2 + _arg4) + _local7) - _local17), (_arg3 - _local8), _local17, _local18); _arg1.endFill(); }; if (((leftShadow) || (bottomShadow))){ _local19 = Math.min((blRadius + _local10), _local13); _local20 = Math.min((blRadius + _local11), _local12); _local14.tx = (_arg2 - _local6); _local14.ty = (((_arg3 + _arg5) + _local9) - shadow.height); _arg1.beginBitmapFill(shadow, _local14); _arg1.drawRect((_arg2 - _local6), (((_arg3 + _arg5) + _local9) - _local20), _local19, _local20); _arg1.endFill(); }; if (((rightShadow) || (bottomShadow))){ _local21 = Math.min((brRadius + _local10), _local13); _local22 = Math.min((brRadius + _local11), _local12); _local14.tx = (((_arg2 + _arg4) + _local7) - shadow.width); _local14.ty = (((_arg3 + _arg5) + _local9) - shadow.height); _arg1.beginBitmapFill(shadow, _local14); _arg1.drawRect((((_arg2 + _arg4) + _local7) - _local21), (((_arg3 + _arg5) + _local9) - _local22), _local21, _local22); _arg1.endFill(); }; if (leftShadow){ _local14.tx = (_arg2 - _local6); _local14.ty = 0; _arg1.beginBitmapFill(leftShadow, _local14); _arg1.drawRect((_arg2 - _local6), ((_arg3 - _local8) + _local16), _local6, ((((_arg5 + _local8) + _local9) - _local16) - _local20)); _arg1.endFill(); }; if (rightShadow){ _local14.tx = (_arg2 + _arg4); _local14.ty = 0; _arg1.beginBitmapFill(rightShadow, _local14); _arg1.drawRect((_arg2 + _arg4), ((_arg3 - _local8) + _local18), _local7, ((((_arg5 + _local8) + _local9) - _local18) - _local22)); _arg1.endFill(); }; if (topShadow){ _local14.tx = 0; _local14.ty = (_arg3 - _local8); _arg1.beginBitmapFill(topShadow, _local14); _arg1.drawRect(((_arg2 - _local6) + _local15), (_arg3 - _local8), ((((_arg4 + _local6) + _local7) - _local15) - _local17), _local8); _arg1.endFill(); }; if (bottomShadow){ _local14.tx = 0; _local14.ty = (_arg3 + _arg5); _arg1.beginBitmapFill(bottomShadow, _local14); _arg1.drawRect(((_arg2 - _local6) + _local19), (_arg3 + _arg5), ((((_arg4 + _local6) + _local7) - _local19) - _local21), _local9); _arg1.endFill(); }; } public function get angle():Number{ return (_angle); } private function createShadowBitmaps():void{ var _local1:Number; var _local2:Number; var _local3:Shape; var _local4:Graphics; var _local5:BitmapData; var _local6:DropShadowFilter; var _local7:Rectangle; var _local8:Rectangle; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Point; var _local14:Rectangle; _local1 = ((Math.max(tlRadius, blRadius) + (2 * distance)) + Math.max(trRadius, brRadius)); _local2 = ((Math.max(tlRadius, trRadius) + (2 * distance)) + Math.max(blRadius, brRadius)); if ((((_local1 < 0)) || ((_local2 < 0)))){ return; }; _local3 = new FlexShape(); _local4 = _local3.graphics; _local4.beginFill(0xFFFFFF); GraphicsUtil.drawRoundRectComplex(_local4, 0, 0, _local1, _local2, tlRadius, trRadius, blRadius, brRadius); _local4.endFill(); _local5 = new BitmapData(_local1, _local2, true, 0); _local5.draw(_local3, new Matrix()); _local6 = new DropShadowFilter(distance, angle, color, alpha); _local6.knockout = true; _local7 = new Rectangle(0, 0, _local1, _local2); _local8 = _local5.generateFilterRect(_local7, _local6); _local9 = (_local7.left - _local8.left); _local10 = (_local8.right - _local7.right); _local11 = (_local7.top - _local8.top); _local12 = (_local8.bottom - _local7.bottom); shadow = new BitmapData(_local8.width, _local8.height); shadow.applyFilter(_local5, _local7, new Point(_local9, _local11), _local6); _local13 = new Point(0, 0); _local14 = new Rectangle(); if (_local9 > 0){ _local14.x = 0; _local14.y = ((tlRadius + _local11) + _local12); _local14.width = _local9; _local14.height = 1; leftShadow = new BitmapData(_local9, 1); leftShadow.copyPixels(shadow, _local14, _local13); } else { leftShadow = null; }; if (_local10 > 0){ _local14.x = (shadow.width - _local10); _local14.y = ((trRadius + _local11) + _local12); _local14.width = _local10; _local14.height = 1; rightShadow = new BitmapData(_local10, 1); rightShadow.copyPixels(shadow, _local14, _local13); } else { rightShadow = null; }; if (_local11 > 0){ _local14.x = ((tlRadius + _local9) + _local10); _local14.y = 0; _local14.width = 1; _local14.height = _local11; topShadow = new BitmapData(1, _local11); topShadow.copyPixels(shadow, _local14, _local13); } else { topShadow = null; }; if (_local12 > 0){ _local14.x = ((blRadius + _local9) + _local10); _local14.y = (shadow.height - _local12); _local14.width = 1; _local14.height = _local12; bottomShadow = new BitmapData(1, _local12); bottomShadow.copyPixels(shadow, _local14, _local13); } else { bottomShadow = null; }; } public function get brRadius():Number{ return (_brRadius); } public function get alpha():Number{ return (_alpha); } public function get color():int{ return (_color); } public function set angle(_arg1:Number):void{ if (_angle != _arg1){ _angle = _arg1; changed = true; }; } public function set tlRadius(_arg1:Number):void{ if (_tlRadius != _arg1){ _tlRadius = _arg1; changed = true; }; } public function get trRadius():Number{ return (_trRadius); } public function set distance(_arg1:Number):void{ if (_distance != _arg1){ _distance = _arg1; changed = true; }; } public function get distance():Number{ return (_distance); } public function get tlRadius():Number{ return (_tlRadius); } public function set alpha(_arg1:Number):void{ if (_alpha != _arg1){ _alpha = _arg1; changed = true; }; } public function set blRadius(_arg1:Number):void{ if (_blRadius != _arg1){ _blRadius = _arg1; changed = true; }; } } }//package mx.graphics
Section 348
//RoundedRectangle (mx.graphics.RoundedRectangle) package mx.graphics { import flash.geom.*; public class RoundedRectangle extends Rectangle { public var cornerRadius:Number;// = 0 mx_internal static const VERSION:String = "2.0.1.0"; public function RoundedRectangle(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0, _arg5:Number=0){ cornerRadius = 0; super(_arg1, _arg2, _arg3, _arg4); this.cornerRadius = _arg5; } } }//package mx.graphics
Section 349
//PriorityQueue (mx.managers.layoutClasses.PriorityQueue) package mx.managers.layoutClasses { import mx.core.*; import flash.display.*; import mx.managers.*; public class PriorityQueue { private var maxPriority:int;// = -1 private var arrayOfArrays:Array; private var minPriority:int;// = 0 mx_internal static const VERSION:String = "2.0.1.0"; public function PriorityQueue(){ arrayOfArrays = []; minPriority = 0; maxPriority = -1; super(); } public function addObject(_arg1:Object, _arg2:int):void{ if (!arrayOfArrays[_arg2]){ arrayOfArrays[_arg2] = []; }; arrayOfArrays[_arg2].push(_arg1); if (maxPriority < minPriority){ minPriority = (maxPriority = _arg2); } else { if (_arg2 < minPriority){ minPriority = _arg2; }; if (_arg2 > maxPriority){ maxPriority = _arg2; }; }; } public function removeSmallest():Object{ var _local1:Object; _local1 = null; if (minPriority <= maxPriority){ while (((!(arrayOfArrays[minPriority])) || ((arrayOfArrays[minPriority].length == 0)))) { minPriority++; if (minPriority > maxPriority){ return (null); }; }; _local1 = arrayOfArrays[minPriority].shift(); while (((!(arrayOfArrays[minPriority])) || ((arrayOfArrays[minPriority].length == 0)))) { minPriority++; if (minPriority > maxPriority){ break; }; }; }; return (_local1); } public function removeLargestChild(_arg1:ILayoutManagerClient):Object{ var _local2:Object; var _local3:int; var _local4:int; var _local5:int; _local2 = null; _local3 = maxPriority; _local4 = _arg1.nestLevel; while (_local4 <= _local3) { if (((arrayOfArrays[_local3]) && ((arrayOfArrays[_local3].length > 0)))){ _local5 = 0; while (_local5 < arrayOfArrays[_local3].length) { if (contains(DisplayObject(_arg1), arrayOfArrays[_local3][_local5])){ _local2 = arrayOfArrays[_local3][_local5]; arrayOfArrays[_local3].splice(_local5, 1); return (_local2); }; _local5++; }; _local3--; } else { if (_local3 == maxPriority){ maxPriority--; }; _local3--; if (_local3 < _local4){ break; }; }; }; return (_local2); } public function isEmpty():Boolean{ return ((minPriority > maxPriority)); } public function removeLargest():Object{ var _local1:Object; _local1 = null; if (minPriority <= maxPriority){ while (((!(arrayOfArrays[maxPriority])) || ((arrayOfArrays[maxPriority].length == 0)))) { maxPriority--; if (maxPriority < minPriority){ return (null); }; }; _local1 = arrayOfArrays[maxPriority].shift(); while (((!(arrayOfArrays[maxPriority])) || ((arrayOfArrays[maxPriority].length == 0)))) { maxPriority--; if (maxPriority < minPriority){ break; }; }; }; return (_local1); } public function removeSmallestChild(_arg1:ILayoutManagerClient):Object{ var _local2:Object; var _local3:int; var _local4:int; _local2 = null; _local3 = _arg1.nestLevel; while (_local3 <= maxPriority) { if (((arrayOfArrays[_local3]) && ((arrayOfArrays[_local3].length > 0)))){ _local4 = 0; while (_local4 < arrayOfArrays[_local3].length) { if (contains(DisplayObject(_arg1), arrayOfArrays[_local3][_local4])){ _local2 = arrayOfArrays[_local3][_local4]; arrayOfArrays[_local3].splice(_local4, 1); return (_local2); }; _local4++; }; _local3++; } else { if (_local3 == minPriority){ minPriority++; }; _local3++; if (_local3 > maxPriority){ break; }; }; }; return (_local2); } public function removeAll():void{ arrayOfArrays.splice(0); minPriority = 0; maxPriority = -1; } private function contains(_arg1:DisplayObject, _arg2:DisplayObject):Boolean{ var _local3:IChildList; if ((_arg1 is IRawChildrenContainer)){ _local3 = IRawChildrenContainer(_arg1).rawChildren; return (_local3.contains(_arg2)); }; if ((_arg1 is DisplayObjectContainer)){ return (DisplayObjectContainer(_arg1).contains(_arg2)); }; return ((_arg1 == _arg2)); } } }//package mx.managers.layoutClasses
Section 350
//FocusManager (mx.managers.FocusManager) package mx.managers { import mx.core.*; import flash.system.*; import flash.display.*; import flash.events.*; import mx.events.*; import flash.text.*; import mx.controls.*; import flash.ui.*; public class FocusManager implements IFocusManager { private var _showFocusIndicator:Boolean;// = false private var focusableCandidates:Array; private var LARGE_TAB_INDEX:int;// = 99999 private var browserFocusComponent:InteractiveObject; private var calculateCandidates:Boolean;// = true private var lastAction:String; private var focusableObjects:Array; private var defButton:Button; private var _form:IFocusManagerContainer; private var _defaultButtonEnabled:Boolean;// = true private var activated:Boolean;// = false private var _defaultButton:Button; private var _focusPane:Sprite; private var lastFocus:IFocusManagerComponent; private var browserMode:Boolean; mx_internal static const VERSION:String = "2.0.1.0"; public function FocusManager(_arg1:IFocusManagerContainer, _arg2:Boolean=false){ LARGE_TAB_INDEX = 99999; calculateCandidates = true; activated = false; _showFocusIndicator = false; _defaultButtonEnabled = true; super(); browserMode = (((Capabilities.playerType == "ActiveX")) && (!(_arg2))); _arg1.focusManager = this; _form = _arg1; focusableObjects = []; focusPane = new FlexSprite(); focusPane.name = "focusPane"; addFocusables(DisplayObject(_arg1)); _arg1.addEventListener(Event.ADDED, addedHandler); _arg1.addEventListener(Event.REMOVED, removedHandler); _arg1.addEventListener(FlexEvent.SHOW, showHandler); _arg1.addEventListener(FlexEvent.HIDE, hideHandler); if (_arg1 != SystemManager(_arg1.systemManager).application){ _arg1.addEventListener(FlexEvent.CREATION_COMPLETE, creationCompleteHandler); }; _arg1.systemManager.addFocusManager(_arg1); } private function addFocusables(_arg1:DisplayObject, _arg2:Boolean=false):void{ var focusable:IFocusManagerComponent; var doc:DisplayObjectContainer; var i:int; var rawChildren:IChildList; var o = _arg1; var skipTopLevel = _arg2; if ((((o is IFocusManagerComponent)) && (!(skipTopLevel)))){ focusable = IFocusManagerComponent(o); if (focusable.focusEnabled){ if (((focusable.tabEnabled) && (isTabVisible(o)))){ focusableObjects.push(o); calculateCandidates = true; }; o.addEventListener("tabEnabledChange", tabEnabledChangeHandler); o.addEventListener("tabIndexChange", tabIndexChangeHandler); }; }; if ((o is DisplayObjectContainer)){ doc = DisplayObjectContainer(o); o.addEventListener("tabChildrenChange", tabChildrenChangeHandler); if (doc.tabChildren){ if ((o is IRawChildrenContainer)){ rawChildren = IRawChildrenContainer(o).rawChildren; i = 0; while (i < rawChildren.numChildren) { try { addFocusables(rawChildren.getChildAt(i)); } catch(error:SecurityError) { }; i = (i + 1); }; } else { i = 0; while (i < doc.numChildren) { try { addFocusables(doc.getChildAt(i)); } catch(error:SecurityError) { }; i = (i + 1); }; }; }; }; } private function getChildIndex(_arg1:DisplayObjectContainer, _arg2:DisplayObject):int{ var parent = _arg1; var child = _arg2; try { return (parent.getChildIndex(child)); } catch(e:Error) { if ((parent is IRawChildrenContainer)){ return (IRawChildrenContainer(parent).rawChildren.getChildIndex(child)); }; throw (e); }; throw (new Error("FocusManager.getChildIndex failed")); } private function mouseFocusChangeHandler(_arg1:FocusEvent):void{ var _local2:TextField; if ((_arg1.relatedObject is TextField)){ _local2 = (_arg1.relatedObject as TextField); if ((((_local2.type == "input")) || (_local2.selectable))){ return; }; }; _arg1.preventDefault(); } private function focusOutHandler(_arg1:FocusEvent):void{ var _local2:InteractiveObject; _local2 = InteractiveObject(_arg1.target); } private function isValidFocusCandidate(_arg1:DisplayObject, _arg2:String):Boolean{ var _local3:IFocusManagerGroup; if (!isEnabledAndVisible(_arg1)){ return (false); }; if ((_arg1 is IFocusManagerGroup)){ _local3 = IFocusManagerGroup(_arg1); if (_arg2 == _local3.groupName){ return (false); }; }; return (true); } private function removeFocusables(_arg1:DisplayObject, _arg2:Boolean):void{ var _local3:int; if ((_arg1 is DisplayObjectContainer)){ if (!_arg2){ _arg1.removeEventListener("tabChildrenChange", tabChildrenChangeHandler); }; _local3 = 0; while (_local3 < focusableObjects.length) { if (isParent(DisplayObjectContainer(_arg1), focusableObjects[_local3])){ if (focusableObjects[_local3] == lastFocus){ lastFocus.drawFocus(false); lastFocus = null; }; focusableObjects[_local3].removeEventListener("tabEnabledChange", tabEnabledChangeHandler); focusableObjects[_local3].removeEventListener("tabIndexChange", tabIndexChangeHandler); focusableObjects.splice(_local3, 1); _local3--; calculateCandidates = true; }; _local3++; }; }; } public function getFocus():IFocusManagerComponent{ var _local1:InteractiveObject; _local1 = form.systemManager.stage.focus; return (findFocusManagerComponent(_local1)); } private function addedHandler(_arg1:Event):void{ var _local2:DisplayObject; _local2 = DisplayObject(_arg1.target); if (_local2.stage){ addFocusables(DisplayObject(_arg1.target)); }; } private function tabChildrenChangeHandler(_arg1:Event):void{ var _local2:DisplayObjectContainer; if (_arg1.target != _arg1.currentTarget){ return; }; calculateCandidates = true; _local2 = DisplayObjectContainer(_arg1.target); if (_local2.tabChildren){ addFocusables(_local2, true); } else { removeFocusables(_local2, true); }; } private function sortByDepth(_arg1:IFocusManagerComponent, _arg2:IFocusManagerComponent):Number{ var _local3:String; var _local4:String; var _local5:int; var _local6:String; var _local7:String; var _local8:String; var _local9:DisplayObject; var _local10:DisplayObject; _local3 = ""; _local4 = ""; _local8 = "0000"; _local9 = DisplayObject(_arg1); _local10 = DisplayObject(_arg2); while (((!((_local9 == DisplayObject(form)))) && (_local9.parent))) { _local5 = getChildIndex(_local9.parent, _local9); _local6 = _local5.toString(16); if (_local6.length < 4){ _local7 = (_local8.substring(0, (4 - _local6.length)) + _local6); }; _local3 = (_local7 + _local3); _local9 = _local9.parent; }; while (((!((_local10 == DisplayObject(form)))) && (_local10.parent))) { _local5 = getChildIndex(_local10.parent, _local10); _local6 = _local5.toString(16); if (_local6.length < 4){ _local7 = (_local8.substring(0, (4 - _local6.length)) + _local6); }; _local4 = (_local7 + _local4); _local10 = _local10.parent; }; return (((_local3 > _local4)) ? 1 : ((_local3 < _local4)) ? -1 : 0); } mx_internal function sendDefaultButtonEvent():void{ defButton.dispatchEvent(new MouseEvent("click")); } private function deactivateHandler(_arg1:Event):void{ var _local2:InteractiveObject; _local2 = InteractiveObject(_arg1.target); } private function tabIndexChangeHandler(_arg1:Event):void{ calculateCandidates = true; } private function sortFocusableObjects():void{ var _local1:int; var _local2:int; var _local3:InteractiveObject; focusableCandidates = []; _local1 = focusableObjects.length; _local2 = 0; while (_local2 < _local1) { _local3 = focusableObjects[_local2]; if (((((_local3.tabIndex) && (!(isNaN(Number(_local3.tabIndex)))))) && ((_local3.tabIndex > 0)))){ sortFocusableObjectsTabIndex(); return; }; focusableCandidates.push(_local3); _local2++; }; focusableCandidates.sort(sortByDepth); } private function keyFocusChangeHandler(_arg1:FocusEvent):void{ showFocusIndicator = true; if ((((_arg1.keyCode == Keyboard.TAB)) && (!(_arg1.isDefaultPrevented())))){ if (browserFocusComponent){ if (browserFocusComponent.tabIndex == LARGE_TAB_INDEX){ browserFocusComponent.tabIndex = -1; }; browserFocusComponent = null; return; }; setFocusToNextObject(_arg1); _arg1.preventDefault(); }; } private function getIndexOfFocusedObject(_arg1:DisplayObject):int{ var _local2:int; var _local3:int; _local2 = focusableCandidates.length; _local3 = 0; _local3 = 0; while (_local3 < _local2) { if (focusableCandidates[_local3] == _arg1){ return (_local3); }; _local3++; }; return (-1); } public function get nextTabIndex():int{ return ((getMaxTabIndex() + 1)); } public function get focusPane():Sprite{ return (_focusPane); } private function mouseDownHandler(_arg1:MouseEvent):void{ var _local2:DisplayObject; if (_arg1.isDefaultPrevented()){ return; }; _local2 = getTopLevelFocusTarget(InteractiveObject(_arg1.target)); if (!_local2){ return; }; showFocusIndicator = false; if (((((!((_local2 == lastFocus))) || ((lastAction == "ACTIVATE")))) && (!((_local2 is TextField))))){ setFocus(IFocusManagerComponent(_local2)); }; lastAction = "MOUSEDOWN"; } private function keyDownHandler(_arg1:KeyboardEvent):void{ var _local2:SystemManager; var _local3:DisplayObject; var _local4:String; var _local5:int; var _local6:int; var _local7:IFocusManagerGroup; _local2 = SystemManager(form.systemManager); _local2.idleCounter = 0; if (_arg1.keyCode == Keyboard.TAB){ lastAction = "KEY"; if (calculateCandidates){ sortFocusableObjects(); calculateCandidates = false; }; }; if (browserMode){ if ((((_arg1.keyCode == Keyboard.TAB)) && ((focusableCandidates.length > 0)))){ _local3 = form.systemManager.stage.focus; _local3 = DisplayObject(findFocusManagerComponent(InteractiveObject(_local3))); _local4 = ""; if ((_local3 is IFocusManagerGroup)){ _local7 = IFocusManagerGroup(_local3); _local4 = _local7.groupName; }; _local5 = getIndexOfFocusedObject(_local3); _local6 = getIndexOfNextObject(_local5, _arg1.shiftKey, false, _local4); if (_arg1.shiftKey){ if (_local6 >= _local5){ browserFocusComponent = form.systemManager.stage.focus; if (browserFocusComponent.tabIndex == -1){ browserFocusComponent.tabIndex = LARGE_TAB_INDEX; }; }; } else { if (_local6 <= _local5){ browserFocusComponent = form.systemManager.stage.focus; if (browserFocusComponent.tabIndex == -1){ browserFocusComponent.tabIndex = LARGE_TAB_INDEX; }; }; }; }; }; if (((((((defaultButtonEnabled) && ((_arg1.keyCode == Keyboard.ENTER)))) && (defaultButton))) && (defButton.enabled))){ defButton.callLater(sendDefaultButtonEvent); }; } public function toString():String{ return ((Object(form).toString() + ".focusManager")); } private function focusInHandler(_arg1:FocusEvent):void{ var _local2:InteractiveObject; var _local3:Button; _local2 = InteractiveObject(_arg1.target); if (isParent(DisplayObjectContainer(form), _local2)){ lastFocus = findFocusManagerComponent(InteractiveObject(_local2)); if ((lastFocus is Button)){ _local3 = Button(lastFocus); if (defButton){ defButton.emphasized = false; defButton = _local3; _local3.emphasized = true; }; } else { if (((defButton) && (!((defButton == _defaultButton))))){ defButton.emphasized = false; defButton = _defaultButton; _defaultButton.emphasized = true; }; }; }; } public function deactivate():void{ form.systemManager.stage.removeEventListener(FocusEvent.MOUSE_FOCUS_CHANGE, mouseFocusChangeHandler); form.systemManager.stage.removeEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler); form.removeEventListener(FocusEvent.FOCUS_IN, focusInHandler, true); form.removeEventListener(FocusEvent.FOCUS_OUT, focusOutHandler, true); form.systemManager.stage.removeEventListener(Event.ACTIVATE, activateHandler); form.systemManager.stage.removeEventListener(Event.DEACTIVATE, deactivateHandler); form.removeEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler); form.removeEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, true); activated = false; } private function isParent(_arg1:DisplayObjectContainer, _arg2:DisplayObject):Boolean{ if ((_arg1 is IRawChildrenContainer)){ return (IRawChildrenContainer(_arg1).rawChildren.contains(_arg2)); }; return (_arg1.contains(_arg2)); } private function getIndexOfNextObject(_arg1:int, _arg2:Boolean, _arg3:Boolean, _arg4:String):int{ var _local5:int; var _local6:int; var _local7:DisplayObject; var _local8:IFocusManagerGroup; var _local9:int; var _local10:DisplayObject; var _local11:IFocusManagerGroup; _local5 = focusableCandidates.length; _local6 = _arg1; while (true) { if (_arg2){ _arg1--; } else { _arg1++; }; if (_arg3){ if (((_arg2) && ((_arg1 < 0)))){ break; }; if (((!(_arg2)) && ((_arg1 == _local5)))){ break; }; } else { _arg1 = ((_arg1 + _local5) % _local5); if (_local6 == _arg1){ break; }; }; if (isValidFocusCandidate(focusableCandidates[_arg1], _arg4)){ _local7 = DisplayObject(findFocusManagerComponent(focusableCandidates[_arg1])); if ((_local7 is IFocusManagerGroup)){ _local8 = IFocusManagerGroup(_local7); _local9 = 0; while (_local9 < focusableCandidates.length) { _local10 = focusableCandidates[_local9]; if ((_local10 is IFocusManagerGroup)){ _local11 = IFocusManagerGroup(_local10); if ((((_local11.groupName == _local8.groupName)) && (_local11.selected))){ _arg1 = _local9; break; }; }; _local9++; }; }; return (_arg1); }; }; return (_arg1); } private function getMaxTabIndex():int{ var _local1:Number; var _local2:int; var _local3:int; var _local4:Number; _local1 = 0; _local2 = focusableObjects.length; _local3 = 0; while (_local3 < _local2) { _local4 = focusableObjects[_local3].tabIndex; if (!isNaN(_local4)){ _local1 = Math.max(_local1, _local4); }; _local3++; }; return (_local1); } private function showHandler(_arg1:Event):void{ form.systemManager.activate(form); } public function findFocusManagerComponent(_arg1:InteractiveObject):IFocusManagerComponent{ while (_arg1) { if ((((_arg1 is IFocusManagerComponent)) && (IFocusManagerComponent(_arg1).focusEnabled))){ return (IFocusManagerComponent(_arg1)); }; _arg1 = _arg1.parent; }; return (null); } public function setFocus(_arg1:IFocusManagerComponent):void{ _arg1.setFocus(); } mx_internal function set form(_arg1:IFocusManagerContainer):void{ _form = _arg1; } private function sortFocusableObjectsTabIndex():void{ var _local1:int; var _local2:int; var _local3:IFocusManagerComponent; focusableCandidates = []; _local1 = focusableObjects.length; _local2 = 0; while (_local2 < _local1) { _local3 = focusableObjects[_local2]; if (((_local3.tabIndex) && (!(isNaN(Number(_local3.tabIndex)))))){ focusableCandidates.push(_local3); }; _local2++; }; focusableCandidates.sort(sortByTabIndex); } public function set defaultButton(_arg1:IUIComponent):void{ var _local2:Button; _local2 = (_arg1) ? Button(_arg1) : null; if (_local2 != _defaultButton){ if (_defaultButton){ _defaultButton.emphasized = false; }; if (defButton){ defButton.emphasized = false; }; _defaultButton = _local2; defButton = _local2; if (_local2){ _local2.emphasized = true; }; }; } private function setFocusToNextObject(_arg1:FocusEvent):void{ var _local2:IFocusManagerComponent; if (focusableObjects.length == 0){ return; }; _local2 = getNextFocusManagerComponent(_arg1.shiftKey); if (_local2){ setFocus(_local2); }; } private function getTopLevelFocusTarget(_arg1:InteractiveObject):InteractiveObject{ while (_arg1 != InteractiveObject(form)) { if ((((((((_arg1 is IFocusManagerComponent)) && (IFocusManagerComponent(_arg1).focusEnabled))) && (IFocusManagerComponent(_arg1).mouseFocusEnabled))) && (IUIComponent(_arg1).enabled))){ return (_arg1); }; _arg1 = _arg1.parent; if (_arg1 == null){ break; }; }; return (null); } private function hideHandler(_arg1:Event):void{ form.systemManager.deactivate(form); } private function isEnabledAndVisible(_arg1:DisplayObject):Boolean{ var _local2:DisplayObjectContainer; _local2 = DisplayObject(form).parent; while (_arg1 != _local2) { if ((_arg1 is IUIComponent)){ if (!IUIComponent(_arg1).enabled){ return (false); }; }; if (!_arg1.visible){ return (false); }; _arg1 = _arg1.parent; }; return (true); } public function hideFocus():void{ if (showFocusIndicator){ showFocusIndicator = false; if (lastFocus){ lastFocus.drawFocus(false); }; }; } public function get showFocusIndicator():Boolean{ return (_showFocusIndicator); } mx_internal function get form():IFocusManagerContainer{ return (_form); } public function set focusPane(_arg1:Sprite):void{ _focusPane = _arg1; } private function removedHandler(_arg1:Event):void{ var _local2:int; var _local3:DisplayObject; _local3 = DisplayObject(_arg1.target); if ((_local3 is IFocusManagerComponent)){ _local2 = 0; while (_local2 < focusableObjects.length) { if (_local3 == focusableObjects[_local2]){ if (_local3 == lastFocus){ lastFocus.drawFocus(false); lastFocus = null; }; _local3.removeEventListener("tabEnabledChange", tabEnabledChangeHandler); _local3.removeEventListener("tabIndexChange", tabIndexChangeHandler); focusableObjects.splice(_local2, 1); calculateCandidates = true; break; }; _local2++; }; }; removeFocusables(_local3, false); } private function activateHandler(_arg1:Event):void{ var _local2:InteractiveObject; _local2 = InteractiveObject(_arg1.target); if (((lastFocus) && (!(browserMode)))){ lastFocus.setFocus(); }; lastAction = "ACTIVATE"; } public function get defaultButton():IUIComponent{ return (_defaultButton); } public function showFocus():void{ if (!showFocusIndicator){ showFocusIndicator = true; if (lastFocus){ lastFocus.drawFocus(true); }; }; } public function getNextFocusManagerComponent(_arg1:Boolean=false):IFocusManagerComponent{ var _local2:DisplayObject; var _local3:String; var _local4:int; var _local5:Boolean; var _local6:int; var _local7:int; var _local8:IFocusManagerGroup; if (focusableObjects.length == 0){ return (null); }; if (calculateCandidates){ sortFocusableObjects(); calculateCandidates = false; }; _local2 = form.systemManager.stage.focus; _local2 = DisplayObject(findFocusManagerComponent(InteractiveObject(_local2))); _local3 = ""; if ((_local2 is IFocusManagerGroup)){ _local8 = IFocusManagerGroup(_local2); _local3 = _local8.groupName; }; _local4 = getIndexOfFocusedObject(_local2); _local5 = false; _local6 = _local4; if (_local4 == -1){ if (_arg1){ _local4 = focusableCandidates.length; }; _local5 = true; }; _local7 = getIndexOfNextObject(_local4, _arg1, _local5, _local3); return (findFocusManagerComponent(focusableCandidates[_local7])); } public function set defaultButtonEnabled(_arg1:Boolean):void{ _defaultButtonEnabled = _arg1; } private function isTabVisible(_arg1:DisplayObject):Boolean{ var _local2:DisplayObject; var _local3:DisplayObjectContainer; _local2 = DisplayObject(form.systemManager); if (!_local2){ return (false); }; _local3 = _arg1.parent; while (((_local3) && (!((_local3 == _local2))))) { if (!_local3.tabChildren){ return (false); }; _local3 = _local3.parent; }; return (true); } public function set showFocusIndicator(_arg1:Boolean):void{ _showFocusIndicator = _arg1; } private function sortByTabIndex(_arg1:IFocusManagerComponent, _arg2:IFocusManagerComponent):int{ var _local3:int; var _local4:int; _local3 = _arg1.tabIndex; _local4 = _arg2.tabIndex; if (_local3 == -1){ _local3 = int.MAX_VALUE; }; if (_local4 == -1){ _local4 = int.MAX_VALUE; }; return (((_local3 > _local4)) ? 1 : ((_local3 < _local4)) ? -1 : sortByDepth(_arg1, _arg2)); } public function activate():void{ if (activated){ return; }; form.systemManager.stage.addEventListener(FocusEvent.MOUSE_FOCUS_CHANGE, mouseFocusChangeHandler, false, 0, true); form.systemManager.stage.addEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler, false, 0, true); form.addEventListener(FocusEvent.FOCUS_IN, focusInHandler, true); form.addEventListener(FocusEvent.FOCUS_OUT, focusOutHandler, true); form.systemManager.stage.addEventListener(Event.ACTIVATE, activateHandler, false, 0, true); form.systemManager.stage.addEventListener(Event.DEACTIVATE, deactivateHandler, false, 0, true); form.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler); form.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, true); activated = true; if (lastFocus){ setFocus(lastFocus); }; } public function get defaultButtonEnabled():Boolean{ return (_defaultButtonEnabled); } private function creationCompleteHandler(_arg1:FlexEvent):void{ if (((DisplayObject(form).visible) && (!(activated)))){ form.systemManager.activate(form); }; } private function tabEnabledChangeHandler(_arg1:Event):void{ var _local2:InteractiveObject; var _local3:int; var _local4:int; calculateCandidates = true; _local2 = InteractiveObject(_arg1.target); _local3 = focusableObjects.length; _local4 = 0; while (_local4 < _local3) { if (focusableObjects[_local4] == _local2){ break; }; _local4++; }; if (_local2.tabEnabled){ if ((((_local4 == _local3)) && (isTabVisible(_local2)))){ focusableObjects.push(_local2); }; } else { if (_local4 < _local3){ focusableObjects.splice(_local4, 1); }; }; } } }//package mx.managers
Section 351
//IFocusManager (mx.managers.IFocusManager) package mx.managers { import mx.core.*; import flash.display.*; public interface IFocusManager { function get focusPane():Sprite; function getFocus():IFocusManagerComponent; function deactivate():void; function hideFocus():void; function set defaultButton(_arg1:IUIComponent):void; function set showFocusIndicator(_arg1:Boolean):void; function get defaultButtonEnabled():Boolean; function set focusPane(_arg1:Sprite):void; function get nextTabIndex():int; function get defaultButton():IUIComponent; function get showFocusIndicator():Boolean; function activate():void; function showFocus():void; function set defaultButtonEnabled(_arg1:Boolean):void; function setFocus(_arg1:IFocusManagerComponent):void; function findFocusManagerComponent(_arg1:InteractiveObject):IFocusManagerComponent; function getNextFocusManagerComponent(_arg1:Boolean=false):IFocusManagerComponent; } }//package mx.managers
Section 352
//IFocusManagerComponent (mx.managers.IFocusManagerComponent) package mx.managers { public interface IFocusManagerComponent { function set focusEnabled(_arg1:Boolean):void; function drawFocus(_arg1:Boolean):void; function setFocus():void; function get focusEnabled():Boolean; function get tabEnabled():Boolean; function get tabIndex():int; function get mouseFocusEnabled():Boolean; } }//package mx.managers
Section 353
//IFocusManagerContainer (mx.managers.IFocusManagerContainer) package mx.managers { import flash.display.*; import flash.events.*; public interface IFocusManagerContainer extends IEventDispatcher { function set focusManager(_arg1:IFocusManager):void; function get focusManager():IFocusManager; function get systemManager():ISystemManager; function contains(_arg1:DisplayObject):Boolean; } }//package mx.managers
Section 354
//IFocusManagerGroup (mx.managers.IFocusManagerGroup) package mx.managers { public interface IFocusManagerGroup { function set groupName(_arg1:String):void; function set selected(_arg1:Boolean):void; function get groupName():String; function get selected():Boolean; } }//package mx.managers
Section 355
//ILayoutManager (mx.managers.ILayoutManager) package mx.managers { import flash.events.*; public interface ILayoutManager extends IEventDispatcher { function invalidateDisplayList(_arg1:ILayoutManagerClient):void; function validateClient(_arg1:ILayoutManagerClient, _arg2:Boolean=false):void; function invalidateProperties(_arg1:ILayoutManagerClient):void; function isInvalid():Boolean; function validateNow():void; function set usePhasedInstantiation(_arg1:Boolean):void; function invalidateSize(_arg1:ILayoutManagerClient):void; function get usePhasedInstantiation():Boolean; } }//package mx.managers
Section 356
//ILayoutManagerClient (mx.managers.ILayoutManagerClient) package mx.managers { import flash.events.*; public interface ILayoutManagerClient extends IEventDispatcher { function set updateCompletePendingFlag(_arg1:Boolean):void; function set initialized(_arg1:Boolean):void; function validateProperties():void; function get nestLevel():int; function get updateCompletePendingFlag():Boolean; function validateDisplayList():void; function set processedDescriptors(_arg1:Boolean):void; function get processedDescriptors():Boolean; function validateSize(_arg1:Boolean=false):void; function set nestLevel(_arg1:int):void; function get initialized():Boolean; } }//package mx.managers
Section 357
//ISystemManager (mx.managers.ISystemManager) package mx.managers { import mx.core.*; import flash.display.*; import flash.events.*; import flash.geom.*; import flash.text.*; public interface ISystemManager extends IEventDispatcher, IChildList, IFlexModuleFactory { function get toolTipChildren():IChildList; function get numModalWindows():int; function isTopLevel():Boolean; function isFontFaceEmbedded(_arg1:TextFormat):Boolean; function removeFocusManager(_arg1:IFocusManagerContainer):void; function get document():Object; function get topLevelSystemManager():ISystemManager; function get focusPane():Sprite; function get loaderInfo():LoaderInfo; function set focusPane(_arg1:Sprite):void; function get rawChildren():IChildList; function get popUpChildren():IChildList; function get screen():Rectangle; function deactivate(_arg1:IFocusManagerContainer):void; function getDefinitionByName(_arg1:String):Object; function activate(_arg1:IFocusManagerContainer):void; function get cursorChildren():IChildList; function set document(_arg1:Object):void; function get embeddedFontList():Object; function addFocusManager(_arg1:IFocusManagerContainer):void; function get stage():Stage; function set numModalWindows(_arg1:int):void; } }//package mx.managers
Section 358
//IToolTipManager (mx.managers.IToolTipManager) package mx.managers { import mx.core.*; import flash.display.*; import mx.effects.*; public interface IToolTipManager { function registerToolTip(_arg1:DisplayObject, _arg2:String):void; function set enabled(_arg1:Boolean):void; function get showDelay():Number; function createToolTip(_arg1:String, _arg2:Number, _arg3:Number, _arg4:String=null, _arg5:IUIComponent=null):IToolTip; function get enabled():Boolean; function destroyToolTip(_arg1:IToolTip):void; function set showDelay(_arg1:Number):void; function set hideDelay(_arg1:Number):void; function get scrubDelay():Number; function get toolTipClass():Class; function registerErrorString(_arg1:DisplayObject, _arg2:String):void; function sizeTip(_arg1:IToolTip):void; function set currentTarget(_arg1:DisplayObject):void; function set showEffect(_arg1:Effect):void; function get hideDelay():Number; function set currentToolTip(_arg1:IToolTip):void; function set hideEffect(_arg1:Effect):void; function set scrubDelay(_arg1:Number):void; function get currentToolTip():IToolTip; function get showEffect():Effect; function get currentTarget():DisplayObject; function get hideEffect():Effect; function set toolTipClass(_arg1:Class):void; } }//package mx.managers
Section 359
//IToolTipManagerClient (mx.managers.IToolTipManagerClient) package mx.managers { import mx.core.*; public interface IToolTipManagerClient extends IFlexDisplayObject { function set toolTip(_arg1:String):void; function get toolTip():String; } }//package mx.managers
Section 360
//LayoutManager (mx.managers.LayoutManager) package mx.managers { import mx.core.*; import flash.display.*; import flash.events.*; import mx.events.*; import mx.managers.layoutClasses.*; public class LayoutManager extends EventDispatcher implements ILayoutManager { private var invalidateClientSizeFlag:Boolean;// = false private var invalidateSizeQueue:PriorityQueue; private var updateCompleteQueue:PriorityQueue; private var originalFrameRate:Number; private var _usePhasedInstantiation:Boolean;// = false private var callLaterObject:UIComponent; private var invalidateClientPropertiesFlag:Boolean;// = false private var invalidateDisplayListQueue:PriorityQueue; private var invalidateDisplayListFlag:Boolean;// = false private var invalidatePropertiesFlag:Boolean;// = false private var invalidatePropertiesQueue:PriorityQueue; private var invalidateSizeFlag:Boolean;// = false private var callLaterPending:Boolean;// = false private var targetLevel:int;// = 2147483647 mx_internal static const VERSION:String = "2.0.1.0"; private static var instance:LayoutManager; public function LayoutManager(){ updateCompleteQueue = new PriorityQueue(); invalidatePropertiesQueue = new PriorityQueue(); invalidatePropertiesFlag = false; invalidateClientPropertiesFlag = false; invalidateSizeQueue = new PriorityQueue(); invalidateSizeFlag = false; invalidateClientSizeFlag = false; invalidateDisplayListQueue = new PriorityQueue(); invalidateDisplayListFlag = false; callLaterPending = false; targetLevel = int.MAX_VALUE; _usePhasedInstantiation = false; super(); } private function waitAFrame():void{ callLaterObject.callLater(doPhasedInstantiation); } public function get usePhasedInstantiation():Boolean{ return (_usePhasedInstantiation); } public function validateClient(_arg1:ILayoutManagerClient, _arg2:Boolean=false):void{ var _local3:ILayoutManagerClient; var _local4:int; var _local5:Boolean; var _local6:int; _local4 = 0; _local5 = false; _local6 = targetLevel; if (targetLevel == int.MAX_VALUE){ targetLevel = _arg1.nestLevel; }; while (!(_local5)) { _local5 = true; _local3 = ILayoutManagerClient(invalidatePropertiesQueue.removeSmallestChild(_arg1)); while (_local3) { _local3.validateProperties(); if (!_local3.updateCompletePendingFlag){ updateCompleteQueue.addObject(_local3, _local3.nestLevel); _local3.updateCompletePendingFlag = true; }; _local3 = ILayoutManagerClient(invalidatePropertiesQueue.removeSmallestChild(_arg1)); }; if (invalidatePropertiesQueue.isEmpty()){ invalidatePropertiesFlag = false; invalidateClientPropertiesFlag = false; }; _local3 = ILayoutManagerClient(invalidateSizeQueue.removeLargestChild(_arg1)); while (_local3) { _local3.validateSize(); if (!_local3.updateCompletePendingFlag){ updateCompleteQueue.addObject(_local3, _local3.nestLevel); _local3.updateCompletePendingFlag = true; }; if (invalidateClientPropertiesFlag){ _local3 = ILayoutManagerClient(invalidatePropertiesQueue.removeSmallestChild(_arg1)); if (_local3){ invalidatePropertiesQueue.addObject(_local3, _local3.nestLevel); _local5 = false; break; }; }; _local3 = ILayoutManagerClient(invalidateSizeQueue.removeLargestChild(_arg1)); }; if (invalidateSizeQueue.isEmpty()){ invalidateSizeFlag = false; invalidateClientSizeFlag = false; }; if (!_arg2){ _local3 = ILayoutManagerClient(invalidateDisplayListQueue.removeSmallestChild(_arg1)); while (_local3) { _local3.validateDisplayList(); if (!_local3.updateCompletePendingFlag){ updateCompleteQueue.addObject(_local3, _local3.nestLevel); _local3.updateCompletePendingFlag = true; }; if (invalidateClientPropertiesFlag){ _local3 = ILayoutManagerClient(invalidatePropertiesQueue.removeSmallestChild(_arg1)); if (_local3){ invalidatePropertiesQueue.addObject(_local3, _local3.nestLevel); _local5 = false; break; }; }; if (invalidateClientSizeFlag){ _local3 = ILayoutManagerClient(invalidateSizeQueue.removeLargestChild(_arg1)); if (_local3){ invalidateSizeQueue.addObject(_local3, _local3.nestLevel); _local5 = false; break; }; }; _local3 = ILayoutManagerClient(invalidateDisplayListQueue.removeSmallestChild(_arg1)); }; if (invalidateDisplayListQueue.isEmpty()){ invalidateDisplayListFlag = false; }; }; }; if (_local6 == int.MAX_VALUE){ targetLevel = int.MAX_VALUE; if (!_arg2){ _local3 = ILayoutManagerClient(updateCompleteQueue.removeLargestChild(_arg1)); while (_local3) { if (!_local3.initialized){ _local3.initialized = true; }; _local3.dispatchEvent(new FlexEvent(FlexEvent.UPDATE_COMPLETE)); _local3.updateCompletePendingFlag = false; _local3 = ILayoutManagerClient(updateCompleteQueue.removeLargestChild(_arg1)); }; }; }; } private function validateDisplayList():void{ var _local1:ILayoutManagerClient; _local1 = ILayoutManagerClient(invalidateDisplayListQueue.removeSmallest()); while (_local1) { _local1.validateDisplayList(); if (!_local1.updateCompletePendingFlag){ updateCompleteQueue.addObject(_local1, _local1.nestLevel); _local1.updateCompletePendingFlag = true; }; _local1 = ILayoutManagerClient(invalidateDisplayListQueue.removeSmallest()); }; if (invalidateDisplayListQueue.isEmpty()){ invalidateDisplayListFlag = false; }; } private function validateSize():void{ var _local1:ILayoutManagerClient; _local1 = ILayoutManagerClient(invalidateSizeQueue.removeLargest()); while (_local1) { _local1.validateSize(); if (!_local1.updateCompletePendingFlag){ updateCompleteQueue.addObject(_local1, _local1.nestLevel); _local1.updateCompletePendingFlag = true; }; _local1 = ILayoutManagerClient(invalidateSizeQueue.removeLargest()); }; if (invalidateSizeQueue.isEmpty()){ invalidateSizeFlag = false; }; } public function invalidateProperties(_arg1:ILayoutManagerClient):void{ if (((!(invalidatePropertiesFlag)) && (Application.application.systemManager))){ invalidatePropertiesFlag = true; if (!callLaterPending){ if (!callLaterObject){ callLaterObject = new UIComponent(); callLaterObject.systemManager = Application.application.systemManager; callLaterObject.callLater(waitAFrame); } else { callLaterObject.callLater(doPhasedInstantiation); }; callLaterPending = true; }; }; if (targetLevel <= _arg1.nestLevel){ invalidateClientPropertiesFlag = true; }; invalidatePropertiesQueue.addObject(_arg1, _arg1.nestLevel); } public function invalidateDisplayList(_arg1:ILayoutManagerClient):void{ if (((!(invalidateDisplayListFlag)) && (Application.application.systemManager))){ invalidateDisplayListFlag = true; if (!callLaterPending){ if (!callLaterObject){ callLaterObject = new UIComponent(); callLaterObject.systemManager = Application.application.systemManager; callLaterObject.callLater(waitAFrame); } else { callLaterObject.callLater(doPhasedInstantiation); }; callLaterPending = true; }; }; invalidateDisplayListQueue.addObject(_arg1, _arg1.nestLevel); } public function validateNow():void{ var _local1:int; if (!usePhasedInstantiation){ _local1 = 0; while (((callLaterPending) && ((_local1 < 100)))) { doPhasedInstantiation(); }; }; } public function invalidateSize(_arg1:ILayoutManagerClient):void{ if (((!(invalidateSizeFlag)) && (Application.application.systemManager))){ invalidateSizeFlag = true; if (!callLaterPending){ if (!callLaterObject){ callLaterObject = new UIComponent(); callLaterObject.systemManager = Application.application.systemManager; callLaterObject.callLater(waitAFrame); } else { callLaterObject.callLater(doPhasedInstantiation); }; callLaterPending = true; }; }; if (targetLevel <= _arg1.nestLevel){ invalidateClientSizeFlag = true; }; invalidateSizeQueue.addObject(_arg1, _arg1.nestLevel); } public function isInvalid():Boolean{ return (((((invalidatePropertiesFlag) || (invalidateSizeFlag))) || (invalidateDisplayListFlag))); } private function validateProperties():void{ var _local1:ILayoutManagerClient; _local1 = ILayoutManagerClient(invalidatePropertiesQueue.removeSmallest()); while (_local1) { _local1.validateProperties(); if (!_local1.updateCompletePendingFlag){ updateCompleteQueue.addObject(_local1, _local1.nestLevel); _local1.updateCompletePendingFlag = true; }; _local1 = ILayoutManagerClient(invalidatePropertiesQueue.removeSmallest()); }; if (invalidatePropertiesQueue.isEmpty()){ invalidatePropertiesFlag = false; }; } private function doPhasedInstantiation():void{ var _local1:ILayoutManagerClient; if (usePhasedInstantiation){ if (invalidatePropertiesFlag){ validateProperties(); Application.application.dispatchEvent(new Event("validatePropertiesComplete")); } else { if (invalidateSizeFlag){ validateSize(); Application.application.dispatchEvent(new Event("validateSizeComplete")); } else { if (invalidateDisplayListFlag){ validateDisplayList(); Application.application.dispatchEvent(new Event("validateDisplayListComplete")); }; }; }; } else { if (invalidatePropertiesFlag){ validateProperties(); }; if (invalidateSizeFlag){ validateSize(); }; if (invalidateDisplayListFlag){ validateDisplayList(); }; }; if (((((invalidatePropertiesFlag) || (invalidateSizeFlag))) || (invalidateDisplayListFlag))){ callLaterObject.callLater(doPhasedInstantiation); } else { usePhasedInstantiation = false; callLaterPending = false; _local1 = ILayoutManagerClient(updateCompleteQueue.removeLargest()); while (_local1) { if (((!(_local1.initialized)) && (_local1.processedDescriptors))){ _local1.initialized = true; }; _local1.dispatchEvent(new FlexEvent(FlexEvent.UPDATE_COMPLETE)); _local1.updateCompletePendingFlag = false; _local1 = ILayoutManagerClient(updateCompleteQueue.removeLargest()); }; dispatchEvent(new FlexEvent(FlexEvent.UPDATE_COMPLETE)); }; } public function set usePhasedInstantiation(_arg1:Boolean):void{ var _local2:Stage; if (_usePhasedInstantiation != _arg1){ _usePhasedInstantiation = _arg1; _local2 = SystemManagerGlobals.topLevelSystemManagers[0].stage; if (_arg1){ originalFrameRate = _local2.frameRate; _local2.frameRate = 1000; } else { _local2.frameRate = originalFrameRate; }; }; } public static function getInstance():LayoutManager{ if (!instance){ instance = new (LayoutManager); }; return (instance); } } }//package mx.managers
Section 361
//SystemChildrenList (mx.managers.SystemChildrenList) package mx.managers { import mx.core.*; import flash.display.*; import flash.geom.*; public class SystemChildrenList implements IChildList { private var lowerBoundReference:QName; private var upperBoundReference:QName; private var owner:SystemManager; mx_internal static const VERSION:String = "2.0.1.0"; public function SystemChildrenList(_arg1:SystemManager, _arg2:QName, _arg3:QName){ this.owner = _arg1; this.lowerBoundReference = _arg2; this.upperBoundReference = _arg3; } public function getChildAt(_arg1:int):DisplayObject{ var _local2:DisplayObject; _local2 = owner.mx_internal::rawChildren_getChildAt((owner[lowerBoundReference] + _arg1)); return (_local2); } public function addChild(_arg1:DisplayObject):DisplayObject{ var _local2 = owner; _local2.mx_internal::rawChildren_addChildAt(_arg1, owner[upperBoundReference]); _local2 = owner; var _local3 = upperBoundReference; var _local4 = (_local2[_local3] + 1); _local2[_local3] = _local4; return (_arg1); } public function getChildByName(_arg1:String):DisplayObject{ return (owner.mx_internal::rawChildren_getChildByName(_arg1)); } public function removeChildAt(_arg1:int):DisplayObject{ var _local2:DisplayObject; _local2 = owner.mx_internal::rawChildren_removeChildAt((_arg1 + owner[lowerBoundReference])); var _local3 = owner; var _local4 = upperBoundReference; var _local5 = (_local3[_local4] - 1); _local3[_local4] = _local5; return (_local2); } public function getChildIndex(_arg1:DisplayObject):int{ var _local2:int; _local2 = owner.mx_internal::rawChildren_getChildIndex(_arg1); _local2 = (_local2 - owner[lowerBoundReference]); return (_local2); } public function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{ var _local3 = owner; _local3.mx_internal::rawChildren_addChildAt(_arg1, (owner[lowerBoundReference] + _arg2)); _local3 = owner; var _local4 = upperBoundReference; var _local5 = (_local3[_local4] + 1); _local3[_local4] = _local5; return (_arg1); } public function getObjectsUnderPoint(_arg1:Point):Array{ return (owner.mx_internal::rawChildren_getObjectsUnderPoint(_arg1)); } public function setChildIndex(_arg1:DisplayObject, _arg2:int):void{ var _local3 = owner; _local3.mx_internal::rawChildren_setChildIndex(_arg1, (owner[lowerBoundReference] + _arg2)); } public function get numChildren():int{ return ((owner[upperBoundReference] - owner[lowerBoundReference])); } public function contains(_arg1:DisplayObject):Boolean{ var _local2:int; if (owner.mx_internal::rawChildren_contains(_arg1)){ while (_arg1.parent != owner) { _arg1 = _arg1.parent; }; _local2 = owner.mx_internal::rawChildren_getChildIndex(_arg1); if ((((_local2 >= owner[lowerBoundReference])) && ((_local2 < owner[upperBoundReference])))){ return (true); }; }; return (false); } public function removeChild(_arg1:DisplayObject):DisplayObject{ var _local2:int; _local2 = owner.mx_internal::rawChildren_getChildIndex(_arg1); if ((((owner[lowerBoundReference] <= _local2)) && ((_local2 < owner[upperBoundReference])))){ var _local3 = owner; _local3.mx_internal::rawChildren_removeChild(_arg1); _local3 = owner; var _local4 = upperBoundReference; var _local5 = (_local3[_local4] - 1); _local3[_local4] = _local5; }; return (_arg1); } } }//package mx.managers
Section 362
//SystemManager (mx.managers.SystemManager) package mx.managers { import mx.core.*; import flash.system.*; import flash.display.*; import flash.events.*; import mx.styles.*; import flash.geom.*; import mx.events.*; import flash.text.*; import mx.preloaders.*; import flash.utils.*; import mx.messaging.config.*; public class SystemManager extends MovieClip implements IChildList, IFlexDisplayObject, IFlexModuleFactory, ISystemManager { mx_internal var nestLevel:int;// = 0 private var forms:Array; private var mouseCatcher:Sprite; private var _height:Number; private var preloader:Preloader; private var _topLevelSystemManager:ISystemManager; private var _rawChildren:SystemRawChildrenList; private var _toolTipIndex:int;// = 0 private var _explicitHeight:Number; private var _document:Object; private var form:IFocusManagerContainer; private var _width:Number; private var _toolTipChildren:SystemChildrenList; private var initialized:Boolean;// = false private var _focusPane:Sprite; private var isStageRoot:Boolean;// = true private var rslSizes:Array;// = null private var _fontList:Object;// = null private var nextFrameTimer:Timer;// = null private var topLevel:Boolean;// = true private var _popUpChildren:SystemChildrenList; private var _cursorIndex:int;// = 0 private var _topMostIndex:int;// = 0 mx_internal var _mouseX; mx_internal var _mouseY; private var _numModalWindows:int;// = 0 private var _screen:Rectangle; mx_internal var idleCounter:int;// = 0 private var initCallbackFunctions:Array; private var _cursorChildren:SystemChildrenList; private var _noTopMostIndex:int;// = 0 private var _applicationIndex:int;// = 1 private var idleTimer:Timer; private var doneExecutingInitCallbacks:Boolean;// = false private var _explicitWidth:Number; mx_internal var topLevelWindow:IUIComponent; private static const IDLE_THRESHOLD:Number = 1000; private static const IDLE_INTERVAL:Number = 100; mx_internal static const VERSION:String = "2.0.1.0"; mx_internal static var lastSystemManager:SystemManager; mx_internal static var allSystemManagers:Dictionary = new Dictionary(true); public function SystemManager(){ doneExecutingInitCallbacks = false; initCallbackFunctions = []; initialized = false; topLevel = true; isStageRoot = true; nestLevel = 0; rslSizes = null; forms = []; idleCounter = 0; nextFrameTimer = null; _applicationIndex = 1; _cursorIndex = 0; _fontList = null; _noTopMostIndex = 0; _numModalWindows = 0; _toolTipIndex = 0; _topMostIndex = 0; super(); if (stage){ stage.scaleMode = StageScaleMode.NO_SCALE; stage.align = StageAlign.TOP_LEFT; }; if ((((SystemManagerGlobals.topLevelSystemManagers.length > 0)) && (!(stage)))){ topLevel = false; }; if (!stage){ isStageRoot = false; }; if (topLevel){ SystemManagerGlobals.topLevelSystemManagers.push(this); }; lastSystemManager = this; executeCallbacks(); stop(); if (((topLevel) && (!((currentFrame == 1))))){ throw (new Error((("The SystemManager constructor was called when the currentFrame was at " + currentFrame) + " Please add this SWF to bug 129782."))); }; root.loaderInfo.addEventListener(Event.INIT, initHandler); } mx_internal function addingChild(_arg1:DisplayObject):void{ var _local2:int; var _local3:Class; var _local4:DisplayObjectContainer; _local2 = 1; if (!topLevel){ _local4 = parent.parent; while (_local4) { if ((_local4 is ILayoutManagerClient)){ _local2 = (ILayoutManagerClient(_local4).nestLevel + 1); break; }; _local4 = _local4.parent; }; }; nestLevel = _local2; if ((_arg1 is IUIComponent)){ IUIComponent(_arg1).systemManager = this; }; _local3 = Class(getDefinitionByName("mx.core.UIComponent")); if ((((_arg1 is IUIComponent)) && (!(IUIComponent(_arg1).document)))){ IUIComponent(_arg1).document = document; }; if ((_arg1 is ILayoutManagerClient)){ ILayoutManagerClient(_arg1).nestLevel = (nestLevel + 1); }; if ((_arg1 is InteractiveObject)){ if (doubleClickEnabled){ InteractiveObject(_arg1).doubleClickEnabled = true; }; }; if ((_arg1 is IUIComponent)){ IUIComponent(_arg1).parentChanged(this); }; if ((_arg1 is IStyleClient)){ IStyleClient(_arg1).regenerateStyleCache(true); }; if ((_arg1 is ISimpleStyleClient)){ ISimpleStyleClient(_arg1).styleChanged(null); }; if ((_arg1 is IStyleClient)){ IStyleClient(_arg1).notifyStyleChangeInChildren(null, true); }; if (((_local3) && ((_arg1 is _local3)))){ _local3(_arg1).initThemeColor(); }; if (((_local3) && ((_arg1 is _local3)))){ _local3(_arg1).stylesInitialized(); }; } mx_internal function rawChildren_addChild(_arg1:DisplayObject):DisplayObject{ addingChild(_arg1); super.addChild(_arg1); childAdded(_arg1); return (_arg1); } public function getExplicitOrMeasuredHeight():Number{ return ((isNaN(explicitHeight)) ? measuredHeight : explicitHeight); } mx_internal function notifyStyleChangeInChildren(_arg1:String, _arg2:Boolean):void{ var _local3:Boolean; var _local4:int; var _local5:int; var _local6:IStyleClient; _local3 = false; _local4 = rawChildren.numChildren; _local5 = 0; while (_local5 < _local4) { _local6 = (rawChildren.getChildAt(_local5) as IStyleClient); if (_local6){ _local6.styleChanged(_arg1); _local6.notifyStyleChangeInChildren(_arg1, _arg2); }; if (isTopLevelWindow(DisplayObject(_local6))){ _local3 = true; }; _local4 = rawChildren.numChildren; _local5++; }; if (((!(_local3)) && ((topLevelWindow is IStyleClient)))){ IStyleClient(topLevelWindow).styleChanged(_arg1); IStyleClient(topLevelWindow).notifyStyleChangeInChildren(_arg1, _arg2); }; } mx_internal function rawChildren_getObjectsUnderPoint(_arg1:Point):Array{ return (super.getObjectsUnderPoint(_arg1)); } override public function contains(_arg1:DisplayObject):Boolean{ var _local2:int; var _local3:int; var _local4:DisplayObject; if (super.contains(_arg1)){ if (_arg1.parent == this){ _local2 = super.getChildIndex(_arg1); if (_local2 < noTopMostIndex){ return (true); }; } else { _local3 = 0; while (_local3 < noTopMostIndex) { _local4 = super.getChildAt(_local3); if ((_local4 is IRawChildrenContainer)){ if (IRawChildrenContainer(_local4).rawChildren.contains(_arg1)){ return (true); }; }; if ((_local4 is DisplayObjectContainer)){ if (DisplayObjectContainer(_local4).contains(_arg1)){ return (true); }; }; _local3++; }; }; }; return (false); } private function idleTimer_timerHandler(_arg1:TimerEvent):void{ idleCounter++; if ((idleCounter * IDLE_INTERVAL) > IDLE_THRESHOLD){ dispatchEvent(new FlexEvent(FlexEvent.IDLE)); }; } private function initHandler(_arg1:Event):void{ var _local2:int; var _local3:int; allSystemManagers[this] = this.loaderInfo.url; root.loaderInfo.removeEventListener(Event.INIT, initHandler); _local2 = ((totalFrames)==1) ? 0 : 1; addFrameScript(_local2, docFrameHandler); _local3 = (_local2 + 1); while (_local3 < totalFrames) { addFrameScript(_local3, extraFrameHandler); _local3++; }; initialize(); } public function getDefinitionByName(_arg1:String):Object{ var _local2:ApplicationDomain; var _local3:Object; _local2 = (((!(topLevel)) && ((parent is Loader)))) ? Loader(parent).contentLoaderInfo.applicationDomain : (info()["currentDomain"] as ApplicationDomain); if (_local2.hasDefinition(_arg1)){ _local3 = _local2.getDefinition(_arg1); }; return (_local3); } public function get embeddedFontList():Object{ var _local1:Object; var _local2:String; var _local3:Object; if (_fontList == null){ _fontList = {}; _local1 = info()["fonts"]; for (_local2 in _local1) { _fontList[_local2] = _local1[_local2]; }; if (((!(topLevel)) && (_topLevelSystemManager))){ _local3 = _topLevelSystemManager.embeddedFontList; for (_local2 in _local3) { _fontList[_local2] = _local3[_local2]; }; }; }; return (_fontList); } mx_internal function set cursorIndex(_arg1:int):void{ var _local2:int; _local2 = (_arg1 - _cursorIndex); _cursorIndex = _arg1; } override public function getChildAt(_arg1:int):DisplayObject{ return (super.getChildAt((applicationIndex + _arg1))); } public function set document(_arg1:Object):void{ _document = _arg1; } override public function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{ if ((((_arg1 == FlexEvent.IDLE)) && (!(idleTimer)))){ idleTimer = new Timer(IDLE_INTERVAL); idleTimer.addEventListener(TimerEvent.TIMER, idleTimer_timerHandler); idleTimer.start(); addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler, true); addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler, true); }; super.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5); } override public function get mouseX():Number{ if (_mouseX === undefined){ return (super.mouseX); }; return (_mouseX); } override public function get mouseY():Number{ if (_mouseY === undefined){ return (super.mouseY); }; return (_mouseY); } public function removeFocusManager(_arg1:IFocusManagerContainer):void{ var _local2:int; var _local3:int; _local2 = forms.length; _local3 = 0; while (_local3 < _local2) { if (forms[_local3] == _arg1){ if (form == _arg1){ deactivate(_arg1); }; forms.splice(_local3, 1); return; }; _local3++; }; } private function mouseMoveHandler(_arg1:MouseEvent):void{ idleCounter = 0; } public function get rawChildren():IChildList{ if (!topLevel){ return (_topLevelSystemManager.rawChildren); }; if (!_rawChildren){ _rawChildren = new SystemRawChildrenList(this); }; return (_rawChildren); } public function get focusPane():Sprite{ return (_focusPane); } private function mouseDownHandler(_arg1:MouseEvent):void{ var _local2:int; var _local3:DisplayObject; var _local4:Boolean; var _local5:int; var _local6:int; var _local7:int; var _local8:int; var _local9:IChildList; idleCounter = 0; if (numModalWindows == 0){ if (forms.length > 1){ _local2 = forms.length; _local3 = DisplayObject(_arg1.target); _local4 = document.rawChildren.contains(_local3); while (_local3) { _local5 = 0; while (_local5 < _local2) { if (forms[_local5] == _local3){ _local6 = 0; if (((!((_local3 == form))) && ((_local3 is IFocusManagerContainer)))){ activate(IFocusManagerContainer(_local3)); }; if (popUpChildren.contains(_local3)){ _local9 = popUpChildren; } else { _local9 = this; }; _local7 = _local9.getChildIndex(_local3); _local8 = _local7; _local2 = forms.length; _local6 = 0; while (_local6 < _local2) { if (_local9.contains(forms[_local6])){ if (_local9.getChildIndex(forms[_local6]) > _local7){ _local8 = _local9.getChildIndex(forms[_local6]); }; }; _local6++; }; if ((((_local8 > _local7)) && (!(_local4)))){ _local9.setChildIndex(_local3, _local8); }; return; }; _local5++; }; _local3 = _local3.parent; }; }; }; } public function get screen():Rectangle{ if (!_screen){ Stage_resizeHandler(); }; return (_screen); } public function get preloaderBackgroundSize():String{ return (info()["backgroundSize"]); } private function docFrameHandler(_arg1:Event=null):void{ var _local2:Array; var _local3:int; var _local4:int; var _local5:Class; Singleton.registerClass("mx.managers::ICursorManager", Class(getDefinitionByName("mx.managers::CursorManagerImpl"))); Singleton.registerClass("mx.managers::IDragManager", Class(getDefinitionByName("mx.managers::DragManagerImpl"))); Singleton.registerClass("mx.managers::IHistoryManager", Class(getDefinitionByName("mx.managers::HistoryManagerImpl"))); Singleton.registerClass("mx.managers::ILayoutManager", Class(getDefinitionByName("mx.managers::LayoutManager"))); Singleton.registerClass("mx.managers::IPopUpManager", Class(getDefinitionByName("mx.managers::PopUpManagerImpl"))); Singleton.registerClass("mx.styles::IStyleManager", Class(getDefinitionByName("mx.styles::StyleManagerImpl"))); Singleton.registerClass("mx.managers::IToolTipManager", Class(getDefinitionByName("mx.managers::ToolTipManagerImpl"))); executeCallbacks(); doneExecutingInitCallbacks = true; _local2 = info()["mixins"]; if (((_local2) && ((_local2.length > 0)))){ _local3 = _local2.length; _local4 = 0; while (_local4 < _local3) { _local5 = Class(getDefinitionByName(_local2[_local4])); var _local6 = _local5; _local6["init"](this); _local4++; }; }; initializeTopLevelWindow(null); deferredNextFrame(); } private function Stage_resizeHandler(_arg1:Event=null):void{ var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:String; _local2 = stage.stageWidth; _local3 = stage.stageHeight; _local4 = loaderInfo.width; _local5 = loaderInfo.height; _local6 = ((_local4 - _local2) / 2); _local7 = ((_local5 - _local3) / 2); _local8 = stage.align; if (_local8 == StageAlign.TOP){ _local7 = 0; } else { if (_local8 == StageAlign.BOTTOM){ _local7 = (_local5 - _local3); } else { if (_local8 == StageAlign.LEFT){ _local6 = 0; } else { if (_local8 == StageAlign.RIGHT){ _local6 = (_local4 - _local2); } else { if ((((_local8 == StageAlign.TOP_LEFT)) || ((_local8 == "LT")))){ _local7 = 0; _local6 = 0; } else { if (_local8 == StageAlign.TOP_RIGHT){ _local7 = 0; _local6 = (_local4 - _local2); } else { if (_local8 == StageAlign.BOTTOM_LEFT){ _local7 = (_local5 - _local3); _local6 = 0; } else { if (_local8 == StageAlign.BOTTOM_RIGHT){ _local7 = (_local5 - _local3); _local6 = (_local4 - _local2); }; }; }; }; }; }; }; }; if (!_screen){ _screen = new Rectangle(); }; _screen.x = _local6; _screen.y = _local7; _screen.width = _local2; _screen.height = _local3; if (isStageRoot){ _width = stage.stageWidth; _height = stage.stageHeight; }; if (_arg1){ resizeMouseCatcher(); dispatchEvent(_arg1); }; } public function get explicitHeight():Number{ return (_explicitHeight); } mx_internal function set topMostIndex(_arg1:int):void{ var _local2:int; _local2 = (_arg1 - _topMostIndex); _topMostIndex = _arg1; toolTipIndex = (toolTipIndex + _local2); } override public function getChildByName(_arg1:String):DisplayObject{ return (super.getChildByName(_arg1)); } override public function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{ noTopMostIndex++; return (rawChildren_addChildAt(_arg1, (applicationIndex + _arg2))); } public function isTopLevel():Boolean{ return (topLevel); } public function deactivate(_arg1:IFocusManagerContainer):void{ var _local2:IFocusManagerContainer; var _local3:int; var _local4:int; var _local5:IFocusManagerContainer; if (form){ if ((((form == _arg1)) && ((forms.length > 1)))){ form.focusManager.deactivate(); _local3 = forms.length; _local4 = 0; while (_local4 < _local3) { _local5 = forms[_local4]; if (_local5 == _arg1){ _local4 = (_local4 + 1); while (_local4 < _local3) { _local5 = forms[_local4]; if ((((Sprite(_local5).visible == true)) && (IUIComponent(_local5).enabled))){ _local2 = _local5; }; _local4++; }; form = _local2; break; } else { if (((Sprite(_local5).visible) && (IUIComponent(_local5).enabled))){ _local2 = _local5; }; }; _local4++; }; if (form){ form.focusManager.activate(); }; }; }; } public function getExplicitOrMeasuredWidth():Number{ return ((isNaN(explicitWidth)) ? measuredWidth : explicitWidth); } public function info():Object{ return ({}); } public function get measuredWidth():Number{ return ((topLevelWindow) ? topLevelWindow.getExplicitOrMeasuredWidth() : loaderInfo.width); } mx_internal function get toolTipIndex():int{ return (_toolTipIndex); } public function setActualSize(_arg1:Number, _arg2:Number):void{ if (isStageRoot){ return; }; _width = _arg1; _height = _arg2; if (mouseCatcher){ mouseCatcher.width = _arg1; mouseCatcher.height = _arg2; }; dispatchEvent(new Event(Event.RESIZE)); } mx_internal function set applicationIndex(_arg1:int):void{ _applicationIndex = _arg1; } public function set focusPane(_arg1:Sprite):void{ if (_arg1){ addChild(_arg1); _arg1.x = 0; _arg1.y = 0; _arg1.scrollRect = null; _focusPane = _arg1; } else { removeChild(_focusPane); _focusPane = null; }; } private function executeCallbacks():void{ var _local1:Function; if (!parent){ return; }; while (initCallbackFunctions.length > 0) { _local1 = initCallbackFunctions.shift(); _local1(this); }; } override public function addChild(_arg1:DisplayObject):DisplayObject{ noTopMostIndex++; return (rawChildren_addChildAt(_arg1, (noTopMostIndex - 1))); } public function set explicitHeight(_arg1:Number):void{ _explicitHeight = _arg1; } override public function removeChild(_arg1:DisplayObject):DisplayObject{ noTopMostIndex--; return (rawChildren_removeChild(_arg1)); } mx_internal function rawChildren_removeChild(_arg1:DisplayObject):DisplayObject{ removingChild(_arg1); super.removeChild(_arg1); childRemoved(_arg1); return (_arg1); } final mx_internal function get $numChildren():int{ return (super.numChildren); } override public function get stage():Stage{ var _local1:Stage; _local1 = super.stage; if (_local1){ return (_local1); }; if (((!(topLevel)) && (_topLevelSystemManager))){ return (_topLevelSystemManager.stage); }; return (null); } public function create(... _args):Object{ var _local2:String; var _local3:Class; var _local4:String; var _local5:int; var _local6:int; _local2 = info()["mainClassName"]; if (_local2 == null){ _local4 = loaderInfo.loaderURL; _local5 = _local4.lastIndexOf("."); _local6 = _local4.lastIndexOf("/"); _local2 = _local4.substring((_local6 + 1), _local5); }; _local3 = Class(getDefinitionByName(_local2)); return ((_local3) ? new (_local3) : null); } override public function getChildIndex(_arg1:DisplayObject):int{ return ((super.getChildIndex(_arg1) - applicationIndex)); } public function get popUpChildren():IChildList{ if (!topLevel){ return (_topLevelSystemManager.popUpChildren); }; if (!_popUpChildren){ _popUpChildren = new SystemChildrenList(this, new QName(mx_internal, "noTopMostIndex"), new QName(mx_internal, "topMostIndex")); }; return (_popUpChildren); } public function activate(_arg1:IFocusManagerContainer):void{ var _local2:IFocusManagerContainer; if (form){ if (((!((form == _arg1))) && ((forms.length > 1)))){ _local2 = form; _local2.focusManager.deactivate(); }; }; form = _arg1; if (_arg1.focusManager){ _arg1.focusManager.activate(); }; } override public function setChildIndex(_arg1:DisplayObject, _arg2:int):void{ super.setChildIndex(_arg1, (applicationIndex + _arg2)); } public function get toolTipChildren():IChildList{ if (!topLevel){ return (_topLevelSystemManager.toolTipChildren); }; if (!_toolTipChildren){ _toolTipChildren = new SystemChildrenList(this, new QName(mx_internal, "topMostIndex"), new QName(mx_internal, "toolTipIndex")); }; return (_toolTipChildren); } private function deferredNextFrame():void{ if ((currentFrame + 1) > totalFrames){ return; }; if ((currentFrame + 1) <= framesLoaded){ nextFrame(); } else { nextFrameTimer = new Timer(100); nextFrameTimer.addEventListener(TimerEvent.TIMER, nextFrameTimerHandler); nextFrameTimer.start(); }; } mx_internal function get cursorIndex():int{ return (_cursorIndex); } override public function getObjectsUnderPoint(_arg1:Point):Array{ var _local2:Array; var _local3:int; var _local4:int; var _local5:DisplayObject; var _local6:Array; _local2 = []; _local3 = topMostIndex; _local4 = 0; while (_local4 < _local3) { _local5 = super.getChildAt(_local4); if ((_local5 is DisplayObjectContainer)){ _local6 = DisplayObjectContainer(_local5).getObjectsUnderPoint(_arg1); if (_local6){ _local2 = _local2.concat(_local6); }; }; _local4++; }; return (_local2); } mx_internal function rawChildren_contains(_arg1:DisplayObject):Boolean{ return (super.contains(_arg1)); } public function get document():Object{ return (_document); } private function resizeMouseCatcher():void{ var _local1:Graphics; if (mouseCatcher){ _local1 = mouseCatcher.graphics; _local1.clear(); _local1.beginFill(0, 0); _local1.drawRect(0, 0, stage.stageWidth, stage.stageHeight); _local1.endFill(); }; } override public function get height():Number{ return (_height); } mx_internal function rawChildren_getChildIndex(_arg1:DisplayObject):int{ return (super.getChildIndex(_arg1)); } mx_internal function get topMostIndex():int{ return (_topMostIndex); } public function addFocusManager(_arg1:IFocusManagerContainer):void{ forms.push(_arg1); } mx_internal function set noTopMostIndex(_arg1:int):void{ var _local2:int; _local2 = (_arg1 - _noTopMostIndex); _noTopMostIndex = _arg1; topMostIndex = (topMostIndex + _local2); } mx_internal function rawChildren_setChildIndex(_arg1:DisplayObject, _arg2:int):void{ super.setChildIndex(_arg1, _arg2); } private function mouseUpHandler(_arg1:MouseEvent):void{ idleCounter = 0; } mx_internal function childAdded(_arg1:DisplayObject):void{ _arg1.dispatchEvent(new FlexEvent(FlexEvent.ADD)); if ((_arg1 is IUIComponent)){ IUIComponent(_arg1).initialize(); }; } public function isFontFaceEmbedded(_arg1:TextFormat):Boolean{ var _local2:String; var _local3:Array; var _local4:int; var _local5:Object; var _local6:Font; var _local7:String; _local2 = _arg1.font; _local3 = Font.enumerateFonts(); _local4 = 0; while (_local4 < _local3.length) { _local6 = Font(_local3[_local4]); if (_local6.fontName == _local2){ _local7 = "regular"; if (((_arg1.bold) && (_arg1.italic))){ _local7 = "boldItalic"; } else { if (_arg1.bold){ _local7 = "bold"; } else { if (_arg1.italic){ _local7 = "italic"; }; }; }; if (_local6.fontStyle == _local7){ return (true); }; }; _local4++; }; if (((((!(_local2)) || (!(embeddedFontList)))) || (!(embeddedFontList[_local2])))){ return (false); }; _local5 = embeddedFontList[_local2]; return (!(((((((_arg1.bold) && (!(_local5.bold)))) || (((_arg1.italic) && (!(_local5.italic)))))) || (((((!(_arg1.bold)) && (!(_arg1.italic)))) && (!(_local5.regular))))))); } mx_internal function rawChildren_getChildAt(_arg1:int):DisplayObject{ return (super.getChildAt(_arg1)); } override public function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{ if (_arg1 == FlexEvent.IDLE){ super.removeEventListener(_arg1, _arg2, _arg3); if (((!(hasEventListener(FlexEvent.IDLE))) && (idleTimer))){ idleTimer.stop(); idleTimer = null; removeEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler); removeEventListener(MouseEvent.MOUSE_UP, mouseUpHandler); }; } else { super.removeEventListener(_arg1, _arg2, _arg3); }; } override public function removeChildAt(_arg1:int):DisplayObject{ noTopMostIndex--; return (rawChildren_removeChildAt((applicationIndex + _arg1))); } private function extraFrameHandler(_arg1:Event=null):void{ var _local2:Object; var _local3:Class; _local2 = info()["frames"]; if (((_local2) && (_local2[currentLabel]))){ _local3 = Class(getDefinitionByName(_local2[currentLabel])); var _local4 = _local3; _local4["frame"](this); }; deferredNextFrame(); } public function get application():IUIComponent{ return (IUIComponent(_document)); } mx_internal function rawChildren_removeChildAt(_arg1:int):DisplayObject{ var _local2:DisplayObject; _local2 = super.getChildAt(_arg1); removingChild(_local2); super.removeChildAt(_arg1); childRemoved(_local2); return (_local2); } mx_internal function removingChild(_arg1:DisplayObject):void{ _arg1.dispatchEvent(new FlexEvent(FlexEvent.REMOVE)); } mx_internal function get applicationIndex():int{ return (_applicationIndex); } mx_internal function set toolTipIndex(_arg1:int):void{ var _local2:int; _local2 = (_arg1 - _toolTipIndex); _toolTipIndex = _arg1; cursorIndex = (cursorIndex + _local2); } public function get cursorChildren():IChildList{ if (!topLevel){ return (_topLevelSystemManager.cursorChildren); }; if (!_cursorChildren){ _cursorChildren = new SystemChildrenList(this, new QName(mx_internal, "toolTipIndex"), new QName(mx_internal, "cursorIndex")); }; return (_cursorChildren); } public function get preloaderBackgroundImage():Object{ return (info()["backgroundImage"]); } public function set numModalWindows(_arg1:int):void{ _numModalWindows = _arg1; } public function get preloaderBackgroundAlpha():Number{ return (info()["backgroundAlpha"]); } private function preloader_preloaderDoneHandler(_arg1:Event):void{ var _local2:IUIComponent; _local2 = topLevelWindow; preloader.removeEventListener(FlexEvent.PRELOADER_DONE, preloader_preloaderDoneHandler); _popUpChildren.removeChild(preloader); mouseCatcher = new FlexSprite(); mouseCatcher.name = "mouseCatcher"; noTopMostIndex++; super.addChildAt(mouseCatcher, 0); resizeMouseCatcher(); if (!topLevel){ mouseCatcher.visible = false; mask = mouseCatcher; }; noTopMostIndex++; super.addChildAt(DisplayObject(_local2), 1); _local2.dispatchEvent(new FlexEvent(FlexEvent.APPLICATION_COMPLETE)); dispatchEvent(new FlexEvent(FlexEvent.APPLICATION_COMPLETE)); } mx_internal function rawChildren_getChildByName(_arg1:String):DisplayObject{ return (super.getChildByName(_arg1)); } mx_internal function initialize():void{ var _local1:Array; var _local2:Array; var _local3:Array; var _local4:int; var _local5:Boolean; var _local6:Class; if (isStageRoot){ _width = stage.stageWidth; _height = stage.stageHeight; } else { _width = loaderInfo.width; _height = loaderInfo.height; }; preloader = new Preloader(); preloader.addEventListener(FlexEvent.INIT_PROGRESS, preloader_initProgressHandler); preloader.addEventListener(FlexEvent.PRELOADER_DONE, preloader_preloaderDoneHandler); if (!_popUpChildren){ _popUpChildren = new SystemChildrenList(this, new QName(mx_internal, "noTopMostIndex"), new QName(mx_internal, "topMostIndex")); }; _popUpChildren.addChild(preloader); _local1 = []; _local2 = []; _local3 = info()["rsls"]; _local4 = 0; while (((_local3) && ((_local4 < _local3.length)))) { _local1[_local4] = _local3[_local4].url; _local2[_local4] = _local3[_local4].size; _local4++; }; _local5 = true; if (info()["usePreloader"] != undefined){ _local5 = info()["usePreloader"]; }; _local6 = (info()["preloader"] as Class); if (((_local5) && (!(_local6)))){ _local6 = DownloadProgressBar; }; preloader.initialize(_local5, _local6, preloaderBackgroundColor, preloaderBackgroundAlpha, preloaderBackgroundImage, preloaderBackgroundSize, (isStageRoot) ? stage.stageWidth : loaderInfo.width, (isStageRoot) ? stage.stageHeight : loaderInfo.height, _local1, _local2); } private function appCreationCompleteHandler(_arg1:FlexEvent):void{ var _local2:DisplayObjectContainer; if (((!(topLevel)) && (parent))){ _local2 = parent.parent; while (_local2) { if ((_local2 is IInvalidating)){ IInvalidating(_local2).invalidateSize(); IInvalidating(_local2).invalidateDisplayList(); return; }; _local2 = _local2.parent; }; }; } public function get measuredHeight():Number{ return ((topLevelWindow) ? topLevelWindow.getExplicitOrMeasuredHeight() : loaderInfo.height); } mx_internal function regenerateStyleCache(_arg1:Boolean):void{ var _local2:Boolean; var _local3:int; var _local4:int; var _local5:IStyleClient; _local2 = false; _local3 = rawChildren.numChildren; _local4 = 0; while (_local4 < _local3) { _local5 = (rawChildren.getChildAt(_local4) as IStyleClient); if (_local5){ _local5.regenerateStyleCache(_arg1); }; if (isTopLevelWindow(DisplayObject(_local5))){ _local2 = true; }; _local3 = rawChildren.numChildren; _local4++; }; if (((!(_local2)) && ((topLevelWindow is IStyleClient)))){ IStyleClient(topLevelWindow).regenerateStyleCache(_arg1); }; } public function get topLevelSystemManager():ISystemManager{ if (topLevel){ return (this); }; return (_topLevelSystemManager); } private function nextFrameTimerHandler(_arg1:TimerEvent):void{ if ((currentFrame + 1) <= framesLoaded){ nextFrame(); nextFrameTimer.removeEventListener(TimerEvent.TIMER, nextFrameTimerHandler); nextFrameTimer.reset(); }; } public function get preloaderBackgroundColor():uint{ var _local1:*; _local1 = info()["backgroundColor"]; if (_local1 == undefined){ return (4294967295); }; return (uint(_local1)); } mx_internal function childRemoved(_arg1:DisplayObject):void{ if ((_arg1 is IUIComponent)){ IUIComponent(_arg1).parentChanged(null); }; } override public function get numChildren():int{ return ((noTopMostIndex - applicationIndex)); } mx_internal function get noTopMostIndex():int{ return (_noTopMostIndex); } mx_internal function rawChildren_addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{ addingChild(_arg1); super.addChildAt(_arg1, _arg2); childAdded(_arg1); return (_arg1); } public function get numModalWindows():int{ return (_numModalWindows); } private function initializeTopLevelWindow(_arg1:Event):void{ var _local2:IUIComponent; var _local3:DisplayObjectContainer; initialized = true; if (!parent){ return; }; if (!topLevel){ _local3 = parent.parent; if (!_local3){ return; }; while (_local3) { if ((_local3 is IUIComponent)){ _topLevelSystemManager = IUIComponent(_local3).systemManager; break; }; _local3 = _local3.parent; }; }; addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler, true); if (((topLevel) && (stage))){ stage.addEventListener(Event.RESIZE, Stage_resizeHandler, false, 0, true); }; _local2 = (topLevelWindow = IUIComponent(create())); document = _local2; if (document){ IEventDispatcher(_local2).addEventListener(FlexEvent.CREATION_COMPLETE, appCreationCompleteHandler); if (((topLevel) && (stage))){ LoaderConfig._url = loaderInfo.url; LoaderConfig._parameters = loaderInfo.parameters; _width = stage.stageWidth; _height = stage.stageHeight; IFlexDisplayObject(_local2).setActualSize(stage.stageWidth, stage.stageHeight); } else { IFlexDisplayObject(_local2).setActualSize(loaderInfo.width, loaderInfo.height); }; preloader.registerApplication(_local2); addingChild(DisplayObject(_local2)); childAdded(DisplayObject(_local2)); } else { document = this; }; } override public function get width():Number{ return (_width); } public function isTopLevelWindow(_arg1:DisplayObject):Boolean{ return ((((_arg1 is IUIComponent)) && ((IUIComponent(_arg1) == topLevelWindow)))); } public function move(_arg1:Number, _arg2:Number):void{ } public function set explicitWidth(_arg1:Number):void{ _explicitWidth = _arg1; } private function preloader_initProgressHandler(_arg1:Event):void{ preloader.removeEventListener(FlexEvent.INIT_PROGRESS, preloader_initProgressHandler); deferredNextFrame(); } public function get explicitWidth():Number{ return (_explicitWidth); } public static function getSWFRoot(_arg1:Object):DisplayObject{ var className:String; var p:*; var sm:SystemManager; var domain:ApplicationDomain; var cls:Class; var object = _arg1; className = getQualifiedClassName(object); for (p in allSystemManagers) { sm = (p as SystemManager); domain = sm.loaderInfo.applicationDomain; try { cls = Class(domain.getDefinition(className)); if ((object is cls)){ return (sm); }; } catch(e:Error) { }; }; return (null); } mx_internal static function registerInitCallback(_arg1:Function):void{ var _local2:SystemManager; if (((!(allSystemManagers)) || (!(lastSystemManager)))){ return; }; _local2 = lastSystemManager; if (_local2.doneExecutingInitCallbacks){ _arg1(_local2); } else { _local2.initCallbackFunctions.push(_arg1); }; } } }//package mx.managers
Section 363
//SystemManagerGlobals (mx.managers.SystemManagerGlobals) package mx.managers { public class SystemManagerGlobals { public static var topLevelSystemManagers:Array = []; public static var bootstrapLoaderInfoURL:String; } }//package mx.managers
Section 364
//SystemRawChildrenList (mx.managers.SystemRawChildrenList) package mx.managers { import mx.core.*; import flash.display.*; import flash.geom.*; public class SystemRawChildrenList implements IChildList { private var owner:SystemManager; mx_internal static const VERSION:String = "2.0.1.0"; public function SystemRawChildrenList(_arg1:SystemManager){ this.owner = _arg1; } public function getChildByName(_arg1:String):DisplayObject{ return (owner.mx_internal::rawChildren_getChildByName(_arg1)); } public function removeChildAt(_arg1:int):DisplayObject{ return (owner.mx_internal::rawChildren_removeChildAt(_arg1)); } public function getChildIndex(_arg1:DisplayObject):int{ return (owner.mx_internal::rawChildren_getChildIndex(_arg1)); } public function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{ return (owner.mx_internal::rawChildren_addChildAt(_arg1, _arg2)); } public function getObjectsUnderPoint(_arg1:Point):Array{ return (owner.mx_internal::rawChildren_getObjectsUnderPoint(_arg1)); } public function setChildIndex(_arg1:DisplayObject, _arg2:int):void{ var _local3 = owner; _local3.mx_internal::rawChildren_setChildIndex(_arg1, _arg2); } public function get numChildren():int{ return (owner.mx_internal::$numChildren); } public function contains(_arg1:DisplayObject):Boolean{ return (owner.mx_internal::rawChildren_contains(_arg1)); } public function removeChild(_arg1:DisplayObject):DisplayObject{ return (owner.mx_internal::rawChildren_removeChild(_arg1)); } public function getChildAt(_arg1:int):DisplayObject{ return (owner.mx_internal::rawChildren_getChildAt(_arg1)); } public function addChild(_arg1:DisplayObject):DisplayObject{ return (owner.mx_internal::rawChildren_addChild(_arg1)); } } }//package mx.managers
Section 365
//ToolTipManager (mx.managers.ToolTipManager) package mx.managers { import mx.core.*; import flash.display.*; import flash.events.*; import mx.effects.*; public class ToolTipManager extends EventDispatcher { mx_internal static const VERSION:String = "2.0.1.0"; private static var impl:IToolTipManager = (Singleton.getInstance("mx.managers::IToolTipManager") as IToolTipManager); private static var implClassDependency:ToolTipManagerImpl; public static function get enabled():Boolean{ return (impl.enabled); } public static function set enabled(_arg1:Boolean):void{ impl.enabled = _arg1; } mx_internal static function registerToolTip(_arg1:DisplayObject, _arg2:String):void{ impl.registerToolTip(_arg1, _arg2); } public static function set hideDelay(_arg1:Number):void{ impl.hideDelay = _arg1; } public static function set showDelay(_arg1:Number):void{ impl.showDelay = _arg1; } public static function get showDelay():Number{ return (impl.showDelay); } public static function createToolTip(_arg1:String, _arg2:Number, _arg3:Number, _arg4:String=null, _arg5:IUIComponent=null):IToolTip{ return (impl.createToolTip(_arg1, _arg2, _arg3, _arg4, _arg5)); } public static function destroyToolTip(_arg1:IToolTip):void{ return (impl.destroyToolTip(_arg1)); } public static function get scrubDelay():Number{ return (impl.scrubDelay); } public static function get toolTipClass():Class{ return (impl.toolTipClass); } mx_internal static function registerErrorString(_arg1:DisplayObject, _arg2:String):void{ impl.registerErrorString(_arg1, _arg2); } mx_internal static function sizeTip(_arg1:IToolTip):void{ impl.sizeTip(_arg1); } public static function set currentTarget(_arg1:DisplayObject):void{ impl.currentTarget = _arg1; } public static function set showEffect(_arg1:Effect):void{ impl.showEffect = _arg1; } public static function get hideDelay():Number{ return (impl.hideDelay); } public static function set hideEffect(_arg1:Effect):void{ impl.hideEffect = _arg1; } public static function set scrubDelay(_arg1:Number):void{ impl.scrubDelay = _arg1; } public static function get currentToolTip():IToolTip{ return (impl.currentToolTip); } public static function set currentToolTip(_arg1:IToolTip):void{ impl.currentToolTip = _arg1; } public static function get showEffect():Effect{ return (impl.showEffect); } public static function get currentTarget():DisplayObject{ return (impl.currentTarget); } public static function get hideEffect():Effect{ return (impl.hideEffect); } public static function set toolTipClass(_arg1:Class):void{ impl.toolTipClass = _arg1; } } }//package mx.managers
Section 366
//ToolTipManagerImpl (mx.managers.ToolTipManagerImpl) package mx.managers { import mx.core.*; import flash.display.*; import flash.events.*; import mx.styles.*; import flash.geom.*; import mx.events.*; import mx.effects.*; import flash.utils.*; import mx.validators.*; import mx.controls.*; public class ToolTipManagerImpl extends EventDispatcher implements IToolTipManager { private var _enabled:Boolean;// = true private var _showDelay:Number;// = 500 private var _hideEffect:Effect; private var hideTimer:Timer; private var _toolTipClass:Class; private var _scrubDelay:Number;// = 100 private var showTimer:Timer; private var _currentToolTip:IToolTip; private var currentText:String; private var scrubTimer:Timer; private var previousTarget:DisplayObject; private var _currentTarget:DisplayObject; private var _showEffect:Effect; private var initialized:Boolean;// = false private var _hideDelay:Number;// = 10000 private var isError:Boolean; mx_internal static const VERSION:String = "2.0.1.0"; private static var instance:IToolTipManager; public function ToolTipManagerImpl(){ initialized = false; _enabled = true; _hideDelay = 10000; _scrubDelay = 100; _showDelay = 500; _toolTipClass = ToolTip; super(); if (instance){ throw (new Error("Instance already exists.")); }; } private function toolTipMouseOverHandler(_arg1:MouseEvent):void{ checkIfTargetChanged(DisplayObject(_arg1.target)); } private function showTimer_timerHandler(_arg1:TimerEvent):void{ if (currentTarget){ createTip(); initializeTip(); positionTip(); showTip(); }; } private function systemManager_mouseDownHandler(_arg1:MouseEvent):void{ reset(); } public function set showDelay(_arg1:Number):void{ _showDelay = _arg1; } private function hideEffectEnded():void{ var _local1:ToolTipEvent; reset(); if (previousTarget){ _local1 = new ToolTipEvent(ToolTipEvent.TOOL_TIP_END); _local1.toolTip = currentToolTip; previousTarget.dispatchEvent(_local1); }; } public function set scrubDelay(_arg1:Number):void{ _scrubDelay = _arg1; } public function get currentToolTip():IToolTip{ return (_currentToolTip); } private function toolTipMouseOutHandler(_arg1:MouseEvent):void{ checkIfTargetChanged(_arg1.relatedObject); } public function get enabled():Boolean{ return (_enabled); } public function createToolTip(_arg1:String, _arg2:Number, _arg3:Number, _arg4:String=null, _arg5:IUIComponent=null):IToolTip{ var _local6:ToolTip; var _local7:ISystemManager; _local6 = new ToolTip(); _local7 = (_arg5) ? _arg5.systemManager : Application.application.systemManager; _local7.toolTipChildren.addChild(_local6); if (_arg4){ _local6.setStyle("styleName", "errorTip"); _local6.setStyle("borderStyle", _arg4); }; _local6.text = _arg1; sizeTip(_local6); _local6.move(_arg2, _arg3); return ((_local6 as IToolTip)); } private function reset():void{ var _local1:ISystemManager; showTimer.reset(); hideTimer.reset(); if (currentToolTip){ if (((showEffect) || (hideEffect))){ currentToolTip.removeEventListener(EffectEvent.EFFECT_END, effectEndHandler); }; EffectManager.endEffectsForTarget(currentToolTip); _local1 = getSystemManager(previousTarget); _local1.toolTipChildren.removeChild(DisplayObject(currentToolTip)); currentToolTip = null; scrubTimer.delay = scrubDelay; scrubTimer.reset(); if (scrubDelay > 0){ scrubTimer.delay = scrubDelay; scrubTimer.start(); }; }; } public function set currentToolTip(_arg1:IToolTip):void{ _currentToolTip = _arg1; } private function showTip():void{ var _local1:ToolTipEvent; var _local2:ISystemManager; _local1 = new ToolTipEvent(ToolTipEvent.TOOL_TIP_SHOW); _local1.toolTip = currentToolTip; currentTarget.dispatchEvent(_local1); if (isError){ currentTarget.addEventListener("change", changeHandler); } else { _local2 = getSystemManager(currentTarget); _local2.addEventListener(MouseEvent.MOUSE_DOWN, systemManager_mouseDownHandler); }; currentToolTip.visible = true; if (!showEffect){ showEffectEnded(); }; } private function effectEndHandler(_arg1:EffectEvent):void{ if (_arg1.effectInstance.effect == showEffect){ showEffectEnded(); } else { if (_arg1.effectInstance.effect == hideEffect){ hideEffectEnded(); }; }; } public function get hideDelay():Number{ return (_hideDelay); } public function get toolTipClass():Class{ return (_toolTipClass); } public function get currentTarget():DisplayObject{ return (_currentTarget); } public function get hideEffect():Effect{ return (_hideEffect); } private function showEffectEnded():void{ var _local1:ToolTipEvent; if (hideDelay == 0){ hideTip(); } else { if (hideDelay < Infinity){ hideTimer.delay = hideDelay; hideTimer.start(); }; }; if (currentTarget){ _local1 = new ToolTipEvent(ToolTipEvent.TOOL_TIP_SHOWN); _local1.toolTip = currentToolTip; currentTarget.dispatchEvent(_local1); }; } public function set enabled(_arg1:Boolean):void{ _enabled = _arg1; } private function errorTipMouseOverHandler(_arg1:MouseEvent):void{ checkIfTargetChanged(DisplayObject(_arg1.target)); } public function get scrubDelay():Number{ return (_scrubDelay); } public function get showDelay():Number{ return (_showDelay); } public function registerErrorString(_arg1:DisplayObject, _arg2:String):void{ var _local3:String; _local3 = IValidatorListener(_arg1).errorString; if (((!(_local3)) && (_arg2))){ _arg1.addEventListener(MouseEvent.MOUSE_OVER, errorTipMouseOverHandler); _arg1.addEventListener(MouseEvent.MOUSE_OUT, errorTipMouseOutHandler); } else { if (((_local3) && (!(_arg2)))){ _arg1.removeEventListener(MouseEvent.MOUSE_OVER, errorTipMouseOverHandler); _arg1.removeEventListener(MouseEvent.MOUSE_OUT, errorTipMouseOutHandler); }; }; } private function initialize():void{ if (!showTimer){ showTimer = new Timer(0, 1); showTimer.addEventListener(TimerEvent.TIMER, showTimer_timerHandler); }; if (!hideTimer){ hideTimer = new Timer(0, 1); hideTimer.addEventListener(TimerEvent.TIMER, hideTimer_timerHandler); }; if (!scrubTimer){ scrubTimer = new Timer(0, 1); }; initialized = true; } public function destroyToolTip(_arg1:IToolTip):void{ var _local2:ISystemManager; _local2 = _arg1.systemManager; _local2.toolTipChildren.removeChild(DisplayObject(_arg1)); } private function checkIfTargetChanged(_arg1:DisplayObject):void{ if (!enabled){ return; }; findTarget(_arg1); if (currentTarget != previousTarget){ targetChanged(); previousTarget = currentTarget; }; } private function changeHandler(_arg1:Event):void{ reset(); } public function set toolTipClass(_arg1:Class):void{ _toolTipClass = _arg1; } private function getGlobalBounds(_arg1:DisplayObject):Rectangle{ var _local2:Point; _local2 = new Point(0, 0); _local2 = _arg1.localToGlobal(_local2); return (new Rectangle(_local2.x, _local2.y, _arg1.width, _arg1.height)); } private function positionTip():void{ var _local1:Number; var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Rectangle; var _local6:Point; var _local7:IToolTip; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; _local3 = currentToolTip.screen.width; _local4 = currentToolTip.screen.height; if (isError){ _local5 = getGlobalBounds(currentTarget); _local1 = (_local5.right + 4); _local2 = (_local5.top - 1); if ((_local1 + currentToolTip.width) > _local3){ _local8 = NaN; _local9 = NaN; _local1 = (_local5.left - 2); if (((_local1 + currentToolTip.width) + 4) > _local3){ _local8 = ((_local3 - _local1) - 4); _local9 = Object(toolTipClass).maxWidth; Object(toolTipClass).maxWidth = _local8; if ((currentToolTip is IStyleClient)){ IStyleClient(currentToolTip).setStyle("borderStyle", "errorTipAbove"); }; currentToolTip["text"] = currentToolTip["text"]; Object(toolTipClass).maxWidth = _local9; } else { if ((currentToolTip is IStyleClient)){ IStyleClient(currentToolTip).setStyle("borderStyle", "errorTipAbove"); }; currentToolTip["text"] = currentToolTip["text"]; }; if ((currentToolTip.height + 2) < _local5.top){ _local2 = (_local5.top - (currentToolTip.height + 2)); } else { _local2 = (_local5.bottom + 2); if (!isNaN(_local8)){ Object(toolTipClass).maxWidth = _local8; }; if ((currentToolTip is IStyleClient)){ IStyleClient(currentToolTip).setStyle("borderStyle", "errorTipBelow"); }; currentToolTip["text"] = currentToolTip["text"]; if (!isNaN(_local9)){ Object(toolTipClass).maxWidth = _local9; }; }; }; sizeTip(currentToolTip); _local6 = new Point(_local1, _local2); _local7 = currentToolTip; _local6 = DisplayObject(_local7).root.globalToLocal(_local6); _local1 = _local6.x; _local2 = _local6.y; } else { _local1 = (Application.application.mouseX + 11); _local2 = (Application.application.mouseY + 22); _local10 = currentToolTip.width; if ((_local1 + _local10) > _local3){ _local1 = (_local3 - _local10); }; _local11 = currentToolTip.height; if ((_local2 + _local11) > _local4){ _local2 = (_local4 - _local11); }; }; currentToolTip.move(_local1, _local2); } private function errorTipMouseOutHandler(_arg1:MouseEvent):void{ checkIfTargetChanged(_arg1.relatedObject); } private function findTarget(_arg1:DisplayObject):void{ while (_arg1) { if ((_arg1 is IValidatorListener)){ currentText = IValidatorListener(_arg1).errorString; if (((!((currentText == null))) && (!((currentText == ""))))){ currentTarget = _arg1; isError = true; return; }; }; if ((_arg1 is IToolTipManagerClient)){ currentText = IToolTipManagerClient(_arg1).toolTip; if (currentText != null){ currentTarget = _arg1; isError = false; return; }; }; _arg1 = _arg1.parent; }; currentText = null; currentTarget = null; } public function registerToolTip(_arg1:DisplayObject, _arg2:String):void{ var _local3:String; if ((_arg1 is IToolTipManagerClient)){ _local3 = IToolTipManagerClient(_arg1).toolTip; }; if (((!(_local3)) && (_arg2))){ _arg1.addEventListener(MouseEvent.MOUSE_OVER, toolTipMouseOverHandler); _arg1.addEventListener(MouseEvent.MOUSE_OUT, toolTipMouseOutHandler); } else { if (((_local3) && (!(_arg2)))){ _arg1.removeEventListener(MouseEvent.MOUSE_OVER, toolTipMouseOverHandler); _arg1.removeEventListener(MouseEvent.MOUSE_OUT, toolTipMouseOutHandler); }; }; } public function set hideDelay(_arg1:Number):void{ _hideDelay = _arg1; } private function getSystemManager(_arg1:DisplayObject):ISystemManager{ return (((_arg1 is IUIComponent)) ? IUIComponent(_arg1).systemManager : null); } public function set currentTarget(_arg1:DisplayObject):void{ _currentTarget = _arg1; } public function set showEffect(_arg1:Effect):void{ _showEffect = _arg1; } public function sizeTip(_arg1:IToolTip):void{ if ((_arg1 is IInvalidating)){ IInvalidating(_arg1).validateNow(); }; _arg1.setActualSize(_arg1.getExplicitOrMeasuredWidth(), _arg1.getExplicitOrMeasuredHeight()); } public function set hideEffect(_arg1:Effect):void{ _hideEffect = _arg1; } private function hideTimer_timerHandler(_arg1:TimerEvent):void{ hideTip(); } private function targetChanged():void{ var _local1:ToolTipEvent; if (!initialized){ initialize(); }; if (((previousTarget) && (currentToolTip))){ _local1 = new ToolTipEvent(ToolTipEvent.TOOL_TIP_HIDE); _local1.toolTip = currentToolTip; previousTarget.dispatchEvent(_local1); }; reset(); if (currentTarget){ if (currentText == ""){ return; }; _local1 = new ToolTipEvent(ToolTipEvent.TOOL_TIP_START); currentTarget.dispatchEvent(_local1); if ((((showDelay == 0)) || (scrubTimer.running))){ createTip(); initializeTip(); positionTip(); showTip(); } else { showTimer.delay = showDelay; showTimer.start(); }; }; } private function initializeTip():void{ if ((currentToolTip is ToolTip)){ ToolTip(currentToolTip).text = currentText; }; if (((isError) && ((currentToolTip is IStyleClient)))){ IStyleClient(currentToolTip).setStyle("styleName", "errorTip"); }; sizeTip(currentToolTip); if ((currentToolTip is IStyleClient)){ if (showEffect){ IStyleClient(currentToolTip).setStyle("showEffect", showEffect); }; if (hideEffect){ IStyleClient(currentToolTip).setStyle("hideEffect", hideEffect); }; }; if (((showEffect) || (hideEffect))){ currentToolTip.addEventListener(EffectEvent.EFFECT_END, effectEndHandler); }; } public function get showEffect():Effect{ return (_showEffect); } private function hideTip():void{ var _local1:ToolTipEvent; var _local2:ISystemManager; if (previousTarget){ _local1 = new ToolTipEvent(ToolTipEvent.TOOL_TIP_HIDE); _local1.toolTip = currentToolTip; previousTarget.dispatchEvent(_local1); }; if (currentToolTip){ currentToolTip.visible = false; }; if (isError){ if (currentTarget){ currentTarget.removeEventListener("change", changeHandler); }; } else { if (previousTarget){ _local2 = getSystemManager(previousTarget); _local2.removeEventListener(MouseEvent.MOUSE_DOWN, systemManager_mouseDownHandler); }; }; if (!hideEffect){ hideEffectEnded(); }; } private function createTip():void{ var _local1:ToolTipEvent; var _local2:ISystemManager; _local1 = new ToolTipEvent(ToolTipEvent.TOOL_TIP_CREATE); currentTarget.dispatchEvent(_local1); if (_local1.toolTip){ currentToolTip = _local1.toolTip; } else { currentToolTip = new toolTipClass(); }; currentToolTip.visible = false; _local2 = getSystemManager(currentTarget); _local2.toolTipChildren.addChild(DisplayObject(currentToolTip)); } public static function getInstance():IToolTipManager{ if (!instance){ instance = new (ToolTipManagerImpl); }; return (instance); } } }//package mx.managers
Section 367
//LoaderConfig (mx.messaging.config.LoaderConfig) package mx.messaging.config { public class LoaderConfig { mx_internal static const VERSION:String = "2.0.1.0"; mx_internal static var _url:String = null; mx_internal static var _parameters:Object; public static function get url():String{ return (_url); } public static function get parameters():Object{ return (_parameters); } } }//package mx.messaging.config
Section 368
//IModuleInfo (mx.modules.IModuleInfo) package mx.modules { import mx.core.*; import flash.system.*; import flash.events.*; public interface IModuleInfo extends IEventDispatcher { function get ready():Boolean; function get loaded():Boolean; function get error():Boolean; function get factory():IFlexModuleFactory; function release():void; function get data():Object; function load(_arg1:ApplicationDomain=null, _arg2:SecurityDomain=null):void; function get url():String; function set data(_arg1:Object):void; function get setup():Boolean; function publish(_arg1:IFlexModuleFactory):void; function unload():void; } }//package mx.modules
Section 369
//ModuleManager (mx.modules.ModuleManager) package mx.modules { import mx.core.*; public class ModuleManager { mx_internal static const VERSION:String = "2.0.1.0"; public static function getModule(_arg1:String):IModuleInfo{ return (getSingleton().getModule(_arg1)); } private static function getSingleton():Object{ if (!ModuleManagerGlobals.managerSingleton){ ModuleManagerGlobals.managerSingleton = new ModuleManagerImpl(); }; return (ModuleManagerGlobals.managerSingleton); } public static function getAssociatedFactory(_arg1:Object):IFlexModuleFactory{ return (getSingleton().getAssociatedFactory(_arg1)); } } }//package mx.modules import mx.core.*; import flash.system.*; import flash.display.*; import flash.events.*; import mx.events.*; import flash.net.*; import flash.utils.*; class ModuleInfoProxy extends EventDispatcher implements IModuleInfo { private var _data:Object; private var info:ModuleInfo; private var referenced:Boolean;// = false private function ModuleInfoProxy(_arg1:ModuleInfo){ referenced = false; super(); this.info = _arg1; _arg1.addEventListener(ModuleEvent.SETUP, moduleEventHandler); _arg1.addEventListener(ModuleEvent.PROGRESS, moduleEventHandler); _arg1.addEventListener(ModuleEvent.READY, moduleEventHandler); _arg1.addEventListener(ModuleEvent.ERROR, moduleEventHandler); _arg1.addEventListener(ModuleEvent.UNLOAD, moduleEventHandler); } public function get loaded():Boolean{ return (info.loaded); } public function get error():Boolean{ return (info.error); } public function set data(_arg1:Object):void{ _data = _arg1; } public function publish(_arg1:IFlexModuleFactory):void{ info.publish(_arg1); } public function get factory():IFlexModuleFactory{ return (info.factory); } public function release():void{ if (referenced){ info.removeReference(); referenced = false; }; } public function get ready():Boolean{ return (info.ready); } public function load(_arg1:ApplicationDomain=null, _arg2:SecurityDomain=null):void{ var _local3:ModuleEvent; info.resurrect(); if (!referenced){ info.addReference(); referenced = true; }; if (info.error){ dispatchEvent(new ModuleEvent(ModuleEvent.ERROR)); } else { if (info.loaded){ if (info.setup){ dispatchEvent(new ModuleEvent(ModuleEvent.SETUP)); if (info.ready){ _local3 = new ModuleEvent(ModuleEvent.PROGRESS); _local3.bytesLoaded = info.size; _local3.bytesTotal = info.size; dispatchEvent(_local3); dispatchEvent(new ModuleEvent(ModuleEvent.READY)); }; }; } else { info.load(_arg1, _arg2); }; }; } public function get data():Object{ return (_data); } private function moduleEventHandler(_arg1:ModuleEvent):void{ dispatchEvent(_arg1); } public function get url():String{ return (info.url); } public function get setup():Boolean{ return (info.setup); } public function unload():void{ info.unload(); info.removeEventListener(ModuleEvent.SETUP, moduleEventHandler); info.removeEventListener(ModuleEvent.PROGRESS, moduleEventHandler); info.removeEventListener(ModuleEvent.READY, moduleEventHandler); info.removeEventListener(ModuleEvent.ERROR, moduleEventHandler); info.removeEventListener(ModuleEvent.UNLOAD, moduleEventHandler); } } class ModuleManagerImpl extends EventDispatcher { private var moduleList:Object; private function ModuleManagerImpl(){ moduleList = {}; super(); } public function getModule(_arg1:String):IModuleInfo{ var _local2:ModuleInfo; _local2 = (moduleList[_arg1] as ModuleInfo); if (!_local2){ _local2 = new ModuleInfo(_arg1); moduleList[_arg1] = _local2; }; return (new ModuleInfoProxy(_local2)); } public function getAssociatedFactory(_arg1:Object):IFlexModuleFactory{ var className:String; var m:Object; var info:ModuleInfo; var domain:ApplicationDomain; var cls:Class; var object = _arg1; className = getQualifiedClassName(object); for each (m in moduleList) { info = (m as ModuleInfo); if (!info.ready){ } else { domain = info.applicationDomain; try { cls = Class(domain.getDefinition(className)); if ((object is cls)){ return (info.factory); }; } catch(error:Error) { }; }; }; return (null); } } class ModuleInfo extends EventDispatcher { private var _error:Boolean;// = false private var loader:Loader; private var _loaded:Boolean;// = false private var _ready:Boolean;// = false private var numReferences:int;// = 0 private var _url:String; private var factoryInfo:FactoryInfo; private var limbo:Dictionary; private var _setup:Boolean;// = false private function ModuleInfo(_arg1:String){ numReferences = 0; _error = false; _loaded = false; _ready = false; _setup = false; super(); _url = _arg1; } public function get loaded():Boolean{ return ((limbo) ? false : _loaded); } public function get error():Boolean{ return ((limbo) ? false : _error); } public function get factory():IFlexModuleFactory{ return ((((!(limbo)) && (factoryInfo))) ? factoryInfo.factory : null); } public function release():void{ if (((_ready) && (!(limbo)))){ limbo = new Dictionary(true); limbo[factoryInfo] = 1; factoryInfo = null; } else { unload(); }; } public function get size():int{ return ((((!(limbo)) && (factoryInfo))) ? factoryInfo.bytesTotal : 0); } public function publish(_arg1:IFlexModuleFactory):void{ if (factoryInfo){ return; }; if (_url.indexOf("published://") != 0){ return; }; factoryInfo = new FactoryInfo(); factoryInfo.factory = _arg1; _loaded = true; _setup = true; _ready = true; _error = false; dispatchEvent(new ModuleEvent(ModuleEvent.SETUP)); dispatchEvent(new ModuleEvent(ModuleEvent.PROGRESS)); dispatchEvent(new ModuleEvent(ModuleEvent.READY)); } public function initHandler(_arg1:Event):void{ var moduleEvent:ModuleEvent; var event = _arg1; factoryInfo = new FactoryInfo(); try { factoryInfo.factory = (loader.content as IFlexModuleFactory); } catch(error:Error) { }; if (!factoryInfo.factory){ moduleEvent = new ModuleEvent(ModuleEvent.ERROR, event.bubbles, event.cancelable); moduleEvent.bytesLoaded = 0; moduleEvent.bytesTotal = 0; moduleEvent.errorText = "SWF is not a loadable module"; dispatchEvent(moduleEvent); return; }; loader.content.addEventListener("ready", readyHandler); try { factoryInfo.applicationDomain = loader.contentLoaderInfo.applicationDomain; } catch(error:Error) { }; _setup = true; dispatchEvent(new ModuleEvent(ModuleEvent.SETUP)); } public function resurrect():void{ var _local1:Object; if (((!(factoryInfo)) && (limbo))){ for (_local1 in limbo) { factoryInfo = (_local1 as FactoryInfo); break; }; limbo = null; }; if (!factoryInfo){ if (_loaded){ dispatchEvent(new ModuleEvent(ModuleEvent.UNLOAD)); }; loader = null; _loaded = false; _setup = false; _ready = false; _error = false; }; } public function errorHandler(_arg1:ErrorEvent):void{ var _local2:ModuleEvent; _error = true; _local2 = new ModuleEvent(ModuleEvent.ERROR, _arg1.bubbles, _arg1.cancelable); _local2.bytesLoaded = 0; _local2.bytesTotal = 0; _local2.errorText = _arg1.text; dispatchEvent(_local2); } public function get ready():Boolean{ return ((limbo) ? false : _ready); } public function removeReference():void{ numReferences--; if (numReferences == 0){ release(); }; } public function addReference():void{ numReferences++; } public function get applicationDomain():ApplicationDomain{ return ((((!(limbo)) && (factoryInfo))) ? factoryInfo.applicationDomain : null); } public function readyHandler(_arg1:Event):void{ _ready = true; factoryInfo.bytesTotal = loader.contentLoaderInfo.bytesTotal; clearLoader(); dispatchEvent(new ModuleEvent(ModuleEvent.READY)); } private function clearLoader():void{ if (loader){ if (loader.contentLoaderInfo){ loader.contentLoaderInfo.removeEventListener(Event.INIT, initHandler); loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, completeHandler); loader.contentLoaderInfo.removeEventListener(ProgressEvent.PROGRESS, progressHandler); loader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, errorHandler); loader.contentLoaderInfo.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, errorHandler); }; try { if (loader.content){ loader.content.removeEventListener("ready", readyHandler); }; } catch(error:Error) { }; if (_loaded){ try { loader.close(); } catch(error:Error) { }; }; try { loader.unload(); } catch(error:Error) { }; loader = null; }; } public function progressHandler(_arg1:ProgressEvent):void{ var _local2:ModuleEvent; _local2 = new ModuleEvent(ModuleEvent.PROGRESS, _arg1.bubbles, _arg1.cancelable); _local2.bytesLoaded = _arg1.bytesLoaded; _local2.bytesTotal = _arg1.bytesTotal; dispatchEvent(_local2); } public function load(_arg1:ApplicationDomain=null, _arg2:SecurityDomain=null):void{ var _local3:URLRequest; var _local4:LoaderContext; if (_loaded){ return; }; _loaded = true; limbo = null; if (_url.indexOf("published://") == 0){ return; }; _local3 = new URLRequest(_url); _local4 = new LoaderContext(); _local4.applicationDomain = (_arg1) ? _arg1 : new ApplicationDomain(ApplicationDomain.currentDomain); _local4.securityDomain = _arg2; if ((((_arg2 == null)) && ((Security.sandboxType == Security.REMOTE)))){ _local4.securityDomain = SecurityDomain.currentDomain; }; loader = new Loader(); loader.contentLoaderInfo.addEventListener(Event.INIT, initHandler); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler); loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, progressHandler); loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, errorHandler); loader.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, errorHandler); loader.load(_local3, _local4); } public function completeHandler(_arg1:Event):void{ var _local2:ModuleEvent; _local2 = new ModuleEvent(ModuleEvent.PROGRESS, _arg1.bubbles, _arg1.cancelable); _local2.bytesLoaded = loader.contentLoaderInfo.bytesLoaded; _local2.bytesTotal = loader.contentLoaderInfo.bytesTotal; dispatchEvent(_local2); } public function get url():String{ return (_url); } public function get setup():Boolean{ return ((limbo) ? false : _setup); } public function unload():void{ clearLoader(); if (_loaded){ dispatchEvent(new ModuleEvent(ModuleEvent.UNLOAD)); }; limbo = null; factoryInfo = null; _loaded = false; _setup = false; _ready = false; _error = false; } } class FactoryInfo { public var bytesTotal:int;// = 0 public var factory:IFlexModuleFactory; public var applicationDomain:ApplicationDomain; private function FactoryInfo(){ bytesTotal = 0; super(); } }
Section 370
//ModuleManagerGlobals (mx.modules.ModuleManagerGlobals) package mx.modules { public class ModuleManagerGlobals { public static var managerSingleton:Object = null; } }//package mx.modules
Section 371
//DownloadProgressBar (mx.preloaders.DownloadProgressBar) package mx.preloaders { import flash.system.*; import flash.display.*; import flash.events.*; import flash.geom.*; import mx.events.*; import flash.text.*; import mx.graphics.*; import flash.net.*; import flash.utils.*; public class DownloadProgressBar extends Sprite implements IPreloaderDisplay { private var _stageHeight:Number;// = 375 private var _percentRect:Rectangle; private var _percentObj:TextField; private var _backgroundSize:String;// = "" private var _showLabel:Boolean;// = true private var _value:Number;// = 0 private var _backgroundAlpha:Number;// = 1 private var _backgroundImage:Object; private var _backgroundColor:uint; protected var DOWNLOAD_PERCENTAGE:uint;// = 60 private var _labelObj:TextField; private var _barFrameSprite:Sprite; private var _maximum:Number;// = 0 private var _startTime:int; private var _preloader:Sprite; private var _displayTime:int; protected var MINIMUM_DISPLAY_TIME:uint;// = 0 private var _stageWidth:Number;// = 500 private var _downloadingLabel:String;// = "Loading" private var _showProgressBar:Boolean;// = true private var _yOffset:Number;// = 20 private var _initProgressCount:uint;// = 0 private var _barSprite:Sprite; private var _visible:Boolean;// = false private var _barRect:RoundedRectangle; private var _showingDisplay:Boolean;// = false private var _initProgressTotal:uint;// = 12 private var _startedInit:Boolean;// = false private var _labelRect:Rectangle; private var _showPercentage:Boolean;// = false private var _startedLoading:Boolean;// = false private var _displayStartCount:uint;// = 0 private var _borderRect:RoundedRectangle; private var _xOffset:Number;// = 20 private var _label:String;// = "" private var _barFrameRect:RoundedRectangle; mx_internal static const VERSION:String = "2.0.1.0"; private static var _initializingLabel:String = "Initializing"; public function DownloadProgressBar(){ MINIMUM_DISPLAY_TIME = 0; DOWNLOAD_PERCENTAGE = 60; _showProgressBar = true; _labelRect = labelRect; _percentRect = percentRect; _borderRect = borderRect; _barFrameRect = barFrameRect; _barRect = barRect; _xOffset = 20; _yOffset = 20; _maximum = 0; _value = 0; _startedLoading = false; _startedInit = false; _showingDisplay = false; _displayStartCount = 0; _initProgressCount = 0; _initProgressTotal = 12; _visible = false; _backgroundAlpha = 1; _backgroundSize = ""; _stageHeight = 375; _stageWidth = 500; _downloadingLabel = "Loading"; _label = ""; _showLabel = true; _showPercentage = false; super(); } private function calcScale():void{ var _local1:Number; if ((((stageWidth < 160)) || ((stageHeight < 120)))){ scaleX = 1; scaleY = 1; } else { if ((((stageWidth < 240)) || ((stageHeight < 150)))){ createChildren(); _local1 = Math.min((stageWidth / 240), (stageHeight / 150)); scaleX = _local1; scaleY = _local1; } else { createChildren(); }; }; } protected function get labelFormat():TextFormat{ var _local1:TextFormat; _local1 = new TextFormat(); _local1.color = 0x333333; _local1.font = "Verdana"; _local1.size = 10; return (_local1); } protected function rslCompleteHandler(_arg1:RSLEvent):void{ label = ((("Loaded library " + _arg1.rslIndex) + " of ") + _arg1.rslTotal); } protected function set showLabel(_arg1:Boolean):void{ _showLabel = _arg1; draw(); } private function calcBackgroundSize():Number{ var _local1:Number; var _local2:int; _local1 = NaN; if (backgroundSize){ _local2 = backgroundSize.indexOf("%"); if (_local2 != -1){ _local1 = Number(backgroundSize.substr(0, _local2)); }; }; return (_local1); } protected function rslErrorHandler(_arg1:RSLEvent):void{ _preloader.removeEventListener(ProgressEvent.PROGRESS, progressHandler); _preloader.removeEventListener(Event.COMPLETE, completeHandler); _preloader.removeEventListener(RSLEvent.RSL_PROGRESS, rslProgressHandler); _preloader.removeEventListener(RSLEvent.RSL_COMPLETE, rslCompleteHandler); _preloader.removeEventListener(RSLEvent.RSL_ERROR, rslErrorHandler); _preloader.removeEventListener(FlexEvent.INIT_PROGRESS, initProgressHandler); _preloader.removeEventListener(FlexEvent.INIT_COMPLETE, initCompleteHandler); if (!_showingDisplay){ show(); _showingDisplay = true; }; label = ((("RSL Error " + (_arg1.rslIndex + 1)) + " of ") + _arg1.rslTotal); } protected function get barFrameRect():RoundedRectangle{ return (new RoundedRectangle(14, 40, 154, 4)); } private function loader_ioErrorHandler(_arg1:IOErrorEvent):void{ } protected function get borderRect():RoundedRectangle{ return (new RoundedRectangle(0, 0, 182, 60, 4)); } protected function showDisplayForDownloading(_arg1:int, _arg2:ProgressEvent):Boolean{ return ((((_arg1 > 700)) && ((_arg2.bytesLoaded < (_arg2.bytesTotal / 2))))); } private function timerHandler(_arg1:Event=null):void{ dispatchEvent(new Event(Event.COMPLETE)); } protected function progressHandler(_arg1:ProgressEvent):void{ var _local2:uint; var _local3:uint; var _local4:int; _local2 = _arg1.bytesLoaded; _local3 = _arg1.bytesTotal; _local4 = (getTimer() - _startTime); if (((_showingDisplay) || (showDisplayForDownloading(_local4, _arg1)))){ if (!_startedLoading){ show(); label = downloadingLabel; _startedLoading = true; }; setProgress(_arg1.bytesLoaded, _arg1.bytesTotal); }; } public function get backgroundSize():String{ return (_backgroundSize); } override public function get visible():Boolean{ return (_visible); } protected function center(_arg1:Number, _arg2:Number):void{ _xOffset = Math.floor(((_arg1 - _borderRect.width) / 2)); _yOffset = Math.floor(((_arg2 - _borderRect.height) / 2)); } protected function get barRect():RoundedRectangle{ return (new RoundedRectangle(14, 39, 154, 6, 0)); } protected function rslProgressHandler(_arg1:RSLEvent):void{ } public function set backgroundSize(_arg1:String):void{ _backgroundSize = _arg1; } private function initCompleteHandler(_arg1:Event):void{ var _local2:int; var _local3:Timer; _local2 = (getTimer() - _displayTime); if (((_showingDisplay) && ((_local2 < MINIMUM_DISPLAY_TIME)))){ _local3 = new Timer((MINIMUM_DISPLAY_TIME - _local2), 1); _local3.addEventListener(TimerEvent.TIMER, timerHandler); _local3.start(); } else { timerHandler(); }; } protected function get percentFormat():TextFormat{ var _local1:TextFormat; _local1 = new TextFormat(); _local1.align = "right"; _local1.color = 0; _local1.font = "Verdana"; _local1.size = 10; return (_local1); } private function calcY(_arg1:Number):Number{ return ((_arg1 + _yOffset)); } protected function setProgress(_arg1:Number, _arg2:Number):void{ if (((((((!(isNaN(_arg1))) && (!(isNaN(_arg2))))) && ((_arg1 >= 0)))) && ((_arg2 > 0)))){ _value = Number(_arg1); _maximum = Number(_arg2); draw(); }; } protected function get downloadingLabel():String{ return (_downloadingLabel); } private function calcX(_arg1:Number):Number{ return ((_arg1 + _xOffset)); } protected function showDisplayForInit(_arg1:int, _arg2:int):Boolean{ return ((((_arg1 > 300)) && ((_arg2 == 2)))); } private function drawProgressBar(_arg1:Number):void{ var _local2:Graphics; var _local3:Array; var _local4:Array; var _local5:Matrix; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; _local2 = _barSprite.graphics; _local2.clear(); _local3 = [0xFFFFFF, 0xFFFFFF]; _local4 = [0, 0xFF]; _local5 = new Matrix(); _local6 = ((_barRect.width * _arg1) / 100); _local7 = (_local6 / 2); _local8 = (_barRect.height - 4); _local9 = calcX(_barRect.x); _local10 = (calcY(_barRect.y) + 2); _local5.createGradientBox(_local7, _local8, 0, _local9, _local10); _local2.beginGradientFill(GradientType.LINEAR, _local3, [0.39, 0.85], _local4, _local5); _local2.drawRect(_local9, _local10, _local7, _local8); _local5.createGradientBox(_local7, _local8, 0, (_local9 + _local7), _local10); _local2.beginGradientFill(GradientType.LINEAR, _local3, [0.85, 1], _local4, _local5); _local2.drawRect((_local9 + _local7), _local10, _local7, _local8); _local7 = (_local6 / 3); _local8 = _barRect.height; _local10 = calcY(_barRect.y); _local11 = ((_local10 + _local8) - 1); _local5.createGradientBox(_local7, _local8, 0, _local9, _local10); _local2.beginGradientFill(GradientType.LINEAR, _local3, [0.05, 0.15], _local4, _local5); _local2.drawRect(_local9, _local10, _local7, 1); _local2.drawRect(_local9, _local11, _local7, 1); _local5.createGradientBox(_local7, _local8, 0, (_local9 + _local7), _local10); _local2.beginGradientFill(GradientType.LINEAR, _local3, [0.15, 0.25], _local4, _local5); _local2.drawRect((_local9 + _local7), _local10, _local7, 1); _local2.drawRect((_local9 + _local7), _local11, _local7, 1); _local5.createGradientBox(_local7, _local8, 0, (_local9 + (_local7 * 2)), _local10); _local2.beginGradientFill(GradientType.LINEAR, _local3, [0.25, 0.1], _local4, _local5); _local2.drawRect((_local9 + (_local7 * 2)), _local10, _local7, 1); _local2.drawRect((_local9 + (_local7 * 2)), _local11, _local7, 1); _local7 = (_local6 / 3); _local8 = _barRect.height; _local10 = (calcY(_barRect.y) + 1); _local11 = ((calcY(_barRect.y) + _local8) - 2); _local5.createGradientBox(_local7, _local8, 0, _local9, _local10); _local2.beginGradientFill(GradientType.LINEAR, _local3, [0.15, 0.3], _local4, _local5); _local2.drawRect(_local9, _local10, _local7, 1); _local2.drawRect(_local9, _local11, _local7, 1); _local5.createGradientBox(_local7, _local8, 0, (_local9 + _local7), _local10); _local2.beginGradientFill(GradientType.LINEAR, _local3, [0.3, 0.4], _local4, _local5); _local2.drawRect((_local9 + _local7), _local10, _local7, 1); _local2.drawRect((_local9 + _local7), _local11, _local7, 1); _local5.createGradientBox(_local7, _local8, 0, (_local9 + (_local7 * 2)), _local10); _local2.beginGradientFill(GradientType.LINEAR, _local3, [0.4, 0.25], _local4, _local5); _local2.drawRect((_local9 + (_local7 * 2)), _local10, _local7, 1); _local2.drawRect((_local9 + (_local7 * 2)), _local11, _local7, 1); } public function get backgroundImage():Object{ return (_backgroundImage); } public function set stageWidth(_arg1:Number):void{ _stageWidth = _arg1; } public function get backgroundAlpha():Number{ if (!isNaN(_backgroundAlpha)){ return (_backgroundAlpha); }; return (1); } public function set preloader(_arg1:Sprite):void{ _preloader = _arg1; _arg1.addEventListener(ProgressEvent.PROGRESS, progressHandler); _arg1.addEventListener(Event.COMPLETE, completeHandler); _arg1.addEventListener(RSLEvent.RSL_PROGRESS, rslProgressHandler); _arg1.addEventListener(RSLEvent.RSL_COMPLETE, rslCompleteHandler); _arg1.addEventListener(RSLEvent.RSL_ERROR, rslErrorHandler); _arg1.addEventListener(FlexEvent.INIT_PROGRESS, initProgressHandler); _arg1.addEventListener(FlexEvent.INIT_COMPLETE, initCompleteHandler); } public function get backgroundColor():uint{ return (_backgroundColor); } protected function set showPercentage(_arg1:Boolean):void{ _showPercentage = _arg1; draw(); } override public function set visible(_arg1:Boolean):void{ if (((!(_visible)) && (_arg1))){ show(); } else { if (((_visible) && (!(_arg1)))){ hide(); }; }; _visible = _arg1; } protected function get labelRect():Rectangle{ return (new Rectangle(14, 17, 100, 16)); } private function show():void{ _showingDisplay = true; calcScale(); draw(); _displayTime = getTimer(); } protected function createChildren():void{ var _local1:Graphics; var _local2:TextField; var _local3:TextField; var _local4:Graphics; var _local5:Matrix; var _local6:RectangularDropShadow; _local1 = graphics; if (backgroundImage != null){ loadBackgroundImage(backgroundImage); }; _barFrameSprite = new Sprite(); _barSprite = new Sprite(); addChild(_barFrameSprite); addChild(_barSprite); _local1.beginFill(0xCCCCCC, 0.4); _local1.drawRoundRect(calcX(_borderRect.x), calcY(_borderRect.y), _borderRect.width, _borderRect.height, (_borderRect.cornerRadius * 2), (_borderRect.cornerRadius * 2)); _local1.drawRoundRect(calcX((_borderRect.x + 1)), calcY((_borderRect.y + 1)), (_borderRect.width - 2), (_borderRect.height - 2), (_borderRect.cornerRadius - (1 * 2)), (_borderRect.cornerRadius - (1 * 2))); _local1.endFill(); _local1.beginFill(0xCCCCCC, 0.4); _local1.drawRoundRect(calcX((_borderRect.x + 1)), calcY((_borderRect.y + 1)), (_borderRect.width - 2), (_borderRect.height - 2), (_borderRect.cornerRadius - (1 * 2)), (_borderRect.cornerRadius - (1 * 2))); _local1.endFill(); _local4 = _barFrameSprite.graphics; _local5 = new Matrix(); _local5.createGradientBox(_barFrameRect.width, _barFrameRect.height, (Math.PI / 2), calcX(_barFrameRect.x), calcY(_barFrameRect.y)); _local4.beginGradientFill(GradientType.LINEAR, [6054502, 11909306], [1, 1], [0, 0xFF], _local5); _local4.drawRoundRect(calcX(_barFrameRect.x), calcY(_barFrameRect.y), _barFrameRect.width, _barFrameRect.height, (_barFrameRect.cornerRadius * 2), (_barFrameRect.cornerRadius * 2)); _local4.drawRoundRect(calcX((_barFrameRect.x + 1)), calcY((_barFrameRect.y + 1)), (_barFrameRect.width - 2), (_barFrameRect.height - 2), (_barFrameRect.cornerRadius * 2), (_barFrameRect.cornerRadius * 2)); _local4.endFill(); _labelObj = new TextField(); _labelObj.x = calcX(_labelRect.x); _labelObj.y = calcY(_labelRect.y); _labelObj.width = _labelRect.width; _labelObj.height = _labelRect.height; _labelObj.selectable = false; _labelObj.defaultTextFormat = labelFormat; addChild(_labelObj); _percentObj = new TextField(); _percentObj.x = calcX(_percentRect.x); _percentObj.y = calcY(_percentRect.y); _percentObj.width = _percentRect.width; _percentObj.height = _percentRect.height; _percentObj.selectable = false; _percentObj.defaultTextFormat = percentFormat; addChild(_percentObj); _local6 = new RectangularDropShadow(); _local6.color = 0; _local6.angle = 90; _local6.alpha = 0.6; _local6.distance = 2; _local6.tlRadius = (_local6.trRadius = (_local6.blRadius = (_local6.brRadius = _borderRect.cornerRadius))); _local6.drawShadow(_local1, calcX(_borderRect.x), calcY(_borderRect.y), _borderRect.width, _borderRect.height); _local1.lineStyle(1, 0xFFFFFF, 0.3); _local1.moveTo((calcX(_borderRect.x) + _borderRect.cornerRadius), calcY(_borderRect.y)); _local1.lineTo(((calcX(_borderRect.x) - _borderRect.cornerRadius) + _borderRect.width), calcY(_borderRect.y)); } private function loadBackgroundImage(_arg1:Object):void{ var cls:Class; var newStyleObj:DisplayObject; var loader:Loader; var loaderContext:LoaderContext; var classOrString = _arg1; if (((classOrString) && ((classOrString as Class)))){ cls = Class(classOrString); initBackgroundImage(new (cls)); } else { if (((classOrString) && ((classOrString is String)))){ try { cls = Class(getDefinitionByName(String(classOrString))); } catch(e:Error) { }; if (cls){ newStyleObj = new (cls); initBackgroundImage(newStyleObj); } else { loader = new Loader(); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loader_completeHandler); loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loader_ioErrorHandler); loaderContext = new LoaderContext(); loaderContext.applicationDomain = new ApplicationDomain(ApplicationDomain.currentDomain); loader.load(new URLRequest(String(classOrString)), loaderContext); }; }; }; } private function hide():void{ } private function draw():void{ var _local1:Number; if (_startedLoading){ if (!_startedInit){ _local1 = Math.round(((getPercentLoaded(_value, _maximum) * DOWNLOAD_PERCENTAGE) / 100)); } else { _local1 = Math.round((((getPercentLoaded(_value, _maximum) * (100 - DOWNLOAD_PERCENTAGE)) / 100) + DOWNLOAD_PERCENTAGE)); }; } else { _local1 = getPercentLoaded(_value, _maximum); }; if (_labelObj){ _labelObj.text = _label; }; if (_percentObj){ if (!_showPercentage){ _percentObj.visible = false; _percentObj.text = ""; } else { _percentObj.text = (String(_local1) + "%"); }; }; if (((_barSprite) && (_barFrameSprite))){ if (!_showProgressBar){ _barSprite.visible = false; _barFrameSprite.visible = false; } else { drawProgressBar(_local1); }; }; } protected function initProgressHandler(_arg1:Event):void{ var _local2:int; var _local3:Number; _local2 = (getTimer() - _startTime); _initProgressCount++; if (((!(_showingDisplay)) && (showDisplayForInit(_local2, _initProgressCount)))){ _displayStartCount = _initProgressCount; show(); } else { if (_showingDisplay){ if (!_startedInit){ _startedInit = true; label = initializingLabel; }; _local3 = ((100 * _initProgressCount) / (_initProgressTotal - _displayStartCount)); setProgress(_local3, 100); }; }; } protected function get label():String{ return (_label); } protected function getPercentLoaded(_arg1:Number, _arg2:Number):Number{ var _local3:Number; if ((((((((_arg1 == 0)) || ((_arg2 == 0)))) || (isNaN(_arg2)))) || (isNaN(_arg1)))){ return (0); }; _local3 = ((100 * _arg1) / _arg2); if (((isNaN(_local3)) || ((_local3 <= 0)))){ return (0); }; if (_local3 > 99){ return (99); }; return (Math.round(_local3)); } protected function set downloadingLabel(_arg1:String):void{ _downloadingLabel = _arg1; } public function get stageWidth():Number{ return (_stageWidth); } public function set stageHeight(_arg1:Number):void{ _stageHeight = _arg1; } protected function get showPercentage():Boolean{ return (_showPercentage); } public function initialize():void{ _startTime = getTimer(); center(stageWidth, stageHeight); } private function initBackgroundImage(_arg1:DisplayObject):void{ var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; addChildAt(_arg1, 0); _local2 = _arg1.width; _local3 = _arg1.height; _local4 = calcBackgroundSize(); if (isNaN(_local4)){ _local7 = 1; _local8 = 1; } else { _local9 = (_local4 * 0.01); _local7 = ((_local9 * stageWidth) / _local2); _local8 = ((_local9 * stageHeight) / _local3); }; _arg1.scaleX = _local7; _arg1.scaleY = _local8; _local5 = Math.round((0.5 * (stageWidth - (_local2 * _local7)))); _local6 = Math.round((0.5 * (stageHeight - (_local3 * _local8)))); _arg1.x = _local5; _arg1.y = _local6; if (!isNaN(backgroundAlpha)){ _arg1.alpha = backgroundAlpha; }; } public function set backgroundImage(_arg1:Object):void{ _backgroundImage = _arg1; } public function set backgroundAlpha(_arg1:Number):void{ _backgroundAlpha = _arg1; } public function set backgroundColor(_arg1:uint):void{ _backgroundColor = _arg1; } private function loader_completeHandler(_arg1:Event):void{ var _local2:DisplayObject; _local2 = DisplayObject(LoaderInfo(_arg1.target).loader); initBackgroundImage(_local2); } public function get stageHeight():Number{ return (_stageHeight); } protected function get percentRect():Rectangle{ return (new Rectangle(108, 4, 34, 16)); } protected function completeHandler(_arg1:Event):void{ } protected function set label(_arg1:String):void{ if (!(_arg1 is Function)){ _label = _arg1; }; draw(); } protected function get showLabel():Boolean{ return (_showLabel); } public static function get initializingLabel():String{ return (_initializingLabel); } public static function set initializingLabel(_arg1:String):void{ _initializingLabel = _arg1; } } }//package mx.preloaders
Section 372
//IPreloaderDisplay (mx.preloaders.IPreloaderDisplay) package mx.preloaders { import flash.display.*; import flash.events.*; public interface IPreloaderDisplay extends IEventDispatcher { function get stageHeight():Number; function set backgroundAlpha(_arg1:Number):void; function get stageWidth():Number; function set backgroundColor(_arg1:uint):void; function set preloader(_arg1:Sprite):void; function get backgroundAlpha():Number; function get backgroundColor():uint; function get backgroundSize():String; function set stageWidth(_arg1:Number):void; function set stageHeight(_arg1:Number):void; function set backgroundImage(_arg1:Object):void; function get backgroundImage():Object; function set backgroundSize(_arg1:String):void; function initialize():void; } }//package mx.preloaders
Section 373
//Preloader (mx.preloaders.Preloader) package mx.preloaders { import flash.system.*; import flash.display.*; import flash.events.*; import mx.events.*; import flash.net.*; import flash.utils.*; public class Preloader extends Sprite { private var showDisplay:Boolean; private var timer:Timer; private var rslIndex:int;// = 0 private var rslDone:Boolean;// = false private var rslLibs:Array; private var displayClass:IPreloaderDisplay;// = null mx_internal static const VERSION:String = "2.0.1.0"; public function Preloader(){ displayClass = null; rslIndex = 0; rslDone = false; super(); } mx_internal function rslCompleteHandler(_arg1:Event, _arg2:RSLNode):void{ var _local3:RSLEvent; _local3 = new RSLEvent(RSLEvent.RSL_COMPLETE); _local3.bytesLoaded = _arg2.total; _local3.bytesTotal = _arg2.total; _local3.rslIndex = _arg2.index; _local3.rslTotal = rslLibs.length; _local3.url = _arg2.url; dispatchEvent(_local3); loadRSL(++rslIndex); } private function appProgressHandler(_arg1:Event):void{ dispatchEvent(new FlexEvent(FlexEvent.INIT_PROGRESS)); } mx_internal function rslErrorHandler(_arg1:ErrorEvent, _arg2:RSLNode):void{ var _local3:RSLEvent; _local3 = new RSLEvent(RSLEvent.RSL_ERROR); _local3.bytesLoaded = 0; _local3.bytesTotal = 0; _local3.rslIndex = _arg2.index; _local3.rslTotal = rslLibs.length; _local3.url = _arg2.url; _local3.errorText = _arg1.text; dispatchEvent(_local3); } private function displayClassCompleteHandler(_arg1:Event):void{ dispatchEvent(new FlexEvent(FlexEvent.PRELOADER_DONE)); } private function timerHandler(_arg1:TimerEvent):void{ var _local2:Object; var _local3:int; var _local4:int; if (!root){ return; }; _local2 = getByteValues(); _local3 = _local2.loaded; _local4 = _local2.total; dispatchEvent(new ProgressEvent(ProgressEvent.PROGRESS, false, false, _local3, _local4)); if (((rslDone) && ((((((((_local3 >= _local4)) && ((_local4 > 0)))) || ((((_local4 == 0)) && ((_local3 > 0)))))) || ((((((root is MovieClip)) && ((MovieClip(root).totalFrames > 2)))) && ((MovieClip(root).framesLoaded >= 2)))))))){ timer.removeEventListener(TimerEvent.TIMER, timerHandler); timer.reset(); dispatchEvent(new Event(Event.COMPLETE)); dispatchEvent(new FlexEvent(FlexEvent.INIT_PROGRESS)); }; } private function getByteValues():Object{ var _local1:LoaderInfo; var _local2:int; var _local3:int; var _local4:int; var _local5:int; _local1 = root.loaderInfo; _local2 = _local1.bytesLoaded; _local3 = _local1.bytesTotal; _local4 = (rslLibs) ? rslLibs.length : 0; _local5 = 0; while (_local5 < _local4) { _local2 = (_local2 + rslLibs[_local5].loaded); _local3 = (_local3 + rslLibs[_local5].total); _local5++; }; return ({loaded:_local2, total:_local3}); } private function ioErrorHandler(_arg1:IOErrorEvent):void{ } public function initialize(_arg1:Boolean, _arg2:Class, _arg3:uint, _arg4:Number, _arg5:Object, _arg6:String, _arg7:Number, _arg8:Number, _arg9:Array=null, _arg10:Array=null):void{ var _local11:int; var _local12:int; var _local13:URLRequest; var _local14:int; var _local15:RSLNode; root.loaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler); if (((_arg9) && ((_arg9.length > 0)))){ rslLibs = []; _local11 = _arg9.length; _local12 = 0; while (_local12 < _local11) { _local13 = new URLRequest(_arg9[_local12]); _local14 = 0; if (((_arg10) && ((_arg10.length == _arg9.length)))){ _local14 = _arg10[_local12]; }; _local15 = new RSLNode(_local13, _local12, _local14, this); rslLibs.push(_local15); _local12++; }; loadRSL(0); } else { rslDone = true; }; this.showDisplay = _arg1; timer = new Timer(10); timer.addEventListener(TimerEvent.TIMER, timerHandler); timer.start(); if (_arg1){ displayClass = new (_arg2); displayClass.addEventListener(Event.COMPLETE, displayClassCompleteHandler); addChild(DisplayObject(displayClass)); displayClass.backgroundColor = _arg3; displayClass.backgroundAlpha = _arg4; displayClass.backgroundImage = _arg5; displayClass.backgroundSize = _arg6; displayClass.stageWidth = _arg7; displayClass.stageHeight = _arg8; displayClass.initialize(); displayClass.preloader = this; }; } private function appCreationCompleteHandler(_arg1:FlexEvent):void{ dispatchAppEndEvent(); } mx_internal function rslProgressHandler(_arg1:ProgressEvent, _arg2:RSLNode):void{ var _local3:RSLEvent; _local3 = new RSLEvent(RSLEvent.RSL_PROGRESS); _local3.bytesLoaded = _arg1.bytesLoaded; _local3.bytesTotal = _arg1.bytesTotal; _local3.rslIndex = _arg2.index; _local3.rslTotal = rslLibs.length; _local3.url = _arg2.url; dispatchEvent(_local3); } private function loadRSL(_arg1:int):void{ var _local2:RSLNode; var _local3:Loader; var _local4:LoaderContext; if (_arg1 < rslLibs.length){ _local2 = rslLibs[_arg1]; _local3 = new Loader(); _local3.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, _local2.progressHandler); _local3.contentLoaderInfo.addEventListener(Event.COMPLETE, _local2.completeHandler); _local3.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, _local2.errorHandler); _local3.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, _local2.errorHandler); _local4 = new LoaderContext(); _local4.applicationDomain = ApplicationDomain.currentDomain; _local3.load(_local2.url, _local4); } else { rslDone = true; }; } public function registerApplication(_arg1:IEventDispatcher):void{ _arg1.addEventListener("validatePropertiesComplete", appProgressHandler); _arg1.addEventListener("validateSizeComplete", appProgressHandler); _arg1.addEventListener("validateDisplayListComplete", appProgressHandler); _arg1.addEventListener(FlexEvent.CREATION_COMPLETE, appCreationCompleteHandler); } private function dispatchAppEndEvent(_arg1:Object=null):void{ dispatchEvent(new FlexEvent(FlexEvent.INIT_COMPLETE)); if (!showDisplay){ displayClassCompleteHandler(null); }; } } }//package mx.preloaders import mx.core.*; import flash.events.*; import flash.net.*; class RSLNode { public var completed:Boolean;// = false public var loaded:uint;// = 0 public var total:uint;// = 0 public var index:int; public var errorText:String; public var url:URLRequest; public var owner:Preloader; private function RSLNode(_arg1:URLRequest, _arg2:int, _arg3:int, _arg4:Preloader){ total = 0; loaded = 0; completed = false; super(); this.url = _arg1; this.index = _arg2; this.total = _arg3; this.owner = _arg4; } public function errorHandler(_arg1:ErrorEvent):void{ errorText = _arg1.text; completed = true; loaded = 0; total = 0; var _local2 = owner; _local2.mx_internal::rslErrorHandler(_arg1, this); } public function progressHandler(_arg1:ProgressEvent):void{ loaded = _arg1.bytesLoaded; total = _arg1.bytesTotal; var _local2 = owner; _local2.mx_internal::rslProgressHandler(_arg1, this); } public function completeHandler(_arg1:Event):void{ completed = true; var _local2 = owner; _local2.mx_internal::rslCompleteHandler(_arg1, this); } }
Section 374
//ResourceBundle (mx.resources.ResourceBundle) package mx.resources { import flash.system.*; import mx.utils.*; public class ResourceBundle { private var content:Object; private var bundleName:String; mx_internal static const VERSION:String = "2.0.1.0"; protected function getContent():Object{ return (null); } public function getStringArray(_arg1:String):Array{ var _local2:Array; var _local3:int; var _local4:int; _local2 = getObject(_arg1).split(","); _local3 = _local2.length; _local4 = 0; while (_local4 < _local3) { _local2[_local4] = StringUtil.trim(_local2[_local4]); _local4++; }; return (_local2); } public function getString(_arg1:String):String{ return (String(getObject(_arg1))); } private function initialize(_arg1:String):void{ bundleName = _arg1; content = getContent(); if (!content){ throw (new Error(("No content found in resource bundle " + bundleName))); }; } public function getObject(_arg1:String):Object{ var _local2:Object; _local2 = content[_arg1]; if (!_local2){ throw (new Error(((("Key " + _arg1) + " was not found in resource bundle ") + bundleName))); }; return (_local2); } public function getBoolean(_arg1:String, _arg2:Boolean=true):Boolean{ var _local3:String; _local3 = getObject(_arg1).toLowerCase(); if (_local3 == "false"){ return (false); }; if (_local3 == "true"){ return (true); }; return (_arg2); } public function getNumber(_arg1:String):Number{ return (Number(getObject(_arg1))); } private static function getDefinitionByName(_arg1:String, _arg2:ApplicationDomain):Object{ var _local3:Object; if (_arg2.hasDefinition(_arg1)){ _local3 = _arg2.getDefinition(_arg1); }; return (_local3); } public static function getResourceBundle(_arg1:String, _arg2:ApplicationDomain=null):ResourceBundle{ var _local3:Class; var _local4:Object; var _local5:ResourceBundle; if (_arg2 == null){ _arg2 = ApplicationDomain.currentDomain; }; _local3 = Class(getDefinitionByName((_arg1 + "_properties"), _arg2)); if (!_local3){ _local3 = Class(getDefinitionByName(String(_arg1), _arg2)); }; if (_local3){ _local4 = new (_local3); if ((_local4 is ResourceBundle)){ _local5 = ResourceBundle(_local4); _local5.initialize(String(_arg1)); return (_local5); }; }; throw (new Error(("Could not find resource bundle " + _arg1))); } } }//package mx.resources
Section 375
//IResponder (mx.rpc.IResponder) package mx.rpc { public interface IResponder { function fault(_arg1:Object):void; function result(_arg1:Object):void; } }//package mx.rpc
Section 376
//HaloBorder (mx.skins.halo.HaloBorder) package mx.skins.halo { import mx.core.*; import flash.display.*; import mx.styles.*; import mx.graphics.*; import mx.skins.*; import mx.utils.*; public class HaloBorder extends RectangularBorder { private var _borderMetrics:EdgeMetrics; private var dropShadow:RectangularDropShadow; mx_internal static const VERSION:String = "2.0.1.0"; private static var BORDER_WIDTHS:Object = {none:0, solid:1, inset:2, outset:2, alert:3, dropdown:2, menuBorder:1, comboNonEdit:2}; public function HaloBorder(){ BORDER_WIDTHS["default"] = 3; } override public function get borderMetrics():EdgeMetrics{ var _local1:Number; var _local2:String; var _local3:String; if (_borderMetrics){ return (_borderMetrics); }; _local2 = getStyle("borderStyle"); if ((((_local2 == "default")) || ((_local2 == "alert")))){ _borderMetrics = new EdgeMetrics(0, 0, 0, 0); } else { if ((((_local2 == "controlBar")) || ((_local2 == "applicationControlBar")))){ _borderMetrics = new EdgeMetrics(1, 1, 1, 1); } else { if (_local2 == "solid"){ _local1 = getStyle("borderThickness"); if (isNaN(_local1)){ _local1 = 0; }; _borderMetrics = new EdgeMetrics(_local1, _local1, _local1, _local1); _local3 = getStyle("borderSides"); if (_local3 != "left top right bottom"){ if (_local3.indexOf("left") == -1){ _borderMetrics.left = 0; }; if (_local3.indexOf("top") == -1){ _borderMetrics.top = 0; }; if (_local3.indexOf("right") == -1){ _borderMetrics.right = 0; }; if (_local3.indexOf("bottom") == -1){ _borderMetrics.bottom = 0; }; }; } else { _local1 = BORDER_WIDTHS[_local2]; if (isNaN(_local1)){ _local1 = 0; }; _borderMetrics = new EdgeMetrics(_local1, _local1, _local1, _local1); }; }; }; return (_borderMetrics); } private function drawDropShadow(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number):void{ var _local9:Number; var _local10:String; var _local11:Number; var _local12:Boolean; if ((((((((getStyle("dropShadowEnabled") == false)) || ((getStyle("dropShadowEnabled") == "false")))) || ((_arg3 == 0)))) || ((_arg4 == 0)))){ return; }; _local9 = getStyle("shadowDistance"); _local10 = getStyle("shadowDirection"); if (getStyle("borderStyle") == "applicationControlBar"){ _local12 = getStyle("docked"); _local11 = (_local12) ? 90 : getDropShadowAngle(_local9, _local10); _local9 = Math.abs(_local9); } else { _local11 = getDropShadowAngle(_local9, _local10); _local9 = (Math.abs(_local9) + 2); }; if (!dropShadow){ dropShadow = new RectangularDropShadow(); }; dropShadow.distance = _local9; dropShadow.angle = _local11; dropShadow.color = getStyle("dropShadowColor"); dropShadow.alpha = 0.4; dropShadow.tlRadius = _arg5; dropShadow.trRadius = _arg6; dropShadow.blRadius = _arg8; dropShadow.brRadius = _arg7; dropShadow.drawShadow(graphics, _arg1, _arg2, _arg3, _arg4); } private function draw3dBorder(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number):void{ var _local7:Number; var _local8:Number; var _local9:Graphics; _local7 = width; _local8 = height; drawDropShadow(0, 0, width, height, 0, 0, 0, 0); _local9 = graphics; _local9.beginFill(_arg1); _local9.drawRect(0, 0, _local7, _local8); _local9.drawRect(1, 0, (_local7 - 2), _local8); _local9.endFill(); _local9.beginFill(_arg2); _local9.drawRect(1, 0, (_local7 - 2), 1); _local9.endFill(); _local9.beginFill(_arg3); _local9.drawRect(1, (_local8 - 1), (_local7 - 2), 1); _local9.endFill(); _local9.beginFill(_arg4); _local9.drawRect(1, 1, (_local7 - 2), 1); _local9.endFill(); _local9.beginFill(_arg5); _local9.drawRect(1, (_local8 - 2), (_local7 - 2), 1); _local9.endFill(); _local9.beginFill(_arg6); _local9.drawRect(1, 2, (_local7 - 2), (_local8 - 4)); _local9.drawRect(2, 2, (_local7 - 4), (_local8 - 4)); _local9.endFill(); } private function getBackgroundColor():Object{ var _local1:IUIComponent; var _local2:Object; _local1 = (parent as IUIComponent); if (((_local1) && (!(_local1.enabled)))){ _local2 = getStyle("backgroundDisabledColor"); if (_local2){ return (_local2); }; }; return (getStyle("backgroundColor")); } override public function styleChanged(_arg1:String):void{ if ((((((((((_arg1 == null)) || ((_arg1 == "styleName")))) || ((_arg1 == "borderStyle")))) || ((_arg1 == "borderThickness")))) || ((_arg1 == "borderSides")))){ _borderMetrics = null; }; invalidateDisplayList(); } private function getDropShadowAngle(_arg1:Number, _arg2:String):Number{ if (_arg2 == "left"){ return (((_arg1 >= 0)) ? 135 : 225); //unresolved jump }; if (_arg2 == "right"){ return (((_arg1 >= 0)) ? 45 : 315); //unresolved jump }; return (((_arg1 >= 0)) ? 90 : 270); } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local3:String; var _local4:Object; var _local5:Array; var _local6:Number; var _local7:String; var _local8:Object; var _local9:uint; var _local10:uint; var _local11:String; var _local12:Number; var _local13:uint; var _local14:Boolean; var _local15:uint; var _local16:Array; var _local17:Array; var _local18:uint; var _local19:uint; var _local20:uint; var _local21:uint; var _local22:Boolean; var _local23:Number; var _local24:Object; var _local25:Boolean; var _local26:Object; var _local27:Number; var _local28:Number; var _local29:Number; var _local30:Object; var _local31:Graphics; var _local32:Number; var _local33:Number; var _local34:Container; var _local35:EdgeMetrics; var _local36:Boolean; var _local37:Number; var _local38:Array; var _local39:uint; var _local40:Boolean; var _local41:Number; var _local42:Number; var _local43:Number; var _local44:EdgeMetrics; var _local45:Number; var _local46:Number; if (((isNaN(_arg1)) || (isNaN(_arg2)))){ return; }; super.updateDisplayList(_arg1, _arg2); _local3 = getStyle("borderStyle"); _local4 = getBackgroundColor(); _local5 = getStyle("highlightAlphas"); _local7 = "backgroundAlpha"; _local23 = 0; _local24 = null; _local25 = false; _local31 = graphics; _local31.clear(); if (_local3){ switch (_local3){ case "none": break; case "inset": _local10 = getStyle("borderColor"); _local27 = ColorUtil.adjustBrightness2(_local10, -40); _local28 = ColorUtil.adjustBrightness2(_local10, 25); _local29 = ColorUtil.adjustBrightness2(_local10, 40); _local30 = _local4; if ((((_local30 === null)) || ((_local30 === "")))){ _local30 = _local10; }; draw3dBorder(_local28, _local27, _local29, Number(_local30), Number(_local30), Number(_local30)); break; case "outset": _local10 = getStyle("borderColor"); _local27 = ColorUtil.adjustBrightness2(_local10, -40); _local28 = ColorUtil.adjustBrightness2(_local10, -25); _local29 = ColorUtil.adjustBrightness2(_local10, 40); _local30 = _local4; if ((((_local30 === null)) || ((_local30 === "")))){ _local30 = _local10; }; draw3dBorder(_local28, _local29, _local27, Number(_local30), Number(_local30), Number(_local30)); break; case "alert": case "default": _local32 = getStyle("backgroundAlpha"); _local6 = getStyle("borderAlpha"); _local7 = "borderAlpha"; _local23 = getStyle("cornerRadius"); _local25 = (getStyle("roundedBottomCorners").toString().toLowerCase() == "true"); _local33 = (_local25) ? _local23 : 0; drawDropShadow(0, 0, _arg1, _arg2, _local23, _local23, _local33, _local33); if (!_local25){ _local24 = {}; }; _local34 = (parent as Container); if (_local34){ _local35 = _local34.viewMetrics; _local8 = {x:_local35.left, y:_local35.top, w:Math.max(0, ((_arg1 - _local35.left) - _local35.right)), h:Math.max(0, ((_arg2 - _local35.top) - _local35.bottom)), r:0}; if ((((_local8.w > 0)) && ((_local8.h > 0)))){ if (_local32 != _local6){ drawDropShadow(_local8.x, _local8.y, _local8.w, _local8.h, 0, 0, 0, 0); }; _local31.beginFill(Number(_local4), _local32); _local31.drawRect(_local8.x, _local8.y, _local8.w, _local8.h); _local31.endFill(); }; }; _local4 = getStyle("borderColor"); break; case "dropdown": _local15 = getStyle("dropdownBorderColor"); drawDropShadow(0, 0, _arg1, _arg2, 4, 0, 0, 4); drawRoundRect(0, 0, _arg1, _arg2, {tl:4, tr:0, br:0, bl:4}, 5068126, 1); drawRoundRect(0, 0, _arg1, _arg2, {tl:4, tr:0, br:0, bl:4}, [0xFFFFFF, 0xFFFFFF], [0.7, 0], verticalGradientMatrix(0, 0, _arg1, _arg2)); drawRoundRect(1, 1, (_arg1 - 1), (_arg2 - 2), {tl:3, tr:0, br:0, bl:3}, 0xFFFFFF, 1); drawRoundRect(1, 2, (_arg1 - 1), (_arg2 - 3), {tl:3, tr:0, br:0, bl:3}, [0xEEEEEE, 0xFFFFFF], 1, verticalGradientMatrix(0, 0, (_arg1 - 1), (_arg2 - 3))); if (!isNaN(_local15)){ drawRoundRect(0, 0, (_arg1 + 1), _arg2, {tl:4, tr:0, br:0, bl:4}, _local15, 0.5); drawRoundRect(1, 1, (_arg1 - 1), (_arg2 - 2), {tl:3, tr:0, br:0, bl:3}, 0xFFFFFF, 1); drawRoundRect(1, 2, (_arg1 - 1), (_arg2 - 3), {tl:3, tr:0, br:0, bl:3}, [0xEEEEEE, 0xFFFFFF], 1, verticalGradientMatrix(0, 0, (_arg1 - 1), (_arg2 - 3))); }; _local4 = null; break; case "menuBorder": _local10 = getStyle("borderColor"); drawRoundRect(0, 0, _arg1, _arg2, 0, _local10, 1); drawDropShadow(1, 1, (_arg1 - 2), (_arg2 - 2), 0, 0, 0, 0); break; case "comboNonEdit": break; case "controlBar": if ((((_arg1 == 0)) || ((_arg2 == 0)))){ _local4 = null; break; }; _local17 = getStyle("footerColors"); _local36 = !((_local17 == null)); _local37 = getStyle("borderAlpha"); if (_local36){ _local31.lineStyle(0, ((_local17.length > 0)) ? _local17[1] : _local17[0], _local37); _local31.moveTo(0, 0); _local31.lineTo(_arg1, 0); _local31.lineStyle(0, 0, 0); if (((((parent) && (parent.parent))) && ((parent.parent is IStyleClient)))){ _local23 = IStyleClient(parent.parent).getStyle("cornerRadius"); _local37 = IStyleClient(parent.parent).getStyle("borderAlpha"); }; if (isNaN(_local23)){ _local23 = 0; }; if (IStyleClient(parent.parent).getStyle("roundedBottomCorners").toString().toLowerCase() != "true"){ _local23 = 0; }; drawRoundRect(0, 1, _arg1, (_arg2 - 1), {tl:0, tr:0, bl:_local23, br:_local23}, _local17, _local37, verticalGradientMatrix(0, 0, _arg1, _arg2)); if ((((_local17.length > 1)) && (!((_local17[0] == _local17[1]))))){ drawRoundRect(0, 1, _arg1, (_arg2 - 1), {tl:0, tr:0, bl:_local23, br:_local23}, [0xFFFFFF, 0xFFFFFF], _local5, verticalGradientMatrix(0, 0, _arg1, _arg2)); drawRoundRect(1, 2, (_arg1 - 2), (_arg2 - 3), {tl:0, tr:0, bl:(_local23 - 1), br:(_local23 - 1)}, _local17, _local37, verticalGradientMatrix(0, 0, _arg1, _arg2)); }; }; _local4 = null; break; case "applicationControlBar": _local16 = getStyle("fillColors"); _local6 = getStyle("backgroundAlpha"); _local5 = getStyle("highlightAlphas"); _local38 = getStyle("fillAlphas"); _local14 = getStyle("docked"); _local39 = uint(_local4); _local23 = getStyle("cornerRadius"); if (!_local23){ _local23 = 0; }; drawDropShadow(0, 1, _arg1, (_arg2 - 1), _local23, _local23, _local23, _local23); if (_local4){ drawRoundRect(0, 1, _arg1, (_arg2 - 1), _local23, _local39, _local6, verticalGradientMatrix(0, 0, _arg1, _arg2)); }; drawRoundRect(0, 1, _arg1, (_arg2 - 1), _local23, _local16, _local38, verticalGradientMatrix(0, 0, _arg1, _arg2)); drawRoundRect(0, 1, _arg1, ((_arg2 / 2) - 1), {tl:_local23, tr:_local23, bl:0, br:0}, [0xFFFFFF, 0xFFFFFF], _local5, verticalGradientMatrix(0, 0, _arg1, ((_arg2 / 2) - 1))); drawRoundRect(0, 1, _arg1, (_arg2 - 1), {tl:_local23, tr:_local23, bl:0, br:0}, 0xFFFFFF, 0.3, null, GradientType.LINEAR, null, {x:0, y:2, w:_arg1, h:(_arg2 - 2), r:{tl:_local23, tr:_local23, bl:0, br:0}}); _local4 = null; break; default: _local10 = getStyle("borderColor"); _local12 = getStyle("borderThickness"); _local11 = getStyle("borderSides"); _local40 = true; _local23 = getStyle("cornerRadius"); _local25 = (getStyle("roundedBottomCorners").toString().toLowerCase() == "true"); _local41 = Math.max((_local23 - _local12), 0); _local26 = {x:_local12, y:_local12, w:(_arg1 - (_local12 * 2)), h:(_arg2 - (_local12 * 2)), r:_local41}; if (!_local25){ _local24 = {tl:_local23, tr:_local23, bl:0, br:0}; _local26.r = {tl:_local41, tr:_local41, bl:0, br:0}; }; if (_local11 != "left top right bottom"){ _local26.r = {tl:_local41, tr:_local41, bl:(_local25) ? _local41 : 0, br:(_local25) ? _local41 : 0}; _local24 = {tl:_local23, tr:_local23, bl:(_local25) ? _local23 : 0, br:(_local25) ? _local23 : 0}; _local11 = _local11.toLowerCase(); if (_local11.indexOf("left") == -1){ _local26.x = 0; _local26.w = (_local26.w + _local12); _local26.r.tl = 0; _local26.r.bl = 0; _local24.tl = 0; _local24.bl = 0; _local40 = false; }; if (_local11.indexOf("top") == -1){ _local26.y = 0; _local26.h = (_local26.h + _local12); _local26.r.tl = 0; _local26.r.tr = 0; _local24.tl = 0; _local24.tr = 0; _local40 = false; }; if (_local11.indexOf("right") == -1){ _local26.w = (_local26.w + _local12); _local26.r.tr = 0; _local26.r.br = 0; _local24.tr = 0; _local24.br = 0; _local40 = false; }; if (_local11.indexOf("bottom") == -1){ _local26.h = (_local26.h + _local12); _local26.r.bl = 0; _local26.r.br = 0; _local24.bl = 0; _local24.br = 0; _local40 = false; }; }; if ((((_local23 == 0)) && (_local40))){ drawDropShadow(0, 0, _arg1, _arg2, 0, 0, 0, 0); _local31.beginFill(_local10); _local31.drawRect(0, 0, _arg1, _arg2); _local31.drawRect(_local12, _local12, (_arg1 - (2 * _local12)), (_arg2 - (2 * _local12))); _local31.endFill(); } else { if (_local24){ drawDropShadow(0, 0, _arg1, _arg2, _local24.tl, _local24.tr, _local24.br, _local24.bl); drawRoundRect(0, 0, _arg1, _arg2, _local24, _local10, 1, null, null, null, _local26); _local24.tl = Math.max((_local23 - _local12), 0); _local24.tr = Math.max((_local23 - _local12), 0); _local24.bl = (_local25) ? Math.max((_local23 - _local12), 0) : 0; _local24.br = (_local25) ? Math.max((_local23 - _local12), 0) : 0; } else { drawDropShadow(0, 0, _arg1, _arg2, _local23, _local23, _local23, _local23); drawRoundRect(0, 0, _arg1, _arg2, _local23, _local10, 1, null, null, null, _local26); _local23 = Math.max((getStyle("cornerRadius") - _local12), 0); }; }; }; }; if (((((((!((_local4 === null))) && (!((_local4 === ""))))) || (getStyle("mouseShield")))) || (getStyle("mouseShieldChildren")))){ _local42 = Number(_local4); _local43 = 1; _local44 = borderMetrics; if (((((isNaN(_local42)) || ((_local4 === "")))) || ((_local4 === null)))){ _local43 = 0; _local42 = 0xFFFFFF; } else { _local43 = getStyle(_local7); }; if (((!((_local23 == 0))) || (_local8))){ _local45 = _local44.bottom; if (_local24){ _local46 = (_local25) ? _local23 : 0; _local24 = {tl:_local23, tr:_local23, bl:_local46, br:_local46}; drawRoundRect(_local44.left, _local44.top, (width - (_local44.left + _local44.right)), (height - (_local44.top + _local45)), _local24, _local42, _local43, null, GradientType.LINEAR, null, _local8); } else { drawRoundRect(_local44.left, _local44.top, (width - (_local44.left + _local44.right)), (height - (_local44.top + _local45)), _local23, _local42, _local43, null, GradientType.LINEAR, null, _local8); }; } else { _local31.beginFill(_local42, _local43); _local31.drawRect(_local44.left, _local44.top, ((_arg1 - _local44.right) - _local44.left), ((_arg2 - _local44.bottom) - _local44.top)); _local31.endFill(); }; }; } } }//package mx.skins.halo
Section 377
//HaloFocusRect (mx.skins.halo.HaloFocusRect) package mx.skins.halo { import flash.display.*; import mx.styles.*; import mx.skins.*; import mx.utils.*; public class HaloFocusRect extends ProgrammaticSkin implements IStyleClient { private var _focusColor:Number; mx_internal static const VERSION:String = "2.0.1.0"; public function get styleDeclaration():CSSStyleDeclaration{ return (CSSStyleDeclaration(styleName)); } public function set styleDeclaration(_arg1:CSSStyleDeclaration):void{ } public function notifyStyleChangeInChildren(_arg1:String, _arg2:Boolean):void{ } public function regenerateStyleCache(_arg1:Boolean):void{ } public function get className():String{ return ("HaloFocusRect"); } public function clearStyle(_arg1:String):void{ if (_arg1 == "focusColor"){ _focusColor = NaN; }; } public function setStyle(_arg1:String, _arg2):void{ if (_arg1 == "focusColor"){ _focusColor = _arg2; }; } public function set nonInheritingStyles(_arg1:Object):void{ } public function set inheritingStyles(_arg1:Object):void{ } public function get nonInheritingStyles():Object{ return (styleName.nonInheritingStyles); } public function get inheritingStyles():Object{ return (styleName.inheritingStyles); } public function registerEffects(_arg1:Array):void{ } public function getClassStyleDeclarations():Array{ return ([]); } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local3:String; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:String; var _local9:Number; var _local10:Number; var _local11:Graphics; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; super.updateDisplayList(_arg1, _arg2); _local3 = getStyle("focusBlendMode"); _local4 = getStyle("focusAlpha"); _local5 = getStyle("focusColor"); _local6 = getStyle("cornerRadius"); _local7 = getStyle("focusThickness"); _local8 = getStyle("focusRoundedCorners"); _local9 = getStyle("themeColor"); _local10 = _local5; if (!_local10){ _local10 = _local9; }; _local11 = graphics; _local11.clear(); blendMode = _local3; if (((!((_local8 == "tl tr bl br"))) && ((_local6 > 0)))){ _local12 = 0; _local13 = 0; _local14 = 0; _local15 = 0; _local16 = (_local6 + _local7); if (_local8.indexOf("tl") >= 0){ _local12 = _local16; }; if (_local8.indexOf("tr") >= 0){ _local14 = _local16; }; if (_local8.indexOf("bl") >= 0){ _local13 = _local16; }; if (_local8.indexOf("br") >= 0){ _local15 = _local16; }; _local11.beginFill(_local10, _local4); GraphicsUtil.drawRoundRectComplex(_local11, 0, 0, _arg1, _arg2, _local12, _local14, _local13, _local15); _local12 = (_local12) ? _local6 : 0; _local14 = (_local14) ? _local6 : 0; _local13 = (_local13) ? _local6 : 0; _local15 = (_local15) ? _local6 : 0; GraphicsUtil.drawRoundRectComplex(_local11, _local7, _local7, (_arg1 - (2 * _local7)), (_arg2 - (2 * _local7)), _local12, _local14, _local13, _local15); _local11.endFill(); _local16 = (_local6 + (_local7 / 2)); _local12 = (_local12) ? _local16 : 0; _local14 = (_local14) ? _local16 : 0; _local13 = (_local13) ? _local16 : 0; _local15 = (_local15) ? _local16 : 0; _local11.beginFill(_local10, _local4); GraphicsUtil.drawRoundRectComplex(_local11, (_local7 / 2), (_local7 / 2), (_arg1 - _local7), (_arg2 - _local7), _local12, _local14, _local13, _local15); _local12 = (_local12) ? _local6 : 0; _local14 = (_local14) ? _local6 : 0; _local13 = (_local13) ? _local6 : 0; _local15 = (_local15) ? _local6 : 0; GraphicsUtil.drawRoundRectComplex(_local11, _local7, _local7, (_arg1 - (2 * _local7)), (_arg2 - (2 * _local7)), _local12, _local14, _local13, _local15); _local11.endFill(); } else { _local11.beginFill(_local10, _local4); _local17 = (((_local6 > 0)) ? (_local6 + _local7) : 0 * 2); _local11.drawRoundRect(0, 0, _arg1, _arg2, _local17, _local17); _local17 = (_local6 * 2); _local11.drawRoundRect(_local7, _local7, (_arg1 - (2 * _local7)), (_arg2 - (2 * _local7)), _local17, _local17); _local11.endFill(); _local11.beginFill(_local10, _local4); _local17 = (((_local6 > 0)) ? (_local6 + (_local7 / 2)) : 0 * 2); _local11.drawRoundRect((_local7 / 2), (_local7 / 2), (_arg1 - _local7), (_arg2 - _local7), _local17, _local17); _local17 = (_local6 * 2); _local11.drawRoundRect(_local7, _local7, (_arg1 - (2 * _local7)), (_arg2 - (2 * _local7)), _local17, _local17); _local11.endFill(); }; } override public function getStyle(_arg1:String){ return (((_arg1 == "focusColor")) ? _focusColor : super.getStyle(_arg1)); } } }//package mx.skins.halo
Section 378
//Border (mx.skins.Border) package mx.skins { import mx.core.*; public class Border extends ProgrammaticSkin { mx_internal static const VERSION:String = "2.0.1.0"; public function get borderMetrics():EdgeMetrics{ return (EdgeMetrics.EMPTY); } } }//package mx.skins
Section 379
//ProgrammaticSkin (mx.skins.ProgrammaticSkin) package mx.skins { import mx.core.*; import flash.display.*; import mx.styles.*; import flash.geom.*; import mx.managers.*; import mx.utils.*; public class ProgrammaticSkin extends FlexShape implements IFlexDisplayObject, IInvalidating, ILayoutManagerClient, ISimpleStyleClient { private var _initialized:Boolean;// = false private var invalidateDisplayListFlag:Boolean;// = false private var _height:Number; private var _styleName:IStyleClient; private var _processedDescriptors:Boolean;// = false private var _updateCompletePendingFlag:Boolean;// = true private var _width:Number; private var _nestLevel:int;// = 0 mx_internal static const VERSION:String = "2.0.1.0"; private static var tempMatrix:Matrix = new Matrix(); public function ProgrammaticSkin(){ invalidateDisplayListFlag = false; _initialized = false; _nestLevel = 0; _processedDescriptors = false; _updateCompletePendingFlag = true; super(); _width = measuredWidth; _height = measuredHeight; } protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ } public function invalidateSize():void{ } public function getStyle(_arg1:String){ return (_styleName.getStyle(_arg1)); } public function get nestLevel():int{ return (_nestLevel); } public function set nestLevel(_arg1:int):void{ _nestLevel = _arg1; invalidateDisplayList(); } override public function get height():Number{ return (_height); } public function get updateCompletePendingFlag():Boolean{ return (_updateCompletePendingFlag); } protected function verticalGradientMatrix(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Matrix{ return (rotatedGradientMatrix(_arg1, _arg2, _arg3, _arg4, 90)); } public function validateSize(_arg1:Boolean=false):void{ } public function invalidateDisplayList():void{ if (((!(invalidateDisplayListFlag)) && ((nestLevel > 0)))){ invalidateDisplayListFlag = true; UIComponentGlobals.layoutManager.invalidateDisplayList(this); }; } public function set updateCompletePendingFlag(_arg1:Boolean):void{ _updateCompletePendingFlag = _arg1; } override public function set height(_arg1:Number):void{ _height = _arg1; invalidateDisplayList(); } protected function horizontalGradientMatrix(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Matrix{ return (rotatedGradientMatrix(_arg1, _arg2, _arg3, _arg4, 0)); } public function set processedDescriptors(_arg1:Boolean):void{ _processedDescriptors = _arg1; } override public function set width(_arg1:Number):void{ _width = _arg1; invalidateDisplayList(); } public function validateDisplayList():void{ invalidateDisplayListFlag = false; updateDisplayList(width, height); } public function get measuredWidth():Number{ return (0); } public function set initialized(_arg1:Boolean):void{ _initialized = _arg1; } protected function drawRoundRect(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null, _arg6:Object=null, _arg7:Object=null, _arg8:Matrix=null, _arg9:String="linear", _arg10:Array=null, _arg11:Object=null):void{ var _local12:Graphics; var _local13:Number; var _local14:Array; var _local15:Object; _local12 = graphics; if ((((_arg3 == 0)) || ((_arg4 == 0)))){ return; }; if (_arg6 !== null){ if ((_arg6 is uint)){ _local12.beginFill(uint(_arg6), Number(_arg7)); } else { if ((_arg6 is Array)){ _local14 = ((_arg7 is Array)) ? (_arg7 as Array) : [_arg7, _arg7]; if (!_arg10){ _arg10 = [0, 0xFF]; }; _local12.beginGradientFill(_arg9, (_arg6 as Array), _local14, _arg10, _arg8); }; }; }; if (!_arg5){ _local12.drawRect(_arg1, _arg2, _arg3, _arg4); } else { if ((_arg5 is Number)){ _local13 = (Number(_arg5) * 2); _local12.drawRoundRect(_arg1, _arg2, _arg3, _arg4, _local13, _local13); } else { GraphicsUtil.drawRoundRectComplex(_local12, _arg1, _arg2, _arg3, _arg4, _arg5.tl, _arg5.tr, _arg5.bl, _arg5.br); }; }; if (_arg11){ _local15 = _arg11.r; if ((_local15 is Number)){ _local13 = (Number(_local15) * 2); _local12.drawRoundRect(_arg11.x, _arg11.y, _arg11.w, _arg11.h, _local13, _local13); } else { GraphicsUtil.drawRoundRectComplex(_local12, _arg11.x, _arg11.y, _arg11.w, _arg11.h, _local15.tl, _local15.tr, _local15.bl, _local15.br); }; }; if (_arg6 !== null){ _local12.endFill(); }; } public function get measuredHeight():Number{ return (0); } public function get processedDescriptors():Boolean{ return (_processedDescriptors); } public function set styleName(_arg1:Object):void{ if (_styleName != _arg1){ _styleName = (_arg1 as IStyleClient); invalidateDisplayList(); }; } public function setActualSize(_arg1:Number, _arg2:Number):void{ var _local3:Boolean; _local3 = false; if (_width != _arg1){ _width = _arg1; _local3 = true; }; if (_height != _arg2){ _height = _arg2; _local3 = true; }; if (_local3){ invalidateDisplayList(); }; } override public function get width():Number{ return (_width); } public function styleChanged(_arg1:String):void{ invalidateDisplayList(); } public function invalidateProperties():void{ } public function move(_arg1:Number, _arg2:Number):void{ this.x = _arg1; this.y = _arg2; } public function get initialized():Boolean{ return (_initialized); } protected function rotatedGradientMatrix(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number):Matrix{ tempMatrix.createGradientBox(_arg3, _arg4, ((_arg5 * Math.PI) / 180), _arg1, _arg2); return (tempMatrix); } public function get styleName():Object{ return (_styleName); } public function validateProperties():void{ } public function validateNow():void{ if (invalidateDisplayListFlag){ validateDisplayList(); }; } } }//package mx.skins
Section 380
//RectangularBorder (mx.skins.RectangularBorder) package mx.skins { import mx.core.*; import mx.resources.*; import flash.system.*; import flash.display.*; import flash.events.*; import mx.styles.*; import flash.geom.*; import flash.net.*; import flash.utils.*; import mx.utils.*; public class RectangularBorder extends Border { private var backgroundImageWidth:Number; private var backgroundImageStyle:Object; mx_internal var loader:Loader; private var backgroundMask:Shape; private var backgroundImageHeight:Number; private var _backgroundImageRect:Rectangle; private var backgroundImage:DisplayObject; mx_internal static const VERSION:String = "2.0.1.0"; private static var resourceNotLoaded:String; private static var packageResources:ResourceBundle = ResourceBundle.getResourceBundle("skins", ApplicationDomain.currentDomain); public function RectangularBorder(){ addEventListener(Event.REMOVED, removedHandler); } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ var newStyle:Object; var cls:Class; var imgParent:DisplayObjectContainer; var childrenList:IChildList; var newStyleObj:DisplayObject; var loaderContext:LoaderContext; var unscaledWidth = _arg1; var unscaledHeight = _arg2; if (!parent){ return; }; newStyle = getStyle("backgroundImage"); if (newStyle != backgroundImageStyle){ backgroundImageStyle = newStyle; if (backgroundImage){ imgParent = backgroundImage.parent; childrenList = ((imgParent is Container)) ? Container(imgParent).rawChildren : IChildList(imgParent); childrenList.removeChild(backgroundImage); }; backgroundImage = null; if (((newStyle) && ((newStyle as Class)))){ cls = Class(newStyle); initBackgroundImage(new (cls)); } else { if (((newStyle) && ((newStyle is String)))){ try { cls = Class(getDefinitionByName(String(newStyle))); } catch(e:Error) { }; if (cls){ newStyleObj = new (cls); initBackgroundImage(newStyleObj); } else { loader = new FlexLoader(); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeEventHandler); loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, errorEventHandler); loader.contentLoaderInfo.addEventListener(ErrorEvent.ERROR, errorEventHandler); loaderContext = new LoaderContext(); loaderContext.applicationDomain = new ApplicationDomain(ApplicationDomain.currentDomain); loader.load(new URLRequest(String(newStyle)), loaderContext); }; } else { if (newStyle){ throw (new Error(StringUtil.substitute(resourceNotLoaded, newStyle))); }; }; }; }; if (backgroundImage){ adjustBackgroundImage(); }; } private function completeEventHandler(_arg1:Event):void{ var _local2:DisplayObject; if (!parent){ return; }; _local2 = DisplayObject(LoaderInfo(_arg1.target).loader); initBackgroundImage(_local2); adjustBackgroundImage(); dispatchEvent(_arg1.clone()); } mx_internal function get backgroundImageRect():Rectangle{ return (_backgroundImageRect); } private function getBackgroundSize():Number{ var _local1:Number; var _local2:Object; var _local3:int; _local1 = NaN; _local2 = getStyle("backgroundSize"); if (((_local2) && ((_local2 is String)))){ _local3 = _local2.indexOf("%"); if (_local3 != -1){ _local1 = Number(_local2.substr(0, _local3)); }; }; return (_local1); } mx_internal function adjustBackgroundImage():void{ var _local1:DisplayObject; var _local2:EdgeMetrics; var _local3:Boolean; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Graphics; _local1 = parent; _local2 = ((_local1 is Container)) ? Container(_local1).viewMetrics : borderMetrics; _local3 = !((getStyle("backgroundAttachment") == "fixed")); if (_backgroundImageRect){ _local9 = _backgroundImageRect.width; _local10 = _backgroundImageRect.height; } else { _local9 = ((width - _local2.left) - _local2.right); _local10 = ((height - _local2.top) - _local2.bottom); }; _local4 = getBackgroundSize(); if (isNaN(_local4)){ _local11 = 1; _local12 = 1; } else { _local13 = (_local4 * 0.01); _local11 = ((_local13 * _local9) / backgroundImageWidth); _local12 = ((_local13 * _local10) / backgroundImageHeight); }; backgroundImage.scaleX = _local11; backgroundImage.scaleY = _local12; _local5 = Math.round((0.5 * (_local9 - (backgroundImageWidth * _local11)))); _local6 = Math.round((0.5 * (_local10 - (backgroundImageHeight * _local12)))); backgroundImage.x = _local2.left; backgroundImage.y = _local2.top; backgroundMask.x = _local2.left; backgroundMask.y = _local2.top; if (((_local3) && ((_local1 is Container)))){ _local5 = (_local5 - Container(_local1).horizontalScrollPosition); _local6 = (_local6 - Container(_local1).verticalScrollPosition); }; backgroundImage.alpha = getStyle("backgroundAlpha"); backgroundImage.x = (backgroundImage.x + _local5); backgroundImage.y = (backgroundImage.y + _local6); _local7 = ((width - _local2.left) - _local2.right); _local8 = ((height - _local2.top) - _local2.bottom); if (((!((backgroundMask.width == _local7))) || (!((backgroundMask.height == _local8))))){ _local14 = backgroundMask.graphics; _local14.clear(); _local14.beginFill(0xFFFFFF); _local14.drawRect(0, 0, _local7, _local8); _local14.endFill(); }; } private function errorEventHandler(_arg1:Event):void{ } private function initBackgroundImage(_arg1:DisplayObject):void{ var _local2:IChildList; var _local3:int; backgroundImage = _arg1; if ((_arg1 is Loader)){ backgroundImageWidth = Loader(_arg1).contentLoaderInfo.width; backgroundImageHeight = Loader(_arg1).contentLoaderInfo.height; } else { backgroundImageWidth = backgroundImage.width; backgroundImageHeight = backgroundImage.height; if ((_arg1 is ISimpleStyleClient)){ ISimpleStyleClient(_arg1).styleName = styleName; }; }; _local2 = ((parent is Container)) ? Container(parent).rawChildren : IChildList(parent); backgroundMask = new FlexShape(); backgroundMask.name = "backgroundMask"; backgroundMask.x = 0; backgroundMask.y = 0; _local2.addChild(backgroundMask); _local3 = _local2.getChildIndex(this); _local2.addChildAt(backgroundImage, (_local3 + 1)); backgroundImage.mask = backgroundMask; } mx_internal function set backgroundImageRect(_arg1:Rectangle):void{ _backgroundImageRect = _arg1; invalidateDisplayList(); } mx_internal function get hasBackgroundImage():Boolean{ return (!((backgroundImage == null))); } private function removedHandler(_arg1:Event):void{ var _local2:IChildList; _local2 = ((parent is Container)) ? Container(parent).rawChildren : IChildList(parent); if (backgroundImage){ _local2.removeChild(backgroundImage); backgroundImage = null; }; if (backgroundMask){ _local2.removeChild(backgroundMask); backgroundMask = null; }; } private static function loadResources():void{ resourceNotLoaded = packageResources.getString("notLoaded"); } loadResources(); } }//package mx.skins
Section 381
//IOverride (mx.states.IOverride) package mx.states { import mx.core.*; public interface IOverride { function initialize():void; function remove(_arg1:UIComponent):void; function apply(_arg1:UIComponent):void; } }//package mx.states
Section 382
//State (mx.states.State) package mx.states { import flash.events.*; import mx.events.*; public class State extends EventDispatcher { public var name:String; private var initialized:Boolean;// = false public var overrides:Array; public var basedOn:String; mx_internal static const VERSION:String = "2.0.1.0"; public function State(){ initialized = false; overrides = []; super(); } mx_internal function initialize():void{ var _local1:int; if (!initialized){ initialized = true; _local1 = 0; while (_local1 < overrides.length) { IOverride(overrides[_local1]).initialize(); _local1++; }; }; } mx_internal function dispatchExitState():void{ dispatchEvent(new FlexEvent(FlexEvent.EXIT_STATE)); } mx_internal function dispatchEnterState():void{ dispatchEvent(new FlexEvent(FlexEvent.ENTER_STATE)); } } }//package mx.states
Section 383
//Transition (mx.states.Transition) package mx.states { import mx.effects.*; public class Transition { public var effect:Effect; public var toState:String;// = "*" public var fromState:String;// = "*" mx_internal static const VERSION:String = "2.0.1.0"; public function Transition(){ fromState = "*"; toState = "*"; super(); } } }//package mx.states
Section 384
//CSSStyleDeclaration (mx.styles.CSSStyleDeclaration) package mx.styles { import mx.core.*; import flash.display.*; import flash.events.*; import mx.managers.*; import flash.utils.*; public class CSSStyleDeclaration extends EventDispatcher { mx_internal var effects:Array; public var defaultFactory:Function; public var factory:Function; protected var overrides:Object; private var clones:Dictionary; mx_internal var selectorRefCount:int;// = 0 mx_internal static const VERSION:String = "2.0.1.0"; private static const NOT_A_COLOR:uint = 4294967295; private static var styleManager:IStyleManager = (Singleton.getInstance("mx.styles::IStyleManager") as IStyleManager); public function CSSStyleDeclaration(_arg1:String=null){ clones = new Dictionary(true); selectorRefCount = 0; super(); if (_arg1){ StyleManager.setStyleDeclaration(_arg1, this, false); }; } mx_internal function addStyleToProtoChain(_arg1:Object, _arg2:DisplayObject):Object{ var nodeAddedToChain:Boolean; var p:String; var emptyObjectFactory:Function; var chain = _arg1; var target = _arg2; nodeAddedToChain = false; if (defaultFactory != null){ defaultFactory.prototype = chain; chain = new defaultFactory(); nodeAddedToChain = true; }; if (factory != null){ factory.prototype = chain; chain = new factory(); nodeAddedToChain = true; }; if (overrides){ if ((((defaultFactory == null)) && ((factory == null)))){ emptyObjectFactory = function ():void{ }; emptyObjectFactory.prototype = chain; chain = new (emptyObjectFactory); nodeAddedToChain = true; }; for (p in overrides) { if (overrides[p] === undefined){ delete chain[p]; } else { chain[p] = overrides[p]; }; }; }; if (nodeAddedToChain){ clones[chain] = 1; }; return (chain); } public function getStyle(_arg1:String){ var _local2:*; var _local3:*; if (overrides){ if ((((_arg1 in overrides)) && ((overrides[_arg1] === undefined)))){ return (undefined); }; _local3 = overrides[_arg1]; if (_local3 !== undefined){ return (_local3); }; }; if (factory != null){ factory.prototype = {}; _local2 = new factory(); _local3 = _local2[_arg1]; if (_local3 !== undefined){ return (_local3); }; }; if (defaultFactory != null){ defaultFactory.prototype = {}; _local2 = new defaultFactory(); _local3 = _local2[_arg1]; if (_local3 !== undefined){ return (_local3); }; }; return (undefined); } mx_internal function createProtoChainRoot():Object{ var _local1:Object; _local1 = {}; if (defaultFactory != null){ defaultFactory.prototype = _local1; _local1 = new defaultFactory(); }; if (factory != null){ factory.prototype = _local1; _local1 = new factory(); }; clones[_local1] = 1; return (_local1); } public function clearStyle(_arg1:String):void{ setStyle(_arg1, undefined); } public function setStyle(_arg1:String, _arg2):void{ var _local3:Object; var _local4:Boolean; var _local5:Array; var _local6:int; var _local7:int; var _local8:Object; _local3 = getStyle(_arg1); _local4 = false; if ((((((((((selectorRefCount > 0)) && ((factory == null)))) && ((defaultFactory == null)))) && (!(overrides)))) && (!((_local3 === _arg2))))){ _local4 = true; }; if (_arg2 !== undefined){ setStyle(_arg1, _arg2); } else { if (_arg2 == _local3){ return; }; setStyle(_arg1, _arg2); }; _local5 = SystemManagerGlobals.topLevelSystemManagers; _local6 = _local5.length; if (_local4){ _local7 = 0; while (_local7 < _local6) { _local8 = _local5[_local7]; _local8.regenerateStyleCache(true); _local7++; }; }; _local7 = 0; while (_local7 < _local6) { _local8 = _local5[_local7]; _local8.notifyStyleChangeInChildren(_arg1, true); _local7++; }; } private function clearStyleAttr(_arg1:String):void{ var _local2:*; if (!overrides){ overrides = {}; }; overrides[_arg1] = undefined; for (_local2 in clones) { delete _local2[_arg1]; }; } mx_internal function clearOverride(_arg1:String):void{ if (((overrides) && (overrides[_arg1]))){ delete overrides[_arg1]; }; } mx_internal function setStyle(_arg1:String, _arg2):void{ var _local3:Object; var _local4:*; var _local5:Number; if (_arg2 === undefined){ clearStyleAttr(_arg1); return; }; if ((_arg2 is String)){ _local5 = StyleManager.getColorName(_arg2); if (_local5 != NOT_A_COLOR){ _arg2 = _local5; }; }; if (defaultFactory != null){ _local3 = new defaultFactory(); if (_local3[_arg1] !== _arg2){ if (!overrides){ overrides = {}; }; overrides[_arg1] = _arg2; } else { if (overrides){ delete overrides[_arg1]; }; }; }; if (factory != null){ _local3 = new factory(); if (_local3[_arg1] !== _arg2){ if (!overrides){ overrides = {}; }; overrides[_arg1] = _arg2; } else { if (overrides){ delete overrides[_arg1]; }; }; }; if ((((defaultFactory == null)) && ((factory == null)))){ if (!overrides){ overrides = {}; }; overrides[_arg1] = _arg2; }; for (_local4 in clones) { _local4[_arg1] = _arg2; }; } } }//package mx.styles
Section 385
//ISimpleStyleClient (mx.styles.ISimpleStyleClient) package mx.styles { public interface ISimpleStyleClient { function styleChanged(_arg1:String):void; function set styleName(_arg1:Object):void; function get styleName():Object; } }//package mx.styles
Section 386
//IStyleClient (mx.styles.IStyleClient) package mx.styles { public interface IStyleClient extends ISimpleStyleClient { function regenerateStyleCache(_arg1:Boolean):void; function clearStyle(_arg1:String):void; function getClassStyleDeclarations():Array; function get styleDeclaration():CSSStyleDeclaration; function get className():String; function notifyStyleChangeInChildren(_arg1:String, _arg2:Boolean):void; function set nonInheritingStyles(_arg1:Object):void; function get inheritingStyles():Object; function set inheritingStyles(_arg1:Object):void; function get nonInheritingStyles():Object; function set styleDeclaration(_arg1:CSSStyleDeclaration):void; function getStyle(_arg1:String); function setStyle(_arg1:String, _arg2):void; function registerEffects(_arg1:Array):void; } }//package mx.styles
Section 387
//IStyleManager (mx.styles.IStyleManager) package mx.styles { import flash.events.*; public interface IStyleManager { function isParentSizeInvalidatingStyle(_arg1:String):Boolean; function registerParentDisplayListInvalidatingStyle(_arg1:String):void; function set stylesRoot(_arg1:Object):void; function get inheritingStyles():Object; function styleDeclarationsChanged():void; function unloadStyleDeclarations(_arg1:String, _arg2:Boolean=true):void; function isParentDisplayListInvalidatingStyle(_arg1:String):Boolean; function registerInheritingStyle(_arg1:String):void; function get typeSelectorCache():Object; function setStyleDeclaration(_arg1:String, _arg2:CSSStyleDeclaration, _arg3:Boolean):void; function loadStyleDeclarations(_arg1:String, _arg2:Boolean=true, _arg3:Boolean=false):IEventDispatcher; function isSizeInvalidatingStyle(_arg1:String):Boolean; function getColorName(_arg1:Object):uint; function isValidStyleValue(_arg1):Boolean; function getColorNames(_arg1:Array):void; function isColorName(_arg1:String):Boolean; function isInheritingStyle(_arg1:String):Boolean; function set inheritingStyles(_arg1:Object):void; function get stylesRoot():Object; function initProtoChainRoots():void; function set typeSelectorCache(_arg1:Object):void; function registerParentSizeInvalidatingStyle(_arg1:String):void; function registerColorName(_arg1:String, _arg2:uint):void; function registerSizeInvalidatingStyle(_arg1:String):void; function clearStyleDeclaration(_arg1:String, _arg2:Boolean):void; function isInheritingTextFormatStyle(_arg1:String):Boolean; function getStyleDeclaration(_arg1:String):CSSStyleDeclaration; } }//package mx.styles
Section 388
//IStyleModule (mx.styles.IStyleModule) package mx.styles { public interface IStyleModule { function unload():void; } }//package mx.styles
Section 389
//StyleManager (mx.styles.StyleManager) package mx.styles { import mx.core.*; import flash.events.*; public class StyleManager { mx_internal static const VERSION:String = "2.0.1.0"; public static const NOT_A_COLOR:uint = 4294967295; private static var impl:IStyleManager = (Singleton.getInstance("mx.styles::IStyleManager") as IStyleManager); private static var implClassDependency:StyleManagerImpl; public static function isParentSizeInvalidatingStyle(_arg1:String):Boolean{ return (impl.isParentSizeInvalidatingStyle(_arg1)); } public static function registerInheritingStyle(_arg1:String):void{ impl.registerInheritingStyle(_arg1); } mx_internal static function set stylesRoot(_arg1:Object):void{ impl.stylesRoot = _arg1; } mx_internal static function get inheritingStyles():Object{ return (impl.inheritingStyles); } mx_internal static function styleDeclarationsChanged():void{ impl.styleDeclarationsChanged(); } public static function setStyleDeclaration(_arg1:String, _arg2:CSSStyleDeclaration, _arg3:Boolean):void{ impl.setStyleDeclaration(_arg1, _arg2, _arg3); } public static function registerParentDisplayListInvalidatingStyle(_arg1:String):void{ impl.registerParentDisplayListInvalidatingStyle(_arg1); } public static function isSizeInvalidatingStyle(_arg1:String):Boolean{ return (impl.isSizeInvalidatingStyle(_arg1)); } mx_internal static function get typeSelectorCache():Object{ return (impl.typeSelectorCache); } mx_internal static function set inheritingStyles(_arg1:Object):void{ impl.inheritingStyles = _arg1; } public static function isColorName(_arg1:String):Boolean{ return (impl.isColorName(_arg1)); } public static function isParentDisplayListInvalidatingStyle(_arg1:String):Boolean{ return (impl.isParentDisplayListInvalidatingStyle(_arg1)); } public static function getColorName(_arg1:Object):uint{ return (impl.getColorName(_arg1)); } mx_internal static function set typeSelectorCache(_arg1:Object):void{ impl.typeSelectorCache = _arg1; } public static function unloadStyleDeclarations(_arg1:String, _arg2:Boolean=true):void{ impl.unloadStyleDeclarations(_arg1, _arg2); } public static function getColorNames(_arg1:Array):void{ impl.getColorNames(_arg1); } public static function loadStyleDeclarations(_arg1:String, _arg2:Boolean=true, _arg3:Boolean=false):IEventDispatcher{ return (impl.loadStyleDeclarations(_arg1, _arg2, _arg3)); } public static function isValidStyleValue(_arg1):Boolean{ return (impl.isValidStyleValue(_arg1)); } mx_internal static function get stylesRoot():Object{ return (impl.stylesRoot); } public static function isInheritingStyle(_arg1:String):Boolean{ return (impl.isInheritingStyle(_arg1)); } mx_internal static function initProtoChainRoots():void{ impl.initProtoChainRoots(); } public static function registerParentSizeInvalidatingStyle(_arg1:String):void{ impl.registerParentSizeInvalidatingStyle(_arg1); } public static function registerSizeInvalidatingStyle(_arg1:String):void{ impl.registerSizeInvalidatingStyle(_arg1); } public static function clearStyleDeclaration(_arg1:String, _arg2:Boolean):void{ impl.clearStyleDeclaration(_arg1, _arg2); } public static function registerColorName(_arg1:String, _arg2:uint):void{ impl.registerColorName(_arg1, _arg2); } public static function isInheritingTextFormatStyle(_arg1:String):Boolean{ return (impl.isInheritingTextFormatStyle(_arg1)); } public static function getStyleDeclaration(_arg1:String):CSSStyleDeclaration{ return (impl.getStyleDeclaration(_arg1)); } } }//package mx.styles
Section 390
//StyleManagerImpl (mx.styles.StyleManagerImpl) package mx.styles { import mx.resources.*; import flash.system.*; import flash.events.*; import mx.modules.*; import mx.events.*; import mx.managers.*; import flash.utils.*; import mx.utils.*; public class StyleManagerImpl implements IStyleManager { private var resourceUnableToLoad:String;// = null private var _stylesRoot:Object; private var styleModules:Object; private var packageResources:ResourceBundle; private var _inheritingStyles:Object; private var _typeSelectorCache:Object; private var selectors:Object; mx_internal static const VERSION:String = "2.0.1.0"; private static var parentSizeInvalidatingStyles:Object = {bottom:true, horizontalCenter:true, left:true, right:true, top:true, verticalCenter:true}; private static var colorNames:Object = {transparent:"transparent", black:0, blue:0xFF, green:0x8000, gray:0x808080, silver:0xC0C0C0, lime:0xFF00, olive:0x808000, white:0xFFFFFF, yellow:0xFFFF00, maroon:0x800000, navy:128, red:0xFF0000, purple:0x800080, teal:0x8080, fuchsia:0xFF00FF, aqua:0xFFFF, magenta:0xFF00FF, cyan:0xFFFF, halogreen:8453965, haloblue:40447, haloorange:0xFFB600, halosilver:11455193}; private static var inheritingTextFormatStyles:Object = {align:true, bold:true, color:true, font:true, indent:true, italic:true, size:true}; private static var instance:IStyleManager; private static var parentDisplayListInvalidatingStyles:Object = {bottom:true, horizontalCenter:true, left:true, right:true, top:true, verticalCenter:true}; private static var sizeInvalidatingStyles:Object = {borderStyle:true, borderThickness:true, fontAntiAliasType:true, fontFamily:true, fontGridFitType:true, fontSharpness:true, fontSize:true, fontStyle:true, fontThickness:true, fontWeight:true, headerHeight:true, horizontalAlign:true, horizontalGap:true, kerning:true, leading:true, letterSpacing:true, paddingBottom:true, paddingLeft:true, paddingRight:true, paddingTop:true, strokeWidth:true, tabHeight:true, tabWidth:true, verticalAlign:true, verticalGap:true}; public function StyleManagerImpl(){ packageResources = ResourceBundle.getResourceBundle("styles", ApplicationDomain.currentDomain); resourceUnableToLoad = null; selectors = {}; styleModules = {}; _inheritingStyles = {}; _typeSelectorCache = {}; super(); } public function setStyleDeclaration(_arg1:String, _arg2:CSSStyleDeclaration, _arg3:Boolean):void{ _arg2.selectorRefCount++; selectors[_arg1] = _arg2; typeSelectorCache = new Object(); if (_arg3){ styleDeclarationsChanged(); }; } public function registerSizeInvalidatingStyle(_arg1:String):void{ sizeInvalidatingStyles[_arg1] = true; } public function isColorName(_arg1:String):Boolean{ return (!((colorNames[_arg1.toLowerCase()] === undefined))); } public function registerParentDisplayListInvalidatingStyle(_arg1:String):void{ parentDisplayListInvalidatingStyles[_arg1] = true; } public function set inheritingStyles(_arg1:Object):void{ _inheritingStyles = _arg1; } public function getColorNames(_arg1:Array):void{ var _local2:int; var _local3:int; var _local4:uint; if (!_arg1){ return; }; _local2 = _arg1.length; _local3 = 0; while (_local3 < _local2) { if (((!((_arg1[_local3] == null))) && (isNaN(_arg1[_local3])))){ _local4 = getColorName(_arg1[_local3]); if (_local4 != StyleManager.NOT_A_COLOR){ _arg1[_local3] = _local4; }; }; _local3++; }; } public function isInheritingTextFormatStyle(_arg1:String):Boolean{ return ((inheritingTextFormatStyles[_arg1] == true)); } public function set typeSelectorCache(_arg1:Object):void{ _typeSelectorCache = _arg1; } public function registerParentSizeInvalidatingStyle(_arg1:String):void{ parentSizeInvalidatingStyles[_arg1] = true; } public function registerColorName(_arg1:String, _arg2:uint):void{ colorNames[_arg1.toLowerCase()] = _arg2; } public function isParentSizeInvalidatingStyle(_arg1:String):Boolean{ return ((parentSizeInvalidatingStyles[_arg1] == true)); } public function get inheritingStyles():Object{ return (_inheritingStyles); } public function isParentDisplayListInvalidatingStyle(_arg1:String):Boolean{ return ((parentDisplayListInvalidatingStyles[_arg1] == true)); } public function isSizeInvalidatingStyle(_arg1:String):Boolean{ return ((sizeInvalidatingStyles[_arg1] == true)); } public function set stylesRoot(_arg1:Object):void{ _stylesRoot = _arg1; } public function styleDeclarationsChanged():void{ var _local1:Array; var _local2:int; var _local3:int; var _local4:SystemManager; _local1 = SystemManagerGlobals.topLevelSystemManagers; _local2 = _local1.length; _local3 = 0; while (_local3 < _local2) { _local4 = SystemManager(_local1[_local3]); _local4.regenerateStyleCache(true); _local4.notifyStyleChangeInChildren(null, true); _local3++; }; } public function isValidStyleValue(_arg1):Boolean{ return (!((_arg1 === undefined))); } public function loadStyleDeclarations(_arg1:String, _arg2:Boolean=true, _arg3:Boolean=false):IEventDispatcher{ var module:IModuleInfo; var readyHandler:Function; var styleEventDispatcher:StyleEventDispatcher; var errorHandler:Function; var timer:Timer; var timerHandler:Function; var url = _arg1; var update = _arg2; var trustContent = _arg3; module = ModuleManager.getModule(url); readyHandler = function (_arg1:ModuleEvent):void{ var _local2:IStyleModule; _local2 = IStyleModule(_arg1.module.factory.create()); styleModules[_arg1.module.url].styleModule = _local2; if (update){ styleDeclarationsChanged(); }; }; module.addEventListener(ModuleEvent.READY, readyHandler, false, 0, true); styleEventDispatcher = new StyleEventDispatcher(module); errorHandler = function (_arg1:ModuleEvent):void{ var _local2:String; var _local3:StyleEvent; if (resourceUnableToLoad == null){ loadResources(); }; _local2 = StringUtil.substitute(resourceUnableToLoad, _arg1.errorText, url); if (styleEventDispatcher.willTrigger(StyleEvent.ERROR)){ _local3 = new StyleEvent(StyleEvent.ERROR, _arg1.bubbles, _arg1.cancelable); _local3.bytesLoaded = 0; _local3.bytesTotal = 0; _local3.errorText = _local2; styleEventDispatcher.dispatchEvent(_local3); } else { throw (new Error(_local2)); }; }; module.addEventListener(ModuleEvent.ERROR, errorHandler, false, 0, true); styleModules[url] = new StyleModuleInfo(module, readyHandler, errorHandler); timer = new Timer(0); timerHandler = function (_arg1:TimerEvent):void{ timer.removeEventListener(TimerEvent.TIMER, timerHandler); timer.stop(); if (trustContent){ module.load(ApplicationDomain.currentDomain, SecurityDomain.currentDomain); } else { module.load(); }; }; timer.addEventListener(TimerEvent.TIMER, timerHandler, false, 0, true); timer.start(); return (styleEventDispatcher); } public function registerInheritingStyle(_arg1:String):void{ inheritingStyles[_arg1] = true; } public function unloadStyleDeclarations(_arg1:String, _arg2:Boolean=true):void{ var _local3:StyleModuleInfo; var _local4:IModuleInfo; _local3 = styleModules[_arg1]; if (_local3){ _local3.styleModule.unload(); _local4 = _local3.module; _local4.unload(); _local4.removeEventListener(ModuleEvent.READY, _local3.readyHandler); _local4.removeEventListener(ModuleEvent.ERROR, _local3.errorHandler); styleModules[_arg1] = null; }; if (_arg2){ styleDeclarationsChanged(); }; } private function loadResources():void{ resourceUnableToLoad = packageResources.getString("unableToLoad"); } public function isInheritingStyle(_arg1:String):Boolean{ return ((inheritingStyles[_arg1] == true)); } public function get typeSelectorCache():Object{ return (_typeSelectorCache); } public function get stylesRoot():Object{ return (_stylesRoot); } public function getColorName(_arg1:Object):uint{ var _local2:Number; var _local3:*; if ((_arg1 is String)){ if (_arg1.charAt(0) == "#"){ _local2 = Number(("0x" + _arg1.slice(1))); return ((isNaN(_local2)) ? StyleManager.NOT_A_COLOR : uint(_local2)); }; if ((((_arg1.charAt(1) == "x")) && ((_arg1.charAt(0) == "0")))){ _local2 = Number(_arg1); return ((isNaN(_local2)) ? StyleManager.NOT_A_COLOR : uint(_local2)); }; _local3 = colorNames[_arg1.toLowerCase()]; if (_local3 === undefined){ return (StyleManager.NOT_A_COLOR); }; return (uint(_local3)); }; return (uint(_arg1)); } public function initProtoChainRoots():void{ if (!stylesRoot){ stylesRoot = selectors["global"].addStyleToProtoChain({}, null); }; } public function clearStyleDeclaration(_arg1:String, _arg2:Boolean):void{ var _local3:CSSStyleDeclaration; _local3 = getStyleDeclaration(_arg1); if (((_local3) && ((_local3.selectorRefCount > 0)))){ _local3.selectorRefCount--; }; delete selectors[_arg1]; if (_arg2){ styleDeclarationsChanged(); }; } public function getStyleDeclaration(_arg1:String):CSSStyleDeclaration{ var _local2:int; if (_arg1.charAt(0) != "."){ _local2 = _arg1.lastIndexOf("."); if (_local2 != -1){ _arg1 = _arg1.substr((_local2 + 1)); }; }; return (selectors[_arg1]); } public static function getInstance():IStyleManager{ if (!instance){ instance = new (StyleManagerImpl); }; return (instance); } } }//package mx.styles import flash.events.*; import mx.modules.*; import mx.events.*; class StyleEventDispatcher extends EventDispatcher { private function StyleEventDispatcher(_arg1:IModuleInfo){ _arg1.addEventListener(ModuleEvent.ERROR, moduleInfo_errorHandler, false, 0, true); _arg1.addEventListener(ModuleEvent.PROGRESS, moduleInfo_progressHandler, false, 0, true); _arg1.addEventListener(ModuleEvent.READY, moduleInfo_readyHandler, false, 0, true); } private function moduleInfo_readyHandler(_arg1:ModuleEvent):void{ var _local2:StyleEvent; _local2 = new StyleEvent(StyleEvent.COMPLETE); dispatchEvent(_local2); } private function moduleInfo_errorHandler(_arg1:ModuleEvent):void{ var _local2:StyleEvent; _local2 = new StyleEvent(StyleEvent.ERROR, _arg1.bubbles, _arg1.cancelable); _local2.bytesLoaded = _arg1.bytesLoaded; _local2.bytesTotal = _arg1.bytesTotal; _local2.errorText = _arg1.errorText; dispatchEvent(_local2); } private function moduleInfo_progressHandler(_arg1:ModuleEvent):void{ var _local2:StyleEvent; _local2 = new StyleEvent(StyleEvent.PROGRESS, _arg1.bubbles, _arg1.cancelable); _local2.bytesLoaded = _arg1.bytesLoaded; _local2.bytesTotal = _arg1.bytesTotal; dispatchEvent(_local2); } } class StyleModuleInfo { public var errorHandler:Function; public var module:IModuleInfo; public var styleModule:IStyleModule; public var readyHandler:Function; private function StyleModuleInfo(_arg1:IModuleInfo, _arg2:Function, _arg3:Function){ this.module = _arg1; this.readyHandler = _arg2; this.errorHandler = _arg3; } }
Section 391
//StyleProtoChain (mx.styles.StyleProtoChain) package mx.styles { import mx.core.*; import flash.display.*; public class StyleProtoChain { mx_internal static const VERSION:String = "2.0.1.0"; public static function initProtoChainForUIComponentStyleName(_arg1:IStyleClient):void{ var _local2:IStyleClient; var _local3:Object; var _local4:Object; var _local5:Array; var _local6:int; var _local7:int; var _local8:CSSStyleDeclaration; _local2 = IStyleClient(_arg1.styleName); _local3 = _local2.nonInheritingStyles; if (((!(_local3)) || ((_local3 == UIComponent.STYLE_UNINITIALIZED)))){ _local3 = StyleManager.stylesRoot; if (_local3.effects){ _arg1.registerEffects(_local3.effects); }; }; _local4 = _local2.inheritingStyles; if (((!(_local4)) || ((_local4 == UIComponent.STYLE_UNINITIALIZED)))){ _local4 = StyleManager.stylesRoot; }; _local5 = _arg1.getClassStyleDeclarations(); _local6 = _local5.length; _local7 = 0; while (_local7 < _local6) { _local8 = _local5[_local7]; _local4 = _local8.addStyleToProtoChain(_local4, DisplayObject(_arg1)); _local4 = addProperties(_local4, _local2, true); _local3 = _local8.addStyleToProtoChain(_local3, DisplayObject(_arg1)); _local3 = addProperties(_local3, _local2, false); if (_local8.effects){ _arg1.registerEffects(_local8.effects); }; _local7++; }; _arg1.inheritingStyles = (_arg1.styleDeclaration) ? _arg1.styleDeclaration.addStyleToProtoChain(_local4, DisplayObject(_arg1)) : _local4; _arg1.nonInheritingStyles = (_arg1.styleDeclaration) ? _arg1.styleDeclaration.addStyleToProtoChain(_local3, DisplayObject(_arg1)) : _local3; } private static function addProperties(_arg1:Object, _arg2:IStyleClient, _arg3:Boolean):Object{ var _local4:Array; var _local5:int; var _local6:int; var _local7:Object; var _local8:CSSStyleDeclaration; var _local9:CSSStyleDeclaration; _local4 = _arg2.getClassStyleDeclarations(); _local5 = _local4.length; _local6 = 0; while (_local6 < _local5) { _local8 = _local4[_local6]; _arg1 = _local8.addStyleToProtoChain(_arg1, DisplayObject(_arg2)); if (_local8.effects){ _arg2.registerEffects(_local8.effects); }; _local6++; }; _local7 = _arg2.styleName; if (_local7){ if (typeof(_local7) == "object"){ if ((_local7 is CSSStyleDeclaration)){ _local9 = CSSStyleDeclaration(_local7); } else { _arg1 = addProperties(_arg1, IStyleClient(_local7), _arg3); }; } else { _local9 = StyleManager.getStyleDeclaration(("." + _local7)); }; if (_local9){ _arg1 = _local9.addStyleToProtoChain(_arg1, DisplayObject(_arg2)); if (_local9.effects){ _arg2.registerEffects(_local9.effects); }; }; }; if (_arg2.styleDeclaration){ _arg1 = _arg2.styleDeclaration.addStyleToProtoChain(_arg1, DisplayObject(_arg2)); }; return (_arg1); } public static function initTextField(_arg1:UITextField):void{ var _local2:Object; var _local3:CSSStyleDeclaration; var _local4:Object; var _local5:Object; _local2 = _arg1.styleName; if (_local2){ if (typeof(_local2) == "object"){ if ((_local2 is CSSStyleDeclaration)){ _local3 = CSSStyleDeclaration(_local2); } else { _arg1.inheritingStyles = IStyleClient(_local2).inheritingStyles; _arg1.nonInheritingStyles = IStyleClient(_local2).nonInheritingStyles; return; }; } else { _local3 = StyleManager.getStyleDeclaration(("." + _local2)); }; }; _local4 = IStyleClient(_arg1.parent).inheritingStyles; _local5 = StyleManager.stylesRoot; if (!_local4){ _local4 = StyleManager.stylesRoot; }; if (_local3){ _local4 = _local3.addStyleToProtoChain(_local4, _arg1); _local5 = _local3.addStyleToProtoChain(_local5, _arg1); }; _arg1.inheritingStyles = _local4; _arg1.nonInheritingStyles = _local5; } } }//package mx.styles
Section 392
//ColorUtil (mx.utils.ColorUtil) package mx.utils { public class ColorUtil { mx_internal static const VERSION:String = "2.0.1.0"; public static function adjustBrightness2(_arg1:uint, _arg2:Number):uint{ var _local3:Number; var _local4:Number; var _local5:Number; if (_arg2 == 0){ return (_arg1); }; if (_arg2 < 0){ _arg2 = ((100 + _arg2) / 100); _local3 = (((_arg1 >> 16) & 0xFF) * _arg2); _local4 = (((_arg1 >> 8) & 0xFF) * _arg2); _local5 = ((_arg1 & 0xFF) * _arg2); } else { _arg2 = (_arg2 / 100); _local3 = ((_arg1 >> 16) & 0xFF); _local4 = ((_arg1 >> 8) & 0xFF); _local5 = (_arg1 & 0xFF); _local3 = (_local3 + ((0xFF - _local3) * _arg2)); _local4 = (_local4 + ((0xFF - _local4) * _arg2)); _local5 = (_local5 + ((0xFF - _local5) * _arg2)); _local3 = Math.min(_local3, 0xFF); _local4 = Math.min(_local4, 0xFF); _local5 = Math.min(_local5, 0xFF); }; return ((((_local3 << 16) | (_local4 << 8)) | _local5)); } public static function rgbMultiply(_arg1:uint, _arg2:uint):uint{ var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; _local3 = ((_arg1 >> 16) & 0xFF); _local4 = ((_arg1 >> 8) & 0xFF); _local5 = (_arg1 & 0xFF); _local6 = ((_arg2 >> 16) & 0xFF); _local7 = ((_arg2 >> 8) & 0xFF); _local8 = (_arg2 & 0xFF); return ((((((_local3 * _local6) / 0xFF) << 16) | (((_local4 * _local7) / 0xFF) << 8)) | ((_local5 * _local8) / 0xFF))); } public static function adjustBrightness(_arg1:uint, _arg2:Number):uint{ var _local3:Number; var _local4:Number; var _local5:Number; _local3 = Math.max(Math.min((((_arg1 >> 16) & 0xFF) + _arg2), 0xFF), 0); _local4 = Math.max(Math.min((((_arg1 >> 8) & 0xFF) + _arg2), 0xFF), 0); _local5 = Math.max(Math.min(((_arg1 & 0xFF) + _arg2), 0xFF), 0); return ((((_local3 << 16) | (_local4 << 8)) | _local5)); } } }//package mx.utils
Section 393
//GraphicsUtil (mx.utils.GraphicsUtil) package mx.utils { import flash.display.*; public class GraphicsUtil { mx_internal static const VERSION:String = "2.0.1.0"; public static function drawRoundRectComplex(_arg1:Graphics, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number, _arg9:Number):void{ var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; _local10 = (_arg2 + _arg4); _local11 = (_arg3 + _arg5); _local12 = ((_arg4 < _arg5)) ? (_arg4 * 2) : (_arg5 * 2); _arg6 = ((_arg6 < _local12)) ? _arg6 : _local12; _arg7 = ((_arg7 < _local12)) ? _arg7 : _local12; _arg8 = ((_arg8 < _local12)) ? _arg8 : _local12; _arg9 = ((_arg9 < _local12)) ? _arg9 : _local12; _local13 = (_arg9 * 0.292893218813453); _local14 = (_arg9 * 0.585786437626905); _arg1.moveTo(_local10, (_local11 - _arg9)); _arg1.curveTo(_local10, (_local11 - _local14), (_local10 - _local13), (_local11 - _local13)); _arg1.curveTo((_local10 - _local14), _local11, (_local10 - _arg9), _local11); _local13 = (_arg8 * 0.292893218813453); _local14 = (_arg8 * 0.585786437626905); _arg1.lineTo((_arg2 + _arg8), _local11); _arg1.curveTo((_arg2 + _local14), _local11, (_arg2 + _local13), (_local11 - _local13)); _arg1.curveTo(_arg2, (_local11 - _local14), _arg2, (_local11 - _arg8)); _local13 = (_arg6 * 0.292893218813453); _local14 = (_arg6 * 0.585786437626905); _arg1.lineTo(_arg2, (_arg3 + _arg6)); _arg1.curveTo(_arg2, (_arg3 + _local14), (_arg2 + _local13), (_arg3 + _local13)); _arg1.curveTo((_arg2 + _local14), _arg3, (_arg2 + _arg6), _arg3); _local13 = (_arg7 * 0.292893218813453); _local14 = (_arg7 * 0.585786437626905); _arg1.lineTo((_local10 - _arg7), _arg3); _arg1.curveTo((_local10 - _local14), _arg3, (_local10 - _local13), (_arg3 + _local13)); _arg1.curveTo(_local10, (_arg3 + _local14), _local10, (_arg3 + _arg7)); _arg1.lineTo(_local10, (_local11 - _arg9)); } } }//package mx.utils
Section 394
//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 = "2.0.1.0"; private static var counter:int = 0; public static function displayObjectToString(_arg1:DisplayObject):String{ var _local2:String; var _local3:DisplayObject; var _local4:String; var _local5:Array; _local3 = _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{ var _local2:String; var _local3:int; var _local4:int; if (!_arg1){ return (null); }; _local2 = getQualifiedClassName(_arg1); _local3 = _local2.indexOf("::"); if (_local3 != -1){ _local2 = _local2.substr((_local3 + 2)); }; _local4 = _local2.charCodeAt((_local2.length - 1)); if ((((_local4 >= 48)) && ((_local4 <= 57)))){ _local2 = (_local2 + "_"); }; return ((_local2 + counter++)); } } }//package mx.utils
Section 395
//StringUtil (mx.utils.StringUtil) package mx.utils { public class StringUtil { mx_internal static const VERSION:String = "2.0.1.0"; public static function trim(_arg1:String):String{ var _local2:int; var _local3:int; _local2 = 0; while (isWhitespace(_arg1.charAt(_local2))) { _local2++; }; _local3 = (_arg1.length - 1); while (isWhitespace(_arg1.charAt(_local3))) { _local3--; }; if (_local3 >= _local2){ return (_arg1.slice(_local2, (_local3 + 1))); }; return (""); } public static function isWhitespace(_arg1:String):Boolean{ switch (_arg1){ case " ": case "\t": case "\r": case "\n": case "\f": return (true); default: return (false); }; } public static function substitute(_arg1:String, ... _args):String{ var _local3:uint; var _local4:Array; var _local5:int; _local3 = _args.length; if ((((_local3 == 1)) && ((_args[0] is Array)))){ _local4 = (_args[0] as Array); _local3 = _local4.length; } else { _local4 = _args; }; _local5 = 0; while (_local5 < _local3) { _arg1 = _arg1.replace(new RegExp((("\\{" + _local5) + "\\}"), "g"), _local4[_local5]); _local5++; }; return (_arg1); } public static function trimArrayElements(_arg1:String, _arg2:String):String{ var _local3:Array; var _local4:int; var _local5:int; if (((!((_arg1 == ""))) && (!((_arg1 == null))))){ _local3 = _arg1.split(_arg2); _local4 = _local3.length; _local5 = 0; while (_local5 < _local4) { _local3[_local5] = StringUtil.trim(_local3[_local5]); _local5++; }; if (_local4 > 0){ _arg1 = _local3.join(_arg2); }; }; return (_arg1); } } }//package mx.utils
Section 396
//IValidatorListener (mx.validators.IValidatorListener) package mx.validators { import mx.events.*; public interface IValidatorListener { function set errorString(_arg1:String):void; function get validationSubField():String; function validationResultHandler(_arg1:ValidationResultEvent):void; function set validationSubField(_arg1:String):void; function get errorString():String; } }//package mx.validators
Section 397
//ValidationResult (mx.validators.ValidationResult) package mx.validators { public class ValidationResult { public var errorCode:String; public var errorMessage:String; public var subField:String; public var isError:Boolean; mx_internal static const VERSION:String = "2.0.1.0"; public function ValidationResult(_arg1:Boolean, _arg2:String="", _arg3:String="", _arg4:String=""){ this.isError = _arg1; this.subField = _arg2; this.errorMessage = _arg4; this.errorCode = _arg3; } } }//package mx.validators
Section 398
//NagScreen (NagScreen.NagScreen) package NagScreen { import GameScene.*; import flash.display.*; import GameObject.*; import Layout.*; import flash.events.*; import Tools.*; import GlobalSetup.*; import GameConfig.*; import flash.external.*; public class NagScreen extends GameScene { public var allLoaded:Boolean;// = false public var OK:GameObject; public var but2:GameObject; public var but1:GameObject; public var iconObjects:Array; public var leftText:GameObject; public var okClass:Class; public static var free1:Class = NagScreen_free1; public static var free2:Class = NagScreen_free2; public static var data:SafeRequest; public static var dataFetched:Boolean = false; public static var gameNames:Array = null; public static var iconRequests:Array; public function NagScreen(){ allLoaded = false; super(); } public function buildGames(){ var _local1:int; var _local2:String; var _local3:GameObject; iconObjects = new Array(); _local1 = 0; 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 init():void{ var _local1:GameObject; var _local2:Layout; var _local3:Array; var _local4:Layout; buildGames(); but1 = new GameObject(this, free1, "TextLayer", 0, 0); but2 = new GameObject(this, free2, "TextLayer", 0, 0); OK = new GameObject(this, SimpleButton, "TextLayer", 0, 0); OK.setupButton(Embeds.menu_button_png, "Keep Playing"); OK.basex = 400; OK.basey = (600 - 48); for each (_local1 in iconObjects) { _local1.objectLoaded(); }; _local2 = Layout.Horiz(iconObjects, 12); _local3 = [but1, _local2, but2]; _local4 = Layout.Vert(_local3, 12, 400, 250); LayerFilter.applySlideIn(but1, 0, 0, -400); LayerFilter.applySlideIn(_local2, 1); LayerFilter.applySlideIn(but2, -1); LayerFilter.applySlideIn(OK, 0, 0, 400); } public function getTextFromJavascript(_arg1:String):void{ leftText.setText(_arg1); } override public function _update():void{ var _local1:int; var _local2:String; _local1 = 0; while (_local1 < iconObjects.length) { if (iconObjects[_local1].mHit()){ _local2 = Extern.sendMessage("nav", (("http://www.rocksolidarcade.com/games/" + gameNames[_local1]) + "/fn")); if (_local2 != "ss"){ Net.openURL((("http://www.rocksolidarcade.com/games/" + gameNames[_local1]) + "/fn")); }; }; _local1++; }; if (OK.mHit()){ pushScene(new okClass(), true); }; } public static function finishFetch():void{ var _local1:Array; var _local2:Array; var _local3:String; var _local4:Array; var _local5:String; var _local6:int; var _local7:String; var _local8:int; dataFetched = true; _local1 = data.data.split(":::"); _local2 = new Array(); for each (_local3 in _local1) { _local4 = _local3.split(",", 3); _local5 = _local4[0]; _local6 = int(_local4[1]); _local7 = _local4[2]; if (_local5 != GameConfig.shortName){ _local8 = 0; while (_local8 < _local6) { _local2.push(_local5); _local8++; }; }; }; while (_local2.length > 3) { _local2 = _local2.splice(Random.randInt(0, (_local2.length - 1)), 1); }; requestIcons(_local2); } public static function preload():void{ if (!data){ data = new SafeRequest("http://www.rocksolidarcade.com/randomselection/", 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 gamesHaveLoaded():Boolean{ var _local1:SafeImageRequest; if (!iconRequests){ return (false); }; for each (_local1 in iconRequests) { if (!_local1.finished){ return (false); }; }; return (true); } public static function create(_arg1:GameScene, _arg2:Class):void{ var _local3:NagScreen; if (gamesHaveLoaded()){ _local3 = new (NagScreen); _local3.okClass = _arg2; _arg1.pushScene(_local3, true); } else { _arg1.pushScene(new (_arg2), true); }; } } }//package NagScreen
Section 399
//NagScreen_free1 (NagScreen.NagScreen_free1) package NagScreen { import mx.core.*; public class NagScreen_free1 extends BitmapAsset { } }//package NagScreen
Section 400
//NagScreen_free2 (NagScreen.NagScreen_free2) package NagScreen { import mx.core.*; public class NagScreen_free2 extends BitmapAsset { } }//package NagScreen
Section 401
//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; _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 402
//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; _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.Friction = 0; _local4.Test = 0; _local4.impath = "pop.png"; _local4.image = par1_embed; _arg2.conditionalParticles.push(_local4); _local6 = new GameObject(_arg1, child1_embed, "", 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 403
//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; _local6 = new GameObject(_arg1, child1_embed, "", -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, "", 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, "", -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, "", 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 404
//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; } } }//package ObjectConstructors
Section 405
//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; } } }//package ObjectConstructors
Section 406
//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; } } }//package ObjectConstructors
Section 407
//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; _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 408
//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 LayerName:String = "ObstacleFront"; public static var child3_embed:Class = Embeds.pipeback_png; public static var child1_embed:Class = Embeds.pipecollisiongood_png; public static var child2_embed:Class = Embeds.tick_png; public static var child1:BitmapData = new Embeds.pipecollisiongood_png().bitmapData; public static var baseim_embed:Class = Embeds.pipe_png; public static var child3:BitmapData = new Embeds.pipeback_png().bitmapData; public static var baseim:BitmapData = new Embeds.pipe_png().bitmapData; public static var child2:BitmapData = new Embeds.tick_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; _local6 = new GameObject(_arg1, child1_embed, "", 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, child2_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, child3_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 409
//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 LayerName:String = ""; public static var child3_embed:Class = Embeds.tick_png; public static var child1_embed:Class = Embeds.pipecollisiongood_png; public static var child2_embed:Class = Embeds.pipecollisiongood_png; public static var child4_embed:Class = Embeds.pipebig_png; public static var child1:BitmapData = new Embeds.pipecollisiongood_png().bitmapData; public static var baseim_embed:Class = Embeds.pipebigback_png; public static var child3:BitmapData = new Embeds.tick_png().bitmapData; public static var baseim:BitmapData = new Embeds.pipebigback_png().bitmapData; public static var child2:BitmapData = new Embeds.pipecollisiongood_png().bitmapData; public static var child4:BitmapData = new Embeds.pipebig_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; _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, "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, child4_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 410
//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; _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 411
//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; _local6 = new GameObject(_arg1, child1_embed, "", -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, "", 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, "", 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 412
//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; _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.Friction = 0.0450000018; _local4.Test = 0; _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.Friction = 0; _local4.Test = 0; _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.Friction = 0; _local4.Test = 0; _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.Friction = 0; _local4.Test = 0; _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.Friction = 0; _local4.Test = 0; _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.Friction = 0; _local4.Test = 0; _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.Friction = 0; _local4.Test = 0; _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); Plane(_arg2).planecrash = planecrash; Plane(_arg2).roll = roll; } } }//package ObjectConstructors
Section 413
//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; } } }//package ObjectConstructors
Section 414
//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; _local6 = new GameObject(_arg1, child1_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 415
//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; _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 416
//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; _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 417
//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; _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 418
//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; _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 419
//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; _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 420
//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 LayerName:String = "ObstacleFront"; public static var child3_embed:Class = Embeds.pipecollisiongoodright_png; public static var child1_embed:Class = Embeds.ring3_png; public static var child2_embed:Class = Embeds.tick_png; public static var child4_embed:Class = Embeds.pipecollisiongoodright_png; public static var child1:BitmapData = new Embeds.ring3_png().bitmapData; public static var baseim_embed:Class = Embeds.ring3back_png; public static var child3:BitmapData = new Embeds.pipecollisiongoodright_png().bitmapData; public static var baseim:BitmapData = new Embeds.ring3back_png().bitmapData; public static var child2:BitmapData = new Embeds.tick_png().bitmapData; public static var child4:BitmapData = new Embeds.pipecollisiongoodright_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; _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, "", 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, child4_embed, "", 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 421
//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 LayerName:String = "ObstacleFront"; public static var child3_embed:Class = Embeds.pipecollisiongoodright_png; public static var child1_embed:Class = Embeds.ring2_png; public static var child2_embed:Class = Embeds.tick_png; public static var child4_embed:Class = Embeds.pipecollisiongoodright_png; public static var child1:BitmapData = new Embeds.ring2_png().bitmapData; public static var baseim_embed:Class = Embeds.ring2back_png; public static var child3:BitmapData = new Embeds.pipecollisiongoodright_png().bitmapData; public static var baseim:BitmapData = new Embeds.ring2back_png().bitmapData; public static var child2:BitmapData = new Embeds.tick_png().bitmapData; public static var child4:BitmapData = new Embeds.pipecollisiongoodright_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; _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, "", -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, child4_embed, "", 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 422
//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; _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, "", 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, "", -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, "", -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, "", 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 423
//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; _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, "", 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, "", -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, "", 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, "", 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 424
//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 425
//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 426
//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 427
//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 428
//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 429
//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 430
//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){ dy = 0; 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 431
//Obstacle (Objects.Obstacle) package Objects { import GameScene.*; import GameObject.*; import Scenes.*; public class Obstacle extends GameObject { public var success:Boolean;// = false public var successChildren:Array; public var goodCollisionSet:GameObjectCollisionSet; public var old:Boolean;// = false public var plane:Plane; public var firstRun:Boolean;// = true public var causesRoll:Boolean;// = false public var collisionSet:GameObjectCollisionSet; public function Obstacle(_arg1:GameScene, _arg2:Class, _arg3:int, _arg4:int){ success = false; old = false; causesRoll = false; firstRun = true; super(_arg1, _arg2, "ObstacleFront", _arg3, _arg4); } public function reset():void{ success = false; } public function successFunc():void{ } override public function _update():void{ var _local1:GameObject; var _local2:Number; var _local3:Number; 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; }; _local2 = (plane.basex - basex); _local3 = (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; }; }; }; } } }//package Objects
Section 432
//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 433
//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 434
//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 435
//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 436
//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 shiftFilterFadeIn:int;// = 0 public var extraSpeed:Number;// = 0 public var inBarrelRoll:int;// = 0 public var inSpeedUp:int;// = 0 public var engineChannel:GameSoundChannel; public var deadTicks:int;// = 0 public var dead:Boolean;// = false public var roll:Array; public var fallingChannel:GameSoundChannel; public var dy:Number;// = 0 public var shiftFilter:GameObjectFilterAddOrigin; public var rollFrameTarget:Number;// = 0 public var dx:Number;// = 0 public var planecrash:BitmapData; public var splutter:int;// = 0 public var consecutiveScore:int;// = 1 public var nextStartX:Number;// = 0 public var consecutiveFastScore:int;// = 1 public var startMoveY:Number; public var prop:PlaneProp; public var highestConsecutiveScore:int;// = 0 public var outOfControl:Boolean;// = false public var flyOffX:Number;// = 0 public static var gravity:Number = 0.01; public function Plane(_arg1:GameScene, _arg2:int, _arg3:int){ dx = 0; dy = 0; dRotation = 0; outOfControl = false; dead = false; splutter = 0; consecutiveScore = 1; consecutiveFastScore = 1; deadTicks = 0; inBarrelRoll = 0; inSpeedUp = 0; extraSpeed = 0; rollFrameTarget = 0; highestConsecutiveScore = 0; flyOffX = 0; nextStartX = 0; shiftFilterFadeIn = 0; 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 DownKey():int{ if (MainMenu.controlsReversed){ return (Input.i.keyDown(40)); }; return (Input.i.keyDown(38)); } public function sgn(_arg1:Number):Number{ if (_arg1 == 0){ return (0); }; if (_arg1 > 0){ return (1); }; return (-1); } public function speedUp():Number{ var _local1:Number; _local1 = ((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 kill():void{ if (!dead){ if (!outOfControl){ GameSoundScene.forName("main").insertDeadBreak(3000); }; Logging.Log("stuntpilottrainer", "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; }; }; }; } 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 UpKey():int{ if (MainMenu.controlsReversed){ return (Input.i.keyDown(38)); }; return (Input.i.keyDown(40)); } 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 437
//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 438
//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 439
//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 440
//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 441
//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 442
//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 443
//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 444
//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 445
//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 446
//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 447
//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 448
//Particle (Particles.Particle) package Particles { import flash.display.*; import Tools.*; public class Particle { public var Plugins:Array; public var dRotation:Number;// = 0 public var baseScaleX:Number;// = 1 public var imageSet:Array; public var x:Number;// = 0 public var dx:Number;// = 0 public var dy:Number;// = 0 public var Friction:Number;// = 0 public var Rotation:Number;// = 0 public var baseScaleY:Number;// = 1 public var StartScale:Number;// = 1 public var Blend:String;// = "" public var animSpeed:int;// = 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 xscale:Number;// = 1 public var baseHeight:Number;// = 0 public var _deleted:Boolean;// = false public var b:Bitmap; public var EndAlpha:Number;// = 1 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(){ frame = 0; ticks = 0; x = 0; y = 0; dx = 0; dy = 0; ax = 0; ay = 0; CurrentLife = 0; TotalLife = 0; Blend = ""; Plugins = new Array(); StartAlpha = 1; EndAlpha = 1; StartScale = 1; EndScale = 1; xscale = 1; yscale = 1; Friction = 0; Rotation = 0; dRotation = 0; aRotation = 0; Delayed = 0; RenderWhileDelayed = 0; _deleted = false; filters = new Array(); animSpeed = 1; baseScaleX = 1; baseScaleY = 1; baseWidth = 0; baseHeight = 0; super(); } public function addFilter(_arg1:ParticleFilter):void{ filters.push(_arg1); } public function remove():void{ b.parent.removeChild(b); } public function sind(_arg1:Number):Number{ return (Math.sin((_arg1 * (Math.PI / 180)))); } public function cosd(_arg1:Number):Number{ return (Math.cos((_arg1 * (Math.PI / 180)))); } public function update():void{ var _local1:ParticleFilter; var _local2:int; if (Blend != ""){ b.blendMode = Blend; }; ticks++; dx = (dx + ax); dy = (dy + ay); x = (x + dx); y = (y + dy); if (imageSet != null){ frame++; _local2 = (frame / animSpeed); if (_local2 >= imageSet.length){ _local2 = (imageSet.length - 1); }; b.bitmapData = imageSet[_local2]; }; b.smoothing = true; CurrentLife = (CurrentLife + 1); if (CurrentLife > TotalLife){ _deleted = true; }; 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); } } }//package Particles
Section 449
//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 yspeedhigh:Number;// = 0 public var startScale:Number;// = 0 public var x:Number; public var layeroverride:String;// = "" public var lifehigh:int;// = 100 public var rotatespeedtodirection:int;// = 0 public var Friction:Number;// = 0 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 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 additive:int;// = 0 public var lifelow:int;// = 100 public var image:Class; public var animspeed:int;// = 1 public var endalpha:Number;// = 1 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(){ Frequency = 0; lifelow = 100; lifehigh = 100; gravitylow = 0; gravityhigh = 0; xspeedlow = 0; xspeedhigh = 0; yspeedlow = 0; yspeedhigh = 0; startalpha = 1; endalpha = 1; rotatespeedtodirection = 0; startrotationlow = 0; startrotationhigh = 0; dRotationLow = 0; dRotationHigh = 0; startScale = 0; endScale = 0; additive = 0; layeroverride = ""; Friction = 0; Test = 0; animspeed = 1; animspeedrange = 0; filters = new Array(); super(); } public function emitOnto(_arg1:ParticleLayer, _arg2:Number, _arg3:Number):void{ var _local4:int; var _local5:int; var _local6:ParticleLayer; var _local7:Particle; if (((!((layeroverride == ""))) && (!((layeroverride == null))))){ _local6 = GameScene.current().getZOrder(layeroverride).pl; if (_local6){ _arg1 = _local6; }; }; _local4 = 0; if (Frequency >= 0){ _local4 = Frequency; } else { if (int((Math.random() > (1 - (1 / (1 - Frequency))))) == 1){ _local4 = 1; }; }; if (Frequency == 0){ _local4 = 1; }; _local5 = 0; while (_local5 < _local4) { _local7 = _arg1.addParticle(image); _local7.imageSet = imageSet; _local7.layer = _arg1; _local7.x = _arg2; _local7.y = _arg3; _local7.TotalLife = rand(lifelow, lifehigh); _local7.Rotation = rand(startrotationlow, startrotationhigh); _local7.dRotation = rand(dRotationLow, dRotationHigh); _local7.baseWidth = _local7.b.width; _local7.baseHeight = _local7.b.height; _local7.dx = rand(xspeedlow, xspeedhigh); _local7.dy = rand(yspeedlow, yspeedhigh); _local7.ay = rand(gravitylow, gravityhigh); _local7.StartAlpha = startalpha; _local7.EndAlpha = endalpha; _local7.StartScale = startScale; _local7.EndScale = endScale; _local7.b.alpha = _local7.StartAlpha; _local7.b.scaleX = _local7.StartScale; _local7.b.scaleY = _local7.StartScale; _local7.Friction = Friction; _local7.filters = filters; _local7.animSpeed = (animspeed + Random.randInt(0, animspeedrange)); if (additive){ _local7.Blend = BlendMode.ADD; }; _local7.update(); _local5++; }; } 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 450
//ParticleFilter (Particles.ParticleFilter) package Particles { public class ParticleFilter { public function update(_arg1:Particle):void{ } } }//package Particles
Section 451
//ParticleFilterScaleIn (Particles.ParticleFilterScaleIn) package Particles { import Tools.*; public class ParticleFilterScaleIn extends ParticleFilter { public var Frames:Number;// = 0 public function ParticleFilterScaleIn(){ Frames = 0; super(); } override public function update(_arg1:Particle):void{ var _local2:Number; _local2 = Interpolation.linearInterpolateLock(0, 1, (Number(_arg1.ticks) / Frames)); _arg1.baseScaleX = (_arg1.baseScaleX * _local2); _arg1.baseScaleY = (_arg1.baseScaleY * _local2); } } }//package Particles
Section 452
//ParticleLayer (Particles.ParticleLayer) package Particles { import flash.display.*; public class ParticleLayer { public var parent:MovieClip; public var particles:Array; public var x:Number;// = 0 public var y:Number;// = 0 public function ParticleLayer(){ x = 0; y = 0; particles = new Array(); super(); } public function remove():void{ var _local1:Particle; for each (_local1 in particles) { _local1.remove(); }; particles = new Array(); } 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; _local2 = new Particle(); _local2.b = new (_arg1); parent.addChild(_local2.b); particles.push(_local2); return (_local2); } } }//package Particles
Section 453
//CustomPreloader (preload.CustomPreloader) package preload { import flash.events.*; import flash.display.*; import Tools.*; import GameConfig.*; import flash.utils.*; public class CustomPreloader extends MovieClip { public var _mochiad:MovieClip; public var _mochiad_loaded:Boolean;// = false public var clip:MovieClip; public var _finished:Boolean;// = false public static var demo:Boolean = false; public static var corner_embed:Class = CustomPreloader_corner_embed; public static var loaderURL:String; public static var loadingImage:Class = CustomPreloader_loadingImage; public function CustomPreloader(){ var _local1:Bitmap; var _local2:int; var _local3:int; var _local4:Bitmap; _mochiad_loaded = false; _finished = false; super(); stop(); stage.scaleMode = StageScaleMode.NO_SCALE; stage.align = StageAlign.TOP_LEFT; addEventListener(Event.ENTER_FRAME, onEnterFrame); SplitTest.init(); Logging.Log("stuntpilottrainer", "startload"); _local1 = new loadingImage(); _local1.x = (400 - (_local1.width / 2)); _local1.y = (600 - 42); addChild(_local1); _local2 = 0; while (_local2 <= 1) { _local3 = 0; while (_local3 <= 1) { _local4 = new corner_embed(); _local4.x = (_local2 * 800); _local4.y = (_local3 * 600); _local4.rotation = ((_local2 * 90) + (_local3 * 90)); if ((((_local2 == 0)) && ((_local3 == 1)))){ _local4.rotation = (_local4.rotation + 180); }; stage.addChild(_local4); _local3++; }; _local2++; }; if (!GameConfig.inDevelopment){ MochiAd.showPreGameAd({clip:root, id:GameConfig.mochiadsCode, res:"800x600", ad_finished:adfinished, unload:unload, no_bg:true}); }; } private function init():void{ var _local1:Class; var _local2:Object; _local1 = Class(getDefinitionByName("Main")); if (_local1){ _local2 = new (_local1); addChild((_local2 as DisplayObject)); }; } public function unloadAd():void{ } public function adfinished():void{ _finished = true; } public function onEnterFrame(_arg1:Event):void{ var _local2:String; graphics.clear(); _local2 = root.loaderInfo.url.split("/")[2]; loaderURL = _local2; if ((((_local2 == "newgrounds.com")) || ((_local2 == "www.newgrounds.com")))){ demo = false; } else { demo = true; }; demo = false; if (GameConfig.inDevelopment){ _finished = true; demo = false; }; if ((((framesLoaded == totalFrames)) && (_finished))){ Logging.Log("stuntpilottrainer", "finishload", "hi2"); removeEventListener(Event.ENTER_FRAME, onEnterFrame); nextFrame(); init(); }; } public function unload():void{ } } }//package preload
Section 454
//CustomPreloader_corner_embed (preload.CustomPreloader_corner_embed) package preload { import mx.core.*; public class CustomPreloader_corner_embed extends BitmapAsset { } }//package preload
Section 455
//CustomPreloader_loadingImage (preload.CustomPreloader_loadingImage) package preload { import mx.core.*; public class CustomPreloader_loadingImage extends BitmapAsset { } }//package preload
Section 456
//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(); }; _local4 = new GameObject(_arg1, im1_embed, "", 92, 184); _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); _arg1.objects.push(_local4); _local4 = new GameObject(_arg1, im2_embed, "", 426, 53); _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); _arg1.objects.push(_local4); _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); _arg1.objects.push(_local4); _local4 = new GameObject(_arg1, im4_embed, "", 0, 540); _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); _arg1.objects.push(_local4); if (!_arg3){ _arg2.addChild(_arg1.m); }; } } }//package SceneConstructors
Section 457
//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_png().bitmapData; public static var im5:BitmapData = new Embeds.menu_button_link_png().bitmapData; public static var im6:BitmapData = new Embeds.cloud1_png().bitmapData; public static var im7:BitmapData = new Embeds.land_png().bitmapData; public static var im8:BitmapData = new Embeds.tree2_png().bitmapData; public static var im9:BitmapData = new Embeds.cloud1_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.menu_button_link_png; public static var im7_embed:Class = Embeds.land_png; public static var im9_embed:Class = Embeds.cloud1_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.balloon_png; public static var im19_embed:Class = Embeds.menu_button_png; public static var im13_embed:Class = Embeds.tree3_png; public static var im10:BitmapData = new Embeds.rock_1_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.tree3_png().bitmapData; public static var im14:BitmapData = new Embeds.tree1_png().bitmapData; public static var im15:BitmapData = new Embeds.tree1_png().bitmapData; public static var im16:BitmapData = new Embeds.level_panel_png().bitmapData; public static var im17:BitmapData = new Embeds.balloon_png().bitmapData; public static var im19:BitmapData = new Embeds.menu_button_png().bitmapData; public static var im10_embed:Class = Embeds.rock_1_png; public static var im12_embed:Class = Embeds.cloud1_png; public static var im14_embed:Class = Embeds.tree1_png; public static var im16_embed:Class = Embeds.level_panel_png; public static var im18_embed:Class = Embeds.content_png; public static var im2_embed:Class = Embeds.cloud1_png; public static var im4_embed:Class = Embeds.menu_button_png; public static var im6_embed:Class = Embeds.cloud1_png; public static var im18:BitmapData = new Embeds.content_png().bitmapData; public static var im8_embed:Class = Embeds.tree2_png; public function register(_arg1:GameScene, _arg2:Sprite, _arg3:Boolean=false):void{ var _local4:GameObject; var _local5:GameObjectFilter; if (!_arg3){ _arg1.m = new MovieClip(); }; _local4 = new GameObject(_arg1, im1_embed, "", 400, 46); _local4.baseRotation = 0; _arg1.objects.push(_local4); _local4 = new GameObject(_arg1, im2_embed, "", 719, 103); _local4.baseRotation = 0; _arg1.objects.push(_local4); _local4 = new GameObject(_arg1, im3_embed, "", 399, 95); _local4.baseRotation = 0; _local5 = new GameObjectFilterSqrtInterpolateIn(); _local4.addFilter(_local5); GameObjectFilterSqrtInterpolateIn(_local5).Delay = 0; GameObjectFilterSqrtInterpolateIn(_local5).FadeTime = 150; GameObjectFilterSqrtInterpolateIn(_local5).dx = -1000; GameObjectFilterSqrtInterpolateIn(_local5).dy = 0; _arg1.objects.push(_local4); _local4 = new GameObject(_arg1, SimpleButton, "", 400, 287); _local4.setupButton(im4_embed, "Play"); _local5 = new GameObjectFilterSqrtInterpolateIn(); _local4.addFilter(_local5); GameObjectFilterSqrtInterpolateIn(_local5).Delay = 0; GameObjectFilterSqrtInterpolateIn(_local5).FadeTime = 150; GameObjectFilterSqrtInterpolateIn(_local5).dx = 800; GameObjectFilterSqrtInterpolateIn(_local5).dy = 0; _arg1.objects.push(_local4); _local4 = new GameObject(_arg1, SimpleButton, "", 400, 404); _local4.setupButton(im5_embed, "Link"); _local5 = new GameObjectFilterSqrtInterpolateIn(); _local4.addFilter(_local5); GameObjectFilterSqrtInterpolateIn(_local5).Delay = 0; GameObjectFilterSqrtInterpolateIn(_local5).FadeTime = 150; GameObjectFilterSqrtInterpolateIn(_local5).dx = 800; GameObjectFilterSqrtInterpolateIn(_local5).dy = 0; _arg1.objects.push(_local4); _local4 = new GameObject(_arg1, im6_embed, "", 8, 298); _local4.baseRotation = 0; _arg1.objects.push(_local4); _local4 = new GameObject(_arg1, im7_embed, "", 434, 563); _local4.baseRotation = 0; _arg1.objects.push(_local4); _local4 = new GameObject(_arg1, im8_embed, "", 654, 591); _local4.baseRotation = 0; _arg1.objects.push(_local4); _local4 = new GameObject(_arg1, im9_embed, "", 89, 213); _local4.baseRotation = 0; _arg1.objects.push(_local4); _local4 = new GameObject(_arg1, im10_embed, "", 27, 495); _local4.baseRotation = 0; _arg1.objects.push(_local4); _local4 = new GameObject(_arg1, im11_embed, "", 707, 448); _local4.baseRotation = 0; _arg1.objects.push(_local4); _local4 = new GameObject(_arg1, im12_embed, "", 498, 208); _local4.baseRotation = 0; _arg1.objects.push(_local4); _local4 = new GameObject(_arg1, im13_embed, "", 52, 562); _local4.baseRotation = 0; _arg1.objects.push(_local4); _local4 = new GameObject(_arg1, im14_embed, "", 100, 588); _local4.baseRotation = 0; _arg1.objects.push(_local4); _local4 = new GameObject(_arg1, im15_embed, "", 712, 582); _local4.baseRotation = 0; _arg1.objects.push(_local4); _local4 = new GameObject(_arg1, im16_embed, "", 400, 557); _local4.baseRotation = -1.34110451E-7; _local4.baseScaleY = -1; _arg1.objects.push(_local4); _local4 = new GameObject(_arg1, im17_embed, "", 149, 229); _local4.baseRotation = 0; _arg1.objects.push(_local4); _local4 = new GameObject(_arg1, im18_embed, "", 400, 588); _local4.baseRotation = 0; _arg1.objects.push(_local4); _local4 = new GameObject(_arg1, SimpleButton, "", 400, 346); _local4.setupButton(im19_embed, "Controls"); _local5 = new GameObjectFilterSqrtInterpolateIn(); _local4.addFilter(_local5); GameObjectFilterSqrtInterpolateIn(_local5).Delay = 0; GameObjectFilterSqrtInterpolateIn(_local5).FadeTime = 150; GameObjectFilterSqrtInterpolateIn(_local5).dx = -800; GameObjectFilterSqrtInterpolateIn(_local5).dy = 0; _arg1.objects.push(_local4); if (!_arg3){ _arg2.addChild(_arg1.m); }; } } }//package SceneConstructors
Section 458
//MainMenu (Scenes.MainMenu) package Scenes { import GameScene.*; import flash.display.*; import GameObject.*; import flash.geom.*; import Audio.*; import flash.net.*; import Tools.*; import GlobalSetup.*; import SceneConstructors.*; import GameConfig.*; import preload.*; public class MainMenu extends GameScene { public var continueText:GameObject; public var highScoreObjects:Array; public var continueButtons:Array; public var versionText:GameObject; public var controlText:GameObject; public var upButton:GameObject; public var hitMenuButton:Boolean;// = false public var startCountdown:int;// = 0 public var downButton:GameObject; public var controlsOKButton:GameObject; public static var highestLevel:int = 0; public static var soundButton:GameObject; public static var off_button_embed:Class = MainMenu_off_button_embed; public static var music_button_embed:Class = MainMenu_music_button_embed; public static var lastScore:int = 0; public static var musicButton:GameObject; public static var controlsReversed:Boolean = false; public static var lastHighScore:int = 0; public static var sound_button_embed:Class = MainMenu_sound_button_embed; public function MainMenu(){ startCountdown = 0; hitMenuButton = false; highScoreObjects = new Array(); super(); } override public function _register(_arg1:Sprite):void{ var _local2:MainMenu_constructor; var _local3:String; var _local4:Array; var _local5:Array; var _local6:Array; var _local7:Matrix; var _local8:String; _local2 = new MainMenu_constructor(); _local2.register(this, _arg1, true); _local3 = GradientType.LINEAR; _local4 = [100798, 5880545, 11196394]; _local5 = [100, 100, 100]; _local6 = [0, 128, 0xFF]; _local7 = new Matrix(); _local7.createGradientBox(400, 600, (Math.PI / 2), 0, 0); _local8 = SpreadMethod.PAD; m.graphics.beginGradientFill(_local3, _local4, _local5, _local6, _local7, _local8); m.graphics.drawRect(0, 0, 800, 600); } public function makeContinueButtons():void{ var _local1:GameObjectFilterFadeInOut; var _local2:int; var _local3:GameObject; var _local4:GameObjectFilterSqrtInterpolateIn; continueButtons = new Array(); _local3 = new GameObject(this, null, "GUILayer", 400, (225 - 16)); _local3.setText("CHOOSE STARTING LEVEL", 32); _local1 = new GameObjectFilterFadeInOut(); _local1.FadeIn = 1; _local1.FadeInDuration = 25; _local3.addFilter(_local1); continueText = _local3; _local2 = 0; 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 _local2:GameObject; var _local3:GameObject; var _local4:GameObject; var _local5:GameObject; var _local6:Array; var _local7:int; var _local8:GameObject; var _local9:GameObjectFilterFadeInOut; _local2 = findObjectByName("Play"); _local3 = findObjectByName("Continue"); _local4 = findObjectByName("Controls"); _local5 = findObjectByName("Link"); _local6 = [_local2, _local3, _local4, _local5]; hitMenuButton = _arg1; _local7 = 0; while (_local7 < _local6.length) { reverseSqrFilter(_local6[_local7]); _local7++; }; for each (_local8 in highScoreObjects) { _local8.filters = new Array(); _local9 = new GameObjectFilterFadeInOut(); if (_arg1){ _local9.FadeOut = 1; _local9.FadeOutTime = 0; _local9.FadeOutDuration = 25; _local9.FadeOutKill = 0; } else { _local8.ticks = 0; _local9.FadeIn = 1; _local9.FadeInDuration = 25; }; _local8.addFilter(_local9); }; } override public function init():void{ var _local1:GameSoundScene; var _local2:GameObject; var _local3:int; var _local4:GameObject; _local1 = 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); }; versionText = new GameObject(this, null, "TextLayer", 0, 600); versionText.setText(((GameConfig.version + ",") + CustomPreloader.loaderURL), 24); versionText.setHandle(0, 1); versionText.hide(); } public function reverseSqrFilter(_arg1:GameObject):void{ var _local2:GameObjectFilter; var _local3:GameObjectFilterSqrtInterpolateIn; if (!_arg1){ return; }; 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 _local1:GameObject; var _local2:GameObject; var _local3:GameObject; var _local4:Array; var _local5:GameObject; var _local6:Boolean; var _local7:Boolean; var _local8:GameObjectFilterFadeInOut; if (((Input.i.keyDown(16)) && (Input.i.keyDown(9)))){ versionText.show(); } else { versionText.hide(); }; 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(); }; _local1 = findObjectByName("Play"); _local2 = findObjectByName("Controls"); _local3 = findObjectByName("Link"); _local4 = [_local1, _local2, _local3]; _local3.stripText(); if (_local3){ if (_local3.mHit()){ navigateToURL(new URLRequest("http://www.rocksolidarcade.com/home")); }; }; if (startCountdown != 0){ startCountdown++; }; if (startCountdown > 80){ pushScene(new MainScene()); }; if (hitMenuButton){ if (upButton){ _local6 = upButton.mHit(); _local7 = downButton.mHit(); if (((_local6) || (_local7))){ controlsReversed = _local6; upButton.setButtonOn(controlsReversed); downButton.setButtonOn(!(controlsReversed)); writePrefs(); }; }; if (controlsOKButton){ if (controlsOKButton.mHit()){ fadeMainMenu(false); reverseSqrFilter(upButton); reverseSqrFilter(downButton); reverseSqrFilter(controlsOKButton); controlText.filters = new Array(); _local8 = new GameObjectFilterFadeInOut(); _local8.FadeOutDuration = 25; _local8.FadeOut = 1; controlText.addFilter(_local8); }; }; }; 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/demo")); } else { for each (_local5 in _local4) { reverseSqrFilter(_local5); }; hitMenuButton = true; MainScene.levelToStart = 0; startCountdown = 1; Sounds.startGame.play(); }; }; }; }; if (_local2){ if (_local2.mHit()){ fadeMainMenu(true); makeControlButtons(); }; }; }; } public function makeControlButtons():void{ var _local1:int; var _local2:GameObject; var _local3:GameObjectFilterFadeInOut; var _local4:GameObjectFilterSqrtInterpolateIn; _local1 = 0; 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++; }; } public static function writePrefs():void{ var _local1:SharedObject; _local1 = 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["trainerhighscore"] = lastHighScore; _local1.data["trainerhighestlevel"] = highestLevel; if (controlsReversed){ _local1.data["controls"] = "reversed"; } else { _local1.data["controls"] = "normal"; }; } public static function readPrefs():void{ var _local1:SharedObject; _local1 = SharedObject.getLocal("rocksolidprefs"); if (_local1.data["sound"] == "off"){ GameSound.globalSoundVolume = 0; }; if (_local1.data["music"] == "off"){ GameSound.globalMusicVolume = 0; }; if (_local1.data["trainerhighscore"]){ lastHighScore = int(_local1.data["highscore"]); } else { lastHighScore = 5000; }; if (_local1.data["trainerhighestlevel"]){ highestLevel = int(_local1.data["highestlevel"]); }; if (_local1.data["controls"] == "reversed"){ controlsReversed = true; } else { controlsReversed = false; }; } } }//package Scenes
Section 459
//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 460
//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 461
//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 462
//MainScene (Scenes.MainScene) package Scenes { import GameScene.*; import flash.display.*; import GameObject.*; import flash.geom.*; import Audio.*; import Objects.*; import flash.media.*; import flash.net.*; import Tools.*; import GlobalSetup.*; import SceneConstructors.*; import Levels.*; public class MainScene extends GameScene { public var deadPlaneX:Number;// = 0 public var deadPlaneY:Number;// = 0 public var mainMenuButton:GameObject; public var playStuntPilotButton:GameObject; public var lives:int;// = 3 public var finishedSequenceLost:Boolean;// = false public var lifeMultiplierSprite:GameObject; public var parTime:int; public var musicChannel:SoundChannel; public var musicStopPosition:Number; public var currentTimeText:GameObject; public var levelOffset:int;// = 0 public var timer:int;// = 0 public var goneToSiteAlready:Boolean;// = false public var gameOverSprite:GameObject; public var finishedSequence:int;// = 0 public var parTimeText:GameObject; public var cameraLevel:int;// = 0 public var g:Ground; public var p:Plane; public var isBonusLevel:Boolean;// = false public var startLevelScore:int;// = 0 public var level:int;// = 0 public var completeChannel:SoundChannel; public var score:int;// = 0 public var currentTimeTextNormalX:Number; public var planeCamera:GameSceneCamera; public var levelWidth:int;// = 700 public var lifeSprites:Array; public var bonusScore:int;// = 0 public var timerDisplay:GameObject; public var justFinishedBonusLevel:Boolean;// = false public var planeLevelCamera:GameSceneCamera; public var scoreDisplay:GameObject; public var bottomOverlaySprite:GameObject; public var parTimeDisplay:GameObject; public var finishedSequenceFinished:Boolean;// = false 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 = [18, 18, 22, 38, 28, 38, 22, 26, 28, 28, 28, 46, 24, 22, 26, 36, 32, 42, 32, 30, 32, 52, 20, 40, 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(){ levelWidth = 700; levelOffset = 0; startLevelScore = 0; level = 0; cameraLevel = 0; score = 0; bonusScore = 0; timer = 0; parTime = levelParTimes[0]; finishedSequence = 0; finishedSequenceLost = false; finishedSequenceFinished = false; deadPlaneX = 0; deadPlaneY = 0; justFinishedBonusLevel = false; isBonusLevel = false; lifeSprites = new Array(3); lives = 3; goneToSiteAlready = false; 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; } override public function init():void{ var _local1:MainGameBackground_constructor; var _local2:String; var _local3:Array; var _local4:Array; var _local5:Array; var _local6:Matrix; var _local7:String; var _local8:int; var _local9:int; Logging.Log("stuntpilottrainer", "play"); _local1 = new MainGameBackground_constructor(); _local1.register(this, this.parent, true); 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); _local2 = GradientType.LINEAR; _local3 = [100798, 5880545, 11196394]; _local4 = [100, 100, 100]; _local5 = [0, 128, 0xFF]; _local6 = new Matrix(); _local6.createGradientBox(400, 600, (Math.PI / 2), 0, 0); _local7 = SpreadMethod.PAD; m.graphics.beginGradientFill(_local2, _local3, _local4, _local5, _local6, _local7); m.graphics.drawRect(0, 0, 800, 600); 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)); _local8 = 792; timerDisplay = new GameObject(this, null, "TextLayer", _local8, 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", _local8, 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", (_local8 - 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", (_local8 - 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; _local9 = 0; while (_local9 < 1) { lifeSprites[_local9] = new lifeSprite(this, (22 + (_local9 * 36)), 22); GameObject(lifeSprites[_local9]).setGlobal(true); _local9++; }; lifeMultiplierSprite = new GameObject(this, null, "TextLayer", (22 + 36), 22); lifeMultiplierSprite.setText("x3", 36); lifeMultiplierSprite.setGlobal(true); _update(); } public function levelTimeLeft():int{ return (((parTime * 100) - timer)); } public function timeBonusAmount():int{ var _local1:int; _local1 = (((parTime * 100) - timer) * 2.5); if (_local1 < 0){ return (0); }; return (_local1); } 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 poppedBalloons():int{ var _local1:int; var _local2:GameObject; _local1 = 0; for each (_local2 in objects) { if ((_local2 is BonusBalloon)){ if (Obstacle(_local2).old){ if (Obstacle(_local2).success){ _local1++; }; }; }; }; return (_local1); } public function thisLevelStartX():Number{ return (nextLevelStartX()); } 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 determineNextStartingPosition():void{ var _local1:Plane; var _local2:Obstacle; var _local3:Obstacle; _local1 = Plane(findObjectByClass("Plane")); _local2 = nextObstacle(); _local3 = lastObstacle(); levelWidth = (_local3.basex - _local2.basex); levelOffset = ((levelSpacing - _local2.basex) + _local1.basex); if (isBonusLevel){ levelOffset = (levelOffset + 500); }; if ((level % 42) == 0){ levelOffset = (levelOffset + 800); }; if (finishedSequenceFinished){ levelOffset = (levelOffset + 500000); }; } public function timeFromTicks(_arg1:int):String{ var _local2:String; var _local3:String; if (_arg1 < 0){ _arg1 = 0; }; _local2 = String(((_arg1 - (_arg1 % 100)) / 100)); _local3 = String((_arg1 % 100)); while (_local2.length < 2) { _local2 = ("0" + _local2); }; while (_local3.length < 2) { _local3 = (_local3 + "0"); }; return (((_local2 + ":") + _local3)); } 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 timeBonusText():int{ if (((parTime * 100) - timer) < 0){ return (0); }; return (((parTime * 100) - timer)); } 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); } public function chainBonusAmount():int{ var _local1:Plane; _local1 = Plane(findObjectByClass("Plane")); if (_local1.highestConsecutiveScore > 1){ return ((250 * _local1.highestConsecutiveScore)); }; return (0); } override public function _update():void{ var _local1:int; var _local2:String; var _local3:GameObject; var _local4:Boolean; var _local5:Plane; 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:int; var _local18:int; var _local19:GameObject; var _local20:GameObject; var _local21:GameObjectFilterFadeInOut; var _local22:GameObjectFilterSqrtInterpolateIn; var _local23:GameObjectFilterSqrtInterpolateIn; var _local24:GameObject; var _local25:GameObject; var _local26:GameObject; var _local27:GameObject; var _local28:GameObject; var _local29:GameObject; var _local30:GameObject; var _local31:GameObject; var _local32:Number; var _local33:GameObject; var _local34:GameObject; var _local35:GameObjectFilterFadeInOut; var _local36:GameObjectFilterSqrtInterpolateIn; var _local37:Number; if (playStuntPilotButton){ if (playStuntPilotButton.mHit()){ navigateToURL(new URLRequest("http://www.rocksolidarcade.com/games/stuntpilot/fromtrainer")); goneToSiteAlready = true; }; }; if (mainMenuButton){ if (mainMenuButton.mHit()){ gss.pushScene(new MainMenu()); }; }; 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; }; _local1 = 0; 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 (goneToSiteAlready){ GameSound.globalSoundVolume = 0; GameSound.globalMusicVolume = 0; }; if (((soundButton.mHit()) || (musicButton.mHit()))){ MainMenu.writePrefs(); }; if (paused){ GameSound.globalSoundVolume = 0; GameSound.globalMusicVolume = 0; }; if (pauseButton.buttonOn()){ paused = true; } else { paused = false; }; _local2 = String(score); while (_local2.length < 6) { _local2 = ("0" + _local2); }; scoreDisplay.setText(_local2); if (paused){ return; }; _local4 = true; 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 (finishedSequenceFinished){ if (finishedSequence > 500){ finishedSequence = 500; }; }; 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++; if ((level + startLevel) > 16){ finishedSequenceFinished = true; }; Logging.Log("stuntpilottrainer", "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); if (!finishedSequenceFinished){ _local19 = new GameObject(this, null, "TextLayer", 400, 300); _local19.setGlobal(true); _local19.setText((("LEVEL " + level) + " COMPLETE"), 64); if (justFinishedBonusLevel){ if (levelTimeLeft() == 0){ _local19.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; _local19.addFilter(_local12); }; _local17 = 280; _local18 = 360; if (finishedSequenceFinished){ _local20 = new GameObject(this, null, "TextLayer", 400, 240); _local20.setGlobal(true); _local20.setText("TRAINER LEVELS COMPLETE", 64); _local21 = new GameObjectFilterFadeInOut(); _local21.FadeIn = 1; _local21.FadeInDelay = 100; _local21.FadeInDuration = 100; _local20.addFilter(_local21); playStuntPilotButton = new GameObject(this, SimpleButton, "TextLayer", 400, 320); playStuntPilotButton.setupButton(Embeds.button_play_png, "Play Stunt Pilot"); playStuntPilotButton.setGlobal(true); playStuntPilotButton.stripText(); mainMenuButton = new GameObject(this, SimpleButton, "TextLayer", 400, 380); mainMenuButton.setupButton(Embeds.menu_button_png, "Main Menu"); mainMenuButton.setGlobal(true); _local22 = new GameObjectFilterSqrtInterpolateIn(); _local22.dx = -800; _local22.FadeTime = 100; _local22.Delay = 100; playStuntPilotButton.addFilter(_local22); _local23 = new GameObjectFilterSqrtInterpolateIn(); _local23.dx = 800; _local23.FadeTime = 100; _local23.Delay = 100; mainMenuButton.addFilter(_local23); } else { if (!justFinishedBonusLevel){ _local24 = new GameObject(this, null, "TextLayer", 400, _local17); _local24.setGlobal(true); _local24.setText("TIME BONUS: ", 48); _local24.baseHandleX = 1; _local24.baseHandleY = 1; _local12 = new GameObjectFilterFadeInOut(); _local12.FadeInDuration = 40; _local12.FadeIn = 1; _local12.FadeInDelay = 330; _local12.FadeOutDuration = 40; _local12.FadeOut = 1; _local12.FadeOutTime = 650; _local24.addFilter(_local12); _local25 = new GameObject(this, null, "TextLayer", 400, _local18); _local25.setGlobal(true); _local25.setText("CHAIN BONUS: ", 48); _local25.baseHandleX = 1; _local25.baseHandleY = 1; _local12 = new GameObjectFilterFadeInOut(); _local12.FadeInDuration = 40; _local12.FadeIn = 1; _local12.FadeInDelay = 350; _local12.FadeOutDuration = 40; _local12.FadeOut = 1; _local12.FadeOutTime = 650; _local25.addFilter(_local12); _local26 = new GameObject(this, null, "TextLayer", 400, _local17); _local26.setGlobal(true); _local26.setText(String((" = " + timeBonusAmount()))); _local26.baseHandleX = 0; _local26.baseHandleY = 1; _local26.className = "TimeNumber"; _local12 = new GameObjectFilterFadeInOut(); _local12.FadeInDuration = 40; _local12.FadeIn = 1; _local12.FadeInDelay = 330; _local12.FadeOutDuration = 40; _local12.FadeOut = 1; _local12.FadeOutTime = 650; _local26.addFilter(_local12); _local27 = new GameObject(this, null, "TextLayer", 458, _local17); _local27.setGlobal(true); _local27.setText(String((timeFromTicks(timeBonusText()) + " x 250 ")), 32); _local27.baseHandleX = 0.5; _local27.baseHandleY = 1; _local27.className = "TimeNumber"; _local12 = new GameObjectFilterFadeInOut(); _local12.FadeInDuration = 40; _local12.FadeIn = 1; _local12.FadeInDelay = 330; _local12.FadeOutDuration = 40; _local12.FadeOut = 1; _local12.FadeOutTime = 650; _local27.addFilter(_local12); _local26.basex = (_local26.basex + _local27.baseWidth); _local27.basey = (_local27.basey - (((_local26.baseHeight - _local27.baseHeight) / 2) - 3)); _local28 = new GameObject(this, null, "TextLayer", 400, _local18); _local28.setGlobal(true); _local28.setText(String((" = " + chainBonusAmount()))); _local28.baseHandleX = 0; _local28.baseHandleY = 1; _local28.className = "BonusNumber"; _local12 = new GameObjectFilterFadeInOut(); _local12.FadeInDuration = 40; _local12.FadeIn = 1; _local12.FadeInDelay = 350; _local12.FadeOutDuration = 40; _local12.FadeOut = 1; _local12.FadeOutTime = 650; _local28.addFilter(_local12); _local29 = new GameObject(this, null, "TextLayer", 458, _local18); _local29.setGlobal(true); _local29.setText((String((chainBonusAmount() / 250)) + " x 250 "), 32); _local29.baseHandleX = 0.5; _local29.baseHandleY = 1; _local29.basey = (_local29.basey - (((_local28.baseHeight - _local29.baseHeight) / 2) - 3)); _local29.className = "BonusNumber"; _local12 = new GameObjectFilterFadeInOut(); _local12.FadeInDuration = 40; _local12.FadeIn = 1; _local12.FadeInDelay = 350; _local12.FadeOutDuration = 40; _local12.FadeOut = 1; _local12.FadeOutTime = 650; _local29.addFilter(_local12); _local28.basex = (_local28.basex + _local27.baseWidth); bonusScore = (timeBonusAmount() + chainBonusAmount()); } else { _local30 = new GameObject(this, null, "TextLayer", 400, 236); _local30.setGlobal(true); _local12 = new GameObjectFilterFadeInOut(); _local12.FadeInDuration = 40; _local12.FadeIn = 1; _local12.FadeInDelay = 350; _local12.FadeOutDuration = 40; _local12.FadeOut = 1; _local12.FadeOutTime = 650; _local30.addFilter(_local12); _local31 = new GameObject(this, null, "TextLayer", 400, 364); _local31.setGlobal(true); _local12 = new GameObjectFilterFadeInOut(); _local12.FadeInDuration = 40; _local12.FadeInDelay = 390; _local12.FadeIn = 1; _local12.FadeOutDuration = 40; _local12.FadeOut = 1; _local12.FadeOutTime = 650; _local31.addFilter(_local12); _local32 = 300; _local33 = new GameObject(this, null, "TextLayer", 400, _local32); _local33.setGlobal(true); _local33.setText(String((" = " + (poppedBalloons() * 200)))); _local33.baseHandleX = 0; _local33.className = "TimeNumber"; _local12 = new GameObjectFilterFadeInOut(); _local12.FadeInDuration = 40; _local12.FadeIn = 1; _local12.FadeInDelay = 370; _local12.FadeOutDuration = 40; _local12.FadeOut = 1; _local12.FadeOutTime = 650; _local33.addFilter(_local12); _local34 = new GameObject(this, null, "TextLayer", 400, _local32); _local34.setGlobal(true); _local34.setText((String(poppedBalloons()) + " x 200 "), 36); _local34.baseHandleX = 1; _local34.className = "TimeNumber"; _local12 = new GameObjectFilterFadeInOut(); _local12.FadeInDuration = 40; _local12.FadeIn = 1; _local12.FadeInDelay = 370; _local12.FadeOutDuration = 40; _local12.FadeOut = 1; _local12.FadeOutTime = 650; _local34.addFilter(_local12); bonusScore = (poppedBalloons() * 200); if (perfectRound()){ _local30.setText("ALL BALLOONS POPPED!", 54); _local31.setText("EXTRA LIFE AWARDED", 48); lives++; } else { _local30.setText("BALLOON BONUS", 54); _local30.basey = (_local30.basey + 32); _local33.basey = (_local33.basey + 32); _local34.basey = (_local34.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); _local35 = new GameObjectFilterFadeInOut(); _local35.FadeIn = 1; _local35.FadeInBlur = 15; _local35.FadeInDuration = 80; _local35.FadeOut = 1; _local35.FadeOutDuration = 30; _local35.FadeOutTime = 250; MainMenu.lastScore = score; gameOverSprite.addFilter(_local35); }; if (finishedSequence > 400){ if (score > MainMenu.lastHighScore){ MainMenu.lastHighScore = score; }; if (level > MainMenu.highestLevel){ MainMenu.highestLevel = level; }; MainMenu.lastScore = score; MainMenu.writePrefs(); gss.pushScene(new MainMenu()); }; }; } else { if ((((_local9.basex > (nextLevelStartX() - 600))) && (!(finishedSequenceFinished)))){ 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)]; _local36 = topOverlaySprite.filters[0]; _local36.ticks = 0; _local36.useSquare = true; _local36 = bottomOverlaySprite.filters[0]; _local36.ticks = 0; _local36.useSquare = true; }; }; }; _local5 = 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){ _local37 = GameSceneCameraStack.globalCameraX; if ((((Math.abs(((_local5.basex - 400) - _local37)) > 450)) || ((_local5.basey < -450)))){ if (((_local5.basex - 400) - _local37) < -1){ _local5.baseRotation = 0; }; if (((_local5.basex - 400) - _local37) > 0){ _local5.baseRotation = -180; }; if (_local5.basey < -450){ _local5.baseRotation = 90; }; _local5.dRotation = 0; }; }; pushCamera(planeCamera); } public function nextLevelStartX():Number{ return (levelOffset); } public function nextLevelWidth():Number{ return (levelWidth); } } }//package Scenes
Section 463
//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 464
//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 465
//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 466
//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 467
//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 468
//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 _local2:int; var _local3:Array; setup(); _local2 = 0; 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 setup():void{ if (!_setup){ return; }; _setup = true; ExternalInterface.addCallback("rsaGetText", receive); } public static function sendMessage(_arg1:String, _arg2:String=""):String{ var _local3:Object; setup(); _local3 = ExternalInterface.call(_arg1, _arg2); if ((_local3 is String)){ return (String(_local3)); }; return (""); } } }//package Tools
Section 469
//GameTimer (Tools.GameTimer) package Tools { import flash.events.*; import flash.utils.*; public class GameTimer { private var func:Function; private var ticker:Timer; 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 470
//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; var _local5:Bitmap; _local4 = new BitmapData(_arg1, _arg2, false, _arg3); _local5 = new Bitmap(_local4); return (_local5); } } }//package Tools
Section 471
//Input (Tools.Input) package Tools { import flash.display.*; import flash.events.*; public class Input { 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(); mouseStatus = 0; mouseButtonHit = 0; 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); 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 mouseY():int{ return (mousey); } 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{ keyStatus[_arg1.keyCode] = true; keysHit[_arg1.keyCode] = true; if (verboseInput){ trace(_arg1.keyCode); }; } public function keyHit(_arg1:int):int{ var _local2:int; _local2 = keysHit[_arg1]; keysHit[_arg1] = false; return (_local2); } public function mouseHit():int{ var _local1:int; _local1 = mouseButtonHit; mouseButtonHit = 0; return (_local1); } } }//package Tools
Section 472
//Interpolation (Tools.Interpolation) package Tools { 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; _local3 = (_arg2 - _arg1); while (abs((_arg2 - _arg1)) > 180) { _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 dampenInterpolate(_arg1:Number, _arg2:Number, _arg3:Number):Number{ var _local4:Number; _arg3 = Math.sqrt(_arg3); _local4 = (1 - ((Math.sin(((15 * (Math.pow(_arg3, 2.5) - 5)) / Math.PI)) * Math.pow((1 - _arg3), 2)) / 0.95)); return ((_arg1 + (_local4 * (_arg2 - _arg1)))); } public static function directionToAngle(_arg1:Number, _arg2:Number):Number{ var _local3:Number; _local3 = (_arg2 - _arg1); while (abs((_arg2 - _arg1)) > 180) { _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; _local4 = (_arg2 - _arg1); while (abs((_arg2 - _arg1)) > 180) { _arg2 = (_arg2 - (sgn((_arg2 - _arg1)) * 360)); }; return (tendTowards(_arg1, _arg2, _arg3)); } } }//package Tools
Section 473
//Logging (Tools.Logging) package Tools { import flash.events.*; import flash.net.*; import flash.system.*; public class Logging { public static var allLoggingConnections:Array = new Array(); public static var lastRequest:URLStream; public static function Log(_arg1:String, _arg2:String, _arg3:String="", _arg4:String=""):void{ var link:String; var gamename = _arg1; var event = _arg2; var extradata = _arg3; var splittest = _arg4; 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"); link = (((("http://www.rocksolidarcade.com/event/" + 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 ioErrorHandler(_arg1:IOErrorEvent):void{ } private static function securityErrorHandler(_arg1:SecurityErrorEvent):void{ } } }//package Tools
Section 474
//Net (Tools.Net) package Tools { import flash.net.*; public class Net { public static function openURL(_arg1:String):void{ navigateToURL(new URLRequest(_arg1)); } } }//package Tools
Section 475
//Random (Tools.Random) package Tools { public class Random { public static function randInt(_arg1:int, _arg2:int):int{ var _local3:Number; var _local4:int; _local3 = (Math.random() - 0.001); _local4 = (_arg1 + int((_local3 * ((_arg2 - _arg1) + 1)))); return (_local4); } } }//package Tools
Section 476
//SafeImageRequest (Tools.SafeImageRequest) package Tools { import flash.display.*; import flash.events.*; 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; finishFunc = null; finished = false; 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 477
//SafeRequest (Tools.SafeRequest) package Tools { import flash.events.*; import flash.net.*; public class SafeRequest { public var stream:URLStream; public var data:String;// = "" public var finished:Boolean;// = false public var finishFunc:Function;// = null public var req:URLRequest; public function SafeRequest(_arg1:String, _arg2:Function=null){ var url = _arg1; var finish = _arg2; finishFunc = null; finished = false; data = ""; super(); stream = new URLStream(); finishFunc = finish; try { stream.load(new URLRequest(url)); stream.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler); stream.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler); stream.addEventListener(Event.COMPLETE, complete); } catch(error:Error) { }; } public function securityErrorHandler(_arg1:SecurityErrorEvent):void{ } public function ioErrorHandler(_arg1:IOErrorEvent):void{ } public function complete(_arg1:Event):void{ finished = true; data = ""; while (stream.bytesAvailable > 0) { data = (data + stream.readUTFBytes(1)); }; if (finishFunc != null){ finishFunc(); }; } } }//package Tools
Section 478
//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 link:String; var name = _arg1; enabled = false; super(); if (Security.sandboxType != Security.REMOTE){ return; }; thisname = name; Security.allowDomain("www.rocksolidarcade.com"); Security.allowInsecureDomain("www.rocksolidarcade.com"); 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:String; _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 479
//_activeButtonStyleStyle (_activeButtonStyleStyle) package { import mx.core.*; import mx.styles.*; public class _activeButtonStyleStyle { public static function init(_arg1:IFlexModuleFactory):void{ var style:CSSStyleDeclaration; var fbs = _arg1; style = StyleManager.getStyleDeclaration(".activeButtonStyle"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".activeButtonStyle", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ }; }; } } }//package
Section 480
//_activeTabStyleStyle (_activeTabStyleStyle) package { import mx.core.*; import mx.styles.*; public class _activeTabStyleStyle { public static function init(_arg1:IFlexModuleFactory):void{ var style:CSSStyleDeclaration; var fbs = _arg1; style = StyleManager.getStyleDeclaration(".activeTabStyle"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".activeTabStyle", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.fontWeight = "bold"; }; }; } } }//package
Section 481
//_alertButtonStyleStyle (_alertButtonStyleStyle) package { import mx.core.*; import mx.styles.*; public class _alertButtonStyleStyle { public static function init(_arg1:IFlexModuleFactory):void{ var style:CSSStyleDeclaration; var fbs = _arg1; style = StyleManager.getStyleDeclaration(".alertButtonStyle"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".alertButtonStyle", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.color = 734012; }; }; } } }//package
Section 482
//_comboDropDownStyle (_comboDropDownStyle) package { import mx.core.*; import mx.styles.*; public class _comboDropDownStyle { public static function init(_arg1:IFlexModuleFactory):void{ var style:CSSStyleDeclaration; var fbs = _arg1; style = StyleManager.getStyleDeclaration(".comboDropDown"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".comboDropDown", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.shadowDirection = "center"; this.fontWeight = "normal"; this.dropShadowEnabled = true; this.backgroundColor = 0xFFFFFF; this.shadowDistance = 1; this.cornerRadius = 0; this.borderThickness = 0; }; }; } } }//package
Section 483
//_dataGridStylesStyle (_dataGridStylesStyle) package { import mx.core.*; import mx.styles.*; public class _dataGridStylesStyle { public static function init(_arg1:IFlexModuleFactory):void{ var style:CSSStyleDeclaration; var fbs = _arg1; style = StyleManager.getStyleDeclaration(".dataGridStyles"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".dataGridStyles", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.fontWeight = "bold"; }; }; } } }//package
Section 484
//_dateFieldPopupStyle (_dateFieldPopupStyle) package { import mx.core.*; import mx.styles.*; public class _dateFieldPopupStyle { public static function init(_arg1:IFlexModuleFactory):void{ var style:CSSStyleDeclaration; var fbs = _arg1; style = StyleManager.getStyleDeclaration(".dateFieldPopup"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".dateFieldPopup", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.dropShadowEnabled = true; this.backgroundColor = 0xFFFFFF; this.borderThickness = 0; }; }; } } }//package
Section 485
//_errorTipStyle (_errorTipStyle) package { import mx.core.*; import mx.styles.*; public class _errorTipStyle { public static function init(_arg1:IFlexModuleFactory):void{ var style:CSSStyleDeclaration; var fbs = _arg1; style = StyleManager.getStyleDeclaration(".errorTip"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".errorTip", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.fontWeight = "bold"; this.borderStyle = "errorTipRight"; this.paddingTop = 4; this.borderColor = 13510953; this.color = 0xFFFFFF; this.fontSize = 9; this.shadowColor = 0; this.paddingLeft = 4; this.paddingBottom = 4; this.paddingRight = 4; }; }; } } }//package
Section 486
//_globalStyle (_globalStyle) package { import mx.core.*; import mx.styles.*; import mx.skins.halo.*; public class _globalStyle { public static function init(_arg1:IFlexModuleFactory):void{ var style:CSSStyleDeclaration; var fbs = _arg1; style = StyleManager.getStyleDeclaration("global"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration("global", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.fillColor = 0xFFFFFF; this.kerning = false; this.textRollOverColor = 2831164; this.horizontalAlign = "left"; this.shadowCapColor = 14015965; this.backgroundAlpha = 1; this.filled = true; this.roundedBottomCorners = true; this.fontThickness = 0; this.focusBlendMode = "normal"; this.fillColors = [0xFFFFFF, 0xCCCCCC, 0xFFFFFF, 0xEEEEEE]; this.horizontalGap = 8; this.borderCapColor = 9542041; this.buttonColor = 7305079; this.indentation = 17; this.selectionDisabledColor = 0xDDDDDD; this.closeDuration = 250; this.embedFonts = false; this.paddingTop = 0; this.letterSpacing = 0; this.focusAlpha = 0.4; this.bevel = true; this.fontSize = 10; this.shadowColor = 0xEEEEEE; this.borderAlpha = 1; this.paddingLeft = 0; this.fontWeight = "normal"; this.indicatorGap = 14; this.focusSkin = HaloFocusRect; this.dropShadowEnabled = false; this.leading = 2; this.borderSkin = HaloBorder; this.fontSharpness = 0; this.modalTransparencyDuration = 100; this.borderThickness = 1; this.backgroundSize = "auto"; this.borderStyle = "inset"; this.borderColor = 12040892; this.fontAntiAliasType = "advanced"; this.errorColor = 0xFF0000; this.shadowDistance = 2; this.horizontalGridLineColor = 0xF7F7F7; this.stroked = false; this.cornerRadius = 0; this.modalTransparencyColor = 0xDDDDDD; this.verticalAlign = "top"; this.textIndent = 0; this.fillAlphas = [0.6, 0.4, 0.75, 0.65]; this.verticalGridLineColor = 14015965; this.themeColor = 40447; this.shadowDirection = "center"; this.modalTransparency = 0.5; this.repeatInterval = 35; this.openDuration = 250; this.textAlign = "left"; this.fontFamily = "Verdana"; this.textSelectedColor = 2831164; this.paddingBottom = 0; this.strokeWidth = 1; this.fontGridFitType = "pixel"; this.horizontalGridLines = false; this.useRollOver = true; this.verticalGridLines = true; this.repeatDelay = 500; this.fontStyle = "normal"; this.dropShadowColor = 0; this.focusThickness = 2; this.verticalGap = 6; this.disabledColor = 11187123; this.paddingRight = 0; this.focusRoundedCorners = "tl tr bl br"; this.borderSides = "left top right bottom"; this.modalTransparencyBlur = 3; this.color = 734012; this.selectionDuration = 250; this.highlightAlphas = [0.3, 0]; }; }; } } }//package
Section 487
//_headerDateTextStyle (_headerDateTextStyle) package { import mx.core.*; import mx.styles.*; public class _headerDateTextStyle { public static function init(_arg1:IFlexModuleFactory):void{ var style:CSSStyleDeclaration; var fbs = _arg1; style = StyleManager.getStyleDeclaration(".headerDateText"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".headerDateText", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.fontWeight = "bold"; this.textAlign = "center"; }; }; } } }//package
Section 488
//_headerDragProxyStyleStyle (_headerDragProxyStyleStyle) package { import mx.core.*; import mx.styles.*; public class _headerDragProxyStyleStyle { public static function init(_arg1:IFlexModuleFactory):void{ var style:CSSStyleDeclaration; var fbs = _arg1; style = StyleManager.getStyleDeclaration(".headerDragProxyStyle"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".headerDragProxyStyle", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.fontWeight = "bold"; }; }; } } }//package
Section 489
//_opaquePanelStyle (_opaquePanelStyle) package { import mx.core.*; import mx.styles.*; public class _opaquePanelStyle { public static function init(_arg1:IFlexModuleFactory):void{ var style:CSSStyleDeclaration; var fbs = _arg1; style = StyleManager.getStyleDeclaration(".opaquePanel"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".opaquePanel", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.borderColor = 0xFFFFFF; this.backgroundColor = 0xFFFFFF; this.headerColors = [0xE7E7E7, 0xD9D9D9]; this.footerColors = [0xE7E7E7, 0xC7C7C7]; this.borderAlpha = 1; }; }; } } }//package
Section 490
//_plainStyle (_plainStyle) package { import mx.core.*; import mx.styles.*; public class _plainStyle { public static function init(_arg1:IFlexModuleFactory):void{ var style:CSSStyleDeclaration; var fbs = _arg1; style = StyleManager.getStyleDeclaration(".plain"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".plain", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.paddingTop = 0; this.backgroundColor = 0xFFFFFF; this.backgroundImage = ""; this.horizontalAlign = "left"; this.paddingLeft = 0; this.paddingBottom = 0; this.paddingRight = 0; }; }; } } }//package
Section 491
//_richTextEditorTextAreaStyleStyle (_richTextEditorTextAreaStyleStyle) package { import mx.core.*; import mx.styles.*; public class _richTextEditorTextAreaStyleStyle { public static function init(_arg1:IFlexModuleFactory):void{ var style:CSSStyleDeclaration; var fbs = _arg1; style = StyleManager.getStyleDeclaration(".richTextEditorTextAreaStyle"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".richTextEditorTextAreaStyle", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ }; }; } } }//package
Section 492
//_textAreaHScrollBarStyleStyle (_textAreaHScrollBarStyleStyle) package { import mx.core.*; import mx.styles.*; public class _textAreaHScrollBarStyleStyle { public static function init(_arg1:IFlexModuleFactory):void{ var style:CSSStyleDeclaration; var fbs = _arg1; style = StyleManager.getStyleDeclaration(".textAreaHScrollBarStyle"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".textAreaHScrollBarStyle", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ }; }; } } }//package
Section 493
//_textAreaVScrollBarStyleStyle (_textAreaVScrollBarStyleStyle) package { import mx.core.*; import mx.styles.*; public class _textAreaVScrollBarStyleStyle { public static function init(_arg1:IFlexModuleFactory):void{ var style:CSSStyleDeclaration; var fbs = _arg1; style = StyleManager.getStyleDeclaration(".textAreaVScrollBarStyle"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".textAreaVScrollBarStyle", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ }; }; } } }//package
Section 494
//_todayStyleStyle (_todayStyleStyle) package { import mx.core.*; import mx.styles.*; public class _todayStyleStyle { public static function init(_arg1:IFlexModuleFactory):void{ var style:CSSStyleDeclaration; var fbs = _arg1; style = StyleManager.getStyleDeclaration(".todayStyle"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".todayStyle", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.color = 0xFFFFFF; this.textAlign = "center"; }; }; } } }//package
Section 495
//_weekDayStyleStyle (_weekDayStyleStyle) package { import mx.core.*; import mx.styles.*; public class _weekDayStyleStyle { public static function init(_arg1:IFlexModuleFactory):void{ var style:CSSStyleDeclaration; var fbs = _arg1; style = StyleManager.getStyleDeclaration(".weekDayStyle"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".weekDayStyle", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.fontWeight = "bold"; this.textAlign = "center"; }; }; } } }//package
Section 496
//_windowStatusStyle (_windowStatusStyle) package { import mx.core.*; import mx.styles.*; public class _windowStatusStyle { public static function init(_arg1:IFlexModuleFactory):void{ var style:CSSStyleDeclaration; var fbs = _arg1; style = StyleManager.getStyleDeclaration(".windowStatus"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".windowStatus", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.color = 0x666666; }; }; } } }//package
Section 497
//_windowStylesStyle (_windowStylesStyle) package { import mx.core.*; import mx.styles.*; public class _windowStylesStyle { public static function init(_arg1:IFlexModuleFactory):void{ var style:CSSStyleDeclaration; var fbs = _arg1; style = StyleManager.getStyleDeclaration(".windowStyles"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".windowStyles", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.fontWeight = "bold"; }; }; } } }//package
Section 498
//core_properties (core_properties) package { import mx.resources.*; public class core_properties extends ResourceBundle { override protected function getContent():Object{ var _local1:Object; _local1 = {}; _local1["multipleChildSets_ClassAndInstance"] = "Multiple sets of visual children have been specified for this component (component definition and component instance)."; _local1["multipleChildSets_ClassAndSubclass"] = "Multiple sets of visual children have been specified for this component (base component definition and derived component definition)."; _local1["notExecuting"] = "Repeater is not executing."; _local1["truncationIndicator"] = "..."; _local1["stateUndefined"] = "Undefined state '{0}'."; _local1["scrollDirection"] = "Unknown scroll direction '{0}'."; _local1["viewSource"] = "View Source"; return (_local1); } } }//package
Section 499
//effects_properties (effects_properties) package { import mx.resources.*; public class effects_properties extends ResourceBundle { override protected function getContent():Object{ var _local1:Object; _local1 = {}; _local1["incorrectTrigger"] = "The Zoom effect can not be triggered by a moveEffect trigger."; _local1["incorrectSource"] = "Source property must be a Class or String."; return (_local1); } } }//package
Section 500
//Main (Main) package { import GameScene.*; import flash.display.*; import flash.text.*; import Tools.*; import Scenes.*; public class Main extends Sprite { public var i:Input; public var mainFont:Class; 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()); } public function blah():void{ gss.update(); } public function enter():void{ } } }//package
Section 501
//Main_mainFont (Main_mainFont) package { import mx.core.*; public class Main_mainFont extends FontAsset { } }//package
Section 502
//MochiAd (MochiAd) package { import flash.events.*; import flash.display.*; import flash.net.*; import flash.utils.*; import flash.system.*; public class MochiAd { public static function getVersion():String{ return ("2.1"); } public static function showTimedAd(_arg1:Object):void{ MochiAd.showInterLevelAd(_arg1); } public static function _allowDomains(_arg1:String):String{ var _local2:String; _local2 = _arg1.split("/")[2].split(":")[0]; Security.allowDomain("*"); Security.allowDomain(_local2); Security.allowInsecureDomain("*"); Security.allowInsecureDomain(_local2); return (_local2); } public static function load(_arg1:Object):MovieClip{ var DEFAULTS:Object; var clip:Object; var depth:Number; var mc:MovieClip; var wh:Array; var lv:URLVariables; var k:String; var server:String; var hostname:String; var lc:LocalConnection; var name:String; var loader:Loader; var f:Function; var g:Function; var req:URLRequest; var v:Object; var options = _arg1; DEFAULTS = {server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"}; options = MochiAd._parseOptions(options, DEFAULTS); options.swfv = 9; options.mav = MochiAd.getVersion(); clip = options.clip; if (!MochiAd._isNetworkAvailable()){ return (null); }; if (clip._mochiad_loaded){ return (null); }; depth = options.depth; delete options.depth; mc = createEmptyMovieClip(clip, "_mochiad", depth); wh = MochiAd._getRes(options, clip); options.res = ((wh[0] + "x") + wh[1]); options.server = (options.server + options.id); delete options.id; clip._mochiad_loaded = true; if (clip.loaderInfo.loaderURL.indexOf("http") == 0){ options.as3_swf = clip.loaderInfo.loaderURL; }; lv = new URLVariables(); for (k in options) { v = options[k]; if (!(v is Function)){ lv[k] = v; }; }; server = lv.server; delete lv.server; hostname = _allowDomains(server); lc = new LocalConnection(); lc.client = mc; name = ["", Math.floor(new Date().getTime()), Math.floor((Math.random() * 999999))].join("_"); lc.allowDomain("*", "localhost"); lc.allowInsecureDomain("*", "localhost"); lc.connect(name); mc.lc = lc; lv.lc = name; lv.st = getTimer(); loader = new Loader(); f = function (_arg1:Object):void{ mc._mochiad_ctr_failed = true; }; loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, f); g = function (_arg1:Object):void{ MochiAd.unload(clip); }; loader.contentLoaderInfo.addEventListener(Event.UNLOAD, g); req = new URLRequest((server + ".swf")); req.contentType = "application/x-www-form-urlencoded"; req.method = URLRequestMethod.POST; req.data = lv; loader.load(req); mc.addChild(loader); mc._mochiad_ctr = loader; return (mc); } public static function sendHighScore(_arg1:Object, _arg2:Object, _arg3:Object=null):Boolean{ var _local4:MovieClip; _local4 = MochiAd._loadCommunicator({clip:_arg1.clip, id:_arg1.id}); if (!_local4){ return (false); }; _local4.doSend(["sendHighScore", _arg1], _arg2, _arg3); return (true); } public static function _parseOptions(_arg1:Object, _arg2:Object):Object{ var _local3:Object; var _local4:String; var _local5:Array; var _local6:Number; var _local7:Array; _local3 = {}; for (_local4 in _arg2) { _local3[_local4] = _arg2[_local4]; }; if (_arg1){ for (_local4 in _arg1) { _local3[_local4] = _arg1[_local4]; }; }; _arg1 = _local3.clip.loaderInfo.parameters.mochiad_options; if (_arg1){ _local5 = _arg1.split("&"); _local6 = 0; while (_local6 < _local5.length) { _local7 = _local5[_local6].split("="); _local3[unescape(_local7[0])] = unescape(_local7[1]); _local6++; }; }; return (_local3); } public static function _isNetworkAvailable():Boolean{ return (!((Security.sandboxType == "localWithFile"))); } public static function unload(_arg1:Object):Boolean{ if (((_arg1.clip) && (_arg1.clip._mochiad))){ _arg1 = _arg1.clip; }; if (!_arg1._mochiad){ return (false); }; if (_arg1._mochiad.onUnload){ _arg1._mochiad.onUnload(); }; if (MovieClip(_arg1).contains(_arg1._mochiad)){ _arg1.removeChild(_arg1._mochiad); }; if (_arg1._mochiad_loaded){ delete _arg1._mochiad_loaded; }; if (_arg1._mochiad){ delete _arg1._mochiad; }; return (true); } public static function showInterLevelAd(_arg1:Object):void{ var DEFAULTS:Object; var clip:Object; var ad_msec:Number; var ad_timeout:Number; var fadeout_time:Number; var mc:MovieClip; var wh:Array; var w:Number; var h:Number; var chk:MovieClip; var options = _arg1; DEFAULTS = {ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function ():void{ this.clip.stop(); }, ad_finished:function ():void{ this.clip.play(); }}; options = MochiAd._parseOptions(options, DEFAULTS); clip = options.clip; ad_msec = 11000; ad_timeout = options.ad_timeout; delete options.ad_timeout; fadeout_time = options.fadeout_time; delete options.fadeout_time; if (!MochiAd.load(options)){ options.ad_finished(); return; }; options.ad_started(); mc = clip._mochiad; mc["onUnload"] = function ():void{ options.ad_finished(); }; wh = MochiAd._getRes(options, clip); w = wh[0]; h = wh[1]; mc.x = (w * 0.5); mc.y = (h * 0.5); chk = createEmptyMovieClip(mc, "_mochiad_wait", 3); chk.ad_msec = ad_msec; chk.ad_timeout = ad_timeout; chk.started = getTimer(); chk.showing = false; chk.fadeout_time = fadeout_time; chk.fadeFunction = function ():void{ var _local1:Number; _local1 = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time))); if (_local1 > 0){ this.parent.alpha = (_local1 * 0.01); } else { MochiAd.unload(clip); delete this["onEnterFrame"]; }; }; mc.unloadAd = function ():void{ MochiAd.unload(clip); }; mc.adjustProgress = function (_arg1:Number):void{ var _local2:Object; _local2 = mc._mochiad_wait; _local2.server_control = true; _local2.started = getTimer(); _local2.ad_msec = (_arg1 - 250); }; chk["onEnterFrame"] = function ():void{ var _local1:Object; var _local2:Number; var _local3:Boolean; var _local4:Number; _local1 = this.parent._mochiad_ctr; _local2 = (getTimer() - this.started); _local3 = false; if (!chk.showing){ _local4 = _local1.loaderInfo.bytesTotal; if ((((_local4 > 0)) || (("number" == "undefined")))){ chk.showing = true; chk.started = getTimer(); } else { if (_local2 > chk.ad_timeout){ _local3 = true; }; }; }; if ((((_local2 > chk.ad_msec)) || (this.parent._mochiad_ctr_failed))){ _local3 = true; }; if (_local3){ if (this.server_control){ delete this.onEnterFrame; } else { this.fadeout_start = getTimer(); this.onEnterFrame = this.fadeFunction; }; }; }; doOnEnterFrame(chk); } public static function _getRes(_arg1:Object, _arg2:Object):Array{ var _local3:Object; var _local4:Number; var _local5:Number; var _local6:Array; _local3 = _arg2.getBounds(_arg2.root); _local4 = 0; _local5 = 0; if (typeof(_arg1.res) != "undefined"){ _local6 = _arg1.res.split("x"); _local4 = parseFloat(_local6[0]); _local5 = parseFloat(_local6[1]); } else { _local4 = (_local3.xMax - _local3.xMin); _local5 = (_local3.yMax - _local3.yMin); }; if ((((_local4 == 0)) || ((_local5 == 0)))){ _local4 = _arg2.stage.stageWidth; _local5 = _arg2.stage.stageHeight; }; return ([_local4, _local5]); } public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number):MovieClip{ var _local4:MovieClip; _local4 = new MovieClip(); if (((false) && (_arg3))){ _arg1.addChildAt(_local4, _arg3); } else { _arg1.addChild(_local4); }; _arg1[_arg2] = _local4; _local4["_name"] = _arg2; return (_local4); } public static function _loadCommunicator(_arg1:Object):MovieClip{ var DEFAULTS:Object; var clip:Object; var clipname:String; var server:String; var depth:Number; var mc:MovieClip; var lv:URLVariables; var k:String; var lc:LocalConnection; var name:String; var req:URLRequest; var loader:Loader; var options = _arg1; DEFAULTS = {com_server:"http://x.mochiads.com/com/1/", method:"loadCommunicator", depth:10337, id:"_UNKNOWN_"}; options = MochiAd._parseOptions(options, DEFAULTS); options.swfv = 9; options.mav = MochiAd.getVersion(); clip = options.clip; clipname = ("_mochiad_com_" + options.id); if (!MochiAd._isNetworkAvailable()){ return (null); }; if (clip[clipname]){ return (clip[clipname]); }; server = (options.com_server + options.id); MochiAd._allowDomains(server); delete options.id; delete options.com_server; depth = options.depth; delete options.depth; mc = createEmptyMovieClip(clip, clipname, depth); lv = new URLVariables(); for (k in options) { lv[k] = options[k]; }; lc = new LocalConnection(); lc.client = mc; name = ["", Math.floor(new Date().getTime()), Math.floor((Math.random() * 999999))].join("_"); lc.allowDomain("*", "localhost"); lc.allowInsecureDomain("*", "localhost"); lc.connect(name); mc.name = name; mc.lc = lc; lv.lc = name; mc._id = 0; mc._queue = []; mc.rpcResult = function (_arg1:Object):void{ var _local3:Array; var _local4:Array; var _local5:Number; var _local6:Object; var _local7:Object; _arg1 = parseInt(_arg1.toString()); _local3 = mc._callbacks[_arg1]; if (typeof(_local3) == "undefined"){ return; }; delete mc._callbacks[_arg1]; _local4 = []; _local5 = 2; while (_local5 < _local3.length) { _local4.push(_local3[_local5]); _local5++; }; _local5 = 1; while (_local5 < arguments.length) { _local4.push(arguments[_local5]); _local5++; }; _local6 = _local3[1]; _local7 = _local3[0]; if (((_local7) && ((typeof(_local6) == "string")))){ _local6 = _local7[_local6]; }; if (typeof(_local6) == "function"){ _local6.apply(_local7, _local4); }; }; mc._didConnect = function (_arg1:String):void{ var _local2:Array; var _local3:Function; var _local4:Number; var _local5:Array; mc._endpoint = _arg1; _local2 = mc._queue; delete mc._queue; _local3 = mc.doSend; _local4 = 0; while (_local4 < _local2.length) { _local5 = _local2[_local4]; _local3.apply(this, _local5); _local4++; }; }; mc.doSend = function (_arg1:Array, _arg2:Object, _arg3:Object):void{ var _local5:Number; var _local6:LocalConnection; var _local7:Array; var _local8:Number; if (mc._endpoint == null){ _local7 = []; _local8 = 0; while (_local8 < arguments.length) { _local7.push(arguments[_local8]); _local8++; }; mc._queue.push(_local7); return; }; mc._id = (mc._id + 1); _local5 = mc._id; mc._callbacks[_local5] = [_arg2, ((_arg3) || (_arg2))]; _local6 = new LocalConnection(); _local6.send(mc._endpoint, "rpc", _local5, _arg1); }; mc._callbacks = {}; mc._callbacks[0] = [mc, "_didConnect"]; lv.st = getTimer(); req = new URLRequest((server + ".swf")); req.contentType = "application/x-www-form-urlencoded"; req.method = URLRequestMethod.POST; req.data = lv; loader = new Loader(); loader.load(req); mc.addChild(loader); mc._mochiad_com = loader; return (mc); } public static function showPreGameAd(_arg1:Object):void{ var DEFAULTS:Object; var clip:Object; var ad_msec:Number; var ad_timeout:Number; var fadeout_time:Number; var mc:MovieClip; var wh:Array; var w:Number; var h:Number; var chk:MovieClip; var bar:MovieClip; var bar_color:Number; var bar_background:Number; var bar_outline:Number; var backing_mc:MovieClip; var backing:Object; var inside_mc:MovieClip; var inside:Object; var outline_mc:MovieClip; var outline:Object; var complete:Boolean; var unloaded:Boolean; var f:Function; var r:MovieClip; var options = _arg1; DEFAULTS = {ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:10197927, background:0xFFFFFF, outline:16098643, ad_started:function ():void{ this.clip.stop(); }, ad_finished:function ():void{ this.clip.play(); }}; options = MochiAd._parseOptions(options, DEFAULTS); clip = options.clip; ad_msec = 11000; ad_timeout = options.ad_timeout; delete options.ad_timeout; fadeout_time = options.fadeout_time; delete options.fadeout_time; if (!MochiAd.load(options)){ options.ad_finished(); return; }; options.ad_started(); mc = clip._mochiad; mc["onUnload"] = function ():void{ var fn:Function; fn = function ():void{ options.ad_finished(); }; setTimeout(fn, 100); }; wh = MochiAd._getRes(options, clip); w = wh[0]; h = wh[1]; mc.x = (w * 0.5); mc.y = (h * 0.5); chk = createEmptyMovieClip(mc, "_mochiad_wait", 3); chk.x = (w * -0.5); chk.y = (h * -0.5); bar = createEmptyMovieClip(chk, "_mochiad_bar", 4); bar.x = 10; bar.y = (h - 20); bar_color = options.color; delete options.color; bar_background = options.background; delete options.background; bar_outline = options.outline; delete options.outline; backing_mc = createEmptyMovieClip(bar, "_outline", 1); backing = backing_mc.graphics; backing.beginFill(bar_background); backing.moveTo(0, 0); backing.lineTo((w - 20), 0); backing.lineTo((w - 20), 10); backing.lineTo(0, 10); backing.lineTo(0, 0); backing.endFill(); inside_mc = createEmptyMovieClip(bar, "_inside", 2); inside = inside_mc.graphics; inside.beginFill(bar_color); inside.moveTo(0, 0); inside.lineTo((w - 20), 0); inside.lineTo((w - 20), 10); inside.lineTo(0, 10); inside.lineTo(0, 0); inside.endFill(); inside_mc.scaleX = 0; outline_mc = createEmptyMovieClip(bar, "_outline", 3); outline = outline_mc.graphics; outline.lineStyle(0, bar_outline, 100); outline.moveTo(0, 0); outline.lineTo((w - 20), 0); outline.lineTo((w - 20), 10); outline.lineTo(0, 10); outline.lineTo(0, 0); chk.ad_msec = ad_msec; chk.ad_timeout = ad_timeout; chk.started = getTimer(); chk.showing = false; chk.last_pcnt = 0; chk.fadeout_time = fadeout_time; chk.fadeFunction = function ():void{ var _local1:Number; _local1 = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time))); if (_local1 > 0){ this.parent.alpha = (_local1 * 0.01); } else { MochiAd.unload(clip); delete this["onEnterFrame"]; }; }; complete = false; unloaded = false; f = function (_arg1:Event):void{ complete = true; if (unloaded){ MochiAd.unload(clip); }; }; clip.loaderInfo.addEventListener(Event.COMPLETE, f); if ((clip.root is MovieClip)){ r = (clip.root as MovieClip); if (r.framesLoaded >= r.totalFrames){ complete = true; }; }; mc.unloadAd = function ():void{ unloaded = true; if (complete){ MochiAd.unload(clip); }; }; mc.adjustProgress = function (_arg1:Number):void{ var _local2:Object; _local2 = mc._mochiad_wait; _local2.server_control = true; _local2.started = getTimer(); _local2.ad_msec = _arg1; }; chk["onEnterFrame"] = function ():void{ var _local1:Object; var _local2:Object; var _local3:Number; var _local4:Boolean; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Object; var _local10:Number; var _local11:Number; if (!this.parent.parent){ delete this["onEnterFrame"]; return; }; _local1 = this.parent.parent.root; _local2 = this.parent._mochiad_ctr; _local3 = (getTimer() - this.started); _local4 = false; _local5 = _local1.loaderInfo.bytesTotal; _local6 = _local1.loaderInfo.bytesLoaded; _local7 = ((100 * _local6) / _local5); _local8 = ((100 * _local3) / chk.ad_msec); _local9 = this._mochiad_bar._inside; _local10 = Math.min(100, Math.min(((_local7) || (0)), _local8)); _local10 = Math.max(this.last_pcnt, _local10); this.last_pcnt = _local10; _local9.scaleX = (_local10 * 0.01); if (!chk.showing){ _local11 = _local2.loaderInfo.bytesTotal; if ((((_local11 > 0)) || (("number" == "undefined")))){ chk.showing = true; chk.started = getTimer(); } else { if (_local3 > chk.ad_timeout){ _local4 = true; }; }; }; if ((((_local3 > chk.ad_msec)) || (this.parent._mochiad_ctr_failed))){ _local4 = true; }; if (((complete) && (_local4))){ if (this.server_control){ delete this.onEnterFrame; } else { this.fadeout_start = getTimer(); this.onEnterFrame = chk.fadeFunction; }; }; }; doOnEnterFrame(chk); } public static function showPreloaderAd(_arg1:Object):void{ MochiAd.showPreGameAd(_arg1); } public static function fetchHighScores(_arg1:Object, _arg2:Object, _arg3:Object=null):Boolean{ var _local4:MovieClip; _local4 = MochiAd._loadCommunicator({clip:_arg1.clip, id:_arg1.id}); if (!_local4){ return (false); }; _local4.doSend(["fetchHighScores", _arg1], _arg2, _arg3); return (true); } public static function doOnEnterFrame(_arg1:MovieClip):void{ var f:Function; var mc = _arg1; f = function (_arg1:Object):void{ if (((("onEnterFrame" in mc)) && (mc.onEnterFrame))){ mc.onEnterFrame(); } else { mc.removeEventListener(Event.ENTER_FRAME, f); }; }; mc.addEventListener(Event.ENTER_FRAME, f); } } }//package
Section 503
//skins_properties (skins_properties) package { import mx.resources.*; public class skins_properties extends ResourceBundle { override protected function getContent():Object{ var _local1:Object; _local1 = {}; _local1["notLoaded"] = "Unable to load '{0}'."; return (_local1); } } }//package
Section 504
//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); public static var startGame_embed:Class = Sounds_startGame_embed; public static var planeIdle:GameSound = GameSound.forEmbed(planeIdle_embed, 0.400000006); public static var planeIdleFast:GameSound = GameSound.forEmbed(planeIdleFast_embed, 0.5); public static var mainLoop_embed:Class = Sounds_mainLoop_embed; public static var obstacleRingFast:GameSound = GameSound.forEmbed(obstacleRingFast_embed, 1); public static var obstacleRing:GameSound = GameSound.forEmbed(obstacleRing_embed, 1); public static var bonusBalloonPop:GameSound = GameSound.forEmbed(bonusBalloonPop_embed, 0.800000012); public static var levelComplete:GameSound = GameSound.forEmbed(levelComplete_embed, 0.400000006); 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); public static var startGame:GameSound = GameSound.forEmbed(startGame_embed, 1); 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); } }//package
Section 505
//Sounds_bonusBalloonPop_embed (Sounds_bonusBalloonPop_embed) package { import mx.core.*; public class Sounds_bonusBalloonPop_embed extends SoundAsset { } }//package
Section 506
//Sounds_levelComplete_embed (Sounds_levelComplete_embed) package { import mx.core.*; public class Sounds_levelComplete_embed extends SoundAsset { } }//package
Section 507
//Sounds_mainLoop_embed (Sounds_mainLoop_embed) package { import mx.core.*; public class Sounds_mainLoop_embed extends SoundAsset { } }//package
Section 508
//Sounds_obstacleRing_embed (Sounds_obstacleRing_embed) package { import mx.core.*; public class Sounds_obstacleRing_embed extends SoundAsset { } }//package
Section 509
//Sounds_obstacleRingFast_embed (Sounds_obstacleRingFast_embed) package { import mx.core.*; public class Sounds_obstacleRingFast_embed extends SoundAsset { } }//package
Section 510
//Sounds_planeCrash_embed (Sounds_planeCrash_embed) package { import mx.core.*; public class Sounds_planeCrash_embed extends SoundAsset { } }//package
Section 511
//Sounds_planeFalling_embed (Sounds_planeFalling_embed) package { import mx.core.*; public class Sounds_planeFalling_embed extends SoundAsset { } }//package
Section 512
//Sounds_planeIdle_embed (Sounds_planeIdle_embed) package { import mx.core.*; public class Sounds_planeIdle_embed extends SoundAsset { } }//package
Section 513
//Sounds_planeIdleFast_embed (Sounds_planeIdleFast_embed) package { import mx.core.*; public class Sounds_planeIdleFast_embed extends SoundAsset { } }//package
Section 514
//Sounds_startGame_embed (Sounds_startGame_embed) package { import mx.core.*; public class Sounds_startGame_embed extends SoundAsset { } }//package
Section 515
//styles_properties (styles_properties) package { import mx.resources.*; public class styles_properties extends ResourceBundle { override protected function getContent():Object{ var _local1:Object; _local1 = {}; _local1["unableToLoad"] = "Unable to load style({0}): {1}."; return (_local1); } } }//package

Library Items

Symbol 1 Bitmap {preload.CustomPreloader_corner_embed}
Symbol 2 Bitmap {preload.CustomPreloader_loadingImage}
Symbol 3 Sound {Sounds_obstacleRing_embed} [Sounds_obstacleRing_embed]
Symbol 4 Sound {Sounds_bonusBalloonPop_embed} [Sounds_bonusBalloonPop_embed]
Symbol 5 Sound {Sounds_planeIdleFast_embed} [Sounds_planeIdleFast_embed]
Symbol 6 Sound {Sounds_planeIdle_embed} [Sounds_planeIdle_embed]
Symbol 7 Sound {Sounds_obstacleRingFast_embed} [Sounds_obstacleRingFast_embed]
Symbol 8 Sound {Sounds_startGame_embed} [Sounds_startGame_embed]
Symbol 9 Sound {Sounds_planeCrash_embed} [Sounds_planeCrash_embed]
Symbol 10 Sound {Sounds_mainLoop_embed} [Sounds_mainLoop_embed]
Symbol 11 Sound {Sounds_levelComplete_embed} [Sounds_levelComplete_embed]
Symbol 12 Sound {Sounds_planeFalling_embed} [Sounds_planeFalling_embed]
Symbol 13 Bitmap {GlobalSetup.Embeds_p1_roll011_png}
Symbol 14 Bitmap {GlobalSetup.Embeds_smoke_d005_png}
Symbol 15 Bitmap {GlobalSetup.Embeds_tree2_png}
Symbol 16 Bitmap {GlobalSetup.Embeds_p1_roll021_png}
Symbol 17 Bitmap {GlobalSetup.Embeds_smoke_d016_png}
Symbol 18 Bitmap {GlobalSetup.Embeds_menu_button_png}
Symbol 19 Bitmap {GlobalSetup.Embeds_pipe_roll_png}
Symbol 20 Bitmap {Scenes.MainScene_play_button_embed}
Symbol 21 Bitmap {GlobalSetup.Embeds_p1_roll016_png}
Symbol 22 Bitmap {GlobalSetup.Embeds_tree1_png}
Symbol 23 Bitmap {GlobalSetup.Embeds_p1_roll003_png}
Symbol 24 Bitmap {GlobalSetup.Embeds_smoke_d003_png}
Symbol 25 Bitmap {GlobalSetup.Embeds_smoke_c001_png}
Symbol 26 Bitmap {GlobalSetup.Embeds_smoke_a012_png}
Symbol 27 Bitmap {GlobalSetup.Embeds_p1_roll023_png}
Symbol 28 Bitmap {GlobalSetup.Embeds_smoke_a010_png}
Symbol 29 Bitmap {GlobalSetup.Embeds_smoke_d008_png}
Symbol 30 Bitmap {Scenes.MainScene_pause_button_embed}
Symbol 31 Bitmap {GlobalSetup.Embeds_smoke_c009_png}
Symbol 32 Bitmap {GlobalSetup.Embeds_bonus_ball_png}
Symbol 33 Bitmap {GlobalSetup.Embeds_rock_png}
Symbol 34 Bitmap {GlobalSetup.Embeds_smoke_a013_png}
Symbol 35 Bitmap {GlobalSetup.Embeds_pipebig_roll_png}
Symbol 36 Bitmap {GlobalSetup.Embeds_ring2back_png}
Symbol 37 Bitmap {GlobalSetup.Embeds_content_png}
Symbol 38 Bitmap {GlobalSetup.Embeds_smoke_a011_png}
Symbol 39 Bitmap {GlobalSetup.Embeds_button_control_1_png}
Symbol 40 Bitmap {GlobalSetup.Embeds_ring2_png}
Symbol 41 Bitmap {GlobalSetup.Embeds_smoke_c016_png}
Symbol 42 Bitmap {GlobalSetup.Embeds_rock_1_png}
Symbol 43 Bitmap {GlobalSetup.Embeds_smoke_b009_png}
Symbol 44 Bitmap {GlobalSetup.Embeds_p1_roll027_png}
Symbol 45 Bitmap {GlobalSetup.Embeds_planecrash_png}
Symbol 46 Bitmap {GlobalSetup.Embeds_smoke_a006_png}
Symbol 47 Bitmap {GlobalSetup.Embeds_smoke_b012_png}
Symbol 48 Bitmap {GlobalSetup.Embeds_smoke_a007_png}
Symbol 49 Bitmap {GlobalSetup.Embeds_collisionbig_png}
Symbol 50 Bitmap {GlobalSetup.Embeds_p1_roll015_png}
Symbol 51 Bitmap {GlobalSetup.Embeds_button_play_png}
Symbol 52 Bitmap {GlobalSetup.Embeds_smoke_a008_png}
Symbol 53 Bitmap {GlobalSetup.Embeds_p1_roll002_png}
Symbol 54 Bitmap {GlobalSetup.Embeds_blimp_png}
Symbol 55 Bitmap {GlobalSetup.Embeds_smoke_c011_png}
Symbol 56 Bitmap {GlobalSetup.Embeds_pipebig_png}
Symbol 57 Bitmap {GlobalSetup.Embeds_smoke_b007_png}
Symbol 58 Bitmap {GlobalSetup.Embeds_smoke_b003_png}
Symbol 59 Bitmap {GlobalSetup.Embeds_p1_roll018_png}
Symbol 60 Bitmap {GlobalSetup.Embeds_smoke_c012_png}
Symbol 61 Bitmap {GlobalSetup.Embeds_p1_roll020_png}
Symbol 62 Bitmap {GlobalSetup.Embeds_p1_roll007_png}
Symbol 63 Bitmap {Scenes.MainScene_sound_button_embed}
Symbol 64 Bitmap {GlobalSetup.Embeds_smoke_d002_png}
Symbol 65 Bitmap {GlobalSetup.Embeds_smoke_b010_png}
Symbol 66 Bitmap {Scenes.MainMenu_off_button_embed}
Symbol 67 Bitmap {GlobalSetup.Embeds_pop_png}
Symbol 68 Bitmap {GlobalSetup.Embeds_smoke_a009_png}
Symbol 69 Bitmap {GlobalSetup.Embeds_games_png}
Symbol 70 Bitmap {GlobalSetup.Embeds_smoke_b006_png}
Symbol 71 Bitmap {GlobalSetup.Embeds_rock_2_png}
Symbol 72 Bitmap {GlobalSetup.Embeds_pipeback_png}
Symbol 73 Bitmap {GlobalSetup.Embeds_pipebigback_roll_png}
Symbol 74 Bitmap {GlobalSetup.Embeds_balloon_png}
Symbol 75 Bitmap {GlobalSetup.Embeds_smoke_b014_png}
Symbol 76 Bitmap {GlobalSetup.Embeds_smoke_a016_png}
Symbol 77 Bitmap {GlobalSetup.Embeds_p1_roll010_png}
Symbol 78 Bitmap {GlobalSetup.Embeds_smoke_b004_png}
Symbol 79 Bitmap {GlobalSetup.Embeds_smoke_d006_png}
Symbol 80 Bitmap {GlobalSetup.Embeds_solid_png}
Symbol 81 Bitmap {GlobalSetup.Embeds_smoke_c004_png}
Symbol 82 Bitmap {GlobalSetup.Embeds_p1_roll013_png}
Symbol 83 Bitmap {GlobalSetup.Embeds_cloud1_png}
Symbol 84 Bitmap {GlobalSetup.Embeds_smoke_d010_png}
Symbol 85 Bitmap {GlobalSetup.Embeds_smoke_a004_png}
Symbol 86 Bitmap {GlobalSetup.Embeds_ring3_png}
Symbol 87 Bitmap {Scenes.MainScene_music_button_embed}
Symbol 88 Bitmap {GlobalSetup.Embeds_smoke_c013_png}
Symbol 89 Bitmap {GlobalSetup.Embeds_menu_logo_png}
Symbol 90 Bitmap {GlobalSetup.Embeds_pipecollisiongoodright_png}
Symbol 91 Font {Main_mainFont}
Symbol 92 Bitmap {GlobalSetup.Embeds_p1_roll008_png}
Symbol 93 Bitmap {GlobalSetup.Embeds_smoke_d004_png}
Symbol 94 Bitmap {GlobalSetup.Embeds_button_control_2_png}
Symbol 95 Bitmap {GlobalSetup.Embeds_ring2back_roll_png}
Symbol 96 Bitmap {GlobalSetup.Embeds_smoke_b002_png}
Symbol 97 Bitmap {GlobalSetup.Embeds_p1_roll005_png}
Symbol 98 Bitmap {GlobalSetup.Embeds_land_png}
Symbol 99 Bitmap {GlobalSetup.Embeds_cloud2_png}
Symbol 100 Bitmap {GlobalSetup.Embeds_collisionhuge_png}
Symbol 101 Bitmap {GlobalSetup.Embeds_pipecollisiongood_png}
Symbol 102 Bitmap {GlobalSetup.Embeds_smoke_a005_png}
Symbol 103 Bitmap {GlobalSetup.Embeds_p1_roll019_png}
Symbol 104 Bitmap {GlobalSetup.Embeds_p1_roll022_png}
Symbol 105 Bitmap {GlobalSetup.Embeds_smoke_b001_png}
Symbol 106 Bitmap {GlobalSetup.Embeds_smoke_c003_png}
Symbol 107 Bitmap {GlobalSetup.Embeds_p1_roll032_png}
Symbol 108 Bitmap {GlobalSetup.Embeds_p1_roll009_png}
Symbol 109 Bitmap {GlobalSetup.Embeds_pipecollision_png}
Symbol 110 Bitmap {GlobalSetup.Embeds_smoke_c006_png}
Symbol 111 Bitmap {GlobalSetup.Embeds_ground_png}
Symbol 112 Bitmap {GlobalSetup.Embeds_smoke_c014_png}
Symbol 113 Bitmap {GlobalSetup.Embeds_shot2_png}
Symbol 114 Bitmap {GlobalSetup.Embeds_pole_png}
Symbol 115 Bitmap {GlobalSetup.Embeds_p1_roll025_png}
Symbol 116 Bitmap {GlobalSetup.Embeds_smoke_c010_png}
Symbol 117 Bitmap {GlobalSetup.Embeds_man_png}
Symbol 118 Bitmap {GlobalSetup.Embeds_p1_roll030_png}
Symbol 119 Bitmap {GlobalSetup.Embeds_smoke_d012_png}
Symbol 120 Bitmap {GlobalSetup.Embeds_p1_roll001_png}
Symbol 121 Bitmap {GlobalSetup.Embeds_p1_roll004_png}
Symbol 122 Bitmap {GlobalSetup.Embeds_pipeback_roll_png}
Symbol 123 Bitmap {GlobalSetup.Embeds_ring3back_png}
Symbol 124 Bitmap {GlobalSetup.Embeds_tree3_png}
Symbol 125 Bitmap {GlobalSetup.Embeds_smoke_d001_png}
Symbol 126 Bitmap {GlobalSetup.Embeds_smoke_d015_png}
Symbol 127 Bitmap {GlobalSetup.Embeds_level_panel_png}
Symbol 128 Bitmap {GlobalSetup.Embeds_menu_button_link_png}
Symbol 129 Bitmap {GlobalSetup.Embeds_lives_png}
Symbol 130 Bitmap {GlobalSetup.Embeds_p1_roll017_png}
Symbol 131 Bitmap {GlobalSetup.Embeds_smoke_c015_png}
Symbol 132 Bitmap {GlobalSetup.Embeds_tick_png}
Symbol 133 Bitmap {GlobalSetup.Embeds_smoke_b016_png}
Symbol 134 Bitmap {GlobalSetup.Embeds_CollisionTall_png}
Symbol 135 Bitmap {GlobalSetup.Embeds_p1_roll012_png}
Symbol 136 Bitmap {GlobalSetup.Embeds_p1_roll006_png}
Symbol 137 Bitmap {NagScreen.NagScreen_free2}
Symbol 138 Bitmap {NagScreen.NagScreen_free1}
Symbol 139 Bitmap {GlobalSetup.Embeds_ring3_roll_png}
Symbol 140 Bitmap {GlobalSetup.Embeds_smoke_b005_png}
Symbol 141 Bitmap {GlobalSetup.Embeds_p1_roll029_png}
Symbol 142 Bitmap {GlobalSetup.Embeds_ring2_roll_png}
Symbol 143 Bitmap {GlobalSetup.Embeds_smoke_d014_png}
Symbol 144 Bitmap {GlobalSetup.Embeds_plane_prop_png}
Symbol 145 Bitmap {GlobalSetup.Embeds_p1_roll031_png}
Symbol 146 Bitmap {GlobalSetup.Embeds_smoke_b015_png}
Symbol 147 Bitmap {GlobalSetup.Embeds_p1_roll024_png}
Symbol 148 Bitmap {GlobalSetup.Embeds_p1_roll028_png}
Symbol 149 Bitmap {GlobalSetup.Embeds_smoke_d009_png}
Symbol 150 Bitmap {GlobalSetup.Embeds_p1_roll014_png}
Symbol 151 Bitmap {GlobalSetup.Embeds_smoke_a001_png}
Symbol 152 Bitmap {GlobalSetup.Embeds_pipe_png}
Symbol 153 Bitmap {GlobalSetup.Embeds_parachute_png}
Symbol 154 Bitmap {GlobalSetup.Embeds_smoke_a002_png}
Symbol 155 Bitmap {GlobalSetup.Embeds_p1_roll026_png}
Symbol 156 Bitmap {GlobalSetup.Embeds_smoke_a015_png}
Symbol 157 Bitmap {GlobalSetup.Embeds_ring3back_roll_png}
Symbol 158 Bitmap {GlobalSetup.Embeds_smoke_b013_png}
Symbol 159 Bitmap {GlobalSetup.Embeds_smoke_d013_png}
Symbol 160 Bitmap {GlobalSetup.Embeds_smoke_c007_png}
Symbol 161 Bitmap {GlobalSetup.Embeds_smoke_d007_png}
Symbol 162 Bitmap {GlobalSetup.Embeds_smoke_b008_png}
Symbol 163 Bitmap {GlobalSetup.Embeds_smoke_c005_png}
Symbol 164 Bitmap {GlobalSetup.Embeds_shot_png}
Symbol 165 Bitmap {GlobalSetup.Embeds_smoke_b011_png}
Symbol 166 Bitmap {GlobalSetup.Embeds_smoke_a003_png}
Symbol 167 Bitmap {GlobalSetup.Embeds_smoke_d011_png}
Symbol 168 Bitmap {GlobalSetup.Embeds_smoke_c002_png}
Symbol 169 Bitmap {GlobalSetup.Embeds_smoke_a014_png}
Symbol 170 Bitmap {GlobalSetup.Embeds_pipebigback_png}
Symbol 171 Bitmap {GlobalSetup.Embeds_smoke_c008_png}

Special Tags

FileAttributes (69)Timeline Frame 1Access network only, Metadata present, AS3.
SWFMetaData (77)Timeline Frame 1457 bytes "<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'><rdf:Description rdf:about='' xmlns ..."
ScriptLimits (65)Timeline Frame 1MaxRecursionDepth: 1000, ScriptTimeout: 60 seconds
ExportAssets (56)Timeline Frame 2Symbol 3 as "Sounds_obstacleRing_embed"
ExportAssets (56)Timeline Frame 2Symbol 4 as "Sounds_bonusBalloonPop_embed"
ExportAssets (56)Timeline Frame 2Symbol 5 as "Sounds_planeIdleFast_embed"
ExportAssets (56)Timeline Frame 2Symbol 6 as "Sounds_planeIdle_embed"
ExportAssets (56)Timeline Frame 2Symbol 7 as "Sounds_obstacleRingFast_embed"
ExportAssets (56)Timeline Frame 2Symbol 8 as "Sounds_startGame_embed"
ExportAssets (56)Timeline Frame 2Symbol 9 as "Sounds_planeCrash_embed"
ExportAssets (56)Timeline Frame 2Symbol 10 as "Sounds_mainLoop_embed"
ExportAssets (56)Timeline Frame 2Symbol 11 as "Sounds_levelComplete_embed"
ExportAssets (56)Timeline Frame 2Symbol 12 as "Sounds_planeFalling_embed"
SerialNumber (41)Timeline Frame 126 bytes "..........nm......rQϩ...."

Labels

"preload_CustomPreloader"Frame 1
"Main"Frame 2




http://swfchan.com/15/70470/info.shtml
Created: 9/4 -2019 20:55:47 Last modified: 9/4 -2019 20:55:47 Server time: 22/12 -2024 18:45:46