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

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

Flappy Goku.swf

This is the info page for
Flash #207401

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


ActionScript [AS3]
Section 1
//ACT_CADDVALUE (Actions.ACT_CADDVALUE) package Actions { import Expressions.*; import RunLoop.*; import Objects.*; import Params.*; public class ACT_CADDVALUE extends CAct { override public function execute(_arg1:CRun):void{ var _local2:CObject = _arg1.rhEvtProg.get_ActionObjects(this); if (_local2 == null){ return; }; var _local3:CValue = _arg1.get_EventExpressionAny(CParamExpression(evtParams[0])); CCounter(_local2).cpt_Add(_local3); } } }//package Actions
Section 2
//ACT_CDISPLAYX (Actions.ACT_CDISPLAYX) package Actions { import RunLoop.*; import Params.*; public class ACT_CDISPLAYX extends CAct { override public function execute(_arg1:CRun):void{ var _local2:int = _arg1.get_EventExpressionInt(CParamExpression(evtParams[0])); _arg1.setDisplay(_local2, 0, -1, 1); } } }//package Actions
Section 3
//ACT_CREATE (Actions.ACT_CREATE) package Actions { import OI.*; import RunLoop.*; import Objects.*; import Params.*; import Frame.*; public class ACT_CREATE extends CAct { override public function execute(_arg1:CRun):void{ var _local4:int; var _local5:CObject; var _local2:PARAM_CREATE = PARAM_CREATE(evtParams[0]); var _local3:CPositionInfo = new CPositionInfo(); if (_local2.read_Position(_arg1, 17, _local3)){ if (_local3.bRepeat){ evtFlags = (evtFlags | ACTFLAGS_REPEAT); _arg1.rhEvtProg.rh2ActionLoop = true; } else { evtFlags = (evtFlags & ~(ACTFLAGS_REPEAT)); }; _local4 = _arg1.f_CreateObject(_local2.cdpHFII, _local2.cdpOi, _local3.x, _local3.y, _local3.dir, 0, _local3.layer, -1); if (_local4 >= 0){ _local5 = _arg1.rhObjectList[_local4]; _arg1.rhEvtProg.evt_AddCurrentObject(_local5); }; }; } } }//package Actions
Section 4
//ACT_EXTCHGFLAG (Actions.ACT_EXTCHGFLAG) package Actions { import RunLoop.*; import Objects.*; import Params.*; public class ACT_EXTCHGFLAG extends CAct { override public function execute(_arg1:CRun):void{ var _local3:int; var _local4:int; var _local2:CObject = _arg1.rhEvtProg.get_ActionObjects(this); if (_local2 == null){ return; }; if (_local2.rov != null){ _local3 = _arg1.get_EventExpressionInt(CParamExpression(evtParams[0])); _local4 = (1 << _local3); if ((_local2.rov.rvValueFlags & _local4) != 0){ _local2.rov.rvValueFlags = (_local2.rov.rvValueFlags & ~(_local4)); } else { _local2.rov.rvValueFlags = (_local2.rov.rvValueFlags | _local4); }; }; } } }//package Actions
Section 5
//ACT_EXTDESTROY (Actions.ACT_EXTDESTROY) package Actions { import OI.*; import RunLoop.*; import Objects.*; import Sprites.*; public class ACT_EXTDESTROY extends CAct { override public function execute(_arg1:CRun):void{ var _local2:CObject; var _local3:CText; _local2 = _arg1.rhEvtProg.get_ActionObjects(this); if (_local2 == null){ return; }; if (_local2.hoType == 3){ _local3 = CText(_local2); if ((_local3.rsHidden & CRun.COF_FIRSTTEXT) != 0){ _local2.ros.obHide(); _local2.ros.rsFlags = (_local2.ros.rsFlags & ~(CRSpr.RSFLAG_VISIBLE)); _local2.hoFlags = (_local2.hoFlags | CObject.HOF_NOCOLLISION); } else { _local2.hoFlags = (_local2.hoFlags | CObject.HOF_DESTROYED); _arg1.destroy_Add(_local2.hoNumber); }; return; }; if ((_local2.hoFlags & CObject.HOF_DESTROYED) == 0){ _local2.hoFlags = (_local2.hoFlags | CObject.HOF_DESTROYED); if (((!(((_local2.hoOEFlags & CObjectCommon.OEFLAG_ANIMATIONS) == 0))) || (!(((_local2.hoOEFlags & CObjectCommon.OEFLAG_SPRITES) == 0))))){ _arg1.init_Disappear(_local2); } else { _local2.hoCallRoutine = false; _arg1.destroy_Add(_local2.hoNumber); }; }; } } }//package Actions
Section 6
//ACT_EXTFORCEANIM (Actions.ACT_EXTFORCEANIM) package Actions { import RunLoop.*; import Objects.*; import Params.*; public class ACT_EXTFORCEANIM extends CAct { override public function execute(_arg1:CRun):void{ var _local3:int; var _local2:CObject = _arg1.rhEvtProg.get_ActionObjects(this); if (_local2 == null){ return; }; if (evtParams[0].code == 10){ _local3 = PARAM_SHORT(evtParams[0]).value; } else { _local3 = _arg1.get_EventExpressionInt(CParamExpression(evtParams[0])); }; _local2.roa.animation_Force(_local3); _local2.roc.rcChanged = true; } } }//package Actions
Section 7
//ACT_EXTHIDE (Actions.ACT_EXTHIDE) package Actions { import RunLoop.*; import Objects.*; public class ACT_EXTHIDE extends CAct { override public function execute(_arg1:CRun):void{ var _local2:CObject = _arg1.rhEvtProg.get_ActionObjects(this); if (_local2 == null){ return; }; CRun.objectHide(_local2); } } }//package Actions
Section 8
//ACT_EXTMOVEBEFORE (Actions.ACT_EXTMOVEBEFORE) package Actions { import RunLoop.*; import Objects.*; import Params.*; import Sprites.*; public class ACT_EXTMOVEBEFORE extends CAct { override public function execute(_arg1:CRun):void{ var _local3:CObject; var _local4:int; var _local5:int; var _local2:CObject = _arg1.rhEvtProg.get_ActionObjects(this); if (_local2 == null){ return; }; if (_local2.ros != null){ _local3 = _arg1.rhEvtProg.get_ParamActionObjects(PARAM_OBJECT(evtParams[0]).oiList, this); if (_local3 == null){ return; }; _local4 = _local3.getChildIndex(); _local5 = _local2.getChildIndex(); if (_local4 < _local5){ _local2.setChildIndex(_local4); }; }; } } }//package Actions
Section 9
//ACT_EXTSETALPHACOEF (Actions.ACT_EXTSETALPHACOEF) package Actions { import Services.*; import RunLoop.*; import Objects.*; import Params.*; import Sprites.*; public class ACT_EXTSETALPHACOEF extends CAct { override public function execute(_arg1:CRun):void{ var _local2:CObject = _arg1.rhEvtProg.get_ActionObjects(this); if (_local2 == null){ return; }; if (_local2.ros == null){ return; }; var _local3:int = CServices.clamp((0xFF - _arg1.get_EventExpressionInt(CParamExpression(evtParams[0]))), 0, 0xFF); var _local4 = ((_local2.ros.rsEffect & CRSpr.BOP_RGBAFILTER) == 0); _local2.ros.rsEffect = ((_local2.ros.rsEffect & CRSpr.BOP_MASK) | CRSpr.BOP_RGBAFILTER); var _local5 = 0xFFFFFF; if (!_local4){ _local5 = _local2.ros.rsEffectParam; }; var _local6 = (_local3 << 24); var _local7 = (_local5 & 0xFFFFFF); _local2.ros.rsEffectParam = (_local6 | _local7); _local2.ros.modifSpriteEffect(_local2.ros.rsEffect, _local2.ros.rsEffectParam); } } }//package Actions
Section 10
//ACT_EXTSETDIR (Actions.ACT_EXTSETDIR) package Actions { import RunLoop.*; import Objects.*; import Params.*; public class ACT_EXTSETDIR extends CAct { override public function execute(_arg1:CRun):void{ var _local3:int; var _local2:CObject = _arg1.rhEvtProg.get_ActionObjects(this); if (_local2 == null){ return; }; if (evtParams[0].code == 29){ _local3 = _arg1.get_Direction(PARAM_INT(evtParams[0]).value); } else { _local3 = _arg1.get_EventExpressionInt(CParamExpression(evtParams[0])); }; _local3 = (_local3 & 31); if (_local2.roc.rcDir != _local3){ _local2.roc.rcDir = _local3; _local2.roc.rcChanged = true; _local2.rom.rmMovement.setDir(_local3); if (_local2.hoType == 2){ _local2.roa.animIn(0); }; }; } } }//package Actions
Section 11
//ACT_EXTSETEFFECT (Actions.ACT_EXTSETEFFECT) package Actions { import RunLoop.*; import Objects.*; import Params.*; import Sprites.*; public class ACT_EXTSETEFFECT extends CAct { override public function execute(_arg1:CRun):void{ var _local2:CObject = _arg1.rhEvtProg.get_ActionObjects(this); if (_local2 == null){ return; }; var _local3:String = PARAM_STRING(evtParams[0]).string; var _local4:int = CRSpr.BOP_COPY; if (((!((_local3 == null))) && (!((_local3.length == 0))))){ if (_local3 == "Add"){ _local4 = CRSpr.BOP_ADD; } else { if (_local3 == "Invert"){ _local4 = CRSpr.BOP_INVERT; } else { if (_local3 == "Sub"){ _local4 = CRSpr.BOP_SUB; } else { if (_local3 == "Mono"){ _local4 = CRSpr.BOP_MONO; } else { if (_local3 == "Blend"){ _local4 = CRSpr.BOP_BLEND; } else { if (_local3 == "XOR"){ _local4 = CRSpr.BOP_XOR; } else { if (_local3 == "OR"){ _local4 = CRSpr.BOP_OR; } else { if (_local3 == "AND"){ _local4 = CRSpr.BOP_AND; }; }; }; }; }; }; }; }; }; _local2.ros.modifSpriteEffect(_local4, _local2.ros.rsEffectParam); } } }//package Actions
Section 12
//ACT_EXTSETFLAG (Actions.ACT_EXTSETFLAG) package Actions { import RunLoop.*; import Objects.*; import Params.*; public class ACT_EXTSETFLAG extends CAct { override public function execute(_arg1:CRun):void{ var _local3:int; var _local2:CObject = _arg1.rhEvtProg.get_ActionObjects(this); if (_local2 == null){ return; }; if (_local2.rov != null){ _local3 = _arg1.get_EventExpressionInt(CParamExpression(evtParams[0])); _local2.rov.rvValueFlags = (_local2.rov.rvValueFlags | (1 << _local3)); }; } } }//package Actions
Section 13
//ACT_EXTSETPOS (Actions.ACT_EXTSETPOS) package Actions { import RunLoop.*; import Objects.*; import Params.*; public class ACT_EXTSETPOS extends CAct { override public function execute(_arg1:CRun):void{ var _local5:int; var _local2:CObject = _arg1.rhEvtProg.get_ActionObjects(this); if (_local2 == null){ return; }; var _local3:CPosition = CPosition(evtParams[0]); var _local4:CPositionInfo = new CPositionInfo(); if (_local3.read_Position(_arg1, 1, _local4)){ CRun.setXPosition(_local2, _local4.x); CRun.setYPosition(_local2, _local4.y); if (_local4.dir != -1){ _local5 = (_local4.dir = (_local4.dir & 31)); if (_local2.roc.rcDir != _local5){ _local2.roc.rcDir = _local5; _local2.roc.rcChanged = true; _local2.rom.rmMovement.setDir(_local5); if (_local2.hoType == 2){ _local2.roa.animIn(0); }; }; }; }; } } }//package Actions
Section 14
//ACT_EXTSETRGBCOEF (Actions.ACT_EXTSETRGBCOEF) package Actions { import Services.*; import RunLoop.*; import Objects.*; import Params.*; import Sprites.*; public class ACT_EXTSETRGBCOEF extends CAct { override public function execute(_arg1:CRun):void{ var _local6:int; var _local2:CObject = _arg1.rhEvtProg.get_ActionObjects(this); if (_local2 == null){ return; }; if (_local2.ros == null){ return; }; var _local3:int = _arg1.get_EventExpressionInt(CParamExpression(evtParams[0])); var _local4 = ((_local2.ros.rsEffect & CRSpr.BOP_RGBAFILTER) == 0); _local2.ros.rsEffect = ((_local2.ros.rsEffect & CRSpr.BOP_MASK) | CRSpr.BOP_RGBAFILTER); var _local5:int = _local2.ros.rsEffectParam; if (_local4){ if (_local2.ros.rsEffectParam == -1){ _local6 = 4278190080; } else { _local6 = ((0xFF - (_local2.ros.rsEffectParam * 2)) << 24); }; } else { _local6 = (_local5 & 4278190080); }; var _local7:int = CServices.swapRGB((_local3 & 0xFFFFFF)); var _local8 = (_local6 | _local7); _local2.ros.rsEffectParam = _local8; _local2.ros.modifSpriteEffect(_local2.ros.rsEffect, _local2.ros.rsEffectParam); } } }//package Actions
Section 15
//ACT_EXTSETVAR (Actions.ACT_EXTSETVAR) package Actions { import Expressions.*; import RunLoop.*; import Objects.*; import Params.*; import Values.*; public class ACT_EXTSETVAR extends CAct { override public function execute(_arg1:CRun):void{ var _local3:int; var _local4:CValue; var _local2:CObject = _arg1.rhEvtProg.get_ActionObjects(this); if (_local2 == null){ return; }; if (evtParams[0].code == 53){ _local3 = _arg1.get_EventExpressionInt(CParamExpression(evtParams[0])); } else { _local3 = PARAM_SHORT(evtParams[0]).value; }; if ((((_local3 >= 0)) && ((_local3 < CRVal.VALUES_NUMBEROF_ALTERABLE)))){ if (_local2.rov != null){ _local4 = _arg1.get_EventExpressionAny(CParamExpression(evtParams[1])); _local2.rov.getValue(_local3).forceValue(_local4); }; }; } } }//package Actions
Section 16
//ACT_EXTSETX (Actions.ACT_EXTSETX) package Actions { import RunLoop.*; import Objects.*; import Params.*; public class ACT_EXTSETX extends CAct { override public function execute(_arg1:CRun):void{ var _local2:CObject = _arg1.rhEvtProg.get_ActionObjects(this); if (_local2 == null){ return; }; var _local3:int = _arg1.get_EventExpressionInt(CParamExpression(evtParams[0])); CRun.setXPosition(_local2, _local3); } } }//package Actions
Section 17
//ACT_EXTSETY (Actions.ACT_EXTSETY) package Actions { import RunLoop.*; import Objects.*; import Params.*; public class ACT_EXTSETY extends CAct { override public function execute(_arg1:CRun):void{ var _local2:CObject = _arg1.rhEvtProg.get_ActionObjects(this); if (_local2 == null){ return; }; var _local3:int = _arg1.get_EventExpressionInt(CParamExpression(evtParams[0])); CRun.setYPosition(_local2, _local3); } } }//package Actions
Section 18
//ACT_EXTSHOW (Actions.ACT_EXTSHOW) package Actions { import RunLoop.*; import Objects.*; public class ACT_EXTSHOW extends CAct { override public function execute(_arg1:CRun):void{ var _local2:CObject = _arg1.rhEvtProg.get_ActionObjects(this); if (_local2 == null){ return; }; CRun.objectShow(_local2); } } }//package Actions
Section 19
//ACT_EXTSPRFRONT (Actions.ACT_EXTSPRFRONT) package Actions { import RunLoop.*; import Objects.*; public class ACT_EXTSPRFRONT extends CAct { override public function execute(_arg1:CRun):void{ var _local2:CObject = _arg1.rhEvtProg.get_ActionObjects(this); if (_local2 == null){ return; }; var _local3:int = _local2.getChildMaxIndex(); _local2.setChildIndex(_local3); } } }//package Actions
Section 20
//ACT_EXTSTARTANIM (Actions.ACT_EXTSTARTANIM) package Actions { import RunLoop.*; import Objects.*; public class ACT_EXTSTARTANIM extends CAct { override public function execute(_arg1:CRun):void{ var _local2:CObject = _arg1.rhEvtProg.get_ActionObjects(this); if (_local2 == null){ return; }; _local2.roa.raAnimStopped = false; } } }//package Actions
Section 21
//ACT_EXTSTOPANIM (Actions.ACT_EXTSTOPANIM) package Actions { import RunLoop.*; import Objects.*; public class ACT_EXTSTOPANIM extends CAct { override public function execute(_arg1:CRun):void{ var _local2:CObject = _arg1.rhEvtProg.get_ActionObjects(this); if (_local2 == null){ return; }; _local2.roa.raAnimStopped = true; } } }//package Actions
Section 22
//ACT_EXTSUBVAR (Actions.ACT_EXTSUBVAR) package Actions { import Expressions.*; import RunLoop.*; import Objects.*; import Params.*; import Values.*; public class ACT_EXTSUBVAR extends CAct { override public function execute(_arg1:CRun):void{ var _local3:int; var _local4:CValue; var _local2:CObject = _arg1.rhEvtProg.get_ActionObjects(this); if (_local2 == null){ return; }; if (evtParams[0].code == 53){ _local3 = _arg1.get_EventExpressionInt(CParamExpression(evtParams[0])); } else { _local3 = PARAM_SHORT(evtParams[0]).value; }; if ((((_local3 >= 0)) && ((_local3 < CRVal.VALUES_NUMBEROF_ALTERABLE)))){ if (_local2.rov != null){ _local4 = _arg1.get_EventExpressionAny(CParamExpression(evtParams[1])); _local2.rov.getValue(_local3).sub(_local4); }; }; } } }//package Actions
Section 23
//ACT_GOLEVEL (Actions.ACT_GOLEVEL) package Actions { import RunLoop.*; import Params.*; public class ACT_GOLEVEL extends CAct { override public function execute(_arg1:CRun):void{ var _local2:int; if (evtParams[0].code == 26){ _local2 = PARAM_SHORT(evtParams[0]).value; if (_arg1.rhApp.HCellToNCell(_local2) == -1){ return; }; } else { _local2 = (_arg1.get_EventExpressionInt(CParamExpression(evtParams[0])) - 1); if ((((_local2 < 0)) || ((_local2 >= 0x1000)))){ return; }; if (_arg1.rhApp.bShiftFrameNumber){ _local2++; }; _local2 = (_local2 | 0x8000); }; _arg1.rhQuit = CRun.LOOPEXIT_GOTOLEVEL; _arg1.rhQuitParam = _local2; } } }//package Actions
Section 24
//ACT_GRPACTIVATE (Actions.ACT_GRPACTIVATE) package Actions { import RunLoop.*; import Params.*; import Events.*; public class ACT_GRPACTIVATE extends CAct { public function grpActivate(_arg1:CRun, _arg2:int):int{ var _local6:int; var _local3:CEventGroup = _arg1.rhEvtProg.events[_arg2]; var _local4:CEvent = _local3.evgEvents[0]; var _local5:PARAM_GROUP = PARAM_GROUP(_local4.evtParams[0]); var _local7:Boolean; if ((_local5.grpFlags & PARAM_GROUP.GRPFLAGS_PARENTINACTIVE) == 0){ _local3.evgFlags = (_local3.evgFlags & ~(CEventGroup.EVGFLAGS_INACTIVE)); _arg2++; _local7 = false; _local6 = 1; while (true) { _local3 = _arg1.rhEvtProg.events[_arg2]; _local4 = _local3.evgEvents[0]; switch (_local4.evtCode){ case ((-10 << 16) | 0xFFFF): _local5 = PARAM_GROUP(_local4.evtParams[0]); if (_local6 == 1){ _local5.grpFlags = (_local5.grpFlags & ~(PARAM_GROUP.GRPFLAGS_PARENTINACTIVE)); }; if ((_local5.grpFlags & PARAM_GROUP.GRPFLAGS_GROUPINACTIVE) == 0){ _arg2 = grpActivate(_arg1, _arg2); continue; } else { _local6++; }; break; case ((-11 << 16) | 0xFFFF): --_local6; if (_local6 == 0){ _local3.evgFlags = (_local3.evgFlags & ~(CEventGroup.EVGFLAGS_INACTIVE)); _local7 = true; _arg2++; }; break; case ((-23 << 16) | 0xFFFF): if (_local6 == 1){ _local3.evgFlags = (_local3.evgFlags & ~(CEventGroup.EVGFLAGS_INACTIVE)); _local3.evgFlags = (_local3.evgFlags & ~(CEventGroup.EVGFLAGS_ONCE)); }; break; default: if (_local6 == 1){ _local3.evgFlags = (_local3.evgFlags & ~(CEventGroup.EVGFLAGS_INACTIVE)); }; break; }; if (_local7){ break; }; _arg2++; }; } else { _arg2++; _local7 = false; _local6 = 1; while (true) { _local3 = _arg1.rhEvtProg.events[_arg2]; _local4 = _local3.evgEvents[0]; switch (_local4.evtCode){ case ((-10 << 16) | 0xFFFF): _local6++; break; case ((-11 << 16) | 0xFFFF): --_local6; if (_local6 == 0){ _local7 = true; _arg2++; }; break; }; if (_local7){ break; }; _arg2++; }; }; return (_arg2); } override public function execute(_arg1:CRun):void{ var _local7:Boolean; var _local2:PARAM_GROUPOINTER = PARAM_GROUPOINTER(evtParams[0]); var _local3:int = _local2.pointer; var _local4:CEventGroup = _arg1.rhEvtProg.events[_local3]; var _local5:CEvent = _local4.evgEvents[0]; var _local6:PARAM_GROUP = PARAM_GROUP(_local5.evtParams[0]); _local7 = !(((_local6.grpFlags & PARAM_GROUP.GRPFLAGS_GROUPINACTIVE) == 0)); _local6.grpFlags = (_local6.grpFlags & ~(PARAM_GROUP.GRPFLAGS_GROUPINACTIVE)); if (_local7){ grpActivate(_arg1, _local3); }; } } }//package Actions
Section 25
//ACT_GRPDEACTIVATE (Actions.ACT_GRPDEACTIVATE) package Actions { import RunLoop.*; import Params.*; import Events.*; public class ACT_GRPDEACTIVATE extends CAct { public function grpDeactivate(_arg1:CRun, _arg2:int):int{ var _local6:int; var _local7:Boolean; var _local8:Boolean; var _local3:CEventGroup = _arg1.rhEvtProg.events[_arg2]; var _local4:CEvent = _local3.evgEvents[0]; var _local5:PARAM_GROUP = PARAM_GROUP(_local4.evtParams[0]); _local3.evgFlags = (_local3.evgFlags | CEventGroup.EVGFLAGS_INACTIVE); _arg2++; _local7 = false; _local6 = 1; while (true) { _local3 = _arg1.rhEvtProg.events[_arg2]; _local4 = _local3.evgEvents[0]; switch (_local4.evtCode){ case ((-10 << 16) | 0xFFFF): _local5 = PARAM_GROUP(_local4.evtParams[0]); _local8 = ((_local5.grpFlags & PARAM_GROUP.GRPFLAGS_PARENTINACTIVE) == 0); if (_local6 == 1){ _local5.grpFlags = (_local5.grpFlags | PARAM_GROUP.GRPFLAGS_PARENTINACTIVE); }; if (((!((_local8 == false))) && (((_local5.grpFlags & PARAM_GROUP.GRPFLAGS_GROUPINACTIVE) == 0)))){ _arg2 = grpDeactivate(_arg1, _arg2); continue; } else { _local6++; }; break; case ((-11 << 16) | 0xFFFF): --_local6; if (_local6 == 0){ _local3.evgFlags = (_local3.evgFlags | CEventGroup.EVGFLAGS_INACTIVE); _local7 = true; _arg2++; }; break; default: if (_local6 == 1){ _local3.evgFlags = (_local3.evgFlags | CEventGroup.EVGFLAGS_INACTIVE); }; break; }; if (_local7){ break; }; _arg2++; }; return (_arg2); } override public function execute(_arg1:CRun):void{ var _local7:Boolean; var _local2:PARAM_GROUPOINTER = PARAM_GROUPOINTER(evtParams[0]); var _local3:int = _local2.pointer; var _local4:CEventGroup = _arg1.rhEvtProg.events[_local3]; var _local5:CEvent = _local4.evgEvents[0]; var _local6:PARAM_GROUP = PARAM_GROUP(_local5.evtParams[0]); _local7 = ((_local6.grpFlags & PARAM_GROUP.GRPFLAGS_GROUPINACTIVE) == 0); _local6.grpFlags = (_local6.grpFlags | PARAM_GROUP.GRPFLAGS_GROUPINACTIVE); if ((((_local7 == true)) && (((_local6.grpFlags & PARAM_GROUP.GRPFLAGS_PARENTINACTIVE) == 0)))){ grpDeactivate(_arg1, _local3); }; } } }//package Actions
Section 26
//ACT_PLAYLOOPSAMPLE (Actions.ACT_PLAYLOOPSAMPLE) package Actions { import RunLoop.*; import Params.*; public class ACT_PLAYLOOPSAMPLE extends CAct { override public function execute(_arg1:CRun):void{ var _local2:PARAM_SAMPLE = PARAM_SAMPLE(evtParams[0]); var _local3:int = _arg1.get_EventExpressionInt(CParamExpression(evtParams[1])); var _local4 = !(((_local2.sndFlags & PARAM_SAMPLE.PSOUNDFLAG_UNINTERRUPTABLE) == 0)); _arg1.rhApp.soundPlayer.play(_local2.sndHandle, _local3, -1, _local4); } } }//package Actions
Section 27
//ACT_PLAYSAMPLE (Actions.ACT_PLAYSAMPLE) package Actions { import RunLoop.*; import Params.*; public class ACT_PLAYSAMPLE extends CAct { override public function execute(_arg1:CRun):void{ var _local2:PARAM_SAMPLE = PARAM_SAMPLE(evtParams[0]); var _local3 = !(((_local2.sndFlags & PARAM_SAMPLE.PSOUNDFLAG_UNINTERRUPTABLE) == 0)); _arg1.rhApp.soundPlayer.play(_local2.sndHandle, 1, -1, _local3); } } }//package Actions
Section 28
//ACT_SETFRAMEALPHACOEF (Actions.ACT_SETFRAMEALPHACOEF) package Actions { import Application.*; import Services.*; import RunLoop.*; import Params.*; import Sprites.*; public class ACT_SETFRAMEALPHACOEF extends CAct { override public function execute(_arg1:CRun):void{ var _local2:int = CServices.clamp((0xFF - _arg1.get_EventExpressionInt(CParamExpression(evtParams[0]))), 0, 0xFF); var _local3 = ((_arg1.rhApp.effect & CRSpr.BOP_RGBAFILTER) == 0); _arg1.rhApp.effect = ((_arg1.rhApp.effect & CRSpr.BOP_MASK) | CRSpr.BOP_RGBAFILTER); var _local4 = 0xFFFFFF; if (!_local3){ _local4 = _arg1.rhApp.effectParam; }; var _local5 = (_local2 << 24); var _local6 = (_local4 & 0xFFFFFF); _arg1.rhApp.effectParam = (_local5 | _local6); _arg1.rhApp.setEffect(_arg1.rhApp.effect, _arg1.rhApp.effectParam); } } }//package Actions
Section 29
//ACT_SETFRAMEEFFECT (Actions.ACT_SETFRAMEEFFECT) package Actions { import Application.*; import RunLoop.*; import Objects.*; import Params.*; import Sprites.*; public class ACT_SETFRAMEEFFECT extends CAct { override public function execute(_arg1:CRun):void{ var _local2:String = PARAM_STRING(evtParams[0]).string; var _local3:int = CRSpr.BOP_COPY; if (((!((_local2 == null))) && (!((_local2.length == 0))))){ if (_local2 == "Add"){ _local3 = CRSpr.BOP_ADD; } else { if (_local2 == "Invert"){ _local3 = CRSpr.BOP_INVERT; } else { if (_local2 == "Sub"){ _local3 = CRSpr.BOP_SUB; } else { if (_local2 == "Mono"){ _local3 = CRSpr.BOP_MONO; } else { if (_local2 == "Blend"){ _local3 = CRSpr.BOP_BLEND; } else { if (_local2 == "XOR"){ _local3 = CRSpr.BOP_XOR; } else { if (_local2 == "OR"){ _local3 = CRSpr.BOP_OR; } else { if (_local2 == "AND"){ _local3 = CRSpr.BOP_AND; }; }; }; }; }; }; }; }; }; _arg1.rhApp.effect = (_arg1.rhApp.effect & ~(CRSpr.BOP_MASK)); _arg1.rhApp.effect = (_arg1.rhApp.effect | _local3); _arg1.rhApp.setEffect(_arg1.rhApp.effect, _arg1.rhApp.effectParam); } } }//package Actions
Section 30
//ACT_SETFRAMERGBCOEF (Actions.ACT_SETFRAMERGBCOEF) package Actions { import Application.*; import Services.*; import RunLoop.*; import Params.*; import Sprites.*; public class ACT_SETFRAMERGBCOEF extends CAct { override public function execute(_arg1:CRun):void{ var _local5:int; var _local2:int = _arg1.get_EventExpressionInt(CParamExpression(evtParams[0])); var _local3 = ((_arg1.rhApp.effect & CRSpr.BOP_RGBAFILTER) == 0); _arg1.rhApp.effect = ((_arg1.rhApp.effect & CRSpr.BOP_MASK) | CRSpr.BOP_RGBAFILTER); var _local4:int = _arg1.rhApp.effectParam; if (_local3){ if (_arg1.rhApp.effectParam == -1){ _local5 = 4278190080; } else { _local5 = ((0xFF - (_arg1.rhApp.effectParam * 2)) << 24); }; } else { _local5 = (_local4 & 4278190080); }; var _local6:int = CServices.swapRGB((_local2 & 0xFFFFFF)); var _local7 = (_local5 | _local6); _arg1.rhApp.effectParam = _local7; _arg1.rhApp.setEffect(_arg1.rhApp.effect, _arg1.rhApp.effectParam); } } }//package Actions
Section 31
//ACT_SETFRAMEWIDTH (Actions.ACT_SETFRAMEWIDTH) package Actions { import RunLoop.*; import Params.*; public class ACT_SETFRAMEWIDTH extends CAct { override public function execute(_arg1:CRun):void{ var _local4:int; var _local2:int = _arg1.get_EventExpressionInt(CParamExpression(evtParams[0])); var _local3:int = _arg1.rhFrame.leWidth; _arg1.rhFrame.leWidth = _local2; if (_local3 == _arg1.rhFrame.leVirtualRect.right){ _arg1.rhFrame.leVirtualRect.right = (_arg1.rhLevelSx = _local2); }; _local4 = 0; while (_local4 < _arg1.rhFrame.nLayers) { _arg1.rhFrame.layers[_local4].resetLevelBackground(); _local4++; }; _arg1.drawLevel(); } } }//package Actions
Section 32
//ACT_SETSAMPLEMAINPAN (Actions.ACT_SETSAMPLEMAINPAN) package Actions { import RunLoop.*; import Params.*; public class ACT_SETSAMPLEMAINPAN extends CAct { override public function execute(_arg1:CRun):void{ var _local2:int = _arg1.get_EventExpressionInt(CParamExpression(evtParams[0])); if ((((_local2 >= -100)) && ((_local2 <= 100)))){ _arg1.rhApp.soundPlayer.setMainPan((Number(_local2) / 100)); }; } } }//package Actions
Section 33
//ACT_SETSAMPLEMAINVOL (Actions.ACT_SETSAMPLEMAINVOL) package Actions { import RunLoop.*; import Params.*; public class ACT_SETSAMPLEMAINVOL extends CAct { override public function execute(_arg1:CRun):void{ var _local2:int = _arg1.get_EventExpressionInt(CParamExpression(evtParams[0])); if ((((_local2 >= 0)) && ((_local2 <= 100)))){ _arg1.rhApp.soundPlayer.setMainVolume((Number(_local2) / 100)); }; } } }//package Actions
Section 34
//ACT_SETVARG (Actions.ACT_SETVARG) package Actions { import Expressions.*; import RunLoop.*; import Params.*; public class ACT_SETVARG extends CAct { override public function execute(_arg1:CRun):void{ var _local2:int; if (evtParams[0].code == 52){ _local2 = (_arg1.get_EventExpressionInt(CParamExpression(evtParams[0])) - 1); } else { _local2 = PARAM_SHORT(evtParams[0]).value; }; var _local3:CValue = _arg1.get_EventExpressionAny(CParamExpression(evtParams[1])); _arg1.rhApp.setGlobalValueAt(_local2, _local3); } } }//package Actions
Section 35
//ACT_SKIP (Actions.ACT_SKIP) package Actions { import RunLoop.*; public class ACT_SKIP extends CAct { override public function execute(_arg1:CRun):void{ } } }//package Actions
Section 36
//ACT_STOPSAMPLE (Actions.ACT_STOPSAMPLE) package Actions { import RunLoop.*; public class ACT_STOPSAMPLE extends CAct { override public function execute(_arg1:CRun):void{ _arg1.rhApp.soundPlayer.stopAllSounds(); } } }//package Actions
Section 37
//ACT_STOPSPESAMPLE (Actions.ACT_STOPSPESAMPLE) package Actions { import RunLoop.*; import Params.*; public class ACT_STOPSPESAMPLE extends CAct { override public function execute(_arg1:CRun):void{ var _local2:PARAM_SAMPLE = PARAM_SAMPLE(evtParams[0]); _arg1.rhApp.soundPlayer.stop(_local2.sndHandle); } } }//package Actions
Section 38
//CAct (Actions.CAct) package Actions { import Application.*; import RunLoop.*; import Params.*; import Events.*; public class CAct extends CEvent { public static var ACTFLAGS_REPEAT:int = 1; public function execute(_arg1:CRun):void{ } public static function create(_arg1:CRunApp):CAct{ var _local6:int; var _local2:int = _arg1.file.getFilePointer(); var _local3:int = _arg1.file.readAShort(); var _local4:CAct; var _local5:int = _arg1.file.readAInt(); switch (_local5){ case ((0 << 16) | 0xFFFF): _local4 = new ACT_SKIP(); break; case ((1 << 16) | 0xFFFF): break; case ((3 << 16) | 0xFFFF): _local4 = new ACT_SETVARG(); break; case ((4 << 16) | 0xFFFF): break; case ((5 << 16) | 0xFFFF): break; case ((6 << 16) | 0xFFFF): _local4 = new ACT_GRPACTIVATE(); break; case ((7 << 16) | 0xFFFF): _local4 = new ACT_GRPDEACTIVATE(); break; case ((14 << 16) | 0xFFFF): break; case ((15 << 16) | 0xFFFF): break; case ((16 << 16) | 0xFFFF): break; case ((17 << 16) | 0xFFFF): break; case ((19 << 16) | 0xFFFF): break; case ((23 << 16) | 0xFFFF): _local4 = new ACT_SKIP(); break; case ((24 << 16) | 0xFFFF): _local4 = new ACT_SKIP(); break; case ((0 << 16) | 65534): _local4 = new ACT_PLAYSAMPLE(); break; case ((1 << 16) | 65534): _local4 = new ACT_STOPSAMPLE(); break; case ((4 << 16) | 65534): _local4 = new ACT_PLAYLOOPSAMPLE(); break; case ((6 << 16) | 65534): _local4 = new ACT_STOPSPESAMPLE(); break; case ((7 << 16) | 65534): break; case ((8 << 16) | 65534): break; case ((11 << 16) | 65534): break; case ((12 << 16) | 65534): break; case ((13 << 16) | 65534): break; case ((14 << 16) | 65534): break; case ((15 << 16) | 65534): break; case ((16 << 16) | 65534): break; case ((17 << 16) | 65534): break; case ((18 << 16) | 65534): break; case ((19 << 16) | 65534): break; case ((20 << 16) | 65534): _local4 = new ACT_SETSAMPLEMAINVOL(); break; case ((21 << 16) | 65534): break; case ((22 << 16) | 65534): _local4 = new ACT_SETSAMPLEMAINPAN(); break; case ((23 << 16) | 65534): break; case ((24 << 16) | 65534): break; case ((25 << 16) | 65534): break; case ((30 << 16) | 65534): break; case ((31 << 16) | 65534): break; case ((0 << 16) | 65533): break; case ((1 << 16) | 65533): break; case ((2 << 16) | 65533): _local4 = new ACT_GOLEVEL(); break; case ((3 << 16) | 65533): break; case ((4 << 16) | 65533): break; case ((5 << 16) | 65533): break; case ((6 << 16) | 65533): break; case ((7 << 16) | 65533): break; case ((8 << 16) | 65533): _local4 = new ACT_CDISPLAYX(); break; case ((9 << 16) | 65533): break; case ((16 << 16) | 65533): break; case ((17 << 16) | 65533): break; case ((18 << 16) | 65533): break; case ((21 << 16) | 65533): break; case ((22 << 16) | 65533): break; case ((23 << 16) | 65533): break; case ((24 << 16) | 65533): break; case ((25 << 16) | 65533): break; case ((26 << 16) | 65533): _local4 = new ACT_SETFRAMEWIDTH(); break; case ((27 << 16) | 65533): break; case ((31 << 16) | 65533): break; case ((32 << 16) | 65533): _local4 = new ACT_SETFRAMEEFFECT(); break; case ((33 << 16) | 65533): _local4 = new ACT_SKIP(); break; case ((34 << 16) | 65533): _local4 = new ACT_SKIP(); break; case ((35 << 16) | 65533): _local4 = new ACT_SETFRAMEALPHACOEF(); break; case ((36 << 16) | 65533): _local4 = new ACT_SETFRAMERGBCOEF(); break; case ((0 << 16) | 65532): break; case ((0 << 16) | 65530): break; case ((1 << 16) | 65530): break; case ((0 << 16) | 65529): break; case ((1 << 16) | 65529): break; case ((2 << 16) | 65529): break; case ((3 << 16) | 65529): break; case ((4 << 16) | 65529): break; case ((5 << 16) | 65529): break; case ((6 << 16) | 65529): break; case ((7 << 16) | 65529): break; case ((8 << 16) | 65529): break; case ((9 << 16) | 65529): break; case ((10 << 16) | 65529): break; case ((0 << 16) | 65531): _local4 = new ACT_CREATE(); break; case (((80 + 0) << 16) | 3): break; case (((80 + 1) << 16) | 3): break; case (((80 + 2) << 16) | 3): break; case (((80 + 3) << 16) | 3): break; case (((80 + 4) << 16) | 3): break; case (((80 + 5) << 16) | 3): break; case (((80 + 6) << 16) | 3): break; case (((80 + 7) << 16) | 3): break; case (((80 + 8) << 16) | 3): break; case (((80 + 0) << 16) | 2): break; case (((80 + 1) << 16) | 2): break; case (((80 + 2) << 16) | 2): break; case (((80 + 3) << 16) | 2): break; case (((80 + 4) << 16) | 2): break; case (((80 + 5) << 16) | 2): break; case (((80 + 6) << 16) | 2): break; case (((80 + 7) << 16) | 2): break; case (((80 + 8) << 16) | 2): break; case (((80 + 0) << 16) | 7): break; case (((80 + 1) << 16) | 7): _local4 = new ACT_CADDVALUE(); break; case (((80 + 2) << 16) | 7): break; case (((80 + 3) << 16) | 7): break; case (((80 + 4) << 16) | 7): break; case (((80 + 5) << 16) | 7): break; case (((80 + 6) << 16) | 7): break; case (((80 + 0) << 16) | 4): break; case (((80 + 0) << 16) | 9): break; case (((80 + 1) << 16) | 9): break; case (((80 + 2) << 16) | 9): break; case (((80 + 3) << 16) | 9): break; case (((80 + 4) << 16) | 9): break; case (((80 + 6) << 16) | 9): break; case (((80 + 7) << 16) | 9): break; case (((80 + 8) << 16) | 9): break; case (((80 + 9) << 16) | 9): break; case (((80 + 10) << 16) | 9): break; case (((80 + 11) << 16) | 9): break; case (((80 + 12) << 16) | 9): break; default: switch ((_local5 & 4294901760)){ case (1 << 16): _local4 = new ACT_EXTSETPOS(); break; case (2 << 16): _local4 = new ACT_EXTSETX(); break; case (3 << 16): _local4 = new ACT_EXTSETY(); break; case (4 << 16): break; case (5 << 16): break; case (6 << 16): break; case (7 << 16): break; case (8 << 16): break; case (9 << 16): break; case (10 << 16): break; case (11 << 16): break; case (12 << 16): break; case (13 << 16): break; case (14 << 16): break; case (15 << 16): _local4 = new ACT_EXTSTOPANIM(); break; case (16 << 16): _local4 = new ACT_EXTSTARTANIM(); break; case (17 << 16): _local4 = new ACT_EXTFORCEANIM(); break; case (18 << 16): break; case (19 << 16): break; case (20 << 16): break; case (21 << 16): break; case (22 << 16): break; case (23 << 16): _local4 = new ACT_EXTSETDIR(); break; case (24 << 16): _local4 = new ACT_EXTDESTROY(); break; case (25 << 16): break; case (26 << 16): _local4 = new ACT_EXTHIDE(); break; case (27 << 16): _local4 = new ACT_EXTSHOW(); break; case (28 << 16): break; case (29 << 16): break; case (30 << 16): break; case (31 << 16): _local4 = new ACT_EXTSETVAR(); break; case (32 << 16): break; case (33 << 16): _local4 = new ACT_EXTSUBVAR(); break; case (34 << 16): break; case (35 << 16): _local4 = new ACT_EXTSETFLAG(); break; case (36 << 16): break; case (37 << 16): _local4 = new ACT_EXTCHGFLAG(); break; case (38 << 16): break; case (39 << 16): break; case (40 << 16): break; case (41 << 16): break; case (42 << 16): break; case (43 << 16): break; case (44 << 16): break; case (45 << 16): break; case (46 << 16): break; case (47 << 16): break; case (48 << 16): break; case (49 << 16): break; case (50 << 16): break; case (51 << 16): break; case (52 << 16): break; case (53 << 16): break; case (54 << 16): break; case (55 << 16): break; case (56 << 16): break; case (57 << 16): _local4 = new ACT_EXTSPRFRONT(); break; case (58 << 16): break; case (59 << 16): _local4 = new ACT_EXTMOVEBEFORE(); break; case (60 << 16): break; case (61 << 16): break; case (62 << 16): _local4 = new ACT_SKIP(); break; case (63 << 16): _local4 = new ACT_EXTSETEFFECT(); break; case (64 << 16): _local4 = new ACT_SKIP(); break; case (65 << 16): _local4 = new ACT_EXTSETALPHACOEF(); break; case (66 << 16): _local4 = new ACT_EXTSETRGBCOEF(); break; case (67 << 16): _local4 = new ACT_SKIP(); break; default: _local4 = new CActExtension(); break; }; }; if (_local4 != null){ _local4.evtCode = _local5; _local4.evtOi = _arg1.file.readShort(); _local4.evtOiList = _arg1.file.readShort(); _local4.evtFlags = _arg1.file.readAByte(); _local4.evtFlags2 = _arg1.file.readAByte(); _local4.evtNParams = _arg1.file.readAByte(); _local4.evtDefType = _arg1.file.readAByte(); if (_local4.evtNParams > 0){ _local4.evtParams = new Array(_local4.evtNParams); _local6 = 0; while (_local6 < _local4.evtNParams) { _local4.evtParams[_local6] = CParam.create(_arg1); _local6++; }; }; } else { trace("*** Missing action!"); }; _arg1.file.seek((_local2 + _local3)); return (_local4); } } }//package Actions
Section 39
//CActExtension (Actions.CActExtension) package Actions { import Services.*; import Expressions.*; import RunLoop.*; import Objects.*; import Params.*; import Events.*; public class CActExtension extends CAct { public function getParamJoyDirection(_arg1:CRun, _arg2:int):int{ return (PARAM_SHORT(evtParams[_arg2]).value); } public function getParamColour(_arg1:CRun, _arg2:int):int{ if (evtParams[_arg2].code == 24){ return (PARAM_COLOUR(evtParams[_arg2]).color); }; return (CServices.swapRGB(_arg1.get_EventExpressionInt(CParamExpression(evtParams[_arg2])))); } public function getParamEvery(_arg1:CRun, _arg2:int):PARAM_EVERY{ return (PARAM_EVERY(evtParams[_arg2])); } public function getParamExpDouble(_arg1:CRun, _arg2:int):Number{ var _local3:CValue = _arg1.get_EventExpressionAny(CParamExpression(evtParams[_arg2])); return (_local3.getDouble()); } public function getParamKey(_arg1:CRun, _arg2:int):int{ return (PARAM_KEY(evtParams[_arg2]).key); } public function getParamTime(_arg1:CRun, _arg2:int):int{ if (evtParams[_arg2].code == 2){ return (PARAM_TIME(evtParams[_arg2]).timer); }; return (_arg1.get_EventExpressionInt(CParamExpression(evtParams[_arg2]))); } public function getParamShoot(_arg1:CRun, _arg2:int):PARAM_SHOOT{ return (PARAM_SHOOT(evtParams[_arg2])); } public function getParamFrame(_arg1:CRun, _arg2:int):int{ return (PARAM_SHORT(evtParams[_arg2]).value); } public function getParamEffect(_arg1:CRun, _arg2:int):String{ return (PARAM_STRING(evtParams[_arg2]).string); } public function getParamPlayer(_arg1:CRun, _arg2:int):int{ return (PARAM_SHORT(evtParams[_arg2]).value); } public function getParamExpression(_arg1:CRun, _arg2:int):int{ return (_arg1.get_EventExpressionInt(CParamExpression(evtParams[_arg2]))); } public function getParamPosition(_arg1:CRun, _arg2:int):CPositionInfo{ var _local3:CPosition = CPosition(evtParams[_arg2]); var _local4:CPositionInfo = new CPositionInfo(); _local3.read_Position(_arg1, 0, _local4); return (_local4); } public function getParamBorder(_arg1:CRun, _arg2:int):int{ return (PARAM_SHORT(evtParams[_arg2]).value); } public function getParamShort(_arg1:CRun, _arg2:int):int{ return (PARAM_SHORT(evtParams[_arg2]).value); } public function getParamDirection(_arg1:CRun, _arg2:int):int{ return (PARAM_SHORT(evtParams[_arg2]).value); } public function getParamZone(_arg1:CRun, _arg2:int):PARAM_ZONE{ return (PARAM_ZONE(evtParams[_arg2])); } public function getParamAnimation(_arg1:CRun, _arg2:int):int{ if (evtParams[_arg2].code == 10){ return (PARAM_SHORT(evtParams[_arg2]).value); }; return (_arg1.get_EventExpressionInt(CParamExpression(evtParams[_arg2]))); } public function getParamExtension(_arg1:CRun, _arg2:int):CBinaryFile{ var _local3:PARAM_EXTENSION = PARAM_EXTENSION(evtParams[_arg2]); if (_local3.data != null){ return (new CBinaryFile(_local3.data, _arg1.rhApp.bUnicode)); }; return (null); } public function getParamSpeed(_arg1:CRun, _arg2:int):int{ return (_arg1.get_EventExpressionInt(CParamExpression(evtParams[_arg2]))); } public function getParamClick(_arg1:CRun, _arg2:int):int{ return (PARAM_SHORT(evtParams[_arg2]).value); } public function getParamCreate(_arg1:CRun, _arg2:int):PARAM_CREATE{ return (PARAM_CREATE(evtParams[_arg2])); } public function getParamFilename2(_arg1:CRun, _arg2:int):String{ if (evtParams[_arg2].code == 63){ return (PARAM_STRING(evtParams[_arg2]).string); }; return (_arg1.get_EventExpressionString(CParamExpression(evtParams[_arg2]))); } override public function execute(_arg1:CRun):void{ var _local2:CObject = _arg1.rhEvtProg.get_ActionObjects(this); if (_local2 == null){ return; }; var _local3:int = ((evtCode >>> 16) - CEventProgram.EVENTS_EXTBASE); var _local4:CExtension = CExtension(_local2); _local4.action(_local3, this); } public function getParamNewDirection(_arg1:CRun, _arg2:int):int{ if (evtParams[_arg2].code == 29){ return (PARAM_SHORT(evtParams[_arg2]).value); }; return (_arg1.get_EventExpressionInt(CParamExpression(evtParams[_arg2]))); } public function getParamExpString(_arg1:CRun, _arg2:int):String{ return (_arg1.get_EventExpressionString(CParamExpression(evtParams[_arg2]))); } public function getParamObject(_arg1:CRun, _arg2:int):CObject{ return (_arg1.rhEvtProg.get_ParamActionObjects(PARAM_OBJECT(evtParams[_arg2]).oiList, this)); } public function getParamFilename(_arg1:CRun, _arg2:int):String{ if (evtParams[_arg2].code == 40){ return (PARAM_STRING(evtParams[_arg2]).string); }; return (_arg1.get_EventExpressionString(CParamExpression(evtParams[_arg2]))); } public function getParamAltValue(_arg1:CRun, _arg2:int):int{ return (PARAM_SHORT(evtParams[_arg2]).value); } } }//package Actions
Section 40
//CAnim (Animations.CAnim) package Animations { import Services.*; import Banks.*; public class CAnim { public var anDirs:Array; public var anAntiTrigo:Array; public var anTrigo:Array; public var tableAnimTwoSpeeds:Array; public static var ANIMID_UNCROUCH:int = 11; public static var ANIMID_APPEAR:int = 3; public static var ANIMID_CLIMB:int = 9; public static var ANIMID_RUN:int = 2; public static var ANIMID_JUMP:int = 7; public static var ANIMID_SHOOT:int = 6; public static var ANIMID_CROUCH:int = 10; public static var ANIMID_FALL:int = 8; public static var ANIMID_USER1:int = 12; public static var ANIMID_STOP:int = 0; public static var ANIMID_DISAPPEAR:int = 4; public static var ANIMID_BOUNCE:int = 5; public static var ANIMID_WALK:int = 1; public function CAnim(){ tableAnimTwoSpeeds = [0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1]; super(); } public function load(_arg1:CFile):void{ var _local4:int; var _local2:int = _arg1.getFilePointer(); var _local3:Array = new Array(32); _local4 = 0; while (_local4 < 32) { _local3[_local4] = _arg1.readAShort(); _local4++; }; anDirs = new Array(32); anTrigo = new Array(32); anAntiTrigo = new Array(32); _local4 = 0; while (_local4 < 32) { anDirs[_local4] = null; anTrigo[_local4] = 0; anAntiTrigo[_local4] = 0; if (_local3[_local4] != 0){ anDirs[_local4] = new CAnimDir(); _arg1.seek((_local2 + _local3[_local4])); anDirs[_local4].load(_arg1); }; _local4++; }; } public function approximate(_arg1:int):void{ var _local2:int; var _local3:int; var _local4:int; var _local5:int; var _local6:int; _local2 = 0; while (_local2 < 32) { if (anDirs[_local2] == null){ _local3 = 0; _local5 = (_local2 + 1); while (_local3 < 32) { _local5 = (_local5 & 31); if (anDirs[_local5] != null){ anTrigo[_local2] = _local5; break; }; _local3++; _local5++; }; _local4 = 0; _local6 = (_local2 - 1); while (_local4 < 32) { _local6 = (_local6 & 31); if (anDirs[_local6] != null){ anAntiTrigo[_local2] = _local6; break; }; _local4++; _local6--; }; if ((((_local5 == _local6)) || ((_local3 < _local4)))){ anTrigo[_local2] = (anTrigo[_local2] | 64); } else { if (_local4 < _local3){ anAntiTrigo[_local2] = (anAntiTrigo[_local2] | 64); }; }; } else { if (_arg1 < 16){ if (tableAnimTwoSpeeds[_arg1] == 0){ anDirs[_local2].adMinSpeed = anDirs[_local2].adMaxSpeed; }; }; }; _local2++; }; } public function enumElements(_arg1:IEnum):void{ var _local2:int; _local2 = 0; while (_local2 < 32) { if (anDirs[_local2] != null){ anDirs[_local2].enumElements(_arg1); }; _local2++; }; } } }//package Animations
Section 41
//CAnimDir (Animations.CAnimDir) package Animations { import Services.*; import Banks.*; public class CAnimDir { public var adRepeat:int; public var adMaxSpeed:int; public var adFrames:Array; public var adNumberOfFrame:int; public var adRepeatFrame:int; public var adMinSpeed:int; public function load(_arg1:CFile):void{ var _local2:int; adMinSpeed = _arg1.readAByte(); adMaxSpeed = _arg1.readAByte(); adRepeat = _arg1.readAShort(); adRepeatFrame = _arg1.readAShort(); adNumberOfFrame = _arg1.readAShort(); adFrames = new Array(adNumberOfFrame); _local2 = 0; while (_local2 < adNumberOfFrame) { adFrames[_local2] = _arg1.readAShort(); _local2++; }; } public function enumElements(_arg1:IEnum):void{ var _local2:int; var _local3:int; _local2 = 0; while (_local2 < adNumberOfFrame) { if (_arg1 != null){ _local3 = _arg1.enumerate(adFrames[_local2]); if (_local3 != -1){ adFrames[_local2] = _local3; }; }; _local2++; }; } } }//package Animations
Section 42
//CAnimHeader (Animations.CAnimHeader) package Animations { import Services.*; import Banks.*; public class CAnimHeader { public var ahAnimExists:Array; public var ahAnims:Array; public var ahAnimMax:int; public static var tableApprox:Array = [CAnim.ANIMID_APPEAR, CAnim.ANIMID_WALK, CAnim.ANIMID_RUN, 0, CAnim.ANIMID_RUN, CAnim.ANIMID_STOP, 0, 0, CAnim.ANIMID_WALK, CAnim.ANIMID_STOP, 0, 0, CAnim.ANIMID_STOP, CAnim.ANIMID_WALK, CAnim.ANIMID_RUN, 0, CAnim.ANIMID_STOP, 0, 0, 0, CAnim.ANIMID_STOP, CAnim.ANIMID_WALK, CAnim.ANIMID_RUN, 0, CAnim.ANIMID_STOP, CAnim.ANIMID_WALK, CAnim.ANIMID_RUN, 0, CAnim.ANIMID_WALK, CAnim.ANIMID_RUN, CAnim.ANIMID_STOP, 0, CAnim.ANIMID_STOP, CAnim.ANIMID_WALK, CAnim.ANIMID_RUN, 0, CAnim.ANIMID_WALK, CAnim.ANIMID_RUN, CAnim.ANIMID_STOP, 0, CAnim.ANIMID_STOP, CAnim.ANIMID_WALK, CAnim.ANIMID_RUN, 0, CAnim.ANIMID_STOP, CAnim.ANIMID_WALK, CAnim.ANIMID_RUN, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; public function enumElements(_arg1:IEnum):void{ var _local2:int; _local2 = 0; while (_local2 < ahAnimMax) { if (ahAnimExists[_local2] != 0){ ahAnims[_local2].enumElements(_arg1); }; _local2++; }; } public function load(_arg1:CFile):void{ var _local4:int; var _local5:int; var _local6:Boolean; var _local7:int; var _local2:int = _arg1.getFilePointer(); _arg1.skipBytes(2); ahAnimMax = _arg1.readAShort(); var _local3:Array = new Array(ahAnimMax); _local4 = 0; while (_local4 < ahAnimMax) { _local3[_local4] = _arg1.readAShort(); _local4++; }; ahAnims = new Array(ahAnimMax); ahAnimExists = new Array(ahAnimMax); _local4 = 0; while (_local4 < ahAnimMax) { ahAnims[_local4] = null; ahAnimExists[_local4] = 0; if (_local3[_local4] != 0){ ahAnims[_local4] = new CAnim(); _arg1.seek((_local2 + _local3[_local4])); ahAnims[_local4].load(_arg1); ahAnimExists[_local4] = 1; }; _local4++; }; _local5 = 0; while (_local5 < ahAnimMax) { if (ahAnimExists[_local5] == 0){ _local6 = false; if (_local5 < 12){ _local4 = 0; while (_local4 < 4) { _local7 = ahAnimExists[tableApprox[((_local5 * 4) + _local4)]]; if (_local7 != 0){ ahAnims[_local5] = ahAnims[tableApprox[((_local5 * 4) + _local4)]]; _local6 = true; break; }; _local4++; }; }; if (_local6 == false){ _local4 = 0; while (_local4 < ahAnimMax) { if (ahAnimExists[_local4] != 0){ ahAnims[_local5] = ahAnims[_local4]; break; }; _local4++; }; }; } else { ahAnims[_local5].approximate(_local5); }; _local5++; }; } } }//package Animations
Section 43
//CRAni (Animations.CRAni) package Animations { import Application.*; import Banks.*; import OI.*; import RunLoop.*; import Objects.*; public class CRAni { public var raAnimSpeedForced:int; public var raAnimDir:int; public var raAnimOffset:CAnim; public var raAnimMinSpeed:int; public var raAnimPreviousDir:int; public var raAnimDirOffset:CAnimDir; public var raAnimRepeat:int; public var raAnimFrameForced:int; public var raAnimDelta:int; public var raOldAngle:int; public var raAnimMaxSpeed:int; public var raAnimDirForced:int; public var raAnimSpeed:int; public var raAnimStopped:Boolean; public var raAnimNumberOfFrame:int; public var raAnimForced:int; public var raAnimOn:int; public var raAnimRepeatLoop:int; public var hoPtr:CObject; public var raAnimFrame:int; public var raRoutineAnimation:int; public var raAnimDeltaSpeed:int; public var raAnimCounter:int; public static var anim_Defined:Array = [CAnim.ANIMID_STOP, CAnim.ANIMID_WALK, CAnim.ANIMID_RUN, CAnim.ANIMID_BOUNCE, CAnim.ANIMID_SHOOT, CAnim.ANIMID_JUMP, CAnim.ANIMID_FALL, CAnim.ANIMID_CLIMB, CAnim.ANIMID_CROUCH, CAnim.ANIMID_UNCROUCH, 12, 13, 14, 15, -1]; public function CRAni(){ raOldAngle = -1; } public function animSpeed_Force(_arg1:int):void{ if (_arg1 < 0){ _arg1 = 0; }; if (_arg1 > 100){ _arg1 = 100; }; raAnimSpeedForced = (_arg1 + 1); animIn(0); } public function animDir_Force(_arg1:int):void{ _arg1 = (_arg1 & 31); raAnimDirForced = (_arg1 + 1); animIn(0); } public function check_Animate():void{ animIn(0); } public function animFrame_Restore():void{ raAnimFrameForced = 0; animIn(0); } public function init(_arg1:CObject):void{ var _local2:int; hoPtr = _arg1; raRoutineAnimation = 0; init_Animation(CAnim.ANIMID_WALK); if (anim_Exist(CAnim.ANIMID_APPEAR)){ raRoutineAnimation = 1; animation_Force(CAnim.ANIMID_APPEAR); animation_OneLoop(); animations(); } else { _local2 = 0; while (anim_Defined[_local2] >= 0) { if (anim_Exist(anim_Defined[_local2])){ break; }; _local2++; }; if (anim_Defined[_local2] < 0){ if (anim_Exist(CAnim.ANIMID_DISAPPEAR)){ raRoutineAnimation = 2; animation_Force(CAnim.ANIMID_DISAPPEAR); animation_OneLoop(); animations(); }; }; }; } public function animIn(_arg1:int):Boolean{ var _local5:int; var _local6:CImage; var _local9:CAnimDir; var _local11:int; var _local13:CAnim; var _local14:int; var _local15:int; var _local16:int; var _local17:int; var _local18:int; var _local19:int; CRun.bMoveChanged = false; var _local2:CObjectCommon = hoPtr.hoCommon; var _local3:int = hoPtr.roc.rcSpeed; var _local4:int = hoPtr.roc.rcAnim; if (raAnimSpeedForced != 0){ _local3 = (raAnimSpeedForced - 1); }; if (_local4 == CAnim.ANIMID_WALK){ if (_local3 == 0){ _local4 = CAnim.ANIMID_STOP; }; if (_local3 >= 75){ _local4 = CAnim.ANIMID_RUN; }; }; if (raAnimForced != 0){ _local4 = (raAnimForced - 1); }; if (_local4 != raAnimOn){ raAnimOn = _local4; if (_local4 >= _local2.ocAnimations.ahAnimMax){ _local4 = (_local2.ocAnimations.ahAnimMax - 1); }; _local13 = _local2.ocAnimations.ahAnims[_local4]; if (_local13 != raAnimOffset){ raAnimOffset = _local13; raAnimDir = -1; raAnimFrame = 0; }; }; var _local7:int = hoPtr.roc.rcDir; var _local8:Boolean; if (raAnimDirForced != 0){ _local7 = (raAnimDirForced - 1); }; if (raAnimDir != _local7){ raAnimDir = _local7; _local9 = raAnimOffset.anDirs[_local7]; if (_local9 == null){ if ((raAnimOffset.anAntiTrigo[_local7] & 64) != 0){ _local7 = (raAnimOffset.anAntiTrigo[_local7] & 63); } else { if ((raAnimOffset.anTrigo[_local7] & 64) != 0){ _local7 = (raAnimOffset.anTrigo[_local7] & 63); } else { _local14 = _local7; if (raAnimPreviousDir < 0){ _local7 = (raAnimOffset.anTrigo[_local7] & 63); } else { _local7 = (_local7 - raAnimPreviousDir); _local7 = (_local7 & 31); if (_local7 > 15){ _local7 = (raAnimOffset.anTrigo[_local14] & 63); } else { _local7 = (raAnimOffset.anAntiTrigo[_local14] & 63); }; }; }; }; _local9 = raAnimOffset.anDirs[_local7]; } else { raAnimPreviousDir = _local7; _local9 = raAnimOffset.anDirs[_local7]; }; if (((!((raAnimOffset.anDirs[0] == null))) && (!(((hoPtr.hoCommon.ocFlags2 & CObjectCommon.OCFLAGS2_AUTOMATICROTATION) == 0))))){ hoPtr.roc.rcAngle = ((raAnimDir * 360) / 32); _local9 = raAnimOffset.anDirs[0]; raAnimDirOffset = null; _local8 = true; }; if (raAnimDirOffset != _local9){ raAnimDirOffset = _local9; raAnimRepeat = _local9.adRepeat; raAnimRepeatLoop = _local9.adRepeatFrame; _local15 = _local9.adMinSpeed; _local16 = _local9.adMaxSpeed; if (((!((_local15 == raAnimMinSpeed))) || (!((_local16 == raAnimMaxSpeed))))){ raAnimMinSpeed = _local15; raAnimMaxSpeed = _local16; _local16 = (_local16 - _local15); raAnimDeltaSpeed = _local16; raAnimDelta = _local15; raAnimSpeed = -1; }; raAnimNumberOfFrame = _local9.adNumberOfFrame; if (((!((raAnimFrameForced == 0))) && (((raAnimFrameForced - 1) >= raAnimNumberOfFrame)))){ raAnimFrameForced = 0; }; if (raAnimFrame >= raAnimNumberOfFrame){ raAnimFrame = 0; }; _local5 = _local9.adFrames[raAnimFrame]; if (raAnimStopped == false){ hoPtr.roc.rcImage = _local5; _local6 = hoPtr.hoAdRunHeader.rhApp.imageBank.getImageInfoEx(_local5, hoPtr.roc.rcAngle, hoPtr.roc.rcScaleX, hoPtr.roc.rcScaleY); hoPtr.hoImgWidth = _local6.width; hoPtr.hoImgHeight = _local6.height; hoPtr.hoImgXSpot = _local6.xSpot; hoPtr.hoImgYSpot = _local6.ySpot; hoPtr.roc.rcChanged = true; hoPtr.roc.rcCheckCollides = true; }; if (raAnimNumberOfFrame == 1){ if (raAnimMinSpeed == 0){ raAnimNumberOfFrame = 0; }; _local5 = hoPtr.roc.rcImage; if (_local5 == 0){ return (false); }; _local6 = hoPtr.hoAdRunHeader.rhApp.imageBank.getImageInfoEx(_local5, hoPtr.roc.rcAngle, hoPtr.roc.rcScaleX, hoPtr.roc.rcScaleY); hoPtr.hoImgWidth = _local6.width; hoPtr.hoImgHeight = _local6.height; hoPtr.hoImgXSpot = _local6.xSpot; hoPtr.hoImgYSpot = _local6.ySpot; return (false); }; }; }; if ((((_arg1 == 0)) && ((raAnimFrameForced == 0)))){ return (false); }; if ((((_local8 == false)) && ((raAnimNumberOfFrame == 0)))){ return (false); }; var _local10:int = raAnimDeltaSpeed; if (_local3 != raAnimSpeed){ raAnimSpeed = _local3; if (_local10 == 0){ raAnimDelta = raAnimMinSpeed; if (raAnimSpeedForced != 0){ raAnimDelta = (raAnimSpeedForced - 1); }; } else { _local17 = (hoPtr.roc.rcMaxSpeed - hoPtr.roc.rcMinSpeed); if (_local17 == 0){ if (raAnimSpeedForced != 0){ _local10 = (_local10 * _local3); _local10 = (_local10 / 100); _local10 = (_local10 + raAnimMinSpeed); if (_local10 > raAnimMaxSpeed){ _local10 = raAnimMaxSpeed; }; raAnimDelta = _local10; } else { _local10 = (_local10 / 2); _local10 = (_local10 + raAnimMinSpeed); raAnimDelta = _local10; }; } else { _local10 = (_local10 * _local3); _local10 = (_local10 / _local17); _local10 = (_local10 + raAnimMinSpeed); if (_local10 > raAnimMaxSpeed){ _local10 = raAnimMaxSpeed; }; raAnimDelta = _local10; }; }; }; _local9 = raAnimDirOffset; _local5 = raAnimFrameForced; if (_local5 == 0){ if (raAnimDelta == 0){ return (false); }; if (raAnimStopped){ return (false); }; _local11 = raAnimCounter; _local5 = raAnimFrame; _local18 = raAnimDelta; if ((hoPtr.hoAdRunHeader.rhFrame.leFlags & CRunFrame.LEF_TIMEDMVTS) != 0){ _local18 = (Number(_local18) * hoPtr.hoAdRunHeader.rh4MvtTimerCoef); }; _local11 = (_local11 + _local18); while (_local11 > 100) { _local11 = (_local11 - 100); _local5++; if (_local5 >= raAnimNumberOfFrame){ _local5 = raAnimRepeatLoop; if (raAnimRepeat != 0){ raAnimRepeat--; if (raAnimRepeat == 0){ raAnimFrame = raAnimNumberOfFrame; raAnimNumberOfFrame = 0; if (raAnimForced != 0){ raAnimForced = 0; raAnimDirForced = 0; raAnimSpeedForced = 0; }; if ((hoPtr.hoAdRunHeader.rhGameFlags & CRun.GAMEFLAGS_INITIALISING) != 0){ return (false); }; if (_local8){ hoPtr.roc.rcChanged = true; hoPtr.roc.rcCheckCollides = true; _local6 = hoPtr.hoAdRunHeader.rhApp.imageBank.getImageInfoEx(hoPtr.roc.rcImage, hoPtr.roc.rcAngle, hoPtr.roc.rcScaleX, hoPtr.roc.rcScaleY); hoPtr.hoImgWidth = _local6.width; hoPtr.hoImgHeight = _local6.height; hoPtr.hoImgXSpot = _local6.xSpot; hoPtr.hoImgYSpot = _local6.ySpot; }; _local19 = (-2 << 16); _local19 = (_local19 | (hoPtr.hoType & 0xFFFF)); hoPtr.hoAdRunHeader.rhEvtProg.rhCurParam0 = hoPtr.roa.raAnimOn; return (hoPtr.hoAdRunHeader.rhEvtProg.handle_Event(hoPtr, _local19)); }; }; }; }; raAnimCounter = _local11; } else { _local5--; }; raAnimFrame = _local5; hoPtr.roc.rcChanged = true; hoPtr.roc.rcCheckCollides = true; var _local12:int = _local9.adFrames[_local5]; if (((!((hoPtr.roc.rcImage == _local12))) || (!((raOldAngle == hoPtr.roc.rcAngle))))){ hoPtr.roc.rcImage = _local12; raOldAngle = hoPtr.roc.rcAngle; if (_local12 < 0){ return (false); }; _local6 = hoPtr.hoAdRunHeader.rhApp.imageBank.getImageInfoEx(_local12, hoPtr.roc.rcAngle, hoPtr.roc.rcScaleX, hoPtr.roc.rcScaleY); hoPtr.hoImgWidth = _local6.width; hoPtr.hoImgHeight = _local6.height; hoPtr.hoImgXSpot = _local6.xSpot; hoPtr.hoImgYSpot = _local6.ySpot; }; return (false); } public function anim_Appear():void{ animIn(1); if (raAnimForced != (CAnim.ANIMID_APPEAR + 1)){ if (((((anim_Exist(CAnim.ANIMID_STOP)) || (anim_Exist(CAnim.ANIMID_WALK)))) || (anim_Exist(CAnim.ANIMID_RUN)))){ raRoutineAnimation = 0; animation_Restore(); } else { raRoutineAnimation = 2; hoPtr.hoAdRunHeader.init_Disappear(hoPtr); }; }; } public function animFrame_Force(_arg1:int):void{ if (_arg1 >= raAnimNumberOfFrame){ _arg1 = (raAnimNumberOfFrame - 1); }; if (_arg1 < 0){ _arg1 = 0; }; raAnimFrameForced = (_arg1 + 1); animIn(0); } public function anim_Exist(_arg1:int):Boolean{ var _local2:CAnimHeader = hoPtr.hoCommon.ocAnimations; if (_local2.ahAnimExists[_arg1] == 0){ return (false); }; return (true); } public function animation_Restore():void{ raAnimForced = 0; animIn(0); } public function anim_Restart():void{ raAnimOn = -1; animIn(0); } public function animation_OneLoop():void{ if (raAnimRepeat == 0){ raAnimRepeat = 1; }; } public function animation_Force(_arg1:int):void{ raAnimForced = (_arg1 + 1); animIn(0); } public function anim_Disappear():void{ if ((hoPtr.hoFlags & CObject.HOF_FADEOUT) == 0){ animIn(1); if (raAnimForced != (CAnim.ANIMID_DISAPPEAR + 1)){ hoPtr.hoAdRunHeader.destroy_Add(hoPtr.hoNumber); }; }; } public function animate():Boolean{ CRun.bMoveChanged = false; switch (raRoutineAnimation){ case 0: return (animations()); case 1: anim_Appear(); return (false); case 2: anim_Disappear(); return (false); }; return (false); } public function animDir_Restore():void{ raAnimDirForced = 0; animIn(0); } public function animSpeed_Restore():void{ raAnimSpeedForced = 0; animIn(0); } public function init_Animation(_arg1:int):void{ hoPtr.roc.rcAnim = _arg1; raAnimStopped = false; raAnimForced = 0; raAnimDirForced = 0; raAnimSpeedForced = 0; raAnimFrameForced = 0; raAnimCounter = 0; raAnimFrame = 0; raAnimOffset = null; raAnimDirOffset = null; raAnimOn = -1; raAnimMinSpeed = -1; raAnimPreviousDir = -1; raAnimOffset = null; raAnimDirOffset = null; animations(); } public function extAnimations(_arg1:int):void{ hoPtr.roc.rcAnim = _arg1; animate(); } public function animations():Boolean{ var _local1:int = hoPtr.hoX; hoPtr.roc.rcOldX = _local1; _local1 = (_local1 - hoPtr.hoImgXSpot); hoPtr.roc.rcOldX1 = _local1; _local1 = (_local1 + hoPtr.hoImgWidth); hoPtr.roc.rcOldX2 = _local1; var _local2:int = hoPtr.hoY; hoPtr.roc.rcOldY = _local2; _local2 = (_local2 - hoPtr.hoImgYSpot); hoPtr.roc.rcOldY1 = _local2; _local2 = (_local2 + hoPtr.hoImgHeight); hoPtr.roc.rcOldY2 = _local2; hoPtr.roc.rcOldImage = hoPtr.roc.rcImage; hoPtr.roc.rcOldAngle = hoPtr.roc.rcAngle; return (animIn(1)); } } }//package Animations
Section 44
//CDemoWarning (Application.CDemoWarning) package Application { import flash.display.*; import flash.text.*; import Services.*; import flash.utils.*; public class CDemoWarning { public var app:CRunApp; public var timerStart:int; public var sprite:Sprite; public var textField:TextField; public function CDemoWarning(_arg1:CRunApp, _arg2:int){ app = _arg1; sprite = new Sprite(); app.mainSprite.addChild(sprite); sprite.x = 0; sprite.y = 0; sprite.graphics.clear(); sprite.graphics.beginFill(0xFFFFFF); sprite.graphics.drawRect(0, 0, app.gaCxWin, app.gaCyWin); sprite.graphics.endFill(); var _local3:CFontInfo = new CFontInfo(); _local3.init(); _local3.lfHeight = 22; var _local4:TextFormat = _local3.getTextFormat(); _local4.align = TextFormatAlign.CENTER; _local4.color = 0; textField = new TextField(); textField.width = 320; textField.height = 300; textField.x = ((app.gaCxWin / 2) - (textField.width / 2)); textField.y = ((app.gaCyWin / 2) - 100); textField.multiline = true; textField.wordWrap = true; textField.mouseEnabled = false; textField.selectable = false; textField.visible = true; if (_arg2 == 1){ textField.htmlText = "This application has been created with a demo version of\nMultimedia Fusion 2\nor The Games Factory 2.\n\nIt cannot be distributed\nin any way."; } else { if (_arg2 == 2){ textField.htmlText = "Cette application a été créée avec une version démo de\nMultimedia Fusion 2\nou de The Games Factory 2.\n\nElle ne peut en aucun cas\nêtre distribuée."; }; }; textField.setTextFormat(_local4); sprite.addChild(textField); timerStart = getTimer(); } public function handle():Boolean{ var _local1:int = getTimer(); if ((_local1 - timerStart) > (1000 * 3)){ app.mainSprite.removeChild(sprite); return (true); }; return (false); } } }//package Application
Section 45
//CEmbeddedFile (Application.CEmbeddedFile) package Application { import Services.*; import flash.utils.*; public class CEmbeddedFile { public var app:CRunApp; public var useCountFile:int; public var path:String; public var length:int; public var data:CBinaryFile; public var offset:int; public var tempPath:String; public var useCountMem:int; public function CEmbeddedFile(_arg1:CRunApp){ app = _arg1; } public function openMem():CBinaryFile{ var _local1:ByteArray; if (data == null){ app.file.seek(offset); _local1 = app.file.readBuffer(length); data = new CBinaryFile(_local1, app.bUnicode); } else { data.seek(0); }; return (data); } public function preLoad():void{ var _local1:int = app.file.readAShort(); path = app.file.readAStringSize(_local1); var _local2:int = path.lastIndexOf("\\"); if (_local2 >= 0){ path = path.substring((_local2 + 1)); }; length = app.file.readAInt(); offset = app.file.getFilePointer(); app.file.skipBytes(length); useCountFile = 0; data = null; } public function releaseFile():void{ data = null; } } }//package Application
Section 46
//CKeyConvert (Application.CKeyConvert) package Application { public class CKeyConvert { public static var keys:Array = [1, 260, 2, 2, 4, 1, 27, 27, 13, 13, 16, 16, 17, 17, 18, 18, 32, 32, 37, 37, 38, 38, 39, 39, 40, 40, 144, 144, 111, 111, 106, 106, 109, 109, 107, 107, 110, 110, 226, 226, 221, 221, 186, 186, 219, 219, 187, 187, 8, 8, 45, 45, 36, 36, 46, 46, 35, 35, 33, 33, 34, 34, 9, 9, 188, 188, 190, 190, 191, 191, 223, 223, 112, 112, 113, 113, 114, 114, 115, 115, 116, 116, 117, 117, 118, 118, 119, 119, 120, 120, 121, 121, 122, 122, 123, 123, 124, 124, 125, 125, 126, 126, 48, 48, 49, 49, 50, 50, 51, 51, 52, 52, 53, 53, 54, 54, 55, 55, 56, 56, 57, 57, 65, 65, 66, 66, 67, 67, 68, 68, 69, 69, 70, 70, 71, 71, 72, 72, 73, 73, 74, 74, 75, 75, 76, 76, 77, 77, 78, 78, 79, 79, 80, 80, 81, 81, 82, 82, 83, 83, 84, 84, 85, 85, 86, 86, 87, 87, 88, 88, 89, 89, 90, 90, 96, 96, 97, 97, 98, 98, 99, 99, 100, 100, 101, 101, 102, 102, 103, 103, 104, 104, 105, 105, -1]; public static var NB_SPECIAL_KEYS:int = 29; public static var keyNames:Array = ["LButton", "MButton", "RButton", "Escape", "Return", "Shift", "Control", "Alt", "Space", "Left", "Up", "Right", "Down", "Numlock", "Divide", "Multiply", "Subtract", "Add", "Decimal", "Key1", "Key2", "Key3", "Close bracket", "Equal", "Backspace", "Insert", "Home", "Delete", "End", "Previous page", "Next page", "Tab", "Comma", "Semi colon", "Colon", "Exclamation", "Unknown"]; public static function getKeyText(_arg1:int):String{ var _local2:int; var _local4:int; var _local3 = ""; if ((((_arg1 >= 96)) && ((_arg1 <= 105)))){ _local2 = (_arg1 - 96); _local3 = ("Numpad" + _local2.toString()); } else { if ((((_arg1 >= 112)) && ((_arg1 <= 126)))){ _local2 = (_arg1 - 112); _local3 = ("F" + _local2.toString()); } else { if ((((_arg1 >= 48)) && ((_arg1 <= 57)))){ _local2 = (_arg1 - 48); _local3 = _local2.toString(); } else { if ((((_arg1 >= 65)) && ((_arg1 <= 90)))){ _local3 = String.fromCharCode(_arg1); } else { _local4 = 0; while (_local4 < NB_SPECIAL_KEYS) { if (keys[((_local4 * 2) + 1)] == _arg1){ _local3 = keyNames[_local4]; break; }; _local4++; }; }; }; }; }; return (_local3); } public static function getFlashKey(_arg1:int):int{ var _local2:int; _local2 = 0; while (keys[_local2] != -1) { if (keys[_local2] == _arg1){ return (keys[(_local2 + 1)]); }; _local2 = (_local2 + 2); }; return (_arg1); } } }//package Application
Section 47
//CRunApp (Application.CRunApp) package Application { import flash.display.*; import flash.geom.*; import mx.core.*; import mx.managers.*; import flash.text.*; import flash.events.*; import flash.system.*; import flash.net.*; import Services.*; import Expressions.*; import flash.utils.*; import Banks.*; import OI.*; import RunLoop.*; import Extensions.*; import Objects.*; import Sprites.*; import flash.ui.*; public class CRunApp { public const GANF_DISABLE_CLOSE:int = 0x0200; public const GA_MENUHIDDEN:int = 128; public const GA_STRETCH:int = 16; public const GA_SPEEDINDEPENDANT:int = 8; public const GANF_RUNFRAME:int = 4; public const GANF_DONOTCENTERFRAME:int = 128; public const GA_MIX:int = 0x0400; public const GAOF_JAVASWING:int = 0x1000; public const GANF_NOTHICKFRAME:int = 64; public const GANF_HIDDENATSTART:int = 0x0400; public const GA_FULLSCREENATSTART:int = 0x0800; public const GA_MAXIMISE:int = 0x0200; public const GAOF_JAVAAPPLET:int = 0x2000; public const GA_MENUBAR:int = 0x0100; public const GA_NOHEADING:int = 2; public var refTime:int; public var mochiFrameLast:int;// = -1 public var ccj:ByteArrayAsset; public var m_bLoading:Boolean; public var embeddedFiles:Array; public var xMouseOffset:int; public var pcCtrlKeys:Array; public var frameOffsets:Array; public var gStrings:CArrayList; public var scores:Array; public var adClip:MovieClip; public var globalValuesInitTypes:Array; public var startFrame:int; public var pathname:String; public var imageBank:CImageBank; public var nextFrame:int; public var bPreloader:Boolean; public var bUnicode:Boolean; public var tempGValue:CValue; public var demoWarning:CDemoWarning; public var nGlobalStringsInit:int; public var flashVars:Object; public var sysEvents:CArrayList; public var framePasswords:Array; public var appName:String; public var quit:Boolean; public var adGO:CArrayList; public var mouseX:int; public var mouseY:int; public var gaFrameRate:int; public var frameMaxIndex:int;// = 0 public var preloaderLoaded:int; public var gValues:CArrayList; public var yOffset:int; public var gaCxWin:int; public var parentHeight:int; public var cx:int; public var cy:int; public var startDemoWarning:int; public var gaNbFrames:int; public var preloaderTotal:int; public var deltaWheel:int; public var frameEffectParams:Array; public var run:CRun; public var dwOptions:int; public var parentOptions:int; public var appArgs:String; public var appCopyright:String; public var keyNew:Boolean; public var mochiFrame:int; public var gaCyWin:int; public var soundPlayer:CSoundPlayer; public var appRunningState:int; public var frameEffects:Array; public var wScreenAngle:int; public var wScreenRatioTolerance:int; public var playerNames:Array; public var gaLivesInit:int; public var stage:Stage; public var lives:Array; public var debugShape:Shape; public var globalStringsInit:Array; public var gaBorderColour:uint; public var appEditorFilename:String; public var parentApp:CRunApp; public var gaScoreInit:int; public var fontBank:CFontBank; public var xOffset:int; public var appAboutText:String; public var parentWidth:int; public var appTargetFilename:String; public var sounds:Array; public var extensionStorage:CArrayList; public var planeControls:Sprite; public var globalValuesInit:Array; public var appDoc:String; public var pcCtrlType:Array; public var cursorCount:int; public var yMouseOffset:int; public var loaderInfo:LoaderInfo; public var frameHandleToIndex:Array; public var jarPathname:String; public var frame:CRunFrame; public var appPathname:String; public var currentFrame:int; public var dwBuildType:int; public var alpha:int; public var extPathname:String; public var file:CFile; public var keyBuffer:ByteArray; public var effectParam:int; public var bActivated:Boolean; public var effect:int; public var bFlashAd:Boolean; public var extLoader:CExtLoader; public var gaMode:int; public var OIList:COIList; public var embeddedFonts:Array; public var doubleClickTime:int; public var pLoadFilename:String; public var dwBuildFlags:int; public var bShiftFrameNumber:Boolean; public var mochiStart:CMoStart; public var gaNewFlags:int; public var gaFlags:int; public var gaOtherFlags:int; public var frameMaxHandle:int; public var mainSprite:Sprite; public var nGlobalValuesInit:int; public var bMouseIn:Boolean; public var soundBank:CSoundBank; public var appRunFlags:int; public static var CTRLTYPE_KEYBOARD:int = 5; public static var MAX_KEY:int = 8; public static var ARF_INGAMELOOP:int = 4; public static var SL_RESTART:int = 0; public static var SL_FRAMELOOP:int = 3; public static var SL_FRAMEFADEOUTLOOP:int = 4; public static var MAX_VK:int = 261; public static var CTRLTYPE_JOY1:int = 1; public static var SL_ENDFRAME:int = 5; public static var CTRLTYPE_JOY3:int = 3; public static var CTRLTYPE_JOY4:int = 4; public static var CTRLTYPE_JOY2:int = 2; public static var CTRLTYPE_MOUSE:int = 0; public static var SL_STARTFRAME:int = 1; public static var SL_FRAMEFADEINLOOP:int = 2; public static var SL_WAITFORMOCHI:int = 7; public static var SL_QUIT:int = 6; public static var GANF_SAMPLESOVERFRAMES:int = 1; public static var RUNTIME_VERSION:int = 770; public static var data:Array = [210, 48, 204, 182, 135, 157, 149, 14, 202]; public static var MAX_PLAYER:int = 4; public static var BUILDFLAG_TEST:int = 128; public function CRunApp(_arg1:ByteArrayAsset, _arg2:Stage, _arg3:Object, _arg4:LoaderInfo){ loaderInfo = _arg4; ccj = _arg1; stage = _arg2; flashVars = _arg3; sounds = null; keyNew = false; bPreloader = false; deltaWheel = 0; embeddedFonts = null; demoWarning = null; startDemoWarning = 0; } public function HCellToNCell(_arg1:int):int{ if ((((((frameHandleToIndex == null)) || ((_arg1 == -1)))) || ((_arg1 >= frameMaxHandle)))){ return (-1); }; return (frameHandleToIndex[_arg1]); } public function loadGlobalStrings(_arg1:CFile):void{ var _local2:int; nGlobalStringsInit = _arg1.readAInt(); globalStringsInit = new Array(nGlobalStringsInit); _local2 = 0; while (_local2 < nGlobalStringsInit) { globalStringsInit[_local2] = _arg1.readAString(); _local2++; }; } public function setSounds(_arg1:Array):void{ sounds = _arg1; } public function onMouseLeave(_arg1:Event):void{ bMouseIn = false; keyBuffer[260] = 0; } public function onStatusEvent(_arg1:StatusEvent):void{ } public function setPreloader(_arg1:Sprite):void{ parentApp = null; mainSprite = _arg1; bPreloader = true; } public function setDemoWarning(_arg1:int):void{ startDemoWarning = _arg1; } public function getCtrlKeys():Array{ var _local1:CRunApp = this; while (((!((_local1.parentApp == null))) && (!(((_local1.parentOptions & CCCA.CCAF_SHARE_PLAYERCTRLS) == 0))))) { _local1 = _local1.parentApp; }; return (_local1.pcCtrlKeys); } public function getNGlobalStrings():int{ if (gStrings != null){ return (gStrings.size()); }; return (0); } public function setPreloaderProgress(_arg1:int, _arg2:int):void{ preloaderTotal = _arg1; preloaderLoaded = _arg2; } public function getEmbeddedFont(_arg1:String):int{ var _local3:int; var _local2 = -1; if (embeddedFonts != null){ _local3 = 0; while (_local3 < embeddedFonts.length) { if (embeddedFonts[_local3].fontName == _arg1){ _local2 = _local3; break; }; _local3++; }; }; return (_local2); } public function setEffect(_arg1:int, _arg2:int):void{ var _local3 = (effect & CRSpr.BOP_MASK); var _local4:Number = 1; var _local5 = 0xFF; var _local6 = 0xFF; var _local7 = 0xFF; if ((effect & CRSpr.BOP_RGBAFILTER) != 0){ _local5 = (((effectParam & 0xFFFFFF) >> 16) & 0xFF); _local6 = (((effectParam & 0xFFFFFF) >> 8) & 0xFF); _local7 = ((effectParam & 0xFFFFFF) & 0xFF); _local4 = (((effectParam >> 24) & 0xFF) / 0xFF); } else { if (_local3 == CRSpr.BOP_BLEND){ _local4 = ((128 - effectParam) / 128); }; }; switch (_local3){ case CRSpr.BOP_ADD: mainSprite.blendMode = "add"; mainSprite.transform.colorTransform = new ColorTransform((_local5 / 0xFF), (_local6 / 0xFF), (_local7 / 0xFF), 1, 0, 0, 0, 0); break; case CRSpr.BOP_SUB: mainSprite.blendMode = "subtract"; mainSprite.transform.colorTransform = new ColorTransform((_local5 / 0xFF), (_local6 / 0xFF), (_local7 / 0xFF), 1, 0, 0, 0, 0); break; case CRSpr.BOP_INVERT: mainSprite.blendMode = "normal"; mainSprite.transform.colorTransform = new ColorTransform((-(_local5) / 0xFF), (-(_local6) / 0xFF), (-(_local7) / 0xFF), 1, 0xFF, 0xFF, 0xFF, 0); break; default: mainSprite.blendMode = "normal"; mainSprite.transform.colorTransform = new ColorTransform((_local5 / 0xFF), (_local6 / 0xFF), (_local7 / 0xFF), 1, 0, 0, 0, 0); break; }; mainSprite.alpha = _local4; } public function getNGlobalValues():int{ if (gValues != null){ return (gValues.size()); }; return (0); } public function receiveKey(_arg1:int, _arg2:Boolean):void{ var _local3:CSysEventKeyDown; if (_arg1 < MAX_VK){ if (_arg2){ keyBuffer[_arg1] = 1; if (((!((run == null))) && (!((run.rhEvtProg == null))))){ _local3 = new CSysEventKeyDown(_arg1); sysEvents.add(_local3); }; keyNew = true; } else { keyBuffer[_arg1] = 0; }; }; } public function getGlobalValueAt(_arg1:int):CValue{ var _local2:CArrayList = checkGlobalValue(_arg1); if (_local2 != null){ return (CValue(_local2.get(_arg1))); }; return (tempGValue); } public function showCursor(_arg1:int):void{ cursorCount = _arg1; if (cursorCount >= 0){ Mouse.show(); } else { Mouse.hide(); }; } public function onKeyUp(_arg1:KeyboardEvent):void{ var _local2:int = _arg1.keyCode; if (_local2 < MAX_VK){ keyBuffer[_local2] = 0; if (((!((run == null))) && (!((run.rhEvtProg == null))))){ run.sendKey(_local2, false); }; }; } public function onConnectError(_arg1:String):void{ } public function checkGlobalString(_arg1:int):CArrayList{ var _local4:int; var _local2:CArrayList = getGlobalStrings(); if ((((_arg1 < 0)) || ((_arg1 > 1000)))){ return (null); }; var _local3:int = _local2.size(); if (_arg1 >= _local3){ _local2.ensureCapacity(_arg1); _local4 = _local3; while (_local4 <= _arg1) { _local2.add(new String("")); _local4++; }; }; return (_local2); } public function setFonts(_arg1:Array):void{ var _local3:int; var _local4:Class; var _local2:int = _arg1.length; embeddedFonts = new Array(_local2); _local3 = 0; while (_local3 < _local2) { _local4 = Class(_arg1[_local3]); Font.registerFont(_local4); embeddedFonts[_local3] = new (_local4); _local3++; }; } public function loadGlobalValues(_arg1:CFile):void{ var _local2:int; nGlobalValuesInit = _arg1.readAShort(); globalValuesInit = new Array(nGlobalValuesInit); globalValuesInitTypes = new Array(nGlobalValuesInit); _local2 = 0; while (_local2 < nGlobalValuesInit) { globalValuesInit[_local2] = _arg1.readAInt(); _local2++; }; _arg1.readBytesAsArray(globalValuesInitTypes); } public function onKeyDown(_arg1:KeyboardEvent):void{ var _local3:CSysEventKeyDown; var _local2:int = _arg1.keyCode; if (_local2 < MAX_VK){ if (keyBuffer[_local2] == 0){ if (((!((run == null))) && (!((run.rhEvtProg == null))))){ _local3 = new CSysEventKeyDown(_local2); sysEvents.add(_local3); run.sendKey(_local2, true); keyNew = true; }; }; keyBuffer[_local2] = 1; }; } public function setParentApp(_arg1:CRunApp, _arg2:int, _arg3:int, _arg4:Sprite, _arg5:int, _arg6:int):void{ parentApp = _arg1; parentOptions = _arg3; mainSprite = _arg4; startFrame = _arg2; parentWidth = _arg5; parentHeight = _arg6; mainSprite.scrollRect = new Rectangle(0, 0, _arg5, _arg6); embeddedFonts = parentApp.embeddedFonts; } public function load():void{ var _local3:int; var _local5:int; var _local6:CChunk; var _local7:int; var _local8:int; var _local9:String; file = new CFile(ccj); var _local1:ByteArray = file.readBuffer(4); bUnicode = false; if ((((((((_local1[0] == 80)) && ((_local1[1] == 65)))) && ((_local1[2] == 77)))) && ((_local1[3] == 85)))){ bUnicode = true; }; file.setUnicode(bUnicode); file.skipBytes(2); file.skipBytes(2); file.skipBytes(4); file.skipBytes(4); OIList = new COIList(); imageBank = new CImageBank(this); fontBank = new CFontBank(); soundBank = new CSoundBank(this); soundPlayer = new CSoundPlayer(this); var _local2:CChunk = new CChunk(); var _local4:int; while (_local2.chID != CChunk.CHUNK_LAST) { _local2.readHeader(file); if (_local2.chSize == 0){ } else { _local3 = (file.getFilePointer() + _local2.chSize); switch (_local2.chID){ case 8739: loadAppHeader(file); frameOffsets = new Array(gaNbFrames); frameEffects = new Array(gaNbFrames); frameEffectParams = new Array(gaNbFrames); framePasswords = new Array(gaNbFrames); _local5 = 0; while (_local5 < gaNbFrames) { framePasswords[_local5] = null; _local5++; }; break; case 8773: dwOptions = file.readAInt(); dwBuildType = file.readAInt(); dwBuildFlags = file.readAInt(); wScreenRatioTolerance = file.readAShort(); wScreenAngle = file.readAShort(); break; case 8740: appName = file.readAString(); break; case 8763: appCopyright = file.readAString(); break; case 8762: appAboutText = file.readAString(); break; case 8752: appDoc = file.readAString(); break; case 8754: loadGlobalValues(file); break; case 8755: loadGlobalStrings(file); break; case 8745: case 8767: OIList.preLoad(file); break; case 8747: loadFrameHandles(file, _local2.chSize); break; case 0x3333: frameOffsets[frameMaxIndex] = file.getFilePointer(); _local6 = new CChunk(); while (_local6.chID != 0x7F7F) { _local6.readHeader(file); if (_local6.chSize == 0){ } else { _local8 = (file.getFilePointer() + _local6.chSize); switch (_local6.chID){ case 13108: break; case 13110: _local9 = file.readAString(); framePasswords[frameMaxIndex] = _local9; _local4++; break; case 13129: frameEffects[frameMaxIndex] = file.readAInt(); frameEffectParams[frameMaxIndex] = file.readAInt(); break; }; file.seek(_local8); }; }; frameMaxIndex++; break; case 8756: extLoader = new CExtLoader(this); extLoader.loadList(file); break; case 8760: _local7 = file.readAInt(); embeddedFiles = new Array(_local7); _local5 = 0; while (_local5 < _local7) { embeddedFiles[_local5] = new CEmbeddedFile(this); embeddedFiles[_local5].preLoad(); _local5++; }; break; case 0x6666: imageBank.preLoad(file); break; case 26215: fontBank.preLoad(file); break; case 26216: soundBank.preLoad(file); break; }; file.seek(_local3); }; }; soundPlayer.setMultipleSounds(!(((gaFlags & GA_MIX) == 0))); if ((((parentApp == null)) && ((bPreloader == false)))){ mainSprite = new Sprite(); if ((stage.getChildByName("root1") as SystemManager) != null){ (stage.getChildByName("root1") as SystemManager).addChild(mainSprite); } else { stage.addChild(mainSprite); }; }; } public function stepApplication(_arg1:Event):void{ if (playApplication(false) == false){ endApplication(); }; } public function openFile(_arg1:String):CBinaryFile{ var array:ByteArray; var embed:CEmbeddedFile; var sharedObject:SharedObject; var fileName = _arg1; if (((!((fileName == null))) && ((fileName.length > 0)))){ array = null; try { sharedObject = SharedObject.getLocal(fileName); if (sharedObject.data.byteArray != null){ array = ByteArray(sharedObject.data.byteArray); }; } catch(error:Error) { }; if (array != null){ return (new CBinaryFile(array, false)); }; embed = getEmbeddedFile(fileName); if (embed != null){ return (embed.openMem()); }; }; return (null); } public function setTransparency(_arg1:Number):void{ mainSprite.alpha = (_arg1 * alpha); } public function closeHFile(_arg1:String):void{ var _local2:CEmbeddedFile; if (((!((_arg1 == null))) && ((_arg1.length > 0)))){ _local2 = getEmbeddedFile(_arg1); if (_local2 != null){ _local2.releaseFile(); }; }; } public function initGlobal():void{ var _local1:int; var _local2:CValue; if ((((parentApp == null)) || (((!((parentApp == null))) && (((parentOptions & CCCA.CCAF_SHARE_LIVES) == 0)))))){ lives = new Array(MAX_PLAYER); _local1 = 0; while (_local1 < MAX_PLAYER) { lives[_local1] = (gaLivesInit ^ 4294967295); _local1++; }; } else { lives = null; }; if ((((parentApp == null)) || (((!((parentApp == null))) && (((parentOptions & CCCA.CCAF_SHARE_SCORES) == 0)))))){ scores = new Array(MAX_PLAYER); _local1 = 0; while (_local1 < MAX_PLAYER) { scores[_local1] = (gaScoreInit ^ 4294967295); _local1++; }; } else { scores = null; }; playerNames = new Array(MAX_PLAYER); _local1 = 0; while (_local1 < MAX_PLAYER) { playerNames[_local1] = new String(""); _local1++; }; if ((((parentApp == null)) || (((!((parentApp == null))) && (((parentOptions & CCCA.CCAF_SHARE_GLOBALVALUES) == 0)))))){ gValues = new CArrayList(); _local1 = 0; while (_local1 < nGlobalValuesInit) { _local2 = new CValue(globalValuesInit[_local1]); gValues.add(_local2); _local1++; }; } else { gValues = null; }; tempGValue = new CValue(0); if ((((parentApp == null)) || (((!((parentApp == null))) && (((parentOptions & CCCA.CCAF_SHARE_GLOBALVALUES) == 0)))))){ gStrings = new CArrayList(); _local1 = 0; while (_local1 < nGlobalStringsInit) { gStrings.add(new String(globalStringsInit[_local1])); _local1++; }; } else { gStrings = null; }; } public function getKeyState(_arg1:int):Boolean{ return (!((keyBuffer[_arg1] == 0))); } public function onMouseWheel(_arg1:MouseEvent):void{ bMouseIn = true; deltaWheel = _arg1.delta; var _local2:CSysEventWheel = new CSysEventWheel(deltaWheel); sysEvents.add(_local2); } public function flushKeyboard():void{ var _local1:int; _local1 = 0; while (_local1 < MAX_VK) { keyBuffer[_local1] = 0; _local1++; }; keyNew = false; } public function onMouseMove(_arg1:MouseEvent):void{ bMouseIn = true; mouseX = ((_arg1.stageX - xMouseOffset) - xOffset); mouseY = ((_arg1.stageY - yMouseOffset) - yOffset); } public function getGlobalValues():CArrayList{ var _local1:CRunApp = this; while (_local1.gValues == null) { _local1 = _local1.parentApp; }; return (_local1.gValues); } public function setGlobalValueAt(_arg1:int, _arg2:CValue):void{ var _local3:CArrayList = checkGlobalValue(_arg1); if (_local3 != null){ CValue(_local3.get(_arg1)).forceValue(_arg2); }; } public function loadFrameHandles(_arg1:CFile, _arg2:int):void{ var _local3:int; frameMaxHandle = (_arg2 / 2); frameHandleToIndex = new Array(frameMaxHandle); _local3 = 0; while (_local3 < frameMaxHandle) { frameHandleToIndex[_local3] = _arg1.readAShort(); _local3++; }; } public function getScores():Array{ var _local1:CRunApp = this; while (_local1.scores == null) { _local1 = parentApp; }; return (_local1.scores); } public function loopFrame():Boolean{ if (frame.levelQuit == 0){ frame.levelQuit = run.doRunLoop(); }; return ((frame.levelQuit == 0)); } public function onMouseUp(_arg1:MouseEvent):void{ keyBuffer[260] = 0; } public function getLives():Array{ var _local1:CRunApp = this; while (_local1.lives == null) { _local1 = parentApp; }; return (_local1.lives); } public function endFrame():void{ var _local1:int; var _local2:int; mochiFrame = currentFrame; _local1 = run.killRunLoop(frame.levelQuit, false); if ((gaNewFlags & GANF_RUNFRAME) != 0){ appRunningState = SL_QUIT; } else { switch (CServices.LOWORD(_local1)){ case 1: nextFrame = (currentFrame + 1); appRunningState = SL_STARTFRAME; break; case 2: nextFrame = Math.max(0, (currentFrame - 1)); appRunningState = SL_STARTFRAME; break; case 3: appRunningState = SL_STARTFRAME; if ((CServices.HIWORD(_local1) & 0x8000) != 0){ nextFrame = (CServices.HIWORD(_local1) & 32767); if (nextFrame >= gaNbFrames){ nextFrame = (gaNbFrames - 1); }; if (nextFrame < 0){ nextFrame = 0; }; } else { if (CServices.HIWORD(_local1) < frameMaxHandle){ nextFrame = frameHandleToIndex[CServices.HIWORD(_local1)]; if (nextFrame == -1){ nextFrame = (currentFrame + 1); }; } else { nextFrame = (currentFrame + 1); }; }; break; case 4: appRunningState = SL_RESTART; nextFrame = startFrame; break; default: appRunningState = SL_QUIT; break; }; }; if (appRunningState == SL_STARTFRAME){ if ((((nextFrame < 0)) || ((nextFrame >= gaNbFrames)))){ appRunningState = SL_QUIT; }; }; if (((!((appRunningState == SL_STARTFRAME))) || (!((nextFrame == currentFrame))))){ _local2 = 0; while (_local2 < frame.nLayers) { frame.layers[_local2].deletePlanes(); _local2++; }; mainSprite.removeChild(planeControls); frame = null; run = null; currentFrame = -1; }; } public function setMouseOffsets(_arg1:int, _arg2:int):void{ xMouseOffset = _arg1; yMouseOffset = _arg2; } public function checkGlobalValue(_arg1:int):CArrayList{ var _local4:int; var _local2:CArrayList = getGlobalValues(); if ((((_arg1 < 0)) || ((_arg1 > 1000)))){ return (null); }; var _local3:int = _local2.size(); if (_arg1 >= _local3){ _local2.ensureCapacity(_arg1); _local4 = _local3; while (_local4 <= _arg1) { _local2.add(new CValue(0)); _local4++; }; }; return (_local2); } public function endApplication():void{ if (parentApp == null){ stage.removeEventListener(KeyboardEvent.KEY_DOWN, onKeyDown); stage.removeEventListener(KeyboardEvent.KEY_UP, onKeyUp); stage.removeEventListener(Event.ENTER_FRAME, stepApplication); stage.removeEventListener(Event.MOUSE_LEAVE, onMouseLeave); stage.removeEventListener(Event.ACTIVATE, onActivate); stage.removeEventListener(Event.DEACTIVATE, onDeactivate); }; mainSprite.removeEventListener(MouseEvent.MOUSE_DOWN, onMouseDown); mainSprite.removeEventListener(MouseEvent.MOUSE_UP, onMouseUp); mainSprite.removeEventListener(MouseEvent.MOUSE_MOVE, onMouseMove); mainSprite.removeEventListener(MouseEvent.MOUSE_WHEEL, onMouseWheel); if (soundPlayer != null){ soundPlayer.stopAllSounds(); }; if (file != null){ file.close(); }; } public function click(_arg1:int):void{ if (run != null){ run.rhEvtProg.onMouseButton(0, _arg1); run.setFocus(); if (_arg1 == 1){ run.click(); }; if (_arg1 == 2){ run.doubleClick(); }; }; } public function playApplication(_arg1:Boolean):Boolean{ if (adClip != null){ return (true); }; if (startDemoWarning != 0){ if (demoWarning == null){ demoWarning = new CDemoWarning(this, startDemoWarning); }; if (demoWarning.handle() == false){ return (true); }; demoWarning = null; startDemoWarning = 0; }; var _local2:Boolean; var _local3:Boolean; do { switch (appRunningState){ case SL_RESTART: initGlobal(); nextFrame = startFrame; appRunningState = 1; killGlobalData(); if (_arg1){ _local2 = false; break; }; case SL_STARTFRAME: startTheFrame(); if (mochiStart.startIntroAd()){ return (true); }; break; case SL_FRAMELOOP: if (loopFrame() == false){ endFrame(); if (mochiStart.startFrameAd()){ mochiFrameLast = mochiFrame; return (true); }; } else { _local2 = false; }; break; case SL_ENDFRAME: endFrame(); if (mochiStart.startFrameAd()){ mochiFrameLast = mochiFrame; return (true); }; break; case SL_WAITFORMOCHI: appRunningState = SL_QUIT; break; default: _local2 = false; break; }; } while ((((_local2 == true)) && ((quit == false)))); if (appRunningState == SL_QUIT){ if (mochiFrame != mochiFrameLast){ if (mochiStart.startEndAd()){ appRunningState = SL_WAITFORMOCHI; return (true); }; }; _local3 = false; }; return (_local3); } public function startApplication():void{ var _local1:int; sysEvents = new CArrayList(); keyBuffer = new ByteArray(); _local1 = 0; while (_local1 < MAX_VK) { keyBuffer.writeByte(0); _local1++; }; mainSprite.addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown); mainSprite.addEventListener(MouseEvent.MOUSE_UP, onMouseUp); mainSprite.addEventListener(MouseEvent.MOUSE_MOVE, onMouseMove); mainSprite.addEventListener(MouseEvent.MOUSE_WHEEL, onMouseWheel); if ((((parentApp == null)) && ((bPreloader == false)))){ if ((gaFlags & GA_STRETCH) != 0){ stage.scaleMode = "exactFit"; }; stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown); stage.addEventListener(KeyboardEvent.KEY_UP, onKeyUp); stage.addEventListener(Event.ENTER_FRAME, stepApplication); stage.addEventListener(Event.MOUSE_LEAVE, onMouseLeave); stage.addEventListener(Event.ACTIVATE, onActivate); stage.addEventListener(Event.DEACTIVATE, onDeactivate); }; xMouseOffset = 0; yMouseOffset = 0; appRunningState = 0; currentFrame = -2; mochiStart = new CMoStart(this); } public function getEmbeddedFile(_arg1:String):CEmbeddedFile{ var _local3:int; var _local4:int; var _local2:String = _arg1; _local3 = _arg1.lastIndexOf("\\"); if (_local3 >= 0){ _local2 = _arg1.substring((_local3 + 1)); }; if (embeddedFiles != null){ _local4 = 0; while (_local4 < embeddedFiles.length) { if (CServices.compareStringsIgnoreCase(embeddedFiles[_local4].path, _local2)){ return (embeddedFiles[_local4]); }; _local4++; }; }; return (null); } public function closeFile(_arg1:String):void{ closeHFile(_arg1); } public function getGlobalStrings():CArrayList{ var _local1:CRunApp = this; while (_local1.gStrings == null) { _local1 = _local1.parentApp; }; return (_local1.gStrings); } public function resetLayers():void{ var _local1:int; if (parentApp != null){ xOffset = 0; yOffset = 0; } else { xOffset = ((gaCxWin / 2) - (frame.leEditWinWidth / 2)); yOffset = ((gaCyWin / 2) - (frame.leEditWinHeight / 2)); }; _local1 = 0; while (_local1 < frame.nLayers) { frame.layers[_local1].resetPlanes(xOffset, yOffset); _local1++; }; planeControls.x = xOffset; planeControls.y = yOffset; } public function onDeactivate(_arg1:Event):void{ bActivated = false; } public function getCtrlType():Array{ var _local1:CRunApp = this; while (((!((_local1.parentApp == null))) && (!(((_local1.parentOptions & CCCA.CCAF_SHARE_PLAYERCTRLS) == 0))))) { _local1 = _local1.parentApp; }; return (_local1.pcCtrlType); } public function loadAppHeader(_arg1:CFile):void{ var _local2:int; var _local3:int; _arg1.skipBytes(4); gaFlags = _arg1.readAShort(); gaNewFlags = _arg1.readAShort(); gaMode = _arg1.readAShort(); gaOtherFlags = _arg1.readAShort(); gaCxWin = _arg1.readAShort(); gaCyWin = _arg1.readAShort(); gaScoreInit = _arg1.readAInt(); gaLivesInit = _arg1.readAInt(); pcCtrlType = new Array(MAX_PLAYER); _local2 = 0; while (_local2 < MAX_PLAYER) { pcCtrlType[_local2] = _arg1.readAShort(); _local2++; }; pcCtrlKeys = new Array((MAX_PLAYER * MAX_KEY)); _local2 = 0; while (_local2 < MAX_PLAYER) { _local3 = 0; while (_local3 < MAX_KEY) { pcCtrlKeys[((_local2 * MAX_KEY) + _local3)] = CKeyConvert.getFlashKey(_arg1.readAShort()); _local3++; }; _local2++; }; gaBorderColour = _arg1.readAColor(); gaNbFrames = _arg1.readAInt(); gaFrameRate = _arg1.readAInt(); _arg1.skipBytes(1); _arg1.skipBytes(3); } public function openHFile(_arg1:String):CBinaryFile{ var _local2:CEmbeddedFile; if (((!((_arg1 == null))) && ((_arg1.length > 0)))){ _local2 = getEmbeddedFile(_arg1); if (_local2 != null){ return (_local2.openMem()); }; }; return (null); } public function getGlobalStringAt(_arg1:int):String{ var _local2:CArrayList = checkGlobalString(_arg1); if (_local2 != null){ return (String(_local2.get(_arg1))); }; return (""); } public function onMouseDown(_arg1:MouseEvent):void{ bMouseIn = true; keyBuffer[260] = 1; var _local2:int = getTimer(); if (((((_local2 - doubleClickTime) >= 0)) && (((_local2 - doubleClickTime) < 200)))){ click(2); doubleClickTime = 0; } else { click(1); doubleClickTime = getTimer(); }; } public function setGlobalStringAt(_arg1:int, _arg2:String):void{ var _local3:CArrayList = checkGlobalString(_arg1); if (_local3 != null){ _local3.set(_arg1, new String(_arg2)); }; } public function killGlobalData():void{ adGO = null; } public function onActivate(_arg1:Event):void{ bActivated = true; } public function startTheFrame():void{ var _local1:int; if (nextFrame != currentFrame){ frame = new CRunFrame(this); frame.loadFullFrame(nextFrame); }; currentFrame = nextFrame; frame.leX = (frame.leY = 0); frame.leLastScrlX = (frame.leLastScrlY = 0); frame.rhOK = false; frame.levelQuit = 0; if (parentApp == null){ mainSprite.graphics.clear(); mainSprite.graphics.beginFill(gaBorderColour); mainSprite.graphics.drawRect(0, 0, gaCxWin, gaCyWin); mainSprite.graphics.endFill(); setEffect(frameEffects[currentFrame], frameEffectParams[currentFrame]); }; if (parentApp != null){ xOffset = 0; yOffset = 0; } else { xOffset = ((gaCxWin / 2) - (frame.leEditWinWidth / 2)); yOffset = ((gaCyWin / 2) - (frame.leEditWinHeight / 2)); }; _local1 = 0; while (_local1 < frame.nLayers) { frame.layers[_local1].createPlanes(xOffset, yOffset); _local1++; }; planeControls = new Sprite(); planeControls.x = xOffset; planeControls.y = yOffset; mainSprite.addChild(planeControls); flushKeyboard(); run = new CRun(this, frame); run.initRunLoop(false); frame.rhPtr = run; appRunningState = SL_FRAMELOOP; } } }//package Application
Section 48
//CRunFrame (Application.CRunFrame) package Application { import Services.*; import OI.*; import RunLoop.*; import Objects.*; import Sprites.*; import Events.*; import Frame.*; public class CRunFrame { public var leHeight:int; public var leEditWinWidth:int; public var leBackground:int; public var maxObjects:int; public var rhOK:Boolean; public var fadeTimerDelta:int; public var frameName:String; public var leFlags:int; public var leLastScrlX:int; public var app:CRunApp; public var leY:int; public var leLastScrlY:int; public var startLeX:int; public var LOList:CLOList; public var startLeY:int; public var leEditWinHeight:int; public var layers:Array; public var leWidth:int; public var nLayers:int; public var leVirtualRect:CRect; public var m_dwMvtTimerBase:int; public var rhPtr:CRun; public var m_wRandomSeed:int; public var evtProg:CEventProgram; public var levelQuit:int; public var fadeVblDelta:int; public var fade:Boolean; public var leX:int; public static var LEF_NOSURFACE:int = 0x0800; public static var CM_OBSTACLE:int = 1; public static var LEF_RESIZEATSTART:int = 0x0100; public static var LEF_KEEPDISPLAY:int = 4; public static var LEF_TIMEDMVTS:int = 0x8000; public static var CM_TEST_OBSTACLE:int = 0; public static var CM_PLATFORM:int = 2; public static var HEIGHT_PLATFORM:int = 6; public static var CM_TEST_PLATFORM:int = 1; public static var LEF_TOTALCOLMASK:int = 32; public static var LEF_DISPLAYNAME:int = 1; public static var LEF_GRABDESKTOP:int = 2; public function CRunFrame(_arg1:CRunApp){ app = _arg1; } public function loadHeader():void{ leWidth = app.file.readAInt(); leHeight = app.file.readAInt(); leBackground = app.file.readAColor(); leFlags = app.file.readAInt(); } public function loadLayers():void{ var _local1:int; nLayers = app.file.readAInt(); layers = new Array(nLayers); _local1 = 0; while (_local1 < nLayers) { layers[_local1] = new CLayer(app); layers[_local1].load(app.file); _local1++; }; } public function loadFullFrame(_arg1:int):void{ var _local3:int; var _local6:int; var _local7:CLO; var _local8:CLO; app.file.seek(app.frameOffsets[_arg1]); evtProg = new CEventProgram(); LOList = new CLOList(); leVirtualRect = new CRect(); var _local2:CChunk = new CChunk(); var _local4:int; var _local5:int; m_wRandomSeed = -1; while (_local2.chID != 0x7F7F) { _local2.readHeader(app.file); if (_local2.chSize == 0){ } else { _local3 = (app.file.getFilePointer() + _local2.chSize); switch (_local2.chID){ case 13108: loadHeader(); if (((!((app.parentApp == null))) && (!(((app.parentOptions & CCCA.CCAF_DOCKED) == 0))))){ leEditWinWidth = app.cx; leEditWinHeight = app.cy; } else { leEditWinWidth = Math.min(app.gaCxWin, leWidth); leEditWinHeight = Math.min(app.gaCyWin, leHeight); }; break; case 13122: leVirtualRect.load(app.file); break; case 13124: m_wRandomSeed = app.file.readAShort(); break; case 13127: m_dwMvtTimerBase = app.file.readAInt(); break; case 13109: frameName = app.file.readAString(); break; case 13121: loadLayers(); break; case 13125: loadLayerEffects(); break; case 13112: LOList.load(app); break; case 13117: evtProg.load(app); maxObjects = evtProg.maxObjects; break; }; app.file.seek(_local3); }; }; app.OIList.resetToLoad(); _local6 = 0; while (_local6 < LOList.nIndex) { _local7 = LOList.getLOFromIndex(_local6); app.OIList.setToLoad(_local7.loOiHandle); _local6++; }; app.imageBank.resetToLoad(); app.fontBank.resetToLoad(); app.OIList.load(app.file); app.OIList.enumElements(app.imageBank, app.fontBank); app.imageBank.load(app.file); app.fontBank.load(app.file); evtProg.enumSounds(app.soundBank); app.soundBank.load(); app.OIList.resetOICurrent(); _local6 = 0; while (_local6 < LOList.nIndex) { _local8 = LOList.list[_local6]; if (_local8.loType >= COI.OBJ_SPR){ app.OIList.setOICurrent(_local8.loOiHandle); }; _local6++; }; } public function loadLayerEffects():void{ var _local1:int; _local1 = 0; while (_local1 < nLayers) { layers[_local1].effect = app.file.readAInt(); layers[_local1].effectParam = app.file.readAInt(); app.file.skipBytes(12); _local1++; }; } } }//package Application
Section 49
//CSoundPlayer (Application.CSoundPlayer) package Application { import Banks.*; public class CSoundPlayer { public var bLocked:Array; public var bMultipleSounds:Boolean;// = false public var volumes:Array; public var app:CRunApp; public var mainPan:Number; public var mainVolume:Number; public var sounds:Array; public var nChannels:int;// = 32 public var bOn:Boolean;// = true public var pans:Array; public static var nChannels:int = 32; public function CSoundPlayer(_arg1:CRunApp){ var _local2:int; super(); app = _arg1; sounds = new Array(nChannels); volumes = new Array(nChannels); pans = new Array(nChannels); bLocked = new Array(nChannels); _local2 = 0; while (_local2 < nChannels) { sounds[_local2] = null; volumes[_local2] = 1; pans[_local2] = 0; bLocked[_local2] = false; _local2++; }; mainVolume = 1; mainPan = 0; } public function stop(_arg1:int):void{ var _local2:int; _local2 = 0; while (_local2 < nChannels) { if (sounds[_local2] != null){ if (sounds[_local2].handle == _arg1){ sounds[_local2].stop(); }; }; _local2++; }; } public function setMultipleSounds(_arg1:Boolean):void{ bMultipleSounds = _arg1; } public function isChannelPaused(_arg1:int):Boolean{ if ((((_arg1 >= 0)) && ((_arg1 < nChannels)))){ if (sounds[_arg1] != null){ return (sounds[_arg1].isPaused()); }; }; return (false); } public function setSamplePos(_arg1:int, _arg2:Number):void{ var _local3:int; _local3 = 0; while (_local3 < nChannels) { if (sounds[_local3] != null){ if (sounds[_local3].handle == _arg1){ sounds[_local3].startPosition(_arg2); }; }; _local3++; }; } public function getChannelPan(_arg1:int):Number{ if ((((_arg1 >= 0)) && ((_arg1 < nChannels)))){ return (pans[_arg1]); }; return (0); } public function resumeChannel(_arg1:int):void{ if ((((_arg1 >= 0)) && ((_arg1 < nChannels)))){ if (sounds[_arg1] != null){ sounds[_arg1].resume(); }; }; } public function isSamplePlaying(_arg1:int):Boolean{ var _local2:int; _local2 = 0; while (_local2 < nChannels) { if (sounds[_local2] != null){ if (sounds[_local2].handle == _arg1){ return (sounds[_local2].isPlaying()); }; }; _local2++; }; return (false); } public function setChannelPan(_arg1:int, _arg2:Number):void{ if ((((_arg1 >= 0)) && ((_arg1 < nChannels)))){ pans[_arg1] = _arg2; if (sounds[_arg1] != null){ sounds[_arg1].setPan(_arg2); }; }; } public function keepCurrentSounds():void{ var _local1:int; _local1 = 0; while (_local1 < nChannels) { if (sounds[_local1] != null){ if (sounds[_local1].isPlaying()){ app.soundBank.setToLoad(sounds[_local1].handle); }; }; _local1++; }; } public function unlockChannel(_arg1:int):void{ if ((((_arg1 >= 0)) && ((_arg1 < nChannels)))){ bLocked[_arg1] = false; }; } public function stopChannel(_arg1:int):void{ if ((((_arg1 >= 0)) && ((_arg1 < nChannels)))){ if (sounds[_arg1] != null){ sounds[_arg1].stop(); }; }; } public function getMainVolume():Number{ return (mainVolume); } public function pauseChannel(_arg1:int):void{ if ((((_arg1 >= 0)) && ((_arg1 < nChannels)))){ if (sounds[_arg1] != null){ sounds[_arg1].pause(); }; }; } public function resume():void{ var _local1:int; _local1 = 0; while (_local1 < nChannels) { if (sounds[_local1] != null){ sounds[_local1].resume(); }; _local1++; }; } public function resumeHandle(_arg1:int):void{ var _local2:int; _local2 = 0; while (_local2 < nChannels) { if (sounds[_local2] != null){ if (sounds[_local2].handle == _arg1){ sounds[_local2].resume(); }; }; _local2++; }; } public function setChannelVolume(_arg1:int, _arg2:Number):void{ if ((((_arg1 >= 0)) && ((_arg1 < nChannels)))){ volumes[_arg1] = _arg2; if (sounds[_arg1] != null){ sounds[_arg1].setVolume(_arg2); }; }; } public function pauseHandle(_arg1:int):void{ var _local2:int; _local2 = 0; while (_local2 < nChannels) { if (sounds[_local2] != null){ if (sounds[_local2].handle == _arg1){ sounds[_local2].pause(); }; }; _local2++; }; } public function getSampleDur(_arg1:String):Number{ var _local2:int = getChannel(_arg1); if (_local2 >= 0){ return (sounds[_local2].getLength()); }; return (0); } public function play(_arg1:int, _arg2:int, _arg3:int, _arg4:Boolean):void{ var _local6:int; if (bOn == false){ return; }; var _local5:CSound = app.soundBank.getSoundFromHandle(_arg1); if (_local5 == null){ return; }; if (bMultipleSounds){ if (_arg3 < 0){ _local6 = 0; while (_local6 < nChannels) { if (sounds[_local6] == _local5){ _local5 = sounds[_local6].duplicate(); break; }; _local6++; }; _local6 = 0; while (_local6 < nChannels) { if ((((sounds[_local6] == null)) && ((bLocked[_local6] == false)))){ break; }; _local6++; }; if (_local6 == nChannels){ _local6 = 0; while (_local6 < nChannels) { if ((((((bLocked[_local6] == false)) && (!((sounds[_local6] == null))))) && ((sounds[_local6].bLocked == false)))){ break; }; _local6++; }; if (_local6 == nChannels){ return; }; }; _arg3 = _local6; } else { if (((!((sounds[_arg3] == null))) && ((sounds[_arg3].bLocked == true)))){ return; }; if (sounds[_arg3] != _local5){ _local6 = 0; while (_local6 < nChannels) { if (sounds[_local6] == _local5){ _local5 = sounds[_local6].duplicate(); }; _local6++; }; }; }; } else { if (sounds[0] != null){ if (sounds[0].bLocked){ return; }; if (sounds[0] == _local5){ sounds[0].startAgain(_arg2, _arg4); return; }; _arg3 = 0; } else { _arg3 = 0; }; }; if ((((_arg3 < 0)) || ((_arg3 >= nChannels)))){ return; }; if (sounds[_arg3] != null){ sounds[_arg3].stop(); }; sounds[_arg3] = _local5; sounds[_arg3].play(_arg2, _arg4, volumes[_arg3], pans[_arg3]); } public function getChannelVolume(_arg1:int):Number{ if ((((_arg1 >= 0)) && ((_arg1 < nChannels)))){ return (volumes[_arg1]); }; return (1); } public function getChannel(_arg1:String):int{ var _local2:int; _local2 = 0; while (_local2 < nChannels) { if (sounds[_local2] != null){ if (sounds[_local2].name == _arg1){ return (_local2); }; }; _local2++; }; return (-1); } public function getChannelPos(_arg1:int):Number{ if ((((_arg1 >= 0)) && ((_arg1 < nChannels)))){ if (sounds[_arg1] != null){ return (sounds[_arg1].getPosition()); }; }; return (0); } public function isSamplePaused(_arg1:int):Boolean{ var _local2:int; _local2 = 0; while (_local2 < nChannels) { if (sounds[_local2] != null){ if (sounds[_local2].handle == _arg1){ return (sounds[_local2].isPaused()); }; }; _local2++; }; return (false); } public function setChannelPos(_arg1:int, _arg2:Number):void{ if ((((_arg1 >= 0)) && ((_arg1 < nChannels)))){ if (sounds[_arg1] != null){ sounds[_arg1].startPosition(_arg2); }; }; } public function setOnOff(_arg1:Boolean):void{ if (_arg1 != bOn){ bOn = _arg1; if (bOn == false){ stopAllSounds(); }; }; } public function setMainVolume(_arg1:Number):void{ var _local2:int; mainVolume = _arg1; _local2 = 0; while (_local2 < nChannels) { volumes[_local2] = _arg1; if (sounds[_local2] != null){ sounds[_local2].setVolume(_arg1); }; _local2++; }; } public function lockChannel(_arg1:int):void{ if ((((_arg1 >= 0)) && ((_arg1 < nChannels)))){ bLocked[_arg1] = true; }; } public function getOnOff():Boolean{ return (bOn); } public function getSamplePan(_arg1:String):Number{ var _local2:int = getChannel(_arg1); if (_local2 >= 0){ return (sounds[_local2].getPan()); }; return (0); } public function setSamplePan(_arg1:int, _arg2:Number):void{ var _local3:int; _local3 = 0; while (_local3 < nChannels) { if (sounds[_local3] != null){ if (sounds[_local3].handle == _arg1){ sounds[_local3].setPan(_arg2); }; }; _local3++; }; } public function getSampleVolume(_arg1:String):Number{ var _local2:int = getChannel(_arg1); if (_local2 >= 0){ return (sounds[_local2].getVolume()); }; return (0); } public function setMainPan(_arg1:Number):void{ var _local2:int; mainPan = _arg1; _local2 = 0; while (_local2 < nChannels) { pans[_local2] = _arg1; if (sounds[_local2] != null){ sounds[_local2].setPan(_arg1); }; _local2++; }; } public function stopAllSounds():void{ var _local1:int; _local1 = 0; while (_local1 < nChannels) { if (sounds[_local1] != null){ sounds[_local1].stop(); }; _local1++; }; } public function getSamplePosition(_arg1:String):Number{ var _local2:int = getChannel(_arg1); if (_local2 >= 0){ return (sounds[_local2].getPosition()); }; return (0); } public function setSampleVolume(_arg1:int, _arg2:Number):void{ var _local3:int; _local3 = 0; while (_local3 < nChannels) { if (sounds[_local3] != null){ if (sounds[_local3].handle == _arg1){ sounds[_local3].setVolume(_arg2); }; }; _local3++; }; } public function getMainPan():Number{ return (mainPan); } public function soundComplete(_arg1:CSound):void{ var _local2:int; _local2 = 0; while (_local2 < nChannels) { if (sounds[_local2] == _arg1){ sounds[_local2] = null; break; }; _local2++; }; } public function isSoundPlaying():Boolean{ var _local1:int; _local1 = 0; while (_local1 < nChannels) { if (sounds[_local1] != null){ return (sounds[_local1].isPlaying()); }; _local1++; }; return (false); } public function getChannelDur(_arg1:int):Number{ if ((((_arg1 >= 0)) && ((_arg1 < nChannels)))){ if (sounds[_arg1] != null){ return (sounds[_arg1].getLength()); }; }; return (0); } public function isChannelPlaying(_arg1:int):Boolean{ if ((((_arg1 >= 0)) && ((_arg1 < nChannels)))){ if (sounds[_arg1] != null){ return (sounds[_arg1].isPlaying()); }; }; return (false); } public function pause():void{ var _local1:int; _local1 = 0; while (_local1 < nChannels) { if (sounds[_local1] != null){ sounds[_local1].pause(); }; _local1++; }; } } }//package Application
Section 50
//CSysEvent (Application.CSysEvent) package Application { import RunLoop.*; public class CSysEvent { public function execute(_arg1:CRun):void{ } } }//package Application
Section 51
//CSysEventClick (Application.CSysEventClick) package Application { import RunLoop.*; public class CSysEventClick extends CSysEvent { public var clicks:int; public var key:int; public function CSysEventClick(_arg1:int, _arg2:int){ key = _arg1; clicks = _arg2; } override public function execute(_arg1:CRun):void{ _arg1.rhEvtProg.onMouseButton(key, clicks); _arg1.setFocus(); if (clicks == 1){ _arg1.click(); }; if (clicks == 2){ _arg1.doubleClick(); }; } } }//package Application
Section 52
//CSysEventKeyDown (Application.CSysEventKeyDown) package Application { import RunLoop.*; public class CSysEventKeyDown extends CSysEvent { public var key:int; public function CSysEventKeyDown(_arg1:int){ key = _arg1; } override public function execute(_arg1:CRun):void{ _arg1.rhEvtProg.onKeyDown(key); } } }//package Application
Section 53
//CSysEventWheel (Application.CSysEventWheel) package Application { import RunLoop.*; public class CSysEventWheel extends CSysEvent { private var delta:int; public function CSysEventWheel(_arg1:int){ delta = _arg1; } override public function execute(_arg1:CRun):void{ _arg1.rhWheelCount = _arg1.rh4EventCount; if (delta < 0){ _arg1.rhEvtProg.handle_GlobalEvents(((-12 << 16) | 65530)); } else { _arg1.rhEvtProg.handle_GlobalEvents(((-11 << 16) | 65530)); }; } } }//package Application
Section 54
//CFont (Banks.CFont) package Banks { import Services.*; public class CFont { public var lfHeight:int; public var useCount:int; public var lfItalic:int; public var lfCharSet:int; public var lfPitchAndFamily:int; public var lfWeight:int; public var lfUnderline:int; public var lfStrikeOut:int; public var lfQuality:int; public var handle:int; public var lfFaceName:String; public var lfOutPrecision:int; public var lfWidth:int; public var lfClipPrecision:int; public var lfOrientation:int; public var lfEscapement:int; public function getEmbeddedName():String{ var _local1:String; _local1 = "Emb"; _local1 = (_local1 + lfFaceName); if (lfItalic != 0){ _local1 = (_local1 + "Italic"); }; if (lfWeight > 600){ _local1 = (_local1 + "Bold"); }; return (_local1); } public function getFontInfo():CFontInfo{ var _local1:CFontInfo = new CFontInfo(); _local1.lfHeight = lfHeight; _local1.lfWeight = lfWeight; _local1.lfItalic = lfItalic; _local1.lfUnderline = lfUnderline; _local1.lfStrikeOut = lfStrikeOut; _local1.lfFaceName = new String(lfFaceName); return (_local1); } public function createDefaultFont():void{ lfHeight = 12; lfWeight = 400; lfItalic = 0; lfUnderline = 0; lfStrikeOut = 0; lfFaceName = "Arial"; } public function load(_arg1:CFile):void{ handle = _arg1.readAInt(); _arg1.skipBytes(12); var _local2:int = _arg1.getFilePointer(); lfHeight = _arg1.readAInt(); if (lfHeight < 0){ lfHeight = -(lfHeight); }; lfWidth = _arg1.readAInt(); lfEscapement = _arg1.readAInt(); lfOrientation = _arg1.readAInt(); lfWeight = _arg1.readAInt(); lfItalic = _arg1.readAByte(); lfUnderline = _arg1.readAByte(); lfStrikeOut = _arg1.readAByte(); lfCharSet = _arg1.readAByte(); lfOutPrecision = _arg1.readAByte(); lfClipPrecision = _arg1.readAByte(); lfQuality = _arg1.readAByte(); lfPitchAndFamily = _arg1.readAByte(); lfFaceName = _arg1.readAString(); if (_arg1.bUnicode == false){ _arg1.seek((_local2 + 60)); } else { _arg1.seek((_local2 + 92)); }; } public function loadHandle(_arg1:CFile):void{ handle = _arg1.readAInt(); if (_arg1.bUnicode == false){ _arg1.skipBytes(72); } else { _arg1.skipBytes(104); }; } } }//package Banks
Section 55
//CFontBank (Banks.CFontBank) package Banks { import Services.*; public class CFontBank implements IEnum { private var maxHandlesReel:int; public var fonts:Array; private var maxHandlesTotal:int; private var handleToIndex:Array; private var useCount:Array; private var offsetsToFonts:Array; private var nullFont:CFont; public var file:CFile; private var nFonts:int; public function getFontFromIndex(_arg1:int):CFont{ if ((((_arg1 >= 0)) && ((_arg1 < nFonts)))){ return (fonts[_arg1]); }; return (null); } public function setToLoad(_arg1:int):void{ if (_arg1 == -1){ if (nullFont == null){ nullFont = new CFont(); nullFont.createDefaultFont(); }; return; }; var _local2 = useCount; var _local3 = _arg1; var _local4 = (_local2[_local3] + 1); _local2[_local3] = _local4; } public function getFontFromHandle(_arg1:int):CFont{ if (_arg1 == -1){ return (nullFont); }; if ((((_arg1 >= 0)) && ((_arg1 < maxHandlesTotal)))){ if (handleToIndex[_arg1] != -1){ return (fonts[handleToIndex[_arg1]]); }; }; return (null); } public function addFont(_arg1:CFontInfo):int{ var _local2:int; var _local3:int; var _local5:int; var _local7:Array; var _local8:Array; _local3 = 0; while (_local3 < nFonts) { if (fonts[_local3] == null){ } else { if (fonts[_local3].lfHeight != _arg1.lfHeight){ } else { if (fonts[_local3].lfWeight != _arg1.lfWeight){ } else { if (fonts[_local3].lfItalic != _arg1.lfItalic){ } else { if (fonts[_local3].lfUnderline != _arg1.lfUnderline){ } else { if (fonts[_local3].lfStrikeOut != _arg1.lfStrikeOut){ } else { if (CServices.compareStringsIgnoreCase(fonts[_local3].lfFaceName, _arg1.lfFaceName) == false){ } else { break; }; }; }; }; }; }; }; _local3++; }; if (_local3 < nFonts){ return (fonts[_local3].handle); }; var _local4 = -1; _local2 = maxHandlesReel; while (_local2 < maxHandlesTotal) { if (handleToIndex[_local2] == -1){ _local4 = _local2; break; }; _local2++; }; if (_local4 == -1){ _local7 = new Array((maxHandlesTotal + 10)); _local2 = 0; while (_local2 < maxHandlesTotal) { _local7[_local2] = handleToIndex[_local2]; _local2++; }; while (_local2 < (maxHandlesTotal + 10)) { _local7[_local2] = -1; _local2++; }; _local4 = maxHandlesTotal; maxHandlesTotal = (maxHandlesTotal + 10); handleToIndex = _local7; }; var _local6 = -1; _local5 = 0; while (_local5 < nFonts) { if (fonts[_local5] == null){ _local6 = _local5; break; }; _local5++; }; if (_local6 == -1){ _local8 = new Array((nFonts + 10)); _local5 = 0; while (_local5 < nFonts) { _local8[_local5] = fonts[_local5]; _local5++; }; while (_local5 < (nFonts + 10)) { _local8[_local5] = null; _local5++; }; _local6 = nFonts; nFonts = (nFonts + 10); fonts = _local8; }; handleToIndex[_local4] = _local6; fonts[_local6] = new CFont(); fonts[_local6].handle = _local4; fonts[_local6].lfHeight = _arg1.lfHeight; fonts[_local6].lfWeight = _arg1.lfWeight; fonts[_local6].lfItalic = _arg1.lfItalic; fonts[_local6].lfUnderline = _arg1.lfUnderline; fonts[_local6].lfStrikeOut = _arg1.lfStrikeOut; fonts[_local6].lfFaceName = new String(_arg1.lfFaceName); return (_local4); } public function enumerate(_arg1:int):int{ setToLoad(_arg1); return (-1); } public function getFontInfoFromHandle(_arg1:int):CFontInfo{ var _local2:CFont = getFontFromHandle(_arg1); return (_local2.getFontInfo()); } public function load(_arg1:CFile):void{ var _local2:int; var _local5:int; nFonts = 0; _local2 = 0; while (_local2 < maxHandlesReel) { if (useCount[_local2] != 0){ nFonts++; }; _local2++; }; var _local3:Array = new Array(nFonts); var _local4:int; _local5 = 0; while (_local5 < maxHandlesReel) { if (useCount[_local5] != 0){ if (((((!((fonts == null))) && (!((handleToIndex[_local5] == -1))))) && (!((fonts[handleToIndex[_local5]] == null))))){ _local3[_local4] = fonts[handleToIndex[_local5]]; _local3[_local4].useCount = useCount[_local5]; } else { _local3[_local4] = new CFont(); _arg1.seek(offsetsToFonts[_local5]); _local3[_local4].load(_arg1); _local3[_local4].useCount = useCount[_local5]; }; _local4++; }; _local5++; }; fonts = _local3; handleToIndex = new Array(maxHandlesReel); _local2 = 0; while (_local2 < maxHandlesReel) { handleToIndex[_local2] = -1; _local2++; }; _local2 = 0; while (_local2 < nFonts) { handleToIndex[fonts[_local2].handle] = _local2; _local2++; }; maxHandlesTotal = maxHandlesReel; resetToLoad(); } public function preLoad(_arg1:CFile):void{ var _local3:int; var _local2:int = _arg1.readAInt(); maxHandlesReel = 0; var _local4:int = _arg1.getFilePointer(); var _local5:CFont = new CFont(); _local3 = 0; while (_local3 < _local2) { _local5.loadHandle(_arg1); maxHandlesReel = Math.max(maxHandlesReel, (_local5.handle + 1)); _local3++; }; _arg1.seek(_local4); offsetsToFonts = new Array(maxHandlesReel); _local3 = 0; while (_local3 < _local2) { _local4 = _arg1.getFilePointer(); _local5.loadHandle(_arg1); offsetsToFonts[_local5.handle] = _local4; _local3++; }; useCount = new Array(maxHandlesReel); resetToLoad(); handleToIndex = null; maxHandlesTotal = maxHandlesReel; nFonts = 0; fonts = null; } public function resetToLoad():void{ var _local1:int; _local1 = 0; while (_local1 < maxHandlesReel) { useCount[_local1] = 0; _local1++; }; } } }//package Banks
Section 56
//CImage (Banks.CImage) package Banks { import flash.display.*; import flash.geom.*; import Services.*; import flash.utils.*; import Sprites.*; public class CImage { public var img:BitmapData; public var width:int; public var useCount:int; public var maskRotation:CArrayList; public var xSpot:int; public var ySpot:int; public var height:int; public var handle:int; public var xAP:int; public var yAP:int; public var maskNormal:CMask; public var maskPlatform:CMask; public static var maxRotatedMasks:int = 10; public function CImage(){ maskRotation = null; } public function getMask(_arg1:int, _arg2:int, _arg3:Number, _arg4:Number):CMask{ var _local5:CRotatedMask; var _local6:int; var _local7:int; var _local8:int; if ((_arg1 & CMask.GCMF_PLATFORM) == 0){ if (maskNormal == null){ maskNormal = new CMask(); maskNormal.createMask(_arg1, this); }; if ((((((_arg2 == 0)) && ((_arg3 == 1)))) && ((_arg4 == 1)))){ return (maskNormal); }; if (maskRotation == null){ maskRotation = new CArrayList(); }; _local7 = 2147483647; _local8 = -1; _local6 = 0; while (_local6 < maskRotation.size()) { _local5 = CRotatedMask(maskRotation.get(_local6)); if ((((((_arg2 == _local5.angle)) && ((_arg3 == _local5.scaleX)))) && ((_arg4 == _local5.scaleY)))){ return (_local5.mask); }; if (_local5.tick < _local7){ _local7 = _local5.tick; _local8 = _local6; }; _local6++; }; if (maskRotation.size() < maxRotatedMasks){ _local8 = -1; }; _local5 = new CRotatedMask(); _local5.mask = new CMask(); _local5.mask.createRotatedMask(maskNormal, _arg2, _arg3, _arg4); _local5.angle = _arg2; _local5.scaleX = _arg3; _local5.scaleY = _arg4; _local5.tick = getTimer(); if (_local8 < 0){ maskRotation.add(_local5); } else { maskRotation.set(_local8, _local5); }; return (_local5.mask); //unresolved jump }; if (maskPlatform == null){ maskPlatform = new CMask(); maskPlatform.createMask(_arg1, this); }; return (maskPlatform); } public function load(_arg1:CFile):void{ handle = _arg1.readAShort(); width = _arg1.readAShort(); height = _arg1.readAShort(); xSpot = _arg1.readShort(); ySpot = _arg1.readShort(); xAP = _arg1.readShort(); yAP = _arg1.readShort(); var _local2:int = _arg1.readAInt(); var _local3:ByteArray = _arg1.readBuffer(_local2); var _local4:int = _local3.length; _local3.uncompress(); _local4 = _local3.length; img = new BitmapData(width, height, true); var _local5:Rectangle = new Rectangle(0, 0, width, height); img.setPixels(_local5, _local3); } public function loadHandle(_arg1:CFile):void{ handle = _arg1.readAShort(); _arg1.skipBytes(12); var _local2:int = _arg1.readAInt(); _arg1.skipBytes(_local2); } } }//package Banks
Section 57
//CImageBank (Banks.CImageBank) package Banks { import flash.display.*; import flash.geom.*; import Application.*; import Services.*; import flash.utils.*; public class CImageBank implements IEnum { private var offsetsToImage:Array; public var nImages:int; public var nHandlesTotal:int; private var useCount:Array; private var handleToIndex:Array; private var hsInfo:CPoint;// = null public var images:Array; public var app:CRunApp; public var nHandlesReel:int; public var file:CFile; private var apInfo:CPoint;// = null private var rcInfo:CRect;// = null public function CImageBank(_arg1:CRunApp){ app = _arg1; } public function addImage(_arg1:BitmapData, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int):int{ var _local7:int; var _local9:int; var _local11:Array; var _local12:Array; var _local8 = -1; _local7 = nHandlesReel; while (_local7 < nHandlesTotal) { if (handleToIndex[_local7] == -1){ _local8 = _local7; break; }; _local7++; }; if (_local8 == -1){ _local11 = new Array((nHandlesTotal + 10)); _local7 = 0; while (_local7 < nHandlesTotal) { _local11[_local7] = handleToIndex[_local7]; _local7++; }; while (_local7 < (nHandlesTotal + 10)) { _local11[_local7] = -1; _local7++; }; _local8 = nHandlesTotal; nHandlesTotal = (nHandlesTotal + 10); handleToIndex = _local11; }; var _local10 = -1; _local9 = 0; while (_local9 < nImages) { if (images[_local9] == null){ _local10 = _local9; break; }; _local9++; }; if (_local10 == -1){ _local12 = new Array((nImages + 10)); _local9 = 0; while (_local9 < nImages) { _local12[_local9] = images[_local9]; _local9++; }; while (_local9 < (nImages + 10)) { _local12[_local9] = null; _local9++; }; _local10 = nImages; nImages = (nImages + 10); images = _local12; }; handleToIndex[_local8] = _local10; images[_local10] = new CImage(); images[_local10].handle = _local8; images[_local10].img = _arg1; images[_local10].xSpot = _arg2; images[_local10].ySpot = _arg3; images[_local10].xAP = _arg4; images[_local10].yAP = _arg5; images[_local10].useCount = _arg6; images[_local10].width = _arg1.width; images[_local10].height = _arg1.height; return (_local8); } public function setToLoad(_arg1:int):void{ var _local2 = useCount; var _local3 = _arg1; var _local4 = (_local2[_local3] + 1); _local2[_local3] = _local4; } public function addImageCompare(_arg1:BitmapData, _arg2:int, _arg3:int, _arg4:int, _arg5:int):int{ var _local6:int; var _local7:ByteArray; var _local10:Rectangle; var _local11:ByteArray; var _local12:Boolean; var _local13:int; var _local14:int; var _local15:Rectangle; var _local8:int = _arg1.width; var _local9:int = _arg1.height; _local6 = 0; while (_local6 < nImages) { if (images[_local6] != null){ if ((((((((images[_local6].xSpot == _arg2)) && ((images[_local6].ySpot == _arg3)))) && ((images[_local6].xAP == _arg4)))) && ((images[_local6].yAP == _arg5)))){ if ((((_local8 == images[_local6].img.width)) && ((_local9 == images[_local6].img.height)))){ if (_local7 == null){ _local15 = new Rectangle(0, 0, _local8, _local9); _local7 = _arg1.getPixels(_local15); }; _local10 = new Rectangle(0, 0, _local8, _local9); _local11 = images[_local6].img.getPixels(_local10); _local12 = true; _local14 = 0; while (_local14 < _local9) { _local13 = 0; while (_local13 < _local8) { if (_local7[((_local14 * _local8) + _local13)] != _local11[((_local14 * _local8) + _local13)]){ _local12 = false; break; }; _local13++; }; if (_local12 == false){ break; }; _local14++; }; if (_local12){ images[_local6].useCount++; return (images[_local6].handle); }; }; }; }; _local6++; }; return (addImage(_arg1, _arg2, _arg3, _arg4, _arg5, 1)); } public function getImageInfoEx(_arg1:int, _arg2:int, _arg3:Number, _arg4:Number):CImage{ var _local5:CImage; var _local7:int; var _local8:int; var _local9:int; var _local10:int; var _local11:int; var _local12:int; var _local6:CImage = new CImage(); _local5 = getImageFromHandle(_arg1); if (_local5 != null){ _local7 = _local5.width; _local8 = _local5.height; _local9 = _local5.xSpot; _local10 = _local5.ySpot; _local11 = _local5.xAP; _local12 = _local5.yAP; if (_arg2 == 0){ if (_arg3 != 1){ _local9 = int((_local9 * _arg3)); _local11 = int((_local11 * _arg3)); _local7 = int((_local7 * _arg3)); }; if (_arg4 != 1){ _local10 = int((_local10 * _arg4)); _local12 = int((_local12 * _arg4)); _local8 = int((_local8 * _arg4)); }; } else { if (_arg3 != 1){ _local9 = int((_local9 * _arg3)); _local11 = int((_local11 * _arg3)); _local7 = int((_local7 * _arg3)); }; if (_arg4 != 1){ _local10 = int((_local10 * _arg4)); _local12 = int((_local12 * _arg4)); _local8 = int((_local8 * _arg4)); }; if (rcInfo == null){ rcInfo = new CRect(); }; if (hsInfo == null){ hsInfo = new CPoint(); }; if (apInfo == null){ apInfo = new CPoint(); }; hsInfo.x = _local9; hsInfo.y = _local10; apInfo.x = _local11; apInfo.y = _local12; rcInfo.left = (rcInfo.top = 0); rcInfo.right = _local7; rcInfo.bottom = _local8; doRotateRect(rcInfo, hsInfo, apInfo, _arg2); _local7 = rcInfo.right; _local8 = rcInfo.bottom; _local9 = hsInfo.x; _local10 = hsInfo.y; _local11 = apInfo.x; _local12 = apInfo.y; }; _local6.width = _local7; _local6.height = _local8; _local6.xSpot = _local9; _local6.ySpot = _local10; _local6.xAP = _local11; _local6.yAP = _local12; return (_local6); }; return (null); } public function resetToLoad():void{ var _local1:int; _local1 = 0; while (_local1 < nHandlesReel) { useCount[_local1] = 0; _local1++; }; } public function loadImageList(_arg1:Array):void{ var _local2:int; var _local3:int; var _local4:int; var _local5:Array; _local2 = 0; while (_local2 < _arg1.length) { if ((((_arg1[_local2] >= 0)) && ((_arg1[_local2] < nHandlesTotal)))){ if (offsetsToImage[_arg1[_local2]] != 0){ if (getImageFromHandle(_arg1[_local2]) == null){ _local4 = -1; _local3 = 0; while (_local3 < nImages) { if (images[_local3] == null){ _local4 = _local3; break; }; _local3++; }; if (_local4 == -1){ _local5 = new Array((nImages + 10)); _local3 = 0; while (_local3 < nImages) { _local5[_local3] = images[_local3]; _local3++; }; while (_local3 < (nImages + 10)) { _local5[_local3] = null; _local3++; }; _local4 = nImages; nImages = (nImages + 10); images = _local5; }; handleToIndex[_arg1[_local2]] = _local4; images[_local4] = new CImage(); images[_local4].useCount = 1; file.seek(offsetsToImage[_arg1[_local2]]); images[_local4].load(file); }; }; }; _local2++; }; } public function delImage(_arg1:int):void{ var _local3:int; var _local2:CImage = getImageFromHandle(_arg1); if (_local2 != null){ _local2.useCount--; if (_local2.useCount <= 0){ _local3 = 0; while (_local3 < nImages) { if (images[_local3] == _local2){ images[_local3] = null; handleToIndex[_arg1] = -1; break; }; _local3++; }; }; }; } public function getImageFromIndex(_arg1:int):CImage{ if ((((_arg1 >= 0)) && ((_arg1 < nImages)))){ return (images[_arg1]); }; return (null); } public function getImageFromHandle(_arg1:int):CImage{ if ((((_arg1 >= 0)) && ((_arg1 < nHandlesTotal)))){ if (handleToIndex[_arg1] != -1){ return (images[handleToIndex[_arg1]]); }; }; return (null); } public function load(_arg1:CFile):void{ var _local2:int; var _local5:int; nImages = 0; _local2 = 0; while (_local2 < nHandlesReel) { if (useCount[_local2] != 0){ nImages++; }; _local2++; }; var _local3:Array = new Array(nImages); var _local4:int; _local5 = 0; while (_local5 < nHandlesReel) { if (useCount[_local5] != 0){ if (((((!((images == null))) && (!((handleToIndex[_local5] == -1))))) && (!((images[handleToIndex[_local5]] == null))))){ _local3[_local4] = images[handleToIndex[_local5]]; _local3[_local4].useCount = useCount[_local5]; } else { _local3[_local4] = new CImage(); _arg1.seek(offsetsToImage[_local5]); _local3[_local4].load(_arg1); _local3[_local4].useCount = useCount[_local5]; }; _local4++; }; _local5++; }; images = _local3; handleToIndex = new Array(nHandlesReel); _local2 = 0; while (_local2 < nHandlesReel) { handleToIndex[_local2] = -1; _local2++; }; _local2 = 0; while (_local2 < nImages) { handleToIndex[images[_local2].handle] = _local2; _local2++; }; nHandlesTotal = nHandlesReel; resetToLoad(); } public function preLoad(_arg1:CFile):void{ var _local3:int; var _local4:int; file = _arg1; nHandlesReel = file.readAShort(); offsetsToImage = new Array(nHandlesReel); var _local2:int = file.readAShort(); var _local5:CImage = new CImage(); _local3 = 0; while (_local3 < _local2) { _local4 = file.getFilePointer(); _local5.loadHandle(file); offsetsToImage[_local5.handle] = _local4; _local3++; }; useCount = new Array(nHandlesReel); resetToLoad(); handleToIndex = null; nHandlesTotal = nHandlesReel; nImages = 0; images = null; } public function enumerate(_arg1:int):int{ setToLoad(_arg1); return (-1); } public static function doRotateRect(_arg1:CRect, _arg2:CPoint, _arg3:CPoint, _arg4:Number):void{ 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 _local25:Number; if (_arg4 == 90){ _local7 = 0; _local8 = 1; } else { if (_arg4 == 180){ _local7 = -1; _local8 = 0; } else { if (_arg4 == 270){ _local7 = 0; _local8 = -1; } else { _local25 = Number(((_arg4 * Math.PI) / 180)); _local7 = Math.cos(_local25); _local8 = Math.sin(_local25); }; }; }; if (_arg2 == null){ _local14 = 0; _local13 = _local14; _local12 = _local13; _local11 = _local12; _local10 = 0; _local9 = _local10; } else { _local11 = (-(_arg2.x) * _local7); _local12 = (-(_arg2.x) * _local8); _local13 = (-(_arg2.y) * _local7); _local14 = (-(_arg2.y) * _local8); _local9 = (_local11 + _local14); _local10 = (_local13 - _local12); }; if (_arg2 == null){ _local5 = Number(_arg1.right); } else { _local5 = Number((_arg1.right - _arg2.x)); }; _local11 = (_local5 * _local7); _local12 = (_local5 * _local8); _local15 = (_local11 + _local14); _local16 = (_local13 - _local12); if (_arg2 == null){ _local6 = Number(_arg1.bottom); } else { _local6 = Number((_arg1.bottom - _arg2.y)); }; _local13 = (_local6 * _local7); _local14 = (_local6 * _local8); _local17 = (_local11 + _local14); _local18 = (_local13 - _local12); _local19 = ((_local9 + _local17) - _local15); _local20 = ((_local10 + _local18) - _local16); var _local21:Number = Math.min(_local9, Math.min(_local15, Math.min(_local17, _local19))); var _local22:Number = Math.min(_local10, Math.min(_local16, Math.min(_local18, _local20))); var _local23:Number = Math.max(_local9, Math.max(_local15, Math.max(_local17, _local19))); var _local24:Number = Math.max(_local10, Math.max(_local16, Math.max(_local18, _local20))); if (_arg3 != null){ if (_arg2 == null){ _local5 = Number(_arg3.x); _local6 = Number(_arg3.y); } else { _local5 = Number((_arg3.x - _arg2.x)); _local6 = Number((_arg3.y - _arg2.y)); }; _arg3.x = int((((_local5 * _local7) + (_local6 * _local8)) - _local21)); _arg3.y = int((((_local6 * _local7) - (_local5 * _local8)) - _local22)); }; if (_arg2 != null){ _arg2.x = -(_local21); _arg2.y = -(_local22); }; _arg1.right = (_local23 - _local21); _arg1.bottom = (_local24 - _local22); } } }//package Banks
Section 58
//CRotatedMask (Banks.CRotatedMask) package Banks { import Sprites.*; public class CRotatedMask { public var angle:int; public var mask:CMask; public var tick:int; public var scaleX:Number; public var scaleY:Number; } }//package Banks
Section 59
//CSound (Banks.CSound) package Banks { import flash.events.*; import Application.*; import Services.*; import flash.media.*; public class CSound { public var nLoops:int; public var useCount:int; public var name:String; public var bLocked:Boolean;// = false public var sound:Sound; public var soundPosition:Number; public var volume:Number; public var pan:Number; public var app:CRunApp; public var numSound:int; public var handle:int; public var bPaused:Boolean; public var soundChannel:SoundChannel; public function CSound(_arg1:CRunApp){ app = _arg1; sound = null; } public function soundComplete(_arg1:Event):void{ soundChannel = null; if (soundPosition == -1){ app.soundPlayer.soundComplete(this); }; } public function play(_arg1:int, _arg2:Boolean, _arg3:Number, _arg4:Number):void{ nLoops = _arg1; if (nLoops == 0){ nLoops = 1000000; }; if (soundChannel != null){ soundChannel.stop(); }; volume = _arg3; pan = _arg4; soundChannel = sound.play(0, nLoops); soundChannel.addEventListener(Event.SOUND_COMPLETE, soundComplete); var _local5:SoundTransform = soundChannel.soundTransform; _local5.pan = pan; _local5.volume = volume; soundChannel.soundTransform = _local5; soundPosition = -1; bLocked = _arg2; bPaused = false; } public function stop():void{ if (soundChannel != null){ soundChannel.stop(); app.soundPlayer.soundComplete(this); soundChannel = null; soundPosition = -1; }; } public function setPan(_arg1:Number):void{ var _local2:SoundTransform; pan = _arg1; if (soundChannel != null){ _local2 = soundChannel.soundTransform; if (_local2 != null){ _local2.pan = _arg1; soundChannel.soundTransform = _local2; }; }; } public function setVolume(_arg1:Number):void{ var _local2:SoundTransform; volume = _arg1; if (soundChannel != null){ _local2 = soundChannel.soundTransform; if (_local2 != null){ _local2.volume = _arg1; soundChannel.soundTransform = _local2; }; }; } public function duplicate():CSound{ var _local1:CSound = new CSound(app); var _local2:CRunApp = app; while (_local2.parentApp != null) { _local2 = _local2.parentApp; }; _local1.sound = (new (_local2.sounds[numSound]) as Sound); _local1.handle = handle; _local1.name = name; return (_local1); } public function isPlaying():Boolean{ if (bPaused){ return (true); }; if (soundChannel != null){ return (true); }; return (false); } public function startAgain(_arg1:int, _arg2:Boolean):void{ if (soundChannel != null){ soundPosition = 0; soundChannel.stop(); soundPosition = -1; }; nLoops = _arg1; bLocked = _arg2; soundChannel = sound.play(0, _arg1); var _local3:SoundTransform = soundChannel.soundTransform; _local3.pan = pan; _local3.volume = volume; soundChannel.soundTransform = _local3; soundChannel.addEventListener(Event.SOUND_COMPLETE, soundComplete); bPaused = false; } public function load(_arg1:int, _arg2:CFile, _arg3:uint):void{ var _local4:int; var _local5:CRunApp; if (sound == null){ _arg2.seek(_arg3); handle = _arg2.readAShort(); _local4 = _arg2.readAShort(); name = _arg2.readAStringSize(_local4); numSound = _arg1; _local5 = app; while (_local5.parentApp != null) { _local5 = _local5.parentApp; }; sound = (new (_local5.sounds[_arg1]) as Sound); }; } public function getPan():Number{ return (pan); } public function startPosition(_arg1:Number):void{ var _local2:SoundTransform; if (_arg1 < sound.length){ if (soundChannel != null){ soundPosition = 0; soundChannel.stop(); soundPosition = -1; }; soundChannel = sound.play(_arg1, nLoops); _local2 = soundChannel.soundTransform; _local2.pan = pan; _local2.volume = volume; soundChannel.soundTransform = _local2; soundChannel.addEventListener(Event.SOUND_COMPLETE, soundComplete); bPaused = false; }; } public function resume():void{ var _local1:SoundTransform; if ((((soundChannel == null)) && (!((soundPosition == -1))))){ if (nLoops > 1){ soundPosition = 0; }; soundChannel = sound.play(soundPosition, nLoops, null); soundChannel.addEventListener(Event.SOUND_COMPLETE, soundComplete); _local1 = soundChannel.soundTransform; _local1.pan = pan; _local1.volume = volume; soundChannel.soundTransform = _local1; soundPosition = -1; bPaused = false; }; } public function loadHandle(_arg1:CFile):void{ handle = _arg1.readAShort(); var _local2:int = _arg1.readAShort(); if (_arg1.bUnicode == false){ _arg1.skipBytes(_local2); } else { _arg1.skipBytes((_local2 * 2)); }; } public function getVolume():Number{ return (volume); } public function getPosition():Number{ if (soundChannel != null){ return ((soundChannel.position % sound.length)); }; return (0); } public function pause():void{ if (soundChannel != null){ soundPosition = soundChannel.position; soundChannel.stop(); soundChannel = null; bPaused = true; }; } public function isPaused():Boolean{ return (bPaused); } public function getLength():Number{ return (sound.length); } } }//package Banks
Section 60
//CSoundBank (Banks.CSoundBank) package Banks { import Application.*; import Services.*; public class CSoundBank implements IEnum { public var sounds:Array; public var nHandlesTotal:int; private var useCount:Array; public var nSounds:int; private var handleToIndex:Array; public var app:CRunApp; private var fileOffsetsToSounds:Array; public var nHandlesReel:int; public var file:CFile; private var offsetsToSounds:Array; public function CSoundBank(_arg1:CRunApp){ app = _arg1; } public function setToLoad(_arg1:int):void{ var _local2 = useCount; var _local3 = _arg1; var _local4 = (_local2[_local3] + 1); _local2[_local3] = _local4; } public function enumerate(_arg1:int):int{ setToLoad(_arg1); return (-1); } public function load():void{ var _local1:int; var _local4:int; nSounds = 0; _local1 = 0; while (_local1 < nHandlesReel) { if (useCount[_local1] != 0){ nSounds++; }; _local1++; }; var _local2:Array = new Array(nSounds); var _local3:int; _local4 = 0; while (_local4 < nHandlesReel) { if (useCount[_local4] != 0){ if (((((!((sounds == null))) && (!((handleToIndex[_local4] == -1))))) && (!((sounds[handleToIndex[_local4]] == null))))){ _local2[_local3] = sounds[handleToIndex[_local4]]; _local2[_local3].useCount = useCount[_local4]; } else { _local2[_local3] = new CSound(app); _local2[_local3].load(offsetsToSounds[_local4], app.file, fileOffsetsToSounds[_local4]); _local2[_local3].useCount = useCount[_local4]; }; _local3++; }; _local4++; }; sounds = _local2; handleToIndex = new Array(nHandlesReel); _local1 = 0; while (_local1 < nHandlesReel) { handleToIndex[_local1] = -1; _local1++; }; _local1 = 0; while (_local1 < nSounds) { handleToIndex[sounds[_local1].handle] = _local1; _local1++; }; nHandlesTotal = nHandlesReel; resetToLoad(); } public function preLoad(_arg1:CFile):void{ var _local3:int; var _local5:uint; file = _arg1; nHandlesReel = file.readAShort(); offsetsToSounds = new Array(nHandlesReel); fileOffsetsToSounds = new Array(nHandlesReel); var _local2:int = file.readAShort(); var _local4:CSound = new CSound(app); _local3 = 0; while (_local3 < _local2) { _local5 = file.getFilePointer(); _local4.loadHandle(file); offsetsToSounds[_local4.handle] = _local3; fileOffsetsToSounds[_local4.handle] = _local5; _local3++; }; useCount = new Array(nHandlesReel); resetToLoad(); handleToIndex = null; nHandlesTotal = nHandlesReel; nSounds = 0; sounds = null; } public function getSoundFromHandle(_arg1:int):CSound{ if ((((_arg1 >= 0)) && ((_arg1 < nHandlesTotal)))){ if (handleToIndex[_arg1] != -1){ return (sounds[handleToIndex[_arg1]]); }; }; return (null); } public function getSoundFromIndex(_arg1:int):CSound{ if ((((_arg1 >= 0)) && ((_arg1 < nSounds)))){ return (sounds[_arg1]); }; return (null); } public function resetToLoad():void{ var _local1:int; _local1 = 0; while (_local1 < nHandlesReel) { useCount[_local1] = 0; _local1++; }; } } }//package Banks
Section 61
//IEnum (Banks.IEnum) package Banks { public interface IEnum { function enumerate(_arg1:int):int; } }//package Banks
Section 62
//CCnd (Conditions.CCnd) package Conditions { import Application.*; import Services.*; import Expressions.*; import OI.*; import RunLoop.*; import Objects.*; import Params.*; import Events.*; public class CCnd extends CEvent { public var evtIdentifier:int; public function eva1(_arg1:CRun, _arg2:CObject):Boolean{ return (false); } public function eva2(_arg1:CRun):Boolean{ return (false); } public function compute_NoRepeat(_arg1:CObject):Boolean{ return (compute_NoRepeatCol(evtIdentifier, _arg1)); } public function compute_GlobalNoRepeat(_arg1:CRun):Boolean{ var _local2:CEventGroup = _arg1.rhEvtProg.rhEventGroup; var _local3:int = _local2.evgInhibit; _local2.evgInhibit = _arg1.rhLoopCount; var _local4:int = _arg1.rhLoopCount; if (_local4 == _local3){ return (false); }; --_local4; if (_local4 == _local3){ return (false); }; return (true); } public function evaChooseValue(_arg1:CRun, _arg2:IChooseValue):Boolean{ var _local5:int; var _local3:int; var _local4:CObject = _arg1.rhEvtProg.evt_FirstObjectFromType(-1); while (_local4 != null) { _local3++; _local5 = _arg1.get_EventExpressionInt(CParamExpression(evtParams[0])); if (_arg2.evaluate(_local4, _local5) == false){ _local3--; _arg1.rhEvtProg.evt_DeleteCurrentObject(); }; _local4 = _arg1.rhEvtProg.evt_NextObjectFromType(); }; if (_local3 != 0){ return (true); }; return (false); } public function evaObject(_arg1:CRun, _arg2:IEvaObject):Boolean{ var _local3:CObject = _arg1.rhEvtProg.evt_FirstObject(evtOiList); var _local4:int = _arg1.rhEvtProg.evtNSelectedObjects; while (_local3 != null) { if (_arg2.evaObjectRoutine(_local3) == false){ _local4--; _arg1.rhEvtProg.evt_DeleteCurrentObject(); }; _local3 = _arg1.rhEvtProg.evt_NextObject(); }; if (_local4 != 0){ return (true); }; return (false); } public function isColliding(_arg1:CRun):Boolean{ var _local6:Array; var _local8:CArrayList; var _local10:int; var _local11:int; var _local12:CObject; var _local13:CQualToOiList; if (_arg1.rhEvtProg.rh4ConditionsFalse){ _arg1.rhEvtProg.evt_FirstObject(evtOiList); _arg1.rhEvtProg.evt_FirstObject(PARAM_OBJECT(evtParams[0]).oiList); return (false); }; var _local2:Boolean; if ((evtFlags2 & EVFLAG2_NOT) != 0){ _local2 = true; }; var _local3:CObject = _arg1.rhEvtProg.evt_FirstObject(evtOiList); if (_local3 == null){ return (negaFALSE()); }; var _local4:int = _arg1.rhEvtProg.evtNSelectedObjects; var _local5:int = PARAM_OBJECT(evtParams[0]).oi; if (_local5 >= 0){ _arg1.isColArray[0] = _local5; _arg1.isColArray[1] = PARAM_OBJECT(evtParams[0]).oiList; _local6 = _arg1.isColArray; } else { _local13 = _arg1.rhEvtProg.qualToOiList[(PARAM_OBJECT(evtParams[0]).oiList & 32767)]; _local6 = _local13.qoiList; }; var _local7:Boolean; var _local9:CArrayList = new CArrayList(); do { _local8 = _arg1.objectAllCol_IXY(_local3, _local3.roc.rcImage, _local3.roc.rcAngle, _local3.roc.rcScaleX, _local3.roc.rcScaleY, _local3.hoX, _local3.hoY, _local6); if (_local8 == null){ if (_local2 == false){ _local4--; _arg1.rhEvtProg.evt_DeleteCurrentObject(); }; } else { _local7 = false; _local10 = 0; while (_local10 < _local8.size()) { _local12 = CObject(_local8.get(_local10)); if ((_local12.hoFlags & CObject.HOF_DESTROYED) == 0){ _local9.add(_local12); _local7 = true; }; _local10++; }; if (_local2 == true){ if (_local7 == true){ _local4--; _arg1.rhEvtProg.evt_DeleteCurrentObject(); }; } else { if (_local7 == false){ _local4--; _arg1.rhEvtProg.evt_DeleteCurrentObject(); }; }; }; _local3 = _arg1.rhEvtProg.evt_NextObject(); } while (_local3 != null); if (_local4 == 0){ return (false); }; _local3 = _arg1.rhEvtProg.evt_FirstObject(PARAM_OBJECT(evtParams[0]).oiList); if (_local3 == null){ return (false); }; _local4 = _arg1.rhEvtProg.evtNSelectedObjects; if (_local2 == false){ do { _local10 = 0; while (_local10 < _local9.size()) { _local12 = CObject(_local9.get(_local10)); if (_local3 == _local12){ break; }; _local10++; }; if (_local10 == _local9.size()){ _local4--; _arg1.rhEvtProg.evt_DeleteCurrentObject(); }; _local3 = _arg1.rhEvtProg.evt_NextObject(); } while (_local3 != null); if (_local4 != 0){ return (true); }; return (false); }; do { _local10 = 0; while (_local10 < _local9.size()) { _local12 = CObject(_local9.get(_local10)); if (_local3 == _local12){ _local4--; _arg1.rhEvtProg.evt_DeleteCurrentObject(); break; }; _local10++; }; _local3 = _arg1.rhEvtProg.evt_NextObject(); } while (_local3 != null); if (_local4 != 0){ return (true); }; return (false); } public function negaFALSE():Boolean{ if ((evtFlags2 & EVFLAG2_NOT) != 0){ return (true); }; return (false); } public function evaExpObject(_arg1:CRun, _arg2:IEvaExpObject):Boolean{ var _local6:int; var _local3:CObject = _arg1.rhEvtProg.evt_FirstObject(evtOiList); var _local4:int = _arg1.rhEvtProg.evtNSelectedObjects; var _local5:CParamExpression = CParamExpression(evtParams[0]); while (_local3 != null) { _local6 = _arg1.get_EventExpressionInt(_local5); if (_arg2.evaExpRoutine(_local3, _local6, _local5.comparaison) == false){ _local4--; _arg1.rhEvtProg.evt_DeleteCurrentObject(); }; _local3 = _arg1.rhEvtProg.evt_NextObject(); }; if (_local4 != 0){ return (true); }; return (false); } public function checkMark(_arg1:CRun, _arg2:int):Boolean{ if (_arg2 == 0){ return (false); }; if (_arg2 == _arg1.rhLoopCount){ return (true); }; if (_arg2 == (_arg1.rhLoopCount - 1)){ return (true); }; return (false); } public function compareCondition(_arg1:CRun, _arg2:int, _arg3:int):Boolean{ var _local4:CValue = _arg1.get_EventExpressionAny(CParamExpression(evtParams[_arg2])); var _local5:int = CParamExpression(evtParams[_arg2]).comparaison; var _local6:CValue = new CValue(_arg3); return (CRun.compareTo(_local6, _local4, _local5)); } public function compute_NoRepeatCol(_arg1:int, _arg2:CObject):Boolean{ var _local3:int; var _local4:int; var _local5:CArrayList = _arg2.hoBaseNoRepeat; if (_local5 == null){ _local5 = new CArrayList(); _arg2.hoBaseNoRepeat = _local5; } else { _local4 = 0; while (_local4 < _local5.size()) { _local3 = int(_local5.get(_local4)); if (_local3 == _arg1){ return (false); }; _local4++; }; }; _local3 = new int(_arg1); _local5.add(_local3); _local5 = _arg2.hoPrevNoRepeat; if (_local5 == null){ return (true); }; _local4 = 0; while (_local4 < _local5.size()) { _local3 = int(_local5.get(_local4)); if (_local3 == _arg1){ return (false); }; _local4++; }; return (true); } public function evaChooseValueOld(_arg1:CRun, _arg2:IChooseValue):Boolean{ var _local5:int; var _local3:int; var _local4:CObject = _arg1.rhEvtProg.evt_FirstObjectFromType(COI.OBJ_SPR); while (_local4 != null) { _local3++; _local5 = _arg1.get_EventExpressionInt(CParamExpression(evtParams[0])); if (_arg2.evaluate(_local4, _local5) == false){ _local3--; _arg1.rhEvtProg.evt_DeleteCurrentObject(); }; _local4 = _arg1.rhEvtProg.evt_NextObjectFromType(); }; if (_local3 != 0){ return (true); }; return (false); } public function negaTRUE():Boolean{ if ((evtFlags2 & EVFLAG2_NOT) != 0){ return (false); }; return (true); } public static function create(_arg1:CRunApp):CCnd{ var _local6:int; var _local2:int = _arg1.file.getFilePointer(); var _local3:int = _arg1.file.readAShort(); var _local4:CCnd; var _local5:int = _arg1.file.readAInt(); switch (_local5){ case ((-26 << 16) | 0xFFFF): break; case ((-25 << 16) | 0xFFFF): break; case ((-24 << 16) | 0xFFFF): break; case ((-23 << 16) | 0xFFFF): break; case ((-20 << 16) | 0xFFFF): break; case ((-16 << 16) | 0xFFFF): break; case ((-12 << 16) | 0xFFFF): break; case ((-11 << 16) | 0xFFFF): _local4 = new CND_ENDGROUP(); break; case ((-10 << 16) | 0xFFFF): _local4 = new CND_GROUP(); break; case ((-9 << 16) | 0xFFFF): break; case ((-8 << 16) | 0xFFFF): _local4 = new CND_COMPAREG(); break; case ((-7 << 16) | 0xFFFF): _local4 = new CND_NOTALWAYS(); break; case ((-6 << 16) | 0xFFFF): _local4 = new CND_ONCE(); break; case ((-5 << 16) | 0xFFFF): break; case ((-4 << 16) | 0xFFFF): break; case ((-3 << 16) | 0xFFFF): break; case ((-2 << 16) | 0xFFFF): break; case ((-1 << 16) | 0xFFFF): break; case ((-9 << 16) | 65534): break; case ((-8 << 16) | 65534): break; case ((-6 << 16) | 65534): break; case ((-3 << 16) | 65534): _local4 = new CND_NOSAMPLAYING(); break; case ((-1 << 16) | 65534): break; case ((-8 << 16) | 65533): break; case ((-6 << 16) | 65533): break; case ((-5 << 16) | 65533): break; case ((-4 << 16) | 65533): break; case ((-3 << 16) | 65533): break; case ((-2 << 16) | 65533): _local4 = new CND_END(); break; case ((-1 << 16) | 65533): _local4 = new CND_START(); break; case ((-5 << 16) | 65532): break; case ((-4 << 16) | 65532): _local4 = new CND_EVERY(); break; case ((-3 << 16) | 65532): break; case ((-2 << 16) | 65532): break; case ((-1 << 16) | 65532): _local4 = new CND_TIMERSUP(); break; case ((-12 << 16) | 65530): _local4 = new CND_MOUSEWHEELDOWN(); break; case ((-11 << 16) | 65530): _local4 = new CND_MOUSEWHEELUP(); break; case ((-10 << 16) | 65530): break; case ((-9 << 16) | 65530): break; case ((-8 << 16) | 65530): _local4 = new CND_MKEYDEPRESSED(); break; case ((-7 << 16) | 65530): _local4 = new CND_MCLICKONOBJECT(); break; case ((-6 << 16) | 65530): break; case ((-5 << 16) | 65530): break; case ((-4 << 16) | 65530): _local4 = new CND_MONOBJECT(); break; case ((-3 << 16) | 65530): break; case ((-2 << 16) | 65530): break; case ((-1 << 16) | 65530): break; case ((-6 << 16) | 65529): break; case ((-5 << 16) | 65529): break; case ((-4 << 16) | 65529): break; case ((-3 << 16) | 65529): break; case ((-2 << 16) | 65529): break; case ((-1 << 16) | 65529): break; case ((-23 << 16) | 65531): break; case ((-22 << 16) | 65531): break; case ((-21 << 16) | 65531): break; case ((-20 << 16) | 65531): break; case ((-19 << 16) | 65531): break; case ((-18 << 16) | 65531): break; case ((-17 << 16) | 65531): break; case ((-16 << 16) | 65531): break; case ((-15 << 16) | 65531): break; case ((-14 << 16) | 65531): break; case ((-13 << 16) | 65531): break; case ((-12 << 16) | 65531): break; case ((-11 << 16) | 65531): break; case ((-8 << 16) | 65531): break; case ((-7 << 16) | 65531): break; case ((-6 << 16) | 65531): _local4 = new CND_CHOOSEALLINZONE_OLD(); break; case ((-5 << 16) | 65531): break; case ((-4 << 16) | 65531): break; case ((-3 << 16) | 65531): break; case ((-2 << 16) | 65531): break; case ((-1 << 16) | 65531): break; case (((-80 - 1) << 16) | 7): _local4 = new CND_CCOUNTER(); break; case (((-80 - 3) << 16) | 4): break; case (((-80 - 2) << 16) | 4): break; case (((-80 - 1) << 16) | 4): break; case (((-80 - 4) << 16) | (9 & 0xFF)): break; case (((-80 - 3) << 16) | (9 & 0xFF)): break; case (((-80 - 2) << 16) | (9 & 0xFF)): break; case (((-80 - 1) << 16) | (9 & 0xFF)): break; default: switch ((_local5 & 4294901760)){ case (-40 << 16): break; case (-39 << 16): break; case (-38 << 16): break; case (-37 << 16): break; case (-36 << 16): break; case (-35 << 16): break; case (-34 << 16): break; case (-33 << 16): break; case (-32 << 16): break; case (-31 << 16): break; case (-30 << 16): break; case (-29 << 16): break; case (-28 << 16): break; case (-27 << 16): _local4 = new CND_EXTCMPVAR(); break; case (-26 << 16): break; case (-25 << 16): _local4 = new CND_EXTFLAGSET(); break; case (-24 << 16): _local4 = new CND_EXTFLAGRESET(); break; case (-23 << 16): break; case (-22 << 16): break; case (-21 << 16): break; case (-20 << 16): break; case (-19 << 16): break; case (-18 << 16): break; case (-17 << 16): _local4 = new CND_EXTCMPX(); break; case (-16 << 16): _local4 = new CND_EXTCMPY(); break; case (-15 << 16): break; case (-14 << 16): _local4 = new CND_EXTCOLLISION(); break; case (-13 << 16): break; case (-12 << 16): break; case (-11 << 16): break; case (-10 << 16): break; case (-9 << 16): break; case (-8 << 16): break; case (-7 << 16): break; case (-6 << 16): break; case (-5 << 16): break; case (-4 << 16): break; case (-3 << 16): _local4 = new CND_EXTANIMPLAYING(); break; case (-2 << 16): break; case (-1 << 16): _local4 = new CND_EXTCMPFRAME(); break; default: _local4 = new CCndExtension(); break; }; }; if (_local4 != null){ _local4.evtCode = _local5; _local4.evtOi = _arg1.file.readShort(); _local4.evtOiList = _arg1.file.readShort(); _local4.evtFlags = _arg1.file.readAByte(); _local4.evtFlags2 = _arg1.file.readAByte(); _local4.evtNParams = _arg1.file.readAByte(); _local4.evtDefType = _arg1.file.readAByte(); _local4.evtIdentifier = _arg1.file.readAShort(); if (_local4.evtNParams > 0){ _local4.evtParams = new Array(_local4.evtNParams); _local6 = 0; while (_local6 < _local4.evtNParams) { _local4.evtParams[_local6] = CParam.create(_arg1); _local6++; }; }; } else { trace("*** Missing condition!"); }; _arg1.file.seek((_local2 + _local3)); return (_local4); } } }//package Conditions
Section 63
//CCndExtension (Conditions.CCndExtension) package Conditions { import Services.*; import Expressions.*; import RunLoop.*; import Objects.*; import Params.*; import Events.*; public class CCndExtension extends CCnd { public function getParamPosition(_arg1:CRun, _arg2:int):PARAM_POSITION{ return (PARAM_POSITION(evtParams[_arg2])); } override public function eva1(_arg1:CRun, _arg2:CObject):Boolean{ if (_arg2 == null){ return (eva2(_arg1)); }; var _local3:CExtension = CExtension(_arg2); _arg2.hoFlags = (_arg2.hoFlags | CObject.HOF_TRUEEVENT); var _local4:int = ((-((evtCode >> 16)) - CEventProgram.EVENTS_EXTBASE) - 1); if (_local3.condition(_local4, this)){ _arg1.rhEvtProg.evt_AddCurrentObject(_arg2); return (true); }; return (false); } override public function eva2(_arg1:CRun):Boolean{ var _local5:CExtension; var _local2:CObject = _arg1.rhEvtProg.evt_FirstObject(evtOiList); var _local3:int = _arg1.rhEvtProg.evtNSelectedObjects; var _local4:int = ((-((evtCode >> 16)) - CEventProgram.EVENTS_EXTBASE) - 1); while (_local2 != null) { _local5 = CExtension(_local2); _local2.hoFlags = (_local2.hoFlags & ~(CObject.HOF_TRUEEVENT)); if (_local5.condition(_local4, this)){ if ((evtFlags2 & EVFLAG2_NOT) != 0){ _local3--; _arg1.rhEvtProg.evt_DeleteCurrentObject(); }; } else { if ((evtFlags2 & EVFLAG2_NOT) == 0){ _local3--; _arg1.rhEvtProg.evt_DeleteCurrentObject(); }; }; _local2 = _arg1.rhEvtProg.evt_NextObject(); }; if (_local3 != 0){ return (true); }; return (false); } public function getParamBorder(_arg1:CRun, _arg2:int):int{ return (PARAM_SHORT(evtParams[_arg2]).value); } public function getParamTime(_arg1:CRun, _arg2:int):int{ if (evtParams[_arg2].code == 2){ return (PARAM_TIME(evtParams[_arg2]).timer); }; return (_arg1.get_EventExpressionInt(CParamExpression(evtParams[_arg2]))); } public function getParamNewDirection(_arg1:CRun, _arg2:int):int{ if (evtParams[_arg2].code == 29){ return (PARAM_SHORT(evtParams[_arg2]).value); }; return (_arg1.get_EventExpressionInt(CParamExpression(evtParams[_arg2]))); } public function compareValues(_arg1:CRun, _arg2:int, _arg3:CValue):Boolean{ var _local4:CValue = _arg1.get_EventExpressionAny(CParamExpression(evtParams[_arg2])); var _local5:int = CParamExpression(evtParams[_arg2]).comparaison; return (CRun.compareTo(_arg3, _local4, _local5)); } public function getParamKey(_arg1:CRun, _arg2:int):int{ return (PARAM_KEY(evtParams[_arg2]).key); } public function getParamJoyDirection(_arg1:CRun, _arg2:int):int{ return (PARAM_SHORT(evtParams[_arg2]).value); } public function getParamColour(_arg1:CRun, _arg2:int):int{ if (evtParams[_arg2].code == 24){ return (PARAM_COLOUR(evtParams[_arg2]).color); }; return (CServices.swapRGB(_arg1.get_EventExpressionInt(CParamExpression(evtParams[_arg2])))); } public function getParamEvery(_arg1:CRun, _arg2:int):PARAM_EVERY{ return (PARAM_EVERY(evtParams[_arg2])); } public function getParamAnimation(_arg1:CRun, _arg2:int):int{ if (evtParams[_arg2].code == 10){ return (PARAM_SHORT(evtParams[_arg2]).value); }; return (_arg1.get_EventExpressionInt(CParamExpression(evtParams[_arg2]))); } public function getParamDirection(_arg1:CRun, _arg2:int):int{ return (PARAM_SHORT(evtParams[_arg2]).value); } public function getParamSpeed(_arg1:CRun, _arg2:int):int{ return (_arg1.get_EventExpressionInt(CParamExpression(evtParams[_arg2]))); } public function getParamClick(_arg1:CRun, _arg2:int):int{ return (PARAM_SHORT(evtParams[_arg2]).value); } public function compareTime(_arg1:CRun, _arg2:int, _arg3:int):Boolean{ var _local4:PARAM_CMPTIME = PARAM_CMPTIME(evtParams[_arg2]); var _local5:CValue = new CValue(_local4.timer); var _local6:int = _local4.comparaison; var _local7:CValue = new CValue(_arg3); return (CRun.compareTo(_local7, _local5, _local6)); } public function getParamObject(_arg1:CRun, _arg2:int):PARAM_OBJECT{ return (PARAM_OBJECT(evtParams[_arg2])); } public function getParamExpString(_arg1:CRun, _arg2:int):String{ return (_arg1.get_EventExpressionString(CParamExpression(evtParams[_arg2]))); } public function getParamPlayer(_arg1:CRun, _arg2:int):int{ return (PARAM_SHORT(evtParams[_arg2]).value); } public function getParamFrame(_arg1:CRun, _arg2:int):int{ return (PARAM_SHORT(evtParams[_arg2]).value); } public function getParamExpression(_arg1:CRun, _arg2:int):int{ return (_arg1.get_EventExpressionInt(CParamExpression(evtParams[_arg2]))); } public function getParamAltValue(_arg1:CRun, _arg2:int):int{ return (PARAM_SHORT(evtParams[_arg2]).value); } } }//package Conditions
Section 64
//CND_CCOUNTER (Conditions.CND_CCOUNTER) package Conditions { import Expressions.*; import RunLoop.*; import Objects.*; import Params.*; public class CND_CCOUNTER extends CCnd { override public function eva1(_arg1:CRun, _arg2:CObject):Boolean{ return (eva2(_arg1)); } override public function eva2(_arg1:CRun):Boolean{ var _local5:CValue; var _local2:CObject = _arg1.rhEvtProg.evt_FirstObject(evtOiList); var _local3:int = _arg1.rhEvtProg.evtNSelectedObjects; var _local4:CValue = new CValue(0); while (_local2 != null) { _local4.forceValue(CCounter(_local2).cpt_GetValue()); _local5 = _arg1.get_EventExpressionAny(CParamExpression(evtParams[0])); if (CRun.compareTo(_local4, _local5, CParamExpression(evtParams[0]).comparaison) == false){ _local3--; _arg1.rhEvtProg.evt_DeleteCurrentObject(); }; _local2 = _arg1.rhEvtProg.evt_NextObject(); }; do { } while (_local2 != null); return (!((_local3 == 0))); } } }//package Conditions
Section 65
//CND_CHOOSEALLINZONE_OLD (Conditions.CND_CHOOSEALLINZONE_OLD) package Conditions { import OI.*; import RunLoop.*; import Objects.*; import Params.*; public class CND_CHOOSEALLINZONE_OLD extends CCnd { override public function eva1(_arg1:CRun, _arg2:CObject):Boolean{ return (eva2(_arg1)); } override public function eva2(_arg1:CRun):Boolean{ var _local2:PARAM_ZONE = PARAM_ZONE(evtParams[0]); if (_arg1.rhEvtProg.select_ZoneTypeObjects(_local2, COI.OBJ_SPR) != 0){ return (true); }; return (false); } } }//package Conditions
Section 66
//CND_COMPAREG (Conditions.CND_COMPAREG) package Conditions { import Expressions.*; import RunLoop.*; import Objects.*; import Params.*; public class CND_COMPAREG extends CCnd { override public function eva1(_arg1:CRun, _arg2:CObject):Boolean{ return (eva2(_arg1)); } override public function eva2(_arg1:CRun):Boolean{ var _local2:int; if (evtParams[0].code == 52){ _local2 = (_arg1.get_EventExpressionInt(CParamExpression(evtParams[0])) - 1); } else { _local2 = PARAM_SHORT(evtParams[0]).value; }; var _local3:CValue = new CValue(0); _local3.forceValue(_arg1.rhApp.getGlobalValueAt(_local2)); var _local4:CValue = _arg1.get_EventExpressionAny(CParamExpression(evtParams[1])); var _local5:int = CParamExpression(evtParams[1]).comparaison; return (CRun.compareTo(_local3, _local4, _local5)); } } }//package Conditions
Section 67
//CND_END (Conditions.CND_END) package Conditions { import RunLoop.*; import Objects.*; public class CND_END extends CCnd { override public function eva1(_arg1:CRun, _arg2:CObject):Boolean{ return (true); } override public function eva2(_arg1:CRun):Boolean{ return (true); } } }//package Conditions
Section 68
//CND_ENDGROUP (Conditions.CND_ENDGROUP) package Conditions { import RunLoop.*; import Objects.*; public class CND_ENDGROUP extends CCnd { override public function eva1(_arg1:CRun, _arg2:CObject):Boolean{ return (false); } override public function eva2(_arg1:CRun):Boolean{ return (false); } } }//package Conditions
Section 69
//CND_EVERY (Conditions.CND_EVERY) package Conditions { import RunLoop.*; import Objects.*; import Params.*; public class CND_EVERY extends CCnd { override public function eva1(_arg1:CRun, _arg2:CObject):Boolean{ return (eva2(_arg1)); } override public function eva2(_arg1:CRun):Boolean{ var _local2:PARAM_EVERY = PARAM_EVERY(evtParams[0]); _local2.compteur = (_local2.compteur - _arg1.rhTimerDelta); if (_local2.compteur > 0){ return (false); }; _local2.compteur = (_local2.compteur + _local2.delay); return (true); } } }//package Conditions
Section 70
//CND_EXTANIMPLAYING (Conditions.CND_EXTANIMPLAYING) package Conditions { import RunLoop.*; import Objects.*; import Params.*; public class CND_EXTANIMPLAYING extends CCnd implements IEvaExpObject, IEvaObject { override public function eva1(_arg1:CRun, _arg2:CObject):Boolean{ return (eva2(_arg1)); } override public function eva2(_arg1:CRun):Boolean{ if (evtParams[0].code == 10){ return (evaObject(_arg1, this)); }; return (evaExpObject(_arg1, this)); } public function evaObjectRoutine(_arg1:CObject):Boolean{ var _local2:int = PARAM_SHORT(evtParams[0]).value; if (_local2 != _arg1.roa.raAnimOn){ return (negaFALSE()); }; if (_arg1.roa.raAnimNumberOfFrame != 0){ return (negaTRUE()); }; return (negaFALSE()); } public function evaExpRoutine(_arg1:CObject, _arg2:int, _arg3:int):Boolean{ if (_arg2 != _arg1.roa.raAnimOn){ return (negaFALSE()); }; if (_arg1.roa.raAnimNumberOfFrame != 0){ return (negaTRUE()); }; return (negaFALSE()); } } }//package Conditions
Section 71
//CND_EXTCMPFRAME (Conditions.CND_EXTCMPFRAME) package Conditions { import RunLoop.*; import Objects.*; public class CND_EXTCMPFRAME extends CCnd implements IEvaExpObject { override public function eva1(_arg1:CRun, _arg2:CObject):Boolean{ return (evaExpObject(_arg1, this)); } override public function eva2(_arg1:CRun):Boolean{ return (evaExpObject(_arg1, this)); } public function evaExpRoutine(_arg1:CObject, _arg2:int, _arg3:int):Boolean{ return (CRun.compareTer(_arg1.roa.raAnimFrame, _arg2, _arg3)); } } }//package Conditions
Section 72
//CND_EXTCMPVAR (Conditions.CND_EXTCMPVAR) package Conditions { import Expressions.*; import RunLoop.*; import Objects.*; import Params.*; import Values.*; public class CND_EXTCMPVAR extends CCnd { override public function eva1(_arg1:CRun, _arg2:CObject):Boolean{ return (eva2(_arg1)); } override public function eva2(_arg1:CRun):Boolean{ var _local5:CValue; var _local7:*; var _local2:CObject = _arg1.rhEvtProg.evt_FirstObject(evtOiList); if (_local2 == null){ return (false); }; var _local3:int = _arg1.rhEvtProg.evtNSelectedObjects; var _local4:CValue = new CValue(0); var _local6:CParamExpression = CParamExpression(evtParams[1]); do { if (evtParams[0].code == 53){ _local7 = _arg1.get_EventExpressionInt(CParamExpression(evtParams[0])); } else { _local7 = PARAM_SHORT(evtParams[0]).value; }; if ((((((_local7 >= 0)) && ((_local7 < CRVal.VALUES_NUMBEROF_ALTERABLE)))) && (!((_local2.rov == null))))){ _local4.forceValue(_local2.rov.getValue(_local7)); _local5 = _arg1.get_EventExpressionAny(_local6); if (CRun.compareTo(_local4, _local5, _local6.comparaison) == false){ _local3--; _arg1.rhEvtProg.evt_DeleteCurrentObject(); }; } else { _local3--; _arg1.rhEvtProg.evt_DeleteCurrentObject(); }; _local2 = _arg1.rhEvtProg.evt_NextObject(); } while (_local2 != null); return (!((_local3 == 0))); } } }//package Conditions
Section 73
//CND_EXTCMPX (Conditions.CND_EXTCMPX) package Conditions { import RunLoop.*; import Objects.*; public class CND_EXTCMPX extends CCnd implements IEvaExpObject { override public function eva1(_arg1:CRun, _arg2:CObject):Boolean{ return (evaExpObject(_arg1, this)); } override public function eva2(_arg1:CRun):Boolean{ return (evaExpObject(_arg1, this)); } public function evaExpRoutine(_arg1:CObject, _arg2:int, _arg3:int):Boolean{ return (CRun.compareTer(_arg1.hoX, _arg2, _arg3)); } } }//package Conditions
Section 74
//CND_EXTCMPY (Conditions.CND_EXTCMPY) package Conditions { import RunLoop.*; import Objects.*; public class CND_EXTCMPY extends CCnd implements IEvaExpObject { override public function eva1(_arg1:CRun, _arg2:CObject):Boolean{ return (evaExpObject(_arg1, this)); } override public function eva2(_arg1:CRun):Boolean{ return (evaExpObject(_arg1, this)); } public function evaExpRoutine(_arg1:CObject, _arg2:int, _arg3:int):Boolean{ return (CRun.compareTer(_arg1.hoY, _arg2, _arg3)); } } }//package Conditions
Section 75
//CND_EXTCOLLISION (Conditions.CND_EXTCOLLISION) package Conditions { import RunLoop.*; import Objects.*; import Params.*; import Events.*; public class CND_EXTCOLLISION extends CCnd { override public function eva1(_arg1:CRun, _arg2:CObject):Boolean{ var _local3:CObject = _arg1.rhObjectList[_arg1.rhEvtProg.rh1stObjectNumber]; var _local4:int = evtOi; var _local5:PARAM_OBJECT = PARAM_OBJECT(evtParams[0]); var _local6:int = _local5.oi; while (true) { if (_local4 == _arg2.hoOi){ if (_local6 == _local3.hoOi){ break; }; if (_local6 >= 0){ return (false); }; if (colGetList(_arg1, _local5.oiList, _local3.hoOi)){ break; }; return (false); }; if (_local6 == _arg2.hoOi){ if (_local4 == _local3.hoOi){ break; }; if (_local4 >= 0){ return (false); }; if (colGetList(_arg1, evtOiList, _local3.hoOi)){ break; }; return (false); }; if (_local4 < 0){ if (_local6 < 0){ if (colGetList(_arg1, evtOiList, _arg2.hoOi)){ if (colGetList(_arg1, _local5.oiList, _local3.hoOi)){ break; }; if (colGetList(_arg1, _local5.oiList, _arg2.hoOi) == false){ return (false); }; if (colGetList(_arg1, evtOiList, _local3.hoOi)){ break; }; return (false); } else { if (colGetList(_arg1, evtOiList, _local3.hoOi)){ break; }; return (false); }; } else { if (_local6 == _local3.hoOi){ break; }; return (false); }; }; if (_local6 >= 0){ return (false); }; if (_local4 != _local3.hoOi){ return (false); }; break; }; var _local7 = ((_local3.hoCreationId << 16) | (evtIdentifier & 0xFFFF)); if (compute_NoRepeatCol(_local7, _arg2) == false){ if ((_arg1.rhEvtProg.rhEventGroup.evgFlags & CEventGroup.EVGFLAGS_STOPINGROUP) == 0){ return (false); }; _arg1.rhEvtProg.rh3DoStop = true; }; _local7 = ((_arg2.hoCreationId << 16) | (evtIdentifier & 0xFFFF)); if (compute_NoRepeatCol(_local7, _local3) == false){ if ((_arg1.rhEvtProg.rhEventGroup.evgFlags & CEventGroup.EVGFLAGS_STOPINGROUP) == 0){ return (false); }; _arg1.rhEvtProg.rh3DoStop = true; }; _arg1.rhEvtProg.evt_AddCurrentObject(_arg2); _arg1.rhEvtProg.evt_AddCurrentObject(_local3); if (_local3.rom.rmMovement.rmCollisionCount == _arg1.rh3CollisionCount){ _arg2.rom.rmMovement.rmCollisionCount = _arg1.rh3CollisionCount; } else { if (_arg2.rom.rmMovement.rmCollisionCount == _arg1.rh3CollisionCount){ _local3.rom.rmMovement.rmCollisionCount = _arg1.rh3CollisionCount; }; }; return (true); } override public function eva2(_arg1:CRun):Boolean{ return (isColliding(_arg1)); } public function colGetList(_arg1:CRun, _arg2:int, _arg3:int):Boolean{ var _local5:int; if (_arg2 == -1){ return (false); }; var _local4:CQualToOiList = _arg1.rhEvtProg.qualToOiList[(_arg2 & 32767)]; _local5 = 0; while (_local5 < _local4.qoiList.length) { if (_local4.qoiList[_local5] == _arg3){ return (true); }; _local5 = (_local5 + 2); }; return (false); } } }//package Conditions
Section 76
//CND_EXTFLAGRESET (Conditions.CND_EXTFLAGRESET) package Conditions { import RunLoop.*; import Objects.*; public class CND_EXTFLAGRESET extends CCnd implements IEvaExpObject { override public function eva1(_arg1:CRun, _arg2:CObject):Boolean{ return (evaExpObject(_arg1, this)); } override public function eva2(_arg1:CRun):Boolean{ return (evaExpObject(_arg1, this)); } public function evaExpRoutine(_arg1:CObject, _arg2:int, _arg3:int):Boolean{ _arg2 = (_arg2 & 31); if (_arg1.rov != null){ if ((_arg1.rov.rvValueFlags & (1 << _arg2)) != 0){ return (false); }; }; return (true); } } }//package Conditions
Section 77
//CND_EXTFLAGSET (Conditions.CND_EXTFLAGSET) package Conditions { import RunLoop.*; import Objects.*; public class CND_EXTFLAGSET extends CCnd implements IEvaExpObject { override public function eva1(_arg1:CRun, _arg2:CObject):Boolean{ return (evaExpObject(_arg1, this)); } override public function eva2(_arg1:CRun):Boolean{ return (evaExpObject(_arg1, this)); } public function evaExpRoutine(_arg1:CObject, _arg2:int, _arg3:int):Boolean{ _arg2 = (_arg2 & 31); if (_arg1.rov != null){ if ((_arg1.rov.rvValueFlags & (1 << _arg2)) != 0){ return (true); }; }; return (false); } } }//package Conditions
Section 78
//CND_GROUP (Conditions.CND_GROUP) package Conditions { import RunLoop.*; import Objects.*; public class CND_GROUP extends CCnd { override public function eva1(_arg1:CRun, _arg2:CObject):Boolean{ return (false); } override public function eva2(_arg1:CRun):Boolean{ return (false); } } }//package Conditions
Section 79
//CND_MCLICKONOBJECT (Conditions.CND_MCLICKONOBJECT) package Conditions { import RunLoop.*; import Objects.*; import Params.*; import Events.*; public class CND_MCLICKONOBJECT extends CCnd { override public function eva1(_arg1:CRun, _arg2:CObject):Boolean{ var _local8:int; var _local3:PARAM_SHORT = PARAM_SHORT(evtParams[0]); if (_arg1.rhEvtProg.rhCurParam0 != _local3.value){ return (false); }; var _local4:int = _arg1.rhEvtProg.rhCurParam1; var _local5:PARAM_OBJECT = PARAM_OBJECT(evtParams[1]); if (_local4 == _local5.oi){ _arg1.rhEvtProg.evt_AddCurrentObject(_arg1.rhEvtProg.rh4_2ndObject); return (true); }; var _local6:int = _local5.oiList; if ((_local6 & 0x8000) == 0){ return (false); }; var _local7:CQualToOiList = _arg1.rhEvtProg.qualToOiList[(_local6 & 32767)]; _local8 = 0; while (_local8 < _local7.qoiList.length) { if (_local7.qoiList[_local8] == _local4){ _arg1.rhEvtProg.evt_AddCurrentQualifier(_local6); _arg1.rhEvtProg.evt_AddCurrentObject(_arg1.rhEvtProg.rh4_2ndObject); return (true); }; _local8 = (_local8 + 2); }; return (false); } override public function eva2(_arg1:CRun):Boolean{ var _local2:PARAM_SHORT = PARAM_SHORT(evtParams[0]); if (_arg1.rhEvtProg.rh2CurrentClick != _local2.value){ return (false); }; var _local3:PARAM_OBJECT = PARAM_OBJECT(evtParams[1]); return (_arg1.getMouseOnObjectsEDX(_local3.oiList, false)); } } }//package Conditions
Section 80
//CND_MKEYDEPRESSED (Conditions.CND_MKEYDEPRESSED) package Conditions { import RunLoop.*; import Objects.*; import Params.*; public class CND_MKEYDEPRESSED extends CCnd { override public function eva1(_arg1:CRun, _arg2:CObject):Boolean{ return (eva2(_arg1)); } override public function eva2(_arg1:CRun):Boolean{ if (_arg1.rh4DemoMode == CDemoRecord.DEMOPLAY){ if (_arg1.rh4Demo.getKeyState(PARAM_KEY(evtParams[0]).key) == false){ return (negaFALSE()); }; } else { if (_arg1.rhApp.getKeyState(PARAM_KEY(evtParams[0]).key) == false){ return (negaFALSE()); }; }; return (negaTRUE()); } } }//package Conditions
Section 81
//CND_MONOBJECT (Conditions.CND_MONOBJECT) package Conditions { import RunLoop.*; import Objects.*; import Params.*; import Events.*; public class CND_MONOBJECT extends CCnd { override public function eva1(_arg1:CRun, _arg2:CObject):Boolean{ return (eva2(_arg1)); } override public function eva2(_arg1:CRun):Boolean{ var _local2 = !(((evtFlags2 & CEvent.EVFLAG2_NOT) == 0)); var _local3:PARAM_OBJECT = PARAM_OBJECT(evtParams[0]); return (_arg1.getMouseOnObjectsEDX(_local3.oiList, _local2)); } } }//package Conditions
Section 82
//CND_MOUSEWHEELDOWN (Conditions.CND_MOUSEWHEELDOWN) package Conditions { import RunLoop.*; import Objects.*; public class CND_MOUSEWHEELDOWN extends CCnd { override public function eva1(_arg1:CRun, _arg2:CObject):Boolean{ return (true); } override public function eva2(_arg1:CRun):Boolean{ if (_arg1.rhWheelCount == _arg1.rh4EventCount){ return (true); }; return (false); } } }//package Conditions
Section 83
//CND_MOUSEWHEELUP (Conditions.CND_MOUSEWHEELUP) package Conditions { import RunLoop.*; import Objects.*; public class CND_MOUSEWHEELUP extends CCnd { override public function eva1(_arg1:CRun, _arg2:CObject):Boolean{ return (true); } override public function eva2(_arg1:CRun):Boolean{ if (_arg1.rhWheelCount == _arg1.rh4EventCount){ return (true); }; return (false); } } }//package Conditions
Section 84
//CND_NOSAMPLAYING (Conditions.CND_NOSAMPLAYING) package Conditions { import RunLoop.*; import Objects.*; public class CND_NOSAMPLAYING extends CCnd { override public function eva1(_arg1:CRun, _arg2:CObject):Boolean{ return (eva2(_arg1)); } override public function eva2(_arg1:CRun):Boolean{ if (!_arg1.rhApp.soundPlayer.isSoundPlaying()){ return (negaTRUE()); }; return (negaFALSE()); } } }//package Conditions
Section 85
//CND_NOTALWAYS (Conditions.CND_NOTALWAYS) package Conditions { import RunLoop.*; import Objects.*; import Events.*; public class CND_NOTALWAYS extends CCnd { override public function eva1(_arg1:CRun, _arg2:CObject):Boolean{ return (eva2(_arg1)); } override public function eva2(_arg1:CRun):Boolean{ var _local2:CEventGroup = _arg1.rhEvtProg.rhEventGroup; if ((_local2.evgFlags & CEventGroup.EVGFLAGS_NOTALWAYS) != 0){ return (true); }; if ((_local2.evgFlags & CEventGroup.EVGFLAGS_NOMORE) != 0){ return (false); }; _local2.evgInhibit = -2; _local2.evgFlags = (_local2.evgFlags | CEventGroup.EVGFLAGS_NOTALWAYS); return (true); } } }//package Conditions
Section 86
//CND_ONCE (Conditions.CND_ONCE) package Conditions { import RunLoop.*; import Objects.*; import Events.*; public class CND_ONCE extends CCnd { override public function eva1(_arg1:CRun, _arg2:CObject):Boolean{ return (eva2(_arg1)); } override public function eva2(_arg1:CRun):Boolean{ var _local2:CEventGroup = _arg1.rhEvtProg.rhEventGroup; if ((_local2.evgFlags & CEventGroup.EVGFLAGS_ONCE) != 0){ return (false); }; _local2.evgFlags = (_local2.evgFlags | CEventGroup.EVGFLAGS_ONCE); return (true); } } }//package Conditions
Section 87
//CND_START (Conditions.CND_START) package Conditions { import RunLoop.*; import Objects.*; public class CND_START extends CCnd { override public function eva1(_arg1:CRun, _arg2:CObject):Boolean{ if (_arg1.rhLoopCount > 2){ return (false); }; return (true); } override public function eva2(_arg1:CRun):Boolean{ if (_arg1.rhLoopCount > 2){ return (false); }; return (true); } } }//package Conditions
Section 88
//CND_TIMERSUP (Conditions.CND_TIMERSUP) package Conditions { import RunLoop.*; import Objects.*; import Params.*; public class CND_TIMERSUP extends CCnd { override public function eva1(_arg1:CRun, _arg2:CObject):Boolean{ return (eva2(_arg1)); } override public function eva2(_arg1:CRun):Boolean{ var _local2:int; if (evtParams[0].code == 22){ _local2 = _arg1.get_EventExpressionInt(CParamExpression(evtParams[0])); } else { _local2 = PARAM_TIME(evtParams[0]).timer; }; if (_arg1.rhTimer > _local2){ return (true); }; return (false); } } }//package Conditions
Section 89
//IChooseValue (Conditions.IChooseValue) package Conditions { import Objects.*; public interface IChooseValue { function evaluate(_arg1:CObject, _arg2:int):Boolean; } }//package Conditions
Section 90
//IEvaExpObject (Conditions.IEvaExpObject) package Conditions { import Objects.*; public interface IEvaExpObject { function evaExpRoutine(_arg1:CObject, _arg2:int, _arg3:int):Boolean; } }//package Conditions
Section 91
//IEvaObject (Conditions.IEvaObject) package Conditions { import Objects.*; public interface IEvaObject { function evaObjectRoutine(_arg1:CObject):Boolean; } }//package Conditions
Section 92
//CEvent (Events.CEvent) package Events { public class CEvent { public var evtFlags:int; public var evtParams:Array; public var evtFlags2:int; public var evtCode:int; public var evtNParams:int; public var evtOiList:int; public var evtDefType:int; public var evtOi:int; public static var EVFLAG2_NOT:int = 1; public static var EVFLAGS_REPEAT:int = 1; public static var EVFLAGS_DONEBEFOREFADEIN:int = 8; public static var EVFLAGS_NOTDONEINSTART:int = 16; public static var EVFLAGS_DONE:int = 2; public static var EVFLAGS_DEFAULTMASK:int = ((((EVFLAGS_ALWAYS + EVFLAGS_REPEAT) + EVFLAGS_DEFAULT) + EVFLAGS_DONEBEFOREFADEIN) + EVFLAGS_NOTDONEINSTART); public static var EVFLAGS_ALWAYS:int = 32; public static var EVFLAGS_BADOBJECT:int = 128; public static var EVFLAGS_BAD:int = 64; public static var EVFLAGS_DEFAULT:int = 4; } }//package Events
Section 93
//CEventGroup (Events.CEventGroup) package Events { import Application.*; import Actions.*; import Conditions.*; public class CEventGroup { public var evgNAct:int; public var evgEvents:Array; public var evgFlags:int; public var evgInhibitCpt:int; public var evgInhibit:int; public var evgNCond:int; public var evgIdentifier:int; public static var EVGFLAGS_UNDOMARK:int = 64; public static var EVGFLAGS_EDITORMARK:int = 32; public static var EVGFLAGS_ORINGROUP:int = 0x0400; public static var EVGFLAGS_STOPINGROUP:int = 0x0800; public static var EVGFLAGS_SHUFFLE:int = 16; public static var EVGFLAGS_NOGOOD:int = 0x8000; public static var EVGFLAGS_DEFAULTMASK:int = (EVGFLAGS_BREAKPOINT + EVGFLAGS_GROUPED); public static var EVGFLAGS_ONCE:int = 1; public static var EVGFLAGS_COMPLEXGROUP:int = 128; public static var EVGFLAGS_ORLOGICAL:int = 0x1000; public static var EVGFLAGS_NOMORE:int = 8; public static var EVGFLAGS_REPEAT:int = 4; public static var EVGFLAGS_ALWAYSCLEAN:int = 0x0200; public static var EVGFLAGS_LIMITED:int = (((EVGFLAGS_SHUFFLE + EVGFLAGS_NOTALWAYS) + EVGFLAGS_REPEAT) + EVGFLAGS_NOMORE); public static var EVGFLAGS_NOTALWAYS:int = 2; public static var EVGFLAGS_GROUPED:int = 0x2000; public static var EVGFLAGS_INACTIVE:int = 0x4000; public static var EVGFLAGS_BREAKPOINT:int = 0x0100; public static function create(_arg1:CRunApp):CEventGroup{ var _local5:int; var _local2:int = _arg1.file.getFilePointer(); var _local3:int = _arg1.file.readShort(); var _local4:CEventGroup = new (CEventGroup); _local4.evgNCond = _arg1.file.readAByte(); _local4.evgNAct = _arg1.file.readAByte(); _local4.evgFlags = _arg1.file.readAShort(); _local4.evgInhibit = _arg1.file.readAShort(); _local4.evgInhibitCpt = _arg1.file.readAShort(); _local4.evgIdentifier = _arg1.file.readAShort(); _arg1.file.skipBytes(2); _local4.evgEvents = new Array((_local4.evgNCond + _local4.evgNAct)); var _local6:int; _local5 = 0; while (_local5 < _local4.evgNCond) { var _temp1 = _local6; _local6 = (_local6 + 1); var _local7 = _temp1; _local4.evgEvents[_local7] = CCnd.create(_arg1); _local5++; }; _local5 = 0; while (_local5 < _local4.evgNAct) { var _temp2 = _local6; _local6 = (_local6 + 1); _local7 = _temp2; _local4.evgEvents[_local7] = CAct.create(_arg1); _local5++; }; _arg1.file.seek((_local2 - _local3)); return (_local4); } } }//package Events
Section 94
//CEventProgram (Events.CEventProgram) package Events { import Application.*; import Services.*; import Expressions.*; import Banks.*; import OI.*; import RunLoop.*; import Objects.*; import Params.*; import Sprites.*; import Frame.*; import Actions.*; import Conditions.*; public class CEventProgram { private var qualOilPos2:int; public var qualifiers:Array; public var rhCurParam0:int; public var rhCurParam1:int; public var maxObjects:int; public var rh4TimerEventsBase:int; public var rh4EventCountOR:int; public var nQualifiers:int; public var events:Array; public var rh2ActionEndRoutine:Boolean; public var rh2ActionCount:int; public var nEvents:int; public var rh2EnablePick:Boolean; public var rh4CheckDoneInstart:Boolean; public var rhEventAlways:Boolean; public var rh2EventPos:CObject; public var rhCurCode:int; public var rh2ShuffleBuffer:CArrayList; public var rh3DoStop:Boolean; private var qualOilPos:int; public var maxOi:int;// = 0 public var bReady:Boolean; public var nPlayers:int; public var rh2EventQualPos:CQualToOiList; public var qualToOiList:Array; public var rh2CurrentClick:int; public var rh2EventCount:int; public var rh2EventPosOiList:int; public var rh3CurrentMenu:int; public var rh4_2ndObject:CObject; public var rh2EventPrevOiList:CObjInfo; public var rh2PushedEvents:CArrayList; public var rh2ActionOn:Boolean; public var listPointers:Array; public var rh2EventType:int; public var rh2EventQualPosNum:int; public var rh2EventPrev:CObject; public var rhCurOi:int; private var qualOilPtr2:int; public var eventPointersCnd:Array; public var rh4ConditionsFalse:Boolean; public var evtNSelectedObjects:int; public var rhCurObjectNumber:int; public var repeatFlag:Boolean; public var nConditions:Array; public var eventPointersGroup:Array; public var rh4PickFlags:Array; public var rhPtr:CRun; public var rh2ActionLoopCount:int; public var limitBuffer:Array; public var rh2ActionLoop:Boolean; public var colBuffer:Array; public var rhEventGroup:CEventGroup; public var rh1stObjectNumber:int; private var qualOilPtr:int; public var rhEvents:Array; public static var EVENTS_EXTBASE:int = 80; public static var PARAMCLICK_DOUBLE:int = 0x0100; public function CEventProgram(){ nConditions = new Array((7 + COI.OBJ_LAST)); rhEvents = new Array((COI.NUMBEROF_SYSTEMTYPES + 1)); rh4PickFlags = new Array(4); } public function make_ColList1(_arg1:CEventGroup, _arg2:int, _arg3:int):int{ var _local4:int; var _local5:int; var _local6:int; var _local7:int; var _local8:CEvent; var _local9:CParam; var _local10:int; _local10 = 0; while (_local10 < _arg1.evgNCond) { _local8 = _arg1.evgEvents[_local10]; if (EVTTYPE(_local8.evtCode) >= 2){ _local5 = (0x8000 + CObjInfo.OILIMITFLAGS_BACKDROPS); _local6 = getEventCode(_local8.evtCode); switch (_local6){ case (-14 << 16): _local9 = _local8.evtParams[0]; _local7 = qual_GetFirstOiList(_local8.evtOiList); while (_local7 != -1) { _local4 = rhPtr.rhOiList[_local7].oilOi; if (_arg3 == _local4){ _local5 = 0; _arg2 = make_ColList2(_arg2, _arg3, PARAM_OBJECT(_local9).oiList); }; _local7 = qual_GetNextOiList(); }; if (_local5 == 0){ break; }; _local7 = qual_GetFirstOiList(PARAM_OBJECT(_local9).oiList); while (_local7 != -1) { _local4 = rhPtr.rhOiList[_local7].oilOi; if (_arg3 == _local4){ _arg2 = make_ColList2(_arg2, _arg3, _local8.evtOiList); }; _local7 = qual_GetNextOiList(); }; break; case (-12 << 16): _local9 = _local8.evtParams[0]; _local5 = (0x8000 + PARAM_SHORT(_local9).value); case (-13 << 16): _local7 = qual_GetFirstOiList(_local8.evtOiList); while (_local7 != -1) { _local4 = rhPtr.rhOiList[_local7].oilOi; if (_arg3 == _local4){ var _temp1 = _arg2; _arg2 = (_arg2 + 1); var _local11 = _temp1; colBuffer[_local11] = _arg3; var _temp2 = _arg2; _arg2 = (_arg2 + 1); var _local12 = _temp2; colBuffer[_local12] = _local5; }; _local7 = qual_GetNextOiList(); }; break; }; }; _local10++; }; return (_arg2); } public function make_ColList2(_arg1:int, _arg2:int, _arg3:int):int{ var _local4:int; var _local5:int; var _local6:int; _local5 = qual_GetFirstOiList(_arg3); while (_local5 != -1) { _local4 = rhPtr.rhOiList[_local5].oilOi; _local6 = 0; while (_local6 < _arg1) { if ((((colBuffer[_local6] == _arg2)) && ((colBuffer[(_local6 + 1)] == _local4)))){ break; }; _local6 = (_local6 + 2); }; if (_local6 == _arg1){ var _temp1 = _arg1; _arg1 = (_arg1 + 1); var _local7 = _temp1; colBuffer[_local7] = _arg2; var _temp2 = _arg1; _arg1 = (_arg1 + 1); var _local8 = _temp2; colBuffer[_local8] = _local4; }; _local5 = qual_GetNextOiList(); }; return (_arg1); } public function qual_GetNextOiList2():int{ var _local1:int; if (qualOilPtr2 == -1){ return (-1); }; if (qualOilPos2 >= qualToOiList[qualOilPtr2].qoiList.length){ return (-1); }; _local1 = qualToOiList[qualOilPtr2].qoiList[(qualOilPos2 + 1)]; qualOilPos2 = (qualOilPos2 + 2); return (_local1); } public function assemblePrograms(_arg1:CRun):void{ var _local2:CEventGroup; var _local3:CEvent; var _local4:CParam; var _local5:int; var _local6:int; var _local7:int; var _local8:int; var _local9:int; var _local10:int; var _local11:int; var _local12:int; var _local13:int; var _local14:int; var _local15:int; var _local16:int; var _local17:int; var _local18:int; var _local19:int; var _local20:int; var _local21:int; var _local22:int; var _local23:int; var _local24:int; var _local25:int; var _local26:int; var _local27:int; var _local28:int; var _local29:Boolean; var _local30:int; var _local31:CObjInfo; var _local32:CObject; var _local34:int; var _local36:int; var _local37:int; var _local38:int; var _local40:int; var _local43:int; var _local45:int; var _local47:int; var _local49:int; var _local50:int; var _local51:Array; var _local52:CParamExpression; var _local53:CLO; var _local54:CExpOi; var _local55:PARAM_OBJECT; var _local56:int; rhPtr = _arg1; rh2ActionCount = 0; var _local33:int; _local11 = 0; _local13 = 0; while (_local13 < rhPtr.rhMaxOI) { if (rhPtr.rhOiList[_local13].oilOi != -1){ rhPtr.rhOiList[_local13].oilActionCount = -1; rhPtr.rhOiList[_local13].oilLimitFlags = 0; rhPtr.rhOiList[_local13].oilLimitList = -1; _local11++; if ((rhPtr.rhOiList[_local13].oilOi + 1) > _local33){ _local33 = (rhPtr.rhOiList[_local13].oilOi + 1); }; }; _local13++; }; qualToOiList = null; if (nQualifiers > 0){ _local51 = new Array(nQualifiers); _local20 = 0; while (_local20 < nQualifiers) { _local7 = (qualifiers[_local20].qOi & 32767); _local51[_local20] = 0; _local34 = 0; while (_local34 < rhPtr.rhMaxOI) { if (rhPtr.rhOiList[_local34].oilType == qualifiers[_local20].qType){ _local13 = 0; while ((((_local13 < 8)) && (!((rhPtr.rhOiList[_local34].oilQualifiers[_local13] == -1))))) { if (_local7 == rhPtr.rhOiList[_local34].oilQualifiers[_local13]){ var _local57 = _local51; var _local58 = _local20; var _local59 = (_local57[_local58] + 1); _local57[_local58] = _local59; }; _local13++; }; }; _local34++; }; _local20++; }; qualToOiList = new Array(nQualifiers); _local20 = 0; while (_local20 < nQualifiers) { qualToOiList[_local20] = new CQualToOiList(); if (_local51[_local20] != 0){ qualToOiList[_local20].qoiList = new Array((_local51[_local20] * 2)); }; _local12 = 0; _local7 = (qualifiers[_local20].qOi & 32767); _local34 = 0; while (_local34 < rhPtr.rhMaxOI) { if (rhPtr.rhOiList[_local34].oilType == qualifiers[_local20].qType){ _local13 = 0; while ((((_local13 < 8)) && (!((rhPtr.rhOiList[_local34].oilQualifiers[_local13] == -1))))) { if (_local7 == rhPtr.rhOiList[_local34].oilQualifiers[_local13]){ qualToOiList[_local20].qoiList[(_local12 * 2)] = rhPtr.rhOiList[_local34].oilOi; qualToOiList[_local20].qoiList[((_local12 * 2) + 1)] = _local34; _local12++; }; _local13++; }; }; _local34++; }; qualToOiList[_local20].qoiActionCount = -1; _local20++; }; }; colBuffer = new Array((((_local33 * 100) * 2) + 1)); var _local35:int; _local36 = 0; while (_local36 < events.length) { _local2 = events[_local36]; _local37 = 0; while (_local37 < (_local2.evgNAct + _local2.evgNCond)) { _local3 = _local2.evgEvents[_local37]; _local3.evtFlags = (_local3.evtFlags & ~(CEvent.EVFLAGS_BADOBJECT)); if (EVTTYPE(_local3.evtCode) >= 0){ _local3.evtOiList = get_OiListOffset(_local3.evtOi, EVTTYPE(_local3.evtCode)); }; if (_local3.evtNParams > 0){ _local38 = 0; while (_local38 < _local3.evtNParams) { _local4 = _local3.evtParams[_local38]; switch (_local4.code){ case 25: PARAM_INT(_local4).value = 0; break; case 21: if ((_local3.evtOi & COI.OIFLAG_QUALIFIER) == 0){ _local53 = rhPtr.rhFrame.LOList.first_LevObj(); while (_local53 != null) { if (_local3.evtOi == _local53.loOiHandle){ CCreate(_local4).cdpHFII = _local53.loHandle; break; }; _local53 = rhPtr.rhFrame.LOList.next_LevObj(); }; } else { CCreate(_local4).cdpHFII = -1; }; _local7 = CPosition(_local4).posOINUMParent; if (_local7 != -1){ CPosition(_local4).posOiList = get_OiListOffset(_local7, CPosition(_local4).posTypeParent); }; break; case 9: case 18: case 16: _local7 = CPosition(_local4).posOINUMParent; if (_local7 != -1){ CPosition(_local4).posOiList = get_OiListOffset(_local7, CPosition(_local4).posTypeParent); }; break; case 1: PARAM_OBJECT(_local4).oiList = get_OiListOffset(PARAM_OBJECT(_local4).oi, PARAM_OBJECT(_local4).type); break; case 15: case 27: case 28: case 45: case 46: case 22: case 23: case 52: case 59: case 53: case 54: _local52 = CParamExpression(_local4); _local13 = 0; while (_local13 < _local52.tokens.length) { if (EVTTYPE(_local52.tokens[_local13].code) > 0){ _local54 = CExpOi(_local52.tokens[_local13]); _local54.oiList = get_OiListOffset(_local54.oi, EVTTYPE(_local54.code)); }; _local13++; }; break; }; _local38++; }; }; _local37++; }; _local18 = 0; _local19 = ((CEventGroup.EVGFLAGS_ONCE | CEventGroup.EVGFLAGS_LIMITED) | CEventGroup.EVGFLAGS_STOPINGROUP); _local37 = 0; while (_local37 < (_local2.evgNCond + _local2.evgNAct)) { _local3 = _local2.evgEvents[_local37]; _local10 = EVTTYPE(_local3.evtCode); _local23 = _local3.evtCode; _local13 = 0; _local21 = 0; _local22 = 0; _local4 = null; if (_local10 >= COI.OBJ_SPR){ switch (getEventCode(_local23)){ case (4 << 16): case (9 << 16): _local18 = (_local18 | CEventGroup.EVGFLAGS_STOPINGROUP); _local7 = _local3.evtOi; if ((_local7 & COI.OIFLAG_QUALIFIER) != 0){ _local5 = qual_GetFirstOiList2(_local3.evtOiList); while (_local5 != -1) { _local35 = make_ColList1(_local2, _local35, rhPtr.rhOiList[_local5].oilOi); _local5 = qual_GetNextOiList2(); }; } else { _local35 = make_ColList1(_local2, _local35, _local7); }; break; case (25 << 16): _local18 = (_local18 | CEventGroup.EVGFLAGS_SHUFFLE); break; case (-14 << 16): _local4 = _local3.evtParams[0]; _local55 = PARAM_OBJECT(_local3.evtParams[0]); addColList(_local3.evtOiList, _local3.evtOi, _local55.oiList, _local55.oi); addColList(_local55.oiList, _local55.oi, _local3.evtOiList, _local3.evtOi); _local15 = EVTTYPE(_local3.evtCode); if (isTypeRealSprite(_local15)){ _local22 = (CObjInfo.OILIMITFLAGS_QUICKCOL | CObjInfo.OILIMITFLAGS_ONCOLLIDE); } else { _local22 = ((CObjInfo.OILIMITFLAGS_QUICKCOL | CObjInfo.OILIMITFLAGS_QUICKEXT) | CObjInfo.OILIMITFLAGS_ONCOLLIDE); }; _local16 = _local55.type; if (isTypeRealSprite(_local16)){ _local21 = (CObjInfo.OILIMITFLAGS_QUICKCOL | CObjInfo.OILIMITFLAGS_ONCOLLIDE); } else { _local21 = ((CObjInfo.OILIMITFLAGS_QUICKCOL | CObjInfo.OILIMITFLAGS_QUICKEXT) | CObjInfo.OILIMITFLAGS_ONCOLLIDE); }; _local13 = 3; break; case (-4 << 16): _local15 = EVTTYPE(_local3.evtCode); if (isTypeRealSprite(_local15)){ _local22 = CObjInfo.OILIMITFLAGS_QUICKCOL; } else { _local22 = (CObjInfo.OILIMITFLAGS_QUICKCOL | CObjInfo.OILIMITFLAGS_QUICKEXT); }; _local4 = _local3.evtParams[0]; _local16 = PARAM_OBJECT(_local3.evtParams[0]).type; if (isTypeRealSprite(_local16)){ _local21 = CObjInfo.OILIMITFLAGS_QUICKCOL; } else { _local21 = (CObjInfo.OILIMITFLAGS_QUICKCOL | CObjInfo.OILIMITFLAGS_QUICKEXT); }; _local13 = 3; break; case (-11 << 16): case (-12 << 16): _local21 = CObjInfo.OILIMITFLAGS_QUICKBORDER; _local13 = 1; break; case (-13 << 16): _local21 = CObjInfo.OILIMITFLAGS_QUICKBACK; _local13 = 1; break; }; } else { switch (_local23){ case ((-6 << 16) | 0xFFFF): _local19 = (_local19 & ~(CEventGroup.EVGFLAGS_ONCE)); break; case ((-7 << 16) | 0xFFFF): _local19 = (_local19 | CEventGroup.EVGFLAGS_NOMORE); break; case ((-5 << 16) | 0xFFFF): _local19 = (_local19 | CEventGroup.EVGFLAGS_NOMORE); break; case ((-4 << 16) | 0xFFFF): _local19 = (_local19 | (CEventGroup.EVGFLAGS_NOTALWAYS + CEventGroup.EVGFLAGS_REPEAT)); break; case ((-4 << 16) | 65530): _local22 = CObjInfo.OILIMITFLAGS_QUICKCOL; _local4 = _local3.evtParams[0]; _local13 = 2; break; case ((-7 << 16) | 65530): _local22 = CObjInfo.OILIMITFLAGS_QUICKCOL; _local4 = _local3.evtParams[1]; _local13 = 2; break; }; }; if ((_local13 & 1) != 0){ _local5 = qual_GetFirstOiList(_local3.evtOiList); while (_local5 != -1) { rhPtr.rhOiList[_local5].oilLimitFlags = (rhPtr.rhOiList[_local5].oilLimitFlags | _local21); _local5 = qual_GetNextOiList(); }; }; if ((_local13 & 2) != 0){ _local5 = qual_GetFirstOiList(PARAM_OBJECT(_local4).oiList); while (_local5 != -1) { rhPtr.rhOiList[_local5].oilLimitFlags = (rhPtr.rhOiList[_local5].oilLimitFlags | _local22); _local5 = qual_GetNextOiList(); }; }; _local37++; }; _local2.evgFlags = (_local2.evgFlags & ~(_local19)); _local2.evgFlags = (_local2.evgFlags | _local18); _local36++; }; colBuffer[_local35] = -1; var _local39:Array = new Array(((COI.NUMBEROF_SYSTEMTYPES + _local33) + 1)); _local28 = 0; _local40 = 0; _local10 = -(COI.NUMBEROF_SYSTEMTYPES); while (_local10 < 0) { _local39[_local40] = _local28; _local28 = (_local28 + nConditions[(COI.NUMBEROF_SYSTEMTYPES + _local10)]); _local10++; _local40++; }; _local34 = 0; while (_local34 < rhPtr.rhMaxOI) { _local39[_local40] = _local28; if (rhPtr.rhOiList[_local34].oilType < COI.KPX_BASE){ _local28 = (_local28 + ((nConditions[(COI.NUMBEROF_SYSTEMTYPES + rhPtr.rhOiList[_local34].oilType)] + EVENTS_EXTBASE) + 1)); } else { _local28 = (_local28 + ((rhPtr.rhApp.extLoader.getNumberOfConditions(rhPtr.rhOiList[_local34].oilType) + EVENTS_EXTBASE) + 1)); }; _local34++; _local40++; }; var _local41:int = _local28; listPointers = new Array(_local41); _local13 = 0; while (_local13 < _local41) { listPointers[_local13] = 0; _local13++; }; _local25 = 0; var _local42:Array = new Array(rhPtr.rhFrame.maxObjects); _local36 = 0; while (_local36 < nEvents) { _local2 = events[_local36]; _local2.evgFlags = (_local2.evgFlags & ~(CEventGroup.EVGFLAGS_ORINGROUP)); _local29 = true; _local30 = 0; _local37 = 0; while (_local37 < _local2.evgNCond) { _local3 = _local2.evgEvents[_local37]; _local10 = EVTTYPE(_local3.evtCode); _local23 = _local3.evtCode; _local14 = -(EVTNUM(_local23)); if (_local29){ if ((_local3.evtFlags & CEvent.EVFLAGS_ALWAYS) != 0){ _local25++; }; if (_local10 < 0){ _local57 = listPointers; _local58 = (_local39[(7 + _local10)] + _local14); _local59 = (_local57[_local58] + 1); _local57[_local58] = _local59; } else { _local43 = 0; _local5 = qual_GetFirstOiList(_local3.evtOiList); while (_local5 != -1) { _local57 = listPointers; _local58 = (_local39[(COI.NUMBEROF_SYSTEMTYPES + _local5)] + _local14); _local59 = (_local57[_local58] + 1); _local57[_local58] = _local59; var _temp1 = _local43; _local43 = (_local43 + 1); _local57 = _temp1; _local42[_local57] = _local5; _local5 = qual_GetNextOiList(); }; _local42[_local43] = -1; if (getEventCode(_local23) == (-14 << 16)){ _local4 = _local3.evtParams[0]; _local6 = qual_GetFirstOiList(PARAM_OBJECT(_local4).oiList); while (_local6 != -1) { _local43 = 0; while (((!((_local42[_local43] == _local6))) && (!((_local42[_local43] == -1))))) { _local43++; }; if (_local42[_local43] == -1){ _local57 = listPointers; _local58 = (_local39[(COI.NUMBEROF_SYSTEMTYPES + _local6)] + _local14); _local59 = (_local57[_local58] + 1); _local57[_local58] = _local59; }; _local6 = qual_GetNextOiList(); }; }; }; }; _local29 = false; if ((((_local3.evtCode == ((-24 << 16) | 0xFFFF))) || ((_local3.evtCode == ((-25 << 16) | 0xFFFF))))){ _local29 = true; _local2.evgFlags = (_local2.evgFlags | CEventGroup.EVGFLAGS_ORINGROUP); if (_local30 == 0){ _local30 = _local3.evtCode; } else { _local3.evtCode = _local30; }; if (_local30 == ((-25 << 16) | 0xFFFF)){ _local2.evgFlags = (_local2.evgFlags | CEventGroup.EVGFLAGS_ORLOGICAL); }; }; _local37++; }; _local36++; }; var _local44:int = (_local25 + 1); _local45 = 0; while (_local45 < _local41) { if (listPointers[_local45] != 0){ _local28 = listPointers[_local45]; listPointers[_local45] = _local44; _local44 = (_local44 + (_local28 + 1)); }; _local45++; }; eventPointersGroup = new Array(_local44); eventPointersCnd = new Array(_local44); _local13 = 0; while (_local13 < _local44) { eventPointersGroup[_local13] = null; eventPointersCnd[_local13] = 0; _local13++; }; var _local46:Array = new Array(_local41); _local13 = 0; while (_local13 < _local41) { _local46[_local13] = listPointers[_local13]; _local13++; }; _local26 = 0; _local25 = 0; _local36 = 0; while (_local36 < nEvents) { _local2 = events[_local36]; _local29 = true; _local37 = 0; while (_local37 < _local2.evgNCond) { _local3 = _local2.evgEvents[_local37]; _local10 = EVTTYPE(_local3.evtCode); _local23 = _local3.evtCode; _local14 = -(EVTNUM(_local23)); if (_local29){ if ((_local3.evtFlags & CEvent.EVFLAGS_ALWAYS) != 0){ _local25++; eventPointersGroup[_local26] = _local2; eventPointersCnd[_local26] = _local37; _local26++; }; if (_local10 < 0){ _local47 = (_local39[(COI.NUMBEROF_SYSTEMTYPES + _local10)] + _local14); eventPointersGroup[_local46[_local47]] = _local2; eventPointersCnd[_local46[_local47]] = _local37; _local57 = _local46; _local58 = _local47; _local59 = (_local57[_local58] + 1); _local57[_local58] = _local59; } else { _local43 = 0; _local5 = qual_GetFirstOiList(_local3.evtOiList); while (_local5 != -1) { _local47 = (_local39[(COI.NUMBEROF_SYSTEMTYPES + _local5)] + _local14); eventPointersGroup[_local46[_local47]] = _local2; eventPointersCnd[_local46[_local47]] = _local37; _local57 = _local46; _local58 = _local47; _local59 = (_local57[_local58] + 1); _local57[_local58] = _local59; var _temp2 = _local43; _local43 = (_local43 + 1); _local57 = _temp2; _local42[_local57] = _local5; _local5 = qual_GetNextOiList(); }; _local42[_local43] = -1; if (getEventCode(_local23) == (-14 << 16)){ _local4 = _local3.evtParams[0]; _local6 = qual_GetFirstOiList(PARAM_OBJECT(_local4).oiList); while (_local6 != -1) { _local43 = 0; while (((!((_local42[_local43] == _local6))) && (!((_local42[_local43] == -1))))) { _local43++; }; if (_local42[_local43] == -1){ _local47 = (_local39[(COI.NUMBEROF_SYSTEMTYPES + _local6)] + _local14); eventPointersGroup[_local46[_local47]] = _local2; eventPointersCnd[_local46[_local47]] = _local37; _local57 = _local46; _local58 = _local47; _local59 = (_local57[_local58] + 1); _local57[_local58] = _local59; }; _local6 = qual_GetNextOiList(); }; }; }; }; _local29 = false; if ((((_local3.evtCode == ((-24 << 16) | 0xFFFF))) || ((_local3.evtCode == ((-25 << 16) | 0xFFFF))))){ _local29 = true; }; _local37++; }; _local36++; }; _local45 = _local39[(COI.NUMBEROF_SYSTEMTYPES + COI.OBJ_TIMER)]; _local27 = listPointers[(_local45 - EVTNUM(((-3 << 16) | 65532)))]; limitBuffer = new Array(((_local33 + 1) + (_local35 / 2))); var _local48:int; _local34 = 0; while (_local34 < rhPtr.rhMaxOI) { _local31 = rhPtr.rhOiList[_local34]; _local45 = _local39[(COI.NUMBEROF_SYSTEMTYPES + _local34)]; _local31.oilEvents = _local45; if ((_local31.oilOEFlags & CObjectCommon.OEFLAG_MOVEMENTS) != 0){ _local24 = 0; _local28 = listPointers[(_local45 - EVTNUM((-12 << 16)))]; if (_local28 != 0){ while (eventPointersGroup[_local28] != null) { _local2 = eventPointersGroup[_local28]; _local3 = _local2.evgEvents[eventPointersCnd[_local28]]; _local17 = PARAM_SHORT(_local3.evtParams[0]).value; _local56 = evg_FindAction(_local2, 0); _local13 = _local2.evgNAct; while (_local13 > 0) { _local3 = _local2.evgEvents[_local56]; if (_local3.evtCode == ((8 << 16) | (_local31.oilType & 0xFFFF))){ _local24 = (_local24 | _local17); }; _local13--; _local56++; }; _local28++; }; }; _local31.oilWrap = _local24; _local8 = _local31.oilOi; _local35 = 0; _local49 = 0; while (colBuffer[_local35] != -1) { if (colBuffer[_local35] == _local8){ _local9 = colBuffer[(_local35 + 1)]; if ((_local9 & 0x8000) != 0){ _local31.oilLimitFlags = (_local31.oilLimitFlags | _local9); } else { _local50 = 0; while ((((_local50 < _local49)) && (!((limitBuffer[(_local48 + _local50)] == _local9))))) { _local50++; }; if (_local50 == _local49){ var _temp3 = _local49; _local49 = (_local49 + 1); limitBuffer[(_local48 + _temp3)] = _local9; }; }; }; _local35 = (_local35 + 2); }; if (_local49 > 0){ _local31.oilLimitList = _local48; var _temp4 = _local49; _local49 = (_local49 + 1); limitBuffer[(_local48 + _temp4)] = -1; _local48 = (_local48 + _local49); }; }; _local34++; }; rhEvents[0] = 0; _local13 = 1; while (_local13 <= COI.NUMBEROF_SYSTEMTYPES) { rhEvents[_local13] = _local39[(COI.NUMBEROF_SYSTEMTYPES - _local13)]; _local13++; }; _local34 = 0; while (_local34 < rhPtr.rhMaxOI) { _local31 = rhPtr.rhOiList[_local34]; _local5 = _local31.oilObject; if ((_local5 & 2147483648) == 0){ do { _local32 = rhPtr.rhObjectList[_local5]; _local32.hoEvents = _local31.oilEvents; _local32.hoOiList = _local31; _local32.hoLimitFlags = _local31.oilLimitFlags; if ((_local32.hoOEFlags & CObjectCommon.OEFLAG_MOVEMENTS) != 0){ _local32.rom.rmWrapping = _local31.oilWrap; }; if (((!(((_local32.hoOEFlags & CObjectCommon.OEFLAG_SPRITES) == 0))) && (((_local32.hoLimitFlags & CObjInfo.OILIMITFLAGS_QUICKCOL) == 0)))){ _local32.ros.setColFlag(false); }; if ((_local32.hoOEFlags & CObjectCommon.OEFLAG_MANUALSLEEP) == 0){ _local32.hoOEFlags = (_local32.hoOEFlags & ~(CObjectCommon.OEFLAG_NEVERSLEEP)); if ((_local32.hoLimitFlags & CObjInfo.OILIMITFLAGS_QUICKBACK) != 0){ if ((rhPtr.rhFrame.leFlags & CRunFrame.LEF_TOTALCOLMASK) != 0){ _local32.hoOEFlags = (_local32.hoOEFlags | CObjectCommon.OEFLAG_NEVERSLEEP); }; }; if ((_local32.hoLimitFlags & (CObjInfo.OILIMITFLAGS_QUICKCOL | CObjInfo.OILIMITFLAGS_QUICKBORDER)) != 0){ _local32.hoOEFlags = (_local32.hoOEFlags | CObjectCommon.OEFLAG_NEVERSLEEP); }; }; _local5 = _local32.hoNumNext; } while ((_local5 & 2147483648) == 0); }; _local34++; }; if (_local25 != 0){ rhEventAlways = true; } else { rhEventAlways = false; }; if (_local27 != 0){ rh4TimerEventsBase = _local27; } else { rh4TimerEventsBase = 0; }; colBuffer = null; bReady = true; } public function evt_NextObject():CObject{ var _local2:CObjInfo; var _local1:CObject = rh2EventPos; if (_local1 == null){ _local2 = rhPtr.rhOiList[rh2EventPosOiList]; if (_local2.oilListSelected >= 0){ _local1 = rhPtr.rhObjectList[_local2.oilListSelected]; rh2EventPrev = null; rh2EventPrevOiList = _local2; rh2EventPos = _local1; return (_local1); }; }; if (_local1 != null){ if (_local1.hoNextSelected >= 0){ rh2EventPrev = _local1; rh2EventPrevOiList = null; _local1 = rhPtr.rhObjectList[_local1.hoNextSelected]; rh2EventPos = _local1; return (_local1); }; }; if (rh2EventQualPos == null){ return (null); }; do { rh2EventQualPosNum = (rh2EventQualPosNum + 2); if (rh2EventQualPosNum >= rh2EventQualPos.qoiList.length){ return (null); }; _local2 = rhPtr.rhOiList[rh2EventQualPos.qoiList[(rh2EventQualPosNum + 1)]]; } while (_local2.oilListSelected < 0); rh2EventPrev = null; rh2EventPrevOiList = _local2; _local1 = rhPtr.rhObjectList[_local2.oilListSelected]; rh2EventPos = _local1; rh2EventPosOiList = rh2EventQualPos.qoiList[(rh2EventQualPosNum + 1)]; return (_local1); } public function push_Event(_arg1:int, _arg2:int, _arg3:int, _arg4:CObject, _arg5:int):void{ var _local6:CPushedEvent = new CPushedEvent(_arg1, _arg2, _arg3, _arg4, _arg5); if (rh2PushedEvents == null){ rh2PushedEvents = new CArrayList(); }; rh2PushedEvents.add(_local6); } public function qoi_GetNextListSelected(_arg1:CQualToOiList):int{ var _local3:int; var _local4:CObjInfo; var _local2:int = _arg1.qoiActionPos; while (_local2 < _arg1.qoiList.length) { _local3 = _arg1.qoiList[(_local2 + 1)]; _local4 = rhPtr.rhOiList[_local3]; if (_local4.oilEventCount == rh2EventCount){ _arg1.qoiSelectedFlag = true; if (_local4.oilListSelected >= 0){ _arg1.qoiActionPos = (_local2 + 2); return (_local4.oilListSelected); }; }; _local2 = (_local2 + 2); }; return (-1); } public function unBranchPrograms():void{ bReady = false; qualToOiList = null; limitBuffer = null; listPointers = null; eventPointersGroup = null; eventPointersCnd = null; } public function evt_NextObjectFromType():CObject{ var _local2:CObjInfo; var _local1:CObject = rh2EventPos; if (_local1 == null){ _local2 = rhPtr.rhOiList[rh2EventPosOiList]; if (_local2.oilListSelected >= 0){ _local1 = rhPtr.rhObjectList[_local2.oilListSelected]; rh2EventPrev = null; rh2EventPrevOiList = _local2; rh2EventPos = _local1; return (_local1); }; }; if (_local1 != null){ if (_local1.hoNextSelected >= 0){ rh2EventPrev = _local1; rh2EventPrevOiList = null; _local1 = rhPtr.rhObjectList[_local1.hoNextSelected]; rh2EventPos = _local1; return (_local1); }; }; var _local3:int = rh2EventPosOiList; var _local4:int = rhPtr.rhOiList[_local3].oilType; _local3++; while (_local3 < rhPtr.rhMaxOI) { if (((((!((rh2EventType == -1))) && ((rhPtr.rhOiList[_local3].oilType == _local4)))) || ((rh2EventType == -1)))){ if (rhPtr.rhOiList[_local3].oilListSelected >= 0){ _local1 = rhPtr.rhObjectList[rhPtr.rhOiList[_local3].oilListSelected]; rh2EventPrev = null; rh2EventPrevOiList = rhPtr.rhOiList[_local3]; rh2EventPos = _local1; rh2EventPosOiList = _local3; return (_local1); }; }; _local3++; }; return (null); } public function evt_DeleteCurrentType(_arg1:int):void{ var _local2:int; var _local3:CObjInfo; bts(rh4PickFlags, _arg1); _local2 = 0; while (_local2 < rhPtr.rhMaxOI) { _local3 = rhPtr.rhOiList[_local2]; if (_local3.oilType == _arg1){ _local3.oilEventCount = rh2EventCount; _local3.oilListSelected = -1; _local3.oilNumOfSelected = 0; }; _local2++; }; } public function get_ParamActionObjects(_arg1:int, _arg2:CAct):CObject{ rh2EnablePick = true; var _local3:CObject = get_CurrentObjects(_arg1); if (_local3 != null){ if (repeatFlag == false){ _arg2.evtFlags = (_arg2.evtFlags & ~(CAct.ACTFLAGS_REPEAT)); return (_local3); }; _arg2.evtFlags = (_arg2.evtFlags | CAct.ACTFLAGS_REPEAT); rh2ActionLoop = true; return (_local3); }; _arg2.evtFlags = (_arg2.evtFlags & ~(CAct.ACTFLAGS_REPEAT)); _arg2.evtFlags = (_arg2.evtFlags | CEvent.EVFLAGS_NOTDONEINSTART); return (_local3); } public function qual_GetFirstOiList2(_arg1:int):int{ if ((_arg1 & 0x8000) == 0){ qualOilPtr2 = -1; return (_arg1); }; if (_arg1 == -1){ return (-1); }; _arg1 = (_arg1 & 32767); qualOilPtr2 = _arg1; qualOilPos2 = 0; return (qual_GetNextOiList2()); } public function qoi_GetFirstListSelected(_arg1:CQualToOiList):int{ _arg1.qoiActionPos = 0; _arg1.qoiSelectedFlag = false; return (qoi_GetNextListSelected(_arg1)); } public function qual_GetFirstOiList(_arg1:int):int{ if ((_arg1 & 0x8000) == 0){ qualOilPtr = -1; return (_arg1); }; if (_arg1 == -1){ return (-1); }; _arg1 = (_arg1 & 32767); qualOilPtr = _arg1; qualOilPos = 0; return (qual_GetNextOiList()); } public function qualProc(_arg1:int):CObject{ var _local2:CObject; var _local3:CObjInfo; var _local4:int; var _local5:int; var _local6:int; var _local7:int; var _local9:int; var _local8:CQualToOiList = qualToOiList[(_arg1 & 32767)]; while (_local5 < _local8.qoiList.length) { _local6 = _local8.qoiList[(_local5 + 1)]; _local3 = rhPtr.rhOiList[_local6]; if (_local3.oilEventCount == rh2EventCount){ _local7 = 0; if (_local3.oilListSelected >= 0){ _local7 = _local3.oilNumOfSelected; if (rh2EventQualPos == null){ rh2EventQualPos = _local8; rh2EventQualPosNum = _local5; }; }; } else { _local7 = 0; _local3.oilEventCount = rh2EventCount; if (rh4ConditionsFalse){ _local3.oilListSelected = -1; _local3.oilNumOfSelected = 0; } else { _local3.oilListSelected = _local3.oilObject; if (_local3.oilObject < 0){ _local3.oilNumOfSelected = 0; } else { if (rh2EventQualPos == null){ rh2EventQualPos = _local8; rh2EventQualPosNum = _local5; }; _local9 = _local3.oilObject; do { _local2 = rhPtr.rhObjectList[_local9]; _local2.hoNextSelected = _local2.hoNumNext; _local9 = _local2.hoNumNext; } while (_local9 >= 0); _local3.oilNumOfSelected = _local3.oilNObjects; _local7 = _local3.oilNObjects; }; }; }; _local4 = (_local4 + _local7); _local5 = (_local5 + 2); }; _local8 = rh2EventQualPos; if (_local8 != null){ _local3 = rhPtr.rhOiList[_local8.qoiList[(rh2EventQualPosNum + 1)]]; rh2EventPrev = null; rh2EventPrevOiList = _local3; _local2 = rhPtr.rhObjectList[_local3.oilListSelected]; rh2EventPos = _local2; rh2EventPosOiList = _local8.qoiList[(rh2EventQualPosNum + 1)]; evtNSelectedObjects = _local4; return (_local2); }; return (null); } public function qoi_GetNextList(_arg1:CQualToOiList):int{ var _local3:int; var _local4:CObjInfo; var _local2:int = _arg1.qoiActionPos; while (_local2 < _arg1.qoiList.length) { _local3 = _arg1.qoiList[(_local2 + 1)]; _local4 = rhPtr.rhOiList[_local3]; if (_local4.oilObject >= 0){ _arg1.qoiActionPos = (_local2 + 2); return (_local4.oilObject); }; _local2 = (_local2 + 2); }; return (-1); } public function qual_GetNextOiList():int{ var _local1:int; if (qualOilPtr == -1){ return (-1); }; if (qualOilPos >= qualToOiList[qualOilPtr].qoiList.length){ return (-1); }; _local1 = qualToOiList[qualOilPtr].qoiList[(qualOilPos + 1)]; qualOilPos = (qualOilPos + 2); return (_local1); } public function bts(_arg1:Array, _arg2:int):Boolean{ var _local3:int = (_arg2 / 32); var _local4 = (1 << (_arg2 & 31)); var _local5 = !(((_arg1[_local3] & _local4) == 0)); _arg1[_local3] = (_arg1[_local3] | _local4); return (_local5); } public function call_Stops(_arg1:CObject):void{ var _local2:int; var _local3:CAct; var _local5:int; var _local6:int; var _local7:*; var _local8:*; _local2 = _arg1.hoOi; rh2EventCount = (rh2EventCount + 1); evt_AddCurrentObject(_arg1); rh2ActionCount++; rh2ActionLoop = false; rh2ActionLoopCount = 0; rh2ActionOn = true; var _local4:int; do { _local3 = CAct(rhEventGroup.evgEvents[(rhEventGroup.evgNCond + _local4)]); _local5 = (_local3.evtCode & 4294901760); if ((((_local5 == (4 << 16))) || ((_local5 == (9 << 16))))){ if (_local2 == _local3.evtOi){ _local3.execute(rhPtr); } else { _local7 = _local3.evtOiList; if ((_local7 & 0x8000) != 0){ _local8 = qualToOiList[(_local7 & 32767)]; _local6 = 0; while (_local6 < _local8.qoiList.length) { if (_local8.qoiList[_local6] == _local2){ _local3.execute(rhPtr); break; }; _local6 = (_local6 + 2); }; }; }; }; _local4++; } while (_local4 < rhEventGroup.evgNAct); rh2ActionOn = false; } public function getCollisionFlags():int{ var _local1:CEventGroup; var _local2:CEvent; var _local3:CParam; var _local4:int; var _local5:int; var _local6:int; var _local7:int; var _local8:PARAM_SHORT; _local4 = 0; while (_local4 < events.length) { _local1 = events[_local4]; _local5 = 0; while (_local5 < (_local1.evgNAct + _local1.evgNCond)) { _local2 = _local1.evgEvents[_local5]; if (_local2.evtNParams > 0){ _local6 = 0; while (_local6 < _local2.evtNParams) { _local3 = _local2.evtParams[_local6]; if (_local3.code == 43){ _local8 = PARAM_SHORT(_local3); switch (_local8.value){ case 1: _local7 = (_local7 | CColMask.CM_OBSTACLE); break; case 2: _local7 = (_local7 | CColMask.CM_PLATFORM); break; }; }; _local6++; }; }; _local5++; }; _local4++; }; return (_local7); } public function evt_AddCurrentQualifier(_arg1:int):void{ var _local4:CObjInfo; var _local2:CQualToOiList = qualToOiList[(_arg1 & 32767)]; var _local3:int; while (_local3 < _local2.qoiList.length) { _local4 = rhPtr.rhOiList[_local2.qoiList[(_local3 + 1)]]; if (_local4.oilEventCount != rh2EventCount){ _local4.oilEventCount = rh2EventCount; _local4.oilNumOfSelected = 0; _local4.oilListSelected = -1; }; _local3 = (_local3 + 2); }; } public function evg_FindAction(_arg1:CEventGroup, _arg2:int):int{ return ((_arg1.evgNCond + _arg2)); } public function deselectThem(_arg1:int):void{ var _local2:CObjInfo = rhPtr.rhOiList[_arg1]; _local2.oilEventCount = rh2EventCount; _local2.oilListSelected = -1; _local2.oilNumOfSelected = 0; } public function losCompare(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:CObject):Boolean{ var _local6:Number; var _local7:int; var _local8:int; var _local9:int = (_arg5.hoX - _arg5.hoImgXSpot); var _local10:int = (_local9 + _arg5.hoImgWidth); var _local11:int = (_arg5.hoY - _arg5.hoImgYSpot); var _local12:int = (_local11 + _arg5.hoImgHeight); if ((_arg3 - _arg1) > (_arg4 - _arg2)){ _local6 = (Number((_arg4 - _arg2)) / Number((_arg3 - _arg1))); if (_arg3 > _arg1){ if ((((_local10 < _arg1)) || ((_local9 >= _arg3)))){ return (false); }; } else { if ((((_local10 < _arg3)) || ((_local9 >= _arg1)))){ return (false); }; }; _local8 = ((_local6 * (_local9 - _arg1)) + _arg2); if ((((_local8 >= _local11)) && ((_local8 < _local12)))){ return (true); }; _local8 = ((_local6 * (_local10 - _arg1)) + _arg2); if ((((_local8 >= _local11)) && ((_local8 < _local12)))){ return (true); }; return (false); //unresolved jump }; _local6 = (Number((_arg3 - _arg1)) / Number((_arg4 - _arg2))); if (_arg4 > _arg2){ if ((((_local12 < _arg2)) || ((_local11 >= _arg4)))){ return (false); }; } else { if ((((_local12 < _arg4)) || ((_local11 >= _arg2)))){ return (false); }; }; _local7 = ((_local6 * (_local11 - _arg2)) + _arg1); if ((((_local7 >= _local9)) && ((_local7 < _local10)))){ return (true); }; _local7 = ((_local6 * (_local11 - _arg2)) + _arg1); if ((((_local7 >= _local9)) && ((_local7 < _local10)))){ return (true); }; return (false); } public function prepareProgram():void{ var _local1:CEventGroup; var _local2:CEvent; var _local3:PARAM_GROUP; var _local4:CParam; var _local5:int; var _local6:int; var _local7:int; var _local9:CGroupFind; var _local10:PARAM_EVERY; var _local11:PARAM_GROUPOINTER; var _local12:int; var _local8:CArrayList = new CArrayList(); _local5 = 0; while (_local5 < events.length) { _local1 = events[_local5]; _local1.evgFlags = (_local1.evgFlags & CEventGroup.EVGFLAGS_DEFAULTMASK); _local2 = _local1.evgEvents[0]; if (_local2.evtCode == ((-10 << 16) | 0xFFFF)){ _local3 = PARAM_GROUP(_local2.evtParams[0]); _local9 = new CGroupFind(); _local9.id = _local3.grpId; _local9.evg = _local5; _local8.add(_local9); _local3.grpFlags = (_local3.grpFlags & ~((PARAM_GROUP.GRPFLAGS_PARENTINACTIVE | PARAM_GROUP.GRPFLAGS_GROUPINACTIVE))); if ((_local3.grpFlags & PARAM_GROUP.GRPFLAGS_INACTIVE) != 0){ _local3.grpFlags = (_local3.grpFlags | PARAM_GROUP.GRPFLAGS_GROUPINACTIVE); }; }; _local5++; }; _local5 = 0; while (_local5 < events.length) { _local1 = events[_local5]; _local1.evgFlags = (_local1.evgFlags & CEventGroup.EVGFLAGS_DEFAULTMASK); _local2 = _local1.evgEvents[0]; if (_local2.evtCode == ((-10 << 16) | 0xFFFF)){ _local3 = PARAM_GROUP(_local2.evtParams[0]); _local3.grpFlags = (_local3.grpFlags & ~(PARAM_GROUP.GRPFLAGS_PARENTINACTIVE)); //unresolved if _local5 = inactiveGroup(_local5); } else { _local5++; }; }; _local5 = 0; while (_local5 < events.length) { _local1 = events[_local5]; _local2 = _local1.evgEvents[0]; switch (_local2.evtCode){ case ((-10 << 16) | 0xFFFF): case ((-11 << 16) | 0xFFFF): break; default: _local1.evgInhibit = 0; _local1.evgInhibitCpt = 0; _local6 = 0; while (_local6 < (_local1.evgNCond + _local1.evgNAct)) { _local2 = _local1.evgEvents[_local6]; if (_local2.evtCode < 0){ _local2.evtFlags = (_local2.evtFlags & CEvent.EVFLAGS_DEFAULTMASK); } else { _local2.evtFlags = (_local2.evtFlags & ~((CAct.ACTFLAGS_REPEAT | CEvent.EVFLAGS_NOTDONEINSTART))); }; if (_local2.evtNParams != 0){ _local7 = 0; while (_local7 < _local2.evtNParams) { _local4 = _local2.evtParams[_local7]; switch (_local4.code){ case 13: _local10 = PARAM_EVERY(_local4); PARAM_EVERY(_local4).compteur = _local10.delay; break; case 39: _local11 = PARAM_GROUPOINTER(_local4); _local12 = 0; while (_local12 < _local8.size()) { _local9 = CGroupFind(_local8.get(_local12)); if (_local9.id == _local11.id){ _local11.pointer = _local9.evg; break; }; _local12++; }; break; }; _local7++; }; }; _local6++; }; break; }; _local5++; }; } public function addColList(_arg1:int, _arg2:int, _arg3:int, _arg4:int):void{ var _local5:CQualToOiList; var _local6:int; var _local7:Array; var _local9:int; if (_arg2 < 0){ if (qualToOiList != null){ _local5 = qualToOiList[(_arg1 & 32767)]; _local6 = 0; while (_local6 < _local5.qoiList.length) { addColList(_local5.qoiList[(_local6 + 1)], _local5.qoiList[_local6], _arg3, _arg4); _local6 = (_local6 + 2); }; }; return; }; if (_arg4 < 0){ if (qualToOiList != null){ _local5 = qualToOiList[(_arg3 & 32767)]; _local6 = 0; while (_local6 < _local5.qoiList.length) { addColList(_arg1, _arg2, _local5.qoiList[(_local6 + 1)], _local5.qoiList[_local6]); _local6 = (_local6 + 2); }; }; return; }; var _local8:CObjInfo = rhPtr.rhOiList[_arg1]; if (_local8.oilColList == null){ _local8.oilColList = new Array(); _local7 = _local8.oilColList; } else { _local7 = _local8.oilColList; _local9 = 0; while (_local9 < _local7.length) { if (_arg4 == _local7[_local9]){ return; }; _local9 = (_local9 + 2); }; }; _local7.push(_arg4); _local7.push(_arg3); } public function HandleKeyRepeat():void{ var _local1:CEventGroup; var _local2:CEvent; var _local3:int; var _local4:int; var _local5:int; _local3 = 0; while (_local3 < nEvents) { _local1 = events[_local3]; _local4 = 0; while (_local4 < _local1.evgNCond) { _local2 = _local1.evgEvents[_local4]; if (_local2.evtCode == ((-1 << 16) | 65530)){ _local1.evgInhibit = rhPtr.rhLoopCount; break; }; _local4++; }; _local3++; }; } public function evt_BranchSelectedObjects():void{ var _local1:int; var _local2:CObject; var _local3:CObject; var _local4:int; var _local5:CObjInfo; _local4 = 0; while (_local4 < rhPtr.rhMaxOI) { _local5 = rhPtr.rhOiList[_local4]; if (_local5.oilEventCountOR == rh4EventCountOR){ _local5.oilEventCount = rh2EventCount; _local1 = _local5.oilObject; _local3 = null; while (_local1 >= 0) { _local2 = rhPtr.rhObjectList[_local1]; if (_local2.hoSelectedInOR != 0){ if (_local3 != null){ _local3.hoNextSelected = _local1; } else { _local5.oilListSelected = _local1; }; _local2.hoNextSelected = -1; _local3 = _local2; }; _local1 = _local2.hoNumNext; }; }; _local4++; }; } public function restartTimerEvents():void{ var _local3:CEvent; var _local4:CEventGroup; var _local5:*; var _local1:int = rhPtr.rhTimer; var _local2:int = listPointers[(rhEvents[-(COI.OBJ_TIMER)] + 3)]; if (_local2 != 0){ do { _local4 = eventPointersGroup[_local2]; _local3 = _local4.evgEvents[eventPointersCnd[_local2]]; _local3.evtFlags = (_local3.evtFlags | CEvent.EVFLAGS_DONE); _local5 = PARAM_TIME(_local3.evtParams[0]); if (_local5.timer > _local1){ _local3.evtFlags = (_local3.evtFlags & ~(CEvent.EVFLAGS_DONE)); }; _local2++; } while (eventPointersGroup[_local2] != null); }; } public function get_CurrentObjects(_arg1:int):CObject{ if ((_arg1 & 0x8000) == 0){ return (get_CurrentObject(_arg1)); }; return (get_CurrentObjectQualifier(_arg1)); } public function handle_GlobalEvents(_arg1:int):void{ var _local2 = (_arg1 & 0xFFFF); if ((_local2 & 0x8000) != 0){ _local2 = (65536 - _local2); }; var _local3:int = -((_arg1 >> 16)); var _local4:int = listPointers[(rhEvents[_local2] + _local3)]; if (_local4 != 0){ computeEventList(_local4, null); }; } public function select_LineOfSight(_arg1:int, _arg2:int, _arg3:int, _arg4:int):int{ var _local6:CObjInfo; var _local7:int; var _local8:CObject; var _local9:CObject; var _local10:int; var _local5:int; _local7 = 0; while (_local7 < rhPtr.rhOiList.length) { _local6 = rhPtr.rhOiList[_local7]; if (_local6.oilEventCount != rh2EventCount){ _local8 = null; _local6.oilNumOfSelected = 0; _local6.oilEventCount = rh2EventCount; _local6.oilListSelected = -1; if (rh4ConditionsFalse == false){ _local10 = _local6.oilObject; while (_local10 >= 0) { _local9 = rhPtr.rhObjectList[_local10]; if (_local9 == null){ break; }; if ((_local9.hoFlags & CObject.HOF_DESTROYED) == 0){ if (losCompare(_arg1, _arg2, _arg3, _arg4, _local9)){ _local5++; _local6.oilNumOfSelected++; _local9.hoNextSelected = -1; if (_local8 == null){ _local6.oilListSelected = _local9.hoNumber; } else { _local8.hoNextSelected = _local9.hoNumber; }; _local8 = _local9; }; }; _local10 = _local9.hoNumNext; }; }; } else { _local8 = null; _local10 = _local6.oilListSelected; while (_local10 >= 0) { _local9 = rhPtr.rhObjectList[_local10]; if (_local9 == null){ break; }; if ((_local9.hoFlags & CObject.HOF_DESTROYED) == 0){ if (losCompare(_arg1, _arg2, _arg3, _arg4, _local9) == false){ _local6.oilNumOfSelected--; if (_local8 == null){ _local6.oilListSelected = _local9.hoNextSelected; } else { _local8.hoNextSelected = _local9.hoNextSelected; }; } else { _local5++; _local8 = _local9; }; }; _local10 = _local9.hoNextSelected; }; }; _local7++; }; return (_local5); } public function evt_FirstObject(_arg1:int):CObject{ var _local2:CObject; var _local4:int; evtNSelectedObjects = 0; rh2EventQualPos = null; rh2EventQualPosNum = -1; if ((_arg1 & 0x8000) != 0){ if ((_arg1 & 32767) == 32767){ return (null); }; return (qualProc(_arg1)); }; var _local3:CObjInfo = rhPtr.rhOiList[_arg1]; if (_local3.oilEventCount == rh2EventCount){ if (_local3.oilListSelected < 0){ return (null); }; _local2 = rhPtr.rhObjectList[_local3.oilListSelected]; rh2EventPrev = null; rh2EventPrevOiList = _local3; rh2EventPos = _local2; rh2EventPosOiList = _arg1; evtNSelectedObjects = _local3.oilNumOfSelected; return (_local2); } else { _local3.oilEventCount = rh2EventCount; if (rh4ConditionsFalse){ _local3.oilListSelected = -1; _local3.oilNumOfSelected = 0; return (null); }; _local3.oilListSelected = _local3.oilObject; if (_local3.oilObject < 0){ _local3.oilNumOfSelected = 0; return (null); }; _local4 = _local3.oilObject; do { _local2 = rhPtr.rhObjectList[_local4]; _local4 = _local2.hoNumNext; _local2.hoNextSelected = _local4; } while (_local4 >= 0); _local2 = rhPtr.rhObjectList[_local3.oilObject]; rh2EventPrev = null; rh2EventPrevOiList = _local3; rh2EventPos = _local2; }; _arg1.rh2EventPosOiList = !NULL!; _local3.oilNumOfSelected = _local3.oilNObjects; evtNSelectedObjects = _local3.oilNumOfSelected; return (_local2); } public function EVTTYPE(_arg1:int):int{ var _local2 = (_arg1 & 0xFFFF); if ((_local2 & 0x8000) != 0){ return ((_local2 - 65536)); }; return (_local2); } public function evt_ForceOneObject(_arg1:int, _arg2:CObject):void{ var _local3:CQualToOiList; var _local4:int; if ((_arg1 & 0x8000) == 0){ deselectThem(_arg1); } else { if ((_arg1 & 32767) == 32767){ return; }; _local3 = qualToOiList[(_arg1 & 32767)]; _local4 = 0; while (_local4 < _local3.qoiList.length) { deselectThem(_local3.qoiList[(_local4 + 1)]); _local4 = (_local4 + 2); }; }; _arg2.hoNextSelected = -1; _arg2.hoOiList.oilListSelected = _arg2.hoNumber; _arg2.hoOiList.oilNumOfSelected = 1; _arg2.hoOiList.oilEventCount = rh2EventCount; } public function get_ExpressionObjects(_arg1:int):CObject{ var _local2:CObjInfo; if (rh2ActionOn){ rh2EnablePick = false; return (get_CurrentObjects(_arg1)); }; if ((_arg1 & 0x8000) == 0){ _local2 = rhPtr.rhOiList[_arg1]; if (_local2.oilEventCount == rh2EventCount){ if (_local2.oilListSelected >= 0){ return (rhPtr.rhObjectList[_local2.oilListSelected]); }; if (_local2.oilObject >= 0){ return (rhPtr.rhObjectList[_local2.oilObject]); }; return (null); } else { if (_local2.oilObject >= 0){ return (rhPtr.rhObjectList[_local2.oilObject]); }; return (null); }; }; var _local3:CQualToOiList = qualToOiList[(_arg1 & 32767)]; var _local4:int; if (_local4 >= _local3.qoiList.length){ return (null); }; do { _local2 = rhPtr.rhOiList[_local3.qoiList[(_local4 + 1)]]; if (_local2.oilEventCount == rh2EventCount){ if (_local2.oilListSelected >= 0){ return (rhPtr.rhObjectList[_local2.oilListSelected]); }; }; _local4 = (_local4 + 2); } while (_local4 < _local3.qoiList.length); _local4 = 0; do { _local2 = rhPtr.rhOiList[_local3.qoiList[(_local4 + 1)]]; if (_local2.oilObject >= 0){ return (rhPtr.rhObjectList[_local2.oilObject]); }; _local4 = (_local4 + 2); } while (_local4 < _local3.qoiList.length); return (null); } public function compute_TimerEvents():void{ var _local1:int; var _local2:int; var _local3:int; var _local4:CEventGroup; var _local5:CEventGroup; var _local6:CEvent; if ((rhPtr.rhGameFlags & CRun.GAMEFLAGS_FIRSTLOOPFADEIN) != 0){ _local1 = listPointers[(rhEvents[-(COI.OBJ_GAME)] + 1)]; if (_local1 != 0){ listPointers[(rhEvents[-(COI.OBJ_GAME)] + 1)] = -1; computeEventList(_local1, null); rh4CheckDoneInstart = true; }; return; }; _local1 = listPointers[(rhEvents[-(COI.OBJ_TIMER)] + 3)]; if (_local1 != 0){ computeEventList(_local1, null); }; _local1 = listPointers[(rhEvents[-(COI.OBJ_GAME)] + 1)]; if (_local1 != 0){ if (rh4CheckDoneInstart){ _local5 = null; _local2 = _local1; do { _local4 = eventPointersGroup[_local2]; if (_local4 != _local5){ _local5 = _local4; _local3 = _local4.evgNCond; while (_local3 < (_local4.evgNCond + _local4.evgNAct)) { _local6 = _local4.evgEvents[_local3]; if ((_local6.evtFlags & CEvent.EVFLAGS_NOTDONEINSTART) == 0){ _local6.evtFlags = (_local6.evtFlags | CEvent.EVFLAGS_DONEBEFOREFADEIN); }; _local3++; }; }; _local2++; } while (eventPointersGroup[_local2] != null); }; computeEventList(_local1, null); listPointers[(rhEvents[-(COI.OBJ_GAME)] + 1)] = 0; if (rh4CheckDoneInstart){ _local5 = null; _local2 = _local1; do { _local4 = eventPointersGroup[_local2]; if (_local4 != _local5){ _local5 = _local4; _local3 = _local4.evgNCond; while (_local3 < (_local4.evgNCond + _local4.evgNAct)) { _local6 = _local4.evgEvents[_local3]; _local4.evgEvents[_local3].evtFlags = (_local6.evtFlags & ~(CEvent.EVFLAGS_DONEBEFOREFADEIN)); _local3++; }; }; _local2++; } while (eventPointersGroup[_local2] != null); rh4CheckDoneInstart = false; }; }; _local1 = listPointers[(rhEvents[-(COI.OBJ_TIMER)] + 2)]; if (_local1 != 0){ computeEventList(_local1, null); }; _local1 = listPointers[(rhEvents[-(COI.OBJ_TIMER)] + 1)]; if (_local1 != 0){ computeEventList(_local1, null); }; } public function handle_PushedEvents():void{ var _local1:int; var _local2:CPushedEvent; if (rh2PushedEvents != null){ _local1 = 0; while (_local1 < rh2PushedEvents.size()) { _local2 = CPushedEvent(rh2PushedEvents.get(_local1)); if (_local2 != null){ if (_local2.code != 0){ rhCurParam0 = _local2.param; rhCurOi = _local2.oi; switch (_local2.routine){ case 0: handle_GlobalEvents(_local2.code); break; case 1: handle_Event(_local2.pHo, _local2.code); break; }; }; }; _local1++; }; rh2PushedEvents.clear(); }; } public function handle_Event(_arg1:CObject, _arg2:int):Boolean{ rhCurCode = _arg2; var _local3:int = -((_arg2 >> 16)); var _local4:int = listPointers[(_arg1.hoEvents + _local3)]; if (_local4 != 0){ computeEventList(_local4, _arg1); return (true); }; return (false); } public function endShuffle():void{ var _local2:int; if (rh2ShuffleBuffer.size() <= 1){ return; }; var _local1:int = rhPtr.random(rh2ShuffleBuffer.size()); do { _local2 = rhPtr.random(rh2ShuffleBuffer.size()); } while (_local1 == _local2); var _local3:CObject = CObject(rh2ShuffleBuffer.get(_local1)); var _local4:CObject = CObject(rh2ShuffleBuffer.get(_local2)); var _local5:int = _local3.hoX; var _local6:int = _local3.hoY; var _local7:int = _local4.hoX; var _local8:int = _local4.hoY; CRun.setXPosition(_local3, _local7); CRun.setYPosition(_local3, _local8); CRun.setXPosition(_local4, _local5); CRun.setYPosition(_local4, _local6); rh2ShuffleBuffer = null; } public function get_CurrentObjectQualifier(_arg1:int):CObject{ var _local2:CObject; var _local3:int; var _local4:int; var _local5:CQualToOiList = qualToOiList[(_arg1 & 32767)]; if (_local5.qoiActionCount != rh2ActionCount){ _local5.qoiActionCount = rh2ActionCount; _local5.qoiActionLoopCount = rh2ActionLoopCount; _local4 = qoi_GetFirstListSelected(_local5); if (_local4 >= 0){ _local5.qoiCurrentOi = _local4; _local2 = rhPtr.rhObjectList[_local4]; if (_local2 == null){ _local5.qoiCurrentRoutine = 0; _local5.qoiCurrentOi = -1; return (null); }; _local3 = _local2.hoNextSelected; if (_local3 < 0){ _local3 = qoi_GetNextListSelected(_local5); if (_local3 < 0){ _local5.qoiCurrentRoutine = 1; _local5.qoiNextFlag = false; repeatFlag = false; return (_local2); }; }; _local5.qoiNext = _local3; _local5.qoiCurrentRoutine = 2; _local5.qoiNextFlag = true; repeatFlag = true; return (_local2); }; if (rh2EnablePick){ if (_local5.qoiSelectedFlag){ _local5.qoiCurrentRoutine = 0; _local5.qoiCurrentOi = -1; return (null); }; }; _local4 = qoi_GetFirstList(_local5); if (_local4 >= 0){ _local5.qoiCurrentOi = _local4; _local2 = rhPtr.rhObjectList[_local4]; if (_local2 != null){ _local4 = _local2.hoNumNext; if (_local4 < 0){ _local4 = qoi_GetNextList(_local5); if (_local4 < 0){ _local5.qoiCurrentRoutine = 1; _local5.qoiNextFlag = false; repeatFlag = false; return (_local2); }; }; _local5.qoiNext = _local4; _local5.qoiCurrentRoutine = 3; _local5.qoiNextFlag = true; repeatFlag = true; return (_local2); }; }; _local5.qoiCurrentRoutine = 0; _local5.qoiCurrentOi = -1; return (null); }; if (_local5.qoiActionLoopCount != rh2ActionLoopCount){ _local5.qoiActionLoopCount = rh2ActionLoopCount; switch (_local5.qoiCurrentRoutine){ case 0: repeatFlag = _local5.qoiNextFlag; return (null); case 1: _local2 = rhPtr.rhObjectList[_local5.qoiCurrentOi]; repeatFlag = _local5.qoiNextFlag; return (_local2); case 2: _local5.qoiCurrentOi = _local5.qoiNext; _local2 = rhPtr.rhObjectList[_local5.qoiNext]; if (_local2 != null){ _local3 = _local2.hoNextSelected; if (_local3 < 0){ _local3 = qoi_GetNextListSelected(_local5); if (_local3 < 0){ _local5.qoiNextFlag = false; _local3 = qoi_GetFirstListSelected(_local5); }; }; _local5.qoiNext = _local3; }; repeatFlag = _local5.qoiNextFlag; return (_local2); case 3: _local5.qoiCurrentOi = _local5.qoiNext; _local2 = rhPtr.rhObjectList[_local5.qoiNext]; if (_local2 != null){ _local3 = _local2.hoNumNext; if (_local3 < 0){ _local3 = qoi_GetNextList(_local5); if (_local3 < 0){ _local5.qoiNextFlag = false; _local3 = qoi_GetFirstList(_local5); }; }; _local5.qoiNext = _local3; }; repeatFlag = _local5.qoiNextFlag; return (_local2); }; }; if (_local5.qoiCurrentOi < 0){ return (null); }; _local2 = rhPtr.rhObjectList[_local5.qoiCurrentOi]; repeatFlag = _local5.qoiNextFlag; return (_local2); } public function evt_DeleteCurrentObject():void{ rh2EventPos.hoOiList.oilNumOfSelected = (rh2EventPos.hoOiList.oilNumOfSelected - 1); if (rh2EventPrev != null){ rh2EventPrev.hoNextSelected = rh2EventPos.hoNextSelected; rh2EventPos = rh2EventPrev; } else { rh2EventPrevOiList.oilListSelected = rh2EventPos.hoNextSelected; rh2EventPos = null; }; } public function evt_SelectAllFromType(_arg1:int, _arg2:Boolean):CObject{ var _local6:CObjInfo; var _local7:CObject; var _local8:*; var _local3 = -1; var _local4:int = rh2EventCount; rhPtr.debugString = new String(); var _local5:int; do { _local6 = rhPtr.rhOiList[_local5]; if ((((_local6.oilType == _arg1)) && (!((_local6.oilEventCount == _local4))))){ _local6.oilEventCount = _local4; if (rh4ConditionsFalse){ _local6.oilListSelected = -1; _local6.oilNumOfSelected = 0; } else { _local6.oilNumOfSelected = _local6.oilNObjects; _local8 = _local6.oilObject; if (_local8 >= 0){ if ((((_local3 == -1)) && ((_arg2 == true)))){ _local3 = _local8; rh2EventPrev = null; rh2EventPrevOiList = _local6; rh2EventPosOiList = _local5; }; do { _local7 = rhPtr.rhObjectList[_local8]; rhPtr.rhObjectList[_local8].hoNextSelected = _local7.hoNumNext; _local8 = _local7.hoNumNext; rhPtr.debugString = (rhPtr.debugString + "."); } while (_local8 >= 0); _local8 = _local6.oilObject; }; _local6.oilListSelected = _local8; }; }; _local5++; } while (_local5 < rhPtr.rhMaxOI); rhPtr.debugString = null; if (_arg2 == false){ return (null); }; if (_local3 < 0){ return (null); }; _local7 = rhPtr.rhObjectList[_local3]; rh2EventPos = _local7; return (_local7); } public function get_ActionObjects(_arg1:CAct):CObject{ _arg1.evtFlags = (_arg1.evtFlags & ~(CEvent.EVFLAGS_NOTDONEINSTART)); rh2EnablePick = true; var _local2:int = _arg1.evtOiList; var _local3:CObject = get_CurrentObjects(_local2); if (_local3 != null){ if (repeatFlag == false){ _arg1.evtFlags = (_arg1.evtFlags & ~(CAct.ACTFLAGS_REPEAT)); return (_local3); }; _arg1.evtFlags = (_arg1.evtFlags | CAct.ACTFLAGS_REPEAT); rh2ActionLoop = true; return (_local3); }; _arg1.evtFlags = (_arg1.evtFlags & ~(CAct.ACTFLAGS_REPEAT)); _arg1.evtFlags = (_arg1.evtFlags | CEvent.EVFLAGS_NOTDONEINSTART); return (_local3); } public function evt_FirstObjectFromType(_arg1:int):CObject{ var _local2:CObject; var _local3:int; var _local4:CObjInfo; var _local5:CObject; var _local6:CObjInfo; var _local7:Boolean; rh2EventType = _arg1; if (_arg1 == -1){ _local7 = true; _local3 = 0; while (_local3 < rhPtr.rhOiList.length) { _local6 = rhPtr.rhOiList[_local3]; if (bts(rh4PickFlags, _local6.oilType) == false){ _local2 = evt_SelectAllFromType(_local6.oilType, _local7); if (_local2 != null){ _local5 = _local2; _local7 = false; }; }; _local3++; }; if (_local5 != null){ return (_local5); }; } else { if (bts(rh4PickFlags, _arg1) == false){ return (evt_SelectAllFromType(_arg1, true)); }; }; _local3 = 0; do { _local4 = rhPtr.rhOiList[_local3]; if (_local4.oilType == _arg1){ if (_local4.oilListSelected >= 0){ _local2 = rhPtr.rhObjectList[_local4.oilListSelected]; rh2EventPrev = null; rh2EventPrevOiList = _local4; rh2EventPos = _local2; rh2EventPosOiList = _local3; return (_local2); }; }; _local3++; } while (_local3 < rhPtr.rhMaxOI); return (null); } public function count_ZoneOneObject(_arg1:int, _arg2:PARAM_ZONE):int{ var _local4:int; if ((_arg1 & 0x8000) == 0){ return (czoCountThem(_arg1, _arg2)); }; if ((_arg1 & 32767) == 32767){ return (0); }; var _local3:CQualToOiList = qualToOiList[(_arg1 & 32767)]; var _local5:int; _local4 = 0; while (_local4 < _local3.qoiList.length) { _local5 = (_local5 + czoCountThem(_local3.qoiList[(_local4 + 1)], _arg2)); _local4 = (_local4 + 2); }; return (_local5); } public function czaCompare(_arg1:PARAM_ZONE, _arg2:CObject):Boolean{ if ((((_arg2.hoX < _arg1.x1)) || ((_arg2.hoX >= _arg1.x2)))){ return (false); }; if ((((_arg2.hoY < _arg1.y1)) || ((_arg2.hoY >= _arg1.y2)))){ return (false); }; return (true); } public function get_OiListOffset(_arg1:int, _arg2:int):int{ var _local3:int; var _local4:int; if ((_arg1 & COI.OIFLAG_QUALIFIER) != 0){ _local3 = 0; while (((!((_arg1 == qualifiers[_local3].qOi))) || (!((_arg2 == qualifiers[_local3].qType))))) { _local3++; }; return ((_local3 | 0x8000)); //unresolved jump }; _local4 = 0; while ((((_local4 < rhPtr.rhMaxOI)) && (!((rhPtr.rhOiList[_local4].oilOi == _arg1))))) { _local4++; }; return (_local4); } public function qoi_GetFirstList(_arg1:CQualToOiList):int{ _arg1.qoiActionPos = 0; return (qoi_GetNextList(_arg1)); } public function enumSounds(_arg1:IEnum):void{ var _local2:CEventGroup; var _local3:CEvent; var _local4:int; var _local5:int; var _local6:int; var _local7:PARAM_SAMPLE; _local4 = 0; while (_local4 < nEvents) { _local2 = events[_local4]; _local5 = 0; while (_local5 < (_local2.evgNCond + _local2.evgNAct)) { _local3 = _local2.evgEvents[_local5]; _local6 = 0; while (_local6 < _local3.evtNParams) { switch (_local3.evtParams[_local6].code){ case 6: case 35: _local7 = PARAM_SAMPLE(_local3.evtParams[_local6]); _arg1.enumerate(_local7.sndHandle); break; }; _local6++; }; _local5++; }; _local4++; }; } public function onKeyDown(_arg1:int):void{ if (rhPtr != null){ if (bReady == false){ return; }; if (rhPtr.rh2PauseCompteur != 0){ if (rhPtr.rh4PauseKey == -1){ rhPtr.resume(); rhPtr.rh4EndOfPause = rhPtr.rhLoopCount; handle_GlobalEvents(((-8 << 16) | 65533)); }; if (((!((rhPtr.rh4PauseKey == 0))) && ((rhPtr.rh4PauseKey == _arg1)))){ rhPtr.resume(); rhPtr.rh4EndOfPause = rhPtr.rhLoopCount; handle_GlobalEvents(((-8 << 16) | 65533)); }; return; }; rhPtr.rh4TimeOut = 0; handle_GlobalEvents(((-9 << 16) | 65530)); }; } public function EVTNUM(_arg1:int):int{ return ((_arg1 >> 16)); } public function select_ZoneTypeObjects(_arg1:PARAM_ZONE, _arg2:int):int{ var _local6:CObject; var _local7:CObject; var _local8:int; var _local9:*; var _local3:int; var _local4:int; var _local5:CObjInfo; do { while (_local4 < rhPtr.rhOiList.length) { _local5 = rhPtr.rhOiList[_local4]; if ((((_arg2 == 0)) || (((!((_arg2 == 0))) && ((_arg2 == _local5.oilType)))))){ break; }; _local4++; }; if (_local4 == rhPtr.rhOiList.length){ return (_local3); }; _local9 = _local5; _local4++; if (_local9.oilEventCount != rh2EventCount){ _local6 = null; _local9.oilNumOfSelected = 0; _local9.oilEventCount = rh2EventCount; _local9.oilListSelected = -1; if (rh4ConditionsFalse == false){ _local8 = _local9.oilObject; while (_local8 >= 0) { _local7 = rhPtr.rhObjectList[_local8]; if (_local7 == null){ break; }; if ((_local7.hoFlags & CObject.HOF_DESTROYED) == 0){ if (czaCompare(_arg1, _local7)){ _local3++; _local9.oilNumOfSelected++; _local7.hoNextSelected = -1; if (_local6 == null){ _local9.oilListSelected = _local7.hoNumber; } else { _local6.hoNextSelected = _local7.hoNumber; }; _local6 = _local7; }; }; _local8 = _local7.hoNumNext; }; }; } else { _local6 = null; _local8 = _local9.oilListSelected; while (_local8 >= 0) { _local7 = rhPtr.rhObjectList[_local8]; if (_local7 == null){ break; }; if ((_local7.hoFlags & CObject.HOF_DESTROYED) == 0){ if (czaCompare(_arg1, _local7) == false){ _local9.oilNumOfSelected--; if (_local6 == null){ _local9.oilListSelected = _local7.hoNextSelected; } else { _local6.hoNextSelected = _local7.hoNextSelected; }; } else { _local3++; _local6 = _local7; }; }; _local8 = _local7.hoNextSelected; }; //unresolved jump }; } while (true); return (0); } public function count_ObjectsFromOiList(_arg1:int, _arg2:int):CObject{ var _local4:int; var _local5:CObject; _arg2++; evtNSelectedObjects = 0; if ((_arg1 & 0x8000) == 0){ return (countThem(_arg1, _arg2)); }; if ((_arg1 & 32767) == 32767){ return (null); }; var _local3:CQualToOiList = qualToOiList[(_arg1 & 32767)]; _local4 = 0; while (_local4 < _local3.qoiList.length) { _local5 = countThem(_local3.qoiList[(_local4 + 1)], _arg2); if (_local5 != null){ return (_local5); }; _local4 = (_local4 + 2); }; return (null); } public function evt_DeleteCurrent():void{ var _local1:int; var _local2:CObjInfo; rh4PickFlags[0] = -1; rh4PickFlags[1] = -1; rh4PickFlags[2] = -1; rh4PickFlags[3] = -1; _local1 = 0; while (_local1 < rhPtr.rhMaxOI) { _local2 = rhPtr.rhOiList[_local1]; _local2.oilEventCount = rh2EventCount; _local2.oilListSelected = -1; _local2.oilNumOfSelected = 0; _local1++; }; } public function czoCountThem(_arg1:int, _arg2:PARAM_ZONE):int{ var _local5:CObject; var _local6:int; var _local3:int; var _local4:CObjInfo = rhPtr.rhOiList[_arg1]; if (_local4.oilEventCount != rh2EventCount){ if (rh4ConditionsFalse == false){ _local6 = _local4.oilObject; while (_local6 >= 0) { _local5 = rhPtr.rhObjectList[_local6]; if (_local5 == null){ return (0); }; if ((_local5.hoFlags & CObject.HOF_DESTROYED) == 0){ if (czaCompare(_arg2, _local5)){ _local3++; }; }; _local6 = _local5.hoNumNext; }; }; return (_local3); }; _local6 = _local4.oilListSelected; while (_local6 >= 0) { _local5 = rhPtr.rhObjectList[_local6]; if (_local5 == null){ return (0); }; if ((_local5.hoFlags & CObject.HOF_DESTROYED) == 0){ if (czaCompare(_arg2, _local5)){ _local3++; }; }; _local6 = _local5.hoNextSelected; }; return (_local3); } public function inactiveGroup(_arg1:int):int{ var _local2:Boolean; var _local3:CEventGroup; var _local4:CEvent; var _local5:PARAM_GROUP; _local3 = events[_arg1]; _local3.evgFlags = (_local3.evgFlags & CEventGroup.EVGFLAGS_DEFAULTMASK); _local3.evgFlags = (_local3.evgFlags | CEventGroup.EVGFLAGS_INACTIVE); _arg1++; _local2 = false; while (true) { _local3 = events[_arg1]; _local3.evgFlags = (_local3.evgFlags & CEventGroup.EVGFLAGS_DEFAULTMASK); _local3.evgFlags = (_local3.evgFlags | CEventGroup.EVGFLAGS_INACTIVE); _local4 = _local3.evgEvents[0]; switch (_local4.evtCode){ case ((-10 << 16) | 0xFFFF): _local5 = PARAM_GROUP(_local4.evtParams[0]); PARAM_GROUP(_local4.evtParams[0]).grpFlags = (_local5.grpFlags | PARAM_GROUP.GRPFLAGS_PARENTINACTIVE); _arg1 = inactiveGroup(_arg1); continue; case ((-11 << 16) | 0xFFFF): _local2 = true; _arg1++; break; }; if (_local2){ break; }; _arg1++; }; return (_arg1); } public function countThem(_arg1:int, _arg2:int):CObject{ var _local4:CObject; var _local5:int; var _local3:CObjInfo = rhPtr.rhOiList[_arg1]; if (_local3.oilEventCount != rh2EventCount){ if (rh4ConditionsFalse){ evtNSelectedObjects = 0; return (null); }; _local5 = _local3.oilObject; while (_local5 >= 0) { _local4 = rhPtr.rhObjectList[_local5]; if (_local4 == null){ return (null); }; if ((_local4.hoFlags & CObject.HOF_DESTROYED) == 0){ evtNSelectedObjects++; if (evtNSelectedObjects == _arg2){ return (_local4); }; }; _local5 = _local4.hoNumNext; }; return (null); }; _local5 = _local3.oilListSelected; while (_local5 >= 0) { _local4 = rhPtr.rhObjectList[_local5]; if (_local4 == null){ return (null); }; if ((_local4.hoFlags & CObject.HOF_DESTROYED) == 0){ evtNSelectedObjects++; if (evtNSelectedObjects == _arg2){ return (_local4); }; }; _local5 = _local4.hoNextSelected; }; return (null); } public function onMouseButton(_arg1:int, _arg2:int):void{ var _local3:int; var _local5:int; var _local6:CObject; var _local7:int; var _local8:int; var _local9:int; var _local10:int; var _local12:CImage; var _local13:CMask; if (rhPtr == null){ return; }; if (rhPtr.rh2PauseCompteur != 0){ return; }; if (bReady == false){ return; }; _local3 = _arg1; if (_arg2 == 2){ _local3 = (_local3 + PARAMCLICK_DOUBLE); }; rhPtr.rh4TimeOut = 0; if (rhPtr.rhMouseUsed != 0){ return; }; rhCurParam0 = _local3; rh2CurrentClick = _local3; handle_GlobalEvents(((-5 << 16) | 65530)); handle_GlobalEvents(((-6 << 16) | 65530)); var _local4:int; var _local11:CArrayList = new CArrayList(); _local5 = 0; while (_local5 < rhPtr.rhNObjects) { while (rhPtr.rhObjectList[_local4] == null) { _local4++; }; _local6 = rhPtr.rhObjectList[_local4]; _local4++; _local7 = (_local6.hoX - _local6.hoImgXSpot); _local8 = (_local6.hoY - _local6.hoImgYSpot); _local9 = (_local7 + _local6.hoImgWidth); _local10 = (_local8 + _local6.hoImgHeight); if ((((((((rhPtr.rh2MouseX >= _local7)) && ((rhPtr.rh2MouseX < _local9)))) && ((rhPtr.rh2MouseY >= _local8)))) && ((rhPtr.rh2MouseY < _local10)))){ if ((_local6.hoFlags & CObject.HOF_DESTROYED) == 0){ if (_local6.hoType == COI.OBJ_SPR){ if ((_local6.ros.rsFlags & CRSpr.RSFLAG_COLBOX) == 0){ _local12 = rhPtr.rhApp.imageBank.getImageFromHandle(_local6.roc.rcImage); _local13 = _local12.getMask(CMask.GCMF_OBSTACLE, _local6.roc.rcAngle, _local6.roc.rcScaleX, _local6.roc.rcScaleY); if (_local13.testPoint(_local7, _local8, rhPtr.rh2MouseX, rhPtr.rh2MouseY)){ _local11.add(_local6); }; } else { _local11.add(_local6); }; } else { _local11.add(_local6); }; }; }; _local5++; }; _local4 = 0; while (_local4 < _local11.size()) { _local6 = CObject(_local11.get(_local4)); rhCurParam1 = _local6.hoOi; rh4_2ndObject = _local6; handle_GlobalEvents(((-7 << 16) | 65530)); _local4++; }; } public function computeEventList(_arg1:int, _arg2:CObject):void{ var _local3:Boolean; var _local4:CEventGroup; var _local5:CEventGroup; var _local6:int; var _local7:*; rh3DoStop = false; do { _local4 = eventPointersGroup[_arg1]; if ((_local4.evgFlags & CEventGroup.EVGFLAGS_INACTIVE) == 0){ rhEventGroup = _local4; rh4PickFlags[0] = 0; rh4PickFlags[1] = 0; rh4PickFlags[2] = 0; rh4PickFlags[3] = 0; if ((_local4.evgFlags & CEventGroup.EVGFLAGS_ORINGROUP) == 0){ rh2EventCount = (rh2EventCount + 1); rh4ConditionsFalse = false; _local6 = 0; if (CCnd(_local4.evgEvents[_local6]).eva1(rhPtr, _arg2)){ _local6++; while (_local6 < _local4.evgNCond) { if (CCnd(_local4.evgEvents[_local6]).eva2(rhPtr) == false){ break; }; _local6++; }; }; if (_local6 == _local4.evgNCond){ if (rh3DoStop){ if (_arg2 != null){ call_Stops(_arg2); }; } else { call_Actions(_local4); }; }; _arg1++; } else { rh4EventCountOR++; if ((_local4.evgFlags & CEventGroup.EVGFLAGS_ORLOGICAL) == 0){ _local3 = false; do { rh2EventCount++; rh4ConditionsFalse = false; _local6 = eventPointersCnd[_arg1]; if (CCnd(_local4.evgEvents[_local6]).eva1(rhPtr, _arg2) == false){ rh4ConditionsFalse = true; }; _local6++; while ((((_local6 < _local4.evgNCond)) && (!((_local4.evgEvents[_local6].evtCode == ((-24 << 16) | 0xFFFF)))))) { if (CCnd(_local4.evgEvents[_local6]).eva2(rhPtr) == false){ rh4ConditionsFalse = true; }; _local6++; }; evt_MarkSelectedObjects(); if (rh4ConditionsFalse == false){ _local3 = true; }; _arg1++; _local4 = eventPointersGroup[_arg1]; } while (_local4 != null); if (_local3){ rh2EventCount++; evt_BranchSelectedObjects(); call_Actions(rhEventGroup); }; } else { rh4ConditionsFalse = false; _local3 = false; do { rh2EventCount++; _local7 = false; _local6 = eventPointersCnd[_arg1]; if (CCnd(_local4.evgEvents[_local6]).eva1(rhPtr, _arg2)){ _local6++; while ((((_local6 < _local4.evgNCond)) && (!((_local4.evgEvents[_local6].evtCode == ((-25 << 16) | 0xFFFF)))))) { if (CCnd(_local4.evgEvents[_local6]).eva2(rhPtr) == false){ _local7 = true; break; }; _local6++; }; } else { _local7 = true; }; if (_local7 == false){ evt_MarkSelectedObjects(); _local3 = true; }; _arg1++; _local4 = eventPointersGroup[_arg1]; } while (_local4 != null); if (_local3){ rh2EventCount++; evt_BranchSelectedObjects(); call_Actions(rhEventGroup); }; }; }; } else { _arg1++; if (eventPointersGroup[_arg1] != null){ _local5 = eventPointersGroup[_arg1]; while (_local5 == _local4) { _arg1++; if (eventPointersGroup[_arg1] == null){ break; }; _local5 = eventPointersGroup[_arg1]; }; }; }; } while (eventPointersGroup[_arg1] != null); } public function pickFromId(_arg1:int):Boolean{ var _local6:int; var _local7:CObject; var _local2 = (_arg1 & 0xFFFF); if (_local2 > rhPtr.rhMaxObjects){ return (false); }; var _local3:CObject = rhPtr.rhObjectList[_local2]; if (_local3 == null){ return (false); }; var _local4:int = (_arg1 >>> 16); if (_local4 != _local3.hoCreationId){ return (false); }; var _local5:CObjInfo = _local3.hoOiList; if (_local5.oilEventCount == rh2EventCount){ _local6 = _local5.oilListSelected; _local7 = null; while (_local6 >= 0) { _local7 = rhPtr.rhObjectList[_local6]; if (_local3 == _local7){ break; }; _local6 = _local7.hoNextSelected; }; if (_local3 != _local7){ return (false); }; }; _local5.oilEventCount = rh2EventCount; _local5.oilListSelected = -1; _local5.oilNumOfSelected = 0; _local3.hoNextSelected = -1; evt_AddCurrentObject(_local3); return (true); } public function get_CurrentObject(_arg1:int):CObject{ var _local2:CObject; var _local4:int; var _local3:CObjInfo = rhPtr.rhOiList[_arg1]; if (_local3.oilActionCount != rh2ActionCount){ _local3.oilActionCount = rh2ActionCount; _local3.oilActionLoopCount = rh2ActionLoopCount; if (_local3.oilEventCount == rh2EventCount){ if (_local3.oilListSelected >= 0){ _local3.oilCurrentOi = _local3.oilListSelected; _local2 = rhPtr.rhObjectList[_local3.oilListSelected]; _local3.oilNext = _local2.hoNextSelected; if (_local2.hoNextSelected < 0){ _local3.oilNextFlag = false; _local3.oilCurrentRoutine = 1; repeatFlag = false; return (_local2); }; _local3.oilNextFlag = true; _local3.oilCurrentRoutine = 2; repeatFlag = true; return (_local2); }; }; if (rh2EnablePick){ if (_local3.oilEventCount == rh2EventCount){ _local3.oilCurrentRoutine = 0; _local3.oilCurrentOi = -1; return (null); }; }; if (_local3.oilObject >= 0){ _local3.oilCurrentOi = _local3.oilObject; _local2 = rhPtr.rhObjectList[_local3.oilObject]; if (_local2 == null){ _local3.oilCurrentRoutine = 0; _local3.oilCurrentOi = -1; return (null); }; if (_local2.hoNumNext >= 0){ _local3.oilNext = _local2.hoNumNext; _local3.oilNextFlag = true; _local3.oilCurrentRoutine = 3; repeatFlag = true; return (_local2); }; _local3.oilNextFlag = false; _local3.oilCurrentRoutine = 1; repeatFlag = false; return (_local2); } else { _local3.oilCurrentRoutine = 0; _local3.oilCurrentOi = -1; return (null); }; }; if (_local3.oilActionLoopCount != rh2ActionLoopCount){ _local3.oilActionLoopCount = rh2ActionLoopCount; switch (_local3.oilCurrentRoutine){ case 0: repeatFlag = _local3.oilNextFlag; return (null); case 1: _local2 = rhPtr.rhObjectList[_local3.oilCurrentOi]; repeatFlag = _local3.oilNextFlag; return (_local2); case 2: _local3.oilCurrentOi = _local3.oilNext; _local2 = rhPtr.rhObjectList[_local3.oilNext]; if (_local2 == null){ return (null); }; _local4 = _local2.hoNextSelected; if (_local4 < 0){ _local3.oilNextFlag = false; _local4 = _local3.oilListSelected; }; _local3.oilNext = _local4; repeatFlag = _local3.oilNextFlag; return (_local2); case 3: _local3.oilCurrentOi = _local3.oilNext; _local2 = rhPtr.rhObjectList[_local3.oilNext]; if (_local2 == null){ return (null); }; _local4 = _local2.hoNumNext; if (_local4 < 0){ _local3.oilNextFlag = false; _local4 = _local3.oilObject; }; _local3.oilNext = _local4; repeatFlag = _local3.oilNextFlag; return (_local2); }; }; if (_local3.oilCurrentOi < 0){ return (null); }; _local2 = rhPtr.rhObjectList[_local3.oilCurrentOi]; repeatFlag = _local3.oilNextFlag; return (_local2); } public function count_ObjectsFromType(_arg1:int, _arg2:int):CObject{ var _local5:CObject; var _local6:int; var _local7:*; _arg2++; evtNSelectedObjects = 0; var _local3:int; var _local4:CObjInfo; do { while (_local3 < rhPtr.rhOiList.length) { _local4 = rhPtr.rhOiList[_local3]; if ((((_arg1 == 0)) || (((!((_arg1 == 0))) && ((_arg1 == _local4.oilType)))))){ break; }; _local3++; }; if (_local3 == rhPtr.rhOiList.length){ return (null); }; _local7 = _local4; _local3++; if (_local7.oilEventCount != rh2EventCount){ if (rh4ConditionsFalse == false){ _local6 = _local7.oilObject; while (_local6 >= 0) { _local5 = rhPtr.rhObjectList[_local6]; if (_local5 == null){ return (null); }; if ((_local5.hoFlags & CObject.HOF_DESTROYED) == 0){ evtNSelectedObjects++; if (evtNSelectedObjects == _arg2){ return (_local5); }; }; _local6 = _local5.hoNumNext; }; }; } else { _local6 = _local7.oilListSelected; while (_local6 >= 0) { _local5 = rhPtr.rhObjectList[_local6]; if (_local5 == null){ return (null); }; if ((_local5.hoFlags & CObject.HOF_DESTROYED) == 0){ evtNSelectedObjects++; if (evtNSelectedObjects == _arg2){ return (_local5); }; }; _local6 = _local5.hoNextSelected; }; }; } while (true); return (null); } public function count_ZoneTypeObjects(_arg1:PARAM_ZONE, _arg2:int, _arg3:int):CObject{ var _local6:CObject; var _local7:int; var _local8:*; _arg2++; evtNSelectedObjects = 0; var _local4:int; var _local5:CObjInfo; do { while (_local4 < rhPtr.rhOiList.length) { _local5 = rhPtr.rhOiList[_local4]; if ((((_arg3 == 0)) || (((!((_arg3 == 0))) && ((_arg3 == _local5.oilType)))))){ break; }; _local4++; }; if (_local4 == rhPtr.rhOiList.length){ return (null); }; _local8 = _local5; _local4++; if (_local8.oilEventCount != rh2EventCount){ if (rh4ConditionsFalse == false){ _local7 = _local8.oilObject; while (_local7 >= 0) { _local6 = rhPtr.rhObjectList[_local7]; if (_local6 == null){ return (null); }; if ((_local6.hoFlags & CObject.HOF_DESTROYED) == 0){ if (ctoCompare(_arg1, _local6)){ evtNSelectedObjects++; if (evtNSelectedObjects == _arg2){ return (_local6); }; }; }; _local7 = _local6.hoNumNext; }; }; } else { _local7 = _local8.oilListSelected; while (_local7 >= 0) { _local6 = rhPtr.rhObjectList[_local7]; if (_local6 == null){ return (null); }; if ((_local6.hoFlags & CObject.HOF_DESTROYED) == 0){ if (ctoCompare(_arg1, _local6)){ evtNSelectedObjects++; if (evtNSelectedObjects == _arg2){ return (_local6); }; }; }; _local7 = _local6.hoNextSelected; }; }; } while (true); return (null); } public function ctoCompare(_arg1:PARAM_ZONE, _arg2:CObject):Boolean{ if ((((_arg2.hoImgWidth == 0)) || ((_arg2.hoImgHeight == 0)))){ return (false); }; if ((((_arg2.hoX < _arg1.x1)) || ((_arg2.hoX >= _arg1.x2)))){ return (false); }; if ((((_arg2.hoY < _arg1.y1)) || ((_arg2.hoY >= _arg1.y2)))){ return (false); }; return (true); } public function evt_MarkSelectedObjects():void{ var _local1:int; var _local2:CObject; var _local3:int; var _local4:CObjInfo; _local3 = 0; while (_local3 < rhPtr.rhMaxOI) { _local4 = rhPtr.rhOiList[_local3]; if (_local4.oilEventCount == rh2EventCount){ if (_local4.oilEventCountOR != rh4EventCountOR){ _local4.oilEventCountOR = rh4EventCountOR; _local1 = _local4.oilObject; while (_local1 >= 0) { _local2 = rhPtr.rhObjectList[_local1]; _local2.hoSelectedInOR = 0; _local1 = _local2.hoNumNext; }; }; _local1 = _local4.oilListSelected; while (_local1 >= 0) { _local2 = rhPtr.rhObjectList[_local1]; _local2.hoSelectedInOR = 1; _local1 = _local2.hoNextSelected; }; }; _local3++; }; } public function getEventCode(_arg1:int):int{ return ((_arg1 & 4294901760)); } public function evt_AddCurrentObject(_arg1:CObject):void{ var _local3:int; var _local4:CObject; var _local2:CObjInfo = _arg1.hoOiList; if (_local2.oilEventCount != rh2EventCount){ _local2.oilEventCount = rh2EventCount; _local2.oilListSelected = _arg1.hoNumber; _local2.oilNumOfSelected = 1; _arg1.hoNextSelected = -1; } else { _local3 = _local2.oilListSelected; if (_local3 < 0){ _local2.oilListSelected = _arg1.hoNumber; _local2.oilNumOfSelected = (_local2.oilNumOfSelected + 1); _arg1.hoNextSelected = -1; } else { do { if (_arg1.hoNumber == _local3){ return; }; _local4 = rhPtr.rhObjectList[_local3]; _local3 = _local4.hoNextSelected; } while (_local3 >= 0); _local4.hoNextSelected = _arg1.hoNumber; _arg1.hoNextSelected = -1; _arg1.hoOiList.oilNumOfSelected = (_arg1.hoOiList.oilNumOfSelected + 1); }; }; } public function load(_arg1:CRunApp):void{ var _local3:int; var _local4:int; var _local5:int; var _local2:Array = new Array(4); while (true) { _arg1.file.readBytesAsArray(_local2); if ((((((((_local2[0] == 69)) && ((_local2[1] == 82)))) && ((_local2[2] == 62)))) && ((_local2[3] == 62)))){ maxObjects = _arg1.file.readAShort(); if (maxObjects < 300){ maxObjects = 300; }; maxOi = _arg1.file.readAShort(); nPlayers = _arg1.file.readAShort(); _local4 = 0; while (_local4 < (7 + COI.OBJ_LAST)) { nConditions[_local4] = _arg1.file.readAShort(); _local4++; }; nQualifiers = _arg1.file.readAShort(); if (nQualifiers > 0){ qualifiers = new Array(nQualifiers); _local4 = 0; while (_local4 < nQualifiers) { qualifiers[_local4] = new CLoadQualifiers(); qualifiers[_local4].qOi = _arg1.file.readShort(); qualifiers[_local4].qType = _arg1.file.readShort(); _local4++; }; }; } else { if ((((((((_local2[0] == 69)) && ((_local2[1] == 82)))) && ((_local2[2] == 101)))) && ((_local2[3] == 115)))){ _arg1.file.readAInt(); nEvents = _arg1.file.readAInt(); events = new Array(nEvents); _local5 = 0; } else { if ((((((((_local2[0] == 69)) && ((_local2[1] == 82)))) && ((_local2[2] == 101)))) && ((_local2[3] == 118)))){ _arg1.file.readAInt(); _local3 = _arg1.file.readAInt(); _local4 = 0; while (_local4 < _local3) { events[_local5] = CEventGroup.create(_arg1); _local5++; _local4++; }; } else { if ((((((((_local2[0] == 60)) && ((_local2[1] == 60)))) && ((_local2[2] == 69)))) && ((_local2[3] == 82)))){ break; }; }; }; }; }; } public function onMouseMove():void{ if (rhPtr != null){ if (bReady == false){ return; }; if (rhPtr.rh2PauseCompteur != 0){ return; }; rhPtr.rh4TimeOut = 0; }; } public function isTypeRealSprite(_arg1:int):Boolean{ var _local2:int; _local2 = 0; while (_local2 < rhPtr.rhMaxOI) { if (rhPtr.rhOiList[_local2].oilOi != -1){ if (rhPtr.rhOiList[_local2].oilType == _arg1){ if (((!(((rhPtr.rhOiList[_local2].oilOEFlags & CObjectCommon.OEFLAG_SPRITES) == 0))) && (((rhPtr.rhOiList[_local2].oilOEFlags & CObjectCommon.OEFLAG_QUICKDISPLAY) == 0)))){ return (true); }; return (false); }; }; _local2++; }; return (true); } public function call_Actions(_arg1:CEventGroup):void{ var _local3:CAct; var _local4:int; var _local5:int; var _local6:int; var _local7:int; if ((_arg1.evgFlags & CEventGroup.EVGFLAGS_LIMITED) != 0){ if ((_arg1.evgFlags & CEventGroup.EVGFLAGS_SHUFFLE) != 0){ rh2ShuffleBuffer = new CArrayList(); }; if ((_arg1.evgFlags & CEventGroup.EVGFLAGS_NOTALWAYS) != 0){ _local4 = rhPtr.rhLoopCount; _local5 = _arg1.evgInhibit; _arg1.evgInhibit = _local4; if (_local4 == _local5){ return; }; --_local4; if (_local4 == _local5){ return; }; }; if ((_arg1.evgFlags & CEventGroup.EVGFLAGS_REPEAT) != 0){ if (_arg1.evgInhibitCpt != 0){ _arg1.evgInhibitCpt--; } else { return; }; }; if ((_arg1.evgFlags & CEventGroup.EVGFLAGS_NOMORE) != 0){ _local6 = (rhPtr.rhTimer / 10); if (_arg1.evgInhibitCpt >= 0){ _local7 = _arg1.evgInhibitCpt; } else { _local7 = (65536 - _arg1.evgInhibitCpt); }; if (((!((_local7 == 0))) && ((_local6 < _local7)))){ return; }; _arg1.evgInhibitCpt = (_local6 + _arg1.evgInhibit); }; }; rh2ActionCount++; rh2ActionLoop = false; rh2ActionLoopCount = 0; rh2ActionOn = true; var _local2:int; do { _local3 = CAct(_arg1.evgEvents[(_local2 + _arg1.evgNCond)]); if ((_local3.evtFlags & (CEvent.EVFLAGS_BADOBJECT | CEvent.EVFLAGS_DONEBEFOREFADEIN)) == 0){ _local3.execute(rhPtr); }; _local2++; } while (_local2 < _arg1.evgNAct); if (rh2ActionLoop){ do { rh2ActionLoop = false; rh2ActionLoopCount++; _local2 = 0; do { _local3 = CAct(_arg1.evgEvents[(_local2 + _arg1.evgNCond)]); if ((_local3.evtFlags & CEvent.EVFLAGS_REPEAT) != 0){ _local3.execute(rhPtr); }; _local2++; } while (_local2 < _arg1.evgNAct); } while (rh2ActionLoop); }; rh2ActionOn = false; if (rh2ShuffleBuffer != null){ endShuffle(); }; } } }//package Events
Section 95
//CGroupFind (Events.CGroupFind) package Events { public class CGroupFind { public var id:int; public var evg:int; } }//package Events
Section 96
//CLoadQualifiers (Events.CLoadQualifiers) package Events { public class CLoadQualifiers { public var qType:int; public var qOi:int; } }//package Events
Section 97
//CPushedEvent (Events.CPushedEvent) package Events { import Objects.*; public class CPushedEvent { public var routine:int; public var pHo:CObject; public var oi:int; public var param:int; public var code:int; public function CPushedEvent(_arg1:int, _arg2:int, _arg3:int, _arg4:CObject, _arg5:int){ routine = _arg1; code = _arg2; param = _arg3; pHo = _arg4; oi = _arg5; } } }//package Events
Section 98
//CQualToOiList (Events.CQualToOiList) package Events { public class CQualToOiList { public var qoiCurrentOi:int; public var qoiList:Array; public var qoiActionLoopCount:int; public var qoiActionCount:int; public var qoiNextFlag:Boolean; public var qoiSelectedFlag:Boolean; public var qoiActionPos:int; public var qoiCurrentRoutine:int; public var qoiNext:int; } }//package Events
Section 99
//CExp (Expressions.CExp) package Expressions { import Services.*; import OI.*; import RunLoop.*; public class CExp { public var code:int; public function evaluate(_arg1:CRun):void{ } public static function create(_arg1:CFile):CExp{ var _local5:int; var _local6:int; var _local7:CExpOi; var _local2:int = _arg1.getFilePointer(); var _local3:CExp; var _local4:int = _arg1.readAInt(); switch (_local4){ case 0: _local3 = new EXP_END(); break; case 131072: _local3 = new EXP_PLUS(); break; case 262144: _local3 = new EXP_MINUS(); break; case 393216: break; case 524288: break; case 655360: break; case 786432: break; case 917504: break; case 0x100000: break; case 0x120000: break; case ((0 << 16) | 0xFFFF): _local3 = new EXP_LONG(); break; case ((1 << 16) | 0xFFFF): _local3 = new EXP_RANDOM(); break; case ((2 << 16) | 0xFFFF): break; case ((3 << 16) | 0xFFFF): _local3 = new EXP_STRING(); break; case ((4 << 16) | 0xFFFF): break; case ((5 << 16) | 0xFFFF): break; case ((10 << 16) | 0xFFFF): break; case ((11 << 16) | 0xFFFF): break; case ((12 << 16) | 0xFFFF): break; case ((13 << 16) | 0xFFFF): break; case ((14 << 16) | 0xFFFF): break; case ((15 << 16) | 0xFFFF): break; case ((16 << 16) | 0xFFFF): break; case ((17 << 16) | 0xFFFF): break; case ((18 << 16) | 0xFFFF): break; case ((19 << 16) | 0xFFFF): break; case ((20 << 16) | 0xFFFF): break; case ((21 << 16) | 0xFFFF): break; case ((22 << 16) | 0xFFFF): break; case ((23 << 16) | 0xFFFF): _local3 = new EXP_DOUBLE(); break; case ((24 << 16) | 0xFFFF): _local3 = new EXP_VARGLONAMED(); break; case ((28 << 16) | 0xFFFF): break; case ((29 << 16) | 0xFFFF): break; case ((30 << 16) | 0xFFFF): break; case ((31 << 16) | 0xFFFF): break; case ((32 << 16) | 0xFFFF): break; case ((33 << 16) | 0xFFFF): break; case ((34 << 16) | 0xFFFF): break; case ((35 << 16) | 0xFFFF): break; case ((39 << 16) | 0xFFFF): break; case ((40 << 16) | 0xFFFF): break; case ((41 << 16) | 0xFFFF): break; case ((42 << 16) | 0xFFFF): break; case ((43 << 16) | 0xFFFF): break; case ((44 << 16) | 0xFFFF): break; case ((45 << 16) | 0xFFFF): break; case ((46 << 16) | 0xFFFF): break; case ((47 << 16) | 0xFFFF): break; case ((48 << 16) | 0xFFFF): break; case ((49 << 16) | 0xFFFF): break; case ((50 << 16) | 0xFFFF): _local3 = new EXP_STRINGGLONAMED(); break; case ((51 << 16) | 0xFFFF): break; case ((52 << 16) | 0xFFFF): break; case ((53 << 16) | 0xFFFF): break; case ((54 << 16) | 0xFFFF): break; case ((58 << 16) | 0xFFFF): break; case ((59 << 16) | 0xFFFF): break; case ((60 << 16) | 0xFFFF): _local3 = new EXP_ZERO(); break; case ((61 << 16) | 0xFFFF): _local3 = new EXP_EMPTY(); break; case ((-1 << 16) | 0xFFFF): break; case ((-2 << 16) | 0xFFFF): _local3 = new EXP_PARENTH2(); break; case ((-3 << 16) | 0xFFFF): break; case ((0 << 16) | 65534): break; case ((1 << 16) | 65534): break; case ((2 << 16) | 65534): break; case ((3 << 16) | 65534): break; case ((4 << 16) | 65534): break; case ((5 << 16) | 65534): break; case ((6 << 16) | 65534): break; case ((7 << 16) | 65534): break; case ((8 << 16) | 65534): break; case ((9 << 16) | 65534): break; case ((0 << 16) | 65533): break; case ((1 << 16) | 65533): break; case ((2 << 16) | 65533): break; case ((3 << 16) | 65533): break; case ((4 << 16) | 65533): break; case ((5 << 16) | 65533): break; case ((6 << 16) | 65533): break; case ((7 << 16) | 65533): break; case ((8 << 16) | 65533): break; case ((9 << 16) | 65533): break; case ((10 << 16) | 65533): break; case ((11 << 16) | 65533): break; case ((12 << 16) | 65533): break; case ((13 << 16) | 65533): break; case ((14 << 16) | 65533): _local3 = new EXP_ZERO(); break; case ((15 << 16) | 65533): _local3 = new EXP_ZERO(); break; case ((16 << 16) | 65533): _local3 = new EXP_FRAMEALPHACOEF(); break; case ((17 << 16) | 65533): break; case ((18 << 16) | 65533): _local3 = new EXP_ZERO(); break; case ((0 << 16) | 65532): break; case ((1 << 16) | 65532): break; case ((2 << 16) | 65532): break; case ((3 << 16) | 65532): break; case ((4 << 16) | 65532): break; case ((0 << 16) | 65530): break; case ((1 << 16) | 65530): break; case ((2 << 16) | 65530): break; case ((0 << 16) | 65529): break; case ((1 << 16) | 65529): break; case ((2 << 16) | 65529): break; case ((3 << 16) | 65529): break; case ((4 << 16) | 65529): break; case ((0 << 16) | 65531): break; case (((80 + 0) << 16) | 3): break; case (((80 + 1) << 16) | 3): break; case (((80 + 2) << 16) | 3): break; case (((80 + 3) << 16) | 3): break; case (((80 + 4) << 16) | 3): break; case (((80 + 0) << 16) | 2): break; case (((80 + 1) << 16) | 2): break; case (((80 + 2) << 16) | 2): break; case (((80 + 3) << 16) | 2): break; case (((80 + 0) << 16) | 7): _local3 = new EXP_CVALUE(); break; case (((80 + 1) << 16) | 7): break; case (((80 + 2) << 16) | 7): break; case (((80 + 3) << 16) | 7): break; case (((80 + 4) << 16) | 7): break; case (((80 + 0) << 16) | 9): break; case (((80 + 1) << 16) | 9): break; case (((80 + 2) << 16) | 9): break; default: switch ((_local4 & 4294901760)){ case (1 << 16): break; case (2 << 16): break; case (3 << 16): break; case (4 << 16): break; case (5 << 16): break; case (6 << 16): break; case (7 << 16): break; case (8 << 16): break; case (9 << 16): break; case (10 << 16): break; case (11 << 16): _local3 = new EXP_EXTXSPR(); break; case (12 << 16): break; case (13 << 16): break; case (14 << 16): break; case (15 << 16): break; case (16 << 16): _local3 = new EXP_EXTVAR(); break; case (17 << 16): break; case (18 << 16): break; case (19 << 16): _local3 = new EXP_EXTVARSTRING(); break; case (20 << 16): break; case (21 << 16): break; case (22 << 16): break; case (23 << 16): break; case (24 << 16): break; case (25 << 16): break; case (26 << 16): break; case (27 << 16): _local3 = new EXP_EXTALPHACOEF(); break; case (28 << 16): break; case (29 << 16): _local3 = new EXP_ZERO(); break; case (30 << 16): _local3 = new EXP_EXTVARBYINDEX(); break; case (31 << 16): _local3 = new EXP_EXTVARSTRINGBYINDEX(); break; default: _local3 = new CExpExtension(); break; }; }; if (_local3 != null){ _local3.code = _local4; if (_local4 != 0){ _local5 = _arg1.readAShort(); switch (_local4){ case ((3 << 16) | 0xFFFF): EXP_STRING(_local3).string = _arg1.readAString(); break; case ((0 << 16) | 0xFFFF): EXP_LONG(_local3).value = _arg1.readAInt(); break; case ((23 << 16) | 0xFFFF): EXP_DOUBLE(_local3).value = _arg1.readADouble(); break; case ((24 << 16) | 0xFFFF): _arg1.skipBytes(4); EXP_VARGLONAMED(_local3).number = _arg1.readAShort(); break; case ((50 << 16) | 0xFFFF): _arg1.skipBytes(4); EXP_STRINGGLONAMED(_local3).number = _arg1.readAShort(); break; default: _local6 = (_local4 & 0xFFFF); if ((_local6 & 0x8000) != 0){ _local6 = (_local6 - 65536); }; if ((((_local6 >= 2)) || ((_local6 == COI.OBJ_PLAYER)))){ _local7 = CExpOi(_local3); _local7.oi = _arg1.readShort(); _local7.oiList = _arg1.readShort(); switch ((_local4 & 4294901760)){ case (16 << 16): EXP_EXTVAR(_local3).number = _arg1.readAShort(); break; case (19 << 16): EXP_EXTVARSTRING(_local3).number = _arg1.readAShort(); break; default: break; }; }; }; _arg1.seek((_local2 + _local5)); }; } else { trace("*** Missing expression!"); }; return (_local3); } } }//package Expressions
Section 100
//CExpExtension (Expressions.CExpExtension) package Expressions { import RunLoop.*; import Objects.*; import Events.*; public class CExpExtension extends CExpOi { override public function evaluate(_arg1:CRun):void{ var _local2:CObject = _arg1.rhEvtProg.get_ExpressionObjects(oiList); if (_local2 == null){ _arg1.getCurrentResult().forceInt(0); return; }; var _local3:CExtension = CExtension(_local2); var _local4:int = ((code >> 16) - CEventProgram.EVENTS_EXTBASE); var _local5:CValue = _local3.expression(_local4); _arg1.getCurrentResult().forceValue(_local5); } } }//package Expressions
Section 101
//CExpOi (Expressions.CExpOi) package Expressions { import RunLoop.*; public class CExpOi extends CExp { public var oiList:int; public var oi:int; override public function evaluate(_arg1:CRun):void{ } } }//package Expressions
Section 102
//CValue (Expressions.CValue) package Expressions { public class CValue { public var intValue:int; public var doubleValue:Number; public var stringValue:String; public var type:int; public static var TYPE_STRING:int = 2; public static var TYPE_INT:int = 0; public static var TYPE_DOUBLE:int = 1; public function CValue(_arg1:int){ type = TYPE_INT; intValue = _arg1; } public function convertToInt():void{ if (type == TYPE_DOUBLE){ intValue = int(doubleValue); type = TYPE_INT; }; } public function notEqual(_arg1:CValue):Boolean{ if (type != _arg1.type){ getCompatibleTypes(_arg1); }; switch (type){ case 0: return (!((intValue == _arg1.intValue))); case 1: return (!((doubleValue == _arg1.doubleValue))); case 2: return (!((stringValue == _arg1.stringValue))); }; return (false); } public function forceValue(_arg1:CValue):void{ type = _arg1.type; switch (type){ case 0: intValue = _arg1.intValue; break; case 1: doubleValue = _arg1.doubleValue; break; case 2: stringValue = new String(_arg1.stringValue); break; }; } public function sub(_arg1:CValue):void{ if (type != _arg1.type){ getCompatibleTypes(_arg1); }; switch (type){ case 0: intValue = (intValue - _arg1.intValue); break; case 1: doubleValue = (doubleValue - _arg1.doubleValue); break; }; } public function lower(_arg1:CValue):Boolean{ if (type != _arg1.type){ getCompatibleTypes(_arg1); }; switch (type){ case 0: return ((intValue <= _arg1.intValue)); case 1: return ((doubleValue <= _arg1.doubleValue)); case 2: return ((stringValue <= _arg1.stringValue)); }; return (false); } public function negate():void{ switch (type){ case 0: intValue = -(intValue); break; case 1: doubleValue = -(doubleValue); break; }; } public function greaterThan(_arg1:CValue):Boolean{ if (type != _arg1.type){ getCompatibleTypes(_arg1); }; switch (type){ case 0: return ((intValue > _arg1.intValue)); case 1: return ((doubleValue > _arg1.doubleValue)); case 2: return ((stringValue > _arg1.stringValue)); }; return (false); } public function forceInt(_arg1:int):void{ type = TYPE_INT; intValue = _arg1; } public function getDouble():Number{ switch (type){ case 0: return (Number(intValue)); case 1: return (doubleValue); }; return (0); } public function div(_arg1:CValue):void{ if (type != _arg1.type){ getCompatibleTypes(_arg1); }; switch (type){ case 0: if (_arg1.intValue != 0){ intValue = (intValue / _arg1.intValue); } else { intValue = 0; }; break; case 1: if (_arg1.doubleValue != 0){ doubleValue = (doubleValue / _arg1.doubleValue); } else { doubleValue = 0; }; break; }; } public function greater(_arg1:CValue):Boolean{ if (type != _arg1.type){ getCompatibleTypes(_arg1); }; switch (type){ case 0: return ((intValue >= _arg1.intValue)); case 1: return ((doubleValue >= _arg1.doubleValue)); case 2: return ((stringValue >= _arg1.stringValue)); }; return (false); } public function mul(_arg1:CValue):void{ if (type != _arg1.type){ getCompatibleTypes(_arg1); }; switch (type){ case 0: intValue = (intValue * _arg1.intValue); break; case 1: doubleValue = (doubleValue * _arg1.doubleValue); break; }; } public function getCompatibleTypes(_arg1:CValue):void{ if ((((type == TYPE_INT)) && ((_arg1.type == TYPE_DOUBLE)))){ convertToDouble(); } else { if ((((type == TYPE_DOUBLE)) && ((_arg1.type == TYPE_INT)))){ _arg1.convertToDouble(); }; }; } public function pow(_arg1:CValue):void{ if (type != _arg1.type){ getCompatibleTypes(_arg1); }; switch (type){ case 0: doubleValue = Math.pow(getDouble(), _arg1.getDouble()); type = TYPE_DOUBLE; break; case 1: doubleValue = Math.pow(doubleValue, _arg1.doubleValue); break; }; } public function mod(_arg1:CValue):void{ if (type != _arg1.type){ getCompatibleTypes(_arg1); }; switch (type){ case 0: if (_arg1.intValue == 0){ intValue = 0; } else { intValue = (intValue % _arg1.intValue); }; break; case 1: if (_arg1.doubleValue == 0){ doubleValue = 0; } else { doubleValue = (doubleValue % _arg1.doubleValue); }; break; }; } public function forceString(_arg1:String):void{ type = TYPE_STRING; stringValue = new String(_arg1); } public function getString():String{ if (type == TYPE_STRING){ return (stringValue); }; return (""); } public function add(_arg1:CValue):void{ if (type != _arg1.type){ getCompatibleTypes(_arg1); }; switch (type){ case 0: intValue = (intValue + _arg1.intValue); break; case 1: doubleValue = (doubleValue + _arg1.doubleValue); break; case 2: stringValue = new String((stringValue + _arg1.stringValue)); break; }; } public function forceDouble(_arg1:Number):void{ type = TYPE_DOUBLE; doubleValue = _arg1; } public function lowerThan(_arg1:CValue):Boolean{ if (type != _arg1.type){ getCompatibleTypes(_arg1); }; switch (type){ case 0: return ((intValue < _arg1.intValue)); case 1: return ((doubleValue < _arg1.doubleValue)); case 2: return ((stringValue < _arg1.stringValue)); }; return (false); } public function orLog(_arg1:CValue):void{ if (type != _arg1.type){ getCompatibleTypes(_arg1); }; switch (type){ case 0: intValue = (intValue | _arg1.intValue); break; case 1: forceInt((getInt() | _arg1.getInt())); break; }; } public function xorLog(_arg1:CValue):void{ if (type != _arg1.type){ getCompatibleTypes(_arg1); }; switch (type){ case 0: intValue = (intValue ^ _arg1.intValue); break; case 1: forceInt((getInt() ^ _arg1.getInt())); break; }; } public function andLog(_arg1:CValue):void{ if (type != _arg1.type){ getCompatibleTypes(_arg1); }; switch (type){ case 0: intValue = (intValue & _arg1.intValue); break; case 1: forceInt((getInt() & _arg1.getInt())); break; }; } public function setValue(_arg1:CValue):void{ switch (type){ case 0: intValue = _arg1.getInt(); break; case 1: doubleValue = _arg1.getDouble(); break; case 2: stringValue = new String(_arg1.stringValue); break; }; } public function getType():int{ return (type); } public function getInt():int{ switch (type){ case 0: return (intValue); case 1: return (int(doubleValue)); }; return (0); } public function equal(_arg1:CValue):Boolean{ if (type != _arg1.type){ getCompatibleTypes(_arg1); }; switch (type){ case 0: return ((intValue == _arg1.intValue)); case 1: return ((doubleValue == _arg1.doubleValue)); case 2: return ((stringValue == _arg1.stringValue)); }; return (false); } public function convertToDouble():void{ if (type == TYPE_INT){ doubleValue = Number(intValue); type = TYPE_DOUBLE; }; } } }//package Expressions
Section 103
//EXP_CVALUE (Expressions.EXP_CVALUE) package Expressions { import RunLoop.*; import Objects.*; public class EXP_CVALUE extends CExpOi { override public function evaluate(_arg1:CRun):void{ var _local2:CObject = _arg1.rhEvtProg.get_ExpressionObjects(oiList); if (_local2 == null){ _arg1.getCurrentResult().forceInt(0); return; }; _arg1.getCurrentResult().forceValue(CCounter(_local2).cpt_GetValue()); } } }//package Expressions
Section 104
//EXP_DOUBLE (Expressions.EXP_DOUBLE) package Expressions { import RunLoop.*; public class EXP_DOUBLE extends CExp { public var value:Number; override public function evaluate(_arg1:CRun):void{ _arg1.getCurrentResult().forceDouble(value); } } }//package Expressions
Section 105
//EXP_EMPTY (Expressions.EXP_EMPTY) package Expressions { import RunLoop.*; public class EXP_EMPTY extends CExp { override public function evaluate(_arg1:CRun):void{ _arg1.getCurrentResult().forceString(""); } } }//package Expressions
Section 106
//EXP_END (Expressions.EXP_END) package Expressions { import RunLoop.*; public class EXP_END extends CExp { override public function evaluate(_arg1:CRun):void{ } } }//package Expressions
Section 107
//EXP_EXTALPHACOEF (Expressions.EXP_EXTALPHACOEF) package Expressions { import RunLoop.*; import Objects.*; import Sprites.*; public class EXP_EXTALPHACOEF extends CExpOi { override public function evaluate(_arg1:CRun):void{ var _local2:CObject = _arg1.rhEvtProg.get_ExpressionObjects(oiList); if ((((_local2 == null)) || (((!((_local2 == null))) && ((_local2.ros == null)))))){ _arg1.getCurrentResult().forceInt(0); return; }; var _local3:int = _local2.ros.rsEffect; var _local4:int = _local2.ros.rsEffectParam; var _local5:int; var _local6:int = _local4; if (((((_local3 & CRSpr.BOP_MASK) == CRSpr.BOP_EFFECTEX)) || (!(((_local3 & CRSpr.BOP_RGBAFILTER) == 0))))){ _local5 = (0xFF - ((_local6 >> 24) & 0xFF)); } else { if (_local4 == -1){ _local5 = 0; } else { _local5 = (_local4 * 2); }; }; _arg1.getCurrentResult().forceInt(_local5); } } }//package Expressions
Section 108
//EXP_EXTVAR (Expressions.EXP_EXTVAR) package Expressions { import RunLoop.*; import Objects.*; public class EXP_EXTVAR extends CExpOi { public var number:int; override public function evaluate(_arg1:CRun):void{ var _local2:CObject = _arg1.rhEvtProg.get_ExpressionObjects(oiList); if (_local2 == null){ _arg1.getCurrentResult().forceInt(0); return; }; if (_local2.rov != null){ _arg1.getCurrentResult().forceValue(_local2.rov.getValue(number)); } else { _arg1.getCurrentResult().forceInt(0); }; } } }//package Expressions
Section 109
//EXP_EXTVARBYINDEX (Expressions.EXP_EXTVARBYINDEX) package Expressions { import RunLoop.*; import Objects.*; import Values.*; public class EXP_EXTVARBYINDEX extends CExpOi { override public function evaluate(_arg1:CRun):void{ var _local2:CObject = _arg1.rhEvtProg.get_ExpressionObjects(oiList); _arg1.rh4CurToken++; var _local3:int = _arg1.get_ExpressionInt(); if (((!((_local2 == null))) && (!((_local2.rov == null))))){ if ((((_local3 >= 0)) && ((_local3 < CRVal.VALUES_NUMBEROF_ALTERABLE)))){ _arg1.getCurrentResult().forceValue(_local2.rov.getValue(_local3)); return; }; }; _arg1.getCurrentResult().forceInt(0); } } }//package Expressions
Section 110
//EXP_EXTVARSTRING (Expressions.EXP_EXTVARSTRING) package Expressions { import RunLoop.*; import Objects.*; public class EXP_EXTVARSTRING extends CExpOi { public var number:int; override public function evaluate(_arg1:CRun):void{ var _local2:CObject = _arg1.rhEvtProg.get_ExpressionObjects(oiList); if (_local2 == null){ _arg1.getCurrentResult().forceString(""); return; }; _arg1.getCurrentResult().forceString(_local2.rov.getString(number)); } } }//package Expressions
Section 111
//EXP_EXTVARSTRINGBYINDEX (Expressions.EXP_EXTVARSTRINGBYINDEX) package Expressions { import RunLoop.*; import Objects.*; import Values.*; public class EXP_EXTVARSTRINGBYINDEX extends CExpOi { override public function evaluate(_arg1:CRun):void{ var _local2:CObject = _arg1.rhEvtProg.get_ExpressionObjects(oiList); _arg1.rh4CurToken++; var _local3:int = _arg1.get_ExpressionInt(); if (((!((_local2 == null))) && (!((_local2.rov == null))))){ if ((((_local3 >= 0)) && ((_local3 < CRVal.STRINGS_NUMBEROF_ALTERABLE)))){ _arg1.getCurrentResult().forceString(_local2.rov.getString(_local3)); return; }; }; _arg1.getCurrentResult().forceString(""); } } }//package Expressions
Section 112
//EXP_EXTXSPR (Expressions.EXP_EXTXSPR) package Expressions { import RunLoop.*; import Objects.*; public class EXP_EXTXSPR extends CExpOi { override public function evaluate(_arg1:CRun):void{ var _local2:CObject = _arg1.rhEvtProg.get_ExpressionObjects(oiList); if (_local2 == null){ _arg1.getCurrentResult().forceInt(0); return; }; _arg1.getCurrentResult().forceInt(_local2.hoX); } } }//package Expressions
Section 113
//EXP_FRAMEALPHACOEF (Expressions.EXP_FRAMEALPHACOEF) package Expressions { import RunLoop.*; import Sprites.*; public class EXP_FRAMEALPHACOEF extends CExp { override public function evaluate(_arg1:CRun):void{ var _local2:int = _arg1.rhApp.effect; var _local3:int = _arg1.rhApp.effectParam; var _local4:int; var _local5:int = _local3; if (((((_local2 & CRSpr.BOP_MASK) == CRSpr.BOP_EFFECTEX)) || (!(((_local2 & CRSpr.BOP_RGBAFILTER) == 0))))){ _local4 = (0xFF - ((_local5 >> 24) & 0xFF)); } else { if (_local3 == -1){ _local4 = 0; } else { _local4 = (_local3 * 2); }; }; _arg1.getCurrentResult().forceInt(_local4); } } }//package Expressions
Section 114
//EXP_LONG (Expressions.EXP_LONG) package Expressions { import RunLoop.*; public class EXP_LONG extends CExp { public var value:int; override public function evaluate(_arg1:CRun):void{ _arg1.getCurrentResult().forceInt(value); } } }//package Expressions
Section 115
//EXP_MINUS (Expressions.EXP_MINUS) package Expressions { import RunLoop.*; public class EXP_MINUS extends CExp { override public function evaluate(_arg1:CRun):void{ if (_arg1.bOperande){ _arg1.rh4CurToken++; _arg1.rh4Tokens[_arg1.rh4CurToken].evaluate(_arg1); _arg1.getCurrentResult().negate(); } else { _arg1.getCurrentResult().sub(_arg1.getNextResult()); }; } } }//package Expressions
Section 116
//EXP_PARENTH2 (Expressions.EXP_PARENTH2) package Expressions { import RunLoop.*; public class EXP_PARENTH2 extends CExp { override public function evaluate(_arg1:CRun):void{ } } }//package Expressions
Section 117
//EXP_PLUS (Expressions.EXP_PLUS) package Expressions { import RunLoop.*; public class EXP_PLUS extends CExp { override public function evaluate(_arg1:CRun):void{ _arg1.getCurrentResult().add(_arg1.getNextResult()); } } }//package Expressions
Section 118
//EXP_RANDOM (Expressions.EXP_RANDOM) package Expressions { import RunLoop.*; public class EXP_RANDOM extends CExp { override public function evaluate(_arg1:CRun):void{ _arg1.rh4CurToken++; var _local2:int = _arg1.get_ExpressionInt(); _arg1.getCurrentResult().forceInt(_arg1.random(_local2)); } } }//package Expressions
Section 119
//EXP_STRING (Expressions.EXP_STRING) package Expressions { import RunLoop.*; public class EXP_STRING extends CExp { public var string:String; override public function evaluate(_arg1:CRun):void{ _arg1.getCurrentResult().forceString(string); } } }//package Expressions
Section 120
//EXP_STRINGGLONAMED (Expressions.EXP_STRINGGLONAMED) package Expressions { import RunLoop.*; public class EXP_STRINGGLONAMED extends CExp { public var number:int; override public function evaluate(_arg1:CRun):void{ _arg1.getCurrentResult().forceString(_arg1.rhApp.getGlobalStringAt(number)); } } }//package Expressions
Section 121
//EXP_VARGLONAMED (Expressions.EXP_VARGLONAMED) package Expressions { import RunLoop.*; public class EXP_VARGLONAMED extends CExp { public var number:int; override public function evaluate(_arg1:CRun):void{ _arg1.getCurrentResult().forceValue(_arg1.rhApp.getGlobalValueAt(number)); } } }//package Expressions
Section 122
//EXP_ZERO (Expressions.EXP_ZERO) package Expressions { import RunLoop.*; public class EXP_ZERO extends CExp { override public function evaluate(_arg1:CRun):void{ _arg1.getCurrentResult().forceInt(0); } } }//package Expressions
Section 123
//CExtLoad (Extensions.CExtLoad) package Extensions { import Services.*; public class CExtLoad { public var handle:int; public var subType:String; public var name:String; public function loadInfo(_arg1:CFile):void{ var _local2:int = _arg1.getFilePointer(); var _local3:int = Math.abs(_arg1.readShort()); handle = _arg1.readAShort(); _arg1.skipBytes(12); name = _arg1.readAString(); var _local4:int = name.lastIndexOf("."); name = name.substring(0, _local4); var _local5:int = name.indexOf("-"); while (_local5 > 0) { name = ((name.substring(0, _local5) + "_") + name.substring((_local5 + 1), name.length)); _local5 = name.indexOf("-"); }; subType = _arg1.readAString(); _arg1.seek((_local2 + _local3)); } public function loadRunObject():CRunExtension{ var _local1:CRunExtension; if (CServices.compareStringsIgnoreCase(name, "FlashURL")){ _local1 = new CRunFlashURL(); }; if (CServices.compareStringsIgnoreCase(name, "MochiScores")){ _local1 = new CRunMochiScores(); }; if (CServices.compareStringsIgnoreCase(name, "MochiAnalytics")){ _local1 = new CRunMochiAnalytics(); }; if (CServices.compareStringsIgnoreCase(name, "MochiConnector")){ _local1 = new CRunMochiConnector(); }; if (CServices.compareStringsIgnoreCase(name, "FlashFx")){ _local1 = new CRunFlashFx(); }; if (CServices.compareStringsIgnoreCase(name, "Platform")){ _local1 = new CRunPlatform(); }; if (_local1 != null){ return (_local1); }; trace("*** Object not found!"); return (null); } } }//package Extensions
Section 124
//CExtLoader (Extensions.CExtLoader) package Extensions { import Application.*; import Services.*; public class CExtLoader { public var app:CRunApp; public var extensions:Array; public var numOfConditions:Array; public static var KPX_BASE:int = 32; public function CExtLoader(_arg1:CRunApp){ app = _arg1; } public function loadList(_arg1:CFile):void{ var _local4:int; var _local5:CExtLoad; var _local6:CRunExtension; var _local2:int = _arg1.readAShort(); var _local3:int = _arg1.readAShort(); extensions = new Array(_local3); numOfConditions = new Array(_local3); _local4 = 0; while (_local4 < _local3) { extensions[_local4] = null; _local4++; }; _local4 = 0; while (_local4 < _local2) { _local5 = new CExtLoad(); _local5.loadInfo(_arg1); _local6 = _local5.loadRunObject(); if (_local6 != null){ extensions[_local5.handle] = _local5; numOfConditions[_local5.handle] = _local6.getNumberOfConditions(); }; _local4++; }; } public function loadRunObject(_arg1:int):CRunExtension{ _arg1 = (_arg1 - KPX_BASE); var _local2:CRunExtension; if ((((_arg1 < extensions.length)) && (!((extensions[_arg1] == null))))){ _local2 = extensions[_arg1].loadRunObject(); }; return (_local2); } public function getNumberOfConditions(_arg1:int):int{ _arg1 = (_arg1 - KPX_BASE); if (_arg1 < extensions.length){ return (numOfConditions[_arg1]); }; return (0); } } }//package Extensions
Section 125
//CExtStorage (Extensions.CExtStorage) package Extensions { public class CExtStorage { public var id:int; public var object:Object; } }//package Extensions
Section 126
//CRunExtension (Extensions.CRunExtension) package Extensions { import Services.*; import Expressions.*; import RunLoop.*; import Objects.*; import Sprites.*; import Actions.*; import Conditions.*; public class CRunExtension { public var ho:CExtension; public var rh:CRun; public static var REFLAG_ONESHOT:int = 2; public static var REFLAG_DISPLAY:int = 1; public function getChildMaxIndex():int{ return (0); } public function continueRunObject():void{ } public function click():void{ } public function getZoneInfos():void{ } public function getChildIndex():int{ return (-1); } public function displayRunObject():void{ } public function init(_arg1:CExtension):void{ ho = _arg1; rh = _arg1.hoAdRunHeader; } public function pauseRunObject():void{ } public function createRunObject(_arg1:CBinaryFile, _arg2:CCreateObjectInfo, _arg3:int):Boolean{ return (false); } public function setFocus(_arg1:Boolean):void{ } public function destroyRunObject(_arg1:Boolean):void{ } public function expression(_arg1:int):CValue{ return (null); } public function condition(_arg1:int, _arg2:CCndExtension):Boolean{ return (false); } public function getNumberOfConditions():int{ return (0); } public function setRunObjectFont(_arg1:CFontInfo, _arg2:CRect):void{ } public function setChildIndex(_arg1:int):void{ } public function handleRunObject():int{ return (REFLAG_ONESHOT); } public function getRunObjectFont():CFontInfo{ return (null); } public function hideSprite():void{ } public function getRunObjectTextColor():int{ return (0); } public function getRunObjectCollisionMask(_arg1:int):CMask{ return (null); } public function setRunObjectTextColor(_arg1:int):void{ } public function showSprite():void{ } public function action(_arg1:int, _arg2:CActExtension):void{ } public function doubleClick():void{ } public function setHandCursor(_arg1:Boolean):void{ } } }//package Extensions
Section 127
//CRunFlashFx (Extensions.CRunFlashFx) package Extensions { import flash.display.*; import flash.geom.*; import flash.events.*; import Services.*; import Expressions.*; import flash.utils.*; import RunLoop.*; import Objects.*; import Params.*; import Sprites.*; import Events.*; import Frame.*; import Actions.*; import Conditions.*; import flash.filters.*; import flash.external.*; public class CRunFlashFx extends CRunExtension { public var calledEvent:Event; public var filterParams:Object; public var shaders:Object; public var shaderData:Object; public var externalCallback:String; public var keepFilterParams:Boolean; public var fScreen:String; public var selection:Array; public var shaderClass:Class; public var transformMouse:Boolean; public var fChange:Boolean; public var shaderFilterClass:Class; public var keepFilters:Boolean; public var loopCountEvpReady:int; public var filters:Array; public var stage:Stage; private static var ACT19_SETALPHAOFFSETTO0:int = 19; private static var ACT40_TRANSFORMMATRIXSCALEBY01:int = 40; private static var ACT32_LOADSELECTIONSFILTERS:int = 32; private static var ACT15_SETGREENOFFSETTO0:int = 15; private static var ACT1_SETSTAGEDISPLAYSTATETO0:int = 1; private static var ACT24_ADDBLURFILTER:int = 24; private static var ACT39_TRANSFORMMATRIXROTATEBY0:int = 39; private static var ACT5_SELECTOBJECT0:int = 5; private static var ACT4_REMOVESTAGEEVENTLISTENER0:int = 4; private static var ACT31_UPDATEFILTER0:int = 31; private static var ACT35_SETFILTERS0TONUMBER1:int = 35; private static var ACT20_SETALPHAMULTIPLIERTO0:int = 20; private static var ACT22_REMOVEALLFILTERS:int = 22; private static var ACT12_SETALPHATO0:int = 12; private static var ACT2_SETSTAGEALIGNMENTTO0:int = 2; private static var ACT49_SHADERUPDATE0:int = 49; private static var ACT51_3DTRANSFORMSETROTATIONTO012:int = 51; private static var ACT16_SETGREENMULTIPLIERTO0:int = 16; private static var ACT44_SHADERCOMPILEBINARYFILE0AS1:int = 44; private static var ACT8_SETBLENDMODETO0:int = 8; private static var ACT10_SETSCALETO01:int = 10; private static var ACT45_FILTERPUSHSHADER0:int = 45; private static var ACT33_SAVEFILTERSTOSELECTION:int = 33; private static var ACT43_STAGECALLEVENT0:int = 43; private static var ACT13_SETREDOFFSETTO0:int = 13; private static var ACT6_SELECTLAYER0:int = 6; private static var ACT9_SELECTAPPLICATION:int = 9; private static var ACT27_ADDDROPSHADOWFILTER:int = 27; private static var ACT11_SETPOSITIONTO01:int = 11; private static var CND0_OBJ_ONSTAGEEVENT0:int = 0; private static var ACT50_3DTRANSFORMSETZPOSITIONTO0:int = 50; private static var ACT29_ADDSHADERFILTER:int = 29; private static var ACT34_SETFILTERS0TOCOLOR1:int = 34; private static var ACT0_SETSTAGESCALEMODETO0:int = 0; private static var ACT25_ADDCOLORMATRIXFILTER:int = 25; private static var ACT23_ADDBEVELFILTER:int = 23; private static var ACT28_ADDGLOWFILTER:int = 28; private static var ACT38_TRANSFORMMATRIXTRANSLATEBY01:int = 38; private static var ACT30_REMOVEFILTER0:int = 30; private static var ACT37_SETFILTERS0TO1:int = 37; private static var ACT47_SHADERPUSH0WITH1:int = 47; private static var ACT17_SETBLUEOFFSETTO0:int = 17; private static var ACT52_3DTRANSFORMSETZSCALETO0:int = 52; private static var ACT7_SETROTATIONTO0:int = 7; private static var ACT41_TRANSFORMMATRIXSETA0B1C2D3TX4TY5:int = 41; private static var CND_LAST:int = 3; private static var ACT48_SHADERPUSH0WITH1:int = 48; private static var ACT46_BLENDINGSETBLENDSHADERTO0:int = 46; private static var ACT21_SETOFFSETSTO0123MULTIPLIERSTO4567:int = 21; private static var CND1_OBJ_EVENT01:int = 1; private static var ACT26_ADDCONVOLUTIONFILTER:int = 26; private static var ACT14_SETREDMULTIPLIERTO0:int = 14; private static var ACT42_TRANSFORMMATRIXIDENTITY:int = 42; private static var ACT3_ADDSTAGEEVENTLISTENER0:int = 3; private static var ACT18_SETBLUEMULTIPLIERTO0:int = 18; private static var ACT36_SETFILTERS0TOSTRING1:int = 36; override public function createRunObject(_arg1:CBinaryFile, _arg2:CCreateObjectInfo, _arg3:int):Boolean{ var file = _arg1; var cob = _arg2; var version = _arg3; transformMouse = !((file.readByte() == 0)); keepFilters = !((file.readByte() == 0)); keepFilterParams = !((file.readByte() == 0)); stage = ho.getApplication().stage; selection = new Array(rh.rhApp.mainSprite); filters = new Array(); filterParams = new Object(); shaders = new Object(); shaderData = new Object(); loopCountEvpReady = -1; if (transformMouse){ rh.rhApp.mainSprite.removeEventListener(MouseEvent.MOUSE_MOVE, rh.rhApp.onMouseMove); }; try { shaderClass = (getDefinitionByName("flash.display.Shader") as Class); shaderFilterClass = (getDefinitionByName("flash.filters.ShaderFilter") as Class); } catch(e) { shaderClass = null; shaderFilterClass = null; }; return (false); } override public function condition(_arg1:int, _arg2:CCndExtension):Boolean{ switch (_arg1){ case CND0_OBJ_ONSTAGEEVENT0: return (cnd0(_arg2.getParamExpString(rh, 0))); case CND1_OBJ_EVENT01: return (cnd1(_arg2.getParamExpString(rh, 0), _arg2.getParamExpString(rh, 1))); case 2: return (cnd2(_arg2.getParamExpString(rh, 0))); }; return (false); } private function ApplyShaderParameters(_arg1:Object):void{ var _local2:String; for (_local2 in shaderData) { if ((shaderData[_local2] is Array)){ _arg1.data[_local2].value = shaderData[_local2]; } else { _arg1.data[_local2].value = [shaderData[_local2]]; }; }; _arg1.data; shaderData = new Object(); } private function act10(_arg1:Number, _arg2:Number):void{ var _local3:int; while (_local3 < selection.length) { selection[_local3].scaleX = _arg1; selection[_local3].scaleY = _arg2; _local3++; }; } private function act13(_arg1:Number):void{ AdjustColorTransform("redOffset", _arg1); } private function act14(_arg1:Number):void{ AdjustColorTransform("redMultiplier", _arg1); } private function act15(_arg1:Number):void{ AdjustColorTransform("greenOffset", _arg1); } private function act16(_arg1:Number):void{ AdjustColorTransform("greenMultiplier", _arg1); } private function act17(_arg1:Number):void{ AdjustColorTransform("blueOffset", _arg1); } private function act11(_arg1:Number, _arg2:Number):void{ var _local3:int; while (_local3 < selection.length) { selection[_local3].x = _arg1; selection[_local3].y = _arg2; _local3++; }; } override public function action(_arg1:int, _arg2:CActExtension):void{ switch (_arg1){ case ACT0_SETSTAGESCALEMODETO0: act0(_arg2.getParamExpString(rh, 0)); break; case ACT1_SETSTAGEDISPLAYSTATETO0: act1(_arg2.getParamExpString(rh, 0)); break; case ACT2_SETSTAGEALIGNMENTTO0: act2(_arg2.getParamExpString(rh, 0)); break; case ACT3_ADDSTAGEEVENTLISTENER0: act3(_arg2.getParamExpString(rh, 0)); break; case ACT4_REMOVESTAGEEVENTLISTENER0: act4(_arg2.getParamExpString(rh, 0)); break; case ACT5_SELECTOBJECT0: act5(_arg2.getParamObject(rh, 0)); break; case ACT6_SELECTLAYER0: act6(_arg2.getParamExpression(rh, 0)); break; case ACT7_SETROTATIONTO0: act7(_arg2.getParamExpDouble(rh, 0)); break; case ACT8_SETBLENDMODETO0: act8(_arg2.getParamExpString(rh, 0)); break; case ACT9_SELECTAPPLICATION: act9(); break; case ACT10_SETSCALETO01: act10(_arg2.getParamExpDouble(rh, 0), _arg2.getParamExpDouble(rh, 1)); break; case ACT11_SETPOSITIONTO01: act11(_arg2.getParamExpDouble(rh, 0), _arg2.getParamExpDouble(rh, 1)); break; case ACT12_SETALPHATO0: act12(_arg2.getParamExpDouble(rh, 0)); break; case ACT13_SETREDOFFSETTO0: act13(_arg2.getParamExpDouble(rh, 0)); break; case ACT14_SETREDMULTIPLIERTO0: act14(_arg2.getParamExpDouble(rh, 0)); break; case ACT15_SETGREENOFFSETTO0: act15(_arg2.getParamExpDouble(rh, 0)); break; case ACT16_SETGREENMULTIPLIERTO0: act16(_arg2.getParamExpDouble(rh, 0)); break; case ACT17_SETBLUEOFFSETTO0: act17(_arg2.getParamExpDouble(rh, 0)); break; case ACT18_SETBLUEMULTIPLIERTO0: act18(_arg2.getParamExpDouble(rh, 0)); break; case ACT19_SETALPHAOFFSETTO0: act19(_arg2.getParamExpDouble(rh, 0)); break; case ACT20_SETALPHAMULTIPLIERTO0: act20(_arg2.getParamExpDouble(rh, 0)); break; case ACT21_SETOFFSETSTO0123MULTIPLIERSTO4567: act21(_arg2.getParamExpDouble(rh, 0), _arg2.getParamExpDouble(rh, 1), _arg2.getParamExpDouble(rh, 2), _arg2.getParamExpDouble(rh, 3), _arg2.getParamExpDouble(rh, 4), _arg2.getParamExpDouble(rh, 5), _arg2.getParamExpDouble(rh, 6), _arg2.getParamExpDouble(rh, 7)); break; case ACT22_REMOVEALLFILTERS: act22(); break; case ACT23_ADDBEVELFILTER: act23(); break; case ACT24_ADDBLURFILTER: act24(); break; case ACT25_ADDCOLORMATRIXFILTER: act25(); break; case ACT26_ADDCONVOLUTIONFILTER: act26(); break; case ACT27_ADDDROPSHADOWFILTER: act27(); break; case ACT28_ADDGLOWFILTER: act28(); break; case ACT29_ADDSHADERFILTER: act29(); break; case ACT30_REMOVEFILTER0: act30(_arg2.getParamExpression(rh, 0)); break; case ACT31_UPDATEFILTER0: act31(_arg2.getParamExpression(rh, 0)); break; case ACT32_LOADSELECTIONSFILTERS: act32(); break; case ACT33_SAVEFILTERSTOSELECTION: act33(); break; case ACT34_SETFILTERS0TOCOLOR1: act34(_arg2.getParamExpString(rh, 0), _arg2.getParamColour(rh, 1)); break; case ACT35_SETFILTERS0TONUMBER1: act35(_arg2.getParamExpString(rh, 0), _arg2.getParamExpDouble(rh, 1)); break; case ACT36_SETFILTERS0TOSTRING1: act36(_arg2.getParamExpString(rh, 0), _arg2.getParamExpString(rh, 1)); break; case ACT37_SETFILTERS0TO1: act37(_arg2.getParamExpString(rh, 0), _arg2.getParamExpString(rh, 1)); break; case ACT38_TRANSFORMMATRIXTRANSLATEBY01: act38(_arg2.getParamExpDouble(rh, 0), _arg2.getParamExpDouble(rh, 1)); break; case ACT39_TRANSFORMMATRIXROTATEBY0: act39(_arg2.getParamExpDouble(rh, 0)); break; case ACT40_TRANSFORMMATRIXSCALEBY01: act40(_arg2.getParamExpDouble(rh, 0), _arg2.getParamExpDouble(rh, 1)); break; case ACT41_TRANSFORMMATRIXSETA0B1C2D3TX4TY5: act41(_arg2.getParamExpDouble(rh, 0), _arg2.getParamExpDouble(rh, 1), _arg2.getParamExpDouble(rh, 2), _arg2.getParamExpDouble(rh, 3), _arg2.getParamExpDouble(rh, 4), _arg2.getParamExpDouble(rh, 5)); break; case ACT42_TRANSFORMMATRIXIDENTITY: act42(); break; case ACT43_STAGECALLEVENT0: act43(_arg2.getParamExpString(rh, 0)); break; case ACT44_SHADERCOMPILEBINARYFILE0AS1: act44(_arg2.getParamExpString(rh, 0), _arg2.getParamExpString(rh, 1)); break; case ACT45_FILTERPUSHSHADER0: act45(_arg2.getParamExpString(rh, 0)); break; case ACT46_BLENDINGSETBLENDSHADERTO0: act46(_arg2.getParamExpString(rh, 0)); break; case ACT47_SHADERPUSH0WITH1: act47(_arg2.getParamExpString(rh, 0), _arg2.getParamExpDouble(rh, 1)); break; case ACT48_SHADERPUSH0WITH1: act48(_arg2.getParamExpString(rh, 0), _arg2.getParamExpString(rh, 1)); break; case ACT49_SHADERUPDATE0: act49(_arg2.getParamExpString(rh, 0)); break; case ACT50_3DTRANSFORMSETZPOSITIONTO0: act50(_arg2.getParamExpDouble(rh, 0)); break; case ACT51_3DTRANSFORMSETROTATIONTO012: act51(_arg2.getParamExpDouble(rh, 0), _arg2.getParamExpDouble(rh, 1), _arg2.getParamExpDouble(rh, 2)); break; case ACT52_3DTRANSFORMSETZSCALETO0: act52(_arg2.getParamExpDouble(rh, 0)); break; case 53: act53(_arg2.getParamExpDouble(rh, 0), _arg2.getParamExpDouble(rh, 1), _arg2.getParamExpDouble(rh, 2)); break; case 54: act54(_arg2.getParamExpString(rh, 0)); break; case 55: act55(_arg2.getParamObject(rh, 0), _arg2.getParamExpString(rh, 1)); break; }; } private function act18(_arg1:Number):void{ AdjustColorTransform("blueMultiplier", _arg1); } private function act19(_arg1:Number):void{ AdjustColorTransform("alphaOffset", _arg1); } private function act12(_arg1:Number):void{ var _local2:int; while (_local2 < selection.length) { selection[_local2].alpha = _arg1; _local2++; }; } private function act20(_arg1:Number):void{ AdjustColorTransform("alphaMultiplier", _arg1); } private function act21(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number):void{ var _local9:int; while (_local9 < selection.length) { selection[_local9].transform.colorTransform = new ColorTransform(_arg5, _arg6, _arg7, _arg8, _arg1, _arg2, _arg3, _arg4); _local9++; }; } private function act22():void{ filters.length = 0; } private function act23():void{ AddFilter(new BevelFilter()); } private function act24():void{ AddFilter(new BlurFilter()); } private function act25():void{ AddFilter(new ColorMatrixFilter()); } private function act26():void{ AddFilter(new ConvolutionFilter()); } private function act27():void{ AddFilter(new DropShadowFilter()); } private function act28():void{ AddFilter(new GlowFilter()); } private function AddFilter(_arg1:BitmapFilter):void{ ApplyFilterParameters(_arg1); filters.push(_arg1); if (!keepFilterParams){ filterParams = new Object(); }; } override public function handleRunObject():int{ if (transformMouse){ rh.rhApp.mouseX = rh.rhApp.mainSprite.mouseX; rh.rhApp.mouseY = rh.rhApp.mainSprite.mouseY; return (1); }; return (0); } private function act29():void{ if (shaderFilterClass == null){ return; }; AddFilter(new shaderFilterClass()); } private function act30(_arg1:int):void{ if ((((_arg1 >= 0)) && ((_arg1 < filters.length)))){ filters.splice(_arg1, 1); }; } private function act31(_arg1:int):void{ if ((((_arg1 >= 0)) && ((_arg1 < filters.length)))){ ApplyFilterParameters(filters[_arg1]); }; } private function act32():void{ if (selection.length > 0){ filters = selection[0].filters; }; } private function act33():void{ var _local1:int; while (_local1 < selection.length) { selection[_local1].filters = filters; _local1++; }; if (!keepFilters){ filters.length = 0; }; } private function act34(_arg1:String, _arg2:uint):void{ filterParams[_arg1] = _arg2; } private function act35(_arg1:String, _arg2:Number):void{ filterParams[_arg1] = _arg2; } private function act36(_arg1:String, _arg2:String):void{ filterParams[_arg1] = _arg2; } private function act37(_arg1:String, _arg2:String):void{ var _local3:Array = _arg2.split(/[ntr |,;]+/); var _local4:int; while (_local4 < _local3.length) { _local3[_local4] = new Number(_local3[_local4]); _local4++; }; filterParams[_arg1] = _local3; } private function act38(_arg1:Number, _arg2:Number):void{ var _local4:Matrix; var _local3:Number = 0; while (_local3 < selection.length) { _local4 = selection[_local3].transform.matrix; _local4.translate(_arg1, _arg2); selection[_local3].transform.matrix = _local4; _local3++; }; } private function act39(_arg1:Number):void{ var _local3:Matrix; var _local2:Number = 0; while (_local2 < selection.length) { _local3 = selection[_local2].transform.matrix; _local3.rotate(((_arg1 / 180) * Math.PI)); selection[_local2].transform.matrix = _local3; _local2++; }; } public function EventHandler(_arg1:Event):void{ calledEvent = _arg1; fChange = false; ho.generateEvent(0, ho.getEventParam()); if (fChange){ stage.displayState = fScreen; }; } public function GetFV(_arg1:CObject):int{ return (((_arg1.hoCreationId << 16) + _arg1.hoNumber)); } private function act40(_arg1:Number, _arg2:Number):void{ var _local4:Matrix; var _local3:Number = 0; while (_local3 < selection.length) { _local4 = selection[_local3].transform.matrix; _local4.scale(_arg1, _arg2); selection[_local3].transform.matrix = _local4; _local3++; }; } private function act41(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number):void{ var _local7:Matrix = new Matrix(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6); var _local8:Number = 0; while (_local8 < selection.length) { selection[_local8].transform.matrix = _local7; _local8++; }; } private function act42():void{ var _local2:Matrix; var _local1:Number = 0; while (_local1 < selection.length) { _local2 = selection[_local1].transform.matrix; _local2.identity(); selection[_local1].transform.matrix = _local2; _local1++; }; } private function act43(_arg1:String):void{ stage.dispatchEvent(new Event(_arg1)); } private function act44(_arg1:String, _arg2:String):void{ if (shaderClass == null){ return; }; var _local3:CBinaryFile = rh.rhApp.openHFile(_arg1); if (_local3 != null){ shaders[_arg2] = new shaderClass(_local3.data); shaders[_arg2]; rh.rhApp.closeHFile(_arg1); }; ApplyShaderParameters(shaders[_arg2]); } private function act46(_arg1:String):void{ var _local2:Number = 0; while (_local2 < selection.length) { selection[_local2].blendShader = shaders[_arg1]; _local2++; }; } private function act47(_arg1:String, _arg2:Number):void{ shaderData[_arg1] = _arg2; } private function act48(_arg1:String, _arg2:String):void{ var _local3:Array = _arg2.split(/[ntr |,;]+/); var _local4:int; while (_local4 < _local3.length) { _local3[_local4] = new Number(_local3[_local4]); _local4++; }; shaderData[_arg1] = _local3; } private function act49(_arg1:String):void{ ApplyShaderParameters(shaders[_arg1]); } override public function expression(_arg1:int):CValue{ var _local2:CValue; var _local3:BitmapData; switch (_arg1){ case 0: _local3 = new BitmapData(1, 1, false); _local3.draw(rh.rhApp.mainSprite, new Matrix(1, 0, 0, 1, -(ho.getExpParam().getInt()), -(ho.getExpParam().getInt()))); return (new CValue(CServices.swapRGB(_local3.getPixel(0, 0)))); }; return (new CValue(0)); } private function act45(_arg1:String):void{ filterParams["shader"] = shaders[_arg1]; } private function act50(_arg1:Number):void{ var _local2:Number = 0; while (_local2 < selection.length) { selection[_local2].z = _arg1; _local2++; }; } private function act51(_arg1:Number, _arg2:Number, _arg3:Number):void{ var _local4:Number = 0; while (_local4 < selection.length) { selection[_local4].rotationX = _arg1; selection[_local4].rotationY = _arg2; selection[_local4].rotationZ = _arg3; _local4++; }; } private function act52(_arg1:Number):void{ var _local2:Number = 0; while (_local2 < selection.length) { selection[_local2].scaleZ = _arg1; _local2++; }; } private function act53(_arg1:Number, _arg2:Number, _arg3:Number):void{ } private function act54(_arg1:String):void{ var param0 = _arg1; ExternalInterface.addCallback(param0, function ():void{ externalCallback = param0; ho.generateEvent(2, 0); }); } private function act55(_arg1:CObject, _arg2:String):void{ var _local8:int; var _local3:CArrayList = new CArrayList(); getObjects(_arg1, _local3); selection.length = 0; var _local4:Object = _local3.get(0); var _local5:Boolean = _local4.hasOwnProperty("ext"); if (_local5){ _local4 = _local4.ext; }; var _local6:Array = _arg2.split(/([ ,])/); var _local7:int; while (_local7 < _local3.size()) { _local4 = _local3.get(_local7); if (_local5){ _local4 = _local4.ext; }; _local8 = 0; while (_local8 < _local6.length) { selection.push(_local4[_local6[_local8]]); _local8++; }; _local7++; }; } override public function getNumberOfConditions():int{ return (CND_LAST); } override public function destroyRunObject(_arg1:Boolean):void{ } private function AdjustColorTransform(_arg1:String, _arg2:Number):void{ var _local4:ColorTransform; var _local3:int; while (_local3 < selection.length) { _local4 = selection[_local3].transform.colorTransform; _local4[_arg1] = _arg2; selection[_local3].transform.colorTransform = _local4; _local3++; }; } private function act0(_arg1:String):void{ stage.scaleMode = _arg1; } private function act1(_arg1:String):void{ stage.displayState = _arg1; fChange = true; } private function act2(_arg1:String):void{ stage.align = _arg1; } private function act3(_arg1:String):void{ stage.addEventListener(_arg1, EventHandler); } private function act4(_arg1:String):void{ stage.removeEventListener(_arg1, EventHandler); } private function act5(_arg1:CObject):void{ var _local2:CArrayList = new CArrayList(); getObjects(_arg1, _local2); selection.length = 0; var _local3:Object = _local2.get(0); var _local4:Boolean = _local3.hasOwnProperty("ext"); if (_local4){ _local3 = _local3.ext; }; var _local5:String; var _local6:Array = ["_loader", "displayObject", "textField", "sprite", "bitmap", "video"]; var _local7:int; while (_local7 < _local6.length) { if (_local3.hasOwnProperty(_local6[_local7])){ _local5 = _local6[_local7]; break; }; _local7++; }; if (_local5 == null){ return; }; var _local8:int; while (_local8 < _local2.size()) { _local3 = _local2.get(_local8); if (_local4){ _local3 = _local3.ext; }; selection.push(_local3[_local5]); _local8++; }; } private function act8(_arg1:String):void{ var _local2:int; while (_local2 < selection.length) { selection[_local2].blendMode = _arg1; _local2++; }; } private function act9():void{ selection = [rh.rhApp.mainSprite]; } private function act6(_arg1:int):void{ var _local2:CLayer; if ((((_arg1 >= 0)) && ((_arg1 < rh.rhFrame.nLayers)))){ _local2 = rh.rhFrame.layers[_arg1]; selection = [_local2.planeBack, _local2.planeQuickDisplay, _local2.planeSprites]; }; } private function act7(_arg1:Number):void{ var _local2:int; while (_local2 < selection.length) { selection[_local2].rotation = _arg1; _local2++; }; } public function getObjects(_arg1:CObject, _arg2:CArrayList):void{ var _local4:int; var _local5:CObject; var _local6:int; var _local7:int; var _local8:CQualToOiList; var _local9:CQualToOiList; var _local10:int; var _local11:CObjInfo; var _local12:CObjInfo; if (!_arg1){ return; }; if (loopCountEvpReady == (ho.hoAdRunHeader.rhLoopCount + GetFV(_arg1))){ return; }; _arg2.clear(); var _local3:CRun = ho.hoAdRunHeader; if (_local3.rhEvtProg.rh2EventQualPos != null){ _local6 = _local3.rhEvtProg.rhEventGroup.evgIdentifier; _local7 = ((_local3.rhEvtProg.rhEventGroup.evgEvents[_local6] as CEvent).evtParams[0] as PARAM_OBJECT).oiList; _local8 = _local3.rhEvtProg.qualToOiList[(_local7 & 32767)]; _local9 = _local8; _local10 = 0; while (_local10 < _local9.qoiList.length()) { _local11 = _local3.rhOiList[(_local9.qoiList[(_local10 + 1)] as int)]; if (_local11.oilNObjects <= 0){ } else { if (_local11.oilEventCount == ho.hoAdRunHeader.rhEvtProg.rh2EventCount){ _local4 = _local11.oilListSelected; while (_local4 >= 0) { _local5 = _local3.rhObjectList[_local4]; if (!_local5){ break; }; _arg2.add(_local5); _local4 = _local5.hoNextSelected; }; } else { _local4 = _local11.oilObject; while (_local4 >= 0) { _local5 = _local3.rhObjectList[_local4]; if (!_local5){ break; }; _arg2.add(_local5); _local4 = _local5.hoNumNext; }; }; }; _local10 = (_local10 + 2); }; } else { _local12 = _arg1.hoOiList; _local4 = _local12.oilListSelected; while (_local4 >= 0) { _local5 = _local3.rhObjectList[_local4]; if (!_local5){ break; }; _arg2.add(_local5); if (_local4 == _local5.hoNextSelected){ break; }; _local4 = _local5.hoNextSelected; }; if ((_arg1.hoOiList.oilEventCount == ho.hoAdRunHeader.rhEvtProg.rh2EventCount)){ if (!_arg1){ return; }; loopCountEvpReady = (ho.hoAdRunHeader.rhLoopCount + GetFV(_arg1)); return; }; _arg2.clear(); _local4 = _arg1.hoOiList.oilObject; while (_local4 >= 0) { _local5 = _local3.rhObjectList[_local4]; if (!_local5){ break; }; _arg2.add(_local5); _local4 = _local5.hoNumNext; }; loopCountEvpReady = (ho.hoAdRunHeader.rhLoopCount + GetFV(_arg1)); }; } private function ApplyFilterParameters(_arg1:BitmapFilter):void{ var _local2:String; for (_local2 in filterParams) { _arg1[_local2] = filterParams[_local2]; }; } private function cnd0(_arg1:String):Boolean{ return ((_arg1 == calledEvent.type)); } private function cnd1(_arg1:String, _arg2:String):Boolean{ return ((_arg2 == calledEvent[_arg1].toString())); } private function cnd2(_arg1:String):Boolean{ return ((_arg1 == externalCallback)); } } }//package Extensions
Section 128
//CRunFlashURL (Extensions.CRunFlashURL) package Extensions { import flash.display.*; import flash.events.*; import flash.net.*; import Services.*; import Expressions.*; import RunLoop.*; import Sprites.*; import Actions.*; import Conditions.*; public class CRunFlashURL extends CRunExtension { public var urlString:String;// = "http://www.clickteam.com" public var mouseClicked:int;// = 0 private static var ACT2_REMOVELISTENER0:int = 2; private static var CND0_OBJ_ONCLICKHANDLER:int = 0; private static var ACT0_SETURL0:int = 0; private static var ACT1_ADDLISTENER0:int = 1; private static var CND_LAST:int = 1; override public function getRunObjectTextColor():int{ return (0); } override public function getRunObjectFont():CFontInfo{ return (null); } override public function getRunObjectCollisionMask(_arg1:int):CMask{ return (null); } override public function getNumberOfConditions():int{ return (CND_LAST); } private function act0_SetURL0(_arg1:String):void{ urlString = _arg1; } override public function handleRunObject():int{ return (REFLAG_ONESHOT); } private function cnd0_obj_OnClickHandler():Boolean{ if (mouseClicked == 1){ mouseClicked = 0; return (true); }; return (false); } override public function createRunObject(_arg1:CBinaryFile, _arg2:CCreateObjectInfo, _arg3:int):Boolean{ return (false); } override public function action(_arg1:int, _arg2:CActExtension):void{ switch (_arg1){ case ACT0_SETURL0: act0_SetURL0(_arg2.getParamExpString(rh, 0)); break; case ACT1_ADDLISTENER0: act1_AddListener0(); break; case ACT2_REMOVELISTENER0: act2_RemoveListener0(); break; }; } override public function expression(_arg1:int):CValue{ switch (_arg1){ }; return (new CValue(0)); } private function act2_RemoveListener0():void{ var _local1:Stage = ho.hoAdRunHeader.rhApp.mainSprite.stage; _local1.removeEventListener(MouseEvent.CLICK, onMouseClick); } public function onMouseClick(_arg1:Event):void{ var _local2:URLRequest = new URLRequest(urlString); navigateToURL(_local2, "_blank"); mouseClicked = 1; ho.pushEvent(CND0_OBJ_ONCLICKHANDLER, 0); } override public function condition(_arg1:int, _arg2:CCndExtension):Boolean{ switch (_arg1){ case CND0_OBJ_ONCLICKHANDLER: return (cnd0_obj_OnClickHandler()); }; return (false); } private function act1_AddListener0():void{ var _local1:Stage = ho.hoAdRunHeader.rhApp.mainSprite.stage; _local1.addEventListener(MouseEvent.CLICK, onMouseClick); } } }//package Extensions
Section 129
//CRunMochiAnalytics (Extensions.CRunMochiAnalytics) package Extensions { import Expressions.*; import Actions.*; import mochi.as3.*; public class CRunMochiAnalytics extends CRunExtension { override public function expression(_arg1:int):CValue{ return (new CValue(0)); } override public function action(_arg1:int, _arg2:CActExtension):void{ var _local3:String; switch (_arg1){ case 0: _local3 = _arg2.getParamExpString(rh, 0); if (!_local3.length){ _local3 = "gameplay"; }; MochiEvents.startPlay(_local3); return; case 1: MochiEvents.endPlay(); return; case 2: MochiEvents.trackEvent(_arg2.getParamExpString(rh, 0), _arg2.getParamExpression(rh, 1)); return; }; } override public function getNumberOfConditions():int{ return (0); } } }//package Extensions
Section 130
//CRunMochiConnector (Extensions.CRunMochiConnector) package Extensions { import flash.display.*; import Services.*; import RunLoop.*; import mochi.as3.*; public class CRunMochiConnector extends CRunExtension { private var clip:MovieClip; override public function createRunObject(_arg1:CBinaryFile, _arg2:CCreateObjectInfo, _arg3:int):Boolean{ if (!MochiServices.connected){ if (ho.getApplication().mochiStart.gameID){ clip = new MovieClip(); clip.visible = true; clip.x = ho.hoAdRunHeader.rhWindowX; clip.y = ho.hoAdRunHeader.rhWindowY; ho.hoAdRunHeader.rhApp.stage.addChild(clip); MochiServices.connect(ho.getApplication().mochiStart.gameID, clip); }; }; return (false); } } }//package Extensions
Section 131
//CRunMochiScores (Extensions.CRunMochiScores) package Extensions { import Actions.*; import Conditions.*; import mochi.as3.*; public class CRunMochiScores extends CRunExtension { public function DisplayHandler():void{ ho.pushEvent(1, 0); } public function CloseHandler():void{ ho.pushEvent(0, 0); } override public function condition(_arg1:int, _arg2:CCndExtension):Boolean{ switch (_arg1){ case 0: return (true); case 1: return (true); }; return (false); } override public function action(_arg1:int, _arg2:CActExtension):void{ switch (_arg1){ case 0: MochiScores.setBoardID(_arg2.getParamExpString(rh, 0)); break; case 1: MochiScores.showLeaderboard({onClose:CloseHandler, onDisplay:DisplayHandler}); break; case 2: MochiScores.showLeaderboard({score:_arg2.getParamExpression(rh, 0), onClose:CloseHandler, onDisplay:DisplayHandler}); break; case 3: MochiScores.showLeaderboard({score:_arg2.getParamExpression(rh, 0), name:_arg2.getParamExpString(rh, 1), onClose:CloseHandler, onDisplay:DisplayHandler}); break; }; } override public function getNumberOfConditions():int{ return (2); } } }//package Extensions
Section 132
//CRunPlatform (Extensions.CRunPlatform) package Extensions { import Services.*; import Expressions.*; import RunLoop.*; import Objects.*; import Actions.*; import Conditions.*; public class CRunPlatform extends CRunExtension { public var Col:CRunPlatformCOL; public var ObjShortCut:int; public var PFMove:CRunPlatformMove; public var ObjFixed:int; public static var CID_IsFalling:int = 4; public static var AID_SetStepUp:int = 15; public static var EID_GetXDecel:int = 5; public static var EID_GetJumpHoldHeight:int = 8; public static var AID_Jump:int = 5; public static var EID_GetAddXVelocity:int = 11; public static var AID_SetJumpHoldHeight:int = 14; public static var AID_SetXVelocity:int = 6; public static var AID_SetXDecel:int = 11; public static var CID_IsPaused:int = 5; public static var AID_UnPause:int = 18; public static var AID_SetAddYVelocity:int = 21; public static var EID_GetYVelocity:int = 1; public static var EID_GetXVelocity:int = 0; public static var CID_JumpThroughTest:int = 1; public static var AID_SetAddXVelocity:int = 20; public static var AID_SetYVelocity:int = 7; public static var AID_SetMaxXVelocity:int = 8; public static var AID_SetMaxYVelocity:int = 9; public static var AID_SetGravity:int = 12; public static var EID_GetMaxYVelocity:int = 3; public static var CID_IsMoving:int = 6; public static var AID_ColJumpThrough:int = 1; public static var AID_SetObject:int = 2; public static var EID_GetMaxXVelocity:int = 2; public static var EID_GetGravity:int = 6; public static var EID_GetXAccel:int = 4; public static var AID_MoveRight:int = 3; public static var AID_SetSlopeCorrection:int = 19; public static var EID_GetJumpStrength:int = 7; public static var AID_SetJumpStrength:int = 13; public static var AID_SetXAccel:int = 10; public static var AID_MoveLeft:int = 4; public static var EID_GetSlopeCorrection:int = 10; public static var CID_ObstacleTest:int = 0; public static var AID_ColObstacle:int = 0; public static var EID_GetAddYVelocity:int = 12; public static var AID_JumpHold:int = 16; public static var CID_IsOnGround:int = 2; public static var AID_Pause:int = 17; public static var CID_IsJumping:int = 3; public static var EID_GetStepUp:int = 9; override public function handleRunObject():int{ var _local2:int; var _local3:int; var _local4:int; var _local5:Boolean; var _local6:int; var _local1:CObject = GetCObject(ObjFixed); if (((!(this.PFMove.Paused)) && (!((_local1 == null))))){ if (((PFMove.RightKey) && (!(PFMove.LeftKey)))){ PFMove.XVelocity = (PFMove.XVelocity + PFMove.XAccel); }; if (((PFMove.LeftKey) && (!(PFMove.RightKey)))){ PFMove.XVelocity = (PFMove.XVelocity - PFMove.XAccel); }; if (((!((PFMove.XVelocity == 0))) && (((((!(PFMove.LeftKey)) && (!(PFMove.RightKey)))) || (((PFMove.LeftKey) && (PFMove.RightKey))))))){ PFMove.XVelocity = (PFMove.XVelocity - ((PFMove.XVelocity / Math.abs(PFMove.XVelocity)) * PFMove.XDecel)); if ((((PFMove.XVelocity <= PFMove.XDecel)) && ((PFMove.XVelocity >= (0 - PFMove.XDecel))))){ PFMove.XVelocity = 0; }; }; PFMove.XVelocity = Math.min(Math.max(PFMove.XVelocity, (0 - PFMove.MaxXVelocity)), PFMove.MaxXVelocity); PFMove.YVelocity = Math.min(Math.max((PFMove.YVelocity + PFMove.Gravity), (0 - PFMove.MaxYVelocity)), PFMove.MaxYVelocity); _local2 = (PFMove.XVelocity + PFMove.AddXVelocity); _local3 = (PFMove.YVelocity + PFMove.AddYVelocity); PFMove.XMoveCount = (PFMove.XMoveCount + Math.abs(_local2)); PFMove.YMoveCount = (PFMove.YMoveCount + Math.abs(_local3)); while (PFMove.XMoveCount > 100) { if (!IsOverObstacle()){ _local1.hoX = (_local1.hoX + (_local2 / Math.abs(_local2))); }; if (IsOverObstacle()){ _local4 = 0; while (_local4 < PFMove.StepUp) { _local1.hoY--; if (!IsOverObstacle()){ break; }; _local4++; }; if (IsOverObstacle()){ _local1.hoY = (_local1.hoY + PFMove.StepUp); _local1.hoX = (_local1.hoX - (_local2 / Math.abs(_local2))); PFMove.XVelocity = (PFMove.XMoveCount = 0); }; }; PFMove.XMoveCount = (PFMove.XMoveCount - 100); _local1.roc.rcChanged = true; }; while (PFMove.YMoveCount > 100) { if (!IsOverObstacle()){ _local1.hoY = (_local1.hoY + (_local3 / Math.abs(_local3))); PFMove.OnGround = false; }; if (IsOverObstacle()){ _local1.hoY = (_local1.hoY - (_local3 / Math.abs(_local3))); if (_local3 > 0){ PFMove.OnGround = true; }; PFMove.YVelocity = (PFMove.YMoveCount = 0); }; if (((IsOverJumpThrough()) && ((_local3 > 0)))){ if (Col.JumpThroughColTop){ _local1.hoY--; if (!IsOverJumpThrough()){ _local1.hoY = (_local1.hoY - (_local3 / Math.abs(_local3))); PFMove.YVelocity = (PFMove.YMoveCount = 0); PFMove.OnGround = true; }; _local1.hoY++; } else { _local1.hoY = (_local1.hoY - (_local3 / Math.abs(_local3))); PFMove.YVelocity = (PFMove.YMoveCount = 0); PFMove.OnGround = true; }; }; PFMove.YMoveCount = (PFMove.YMoveCount - 100); _local1.roc.rcChanged = true; }; if ((((PFMove.SlopeCorrection > 0)) && ((_local3 >= 0)))){ _local5 = false; _local6 = 0; while (_local6 < PFMove.SlopeCorrection) { _local1.hoY++; if (IsOverObstacle()){ _local1.hoY--; PFMove.OnGround = true; _local5 = true; break; }; _local6++; }; if (_local5 == false){ _local1.hoY = (_local1.hoY - PFMove.SlopeCorrection); }; }; }; PFMove.RightKey = false; PFMove.LeftKey = false; return (0); } override public function action(_arg1:int, _arg2:CActExtension):void{ switch (_arg1){ case AID_ColObstacle: Col.Obstacle = true; break; case AID_ColJumpThrough: Col.JumpThrough = true; break; case AID_SetObject: SetObject(_arg2.getParamObject(rh, 0)); break; case AID_MoveRight: PFMove.RightKey = true; break; case AID_MoveLeft: PFMove.LeftKey = true; break; case AID_Jump: PFMove.YVelocity = (0 - PFMove.JumpStrength); break; case AID_SetXVelocity: PFMove.XVelocity = _arg2.getParamExpression(rh, 0); break; case AID_SetYVelocity: PFMove.YVelocity = _arg2.getParamExpression(rh, 0); break; case AID_SetMaxXVelocity: PFMove.MaxXVelocity = _arg2.getParamExpression(rh, 0); break; case AID_SetMaxYVelocity: PFMove.MaxYVelocity = _arg2.getParamExpression(rh, 0); break; case AID_SetXAccel: PFMove.XAccel = _arg2.getParamExpression(rh, 0); break; case AID_SetXDecel: PFMove.XDecel = _arg2.getParamExpression(rh, 0); break; case AID_SetGravity: PFMove.Gravity = _arg2.getParamExpression(rh, 0); break; case AID_SetJumpStrength: PFMove.JumpStrength = _arg2.getParamExpression(rh, 0); break; case AID_SetJumpHoldHeight: PFMove.JumpHoldHeight = _arg2.getParamExpression(rh, 0); break; case AID_SetStepUp: PFMove.StepUp = _arg2.getParamExpression(rh, 0); break; case AID_JumpHold: PFMove.YVelocity = (PFMove.YVelocity - PFMove.JumpHoldHeight); break; case AID_Pause: PFMove.Paused = true; break; case AID_UnPause: PFMove.Paused = false; break; case AID_SetSlopeCorrection: PFMove.SlopeCorrection = _arg2.getParamExpression(rh, 0); break; case AID_SetAddXVelocity: PFMove.AddXVelocity = _arg2.getParamExpression(rh, 0); break; case AID_SetAddYVelocity: PFMove.AddYVelocity = _arg2.getParamExpression(rh, 0); break; }; } public function fixString(_arg1:String):String{ var _local2:int; _local2 = 0; while (_local2 < _arg1.length) { if (_arg1.charCodeAt(_local2) < 10){ return (_arg1.substring(0, _local2)); }; _local2++; }; return (_arg1); } public function SetObject(_arg1:CObject):void{ if (_arg1 != null){ ObjFixed = ((_arg1.hoCreationId << 16) + _arg1.hoNumber); } else { ObjFixed = 0; }; } public function GetCObject(_arg1:int):CObject{ var _local2:CObject; _local2 = ho.getFirstObject(); while (_local2 != null) { if (((_local2.hoCreationId << 16) + _local2.hoNumber) == _arg1){ return (_local2); }; _local2 = ho.getNextObject(); }; return (null); } public function IsOverObstacle():Boolean{ Col.Obstacle = false; ho.generateEvent(CID_ObstacleTest, ho.getEventParam()); return (Col.Obstacle); } override public function createRunObject(_arg1:CBinaryFile, _arg2:CCreateObjectInfo, _arg3:int):Boolean{ _arg1.setUnicode(false); _arg1.skipBytes(8); PFMove = new CRunPlatformMove(); PFMove.MaxXVelocity = int(Number(fixString(_arg1.readStringSize(16)))); PFMove.MaxYVelocity = int(Number(fixString(_arg1.readStringSize(16)))); PFMove.XAccel = int(Number(fixString(_arg1.readStringSize(16)))); PFMove.XDecel = int(Number(fixString(_arg1.readStringSize(16)))); PFMove.Gravity = int(Number(fixString(_arg1.readStringSize(16)))); PFMove.JumpStrength = int(Number(fixString(_arg1.readStringSize(16)))); PFMove.JumpHoldHeight = int(Number(fixString(_arg1.readStringSize(16)))); PFMove.StepUp = int(Number(fixString(_arg1.readStringSize(16)))); PFMove.SlopeCorrection = int(Number(fixString(_arg1.readStringSize(16)))); Col = new CRunPlatformCOL(); Col.JumpThroughColTop = ((_arg1.readByte() == 1)) ? true : false; Col.EnableJumpThrough = ((_arg1.readByte() == 1)) ? true : false; return (true); } override public function getNumberOfConditions():int{ return (7); } override public function expression(_arg1:int):CValue{ switch (_arg1){ case EID_GetXVelocity: return (new CValue(PFMove.XVelocity)); case EID_GetYVelocity: return (new CValue(PFMove.YVelocity)); case EID_GetMaxXVelocity: return (new CValue(PFMove.MaxXVelocity)); case EID_GetMaxYVelocity: return (new CValue(PFMove.MaxYVelocity)); case EID_GetXAccel: return (new CValue(PFMove.XAccel)); case EID_GetXDecel: return (new CValue(PFMove.XDecel)); case EID_GetGravity: return (new CValue(PFMove.Gravity)); case EID_GetJumpStrength: return (new CValue(PFMove.JumpStrength)); case EID_GetJumpHoldHeight: return (new CValue(PFMove.JumpHoldHeight)); case EID_GetStepUp: return (new CValue(PFMove.StepUp)); case EID_GetSlopeCorrection: return (new CValue(PFMove.SlopeCorrection)); case EID_GetAddXVelocity: return (new CValue(PFMove.AddXVelocity)); case EID_GetAddYVelocity: return (new CValue(PFMove.AddYVelocity)); }; return (new CValue(0)); } public function IsOverJumpThrough():Boolean{ if (!Col.EnableJumpThrough){ return (false); }; Col.JumpThrough = false; ho.generateEvent(CID_JumpThroughTest, ho.getEventParam()); return (Col.JumpThrough); } override public function condition(_arg1:int, _arg2:CCndExtension):Boolean{ switch (_arg1){ case CID_ObstacleTest: return (true); case CID_JumpThroughTest: return (true); case CID_IsOnGround: return (PFMove.OnGround); case CID_IsJumping: return (((!(PFMove.OnGround)) && ((PFMove.YVelocity <= 0)))); case CID_IsFalling: return (((!(PFMove.OnGround)) && ((PFMove.YVelocity > 0)))); case CID_IsPaused: return (PFMove.Paused); case CID_IsMoving: return ((Math.abs(PFMove.XVelocity) > 0)); }; return (false); } } }//package Extensions
Section 133
//CRunPlatformCOL (Extensions.CRunPlatformCOL) package Extensions { public class CRunPlatformCOL { public var EnableJumpThrough:Boolean; public var JumpThrough:Boolean; public var JumpThroughColTop:Boolean; public var Obstacle:Boolean; } }//package Extensions
Section 134
//CRunPlatformMove (Extensions.CRunPlatformMove) package Extensions { public class CRunPlatformMove { public var RightKey:Boolean; public var XMoveCount:int; public var SlopeCorrection:int; public var MaxXVelocity:int; public var MaxYVelocity:int; public var XVelocity:int; public var YVelocity:int; public var Paused:Boolean; public var YMoveCount:int; public var OnGround:Boolean; public var StepUp:int; public var Gravity:int; public var JumpStrength:int; public var XAccel:int; public var XDecel:int; public var AddXVelocity:int; public var AddYVelocity:int; public var LeftKey:Boolean; public var JumpHoldHeight:int; } }//package Extensions
Section 135
//CBackInstance (Frame.CBackInstance) package Frame { import flash.display.*; import flash.geom.*; import Application.*; import Banks.*; import OI.*; import Sprites.*; public class CBackInstance { public var poi:COI; public var width:int; public var shapeInstance:Shape; public var alpha:Number;// = 1 public var app:CRunApp; public var levelObject:CLO; public var bitmapInstance:Bitmap; public var height:int; public var displayObject:DisplayObject; public var obstacleType:int; public var colBox:Boolean; public var x:int; public var y:int; public var type:int; public var imageUsed:CImage; public function CBackInstance(_arg1:CRunApp, _arg2:int, _arg3:int, _arg4:CLO, _arg5:CImage, _arg6:int){ var _local7:CImage; var _local8:COCQBackdrop; var _local9:int; var _local10:Number; var _local11:int; var _local12:Array; var _local13:Array; var _local14:Array; var _local15:Matrix; var _local16:int; var _local17:int; var _local18:COCBackground; var _local19:Number; super(); app = _arg1; levelObject = _arg4; x = _arg2; y = _arg3; if (_arg4 != null){ poi = app.OIList.getOIFromHandle(_arg4.loOiHandle); type = poi.oiType; obstacleType = poi.oiOC.ocObstacleType; if (type == COI.OBJ_BOX){ shapeInstance = new Shape(); displayObject = shapeInstance; shapeInstance.x = _arg2; shapeInstance.y = _arg3; _local8 = COCQBackdrop(poi.oiOC); _local9 = _local8.ocBorderSize; width = _local8.ocCx; height = _local8.ocCy; colBox = !((_local8.ocColMode == 0)); _local10 = 1; if ((poi.oiInkEffect & 0xFFFF) == 1){ _local10 = (Number((128 - poi.oiInkEffectParam)) / 128); }; switch (_local8.ocFillType){ case 0: if (_local9 == 0){ _local9 = 1; }; break; case 1: shapeInstance.graphics.beginFill(_local8.ocColor1, _local10); break; case 2: _local12 = [_local8.ocColor1, _local8.ocColor2]; _local13 = [_local10, _local10]; _local14 = [0, 0xFF]; _local15 = new Matrix(); if (_local8.ocGradientFlags == 0){ _local15.createGradientBox(_local8.ocCx, _local8.ocCy, 0, 0, 0); } else { _local15.createGradientBox(_local8.ocCx, _local8.ocCy, (Math.PI / 2), 0, 0); }; shapeInstance.graphics.beginGradientFill(GradientType.LINEAR, _local12, _local13, _local14, _local15, SpreadMethod.PAD); break; case 3: _local7 = app.imageBank.getImageFromHandle(_local8.ocImage); shapeInstance.graphics.beginBitmapFill(_local7.img, null, true); break; }; switch (_local8.ocShape){ case 1: _arg2 = 0; _arg3 = 0; _local16 = _local8.ocCx; _local17 = _local8.ocCy; if ((_local8.ocLineFlags & COCQBackdrop.LINEF_INVX) != 0){ _arg2 = (_arg2 + _local16); _local16 = -(_local16); }; if ((_local8.ocLineFlags & COCQBackdrop.LINEF_INVY) != 0){ _arg3 = (_arg3 + _local17); _local17 = -(_local17); }; shapeInstance.graphics.lineStyle(_local9, _local8.ocBorderColor, _local10); shapeInstance.graphics.moveTo(_arg2, _arg3); shapeInstance.graphics.lineTo((_arg2 + _local16), (_arg3 + _local17)); break; case 2: shapeInstance.graphics.drawRect(0, 0, _local8.ocCx, _local8.ocCy); shapeInstance.graphics.endFill(); break; case 3: shapeInstance.graphics.drawEllipse(0, 0, _local8.ocCx, _local8.ocCy); shapeInstance.graphics.endFill(); break; }; if (_local9 > 0){ shapeInstance.graphics.lineStyle(1, _local8.ocBorderColor, _local10); switch (_local8.ocShape){ case 2: _local11 = 0; while (_local11 < _local9) { shapeInstance.graphics.drawRect((0 + _local11), (0 + _local11), ((_local8.ocCx - (_local11 * 2)) - 1), ((_local8.ocCy - (_local11 * 2)) - 1)); _local11++; }; break; case 3: _local11 = 0; while (_local11 < _local9) { shapeInstance.graphics.drawEllipse((0 + _local11), (0 + _local11), ((_local8.ocCx - (_local11 * 2)) - 1), ((_local8.ocCy - (_local11 * 2)) - 1)); _local11++; }; break; }; }; } else { bitmapInstance = new Bitmap(); displayObject = bitmapInstance; bitmapInstance.x = _arg2; bitmapInstance.y = _arg3; _local18 = COCBackground(poi.oiOC); imageUsed = app.imageBank.getImageFromHandle(_local18.ocImage); bitmapInstance.bitmapData = imageUsed.img; width = imageUsed.width; height = imageUsed.height; colBox = !((_local18.ocColMode == 0)); if ((poi.oiInkEffect & 0xFFFF) == 1){ _local19 = (Number((128 - poi.oiInkEffectParam)) / 128); bitmapInstance.alpha = _local19; }; }; setEffect(poi.oiInkEffect, poi.oiInkEffectParam); } else { type = COI.OBJ_PASTED; imageUsed = _arg5; bitmapInstance = new Bitmap(); displayObject = bitmapInstance; bitmapInstance.x = (_arg2 - imageUsed.xSpot); bitmapInstance.y = (_arg3 - imageUsed.ySpot); bitmapInstance.bitmapData = imageUsed.img; width = imageUsed.width; height = imageUsed.height; x = (x - imageUsed.xSpot); y = (y - imageUsed.ySpot); switch (_arg6){ case 0: obstacleType = COC.OBSTACLE_NONE; break; case 1: obstacleType = COC.OBSTACLE_SOLID; break; case 2: obstacleType = COC.OBSTACLE_PLATFORM; break; case 3: obstacleType = COC.OBSTACLE_LADDER; break; }; colBox = false; }; } public function delInstance(_arg1:CLayer):void{ switch (type){ case COI.OBJ_BOX: _arg1.planeBack.removeChild(shapeInstance); break; case COI.OBJ_BKD: case COI.OBJ_PASTED: _arg1.planeBack.removeChild(bitmapInstance); break; }; switch (obstacleType){ case COC.OBSTACLE_SOLID: _arg1.delObstacle(this); _arg1.delPlatform(this); break; case COC.OBSTACLE_PLATFORM: _arg1.delPlatform(this); break; case COC.OBSTACLE_LADDER: _arg1.ladderSub(x, y, (x + width), (y + height)); break; }; } public function setEffect(_arg1:int, _arg2:int):void{ var _local3 = (_arg1 & CRSpr.BOP_MASK); alpha = 1; var _local4 = 0xFF; var _local5 = 0xFF; var _local6 = 0xFF; if ((_arg1 & CRSpr.BOP_RGBAFILTER) != 0){ _local4 = (((_arg2 & 0xFFFFFF) >> 16) & 0xFF); _local5 = (((_arg2 & 0xFFFFFF) >> 8) & 0xFF); _local6 = ((_arg2 & 0xFFFFFF) & 0xFF); alpha = (((_arg2 >> 24) & 0xFF) / 0xFF); } else { if (_local3 == CRSpr.BOP_BLEND){ alpha = ((128 - _arg2) / 128); }; }; switch (_local3){ case CRSpr.BOP_ADD: displayObject.blendMode = "add"; displayObject.transform.colorTransform = new ColorTransform((_local4 / 0xFF), (_local5 / 0xFF), (_local6 / 0xFF), 1, 0, 0, 0, 0); break; case CRSpr.BOP_SUB: displayObject.blendMode = "subtract"; displayObject.transform.colorTransform = new ColorTransform((_local4 / 0xFF), (_local5 / 0xFF), (_local6 / 0xFF), 1, 0, 0, 0, 0); break; case CRSpr.BOP_INVERT: displayObject.blendMode = "normal"; displayObject.transform.colorTransform = new ColorTransform((-(_local4) / 0xFF), (-(_local5) / 0xFF), (-(_local6) / 0xFF), 1, 0xFF, 0xFF, 0xFF, 0); break; default: displayObject.blendMode = "normal"; displayObject.transform.colorTransform = new ColorTransform((_local4 / 0xFF), (_local5 / 0xFF), (_local6 / 0xFF), 1, 0, 0, 0, 0); break; }; setTransparency(alpha); } public function setTransparency(_arg1:Number):void{ displayObject.alpha = (_arg1 * alpha); } public function addInstance(_arg1:int, _arg2:CLayer):void{ switch (type){ case COI.OBJ_BOX: _arg2.planeBack.addChild(shapeInstance); break; case COI.OBJ_BKD: _arg2.planeBack.addChild(bitmapInstance); break; case COI.OBJ_PASTED: _arg2.planeBack.addChild(bitmapInstance); _arg2.addBackdrop(this); break; }; switch (obstacleType){ case COC.OBSTACLE_SOLID: _arg2.addObstacle(this); _arg2.addPlatform(this); break; case COC.OBSTACLE_PLATFORM: _arg2.addPlatform(this); break; case COC.OBSTACLE_LADDER: _arg2.addLadder(x, y, (x + width), (y + height)); break; }; } public function testMask(_arg1:CMask, _arg2:int, _arg3:int, _arg4:int):Boolean{ var _local5:int; var _local6:CMask; var _local7:int; switch (type){ case 0: _local7 = height; if (obstacleType == COC.OBSTACLE_PLATFORM){ _local7 = CRunFrame.HEIGHT_PLATFORM; }; return (_arg1.testRect(_arg2, _arg3, _arg4, x, y, width, _local7, 0)); case 1: if (colBox != 0){ return (true); }; _local5 = CMask.GCMF_OBSTACLE; if (obstacleType == COC.OBSTACLE_PLATFORM){ _local5 = CMask.GCMF_PLATFORM; }; _local6 = imageUsed.getMask(_local5, 0, 1, 1); return (_arg1.testMask(_arg2, _arg3, _arg4, _local6, x, y, 0)); case 11: if (colBox != 0){ return (true); }; _local5 = CMask.GCMF_OBSTACLE; if (obstacleType == COC.OBSTACLE_PLATFORM){ _local5 = CMask.GCMF_PLATFORM; }; _local6 = imageUsed.getMask(_local5, 0, 1, 1); return (_arg1.testMask(_arg2, _arg3, _arg4, _local6, x, y, 0)); }; return (false); } public function testRect(_arg1:int, _arg2:int, _arg3:int, _arg4:int):Boolean{ var _local5:int; var _local6:CMask; var _local7:int; var _local8:int; switch (type){ case 0: if (obstacleType == COC.OBSTACLE_PLATFORM){ _local7 = y; _local8 = (y + Math.min(height, CRunFrame.HEIGHT_PLATFORM)); if ((((_local7 < _arg4)) && ((_local8 > _arg2)))){ return (true); }; return (false); }; return (true); case 1: if (colBox != 0){ return (true); }; _local5 = CMask.GCMF_OBSTACLE; if (obstacleType == COC.OBSTACLE_PLATFORM){ _local5 = CMask.GCMF_PLATFORM; }; _local6 = imageUsed.getMask(_local5, 0, 1, 1); return (_local6.testRect(x, y, 0, _arg1, _arg2, _arg3, _arg4, 0)); case 11: if (colBox != 0){ return (true); }; _local5 = CMask.GCMF_OBSTACLE; if (obstacleType == COC.OBSTACLE_PLATFORM){ _local5 = CMask.GCMF_PLATFORM; }; _local6 = imageUsed.getMask(_local5, 0, 1, 1); return (_local6.testRect(x, y, 0, _arg1, _arg2, _arg3, _arg4, 0)); }; return (false); } public function testPoint(_arg1:int, _arg2:int):Boolean{ var _local3:int; var _local4:CMask; var _local5:int; var _local6:int; switch (type){ case 0: if (obstacleType == COC.OBSTACLE_PLATFORM){ _local5 = ((y + height) - CRunFrame.HEIGHT_PLATFORM); _local6 = (y + height); if ((((_arg2 >= _local5)) && ((_arg2 < _local6)))){ return (true); }; return (false); }; return (true); case 1: if (colBox != 0){ return (true); }; _local3 = CMask.GCMF_OBSTACLE; if (obstacleType == COC.OBSTACLE_PLATFORM){ _local3 = CMask.GCMF_PLATFORM; }; _local4 = imageUsed.getMask(_local3, 0, 1, 1); return (_local4.testPoint(x, y, _arg1, _arg2)); case 11: if (colBox != 0){ return (true); }; _local3 = CMask.GCMF_OBSTACLE; if (obstacleType == COC.OBSTACLE_PLATFORM){ _local3 = CMask.GCMF_PLATFORM; }; _local4 = imageUsed.getMask(_local3, 0, 1, 1); return (_local4.testPoint(x, y, _arg1, _arg2)); }; return (false); } } }//package Frame
Section 136
//CLayer (Frame.CLayer) package Frame { import flash.display.*; import flash.geom.*; import Application.*; import Services.*; import Sprites.*; public class CLayer { public const FLOPT_REDRAW:int = 65536; public const FLOPT_TOSHOW:int = 262144; public const FLOPT_NOSAVEBKD:int = 4; public var pLadders:CArrayList; public var backUp_xCoef:Number; public var nZOrderMax:int; public var dwOptions:int; public var effect:int; public var dx:int; public var dy:int; public var backUp_yCoef:Number; public var pName:String; public var app:CRunApp; public var xCoef:Number; public var yCoef:Number; public var planeQuickDisplay:Sprite; public var bVisible:Boolean; public var pObstacles:CArrayList; public var addedBackdrops:CArrayList; public var nBkdLOs:int; public var pPlatforms:CArrayList; public var backUp_nFirstLOIndex:int; public var planeSprites:Sprite; public var planeBack:Sprite; public var backUp_nBkdLOs:int; public var nFirstLOIndex:int; public var backUp_dwOptions:int; public var x:int; public var y:int; public var effectParam:int; public static var FLOPT_VISIBLE:int = 16; public static var FLOPT_TOHIDE:int = 131072; public static var FLOPT_WRAP_HORZ:int = 32; public static var FLOPT_XCOEF:int = 1; public static var FLOPT_YCOEF:int = 2; public static var FLOPT_WRAP_VERT:int = 64; public function CLayer(_arg1:CRunApp){ app = _arg1; } public function resetLevelBackground():void{ pPlatforms = null; pObstacles = null; pLadders = null; addedBackdrops = null; while (planeBack.numChildren > 0) { planeBack.removeChildAt(0); }; } public function fillBack(_arg1:int, _arg2:int, _arg3:int):void{ planeBack.graphics.clear(); planeBack.graphics.beginFill(_arg3); planeBack.graphics.drawRect(0, 0, _arg1, _arg2); planeBack.graphics.endFill(); } public function getLadderAt(_arg1:int, _arg2:int):CRect{ var _local3:int; var _local4:int; var _local5:int; var _local6:CRect; _arg1 = (_arg1 + x); _arg2 = (_arg2 + y); if (pLadders != null){ _local5 = 0; while (_local5 < pLadders.size()) { _local6 = CRect(pLadders.get(_local5)); if (_arg1 >= _local6.left){ if (_arg2 >= _local6.top){ if (_arg1 < _local6.right){ if (_arg2 < _local6.bottom){ return (_local6); }; }; }; }; _local5++; }; }; return (null); } public function setEffect(_arg1:int, _arg2:int):void{ var _local3 = (effect & CRSpr.BOP_MASK); var _local4:Number = 1; var _local5 = 0xFF; var _local6 = 0xFF; var _local7 = 0xFF; if ((effect & CRSpr.BOP_RGBAFILTER) != 0){ _local5 = (((effectParam & 0xFFFFFF) >> 16) & 0xFF); _local6 = (((effectParam & 0xFFFFFF) >> 8) & 0xFF); _local7 = ((effectParam & 0xFFFFFF) & 0xFF); _local4 = (((effectParam >> 24) & 0xFF) / 0xFF); } else { if (_local3 == CRSpr.BOP_BLEND){ _local4 = ((128 - effectParam) / 128); }; }; switch (_local3){ case CRSpr.BOP_ADD: setBlendMode("add"); setTransform(new ColorTransform((_local5 / 0xFF), (_local6 / 0xFF), (_local7 / 0xFF), 1, 0, 0, 0, 0)); break; case CRSpr.BOP_SUB: setBlendMode("subtract"); setTransform(new ColorTransform((_local5 / 0xFF), (_local6 / 0xFF), (_local7 / 0xFF), 1, 0, 0, 0, 0)); break; case CRSpr.BOP_INVERT: setBlendMode("normal"); setTransform(new ColorTransform((-(_local5) / 0xFF), (-(_local6) / 0xFF), (-(_local7) / 0xFF), 1, 0xFF, 0xFF, 0xFF, 0)); break; default: setBlendMode("normal"); setTransform(new ColorTransform((_local5 / 0xFF), (_local6 / 0xFF), (_local7 / 0xFF), 1, 0, 0, 0, 0)); break; }; setAlpha(_local4); } public function addBackdrop(_arg1:CBackInstance):void{ if (addedBackdrops == null){ addedBackdrops = new CArrayList(); }; addedBackdrops.add(_arg1); } public function deleteBackObjects():void{ while (planeBack.numChildren > 0) { planeBack.removeChildAt(0); }; } public function setAlpha(_arg1:Number):void{ planeBack.alpha = _arg1; planeQuickDisplay.alpha = _arg1; planeSprites.alpha = _arg1; } public function testRect(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int):CBackInstance{ var _local7:CArrayList; var _local8:int; var _local9:CBackInstance; if (_arg6 == CColMask.CM_TEST_OBSTACLE){ _local7 = pObstacles; } else { _local7 = pPlatforms; }; if (_local7 == null){ return (null); }; _arg1 = (_arg1 + x); _arg2 = (_arg2 + y); _arg3 = (_arg3 + x); _arg4 = (_arg4 + y); if (_arg5 != 0){ _arg2 = (_arg4 - _arg5); }; _local8 = 0; while (_local8 < _local7.size()) { _local9 = CBackInstance(_local7.get(_local8)); if ((((_local9.x < _arg3)) && (((_local9.x + _local9.width) > _arg1)))){ if ((((_local9.y < _arg4)) && (((_local9.y + _local9.height) > _arg2)))){ if (_local9.testRect(_arg1, _arg2, _arg3, _arg4)){ return (_local9); }; }; }; _local8++; }; return (null); } public function delPlatform(_arg1:CBackInstance):void{ if (pPlatforms != null){ pPlatforms.removeObject(_arg1); }; } public function addLadder(_arg1:int, _arg2:int, _arg3:int, _arg4:int):void{ var _local5:CRect = new CRect(); _local5.left = _arg1; _local5.top = _arg2; _local5.right = _arg3; _local5.bottom = _arg4; if (pLadders == null){ pLadders = new CArrayList(); }; pLadders.add(_local5); } public function testMask(_arg1:CMask, _arg2:int, _arg3:int, _arg4:int, _arg5:int):CBackInstance{ var _local11:int; var _local12:CBackInstance; var _local13:CArrayList; var _local6:int = ((_arg2 + x) - _arg1.xSpot); var _local7:int = ((_arg3 + y) - _arg1.ySpot); var _local8:int = (_local6 + _arg1.width); var _local9:int = (_local7 + _arg1.height); var _local10:int = _local7; if (_arg4 != 0){ _local10 = (_local9 - _arg4); }; if (_arg5 == CColMask.CM_TEST_OBSTACLE){ _local13 = pObstacles; } else { _local13 = pPlatforms; }; if (_local13 == null){ return (null); }; _local11 = 0; while (_local11 < _local13.size()) { _local12 = CBackInstance(_local13.get(_local11)); if ((((_local12.x < _local8)) && (((_local12.x + _local12.width) >= _local6)))){ if ((((_local12.y < _local9)) && (((_local12.y + _local12.height) >= _local10)))){ if (_local12.testMask(_arg1, _local6, _local7, _arg4)){ return (_local12); }; }; }; _local11++; }; return (null); } public function setHandCursor(_arg1:Boolean):void{ planeBack.buttonMode = _arg1; planeBack.useHandCursor = _arg1; } public function setTransform(_arg1:ColorTransform):void{ planeBack.transform.colorTransform = _arg1; planeQuickDisplay.transform.colorTransform = _arg1; planeSprites.transform.colorTransform = _arg1; } public function delObstacle(_arg1:CBackInstance):void{ if (pObstacles != null){ pObstacles.removeObject(_arg1); }; } public function addPlatform(_arg1:CBackInstance):void{ if (pPlatforms == null){ pPlatforms = new CArrayList(); }; pPlatforms.add(_arg1); } public function ladderSub(_arg1:int, _arg2:int, _arg3:int, _arg4:int):void{ var _local5:CRect; var _local6:int; var _local7:CRect; if (pLadders != null){ _local5 = new CRect(); _local5.left = Math.min(_arg1, _arg3); _local5.top = Math.min(_arg2, _arg4); _local5.right = Math.max(_arg1, _arg3); _local5.bottom = Math.max(_arg2, _arg4); _local6 = 0; while (_local6 < pLadders.size()) { _local7 = CRect(pLadders.get(_local6)); if (_local7.intersectRect(_local5) == true){ pLadders.removeIndex(_local6); _local6--; }; _local6++; }; }; } public function testPoint(_arg1:int, _arg2:int, _arg3:int):CBackInstance{ var _local4:CArrayList; var _local5:int; var _local6:CBackInstance; if (_arg3 == CColMask.CM_TEST_OBSTACLE){ _local4 = pObstacles; } else { _local4 = pPlatforms; }; if (_local4 == null){ return (null); }; _arg1 = (_arg1 + x); _arg2 = (_arg2 + y); _local5 = 0; while (_local5 < _local4.size()) { _local6 = CBackInstance(_local4.get(_local5)); if ((((_arg1 >= _local6.x)) && ((_arg1 < (_local6.x + _local6.width))))){ if ((((_arg2 >= _local6.y)) && ((_arg2 < (_local6.y + _local6.height))))){ if (_local6.testPoint(_arg1, _arg2)){ return (_local6); }; }; }; _local5++; }; return (null); } public function deletePlanes():void{ if (planeBack != null){ app.mainSprite.removeChild(planeBack); planeBack = null; }; if (planeQuickDisplay != null){ app.mainSprite.removeChild(planeQuickDisplay); planeQuickDisplay = null; }; if (planeSprites != null){ app.mainSprite.removeChild(planeSprites); planeSprites = null; }; } public function deleteAddedBackdrops():void{ var _local1:int; var _local2:CBackInstance; if (addedBackdrops != null){ _local1 = 0; while (_local1 < addedBackdrops.size()) { _local2 = CBackInstance(addedBackdrops.get(_local1)); _local2.delInstance(this); _local1++; }; }; addedBackdrops = null; } public function hide():void{ if (bVisible){ planeBack.visible = false; planeQuickDisplay.visible = false; planeSprites.visible = false; bVisible = false; }; } public function createPlanes(_arg1:int, _arg2:int):void{ planeBack = new Sprite(); planeBack.x = _arg1; planeBack.y = _arg2; planeQuickDisplay = new Sprite(); planeQuickDisplay.x = _arg1; planeQuickDisplay.y = _arg2; planeSprites = new Sprite(); planeSprites.x = _arg1; planeSprites.y = _arg2; app.mainSprite.addChild(planeBack); app.mainSprite.addChild(planeQuickDisplay); app.mainSprite.addChild(planeSprites); bVisible = true; setEffect(effect, effectParam); } public function resetPlanes(_arg1:int, _arg2:int):void{ planeBack.x = _arg1; planeBack.y = _arg2; planeQuickDisplay.x = _arg1; planeQuickDisplay.y = _arg2; planeSprites.x = _arg1; planeSprites.y = _arg2; show(); } public function reset():void{ dwOptions = backUp_dwOptions; xCoef = backUp_xCoef; yCoef = backUp_yCoef; nBkdLOs = backUp_nBkdLOs; nFirstLOIndex = backUp_nFirstLOIndex; x = (y = (dx = (dy = 0))); pObstacles = null; pPlatforms = null; pLadders = null; addedBackdrops = null; show(); } public function addObstacle(_arg1:CBackInstance):void{ if (pObstacles == null){ pObstacles = new CArrayList(); }; pObstacles.add(_arg1); } public function deleteAddedBackdropsAt(_arg1:int, _arg2:int, _arg3:Boolean):void{ var _local4:int; var _local5:CBackInstance; var _local6:Boolean; _arg1 = (_arg1 + x); _arg2 = (_arg2 + y); if (addedBackdrops != null){ _local4 = 0; while (_local4 < addedBackdrops.size()) { _local5 = CBackInstance(addedBackdrops.get(_local4)); if ((((_arg1 >= _local5.x)) && ((_arg1 < (_local5.x + _local5.width))))){ if ((((_arg2 >= _local5.y)) && ((_arg2 < (_local5.y + _local5.height))))){ _local6 = true; if (_arg3){ _local6 = _local5.testPoint(_arg1, _arg2); }; if (_local6){ _local5.delInstance(this); addedBackdrops.removeObject(_local5); return; }; }; }; _local4++; }; }; } public function setBlendMode(_arg1:String):void{ planeBack.blendMode = _arg1; planeQuickDisplay.blendMode = _arg1; planeSprites.blendMode = _arg1; } public function load(_arg1:CFile):void{ dwOptions = _arg1.readAInt(); xCoef = _arg1.readAFloat(); yCoef = _arg1.readAFloat(); nBkdLOs = _arg1.readAInt(); nFirstLOIndex = _arg1.readAInt(); pName = _arg1.readAString(); backUp_dwOptions = dwOptions; backUp_xCoef = xCoef; backUp_yCoef = yCoef; backUp_nBkdLOs = nBkdLOs; backUp_nFirstLOIndex = nFirstLOIndex; } public function show():void{ if (bVisible == false){ planeBack.visible = true; planeQuickDisplay.visible = true; planeSprites.visible = true; bVisible = true; }; } } }//package Frame
Section 137
//CLO (Frame.CLO) package Frame { import Services.*; public class CLO { public var loType:int; public var loOiHandle:int; public var loLayer:int; public var loParentType:int; public var loHandle:int; public var loOiParentHandle:int; public var loX:int; public var loInstances:Array; public var loY:int; public static var PARENT_QUALIFIER:int = 3; public static var PARENT_FRAME:int = 1; public static var PARENT_FRAMEITEM:int = 2; public static var PARENT_NONE:int = 0; public function CLO(){ var _local1:int; super(); loInstances = new Array(4); _local1 = 0; while (_local1 < 4) { loInstances[_local1] = null; _local1++; }; } public function addInstance(_arg1:int, _arg2:CBackInstance):void{ loInstances[_arg1] = _arg2; } public function load(_arg1:CFile):void{ loHandle = _arg1.readAShort(); loOiHandle = _arg1.readAShort(); loX = _arg1.readAInt(); loY = _arg1.readAInt(); loParentType = _arg1.readAShort(); loOiParentHandle = _arg1.readAShort(); loLayer = _arg1.readAShort(); _arg1.skipBytes(2); } } }//package Frame
Section 138
//CLOList (Frame.CLOList) package Frame { import Application.*; import OI.*; public class CLOList { public var nIndex:int; public var handleToIndex:Array; public var loFranIndex:int; public var list:Array; public function load(_arg1:CRunApp):void{ var _local2:int; var _local4:COI; nIndex = _arg1.file.readAInt(); list = new Array(nIndex); var _local3:int; _local2 = 0; while (_local2 < nIndex) { list[_local2] = new CLO(); list[_local2].load(_arg1.file); if ((list[_local2].loHandle + 1) > _local3){ _local3 = (list[_local2].loHandle + 1); }; _local4 = _arg1.OIList.getOIFromHandle(list[_local2].loOiHandle); list[_local2].loType = _local4.oiType; _local2++; }; handleToIndex = new Array(_local3); _local2 = 0; while (_local2 < nIndex) { handleToIndex[list[_local2].loHandle] = _local2; _local2++; }; } public function first_LevObj():CLO{ loFranIndex = 0; return (next_LevObj()); } public function getLOFromHandle(_arg1:int):CLO{ if (_arg1 < handleToIndex.length){ return (list[handleToIndex[_arg1]]); }; return (null); } public function next_LevObj():CLO{ var _local1:CLO; if (loFranIndex < nIndex){ do { _local1 = list[loFranIndex++]; if (_local1.loType >= COI.OBJ_SPR){ return (_local1); }; } while (loFranIndex < nIndex); }; return (null); } public function getLOFromIndex(_arg1:int):CLO{ return (list[_arg1]); } } }//package Frame
Section 139
//MochiCoins (mochi.as3.MochiCoins) package mochi.as3 { public class MochiCoins { public static const STORE_HIDE:String = "StoreHide"; public static const NO_USER:String = "NoUser"; public static const IO_ERROR:String = "IOError"; public static const ITEM_NEW:String = "ItemNew"; public static const ITEM_OWNED:String = "ItemOwned"; public static const STORE_ITEMS:String = "StoreItems"; public static const ERROR:String = "Error"; public static const STORE_SHOW:String = "StoreShow"; public static var _inventory:MochiInventory; public static function triggerEvent(_arg1:String, _arg2:Object):void{ MochiSocial.triggerEvent(_arg1, _arg2); } public static function removeEventListener(_arg1:String, _arg2:Function):void{ MochiSocial.removeEventListener(_arg1, _arg2); } public static function addEventListener(_arg1:String, _arg2:Function):void{ MochiSocial.addEventListener(_arg1, _arg2); } public static function getStoreItems():void{ MochiServices.send("coins_getStoreItems"); } public static function get inventory():MochiInventory{ return (_inventory); } public static function showStore(_arg1:Object=null):void{ MochiServices.bringToTop(); MochiServices.send("coins_showStore", {options:_arg1}, null, null); } public static function showItem(_arg1:Object=null):void{ if (((!(_arg1)) || (!((typeof(_arg1.item) == "string"))))){ trace("ERROR: showItem call must pass an Object with an item key"); return; }; MochiServices.bringToTop(); MochiServices.send("coins_showItem", {options:_arg1}, null, null); } public static function getVersion():String{ return (MochiServices.getVersion()); } public static function showVideo(_arg1:Object=null):void{ if (((!(_arg1)) || (!((typeof(_arg1.item) == "string"))))){ trace("ERROR: showVideo call must pass an Object with an item key"); return; }; MochiServices.bringToTop(); MochiServices.send("coins_showVideo", {options:_arg1}, null, null); } MochiSocial.addEventListener(MochiSocial.LOGGED_IN, function (_arg1:Object):void{ _inventory = new MochiInventory(); }); MochiSocial.addEventListener(MochiSocial.LOGGED_OUT, function (_arg1:Object):void{ _inventory = null; }); } }//package mochi.as3
Section 140
//MochiDigits (mochi.as3.MochiDigits) package mochi.as3 { public final class MochiDigits { private var Sibling:MochiDigits; private var Fragment:Number; private var Encoder:Number; public function MochiDigits(_arg1:Number=0, _arg2:uint=0):void{ Encoder = 0; setValue(_arg1, _arg2); } public function reencode():void{ var _local1:uint = int((2147483647 * Math.random())); Fragment = (Fragment ^ (_local1 ^ Encoder)); Encoder = _local1; } public function set value(_arg1:Number):void{ setValue(_arg1); } public function toString():String{ var _local1:String = String.fromCharCode((Fragment ^ Encoder)); if (Sibling != null){ _local1 = (_local1 + Sibling.toString()); }; return (_local1); } public function setValue(_arg1:Number=0, _arg2:uint=0):void{ var _local3:String = _arg1.toString(); var _temp1 = _arg2; _arg2 = (_arg2 + 1); Fragment = (_local3.charCodeAt(_temp1) ^ Encoder); if (_arg2 < _local3.length){ Sibling = new MochiDigits(_arg1, _arg2); } else { Sibling = null; }; reencode(); } public function get value():Number{ return (Number(this.toString())); } public function addValue(_arg1:Number):void{ value = (value + _arg1); } } }//package mochi.as3
Section 141
//MochiEventDispatcher (mochi.as3.MochiEventDispatcher) package mochi.as3 { public class MochiEventDispatcher { private var eventTable:Object; public function MochiEventDispatcher():void{ eventTable = {}; } public function triggerEvent(_arg1:String, _arg2:Object):void{ var _local3:Object; if (eventTable[_arg1] == undefined){ return; }; for (_local3 in eventTable[_arg1]) { var _local6 = eventTable[_arg1]; _local6[_local3](_arg2); }; } public function removeEventListener(_arg1:String, _arg2:Function):void{ var _local3:Object; if (eventTable[_arg1] == undefined){ eventTable[_arg1] = []; return; }; for (_local3 in eventTable[_arg1]) { if (eventTable[_arg1][_local3] != _arg2){ } else { eventTable[_arg1].splice(Number(_local3), 1); }; }; } public function addEventListener(_arg1:String, _arg2:Function):void{ removeEventListener(_arg1, _arg2); eventTable[_arg1].push(_arg2); } } }//package mochi.as3
Section 142
//MochiEvents (mochi.as3.MochiEvents) package mochi.as3 { import flash.display.*; public class MochiEvents { public static const ALIGN_BOTTOM_LEFT:String = "ALIGN_BL"; public static const FORMAT_LONG:String = "LongForm"; public static const ALIGN_BOTTOM:String = "ALIGN_B"; public static const ACHIEVEMENT_RECEIVED:String = "AchievementReceived"; public static const FORMAT_SHORT:String = "ShortForm"; public static const ALIGN_TOP_RIGHT:String = "ALIGN_TR"; public static const ALIGN_BOTTOM_RIGHT:String = "ALIGN_BR"; public static const ALIGN_TOP:String = "ALIGN_T"; public static const ALIGN_LEFT:String = "ALIGN_L"; public static const ALIGN_RIGHT:String = "ALIGN_R"; public static const ALIGN_TOP_LEFT:String = "ALIGN_TL"; public static const ALIGN_CENTER:String = "ALIGN_C"; private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher(); private static var gameStart:Number; private static var levelStart:Number; public static function endPlay():void{ MochiServices.send("events_clearRoundID", null, null, null); } public static function addEventListener(_arg1:String, _arg2:Function):void{ _dispatcher.addEventListener(_arg1, _arg2); } public static function trackEvent(_arg1:String, _arg2=null):void{ MochiServices.send("events_trackEvent", {tag:_arg1, value:_arg2}, null, null); } public static function removeEventListener(_arg1:String, _arg2:Function):void{ _dispatcher.removeEventListener(_arg1, _arg2); } public static function startSession(_arg1:String):void{ MochiServices.send("events_beginSession", {achievementID:_arg1}, null, null); } public static function triggerEvent(_arg1:String, _arg2:Object):void{ _dispatcher.triggerEvent(_arg1, _arg2); } public static function setNotifications(_arg1:MovieClip, _arg2:Object):void{ var _local4:Object; var _local3:Object = {}; for (_local4 in _arg2) { _local3[_local4] = _arg2[_local4]; }; _local3.clip = _arg1; MochiServices.send("events_setNotifications", _local3, null, null); } public static function getVersion():String{ return (MochiServices.getVersion()); } public static function startPlay(_arg1:String="gameplay"):void{ MochiServices.send("events_setRoundID", {tag:String(_arg1)}, null, null); } } }//package mochi.as3
Section 143
//MochiInventory (mochi.as3.MochiInventory) package mochi.as3 { import flash.events.*; import flash.utils.*; public dynamic class MochiInventory extends Proxy { private var _timer:Timer; private var _names:Array; private var _syncID:Number; private var _consumableProperties:Object; private var _storeSync:Object; private var _outstandingID:Number; private var _syncPending:Boolean; public static const READY:String = "InvReady"; public static const ERROR:String = "Error"; public static const IO_ERROR:String = "IoError"; private static const KEY_SALT:String = " syncMaint"; public static const WRITTEN:String = "InvWritten"; public static const NOT_READY:String = "InvNotReady"; public static const VALUE_ERROR:String = "InvValueError"; private static const CONSUMER_KEY:String = "MochiConsumables"; private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher(); public function MochiInventory():void{ MochiCoins.addEventListener(MochiCoins.ITEM_OWNED, itemOwned); MochiCoins.addEventListener(MochiCoins.ITEM_NEW, newItems); MochiSocial.addEventListener(MochiSocial.LOGGED_IN, loggedIn); MochiSocial.addEventListener(MochiSocial.LOGGED_OUT, loggedOut); _storeSync = new Object(); _syncPending = false; _outstandingID = 0; _syncID = 0; _timer = new Timer(1000); _timer.addEventListener(TimerEvent.TIMER, sync); _timer.start(); if (MochiSocial.loggedIn){ loggedIn(); } else { loggedOut(); }; } private function newItems(_arg1:Object):void{ if (!this[(_arg1.id + KEY_SALT)]){ this[(_arg1.id + KEY_SALT)] = 0; }; if (!this[_arg1.id]){ this[_arg1.id] = 0; }; this[(_arg1.id + KEY_SALT)] = (this[(_arg1.id + KEY_SALT)] + _arg1.count); this[_arg1.id] = (this[_arg1.id] + _arg1.count); if (_arg1.privateProperties.consumable){ if (!this[_arg1.privateProperties.tag]){ this[_arg1.privateProperties.tag] = 0; }; this[_arg1.privateProperties.tag] = (this[_arg1.privateProperties.tag] + (_arg1.privateProperties.inc * _arg1.count)); }; } public function release():void{ MochiCoins.removeEventListener(MochiCoins.ITEM_NEW, newItems); MochiSocial.removeEventListener(MochiSocial.LOGGED_IN, loggedIn); MochiSocial.removeEventListener(MochiSocial.LOGGED_OUT, loggedOut); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function getProperty(_arg1){ if (_consumableProperties == null){ triggerEvent(ERROR, {type:NOT_READY}); return (-1); }; if (_consumableProperties[_arg1]){ return (MochiDigits(_consumableProperties[_arg1]).value); }; return (undefined); } private function loggedIn(_arg1:Object=null):void{ MochiUserData.get(CONSUMER_KEY, getConsumableBag); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function hasProperty(_arg1):Boolean{ if (_consumableProperties == null){ triggerEvent(ERROR, {type:NOT_READY}); return (false); }; if (_consumableProperties[_arg1] == undefined){ return (false); }; return (true); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function nextNameIndex(_arg1:int):int{ return (((_arg1)>=_names.length) ? 0 : (_arg1 + 1)); } private function putConsumableBag(_arg1:MochiUserData):void{ _syncPending = false; if (_arg1.error){ triggerEvent(ERROR, {type:IO_ERROR, error:_arg1.error}); _outstandingID = -1; }; triggerEvent(WRITTEN, {}); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function setProperty(_arg1, _arg2):void{ var _local3:MochiDigits; if (_consumableProperties == null){ triggerEvent(ERROR, {type:NOT_READY}); return; }; if (!(_arg2 is Number)){ triggerEvent(ERROR, {type:VALUE_ERROR, error:"Invalid type", arg:_arg2}); return; }; if (_consumableProperties[_arg1]){ _local3 = MochiDigits(_consumableProperties[_arg1]); if (_local3.value == _arg2){ return; }; _local3.value = _arg2; } else { _names.push(_arg1); _consumableProperties[_arg1] = new MochiDigits(_arg2); }; _syncID++; } private function itemOwned(_arg1:Object):void{ _storeSync[_arg1.id] = {properties:_arg1.properties, count:_arg1.count}; } private function sync(_arg1:Event=null):void{ var _local3:String; if (((_syncPending) || ((_syncID == _outstandingID)))){ return; }; _outstandingID = _syncID; var _local2:Object = {}; for (_local3 in _consumableProperties) { _local2[_local3] = MochiDigits(_consumableProperties[_local3]).value; }; MochiUserData.put(CONSUMER_KEY, _local2, putConsumableBag); _syncPending = true; } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function nextName(_arg1:int):String{ return (_names[(_arg1 - 1)]); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function deleteProperty(_arg1):Boolean{ if (!_consumableProperties[_arg1]){ return (false); }; _names.splice(_names.indexOf(_arg1), 1); delete _consumableProperties[_arg1]; return (true); } private function getConsumableBag(_arg1:MochiUserData):void{ var _local2:String; var _local3:Number; if (_arg1.error){ triggerEvent(ERROR, {type:IO_ERROR, error:_arg1.error}); return; }; _consumableProperties = {}; _names = new Array(); if (_arg1.data){ for (_local2 in _arg1.data) { _names.push(_local2); _consumableProperties[_local2] = new MochiDigits(_arg1.data[_local2]); }; }; for (_local2 in _storeSync) { _local3 = _storeSync[_local2].count; if (_consumableProperties[(_local2 + KEY_SALT)]){ _local3 = (_local3 - _consumableProperties[_local2]); }; if (_local3 == 0){ } else { newItems({id:_local2, count:_local3, properties:_storeSync[_local2].properties}); }; }; triggerEvent(READY, {}); } private function loggedOut(_arg1:Object=null):void{ _consumableProperties = null; } public static function triggerEvent(_arg1:String, _arg2:Object):void{ _dispatcher.triggerEvent(_arg1, _arg2); } public static function removeEventListener(_arg1:String, _arg2:Function):void{ _dispatcher.removeEventListener(_arg1, _arg2); } public static function addEventListener(_arg1:String, _arg2:Function):void{ _dispatcher.addEventListener(_arg1, _arg2); } } }//package mochi.as3
Section 144
//MochiScores (mochi.as3.MochiScores) package mochi.as3 { import flash.display.*; import flash.text.*; public class MochiScores { private static var boardID:String; public static var onErrorHandler:Object; public static var onCloseHandler:Object; public static function showLeaderboard(_arg1:Object=null):void{ var n:Number; var options = _arg1; if (options != null){ delete options.clip; MochiServices.setContainer(); MochiServices.bringToTop(); if (options.name != null){ if ((options.name is TextField)){ if (options.name.text.length > 0){ options.name = options.name.text; }; }; }; if (options.score != null){ if ((options.score is TextField)){ if (options.score.text.length > 0){ options.score = options.score.text; }; } else { if ((options.score is MochiDigits)){ options.score = options.score.value; }; }; n = Number(options.score); if (isNaN(n)){ trace((("ERROR: Submitted score '" + options.score) + "' will be rejected, score is 'Not a Number'")); } else { if ((((n == Number.NEGATIVE_INFINITY)) || ((n == Number.POSITIVE_INFINITY)))){ trace((("ERROR: Submitted score '" + options.score) + "' will be rejected, score is an infinite")); } else { if (Math.floor(n) != n){ trace((("WARNING: Submitted score '" + options.score) + "' will be truncated")); }; options.score = n; }; }; }; if (options.onDisplay != null){ options.onDisplay(); } else { if (MochiServices.clip != null){ if ((MochiServices.clip is MovieClip)){ MochiServices.clip.stop(); } else { trace("Warning: Container is not a MovieClip, cannot call default onDisplay."); }; }; }; } else { options = {}; if ((MochiServices.clip is MovieClip)){ MochiServices.clip.stop(); } else { trace("Warning: Container is not a MovieClip, cannot call default onDisplay."); }; }; if (options.onClose != null){ onCloseHandler = options.onClose; } else { onCloseHandler = function ():void{ if ((MochiServices.clip is MovieClip)){ MochiServices.clip.play(); } else { trace("Warning: Container is not a MovieClip, cannot call default onClose."); }; }; }; if (options.onError != null){ onErrorHandler = options.onError; } else { onErrorHandler = null; }; if (options.boardID == null){ if (MochiScores.boardID != null){ options.boardID = MochiScores.boardID; }; }; MochiServices.warnID(options.boardID, true); trace("[MochiScores] NOTE: Security Sandbox Violation errors below are normal"); MochiServices.send("scores_showLeaderboard", {options:options}, null, onClose); } public static function closeLeaderboard():void{ MochiServices.send("scores_closeLeaderboard"); } public static function getPlayerInfo(_arg1:Object, _arg2:Object=null):void{ MochiServices.send("scores_getPlayerInfo", null, _arg1, _arg2); } public static function requestList(_arg1:Object, _arg2:Object=null):void{ MochiServices.send("scores_requestList", null, _arg1, _arg2); } public static function scoresArrayToObjects(_arg1:Object):Object{ var _local3:Number; var _local4:Number; var _local5:Object; var _local6:Object; var _local7:String; var _local8:String; var _local2:Object = {}; for (_local7 in _arg1) { if (typeof(_arg1[_local7]) == "object"){ if (((!((_arg1[_local7].cols == null))) && (!((_arg1[_local7].rows == null))))){ _local2[_local7] = []; _local5 = _arg1[_local7]; _local4 = 0; while (_local4 < _local5.rows.length) { _local6 = {}; _local3 = 0; while (_local3 < _local5.cols.length) { _local6[_local5.cols[_local3]] = _local5.rows[_local4][_local3]; _local3++; }; _local2[_local7].push(_local6); _local4++; }; } else { _local2[_local7] = {}; for (_local8 in _arg1[_local7]) { _local2[_local7][_local8] = _arg1[_local7][_local8]; }; }; } else { _local2[_local7] = _arg1[_local7]; }; }; return (_local2); } public static function submit(_arg1:Number, _arg2:String, _arg3:Object=null, _arg4:Object=null):void{ _arg1 = Number(_arg1); if (isNaN(_arg1)){ trace((("ERROR: Submitted score '" + String(_arg1)) + "' will be rejected, score is 'Not a Number'")); } else { if ((((_arg1 == Number.NEGATIVE_INFINITY)) || ((_arg1 == Number.POSITIVE_INFINITY)))){ trace((("ERROR: Submitted score '" + String(_arg1)) + "' will be rejected, score is an infinite")); } else { if (Math.floor(_arg1) != _arg1){ trace((("WARNING: Submitted score '" + String(_arg1)) + "' will be truncated")); }; _arg1 = Number(_arg1); }; }; MochiServices.send("scores_submit", {score:_arg1, name:_arg2}, _arg3, _arg4); } public static function onClose(_arg1:Object=null):void{ if (((((_arg1) && ((_arg1.error == true)))) && (onErrorHandler))){ if (_arg1.errorCode == null){ _arg1.errorCode = "IOError"; }; onErrorHandler(_arg1.errorCode); MochiServices.doClose(); return; }; onCloseHandler(); MochiServices.doClose(); } public static function setBoardID(_arg1:String):void{ MochiServices.warnID(_arg1, true); MochiScores.boardID = _arg1; MochiServices.send("scores_setBoardID", {boardID:_arg1}); } } }//package mochi.as3
Section 145
//MochiServices (mochi.as3.MochiServices) package mochi.as3 { import flash.display.*; import flash.geom.*; import flash.events.*; import flash.system.*; import flash.net.*; import flash.utils.*; public class MochiServices { private static var _container:Object; private static var _connected:Boolean = false; private static var _queue:Array; private static var _swfVersion:String; private static var _preserved:Object; public static var netupAttempted:Boolean = false; private static var _sendChannel:LocalConnection; public static var servicesSync:MochiSync = new MochiSync(); private static var _nextCallbackID:Number; private static var _clip:MovieClip; private static var _id:String; private static var _services:String = "services.swf"; private static var _servURL:String = "http://www.mochiads.com/static/lib/services/"; public static var widget:Boolean = false; private static var _timer:Timer; private static var _sendChannelName:String; private static var _loader:Loader; private static var _callbacks:Object; private static var _connecting:Boolean = false; private static var _mochiLocalConnection:MovieClip; private static var _listenChannelName:String = "__ms_"; public static var onError:Object; public static var netup:Boolean = true; private static var _mochiLC:String = "MochiLC.swf"; public static function isNetworkAvailable():Boolean{ return (!((Security.sandboxType == "localWithFile"))); } public static function get connected():Boolean{ return (_connected); } private static function onReceive(_arg1:Object):void{ var methodName:String; var pkg = _arg1; var cb:String = pkg.callbackID; var cblst:Object = _callbacks[cb]; if (!cblst){ return; }; var method:* = cblst.callbackMethod; methodName = ""; var obj:Object = cblst.callbackObject; if (((obj) && ((typeof(method) == "string")))){ methodName = method; if (obj[method] != null){ method = obj[method]; } else { trace((("Error: Method " + method) + " does not exist.")); }; }; if (method != undefined){ try { method.apply(obj, pkg.args); } catch(error:Error) { trace(((("Error invoking callback method '" + methodName) + "': ") + error.toString())); }; } else { if (obj != null){ try { obj(pkg.args); } catch(error:Error) { trace(("Error invoking method on object: " + error.toString())); }; }; }; delete _callbacks[cb]; } public static function send(_arg1:String, _arg2:Object=null, _arg3:Object=null, _arg4:Object=null):void{ if (_connected){ _mochiLocalConnection.send(_sendChannelName, "onReceive", {methodName:_arg1, args:_arg2, callbackID:_nextCallbackID}); } else { if ((((_clip == null)) || (!(_connecting)))){ trace(("Error: MochiServices not connected. Please call MochiServices.connect(). Function: " + _arg1)); handleError(_arg2, _arg3, _arg4); flush(true); return; }; _queue.push({methodName:_arg1, args:_arg2, callbackID:_nextCallbackID}); }; if (_clip != null){ if (_callbacks != null){ _callbacks[_nextCallbackID] = {callbackObject:_arg3, callbackMethod:_arg4}; _nextCallbackID++; }; }; } private static function init(_arg1:String, _arg2:Object):void{ _id = _arg1; if (_arg2 != null){ _container = _arg2; loadCommunicator(_arg1, _container); }; } public static function get childClip():Object{ return (_clip); } private static function clickMovie(_arg1:String, _arg2:Function):MovieClip{ var _local4:int; var _local14:Loader; var _local3:Array = [150, 21, 0, 7, 1, 0, 0, 0, 0, 98, 116, 110, 0, 7, 2, 0, 0, 0, 0, 116, 104, 105, 115, 0, 28, 150, 22, 0, 0, 99, 114, 101, 97, 116, 101, 69, 109, 112, 116, 121, 77, 111, 118, 105, 101, 67, 108, 105, 112, 0, 82, 135, 1, 0, 0, 23, 150, 13, 0, 4, 0, 0, 111, 110, 82, 101, 108, 101, 97, 115, 101, 0, 142, 8, 0, 0, 0, 0, 2, 42, 0, 114, 0, 150, 17, 0, 0, 32, 0, 7, 1, 0, 0, 0, 8, 0, 0, 115, 112, 108, 105, 116, 0, 82, 135, 1, 0, 1, 23, 150, 7, 0, 4, 1, 7, 0, 0, 0, 0, 78, 150, 8, 0, 0, 95, 98, 108, 97, 110, 107, 0, 154, 1, 0, 0, 150, 7, 0, 0, 99, 108, 105, 99, 107, 0, 150, 7, 0, 4, 1, 7, 1, 0, 0, 0, 78, 150, 27, 0, 7, 2, 0, 0, 0, 7, 0, 0, 0, 0, 0, 76, 111, 99, 97, 108, 67, 111, 110, 110, 101, 99, 116, 105, 111, 110, 0, 64, 150, 6, 0, 0, 115, 101, 110, 100, 0, 82, 79, 150, 15, 0, 4, 0, 0, 95, 97, 108, 112, 104, 97, 0, 7, 0, 0, 0, 0, 79, 150, 23, 0, 7, 0xFF, 0, 0xFF, 0, 7, 1, 0, 0, 0, 4, 0, 0, 98, 101, 103, 105, 110, 70, 105, 108, 108, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 109, 111, 118, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 100, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 100, 0, 0, 0, 7, 100, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 100, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 16, 0, 7, 0, 0, 0, 0, 4, 0, 0, 101, 110, 100, 70, 105, 108, 108, 0, 82, 23]; var _local5:Array = [104, 0, 31, 64, 0, 7, 208, 0, 0, 12, 1, 0, 67, 2, 0xFF, 0xFF, 0xFF, 63, 3]; var _local6:Array = [0, 64, 0, 0, 0]; var _local7:MovieClip = new MovieClip(); var _local8:LocalConnection = new LocalConnection(); var _local9:String = ((("_click_" + Math.floor((Math.random() * 999999))) + "_") + Math.floor(new Date().time)); _local8 = new LocalConnection(); _local7.lc = _local8; _local7.click = _arg2; _local8.client = _local7; _local8.connect(_local9); var _local10:ByteArray = new ByteArray(); var _local11:ByteArray = new ByteArray(); _local11.endian = Endian.LITTLE_ENDIAN; _local11.writeShort(1); _local11.writeUTFBytes(((_arg1 + " ") + _local9)); _local11.writeByte(0); var _local12:uint = ((_local3.length + _local11.length) + 4); var _local13:uint = (_local12 + 35); _local10.endian = Endian.LITTLE_ENDIAN; _local10.writeUTFBytes("FWS"); _local10.writeByte(8); _local10.writeUnsignedInt(_local13); for each (_local4 in _local5) { _local10.writeByte(_local4); }; _local10.writeUnsignedInt(_local12); _local10.writeByte(136); _local10.writeShort(_local11.length); _local10.writeBytes(_local11); for each (_local4 in _local3) { _local10.writeByte(_local4); }; for each (_local4 in _local6) { _local10.writeByte(_local4); }; _local14 = new Loader(); _local14.loadBytes(_local10); _local7.addChild(_local14); return (_local7); } public static function stayOnTop():void{ _container.addEventListener(Event.ENTER_FRAME, MochiServices.bringToTop, false, 0, true); if (_clip != null){ _clip.visible = true; }; } public static function addLinkEvent(_arg1:String, _arg2:String, _arg3:DisplayObjectContainer, _arg4:Function=null):void{ var avm1Click:DisplayObject; var x:String; var req:URLRequest; var loader:Loader; var setURL:Function; var err:Function; var complete:Function; var url = _arg1; var burl = _arg2; var btn = _arg3; var onClick = _arg4; var vars:Object = new Object(); vars["mav"] = getVersion(); vars["swfv"] = "9"; vars["swfurl"] = btn.loaderInfo.loaderURL; vars["fv"] = Capabilities.version; vars["os"] = Capabilities.os; vars["lang"] = Capabilities.language; vars["scres"] = ((Capabilities.screenResolutionX + "x") + Capabilities.screenResolutionY); var s = "?"; var i:Number = 0; for (x in vars) { if (i != 0){ s = (s + "&"); }; i = (i + 1); s = (((s + x) + "=") + escape(vars[x])); }; req = new URLRequest("http://x.mochiads.com/linkping.swf"); loader = new Loader(); setURL = function (_arg1:String):void{ if (avm1Click){ btn.removeChild(avm1Click); }; avm1Click = clickMovie(_arg1, onClick); var _local2:Rectangle = btn.getBounds(btn); btn.addChild(avm1Click); avm1Click.x = _local2.x; avm1Click.y = _local2.y; avm1Click.scaleX = (0.01 * _local2.width); avm1Click.scaleY = (0.01 * _local2.height); }; err = function (_arg1:Object):void{ netup = false; _arg1.target.removeEventListener(_arg1.type, arguments.callee); setURL(burl); }; complete = function (_arg1:Object):void{ _arg1.target.removeEventListener(_arg1.type, arguments.callee); }; if (netup){ setURL((url + s)); } else { setURL(burl); }; if (!((netupAttempted) || (_connected))){ netupAttempted = true; loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, err); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, complete); loader.load(req); }; } public static function disconnect():void{ if (((_connected) || (_connecting))){ if (_clip != null){ if (_clip.parent != null){ if ((_clip.parent is Sprite)){ Sprite(_clip.parent).removeChild(_clip); _clip = null; }; }; }; _connecting = (_connected = false); flush(true); try { _mochiLocalConnection.close(); } catch(error:Error) { }; }; if (_timer != null){ try { _timer.stop(); } catch(error:Error) { }; }; } public static function allowDomains(_arg1:String):String{ var _local2:String; if (Security.sandboxType != "application"){ Security.allowDomain("*"); Security.allowInsecureDomain("*"); }; if (_arg1.indexOf("http://") != -1){ _local2 = _arg1.split("/")[2].split(":")[0]; if (Security.sandboxType != "application"){ Security.allowDomain(_local2); Security.allowInsecureDomain(_local2); }; }; return (_local2); } public static function getVersion():String{ return ("3.8 as3"); } public static function doClose():void{ _container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop); } public static function warnID(_arg1:String, _arg2:Boolean):void{ _arg1 = _arg1.toLowerCase(); if (_arg1.length != 16){ trace((("WARNING: " + (_arg2) ? "board" : "game") + " ID is not the appropriate length")); return; } else { if (_arg1 == "1e113c7239048b3f"){ if (_arg2){ trace("WARNING: Using testing board ID"); } else { trace("WARNING: Using testing board ID as game ID"); }; return; } else { if (_arg1 == "84993a1de4031cd8"){ if (_arg2){ trace("WARNING: Using testing game ID as board ID"); } else { trace("WARNING: Using testing game ID"); }; return; }; }; }; var _local3:Number = 0; while (_local3 < _arg1.length) { switch (_arg1.charAt(_local3)){ case "0": case "1": case "2": case "3": case "4": case "5": case "6": case "7": case "8": case "9": case "a": case "b": case "c": case "d": case "e": case "f": break; default: trace(("WARNING: Board ID contains illegal characters: " + _arg1)); return; }; _local3++; }; } private static function flush(_arg1:Boolean):void{ var _local2:Object; var _local3:Object; if (((_clip) && (_queue))){ while (_queue.length > 0) { _local2 = _queue.shift(); _local3 = null; if (_local2 != null){ if (_local2.callbackID != null){ _local3 = _callbacks[_local2.callbackID]; }; delete _callbacks[_local2.callbackID]; if (((_arg1) && (!((_local3 == null))))){ handleError(_local2.args, _local3.callbackObject, _local3.callbackMethod); }; }; }; }; } public static function get id():String{ return (_id); } private static function onEvent(_arg1:Object):void{ var _local2:String = _arg1.target; var _local3:String = _arg1.event; switch (_local2){ case "events": MochiEvents.triggerEvent(_arg1.event, _arg1.args); break; case "coins": MochiCoins.triggerEvent(_arg1.event, _arg1.args); break; case "sync": servicesSync.triggerEvent(_arg1.event, _arg1.args); break; }; } private static function urlOptions(_arg1:Object):Object{ var _local3:String; var _local4:Array; var _local5:Number; var _local6:Array; var _local2:Object = {}; if (_arg1.stage){ _local3 = _arg1.stage.loaderInfo.parameters.mochiad_options; } else { _local3 = _arg1.loaderInfo.parameters.mochiad_options; }; if (_local3){ _local4 = _local3.split("&"); _local5 = 0; while (_local5 < _local4.length) { _local6 = _local4[_local5].split("="); _local2[unescape(_local6[0])] = unescape(_local6[1]); _local5++; }; }; return (_local2); } public static function setContainer(_arg1:Object=null, _arg2:Boolean=true):void{ if (_clip.parent){ _clip.parent.removeChild(_clip); }; if (_arg1 != null){ if ((_arg1 is DisplayObjectContainer)){ _container = _arg1; }; }; if (_arg2){ if ((_container is DisplayObjectContainer)){ DisplayObjectContainer(_container).addChild(_clip); }; }; } private static function handleError(_arg1:Object, _arg2:Object, _arg3:Object):void{ var args = _arg1; var callbackObject = _arg2; var callbackMethod = _arg3; if (args != null){ if (args.onError != null){ args.onError.apply(null, ["NotConnected"]); }; if (((!((args.options == null))) && (!((args.options.onError == null))))){ args.options.onError.apply(null, ["NotConnected"]); }; }; if (callbackMethod != null){ args = {}; args.error = true; args.errorCode = "NotConnected"; if (((!((callbackObject == null))) && ((callbackMethod is String)))){ try { var _local5 = callbackObject; _local5[callbackMethod](args); } catch(error:Error) { }; } else { if (callbackMethod != null){ try { callbackMethod.apply(args); } catch(error:Error) { }; }; }; }; } private static function loadError(_arg1:Object):void{ _clip._mochiad_ctr_failed = true; trace("MochiServices could not load."); MochiServices.disconnect(); MochiServices.onError("IOError"); } private static function initComChannels():void{ if (!_connected){ trace("[SERVICES_API] connected!"); _connecting = false; _connected = true; _mochiLocalConnection.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"}); _mochiLocalConnection.send(_sendChannelName, "onReceive", {methodName:"registerGame", preserved:_preserved, id:_id, version:getVersion(), parentURL:_container.loaderInfo.loaderURL}); _clip.onReceive = onReceive; _clip.onEvent = onEvent; _clip.onError = function ():void{ MochiServices.onError("IOError"); }; while (_queue.length > 0) { _mochiLocalConnection.send(_sendChannelName, "onReceive", _queue.shift()); }; }; } private static function loadLCBridge(_arg1:Object):void{ var loader:Loader; var clip = _arg1; loader = new Loader(); var mochiLCURL:String = (_servURL + _mochiLC); var req:URLRequest = new URLRequest(mochiLCURL); var complete:Function = function (_arg1:Object):void{ _mochiLocalConnection = MovieClip(loader.content); listen(); }; loader.contentLoaderInfo.addEventListener(Event.COMPLETE, complete); loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loadError); loader.load(req); clip.addChild(loader); } private static function listen():void{ _mochiLocalConnection.connect(_listenChannelName); _clip.handshake = function (_arg1:Object):void{ MochiServices.comChannelName = _arg1.newChannel; }; trace("Waiting for MochiAds services to connect..."); } public static function get clip():Object{ return (_container); } public static function set comChannelName(_arg1:String):void{ if (_arg1 != null){ if (_arg1.length > 3){ _sendChannelName = (_arg1 + "_fromgame"); initComChannels(); }; }; } private static function loadCommunicator(_arg1:String, _arg2:Object):MovieClip{ if (_clip != null){ return (_clip); }; if (!MochiServices.isNetworkAvailable()){ return (null); }; if (urlOptions(_arg2).servURL){ _servURL = urlOptions(_arg2).servURL; }; var _local3:String = (_servURL + _services); if (urlOptions(_arg2).servicesURL){ _local3 = urlOptions(_arg2).servicesURL; }; _listenChannelName = (_listenChannelName + ((Math.floor(new Date().time) + "_") + Math.floor((Math.random() * 99999)))); MochiServices.allowDomains(_local3); _clip = new MovieClip(); loadLCBridge(_clip); _loader = new Loader(); _loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loadError); var _local4:URLRequest = new URLRequest(_local3); var _local5:URLVariables = new URLVariables(); _local5.listenLC = _listenChannelName; _local5.mochiad_options = _arg2.loaderInfo.parameters.mochiad_options; _local5.api_version = getVersion(); if (widget){ _local5.widget = true; }; _local4.data = _local5; _loader.load(_local4); _clip.addChild(_loader); _sendChannel = new LocalConnection(); _queue = []; _nextCallbackID = 0; _callbacks = {}; _timer = new Timer(10000, 1); _timer.addEventListener(TimerEvent.TIMER, connectWait); _timer.start(); return (_clip); } public static function connect(_arg1:String, _arg2:Object, _arg3:Object=null):void{ var id = _arg1; var clip = _arg2; var onError = _arg3; warnID(id, false); if ((clip is DisplayObject)){ if (clip.stage == null){ trace("MochiServices connect requires the containing clip be attached to the stage"); }; if (((!(_connected)) && ((_clip == null)))){ trace("MochiServices Connecting..."); _connecting = true; init(id, clip); }; } else { trace("Error, MochiServices requires a Sprite, Movieclip or instance of the stage."); }; if (onError != null){ MochiServices.onError = onError; } else { if (MochiServices.onError == null){ MochiServices.onError = function (_arg1:String):void{ trace(_arg1); }; }; }; } public static function updateCopy(_arg1:Object):void{ MochiServices.send("coins_updateCopy", _arg1, null, null); } public static function bringToTop(_arg1:Event=null):void{ var e = _arg1; if (((!((MochiServices.clip == null))) && (!((MochiServices.childClip == null))))){ try { if (MochiServices.clip.numChildren > 1){ MochiServices.clip.setChildIndex(MochiServices.childClip, (MochiServices.clip.numChildren - 1)); }; } catch(errorObject:Error) { trace("Warning: Depth sort error."); _container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop); }; }; } public static function connectWait(_arg1:TimerEvent):void{ if (!_connected){ _clip._mochiad_ctr_failed = true; trace("MochiServices could not load. (timeout)"); MochiServices.disconnect(); MochiServices.onError("IOError"); }; } } }//package mochi.as3
Section 146
//MochiSocial (mochi.as3.MochiSocial) package mochi.as3 { public class MochiSocial { public static const LOGGED_IN:String = "LoggedIn"; public static const PROFILE_HIDE:String = "ProfileHide"; public static const NO_USER:String = "NoUser"; public static const PROPERTIES_SIZE:String = "PropertiesSize"; public static const IO_ERROR:String = "IOError"; public static const PROPERTIES_SAVED:String = "PropertySaved"; public static const WIDGET_LOADED:String = "WidgetLoaded"; public static const USER_INFO:String = "UserInfo"; public static const ERROR:String = "Error"; public static const LOGIN_SHOW:String = "LoginShow"; public static const LOGGED_OUT:String = "LoggedOut"; public static const PROFILE_SHOW:String = "ProfileShow"; public static const LOGIN_SHOWN:String = "LoginShown"; public static const LOGIN_HIDE:String = "LoginHide"; private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher(); public static var _user_info:Object = null; public static function getVersion():String{ return (MochiServices.getVersion()); } public static function saveUserProperties(_arg1:Object):void{ MochiServices.send("coins_saveUserProperties", _arg1); } public static function get loggedIn():Boolean{ return (!((_user_info == null))); } public static function triggerEvent(_arg1:String, _arg2:Object):void{ _dispatcher.triggerEvent(_arg1, _arg2); } public static function addEventListener(_arg1:String, _arg2:Function):void{ _dispatcher.addEventListener(_arg1, _arg2); } public static function getUserInfo():void{ MochiServices.send("coins_getUserInfo"); } public static function showLoginWidget(_arg1:Object=null):void{ MochiServices.setContainer(); MochiServices.bringToTop(); MochiServices.send("coins_showLoginWidget", {options:_arg1}); } public static function removeEventListener(_arg1:String, _arg2:Function):void{ _dispatcher.removeEventListener(_arg1, _arg2); } public static function requestLogin():void{ MochiServices.send("coins_requestLogin"); } public static function getAPIURL():String{ if (!_user_info){ return (null); }; return (_user_info.api_url); } public static function hideLoginWidget():void{ MochiServices.send("coins_hideLoginWidget"); } public static function getAPIToken():String{ if (!_user_info){ return (null); }; return (_user_info.api_token); } MochiSocial.addEventListener(MochiSocial.LOGGED_IN, function (_arg1:Object):void{ _user_info = _arg1; }); MochiSocial.addEventListener(MochiSocial.LOGGED_OUT, function (_arg1:Object):void{ _user_info = null; }); } }//package mochi.as3
Section 147
//MochiSync (mochi.as3.MochiSync) package mochi.as3 { import flash.utils.*; public dynamic class MochiSync extends Proxy { private var _syncContainer:Object; public static var SYNC_PROPERTY:String = "UpdateProperty"; public static var SYNC_REQUEST:String = "SyncRequest"; public function MochiSync():void{ _syncContainer = {}; } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function setProperty(_arg1, _arg2):void{ if (_syncContainer[_arg1] == _arg2){ return; }; var _local3:String = _arg1.toString(); _syncContainer[_local3] = _arg2; MochiServices.send("sync_propUpdate", {name:_local3, value:_arg2}); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function getProperty(_arg1){ return (_syncContainer[_arg1]); } public function triggerEvent(_arg1:String, _arg2:Object):void{ switch (_arg1){ case SYNC_REQUEST: MochiServices.send("sync_syncronize", _syncContainer); break; case SYNC_PROPERTY: _syncContainer[_arg2.name] = _arg2.value; break; }; } } }//package mochi.as3
Section 148
//MochiUserData (mochi.as3.MochiUserData) package mochi.as3 { import flash.events.*; import flash.net.*; import flash.utils.*; public class MochiUserData extends EventDispatcher { public var callback:Function;// = null public var operation:String;// = null public var error:Event;// = null public var data;// = null public var _loader:URLLoader; public var key:String;// = null public function MochiUserData(_arg1:String="", _arg2:Function=null){ this.key = _arg1; this.callback = _arg2; } public function serialize(_arg1):ByteArray{ var _local2:ByteArray = new ByteArray(); _local2.objectEncoding = ObjectEncoding.AMF3; _local2.writeObject(_arg1); _local2.compress(); return (_local2); } public function errorHandler(_arg1:IOErrorEvent):void{ data = null; error = _arg1; if (callback != null){ performCallback(); } else { dispatchEvent(_arg1); }; close(); } public function putEvent(_arg1):void{ request("put", serialize(_arg1)); } public function deserialize(_arg1:ByteArray){ _arg1.objectEncoding = ObjectEncoding.AMF3; _arg1.uncompress(); return (_arg1.readObject()); } public function securityErrorHandler(_arg1:SecurityErrorEvent):void{ errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, ("security error: " + _arg1.toString()))); } public function getEvent():void{ request("get", serialize(null)); } override public function toString():String{ return ((((((((("[MochiUserData operation=" + operation) + " key=\"") + key) + "\" data=") + data) + " error=\"") + error) + "\"]")); } public function performCallback():void{ try { callback(this); } catch(e:Error) { trace(("[MochiUserData] exception during callback: " + e)); }; } public function request(_arg1:String, _arg2:ByteArray):void{ var _operation = _arg1; var _data = _arg2; operation = _operation; var api_url:String = MochiSocial.getAPIURL(); var api_token:String = MochiSocial.getAPIToken(); if ((((api_url == null)) || ((api_token == null)))){ errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, "not logged in")); return; }; _loader = new URLLoader(); var args:URLVariables = new URLVariables(); args.op = _operation; args.key = key; var req:URLRequest = new URLRequest((((MochiSocial.getAPIURL() + "/") + "MochiUserData?") + args.toString())); req.method = URLRequestMethod.POST; req.contentType = "application/x-mochi-userdata"; req.requestHeaders = [new URLRequestHeader("x-mochi-services-version", MochiServices.getVersion()), new URLRequestHeader("x-mochi-api-token", api_token)]; req.data = _data; _loader.dataFormat = URLLoaderDataFormat.BINARY; _loader.addEventListener(Event.COMPLETE, completeHandler); _loader.addEventListener(IOErrorEvent.IO_ERROR, errorHandler); _loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler); try { _loader.load(req); } catch(e:SecurityError) { errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, ("security error: " + e.toString()))); }; } public function completeHandler(_arg1:Event):void{ var event = _arg1; try { if (_loader.data.length){ data = deserialize(_loader.data); } else { data = null; }; } catch(e:Error) { errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, ("deserialize error: " + e.toString()))); return; }; if (callback != null){ performCallback(); } else { dispatchEvent(event); }; close(); } public function close():void{ if (_loader){ _loader.removeEventListener(Event.COMPLETE, completeHandler); _loader.removeEventListener(IOErrorEvent.IO_ERROR, errorHandler); _loader.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler); _loader.close(); _loader = null; }; error = null; callback = null; } public static function get(_arg1:String, _arg2:Function):void{ var _local3:MochiUserData = new MochiUserData(_arg1, _arg2); _local3.getEvent(); } public static function put(_arg1:String, _arg2, _arg3:Function):void{ var _local4:MochiUserData = new MochiUserData(_arg1, _arg3); _local4.putEvent(_arg2); } } }//package mochi.as3
Section 149
//CMove (Movements.CMove) package Movements { import Application.*; import Services.*; import RunLoop.*; import Objects.*; public class CMove { public var rmAcc:int; public var rmDec:int; public var rmAccValue:int; public var rmCollisionCount:int; public var hoPtr:CObject; public var rmStopSpeed:int; public var rmDecValue:int; public var rmOpt:int; public static var accelerators:Array = [2, 3, 4, 6, 8, 10, 12, 16, 20, 24, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120, 144, 160, 176, 192, 208, 224, 240, 0x0100, 272, 288, 320, 336, 352, 368, 384, 400, 416, 432, 448, 480, 0x0200, 544, 560, 592, 624, 640, 672, 688, 720, 736, 0x0300, 784, 816, 848, 864, 896, 928, 944, 976, 992, 0x0400, 1120, 1216, 1312, 1440, 0x0600, 1632, 1728, 1824, 1952, 0x0800, 2240, 2432, 2688, 2880, 0x0C00, 3264, 3456, 3712, 3904, 0x1000, 6544, 4914, 5216, 5732, 0x1800, 6553, 6962, 7366, 7780, 0x2000, 9836, 11672, 13316, 14960, 16604, 18248, 19892, 0x5400, 0x6400, 0x6400]; public static var Cosinus32:Array = [0x0100, 251, 236, 212, 181, 142, 97, 49, 0, -49, -97, -142, -181, -212, -236, -251, -256, -251, -236, -212, -181, -142, -97, -49, 0, 49, 97, 142, 181, 212, 236, 251]; public static var mvap_TableDirs:Array = [0, -2, 0, 2, 0, -4, 0, 4, 0, -8, 0, 8, -4, 0, -8, 0, 0, 0, -2, -2, 2, 2, -4, -4, 4, 4, -8, -8, 8, 8, -4, 4, -8, 8, 0, 0, -2, 0, 2, 0, -4, 0, 4, 0, -8, 0, 8, 0, 0, 4, 0, 8, 0, 0, -2, 2, 2, -2, -4, 4, 4, -4, -8, 8, 8, -8, 4, 4, 8, 8, 0, 0, 0, 2, 0, -2, 0, 4, 0, -4, 0, 8, 0, -8, 4, 0, 8, 0, 0, 0, 2, 2, -2, -2, 4, 4, -4, -4, 8, 8, -8, -8, 4, -4, 8, -8, 0, 0, 2, 0, -2, 0, 4, 0, -4, 0, 8, 0, -8, 0, 0, -4, 0, -8, 0, 0, 2, -2, -2, 2, 4, -4, -4, 4, 8, -8, -8, 8, -4, -4, -8, -8, 0, 0]; public static var CosSurSin32:Array = [2599, 0, 844, 31, 479, 30, 312, 29, 210, 28, 137, 27, 78, 26, 25, 25, 0, 24]; public static var Joy2Dir:Array = [-1, 8, 24, -1, 16, 12, 20, 16, 0, 4, 28, 0, -1, 8, 24, -1]; public static var Sinus32:Array = [0, -49, -97, -142, -181, -212, -236, -251, -256, -251, -236, -212, -181, -142, -97, -49, 0, 49, 97, 142, 181, 212, 236, 251, 0x0100, 251, 236, 212, 181, 142, 97, 49]; public static var MVTOPT_8DIR_STICK:int = 1; public function setDec(_arg1:int):void{ var _local2:CMoveExtension; if (_arg1 > 250){ _arg1 = 250; }; if (_arg1 < 0){ _arg1 = 0; }; rmDec = _arg1; rmDecValue = getAccelerator(_arg1); if (hoPtr.roc.rcMovementType == CMoveDef.MVTYPE_EXT){ _local2 = CMoveExtension(this); _local2.movement.setDec(_arg1); }; } public function mbApproachSprite(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:Boolean, _arg6:CPoint):Boolean{ var _local13:int; var _local14:int; var _local7:int = _arg1; var _local8:int = _arg2; var _local9:int = _arg3; var _local10:int = _arg4; var _local11:int = ((_local7 + _local9) / 2); var _local12:int = ((_local8 + _local10) / 2); do { if (tst_Position(_local11, _local12, _arg5)){ _local9 = _local11; _local10 = _local12; _local13 = _local11; _local14 = _local12; _local11 = ((_local9 + _local7) / 2); _local12 = ((_local10 + _local8) / 2); if ((((_local11 == _local13)) && ((_local12 == _local14)))){ if (((!((_local9 == _local7))) || (!((_local10 == _local8))))){ if (tst_Position(_local7, _local8, _arg5)){ _local11 = _local7; _local12 = _local8; }; }; _arg6.x = _local11; _arg6.y = _local12; return (true); }; } else { _local7 = _local11; _local8 = _local12; _local13 = _local11; _local14 = _local12; _local11 = ((_local9 + _local7) / 2); _local12 = ((_local10 + _local8) / 2); if ((((_local11 == _local13)) && ((_local12 == _local14)))){ if (((!((_local9 == _local7))) || (!((_local10 == _local8))))){ if (tst_Position(_local9, _local10, _arg5)){ _arg6.x = _local9; _arg6.y = _local10; return (true); }; }; _arg6.x = _local11; _arg6.y = _local12; return (false); }; }; } while (true); return (false); } public function reverse():void{ } public function getGravity():int{ var _local1:CMovePlatform; var _local2:CMoveExtension; if (hoPtr.roc.rcMovementType == CMoveDef.MVTYPE_PLATFORM){ _local1 = CMovePlatform(this); return (_local1.MP_Gravity); }; if (hoPtr.roc.rcMovementType == CMoveDef.MVTYPE_EXT){ _local2 = CMoveExtension(this); return (_local2.movement.getGravity()); }; return (0); } public function bounce():void{ } public function stop():void{ } public function setYPosition(_arg1:int):void{ } public function mpApproachSprite(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:CPoint):Boolean{ var _local14:int; var _local15:int; var _local8:int = _arg1; var _local9:int = _arg2; var _local10:int = _arg3; var _local11:int = _arg4; var _local12:int = ((_local8 + _local10) / 2); var _local13:int = ((_local9 + _local11) / 2); do { if (tst_SpritePosition((_local12 + hoPtr.hoAdRunHeader.rhWindowX), (_local13 + hoPtr.hoAdRunHeader.rhWindowY), _arg5, _arg6, false)){ _local10 = _local12; _local11 = _local13; _local14 = _local12; _local15 = _local13; _local12 = ((_local10 + _local8) / 2); _local13 = ((_local11 + _local9) / 2); if ((((_local12 == _local14)) && ((_local13 == _local15)))){ if (((!((_local10 == _local8))) || (!((_local11 == _local9))))){ if (tst_SpritePosition((_local8 + hoPtr.hoAdRunHeader.rhWindowX), (_local9 + hoPtr.hoAdRunHeader.rhWindowY), _arg5, _arg6, false)){ _local12 = _local8; _local13 = _local9; }; }; _arg7.x = _local12; _arg7.y = _local13; return (true); }; } else { _local8 = _local12; _local9 = _local13; _local14 = _local12; _local15 = _local13; _local12 = ((_local10 + _local8) / 2); _local13 = ((_local11 + _local9) / 2); if ((((_local12 == _local14)) && ((_local13 == _local15)))){ if (((!((_local10 == _local8))) || (!((_local11 == _local9))))){ if (tst_SpritePosition((_local10 + hoPtr.hoAdRunHeader.rhWindowX), (_local11 + hoPtr.hoAdRunHeader.rhWindowY), _arg5, _arg6, false)){ _arg7.x = _local10; _arg7.y = _local11; return (true); }; }; _arg7.x = _local12; _arg7.y = _local13; return (false); }; }; } while (true); return (false); } public function getSpeed():int{ var _local1:CMoveExtension; if (hoPtr.roc.rcMovementType == CMoveDef.MVTYPE_EXT){ _local1 = CMoveExtension(this); return (_local1.movement.getSpeed()); }; return (hoPtr.roc.rcSpeed); } public function getAcc():int{ var _local1:CMoveExtension; if (hoPtr.roc.rcMovementType == CMoveDef.MVTYPE_EXT){ _local1 = CMoveExtension(this); return (_local1.movement.getAcceleration()); }; return (rmAcc); } public function setGravity(_arg1:int):void{ var _local2:CMovePlatform; var _local3:CMoveExtension; if (_arg1 > 250){ _arg1 = 250; }; if (_arg1 < 0){ _arg1 = 0; }; if (hoPtr.roc.rcMovementType == CMoveDef.MVTYPE_PLATFORM){ _local2 = CMovePlatform(this); _local2.setGravity(_arg1); }; if (hoPtr.roc.rcMovementType == CMoveDef.MVTYPE_EXT){ _local3 = CMoveExtension(this); _local3.movement.setGravity(_arg1); }; } public function init(_arg1:CObject, _arg2:CMoveDef):void{ } public function tst_SpritePosition(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:Boolean):Boolean{ var _local6:int; var _local10:int; var _local11:int; var _local12:int; var _local13:CObject; var _local14:int; var _local15:int; _local6 = -1; if (_arg5){ _local6 = hoPtr.hoOi; }; var _local7:CObjInfo = hoPtr.hoOiList; if ((_local7.oilLimitFlags & 15) != 0){ _local11 = (_arg1 - hoPtr.hoImgXSpot); _local12 = (_arg2 - hoPtr.hoImgYSpot); if ((hoPtr.hoAdRunHeader.quadran_Out(_local11, _local12, (_local11 + hoPtr.hoImgWidth), (_local12 + hoPtr.hoImgHeight)) & _local7.oilLimitFlags) != 0){ return (false); }; }; if ((_local7.oilLimitFlags & 16) != 0){ if (hoPtr.hoAdRunHeader.colMask_TestObject_IXY(hoPtr, hoPtr.roc.rcImage, hoPtr.roc.rcAngle, hoPtr.roc.rcScaleX, hoPtr.roc.rcScaleY, _arg1, _arg2, _arg3, _arg4)){ return (false); }; }; if (_local7.oilLimitList == -1){ return (true); }; var _local8:CArrayList = hoPtr.hoAdRunHeader.objectAllCol_IXY(hoPtr, hoPtr.roc.rcImage, hoPtr.roc.rcAngle, hoPtr.roc.rcScaleX, hoPtr.roc.rcScaleY, _arg1, _arg2, _local7.oilColList); if (_local8 == null){ return (true); }; var _local9:Array = hoPtr.hoAdRunHeader.rhEvtProg.limitBuffer; _local10 = 0; while (_local10 < _local8.size()) { _local13 = CObject(_local8.get(_local10)); _local14 = _local13.hoOi; if (_local14 != _local6){ _local15 = _local7.oilLimitList; while (_local9[_local15] >= 0) { if (_local9[_local15] == _local14){ return (false); }; _local15++; }; }; _local10++; }; return (true); } public function setDir(_arg1:int):void{ } public function setSpeed(_arg1:int):void{ } public function mv_Approach(_arg1:Boolean):void{ var _local3:int; var _local4:int; var _local5:int; var _local6:int; if (_arg1){ mb_Approach(false); return; }; var _local2:Boolean; switch ((hoPtr.hoAdRunHeader.rhEvtProg.rhCurCode & 4294901760)){ case (-12 << 16): _local3 = (hoPtr.hoX - hoPtr.hoImgXSpot); _local4 = (hoPtr.hoY - hoPtr.hoImgYSpot); _local5 = hoPtr.hoAdRunHeader.quadran_Out(_local3, _local4, (_local3 + hoPtr.hoImgWidth), (_local4 + hoPtr.hoImgHeight)); _local3 = hoPtr.hoX; _local4 = hoPtr.hoY; if ((_local5 & CRun.BORDER_LEFT) != 0){ _local3 = hoPtr.hoImgXSpot; }; if ((_local5 & CRun.BORDER_RIGHT) != 0){ _local3 = ((hoPtr.hoAdRunHeader.rhLevelSx - hoPtr.hoImgWidth) + hoPtr.hoImgXSpot); }; if ((_local5 & CRun.BORDER_TOP) != 0){ _local4 = hoPtr.hoImgYSpot; }; if ((_local5 & CRun.BORDER_BOTTOM) != 0){ _local4 = ((hoPtr.hoAdRunHeader.rhLevelSy - hoPtr.hoImgHeight) + hoPtr.hoImgYSpot); }; hoPtr.hoX = _local3; hoPtr.hoY = _local4; return; case (-13 << 16): case (-14 << 16): _local6 = ((hoPtr.roc.rcDir >> 2) * 18); do { if (tst_Position((hoPtr.hoX + mvap_TableDirs[_local6]), (hoPtr.hoY + mvap_TableDirs[(_local6 + 1)]), _local2)){ hoPtr.hoX = (hoPtr.hoX + mvap_TableDirs[_local6]); hoPtr.hoY = (hoPtr.hoY + mvap_TableDirs[(_local6 + 1)]); return; }; _local6 = (_local6 + 2); } while (((!((mvap_TableDirs[_local6] == 0))) || (!((mvap_TableDirs[(_local6 + 1)] == 0))))); if (_local2 == false){ hoPtr.hoX = hoPtr.roc.rcOldX; hoPtr.hoY = hoPtr.roc.rcOldY; hoPtr.roc.rcImage = hoPtr.roc.rcOldImage; hoPtr.roc.rcAngle = hoPtr.roc.rcOldAngle; return; }; break; default: break; }; } public function move():void{ } public function setXPosition(_arg1:int):void{ } public function newMake_Move(_arg1:int, _arg2:int):Boolean{ var _local3:int; var _local4:int; var _local5:int; hoPtr.hoAdRunHeader.rh3CollisionCount++; rmCollisionCount = hoPtr.hoAdRunHeader.rh3CollisionCount; hoPtr.rom.rmMoveFlag = false; if (_arg1 == 0){ hoPtr.hoAdRunHeader.newHandle_Collisions(hoPtr); return (false); }; if ((hoPtr.hoAdRunHeader.rhFrame.leFlags & CRunFrame.LEF_TIMEDMVTS) != 0){ _local5 = int(((Number(_arg1) * hoPtr.hoAdRunHeader.rh4MvtTimerCoef) * 32)); } else { _local5 = (_arg1 << 5); }; while (_local5 > 0x0800) { _local3 = ((hoPtr.hoX << 16) | (hoPtr.hoCalculX & 0xFFFF)); _local4 = ((hoPtr.hoY << 16) | (hoPtr.hoCalculY & 0xFFFF)); _local3 = (_local3 + (Cosinus32[_arg2] * 0x0800)); _local4 = (_local4 + (Sinus32[_arg2] * 0x0800)); hoPtr.hoCalculX = (_local3 & 0xFFFF); hoPtr.hoX = (_local3 >> 16); hoPtr.hoCalculY = (_local4 & 0xFFFF); hoPtr.hoY = (_local4 >> 16); if (hoPtr.hoAdRunHeader.newHandle_Collisions(hoPtr)){ return (true); }; if (hoPtr.rom.rmMoveFlag){ break; }; _local5 = (_local5 - 0x0800); }; if (!hoPtr.rom.rmMoveFlag){ _local3 = ((hoPtr.hoX << 16) | (hoPtr.hoCalculX & 0xFFFF)); _local4 = ((hoPtr.hoY << 16) | (hoPtr.hoCalculY & 0xFFFF)); _local3 = (_local3 + (Cosinus32[_arg2] * _local5)); _local4 = (_local4 + (Sinus32[_arg2] * _local5)); hoPtr.hoCalculX = (_local3 & 0xFFFF); hoPtr.hoX = (_local3 >> 16); hoPtr.hoCalculY = (_local4 & 0xFFFF); hoPtr.hoY = (_local4 >> 16); if (hoPtr.hoAdRunHeader.newHandle_Collisions(hoPtr)){ return (true); }; }; hoPtr.roc.rcChanged = true; if (!hoPtr.rom.rmMoveFlag){ hoPtr.hoAdRunHeader.rhVBLObjet = 0; }; return (hoPtr.rom.rmMoveFlag); } public function getDec():int{ var _local1:CMoveExtension; if (hoPtr.roc.rcMovementType == CMoveDef.MVTYPE_EXT){ _local1 = CMoveExtension(this); return (_local1.movement.getDeceleration()); }; return (rmDec); } public function moveAtStart(_arg1:CMoveDef):void{ if (_arg1.mvMoveAtStart == 0){ stop(); }; } public function start():void{ } public function kill():void{ } public function mb_Approach(_arg1:Boolean):void{ var _local2:int; var _local3:int; var _local4:int; var _local5:CPoint; var _local6:int; switch ((hoPtr.hoAdRunHeader.rhEvtProg.rhCurCode & 4294901760)){ case (-12 << 16): _local2 = (hoPtr.hoX - hoPtr.hoImgXSpot); _local3 = (hoPtr.hoY - hoPtr.hoImgYSpot); _local4 = hoPtr.hoAdRunHeader.quadran_Out(_local2, _local3, (_local2 + hoPtr.hoImgWidth), (_local3 + hoPtr.hoImgHeight)); _local2 = hoPtr.hoX; _local3 = hoPtr.hoY; if ((_local4 & CRun.BORDER_LEFT) != 0){ _local2 = hoPtr.hoImgXSpot; }; if ((_local4 & CRun.BORDER_RIGHT) != 0){ _local2 = ((hoPtr.hoAdRunHeader.rhLevelSx - hoPtr.hoImgWidth) + hoPtr.hoImgXSpot); }; if ((_local4 & CRun.BORDER_TOP) != 0){ _local3 = hoPtr.hoImgYSpot; }; if ((_local4 & CRun.BORDER_BOTTOM) != 0){ _local3 = ((hoPtr.hoAdRunHeader.rhLevelSy - hoPtr.hoImgHeight) + hoPtr.hoImgYSpot); }; hoPtr.hoX = _local2; hoPtr.hoY = _local3; return; case (-13 << 16): case (-14 << 16): _local5 = new CPoint(); if (mbApproachSprite(hoPtr.hoX, hoPtr.hoY, hoPtr.roc.rcOldX, hoPtr.roc.rcOldY, _arg1, _local5)){ hoPtr.hoX = _local5.x; hoPtr.hoY = _local5.y; return; }; _local6 = ((hoPtr.roc.rcDir >> 2) * 18); do { if (tst_Position((hoPtr.hoX + mvap_TableDirs[_local6]), (hoPtr.hoY + mvap_TableDirs[(_local6 + 1)]), _arg1)){ hoPtr.hoX = (hoPtr.hoX + mvap_TableDirs[_local6]); hoPtr.hoY = (hoPtr.hoY + mvap_TableDirs[(_local6 + 1)]); return; }; _local6 = (_local6 + 2); } while (((!((mvap_TableDirs[_local6] == 0))) || (!((mvap_TableDirs[(_local6 + 1)] == 0))))); if (_arg1 == false){ hoPtr.hoX = hoPtr.roc.rcOldX; hoPtr.hoY = hoPtr.roc.rcOldY; hoPtr.roc.rcImage = hoPtr.roc.rcOldImage; hoPtr.roc.rcAngle = hoPtr.roc.rcOldAngle; return; }; break; default: break; }; } public function tst_Position(_arg1:int, _arg2:int, _arg3:Boolean):Boolean{ var _local4:int; var _local8:int; var _local9:int; var _local10:int; var _local11:int; var _local12:CObject; var _local13:int; var _local14:int; _local4 = -1; if (_arg3){ _local4 = hoPtr.hoOi; }; var _local5:CObjInfo = hoPtr.hoOiList; if ((_local5.oilLimitFlags & 15) != 0){ _local9 = (_arg1 - hoPtr.hoImgXSpot); _local10 = (_arg2 - hoPtr.hoImgYSpot); _local11 = hoPtr.hoAdRunHeader.quadran_Out(_local9, _local10, (_local9 + hoPtr.hoImgWidth), (_local10 + hoPtr.hoImgHeight)); if ((_local11 & _local5.oilLimitFlags) != 0){ return (false); }; }; if ((_local5.oilLimitFlags & 16) != 0){ if (hoPtr.hoAdRunHeader.colMask_TestObject_IXY(hoPtr, hoPtr.roc.rcImage, hoPtr.roc.rcAngle, hoPtr.roc.rcScaleX, hoPtr.roc.rcScaleY, _arg1, _arg2, 0, CRunFrame.CM_TEST_PLATFORM)){ return (false); }; }; if (_local5.oilLimitList == -1){ return (true); }; var _local6:CArrayList = hoPtr.hoAdRunHeader.objectAllCol_IXY(hoPtr, hoPtr.roc.rcImage, hoPtr.roc.rcAngle, hoPtr.roc.rcScaleX, hoPtr.roc.rcScaleY, _arg1, _arg2, _local5.oilColList); if (_local6 == null){ return (true); }; var _local7:Array = hoPtr.hoAdRunHeader.rhEvtProg.limitBuffer; _local8 = 0; while (_local8 < _local6.size()) { _local12 = CObject(_local6.get(_local8)); _local13 = _local12.hoOi; if (_local13 != _local4){ _local14 = _local5.oilLimitList; while (_local7[_local14] >= 0) { if (_local7[_local14] == _local13){ return (false); }; _local14++; }; }; _local8++; }; return (true); } public function getAccelerator(_arg1:int):int{ if (_arg1 <= 100){ return (accelerators[_arg1]); }; return ((_arg1 << 8)); } public function setRotSpeed(_arg1:int):void{ var _local2:CMoveRace; var _local3:CMoveExtension; if (_arg1 > 250){ _arg1 = 250; }; if (_arg1 < 0){ _arg1 = 0; }; if (hoPtr.roc.rcMovementType == CMoveDef.MVTYPE_RACE){ _local2 = CMoveRace(this); _local2.setRotSpeed(_arg1); }; if (hoPtr.roc.rcMovementType == CMoveDef.MVTYPE_EXT){ _local3 = CMoveExtension(this); _local3.movement.setRotSpeed(_arg1); }; } public function set8Dirs(_arg1:int):void{ var _local2:CMoveGeneric; var _local3:CMoveExtension; if (hoPtr.roc.rcMovementType == CMoveDef.MVTYPE_GENERIC){ _local2 = CMoveGeneric(this); _local2.set8DirsGeneric(_arg1); }; if (hoPtr.roc.rcMovementType == CMoveDef.MVTYPE_EXT){ _local3 = CMoveExtension(this); _local3.movement.set8Dirs(_arg1); }; } public function setMaxSpeed(_arg1:int):void{ } public function setAcc(_arg1:int):void{ var _local2:CMoveExtension; if (_arg1 > 250){ _arg1 = 250; }; if (_arg1 < 0){ _arg1 = 0; }; rmAcc = _arg1; rmAccValue = getAccelerator(_arg1); if (hoPtr.roc.rcMovementType == CMoveDef.MVTYPE_EXT){ _local2 = CMoveExtension(this); _local2.movement.setAcc(_arg1); }; } public static function getDeltaX(_arg1:int, _arg2:int):int{ return (((_arg1 * Cosinus32[_arg2]) / 0x0100)); } public static function getDeltaY(_arg1:int, _arg2:int):int{ return (((_arg1 * Sinus32[_arg2]) / 0x0100)); } } }//package Movements
Section 150
//CMoveBall (Movements.CMoveBall) package Movements { import Application.*; import Objects.*; import Animations.*; public class CMoveBall extends CMove { public var MB_Angles:int; public var MB_LastBounce:int; public var MB_Bounce:int; public var MB_StartDir:int; public var MB_Blocked:Boolean; public var MB_MaskBounce:int; public var MB_Securite:int; public var MB_SecuCpt:int; public var MB_Speed:int; public static var PlusAnglesTry:Array = [-4, 4, -4, 4, -4, 4]; public static var MaskBounce:Array = [4294967292, 4294967294, 4294967295]; public static var rebond_List:Array = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 30, 31, 0, 1, 4, 3, 2, 1, 0, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 24, 25, 26, 27, 27, 28, 28, 28, 28, 29, 29, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 16, 17, 18, 19, 19, 20, 20, 20, 20, 21, 21, 22, 23, 24, 25, 28, 27, 26, 25, 0, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 20, 21, 22, 22, 23, 24, 24, 24, 24, 25, 26, 27, 28, 29, 30, 8, 7, 6, 5, 4, 8, 9, 10, 11, 11, 12, 12, 12, 12, 13, 13, 14, 15, 16, 17, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 16, 15, 14, 13, 12, 11, 10, 9, 8, 12, 13, 14, 15, 15, 16, 16, 16, 16, 17, 17, 18, 19, 20, 21, 24, 23, 22, 21, 20, 19, 18, 17, 16, 17, 18, 19, 20, 21, 22, 23, 24, 23, 22, 21, 20, 19, 18, 17, 16, 17, 18, 19, 20, 21, 22, 23, 24, 23, 22, 21, 20, 19, 18, 17, 3, 3, 4, 4, 4, 4, 5, 5, 6, 7, 8, 9, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 31, 30, 29, 28, 0, 1, 2, 0, 0, 1, 1, 2, 3, 4, 5, 8, 7, 6, 5, 4, 3, 2, 1, 0, 31, 30, 29, 28, 27, 26, 25, 24, 28, 29, 30, 31, 31, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 0, 31, 30, 29, 28, 27, 26, 25, 24, 25, 26, 27, 28, 29, 30, 31, 0, 31, 30, 29, 28, 27, 25, 25, 24, 25, 26, 27, 28, 29, 30, 31, 0, 4, 5, 6, 7, 7, 8, 8, 8, 8, 9, 9, 10, 11, 12, 13, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 5, 4, 3, 2, 1, 16, 15, 14, 13, 12, 11, 10, 9, 8, 9, 10, 11, 12, 13, 14, 15, 16, 15, 14, 13, 12, 11, 10, 9, 8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31]; public static var PlusAngles:Array = [-4, 4, -2, 2, -1, 1]; override public function setYPosition(_arg1:int):void{ if (hoPtr.hoY != _arg1){ hoPtr.hoY = _arg1; hoPtr.rom.rmMoveFlag = true; hoPtr.roc.rcChanged = true; hoPtr.roc.rcCheckCollides = true; }; } override public function stop():void{ if (rmStopSpeed == 0){ rmStopSpeed = (hoPtr.roc.rcSpeed | 0x8000); hoPtr.roc.rcSpeed = 0; MB_Speed = 0; hoPtr.rom.rmMoveFlag = true; }; } override public function setSpeed(_arg1:int):void{ if (_arg1 < 0){ _arg1 = 0; }; if (_arg1 > 250){ _arg1 = 250; }; hoPtr.roc.rcSpeed = _arg1; MB_Speed = (_arg1 << 8); rmStopSpeed = 0; hoPtr.rom.rmMoveFlag = true; } override public function bounce():void{ var _local6:int; var _local7:int; var _local8:Boolean; if (rmStopSpeed != 0){ return; }; if (hoPtr.hoAdRunHeader.rhLoopCount == MB_LastBounce){ return; }; MB_LastBounce = hoPtr.hoAdRunHeader.rhLoopCount; if (rmCollisionCount == hoPtr.hoAdRunHeader.rh3CollisionCount){ mb_Approach(MB_Blocked); }; var _local1:int = hoPtr.hoX; var _local2:int = hoPtr.hoY; var _local3:int; _local1 = (_local1 - 8); _local2 = (_local2 - 8); if (tst_Position(_local1, _local2, MB_Blocked) == false){ _local3 = (_local3 | 1); }; _local1 = (_local1 + 16); if (tst_Position(_local1, _local2, MB_Blocked) == false){ _local3 = (_local3 | 2); }; _local2 = (_local2 + 16); if (tst_Position(_local1, _local2, MB_Blocked) == false){ _local3 = (_local3 | 4); }; _local1 = (_local1 - 16); if (tst_Position(_local1, _local2, MB_Blocked) == false){ _local3 = (_local3 | 8); }; var _local4:int = rebond_List[((_local3 * 32) + hoPtr.roc.rcDir)]; _local4 = (_local4 & MB_MaskBounce); if (!mvb_Test(_local4)){ _local6 = PlusAnglesTry[((MB_Angles * 2) + 1)]; _local7 = _local6; _local8 = false; do { _local4 = (_local4 - _local6); _local4 = (_local4 & 31); } while (!(mvb_Test(_local4))); if (_local8 == false){ MB_Blocked = true; hoPtr.roc.rcDir = (hoPtr.hoAdRunHeader.random(32) & MB_MaskBounce); hoPtr.rom.rmBouncing = true; hoPtr.rom.rmMoveFlag = true; return; }; }; MB_Blocked = false; hoPtr.roc.rcDir = _local4; var _local5:int = hoPtr.hoAdRunHeader.random(100); if (_local5 < MB_Bounce){ _local5 = (_local5 >> 2); if (_local5 < 25){ _local5 = (_local5 - 12); _local5 = (_local5 & 31); _local5 = (_local5 & MB_MaskBounce); if (mvb_Test(_local5)){ hoPtr.roc.rcDir = _local5; hoPtr.rom.rmBouncing = true; hoPtr.rom.rmMoveFlag = true; return; }; }; }; _local4 = (hoPtr.roc.rcDir & 7); if (MB_SecuCpt != 12){ if (_local4 == 0){ MB_SecuCpt--; if (MB_SecuCpt < 0){ _local4 = (hoPtr.roc.rcDir + PlusAngles[(hoPtr.hoAdRunHeader.random(2) + (MB_Angles * 2))]); _local4 = (_local4 & 31); if (mvb_Test(_local4)){ hoPtr.roc.rcDir = _local4; MB_SecuCpt = MB_Securite; }; }; } else { MB_SecuCpt = MB_Securite; }; }; hoPtr.rom.rmBouncing = true; hoPtr.rom.rmMoveFlag = true; } override public function setDir(_arg1:int):void{ } override public function setMaxSpeed(_arg1:int):void{ setSpeed(_arg1); } override public function move():void{ var _local1:int; var _local2:int; hoPtr.rom.rmBouncing = false; hoPtr.hoAdRunHeader.rhVBLObjet = 1; hoPtr.roc.rcAnim = CAnim.ANIMID_WALK; if (hoPtr.roa != null){ hoPtr.roa.animate(); }; if (rmDecValue != 0){ _local1 = MB_Speed; if (_local1 > 0){ _local2 = rmDecValue; if ((hoPtr.hoAdRunHeader.rhFrame.leFlags & CRunFrame.LEF_TIMEDMVTS) != 0){ _local2 = (Number(_local2) * hoPtr.hoAdRunHeader.rh4MvtTimerCoef); }; _local1 = (_local1 - _local2); if (_local1 < 0){ _local1 = 0; }; MB_Speed = _local1; _local1 = (_local1 >> 8); hoPtr.roc.rcSpeed = _local1; }; }; newMake_Move(hoPtr.roc.rcSpeed, hoPtr.roc.rcDir); } override public function init(_arg1:CObject, _arg2:CMoveDef):void{ hoPtr = _arg1; var _local3:CMoveDefBall = CMoveDefBall(_arg2); hoPtr.hoCalculX = 0; hoPtr.hoCalculY = 0; hoPtr.roc.rcSpeed = _local3.mbSpeed; hoPtr.roc.rcMaxSpeed = _local3.mbSpeed; hoPtr.roc.rcMinSpeed = _local3.mbSpeed; MB_Speed = (_local3.mbSpeed << 8); var _local4:int = _local3.mbDecelerate; if (_local4 != 0){ _local4 = getAccelerator(_local4); hoPtr.roc.rcMinSpeed = 0; }; rmDecValue = _local4; MB_Bounce = _local3.mbBounce; MB_Angles = _local3.mbAngles; MB_MaskBounce = MaskBounce[MB_Angles]; MB_Blocked = false; MB_LastBounce = -1; MB_Securite = ((100 - _local3.mbSecurity) / 8); MB_SecuCpt = MB_Securite; moveAtStart(_arg2); hoPtr.roc.rcChanged = true; } public function mvb_Test(_arg1:int):Boolean{ var _local2 = ((hoPtr.hoX << 16) | (hoPtr.hoCalculX & 0xFFFF)); var _local3 = ((hoPtr.hoY << 16) | (hoPtr.hoCalculY & 0xFFFF)); var _local4:int = ((Cosinus32[_arg1] << 11) + _local2); var _local5:int = ((Sinus32[_arg1] << 11) + _local3); _local4 = (_local4 >>> 16); _local5 = (_local5 >>> 16); return (tst_Position(_local4, _local5, false)); } override public function kill():void{ } override public function start():void{ var _local1:int = rmStopSpeed; if (_local1 != 0){ _local1 = (_local1 & 32767); hoPtr.roc.rcSpeed = _local1; MB_Speed = (_local1 << 8); rmStopSpeed = 0; hoPtr.rom.rmMoveFlag = true; }; } override public function reverse():void{ if (rmStopSpeed == 0){ hoPtr.rom.rmMoveFlag = true; hoPtr.roc.rcDir = (hoPtr.roc.rcDir + 16); hoPtr.roc.rcDir = (hoPtr.roc.rcDir & 31); }; } override public function setXPosition(_arg1:int):void{ if (hoPtr.hoX != _arg1){ hoPtr.hoX = _arg1; hoPtr.rom.rmMoveFlag = true; hoPtr.roc.rcChanged = true; hoPtr.roc.rcCheckCollides = true; }; } } }//package Movements
Section 151
//CMoveBullet (Movements.CMoveBullet) package Movements { import RunLoop.*; import Objects.*; import Sprites.*; import Animations.*; public class CMoveBullet extends CMove { public var MBul_Wait:Boolean; public var MBul_ShootObject:CObject; override public function init(_arg1:CObject, _arg2:CMoveDef):void{ hoPtr = _arg1; if (hoPtr.ros != null){ hoPtr.ros.setColFlag(false); }; if (hoPtr.ros != null){ hoPtr.ros.rsFlags = (hoPtr.ros.rsFlags & ~(CRSpr.RSFLAG_VISIBLE)); hoPtr.ros.obHide(); }; MBul_Wait = true; hoPtr.hoCalculX = 0; hoPtr.hoCalculY = 0; if (hoPtr.roa != null){ hoPtr.roa.init_Animation(CAnim.ANIMID_WALK); }; hoPtr.roc.rcSpeed = 0; hoPtr.roc.rcCheckCollides = true; hoPtr.roc.rcChanged = true; } override public function move():void{ if (MBul_Wait){ if (MBul_ShootObject.roa != null){ if (MBul_ShootObject.roa.raAnimOn == CAnim.ANIMID_SHOOT){ return; }; }; startBullet(); }; if (hoPtr.roa != null){ hoPtr.roa.animate(); }; newMake_Move(hoPtr.roc.rcSpeed, hoPtr.roc.rcDir); if (CRun.bMoveChanged){ return; }; if ((((((((hoPtr.hoX < -64)) || ((hoPtr.hoX > (hoPtr.hoAdRunHeader.rhLevelSx + 64))))) || ((hoPtr.hoY < -64)))) || ((hoPtr.hoY > (hoPtr.hoAdRunHeader.rhLevelSy + 64))))){ hoPtr.hoCallRoutine = false; hoPtr.hoAdRunHeader.destroy_Add(hoPtr.hoNumber); }; if (hoPtr.roc.rcCheckCollides){ hoPtr.roc.rcCheckCollides = false; hoPtr.hoAdRunHeader.newHandle_Collisions(hoPtr); }; } public function init2(_arg1:CObject):void{ hoPtr.roc.rcMaxSpeed = hoPtr.roc.rcSpeed; hoPtr.roc.rcMinSpeed = hoPtr.roc.rcSpeed; MBul_ShootObject = _arg1; } public function startBullet():void{ if (hoPtr.ros != null){ hoPtr.ros.setColFlag(true); }; if (hoPtr.ros != null){ hoPtr.ros.rsFlags = (hoPtr.ros.rsFlags | CRSpr.RSFLAG_VISIBLE); hoPtr.ros.obShow(); }; MBul_Wait = false; MBul_ShootObject = null; } override public function setYPosition(_arg1:int):void{ if (hoPtr.hoY != _arg1){ hoPtr.hoY = _arg1; hoPtr.rom.rmMoveFlag = true; hoPtr.roc.rcChanged = true; hoPtr.roc.rcCheckCollides = true; }; } override public function setXPosition(_arg1:int):void{ if (hoPtr.hoX != _arg1){ hoPtr.hoX = _arg1; hoPtr.rom.rmMoveFlag = true; hoPtr.roc.rcChanged = true; hoPtr.roc.rcCheckCollides = true; }; } } }//package Movements
Section 152
//CMoveDef (Movements.CMoveDef) package Movements { import Services.*; public class CMoveDef { public var mvType:int; public var mvOpt:int; public var mvDirAtStart:int; public var mvControl:int; public var mvMoveAtStart:int; public static var MVTYPE_BULLET:int = 13; public static var MVTYPE_TAPED:int = 5; public static var MVTYPE_DISAPPEAR:int = 11; public static var MVTYPE_MOUSE:int = 1; public static var MVTYPE_STATIC:int = 0; public static var MVTYPE_EXT:int = 14; public static var MVTYPE_RACE:int = 2; public static var MVTYPE_PLATFORM:int = 9; public static var MVTYPE_APPEAR:int = 12; public static var MVTYPE_GENERIC:int = 3; public static var MVTYPE_BALL:int = 4; public function setData(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int):void{ mvType = _arg1; mvControl = _arg2; mvMoveAtStart = _arg3; mvDirAtStart = _arg4; mvOpt = _arg5; } public function load(_arg1:CFile, _arg2:int):void{ } } }//package Movements
Section 153
//CMoveDefBall (Movements.CMoveDefBall) package Movements { import Services.*; public class CMoveDefBall extends CMoveDef { public var mbSpeed:int; public var mbAngles:int; public var mbDecelerate:int; public var mbSecurity:int; public var mbBounce:int; override public function load(_arg1:CFile, _arg2:int):void{ mbSpeed = _arg1.readAShort(); mbBounce = _arg1.readAShort(); mbAngles = _arg1.readAShort(); mbSecurity = _arg1.readAShort(); mbDecelerate = _arg1.readAShort(); } } }//package Movements
Section 154
//CMoveDefExtension (Movements.CMoveDefExtension) package Movements { import Services.*; import flash.utils.*; public class CMoveDefExtension extends CMoveDef { public var mvtID:int; public var moduleName:String; public var data:ByteArray; public function setModuleName(_arg1:String, _arg2:int):void{ moduleName = new String(_arg1); mvtID = _arg2; } override public function load(_arg1:CFile, _arg2:int):void{ _arg1.skipBytes(14); data = _arg1.readBuffer((_arg2 - 14)); } } }//package Movements
Section 155
//CMoveDefGeneric (Movements.CMoveDefGeneric) package Movements { import Services.*; public class CMoveDefGeneric extends CMoveDef { public var mgBounceMult:int; public var mgDir:int; public var mgAcc:int; public var mgDec:int; public var mgSpeed:int; override public function load(_arg1:CFile, _arg2:int):void{ mgSpeed = _arg1.readAShort(); mgAcc = _arg1.readAShort(); mgDec = _arg1.readAShort(); mgBounceMult = _arg1.readAShort(); mgDir = _arg1.readAInt(); } } }//package Movements
Section 156
//CMoveDefList (Movements.CMoveDefList) package Movements { import Services.*; public class CMoveDefList { public var nMovements:int; public var moveList:Array; public function load(_arg1:CFile):void{ var _local3:int; var _local4:int; var _local5:int; var _local6:int; var _local7:int; var _local8:int; var _local9:int; var _local10:int; var _local11:int; var _local12:int; var _local13:String; var _local2:int = _arg1.getFilePointer(); nMovements = _arg1.readAInt(); moveList = new Array(nMovements); _local3 = 0; while (_local3 < nMovements) { _arg1.seek(((_local2 + 4) + (16 * _local3))); _local4 = _arg1.readAInt(); _local5 = _arg1.readAInt(); _local6 = _arg1.readAInt(); _local7 = _arg1.readAInt(); _arg1.seek((_local2 + _local6)); _local8 = _arg1.readAShort(); _local9 = _arg1.readAShort(); _local10 = _arg1.readAByte(); _local11 = _arg1.readAByte(); _arg1.skipBytes(2); _local12 = _arg1.readAInt(); switch (_local9){ case 0: moveList[_local3] = new CMoveDefStatic(); break; case 1: moveList[_local3] = new CMoveDefMouse(); break; case 2: moveList[_local3] = new CMoveDefRace(); break; case 3: moveList[_local3] = new CMoveDefGeneric(); break; case 4: moveList[_local3] = new CMoveDefBall(); break; case 5: moveList[_local3] = new CMoveDefPath(); break; case 9: moveList[_local3] = new CMoveDefPlatform(); break; case 14: moveList[_local3] = new CMoveDefExtension(); break; }; moveList[_local3].setData(_local9, _local8, _local10, _local12, _local11); moveList[_local3].load(_arg1, (_local7 - 12)); if (_local9 == 14){ _arg1.seek((_local2 + _local4)); _local13 = _arg1.readAString(); _local13 = _local13.substring(0, (_local13.length - 4)); CMoveDefExtension(moveList[_local3]).setModuleName(_local13, _local5); }; _local3++; }; } } }//package Movements
Section 157
//CMoveDefMouse (Movements.CMoveDefMouse) package Movements { import Services.*; public class CMoveDefMouse extends CMoveDef { public var mmFx:int; public var mmFy:int; public var mmDy:int; public var mmFlags:int; public var mmDx:int; override public function load(_arg1:CFile, _arg2:int):void{ mmDx = _arg1.readShort(); mmFx = _arg1.readShort(); mmDy = _arg1.readShort(); mmFy = _arg1.readShort(); mmFlags = _arg1.readAShort(); } } }//package Movements
Section 158
//CMoveDefPath (Movements.CMoveDefPath) package Movements { import Services.*; public class CMoveDefPath extends CMoveDef { public var steps:Array; public var mtMaxSpeed:int; public var mtLoop:int; public var mtNumber:int; public var mtRepos:int; public var mtReverse:int; public var mtMinSpeed:int; override public function load(_arg1:CFile, _arg2:int):void{ var _local3:int; var _local4:int; var _local5:int; mtNumber = _arg1.readAShort(); mtMinSpeed = _arg1.readAShort(); mtMaxSpeed = _arg1.readAShort(); mtLoop = _arg1.readAByte(); mtRepos = _arg1.readAByte(); mtReverse = _arg1.readAByte(); _arg1.skipBytes(1); steps = new Array(mtNumber); _local3 = 0; while (_local3 < mtNumber) { _local5 = _arg1.getFilePointer(); steps[_local3] = new CPathStep(); _arg1.readUnsignedByte(); _local4 = _arg1.readUnsignedByte(); steps[_local3].load(_arg1); _arg1.seek((_local5 + _local4)); _local3++; }; } } }//package Movements
Section 159
//CMoveDefPlatform (Movements.CMoveDefPlatform) package Movements { import Services.*; public class CMoveDefPlatform extends CMoveDef { public var mpSpeed:int; public var mpGravity:int; public var mpJumpControl:int; public var mpJump:int; public var mpAcc:int; public var mpDec:int; override public function load(_arg1:CFile, _arg2:int):void{ mpSpeed = _arg1.readAShort(); mpAcc = _arg1.readAShort(); mpDec = _arg1.readAShort(); mpJumpControl = _arg1.readAShort(); mpGravity = _arg1.readAShort(); mpJump = _arg1.readAShort(); } } }//package Movements
Section 160
//CMoveDefRace (Movements.CMoveDefRace) package Movements { import Services.*; public class CMoveDefRace extends CMoveDef { public var mrSpeed:int; public var mrAngles:int; public var mrOkReverse:int; public var mrDec:int; public var mrRot:int; public var mrAcc:int; public var mrBounceMult:int; override public function load(_arg1:CFile, _arg2:int):void{ mrSpeed = _arg1.readAShort(); mrAcc = _arg1.readAShort(); mrDec = _arg1.readAShort(); mrRot = _arg1.readAShort(); mrBounceMult = _arg1.readAShort(); mrAngles = _arg1.readAShort(); mrOkReverse = _arg1.readAShort(); } } }//package Movements
Section 161
//CMoveDefStatic (Movements.CMoveDefStatic) package Movements { import Services.*; public class CMoveDefStatic extends CMoveDef { override public function load(_arg1:CFile, _arg2:int):void{ } } }//package Movements
Section 162
//CMoveDisappear (Movements.CMoveDisappear) package Movements { import Objects.*; import Animations.*; public class CMoveDisappear extends CMove { override public function init(_arg1:CObject, _arg2:CMoveDef):void{ hoPtr = _arg1; } override public function move():void{ if ((hoPtr.hoFlags & CObject.HOF_FADEOUT) == 0){ if (hoPtr.roa != null){ hoPtr.roa.animate(); if (hoPtr.roa.raAnimForced != (CAnim.ANIMID_DISAPPEAR + 1)){ hoPtr.hoAdRunHeader.destroy_Add(hoPtr.hoNumber); }; }; }; } override public function setYPosition(_arg1:int):void{ if (hoPtr.hoY != _arg1){ hoPtr.hoY = _arg1; hoPtr.rom.rmMoveFlag = true; hoPtr.roc.rcChanged = true; }; } override public function setXPosition(_arg1:int):void{ if (hoPtr.hoX != _arg1){ hoPtr.hoX = _arg1; hoPtr.rom.rmMoveFlag = true; hoPtr.roc.rcChanged = true; }; } } }//package Movements
Section 163
//CMoveExtension (Movements.CMoveExtension) package Movements { import Services.*; import Objects.*; public class CMoveExtension extends CMove { public var callParam:Number; public var movement:CRunMvtExtension; public function CMoveExtension(_arg1:CRunMvtExtension){ movement = _arg1; } override public function setYPosition(_arg1:int):void{ movement.setYPosition(_arg1); hoPtr.roc.rcChanged = true; hoPtr.roc.rcCheckCollides = true; } override public function stop():void{ movement.stop((rmCollisionCount == hoPtr.hoAdRunHeader.rh3CollisionCount)); } override public function setSpeed(_arg1:int):void{ movement.setSpeed(_arg1); } override public function bounce():void{ movement.bounce((rmCollisionCount == hoPtr.hoAdRunHeader.rh3CollisionCount)); } override public function start():void{ movement.start(); } override public function setDir(_arg1:int):void{ movement.setDir(_arg1); hoPtr.roc.rcChanged = true; hoPtr.roc.rcCheckCollides = true; } override public function setMaxSpeed(_arg1:int):void{ movement.setMaxSpeed(_arg1); } override public function kill():void{ movement.kill(); } override public function init(_arg1:CObject, _arg2:CMoveDef):void{ hoPtr = _arg1; var _local3:CMoveDefExtension = CMoveDefExtension(_arg2); var _local4:CBinaryFile = new CBinaryFile(_local3.data, _arg1.hoAdRunHeader.rhApp.bUnicode); movement.initialize(_local4); hoPtr.roc.rcCheckCollides = true; hoPtr.roc.rcChanged = true; } override public function move():void{ if (movement.move()){ hoPtr.roc.rcChanged = true; }; } public function callMovement(_arg1:int, _arg2:Number):Number{ callParam = _arg2; return (movement.actionEntry(_arg1)); } override public function reverse():void{ movement.reverse(); } override public function setXPosition(_arg1:int):void{ movement.setXPosition(_arg1); hoPtr.roc.rcChanged = true; hoPtr.roc.rcCheckCollides = true; } } }//package Movements
Section 164
//CMoveGeneric (Movements.CMoveGeneric) package Movements { import Application.*; import RunLoop.*; import Objects.*; import Animations.*; public class CMoveGeneric extends CMove { public var MG_Speed:int; public var MG_LastBounce:int; public var MG_OkDirs:int; public var MG_Bounce:int; public var MG_DirMask:int; public var MG_BounceMu:int; override public function setYPosition(_arg1:int):void{ if (hoPtr.hoY != _arg1){ hoPtr.hoY = _arg1; hoPtr.rom.rmMoveFlag = true; hoPtr.roc.rcChanged = true; hoPtr.roc.rcCheckCollides = true; }; } override public function setMaxSpeed(_arg1:int):void{ if (_arg1 < 0){ _arg1 = 0; }; if (_arg1 > 250){ _arg1 = 250; }; hoPtr.roc.rcMaxSpeed = _arg1; if (hoPtr.roc.rcSpeed > _arg1){ hoPtr.roc.rcSpeed = _arg1; MG_Speed = (_arg1 << 8); }; hoPtr.rom.rmMoveFlag = true; } override public function stop():void{ hoPtr.roc.rcSpeed = 0; MG_Bounce = 0; MG_Speed = 0; hoPtr.rom.rmMoveFlag = true; if (rmCollisionCount == hoPtr.hoAdRunHeader.rh3CollisionCount){ mv_Approach(!(((rmOpt & MVTOPT_8DIR_STICK) == 0))); MG_Bounce = 0; }; } override public function setSpeed(_arg1:int):void{ if (_arg1 < 0){ _arg1 = 0; }; if (_arg1 > 250){ _arg1 = 250; }; if (_arg1 > hoPtr.roc.rcMaxSpeed){ _arg1 = hoPtr.roc.rcMaxSpeed; }; hoPtr.roc.rcSpeed = _arg1; MG_Speed = (_arg1 << 8); hoPtr.rom.rmMoveFlag = true; } override public function bounce():void{ if (rmCollisionCount == hoPtr.hoAdRunHeader.rh3CollisionCount){ mv_Approach(!(((rmOpt & MVTOPT_8DIR_STICK) == 0))); }; if (hoPtr.hoAdRunHeader.rhLoopCount == MG_LastBounce){ return; }; MG_LastBounce = hoPtr.hoAdRunHeader.rhLoopCount; MG_Bounce++; if (MG_Bounce >= 12){ stop(); return; }; hoPtr.rom.rmBouncing = true; hoPtr.rom.rmMoveFlag = true; } override public function init(_arg1:CObject, _arg2:CMoveDef):void{ hoPtr = _arg1; var _local3:CMoveDefGeneric = CMoveDefGeneric(_arg2); hoPtr.hoCalculX = 0; hoPtr.hoCalculY = 0; MG_Speed = 0; hoPtr.roc.rcSpeed = 0; MG_Bounce = 0; MG_LastBounce = -1; hoPtr.roc.rcPlayer = _arg2.mvControl; rmAcc = _local3.mgAcc; rmAccValue = getAccelerator(rmAcc); rmDec = _local3.mgDec; rmDecValue = getAccelerator(rmDec); hoPtr.roc.rcMaxSpeed = _local3.mgSpeed; hoPtr.roc.rcMinSpeed = 0; MG_BounceMu = _local3.mgBounceMult; MG_OkDirs = _local3.mgDir; rmOpt = _local3.mvOpt; hoPtr.roc.rcChanged = true; } override public function move():void{ var _local1:int; var _local2:int; var _local3:int; var _local4:int; var _local5:int; var _local6:int; var _local7:int; var _local8:int; hoPtr.hoAdRunHeader.rhVBLObjet = 1; _local1 = hoPtr.roc.rcDir; hoPtr.roc.rcOldDir = _local1; if (MG_Bounce == 0){ hoPtr.rom.rmBouncing = false; _local2 = 0; _local6 = (hoPtr.hoAdRunHeader.rhPlayer[(hoPtr.roc.rcPlayer - 1)] & 15); if (_local6 != 0){ _local5 = Joy2Dir[_local6]; if (_local5 != -1){ _local8 = (1 << _local5); if ((_local8 & MG_OkDirs) != 0){ _local2 = 1; _local1 = _local5; }; }; }; _local3 = MG_Speed; if (_local2 == 0){ if (_local3 != 0){ _local7 = rmDecValue; if ((hoPtr.hoAdRunHeader.rhFrame.leFlags & CRunFrame.LEF_TIMEDMVTS) != 0){ _local7 = (Number(_local7) * hoPtr.hoAdRunHeader.rh4MvtTimerCoef); }; _local3 = (_local3 - _local7); if (_local3 <= 0){ _local3 = 0; }; }; } else { _local4 = (_local3 >> 8); if (_local4 < hoPtr.roc.rcMaxSpeed){ _local7 = rmAccValue; if ((hoPtr.hoAdRunHeader.rhFrame.leFlags & CRunFrame.LEF_TIMEDMVTS) != 0){ _local7 = (Number(_local7) * hoPtr.hoAdRunHeader.rh4MvtTimerCoef); }; _local3 = (_local3 + _local7); _local4 = (_local3 >> 8); if (_local4 > hoPtr.roc.rcMaxSpeed){ _local3 = (hoPtr.roc.rcMaxSpeed << 8); }; }; }; MG_Speed = _local3; hoPtr.roc.rcSpeed = (_local3 >> 8); hoPtr.roc.rcDir = _local1; hoPtr.roc.rcAnim = CAnim.ANIMID_WALK; if (hoPtr.roa != null){ hoPtr.roa.animate(); }; if (CRun.bMoveChanged){ return; }; if (newMake_Move(hoPtr.roc.rcSpeed, hoPtr.roc.rcDir) == false){ return; }; if (CRun.bMoveChanged){ return; }; if (hoPtr.roc.rcSpeed == 0){ _local3 = MG_Speed; if (_local3 == 0){ return; }; if (hoPtr.roc.rcOldDir == hoPtr.roc.rcDir){ return; }; hoPtr.roc.rcSpeed = (_local3 >> 8); hoPtr.roc.rcDir = hoPtr.roc.rcOldDir; if (newMake_Move(hoPtr.roc.rcSpeed, hoPtr.roc.rcDir) == false){ return; }; if (CRun.bMoveChanged){ return; }; }; }; while (true) { if (MG_Bounce == 0){ return; }; if (hoPtr.hoAdRunHeader.rhVBLObjet == 0){ return; }; _local3 = MG_Speed; _local3 = (_local3 - rmDecValue); if (_local3 > 0){ MG_Speed = _local3; _local3 = (_local3 >> 8); hoPtr.roc.rcSpeed = _local3; _local5 = hoPtr.roc.rcDir; if (MG_Bounce != 0){ _local5 = (_local5 + 16); _local5 = (_local5 & 31); }; if (newMake_Move(_local3, _local5) == false){ return; }; if (CRun.bMoveChanged){ return; }; continue; } else { MG_Speed = 0; hoPtr.roc.rcSpeed = 0; MG_Bounce = 0; }; break; }; } override public function start():void{ hoPtr.rom.rmMoveFlag = true; rmStopSpeed = 0; } public function set8DirsGeneric(_arg1:int):void{ MG_OkDirs = _arg1; } override public function setXPosition(_arg1:int):void{ if (hoPtr.hoX != _arg1){ hoPtr.hoX = _arg1; hoPtr.rom.rmMoveFlag = true; hoPtr.roc.rcChanged = true; hoPtr.roc.rcCheckCollides = true; }; } } }//package Movements
Section 165
//CMoveMouse (Movements.CMoveMouse) package Movements { import Objects.*; import Animations.*; public class CMoveMouse extends CMove { public var MM_Stopped:int; public var MM_DYMouse:int; public var MM_DXMouse:int; public var MM_FYMouse:int; public var MM_FXMouse:int; public var MM_OldSpeed:int; override public function setYPosition(_arg1:int):void{ if (hoPtr.hoY != _arg1){ hoPtr.hoY = _arg1; hoPtr.rom.rmMoveFlag = true; hoPtr.roc.rcChanged = true; hoPtr.roc.rcCheckCollides = true; }; } override public function stop():void{ if (rmCollisionCount == hoPtr.hoAdRunHeader.rh3CollisionCount){ mv_Approach(!(((rmOpt & MVTOPT_8DIR_STICK) == 0))); }; hoPtr.roc.rcSpeed = 0; } override public function start():void{ rmStopSpeed = 0; hoPtr.rom.rmMoveFlag = true; } override public function init(_arg1:CObject, _arg2:CMoveDef):void{ hoPtr = _arg1; var _local3:CMoveDefMouse = CMoveDefMouse(_arg2); hoPtr.roc.rcPlayer = _local3.mvControl; MM_DXMouse = (_local3.mmDx + hoPtr.hoX); MM_DYMouse = (_local3.mmDy + hoPtr.hoY); MM_FXMouse = (_local3.mmFx + hoPtr.hoX); MM_FYMouse = (_local3.mmFy + hoPtr.hoY); hoPtr.roc.rcSpeed = 0; MM_OldSpeed = 0; MM_Stopped = 0; hoPtr.roc.rcMinSpeed = 0; hoPtr.roc.rcMaxSpeed = 100; rmOpt = _local3.mvOpt; moveAtStart(_arg2); hoPtr.roc.rcChanged = true; } override public function setXPosition(_arg1:int):void{ if (hoPtr.hoX != _arg1){ hoPtr.hoX = _arg1; hoPtr.rom.rmMoveFlag = true; hoPtr.roc.rcChanged = true; hoPtr.roc.rcCheckCollides = true; }; } override public function move():void{ var _local3:int; var _local4:int; var _local5:int; var _local6:int; var _local7:int; var _local8:int; var _local1:int = hoPtr.hoX; var _local2:int = hoPtr.hoY; if (rmStopSpeed == 0){ if (hoPtr.hoAdRunHeader.rh2InputMask[(hoPtr.roc.rcPlayer - 1)] != 0){ _local1 = hoPtr.hoAdRunHeader.rh2MouseX; if (_local1 < MM_DXMouse){ _local1 = MM_DXMouse; }; if (_local1 > MM_FXMouse){ _local1 = MM_FXMouse; }; _local2 = hoPtr.hoAdRunHeader.rh2MouseY; if (_local2 < MM_DYMouse){ _local2 = MM_DYMouse; }; if (_local2 > MM_FYMouse){ _local2 = MM_FYMouse; }; _local3 = (_local1 - hoPtr.hoX); _local4 = (_local2 - hoPtr.hoY); _local5 = 0; if (_local3 < 0){ _local3 = -(_local3); _local5 = (_local5 | 1); }; if (_local4 < 0){ _local4 = -(_local4); _local5 = (_local5 | 2); }; _local6 = ((_local3 + _local4) << 2); if (_local6 > 250){ _local6 = 250; }; hoPtr.roc.rcSpeed = _local6; if (_local6 != 0){ _local3 = (_local3 << 8); if (_local4 == 0){ _local4 = 1; }; _local3 = (_local3 / _local4); _local8 = 0; while (true) { if (_local3 >= CosSurSin32[_local8]){ break; }; _local8 = (_local8 + 2); }; _local7 = CosSurSin32[(_local8 + 1)]; if ((_local5 & 2) != 0){ _local7 = (-(_local7) + 32); _local7 = (_local7 & 31); }; if ((_local5 & 1) != 0){ _local7 = (_local7 - 8); _local7 = (_local7 & 31); _local7 = -(_local7); _local7 = (_local7 & 31); _local7 = (_local7 + 8); _local7 = (_local7 & 31); }; hoPtr.roc.rcDir = _local7; }; }; }; if (hoPtr.roc.rcSpeed != 0){ MM_Stopped = 0; MM_OldSpeed = hoPtr.roc.rcSpeed; }; MM_Stopped++; if (MM_Stopped > 10){ MM_OldSpeed = 0; }; hoPtr.roc.rcSpeed = MM_OldSpeed; if (hoPtr.roa != null){ hoPtr.roa.animate(); }; hoPtr.hoX = _local1; hoPtr.hoY = _local2; hoPtr.roc.rcChanged = true; hoPtr.hoAdRunHeader.rh3CollisionCount++; rmCollisionCount = hoPtr.hoAdRunHeader.rh3CollisionCount; hoPtr.hoAdRunHeader.newHandle_Collisions(hoPtr); } } }//package Movements
Section 166
//CMovePath (Movements.CMovePath) package Movements { import Application.*; import Services.*; import RunLoop.*; import Objects.*; import Animations.*; public class CMovePath extends CMove { public var MT_XDest:int; public var MT_YDest:int; public var MT_XOrigin:int; public var MT_XStart:int; public var MT_Speed:int; public var MT_Calculs:int; public var MT_YStart:int; public var MT_MoveNumber:int; public var MT_GotoNode:String; public var MT_Pause:int; public var MT_Sinus:int; public var MT_YOrigin:int; public var MT_Cosinus:int; public var MT_Direction:Boolean; public var MT_Longueur:int; public var MT_FlagBranch:Boolean; public var MT_Movement:CMoveDefPath; override public function setYPosition(_arg1:int):void{ var _local2:int = hoPtr.hoY; hoPtr.hoY = _arg1; _local2 = (_local2 - MT_YOrigin); _arg1 = (_arg1 - _local2); _local2 = ((MT_YDest - MT_YOrigin) + _arg1); MT_YDest = _local2; _local2 = MT_YOrigin; MT_YOrigin = _arg1; _local2 = (_local2 - _arg1); MT_YStart = (MT_YStart - _local2); hoPtr.rom.rmMoveFlag = true; hoPtr.roc.rcChanged = true; hoPtr.roc.rcCheckCollides = true; } override public function setSpeed(_arg1:int):void{ if (_arg1 < 0){ _arg1 = 0; }; if (_arg1 > 250){ _arg1 = 250; }; MT_Speed = _arg1; hoPtr.roc.rcSpeed = _arg1; hoPtr.rom.rmMoveFlag = true; } override public function init(_arg1:CObject, _arg2:CMoveDef):void{ hoPtr = _arg1; var _local3:CMoveDefPath = CMoveDefPath(_arg2); MT_XStart = hoPtr.hoX; MT_YStart = hoPtr.hoY; MT_Direction = false; MT_Pause = 0; hoPtr.hoMark1 = 0; MT_Movement = _local3; hoPtr.roc.rcMinSpeed = _local3.mtMinSpeed; hoPtr.roc.rcMaxSpeed = _local3.mtMaxSpeed; MT_Calculs = 0; MT_GotoNode = null; mtGoAvant(0); moveAtStart(_arg2); hoPtr.roc.rcSpeed = MT_Speed; hoPtr.roc.rcChanged = true; if (MT_Movement.steps.length == 0){ stop(); }; } override public function stop():void{ if (rmStopSpeed == 0){ rmStopSpeed = (MT_Speed | 0x8000); }; MT_Speed = 0; hoPtr.rom.rmMoveFlag = true; } public function mtMessages():void{ if (hoPtr.hoMark1 == hoPtr.hoAdRunHeader.rhLoopCount){ hoPtr.hoAdRunHeader.rhEvtProg.rhCurParam0 = 0; hoPtr.hoAdRunHeader.rhEvtProg.handle_Event(hoPtr, ((-20 << 16) | (hoPtr.hoType & 0xFFFF))); hoPtr.hoAdRunHeader.rhEvtProg.handle_Event(hoPtr, ((-35 << 16) | (hoPtr.hoType & 0xFFFF))); }; if (hoPtr.hoMark2 == hoPtr.hoAdRunHeader.rhLoopCount){ hoPtr.hoAdRunHeader.rhEvtProg.rhCurParam0 = 0; hoPtr.hoAdRunHeader.rhEvtProg.handle_Event(hoPtr, ((-21 << 16) | (hoPtr.hoType & 0xFFFF))); }; } public function mtMove(_arg1:int):Boolean{ var _local4:int; var _local5:int; _arg1 = (_arg1 + MT_Calculs); var _local2:int = (_arg1 >>> 16); if (_local2 < MT_Longueur){ MT_Calculs = _arg1; _local4 = (((_local2 * MT_Cosinus) / 0x4000) + MT_XOrigin); _local5 = (((_local2 * MT_Sinus) / 0x4000) + MT_YOrigin); hoPtr.hoX = _local4; hoPtr.hoY = _local5; hoPtr.roc.rcChanged = true; hoPtr.hoAdRunHeader.newHandle_Collisions(hoPtr); return (hoPtr.rom.rmMoveFlag); }; _local2 = (_local2 - MT_Longueur); _arg1 = ((_local2 << 16) | (_arg1 & 0xFFFF)); if (MT_Speed != 0){ _arg1 = (_arg1 / MT_Speed); }; _arg1 = (_arg1 >> 5); hoPtr.hoAdRunHeader.rhMT_VBLCount = (hoPtr.hoAdRunHeader.rhMT_VBLCount + (_arg1 & 0xFFFF)); hoPtr.hoX = MT_XDest; hoPtr.hoY = MT_YDest; hoPtr.roc.rcChanged = true; hoPtr.hoAdRunHeader.newHandle_Collisions(hoPtr); if (hoPtr.rom.rmMoveFlag){ return (true); }; hoPtr.hoMark1 = hoPtr.hoAdRunHeader.rhLoopCount; hoPtr.hoMT_NodeName = null; var _local3:int = MT_MoveNumber; MT_Calculs = 0; if (MT_Direction == false){ _local3++; if (_local3 < MT_Movement.mtNumber){ hoPtr.hoMT_NodeName = MT_Movement.steps[_local3].mdName; if (MT_GotoNode != null){ if (MT_Movement.steps[_local3].mdName != null){ if (CServices.compareStringsIgnoreCase(MT_GotoNode, MT_Movement.steps[_local3].mdName)){ MT_MoveNumber = _local3; mtMessages(); return (mtTheEnd()); }; }; }; mtGoAvant(_local3); mtMessages(); return (hoPtr.rom.rmMoveFlag); }; hoPtr.hoMark2 = hoPtr.hoAdRunHeader.rhLoopCount; MT_MoveNumber = _local3; if (MT_Direction){ mtMessages(); return (hoPtr.rom.rmMoveFlag); }; if (MT_Movement.mtReverse != 0){ MT_Direction = true; _local3--; hoPtr.hoMT_NodeName = MT_Movement.steps[_local3].mdName; mtGoArriere(_local3); mtMessages(); return (hoPtr.rom.rmMoveFlag); }; mtReposAtEnd(); if (MT_Movement.mtLoop == 0){ mtTheEnd(); mtMessages(); return (hoPtr.rom.rmMoveFlag); }; _local3 = 0; mtGoAvant(_local3); mtMessages(); return (hoPtr.rom.rmMoveFlag); } else { if (MT_GotoNode != null){ if (MT_Movement.steps[_local3].mdName != null){ if (CServices.compareStringsIgnoreCase(MT_GotoNode, MT_Movement.steps[_local3].mdName)){ mtMessages(); return (mtTheEnd()); }; }; }; hoPtr.hoMT_NodeName = MT_Movement.steps[_local3].mdName; MT_Pause = MT_Movement.steps[_local3].mdPause; _local3--; if (_local3 >= 0){ mtGoArriere(_local3); mtMessages(); return (hoPtr.rom.rmMoveFlag); }; mtReposAtEnd(); if (MT_Direction == false){ mtMessages(); return (hoPtr.rom.rmMoveFlag); }; if (MT_Movement.mtLoop == 0){ mtTheEnd(); mtMessages(); return (hoPtr.rom.rmMoveFlag); }; _local3 = 0; MT_Direction = false; }; _local3.mtGoAvant(!NULL!); mtMessages(); return (hoPtr.rom.rmMoveFlag); } public function mtTheEnd():Boolean{ MT_Speed = 0; rmStopSpeed = 0; hoPtr.rom.rmMoveFlag = true; MT_FlagBranch = false; return (true); } public function freeMTNode():void{ MT_GotoNode = null; } public function mtGoArriere(_arg1:int):void{ var _local2:int; if (_arg1 >= MT_Movement.steps.length){ stop(); } else { MT_Direction = true; MT_MoveNumber = _arg1; MT_Cosinus = -(MT_Movement.steps[_arg1].mdCosinus); MT_Sinus = -(MT_Movement.steps[_arg1].mdSinus); MT_XOrigin = hoPtr.hoX; MT_YOrigin = hoPtr.hoY; MT_XDest = (hoPtr.hoX - MT_Movement.steps[_arg1].mdDx); MT_YDest = (hoPtr.hoY - MT_Movement.steps[_arg1].mdDy); _local2 = MT_Movement.steps[_arg1].mdDir; _local2 = (_local2 + 16); _local2 = (_local2 & 31); hoPtr.roc.rcDir = _local2; mtBranche(); }; } public function mtBranchNode(_arg1:String):void{ var _local2:int; _local2 = 0; while (_local2 < MT_Movement.mtNumber) { if (MT_Movement.steps[_local2].mdName != null){ if (CServices.compareStringsIgnoreCase(_arg1, MT_Movement.steps[_local2].mdName)){ if (MT_Direction == false){ mtGoAvant(_local2); hoPtr.hoMark1 = hoPtr.hoAdRunHeader.rhLoopCount; hoPtr.hoMT_NodeName = MT_Movement.steps[_local2].mdName; hoPtr.hoMark2 = 0; mtMessages(); } else { if (_local2 > 0){ _local2--; mtGoArriere(_local2); hoPtr.hoMark1 = hoPtr.hoAdRunHeader.rhLoopCount; hoPtr.hoMT_NodeName = MT_Movement.steps[_local2].mdName; hoPtr.hoMark2 = 0; mtMessages(); }; }; hoPtr.rom.rmMoveFlag = true; return; }; }; _local2++; }; } override public function move():void{ var _local1:int; var _local2:Boolean; var _local3:int; var _local4:Boolean; hoPtr.hoMark1 = 0; hoPtr.roc.rcAnim = CAnim.ANIMID_WALK; if (hoPtr.roa != null){ hoPtr.roa.animate(); }; if (CRun.bMoveChanged){ return; }; if (MT_Speed == 0){ _local3 = MT_Pause; if (_local3 == 0){ hoPtr.roc.rcSpeed = 0; hoPtr.hoAdRunHeader.newHandle_Collisions(hoPtr); return; }; _local3 = (_local3 - hoPtr.hoAdRunHeader.rhTimerDelta); if (_local3 > 0){ MT_Pause = _local3; hoPtr.roc.rcSpeed = 0; hoPtr.hoAdRunHeader.newHandle_Collisions(hoPtr); return; }; MT_Pause = 0; MT_Speed = (rmStopSpeed & 32767); rmStopSpeed = 0; hoPtr.roc.rcSpeed = MT_Speed; }; if ((hoPtr.hoAdRunHeader.rhFrame.leFlags & CRunFrame.LEF_TIMEDMVTS) != 0){ _local1 = (0x0100 * hoPtr.hoAdRunHeader.rh4MvtTimerCoef); } else { _local1 = 0x0100; }; hoPtr.hoAdRunHeader.rhMT_VBLCount = _local1; while (true) { _local2 = false; hoPtr.hoAdRunHeader.rhMT_VBLStep = _local1; _local1 = (_local1 * MT_Speed); _local1 = (_local1 << 5); if (_local1 <= 524288){ hoPtr.hoAdRunHeader.rhMT_MoveStep = _local1; } else { _local1 = (524288 >>> 5); _local1 = (_local1 / MT_Speed); hoPtr.hoAdRunHeader.rhMT_VBLStep = _local1; hoPtr.hoAdRunHeader.rhMT_MoveStep = 524288; }; while (true) { MT_FlagBranch = false; _local4 = mtMove(hoPtr.hoAdRunHeader.rhMT_MoveStep); if ((((_local4 == true)) && ((MT_FlagBranch == false)))){ _local2 = true; break; }; if (hoPtr.hoAdRunHeader.rhMT_VBLCount == hoPtr.hoAdRunHeader.rhMT_VBLStep){ _local2 = true; break; }; if (hoPtr.hoAdRunHeader.rhMT_VBLCount > hoPtr.hoAdRunHeader.rhMT_VBLStep){ hoPtr.hoAdRunHeader.rhMT_VBLCount = (hoPtr.hoAdRunHeader.rhMT_VBLCount - hoPtr.hoAdRunHeader.rhMT_VBLStep); _local1 = hoPtr.hoAdRunHeader.rhMT_VBLCount; break; }; _local1 = (hoPtr.hoAdRunHeader.rhMT_VBLCount * MT_Speed); _local1 = (_local1 << 5); mtMove(_local1); _local2 = true; break; }; if (_local2){ break; }; }; } public function mtGotoNode(_arg1:String):void{ var _local2:int; _local2 = 0; while (_local2 < MT_Movement.mtNumber) { if (MT_Movement.steps[_local2].mdName != null){ if (CServices.compareStringsIgnoreCase(_arg1, MT_Movement.steps[_local2].mdName)){ if (_local2 == MT_MoveNumber){ if (MT_Calculs == 0){ return; }; }; freeMTNode(); MT_GotoNode = _arg1; if (MT_Direction == false){ if (_local2 > MT_MoveNumber){ if (MT_Speed != 0){ return; }; if ((rmStopSpeed & 0x8000) != 0){ start(); } else { mtGoAvant(MT_MoveNumber); }; return; } else { if (MT_Speed != 0){ reverse(); return; }; if ((rmStopSpeed & 0x8000) != 0){ start(); reverse(); } else { mtGoArriere((MT_MoveNumber - 1)); }; return; }; } else { if (_local2 <= MT_MoveNumber){ if (MT_Speed != 0){ return; }; if ((rmStopSpeed & 0x8000) != 0){ start(); } else { mtGoArriere((MT_MoveNumber - 1)); }; return; } else { if (MT_Speed != 0){ reverse(); return; }; if ((rmStopSpeed & 0x8000) != 0){ start(); reverse(); } else { mtGoAvant(MT_MoveNumber); }; return; }; }; }; }; _local2++; }; } override public function setMaxSpeed(_arg1:int):void{ setSpeed(_arg1); } public function mtBranche():void{ MT_Longueur = MT_Movement.steps[MT_MoveNumber].mdLength; var _local1:int = MT_Movement.steps[MT_MoveNumber].mdSpeed; var _local2:int = MT_Pause; if (_local2 != 0){ MT_Pause = (_local2 * 20); _local1 = (_local1 | 0x8000); rmStopSpeed = _local1; }; if (rmStopSpeed != 0){ _local1 = 0; }; if (((!((_local1 == MT_Speed))) || (!((_local1 == 0))))){ MT_Speed = _local1; hoPtr.rom.rmMoveFlag = true; MT_FlagBranch = true; }; hoPtr.roc.rcSpeed = MT_Speed; } override public function start():void{ if ((rmStopSpeed & 0x8000) != 0){ MT_Speed = (rmStopSpeed & 32767); MT_Pause = 0; rmStopSpeed = 0; hoPtr.rom.rmMoveFlag = true; }; } public function mtGoAvant(_arg1:int):void{ if (_arg1 >= MT_Movement.steps.length){ stop(); } else { MT_Direction = false; MT_MoveNumber = _arg1; MT_Pause = MT_Movement.steps[_arg1].mdPause; MT_Cosinus = MT_Movement.steps[_arg1].mdCosinus; MT_Sinus = MT_Movement.steps[_arg1].mdSinus; MT_XOrigin = hoPtr.hoX; MT_YOrigin = hoPtr.hoY; MT_XDest = (hoPtr.hoX + MT_Movement.steps[_arg1].mdDx); MT_YDest = (hoPtr.hoY + MT_Movement.steps[_arg1].mdDy); hoPtr.roc.rcDir = MT_Movement.steps[_arg1].mdDir; mtBranche(); }; } override public function reverse():void{ var _local1:int; var _local2:int; var _local3:int; var _local4:int; if (rmStopSpeed == 0){ hoPtr.rom.rmMoveFlag = true; _local1 = MT_MoveNumber; if (MT_Calculs == 0){ MT_Direction = CServices.tildBoolean(MT_Direction); if (MT_Direction){ if (_local1 == 0){ MT_Direction = CServices.tildBoolean(MT_Direction); return; }; _local1--; mtGoArriere(_local1); } else { mtGoAvant(_local1); }; } else { MT_Direction = CServices.tildBoolean(MT_Direction); MT_Cosinus = -(MT_Cosinus); MT_Sinus = -(MT_Sinus); _local2 = MT_XOrigin; _local3 = MT_XDest; MT_XOrigin = _local3; MT_XDest = _local2; _local2 = MT_YOrigin; _local3 = MT_YDest; MT_YOrigin = _local3; MT_YDest = _local2; hoPtr.roc.rcDir = (hoPtr.roc.rcDir + 16); hoPtr.roc.rcDir = (hoPtr.roc.rcDir & 31); _local4 = (MT_Calculs >>> 16); _local4 = (MT_Longueur - _local4); MT_Calculs = ((_local4 << 16) | (MT_Calculs & 0xFFFF)); }; }; } public function mtReposAtEnd():void{ if (MT_Movement.mtRepos != 0){ hoPtr.hoX = MT_XStart; hoPtr.hoY = MT_YStart; hoPtr.roc.rcChanged = true; }; } override public function setXPosition(_arg1:int):void{ var _local2:int = hoPtr.hoX; hoPtr.hoX = _arg1; _local2 = (_local2 - MT_XOrigin); _arg1 = (_arg1 - _local2); _local2 = ((MT_XDest - MT_XOrigin) + _arg1); MT_XDest = _local2; _local2 = MT_XOrigin; MT_XOrigin = _arg1; _local2 = (_local2 - _arg1); MT_XStart = (MT_XStart - _local2); hoPtr.rom.rmMoveFlag = true; hoPtr.roc.rcChanged = true; hoPtr.roc.rcCheckCollides = true; } } }//package Movements
Section 167
//CMovePlatform (Movements.CMovePlatform) package Movements { import Application.*; import Services.*; import Banks.*; import RunLoop.*; import Objects.*; import Sprites.*; import Animations.*; public class CMovePlatform extends CMove { public var MP_JumpStopped:int; public var MP_Bounce:int; public var MP_YSpeed:int; public var MP_NoJump:Boolean; public var MP_BounceMu:int; public var MP_XMB:int; public var MP_Gravity:int; public var MP_JumpControl:int; public var MP_HTFOOT:int; public var MP_YMB:int; public var MP_PreviousDir:int; public var MP_YObjectUnder:int; public var MP_Jump:int; public var MP_XSpeed:int; public var MP_ObjectUnder:CObject; public var MP_Type:int; public var MP_XObjectUnder:int; public static var MPJC_DIAGO:int = 1; public static var MPTYPE_CROUCH:int = 4; public static var MPTYPE_WALK:int = 0; public static var MPTYPE_FALL:int = 3; public static var MPTYPE_JUMP:int = 2; public static var MPJC_NOJUMP:int = 0; public static var MPTYPE_CLIMB:int = 1; public static var MPTYPE_UNCROUCH:int = 5; public static var MPJC_BUTTON1:int = 2; public static var MPJC_BUTTON2:int = 3; override public function setYPosition(_arg1:int):void{ if (hoPtr.hoY != _arg1){ hoPtr.hoY = _arg1; hoPtr.rom.rmMoveFlag = true; hoPtr.roc.rcChanged = true; hoPtr.roc.rcCheckCollides = true; }; } override public function setSpeed(_arg1:int):void{ if (_arg1 < 0){ _arg1 = 0; }; if (_arg1 > 250){ _arg1 = 250; }; if (_arg1 > hoPtr.roc.rcMaxSpeed){ _arg1 = hoPtr.roc.rcMaxSpeed; }; hoPtr.roc.rcSpeed = _arg1; MP_XSpeed = (hoPtr.roc.rcSpeed * Cosinus32[hoPtr.roc.rcDir]); MP_YSpeed = (hoPtr.roc.rcSpeed * Sinus32[hoPtr.roc.rcDir]); hoPtr.rom.rmMoveFlag = true; } public function calcMBFoot():void{ var _local1:CImage; if (hoPtr.roc.rcImage != 0){ _local1 = hoPtr.hoAdRunHeader.rhApp.imageBank.getImageInfoEx(hoPtr.roc.rcImage, hoPtr.roc.rcAngle, hoPtr.roc.rcScaleX, hoPtr.roc.rcScaleY); } else { _local1 = new CImage(); _local1.width = hoPtr.hoImgWidth; _local1.height = hoPtr.hoImgHeight; _local1.xSpot = hoPtr.hoImgXSpot; _local1.ySpot = hoPtr.hoImgYSpot; }; MP_XMB = 0; MP_YMB = (_local1.height - _local1.ySpot); MP_HTFOOT = (((_local1.height * 2) + _local1.height) >>> 3); } override public function stop():void{ var _local3:int; var _local4:int; var _local5:int; var _local6:CPoint; MP_Bounce = 0; if (rmCollisionCount != hoPtr.hoAdRunHeader.rh3CollisionCount){ mpStopIt(); return; }; hoPtr.rom.rmMoveFlag = true; var _local1:int = (hoPtr.hoX - hoPtr.hoAdRunHeader.rhWindowX); var _local2:int = (hoPtr.hoY - hoPtr.hoAdRunHeader.rhWindowY); switch ((hoPtr.hoAdRunHeader.rhEvtProg.rhCurCode & 4294901760)){ case (-12 << 16): _local3 = (hoPtr.hoX - hoPtr.hoImgXSpot); _local4 = (hoPtr.hoY - hoPtr.hoImgYSpot); _local5 = hoPtr.hoAdRunHeader.quadran_Out(_local3, _local4, (_local3 + hoPtr.hoImgWidth), (_local4 + hoPtr.hoImgHeight)); _local3 = hoPtr.hoX; _local4 = hoPtr.hoY; if ((_local5 & CRun.BORDER_LEFT) != 0){ _local3 = hoPtr.hoImgXSpot; MP_XSpeed = 0; MP_NoJump = true; }; if ((_local5 & CRun.BORDER_RIGHT) != 0){ _local3 = ((hoPtr.hoAdRunHeader.rhLevelSx - hoPtr.hoImgWidth) + hoPtr.hoImgXSpot); MP_XSpeed = 0; MP_NoJump = true; }; if ((_local5 & CRun.BORDER_TOP) != 0){ _local4 = hoPtr.hoImgYSpot; MP_YSpeed = 0; MP_NoJump = false; }; if ((_local5 & CRun.BORDER_BOTTOM) != 0){ _local4 = ((hoPtr.hoAdRunHeader.rhLevelSy - hoPtr.hoImgHeight) + hoPtr.hoImgYSpot); MP_YSpeed = 0; MP_NoJump = false; }; hoPtr.hoX = _local3; hoPtr.hoY = _local4; if (MP_Type == MPTYPE_JUMP){ MP_Type = MPTYPE_FALL; } else { MP_Type = MPTYPE_WALK; }; MP_JumpStopped = 0; return; case (-13 << 16): case (-14 << 16): MP_NoJump = false; _local6 = new CPoint(); if (MP_Type == MPTYPE_FALL){ mpApproachSprite(_local1, _local2, (hoPtr.roc.rcOldX - hoPtr.hoAdRunHeader.rhWindowX), (hoPtr.roc.rcOldY - hoPtr.hoAdRunHeader.rhWindowY), MP_HTFOOT, CRunFrame.CM_TEST_PLATFORM, _local6); hoPtr.hoX = (_local6.x + hoPtr.hoAdRunHeader.rhWindowX); hoPtr.hoY = (_local6.y + hoPtr.hoAdRunHeader.rhWindowY); MP_Type = MPTYPE_WALK; hoPtr.roc.rcChanged = true; if (tst_SpritePosition(hoPtr.hoX, (hoPtr.hoY + 1), 0, CRunFrame.CM_TEST_PLATFORM, true)){ hoPtr.roc.rcSpeed = 0; MP_XSpeed = 0; } else { MP_JumpStopped = 0; hoPtr.roc.rcSpeed = Math.abs((MP_XSpeed / 0x0100)); MP_YSpeed = 0; }; return; }; if (MP_Type == MPTYPE_WALK){ if (mpApproachSprite(_local1, _local2, _local1, (_local2 - MP_HTFOOT), 0, CRunFrame.CM_TEST_PLATFORM, _local6)){ hoPtr.hoX = (_local6.x + hoPtr.hoAdRunHeader.rhWindowX); hoPtr.hoY = (_local6.y + hoPtr.hoAdRunHeader.rhWindowY); hoPtr.roc.rcChanged = true; return; }; if (mpApproachSprite(_local1, _local2, (hoPtr.roc.rcOldX - hoPtr.hoAdRunHeader.rhWindowX), (hoPtr.roc.rcOldY - hoPtr.hoAdRunHeader.rhWindowY), 0, CRunFrame.CM_TEST_PLATFORM, _local6)){ hoPtr.hoX = (_local6.x + hoPtr.hoAdRunHeader.rhWindowX); hoPtr.hoY = (_local6.y + hoPtr.hoAdRunHeader.rhWindowY); hoPtr.roc.rcChanged = true; mpStopIt(); return; }; }; if (MP_Type == MPTYPE_JUMP){ if (mpApproachSprite(_local1, _local2, _local1, (_local2 - MP_HTFOOT), 0, CRunFrame.CM_TEST_PLATFORM, _local6)){ hoPtr.hoX = (_local6.x + hoPtr.hoAdRunHeader.rhWindowX); hoPtr.hoY = (_local6.y + hoPtr.hoAdRunHeader.rhWindowY); hoPtr.roc.rcChanged = true; return; }; MP_JumpStopped = 1; MP_XSpeed = 0; }; if (MP_Type == MPTYPE_CLIMB){ if (mpApproachSprite(_local1, _local2, (hoPtr.roc.rcOldX - hoPtr.hoAdRunHeader.rhWindowX), (hoPtr.roc.rcOldY - hoPtr.hoAdRunHeader.rhWindowY), 0, CRunFrame.CM_TEST_PLATFORM, _local6)){ hoPtr.hoX = (_local6.x + hoPtr.hoAdRunHeader.rhWindowX); hoPtr.hoY = (_local6.y + hoPtr.hoAdRunHeader.rhWindowY); hoPtr.roc.rcChanged = true; mpStopIt(); return; }; }; hoPtr.roc.rcImage = hoPtr.roc.rcOldImage; hoPtr.roc.rcAngle = hoPtr.roc.rcOldAngle; if (tst_SpritePosition(hoPtr.hoX, hoPtr.hoY, 0, CRunFrame.CM_TEST_PLATFORM, true)){ return; }; hoPtr.hoX = hoPtr.roc.rcOldX; hoPtr.hoY = hoPtr.roc.rcOldY; hoPtr.roc.rcChanged = true; break; }; } override public function bounce():void{ stop(); } override public function init(_arg1:CObject, _arg2:CMoveDef):void{ var _local3:CMoveDefPlatform; hoPtr = _arg1; _local3 = CMoveDefPlatform(_arg2); hoPtr.hoCalculX = 0; hoPtr.hoCalculY = 0; MP_XSpeed = 0; hoPtr.roc.rcSpeed = 0; MP_Bounce = 0; hoPtr.roc.rcPlayer = _arg2.mvControl; rmAcc = _local3.mpAcc; rmAccValue = getAccelerator(rmAcc); rmDec = _local3.mpDec; rmDecValue = getAccelerator(rmDec); hoPtr.roc.rcMaxSpeed = _local3.mpSpeed; hoPtr.roc.rcMinSpeed = 0; MP_Gravity = _local3.mpGravity; MP_Jump = _local3.mpJump; var _local4:int = _local3.mpJumpControl; if (_local4 > 3){ _local4 = MPJC_DIAGO; }; MP_JumpControl = _local4; MP_YSpeed = 0; MP_JumpStopped = 0; MP_ObjectUnder = null; moveAtStart(_arg2); MP_PreviousDir = hoPtr.roc.rcDir; hoPtr.roc.rcChanged = true; MP_Type = MPTYPE_WALK; } public function mpStopIt():void{ hoPtr.roc.rcSpeed = 0; MP_XSpeed = 0; MP_YSpeed = 0; } override public function move():void{ var _local1:int; var _local2:int; var _local5:int; var _local6:int; var _local14:int; var _local15:int; var _local16:Boolean; var _local17:int; var _local18:int; var _local19:CPoint; var _local20:*; var _local21:*; var _local22:*; var _local23:*; var _local24:*; hoPtr.hoAdRunHeader.rhVBLObjet = 1; var _local3:int = hoPtr.hoAdRunHeader.rhPlayer[(hoPtr.roc.rcPlayer - 1)]; calcMBFoot(); var _local4:int = MP_XSpeed; if (MP_JumpStopped == 0){ if (_local4 <= 0){ if ((_local3 & 4) != 0){ _local6 = rmAccValue; if ((hoPtr.hoAdRunHeader.rhFrame.leFlags & CRunFrame.LEF_TIMEDMVTS) != 0){ _local6 = (Number(_local6) * hoPtr.hoAdRunHeader.rh4MvtTimerCoef); }; _local4 = (_local4 - _local6); _local5 = (_local4 / 0x0100); if (_local5 < -(hoPtr.roc.rcMaxSpeed)){ _local4 = (-(hoPtr.roc.rcMaxSpeed) * 0x0100); }; } else { if (_local4 < 0){ _local6 = rmDecValue; if ((hoPtr.hoAdRunHeader.rhFrame.leFlags & CRunFrame.LEF_TIMEDMVTS) != 0){ _local6 = (Number(_local6) * hoPtr.hoAdRunHeader.rh4MvtTimerCoef); }; _local4 = (_local4 + _local6); if (_local4 > 0){ _local4 = 0; }; }; }; if ((_local3 & 8) != 0){ _local4 = -(_local4); }; }; if (_local4 >= 0){ if ((_local3 & 8) != 0){ _local6 = rmAccValue; if ((hoPtr.hoAdRunHeader.rhFrame.leFlags & CRunFrame.LEF_TIMEDMVTS) != 0){ _local6 = (Number(_local6) * hoPtr.hoAdRunHeader.rh4MvtTimerCoef); }; _local4 = (_local4 + _local6); _local5 = (_local4 / 0x0100); if (_local5 > hoPtr.roc.rcMaxSpeed){ _local4 = (hoPtr.roc.rcMaxSpeed * 0x0100); }; } else { if (_local4 > 0){ _local6 = rmDecValue; if ((hoPtr.hoAdRunHeader.rhFrame.leFlags & CRunFrame.LEF_TIMEDMVTS) != 0){ _local6 = (Number(_local6) * hoPtr.hoAdRunHeader.rh4MvtTimerCoef); }; _local4 = (_local4 - _local6); if (_local4 < 0){ _local4 = 0; }; }; }; if ((_local3 & 4) != 0){ _local4 = -(_local4); }; }; MP_XSpeed = _local4; }; var _local7:int = MP_YSpeed; var _local8:Boolean; while (true) { switch (MP_Type){ case 2: case 3: _local6 = (MP_Gravity << 5); if ((hoPtr.hoAdRunHeader.rhFrame.leFlags & CRunFrame.LEF_TIMEDMVTS) != 0){ _local6 = (Number(_local6) * hoPtr.hoAdRunHeader.rh4MvtTimerCoef); }; _local7 = (_local7 + _local6); if (_local7 > 0xFA00){ _local7 = 0xFA00; }; break; case 0: if ((_local3 & 1) != 0){ if (check_Ladder(hoPtr.hoLayer, (hoPtr.hoX + MP_XMB), ((hoPtr.hoY + MP_YMB) - 4)) == CRun.INTBAD){ break; }; MP_Type = MPTYPE_CLIMB; _local8 = true; continue; }; if ((_local3 & 2) != 0){ if (check_Ladder(hoPtr.hoLayer, (hoPtr.hoX + MP_XMB), ((hoPtr.hoY + MP_YMB) + 4)) == CRun.INTBAD){ break; }; MP_Type = MPTYPE_CLIMB; _local8 = true; continue; }; break; case 1: if (_local8 == false){ MP_JumpStopped = 0; if (check_Ladder(hoPtr.hoLayer, (hoPtr.hoX + MP_XMB), (hoPtr.hoY + MP_YMB)) == CRun.INTBAD){ if (check_Ladder(hoPtr.hoLayer, (hoPtr.hoX + MP_XMB), ((hoPtr.hoY + MP_YMB) - 4)) == CRun.INTBAD){ break; }; }; }; if (_local7 <= 0){ if ((_local3 & 1) != 0){ _local6 = rmAccValue; if ((hoPtr.hoAdRunHeader.rhFrame.leFlags & CRunFrame.LEF_TIMEDMVTS) != 0){ _local6 = (Number(_local6) * hoPtr.hoAdRunHeader.rh4MvtTimerCoef); }; _local7 = (_local7 - _local6); _local5 = (_local7 / 0x0100); if (_local5 < -(hoPtr.roc.rcMaxSpeed)){ _local7 = (-(hoPtr.roc.rcMaxSpeed) * 0x0100); }; } else { _local6 = rmDecValue; if ((hoPtr.hoAdRunHeader.rhFrame.leFlags & CRunFrame.LEF_TIMEDMVTS) != 0){ _local6 = (Number(_local6) * hoPtr.hoAdRunHeader.rh4MvtTimerCoef); }; _local7 = (_local7 + _local6); if (_local7 > 0){ _local7 = 0; }; }; if ((_local3 & 2) != 0){ _local7 = -(_local7); }; }; if (_local7 >= 0){ if ((_local3 & 2) != 0){ _local6 = rmAccValue; if ((hoPtr.hoAdRunHeader.rhFrame.leFlags & CRunFrame.LEF_TIMEDMVTS) != 0){ _local6 = (Number(_local6) * hoPtr.hoAdRunHeader.rh4MvtTimerCoef); }; _local7 = (_local7 + _local6); _local5 = (_local7 / 0x0100); if (_local5 > hoPtr.roc.rcMaxSpeed){ _local7 = (hoPtr.roc.rcMaxSpeed * 0x0100); }; } else { _local6 = rmDecValue; if ((hoPtr.hoAdRunHeader.rhFrame.leFlags & CRunFrame.LEF_TIMEDMVTS) != 0){ _local6 = (Number(_local6) * hoPtr.hoAdRunHeader.rh4MvtTimerCoef); }; _local7 = (_local7 - _local6); if (_local7 < 0){ _local7 = 0; }; }; if ((_local3 & 1) != 0){ _local7 = -(_local7); }; }; break; }; break; }; MP_YSpeed = _local7; var _local9:int; if (_local4 < 0){ _local9 = 16; }; var _local10:int = _local4; var _local11:int = _local7; if (_local11 != 0){ _local14 = 0; if (_local10 < 0){ _local14 = (_local14 | 1); _local10 = -(_local10); }; if (_local11 < 0){ _local14 = (_local14 | 2); _local11 = -(_local11); }; _local10 = (_local10 << 8); _local10 = (_local10 / _local11); _local15 = 0; while (true) { if (_local10 >= CosSurSin32[_local15]){ break; }; _local15 = (_local15 + 2); }; _local9 = CosSurSin32[(_local15 + 1)]; if ((_local14 & 2) != 0){ _local9 = (-(_local9) + 32); _local9 = (_local9 & 31); }; if ((_local14 & 1) != 0){ _local9 = (_local9 - 8); _local9 = (_local9 & 31); _local9 = -(_local9); _local9 = (_local9 & 31); _local9 = (_local9 + 8); _local9 = (_local9 & 31); }; }; _local10 = _local4; var _local12:int = Cosinus32[_local9]; var _local13:int = Sinus32[_local9]; if (_local12 < 0){ _local12 = -(_local12); }; if (_local13 < 0){ _local13 = -(_local13); }; if (_local12 < _local13){ _local12 = _local13; _local10 = _local7; }; if (_local10 < 0){ _local10 = -(_local10); }; _local10 = (_local10 / _local12); if (_local10 > 250){ _local10 = 250; }; hoPtr.roc.rcSpeed = _local10; switch (MP_Type){ case 1: if (_local7 < 0){ hoPtr.roc.rcDir = 8; } else { if (_local7 > 0){ hoPtr.roc.rcDir = 24; }; }; break; case 3: hoPtr.roc.rcDir = _local9; break; default: if (_local4 < 0){ hoPtr.roc.rcDir = 16; } else { if (_local4 > 0){ hoPtr.roc.rcDir = 0; }; }; break; }; switch (MP_Type){ case 4: hoPtr.roc.rcAnim = CAnim.ANIMID_CROUCH; break; case 5: hoPtr.roc.rcAnim = CAnim.ANIMID_UNCROUCH; break; case 3: hoPtr.roc.rcAnim = CAnim.ANIMID_FALL; break; case 2: hoPtr.roc.rcAnim = CAnim.ANIMID_JUMP; break; case 1: hoPtr.roc.rcAnim = CAnim.ANIMID_CLIMB; break; default: hoPtr.roc.rcAnim = CAnim.ANIMID_WALK; break; }; if (hoPtr.roa != null){ hoPtr.roa.animate(); }; if (CRun.bMoveChanged){ return; }; calcMBFoot(); newMake_Move(hoPtr.roc.rcSpeed, _local9); if (CRun.bMoveChanged){ return; }; if ((((((MP_Type == MPTYPE_WALK)) || ((MP_Type == MPTYPE_CLIMB)))) && ((MP_NoJump == false)))){ _local16 = false; _local17 = MP_JumpControl; if (_local17 != 0){ --_local17; if (_local17 == 0){ if ((_local3 & 5) == 5){ _local16 = true; }; if ((_local3 & 9) == 9){ _local16 = true; }; } else { _local17 = (_local17 << 4); if ((_local3 & _local17) != 0){ _local16 = true; }; }; }; if (_local16){ MP_YSpeed = (-(MP_Jump) << 8); MP_Type = MPTYPE_JUMP; }; }; switch (MP_Type){ case 2: if (MP_YSpeed >= 0){ MP_Type = MPTYPE_FALL; }; break; case 3: if (check_Ladder(hoPtr.hoLayer, (hoPtr.hoX + MP_XMB), (hoPtr.hoY + MP_YMB)) != CRun.INTBAD){ MP_YSpeed = 0; MP_Type = MPTYPE_CLIMB; hoPtr.roc.rcDir = 8; }; break; case 0: if (((!(((_local3 & 3) == 0))) && (((_local3 & 12) == 0)))){ if (check_Ladder(hoPtr.hoLayer, (hoPtr.hoX + MP_XMB), (hoPtr.hoY + MP_YMB)) != CRun.INTBAD){ MP_Type = MPTYPE_CLIMB; MP_XSpeed = 0; break; }; }; if ((_local3 & 2) != 0){ if (hoPtr.roa != null){ if (hoPtr.roa.anim_Exist(CAnim.ANIMID_CROUCH)){ MP_XSpeed = 0; MP_Type = MPTYPE_CROUCH; }; }; }; if (check_Ladder(hoPtr.hoLayer, (hoPtr.hoX + MP_XMB), (hoPtr.hoY + MP_YMB)) != CRun.INTBAD){ break; }; if (tst_SpritePosition(hoPtr.hoX, (hoPtr.hoY + 10), MP_HTFOOT, CRunFrame.CM_TEST_PLATFORM, true) == false){ _local1 = (hoPtr.hoX - hoPtr.hoAdRunHeader.rhWindowX); _local2 = (hoPtr.hoY - hoPtr.hoAdRunHeader.rhWindowY); _local18 = ((_local2 + MP_HTFOOT) - 1); _local19 = new CPoint(); mpApproachSprite(_local1, _local18, _local1, _local2, MP_HTFOOT, CRunFrame.CM_TEST_PLATFORM, _local19); hoPtr.hoX = (_local19.x + hoPtr.hoAdRunHeader.rhWindowX); hoPtr.hoY = (_local19.y + hoPtr.hoAdRunHeader.rhWindowY); MP_NoJump = false; } else { MP_Type = MPTYPE_FALL; }; break; case 1: if (check_Ladder(hoPtr.hoLayer, (hoPtr.hoX + MP_XMB), (hoPtr.hoY + MP_YMB)) == CRun.INTBAD){ if (MP_YSpeed < 0){ _local11 = 0; while (_local11 < 32) { if (check_Ladder(hoPtr.hoLayer, (hoPtr.hoX + MP_XMB), ((hoPtr.hoY + MP_YMB) + _local11)) != CRun.INTBAD){ hoPtr.hoY = (hoPtr.hoY + _local11); break; }; _local11++; }; }; MP_YSpeed = 0; }; if ((_local3 & 12) != 0){ MP_Type = MPTYPE_WALK; MP_YSpeed = 0; }; break; case 4: if ((_local3 & 2) == 0){ if (hoPtr.roa != null){ if (hoPtr.roa.anim_Exist(CAnim.ANIMID_UNCROUCH)){ MP_Type = MPTYPE_UNCROUCH; hoPtr.roc.rcAnim = CAnim.ANIMID_UNCROUCH; hoPtr.roa.animate(); hoPtr.roa.raAnimRepeat = 1; break; }; }; MP_Type = MPTYPE_WALK; }; break; case 5: if (hoPtr.roa != null){ if (hoPtr.roa.raAnimNumberOfFrame == 0){ MP_Type = MPTYPE_WALK; }; }; break; }; if ((((((MP_Type == MPTYPE_WALK)) || ((MP_Type == MPTYPE_CROUCH)))) || ((MP_Type == MPTYPE_UNCROUCH)))){ do { _local20 = null; if (hoPtr.hoOiList != null){ _local20 = hoPtr.hoOiList.oilColList; }; } while (hoPtr.hoAdRunHeader.objectAllCol_IXY(hoPtr, hoPtr.roc.rcImage, hoPtr.roc.rcAngle, hoPtr.roc.rcScaleX, hoPtr.roc.rcScaleY, hoPtr.hoX, hoPtr.hoY, _local20) != null); } else { MP_ObjectUnder = null; }; } override public function setDir(_arg1:int):void{ hoPtr.roc.rcDir = _arg1; MP_XSpeed = (hoPtr.roc.rcSpeed * Cosinus32[_arg1]); MP_YSpeed = (hoPtr.roc.rcSpeed * Sinus32[_arg1]); } override public function setMaxSpeed(_arg1:int):void{ if (_arg1 < 0){ _arg1 = 0; }; if (_arg1 > 250){ _arg1 = 250; }; hoPtr.roc.rcMaxSpeed = _arg1; _arg1 = (_arg1 << 8); if (MP_XSpeed > _arg1){ MP_XSpeed = _arg1; }; hoPtr.rom.rmMoveFlag = true; } public function check_Ladder(_arg1:int, _arg2:int, _arg3:int):int{ var _local4:CRect = hoPtr.hoAdRunHeader.y_GetLadderAt(_arg1, _arg2, _arg3); if (_local4 != null){ return (_local4.top); }; return (CRun.INTBAD); } public function mpHandle_Background():void{ calcMBFoot(); if (check_Ladder(hoPtr.hoLayer, (hoPtr.hoX + MP_XMB), (hoPtr.hoY + MP_YMB)) != CRun.INTBAD){ return; }; if (hoPtr.hoAdRunHeader.colMask_TestObject_IXY(hoPtr, hoPtr.roc.rcImage, hoPtr.roc.rcAngle, hoPtr.roc.rcScaleX, hoPtr.roc.rcScaleY, hoPtr.hoX, hoPtr.hoY, 0, CRunFrame.CM_TEST_OBSTACLE) == false){ if ((((MP_Type == MPTYPE_JUMP)) && ((MP_YSpeed < 0)))){ return; }; if (hoPtr.hoAdRunHeader.colMask_TestObject_IXY(hoPtr, hoPtr.roc.rcImage, hoPtr.roc.rcAngle, hoPtr.roc.rcScaleX, hoPtr.roc.rcScaleY, hoPtr.hoX, hoPtr.hoY, MP_HTFOOT, CRunFrame.CM_TEST_PLATFORM) == false){ return; }; }; hoPtr.hoAdRunHeader.rhEvtProg.handle_Event(hoPtr, ((-13 << 16) | (hoPtr.hoType & 0xFFFF))); } override public function setGravity(_arg1:int):void{ MP_Gravity = _arg1; } override public function setXPosition(_arg1:int):void{ if (hoPtr.hoX != _arg1){ hoPtr.hoX = _arg1; hoPtr.rom.rmMoveFlag = true; hoPtr.roc.rcChanged = true; hoPtr.roc.rcCheckCollides = true; }; } } }//package Movements
Section 168
//CMoveRace (Movements.CMoveRace) package Movements { import Application.*; import RunLoop.*; import Objects.*; import Animations.*; public class CMoveRace extends CMove { public var MR_Bounce:int; public var MR_BounceMu:int; public var MR_Speed:int; public var MR_RotCpt:int; public var MR_OldJoy:int; public var MR_RotMask:int; public var MR_RotSpeed:int; public var MR_OkReverse:int; public var MR_RotPos:int; public var MR_LastBounce:int; public static var RaceMask:Array = [4294967288, 4294967292, 4294967294, 4294967295]; override public function setYPosition(_arg1:int):void{ if (hoPtr.hoY != _arg1){ hoPtr.hoY = _arg1; hoPtr.rom.rmMoveFlag = true; hoPtr.roc.rcChanged = true; hoPtr.roc.rcCheckCollides = true; }; } override public function setSpeed(_arg1:int):void{ if (_arg1 < 0){ _arg1 = 0; }; if (_arg1 > 250){ _arg1 = 250; }; if (_arg1 > hoPtr.roc.rcMaxSpeed){ _arg1 = hoPtr.roc.rcMaxSpeed; }; _arg1 = (_arg1 << 8); MR_Speed = _arg1; hoPtr.rom.rmMoveFlag = true; } override public function bounce():void{ if (rmCollisionCount == hoPtr.hoAdRunHeader.rh3CollisionCount){ mv_Approach(!(((rmOpt & MVTOPT_8DIR_STICK) == 0))); }; if (hoPtr.hoAdRunHeader.rhLoopCount != MR_LastBounce){ MR_Bounce = hoPtr.rom.rmReverse; hoPtr.rom.rmReverse = 0; MR_Bounce++; if (MR_Bounce >= 16){ stop(); return; }; hoPtr.rom.rmMoveFlag = true; hoPtr.rom.rmBouncing = true; }; } override public function stop():void{ MR_Bounce = 0; MR_Speed = 0; hoPtr.rom.rmReverse = 0; if (rmCollisionCount == hoPtr.hoAdRunHeader.rh3CollisionCount){ mv_Approach(!(((rmOpt & MVTOPT_8DIR_STICK) == 0))); hoPtr.rom.rmMoveFlag = true; }; } override public function setDir(_arg1:int):void{ MR_RotPos = _arg1; hoPtr.roc.rcDir = (_arg1 & MR_RotMask); } override public function setMaxSpeed(_arg1:int):void{ if (_arg1 < 0){ _arg1 = 0; }; if (_arg1 > 250){ _arg1 = 250; }; hoPtr.roc.rcMaxSpeed = _arg1; _arg1 = (_arg1 << 8); if (MR_Speed > _arg1){ MR_Speed = _arg1; }; hoPtr.rom.rmMoveFlag = true; } override public function init(_arg1:CObject, _arg2:CMoveDef):void{ hoPtr = _arg1; var _local3:CMoveDefRace = CMoveDefRace(_arg2); MR_Speed = 0; hoPtr.roc.rcSpeed = 0; MR_Bounce = 0; MR_LastBounce = -1; hoPtr.roc.rcPlayer = _local3.mvControl; rmAcc = _local3.mrAcc; rmAccValue = getAccelerator(_local3.mrAcc); rmDec = _local3.mrDec; rmDecValue = getAccelerator(_local3.mrDec); hoPtr.roc.rcMaxSpeed = _local3.mrSpeed; hoPtr.roc.rcMinSpeed = 0; MR_BounceMu = _local3.mrBounceMult; MR_OkReverse = _local3.mrOkReverse; hoPtr.rom.rmReverse = 0; rmOpt = _local3.mvOpt; MR_OldJoy = 0; MR_RotMask = RaceMask[_local3.mrAngles]; MR_RotSpeed = _local3.mrRot; MR_RotCpt = 0; MR_RotPos = hoPtr.roc.rcDir; hoPtr.hoCalculX = 0; hoPtr.hoCalculY = 0; moveAtStart(_arg2); hoPtr.roc.rcChanged = true; } override public function move():void{ var _local1:int; var _local2:int; var _local3:int; var _local4:int; var _local5:int; var _local6:int; var _local7:int; hoPtr.hoAdRunHeader.rhVBLObjet = 1; if (MR_Bounce == 0){ hoPtr.rom.rmBouncing = false; _local1 = (hoPtr.hoAdRunHeader.rhPlayer[(hoPtr.roc.rcPlayer - 1)] & 15); _local2 = 0; if ((_local1 & 8) != 0){ _local2 = -1; }; if ((_local1 & 4) != 0){ _local2 = 1; }; if (_local2 != 0){ _local7 = MR_RotSpeed; if ((hoPtr.hoAdRunHeader.rhFrame.leFlags & CRunFrame.LEF_TIMEDMVTS) != 0){ _local7 = (Number(_local7) * hoPtr.hoAdRunHeader.rh4MvtTimerCoef); }; MR_RotCpt = (MR_RotCpt + _local7); while (MR_RotCpt > 100) { MR_RotCpt = (MR_RotCpt - 100); MR_RotPos = (MR_RotPos + _local2); MR_RotPos = (MR_RotPos & 31); hoPtr.roc.rcDir = (MR_RotPos & MR_RotMask); }; hoPtr.roc.rcChanged = true; }; _local3 = 0; if (hoPtr.rom.rmReverse != 0){ if ((_local1 & 1) != 0){ _local3 = 1; }; if ((_local1 & 2) != 0){ _local3 = 2; }; } else { if ((_local1 & 1) != 0){ _local3 = 2; }; if ((_local1 & 2) != 0){ _local3 = 1; }; }; _local4 = MR_Speed; while (true) { if ((_local3 & 1) != 0){ if (MR_Speed == 0){ if (MR_OkReverse == 0){ break; }; if ((MR_OldJoy & 3) != 0){ break; }; hoPtr.rom.rmReverse = (hoPtr.rom.rmReverse ^ 1); _local7 = rmAccValue; if ((hoPtr.hoAdRunHeader.rhFrame.leFlags & CRunFrame.LEF_TIMEDMVTS) != 0){ _local7 = (Number(_local7) * hoPtr.hoAdRunHeader.rh4MvtTimerCoef); }; _local4 = (_local4 + _local7); _local6 = (_local4 >> 8); if (_local6 > hoPtr.roc.rcMaxSpeed){ _local4 = (hoPtr.roc.rcMaxSpeed << 8); MR_Speed = _local4; }; MR_Speed = _local4; break; }; _local7 = rmDecValue; if ((hoPtr.hoAdRunHeader.rhFrame.leFlags & CRunFrame.LEF_TIMEDMVTS) != 0){ _local7 = (Number(_local7) * hoPtr.hoAdRunHeader.rh4MvtTimerCoef); }; _local4 = (_local4 - _local7); if (_local4 < 0){ _local4 = 0; }; MR_Speed = _local4; } else { if ((_local3 & 2) != 0){ _local7 = rmAccValue; if ((hoPtr.hoAdRunHeader.rhFrame.leFlags & CRunFrame.LEF_TIMEDMVTS) != 0){ _local7 = (Number(_local7) * hoPtr.hoAdRunHeader.rh4MvtTimerCoef); }; _local4 = (_local4 + _local7); _local6 = (_local4 >> 8); if (_local6 > hoPtr.roc.rcMaxSpeed){ _local4 = (hoPtr.roc.rcMaxSpeed << 8); MR_Speed = _local4; }; MR_Speed = _local4; }; }; break; }; MR_OldJoy = _local1; hoPtr.roc.rcSpeed = (MR_Speed >> 8); hoPtr.roc.rcAnim = CAnim.ANIMID_WALK; if (hoPtr.roa != null){ hoPtr.roa.animate(); }; if (CRun.bMoveChanged){ return; }; _local5 = hoPtr.roc.rcDir; if (hoPtr.rom.rmReverse != 0){ _local5 = (_local5 + 16); _local5 = (_local5 & 31); }; if (newMake_Move(hoPtr.roc.rcSpeed, _local5) == false){ return; }; if (CRun.bMoveChanged){ return; }; }; do { if (MR_Bounce == 0){ break; }; if (hoPtr.hoAdRunHeader.rhVBLObjet == 0){ break; }; _local4 = MR_Speed; _local4 = (_local4 - rmDecValue); if (_local4 <= 0){ MR_Speed = 0; MR_Bounce = 0; break; }; MR_Speed = _local4; _local4 = (_local4 >> 8); _local5 = hoPtr.roc.rcDir; if (MR_Bounce != 0){ _local5 = (_local5 + 16); _local5 = (_local5 & 31); }; if (newMake_Move(_local4, _local5) == false){ break; }; if (CRun.bMoveChanged){ return; }; } while (true); } override public function start():void{ rmStopSpeed = 0; hoPtr.rom.rmMoveFlag = true; } override public function setRotSpeed(_arg1:int):void{ MR_RotSpeed = _arg1; } override public function setXPosition(_arg1:int):void{ if (hoPtr.hoX != _arg1){ hoPtr.hoX = _arg1; hoPtr.rom.rmMoveFlag = true; hoPtr.roc.rcChanged = true; hoPtr.roc.rcCheckCollides = true; }; } } }//package Movements
Section 169
//CMoveStatic (Movements.CMoveStatic) package Movements { import Objects.*; public class CMoveStatic extends CMove { override public function init(_arg1:CObject, _arg2:CMoveDef):void{ hoPtr = _arg1; hoPtr.roc.rcSpeed = 0; hoPtr.roc.rcCheckCollides = true; hoPtr.roc.rcChanged = true; } override public function move():void{ if (hoPtr.roa != null){ if (hoPtr.roa.animate()){ return; }; }; if (hoPtr.roc.rcCheckCollides){ hoPtr.roc.rcCheckCollides = false; hoPtr.hoAdRunHeader.newHandle_Collisions(hoPtr); }; } override public function setYPosition(_arg1:int):void{ if (hoPtr.hoY != _arg1){ hoPtr.hoY = _arg1; hoPtr.rom.rmMoveFlag = true; hoPtr.roc.rcChanged = true; }; hoPtr.roc.rcCheckCollides = true; } override public function setXPosition(_arg1:int):void{ if (hoPtr.hoX != _arg1){ hoPtr.hoX = _arg1; hoPtr.rom.rmMoveFlag = true; hoPtr.roc.rcChanged = true; }; hoPtr.roc.rcCheckCollides = true; } } }//package Movements
Section 170
//CPathStep (Movements.CPathStep) package Movements { import Services.*; public class CPathStep { public var mdName:String; public var mdLength:int; public var mdDx:int; public var mdDy:int; public var mdPause:int; public var mdSpeed:int; public var mdCosinus:int; public var mdDir:int; public var mdSinus:int; public function load(_arg1:CFile):void{ mdSpeed = _arg1.readAByte(); mdDir = _arg1.readAByte(); mdDx = _arg1.readShort(); mdDy = _arg1.readShort(); mdCosinus = _arg1.readShort(); mdSinus = _arg1.readShort(); mdLength = _arg1.readAShort(); mdPause = _arg1.readAShort(); var _local2:String = _arg1.readAString(); if (_local2.length > 0){ mdName = _local2; }; } } }//package Movements
Section 171
//CRMvt (Movements.CRMvt) package Movements { import Services.*; import OI.*; import RunLoop.*; import Objects.*; public class CRMvt { public var rmBouncing:Boolean; public var rmEventFlags:int; public var rmMovement:CMove; public var rmMvtNum:int; public var rmWrapping:int; public var rmMoveFlag:Boolean; public var rmReverse:int; public static var EF_GOESOUTPLAYFIELD:int = 2; public static var EF_GOESINPLAYFIELD:int = 1; public static var EF_WRAP:int = 4; public function initSimple(_arg1:CObject, _arg2:int, _arg3:Boolean):void{ if (rmMovement != null){ rmMovement.kill(); }; _arg1.roc.rcMovementType = _arg2; switch (_arg2){ case 11: rmMovement = new CMoveDisappear(); CRun.bMoveChanged = true; break; case 13: rmMovement = new CMoveBullet(); break; }; rmMovement.hoPtr = _arg1; if (_arg3 == false){ rmMovement.init(_arg1, null); }; } public function dirAtStart(_arg1:CObject, _arg2:int, _arg3:int):int{ var _local4:int; var _local5:int; var _local6:int; var _local7:int; if ((((_arg3 < 0)) || ((_arg3 >= 32)))){ _local4 = 0; _local5 = _arg2; _local7 = 0; while (_local7 < 32) { _local6 = _local5; _local5 = (_local5 >> 1); if ((_local6 & 1) != 0){ _local4++; }; _local7++; }; if (_local4 == 0){ _arg3 = 0; } else { _local4 = _arg1.hoAdRunHeader.random(_local4); _local5 = _arg2; _arg3 = 0; while (true) { _local6 = _local5; _local5 = (_local5 >> 1); if ((_local6 & 1) != 0){ --_local4; if (_local4 < 0){ break; }; }; _arg3++; }; }; }; return (_arg3); } public function previousMovement(_arg1:CObject):void{ var _local2:CObjectCommon = _arg1.hoCommon; if (_local2.ocMovements != null){ if ((rmMvtNum - 1) >= 0){ kill(false); init((rmMvtNum - 1), _arg1, _local2, null, -1); }; }; } public function nextMovement(_arg1:CObject):void{ var _local2:CObjectCommon = _arg1.hoCommon; if (_local2.ocMovements != null){ if ((rmMvtNum + 1) < _local2.ocMovements.nMovements){ kill(false); init((rmMvtNum + 1), _arg1, _local2, null, -1); }; }; } public function selectMovement(_arg1:CObject, _arg2:int):void{ var _local3:CObjectCommon = _arg1.hoCommon; if (_local3.ocMovements != null){ if ((((_arg2 >= 0)) && ((_arg2 < _local3.ocMovements.nMovements)))){ kill(false); init(_arg2, _arg1, _local3, null, -1); }; }; } public function move():void{ rmMovement.move(); } public function loadMvtExtension(_arg1:CObject, _arg2:CMoveDefExtension):CMove{ var _local5:CRunMvtExtension; var _local6:CMoveExtension; var _local3:String = _arg2.moduleName; var _local4:int = _local3.indexOf("-"); while (_local4 > 0) { _local3 = ((_local3.substring(0, _local4) + "_") + _local3.substring((_local4 + 1), _local3.length)); _local4 = _local3.indexOf("-"); }; if (_local5 != null){ _local5.init(_arg1); _local6 = new CMoveExtension(_local5); return (_local6); }; trace("*** Movement not found!"); return (null); } public function init(_arg1:int, _arg2:CObject, _arg3:CObjectCommon, _arg4:CCreateObjectInfo, _arg5:int):void{ if (rmMovement != null){ rmMovement.kill(); }; if (_arg4 != null){ _arg2.roc.rcDir = _arg4.cobDir; }; rmWrapping = _arg2.hoOiList.oilWrap; var _local6:CMoveDef; _arg2.roc.rcMovementType = -1; if (_arg3.ocMovements != null){ if (_arg1 < _arg3.ocMovements.nMovements){ _local6 = _arg3.ocMovements.moveList[_arg1]; rmMvtNum = _arg1; if (_arg5 == -1){ _arg5 = _local6.mvType; }; _arg2.roc.rcMovementType = _arg5; switch (_arg5){ case 0: rmMovement = new CMoveStatic(); break; case 1: rmMovement = new CMoveMouse(); break; case 2: rmMovement = new CMoveRace(); break; case 3: rmMovement = new CMoveGeneric(); break; case 4: rmMovement = new CMoveBall(); break; case 5: rmMovement = new CMovePath(); break; case 9: rmMovement = new CMovePlatform(); break; case 14: rmMovement = loadMvtExtension(_arg2, CMoveDefExtension(_local6)); if (rmMovement == null){ rmMovement = new CMoveStatic(); }; break; }; _arg2.roc.rcDir = dirAtStart(_arg2, _local6.mvDirAtStart, _arg2.roc.rcDir); rmMovement.init(_arg2, _local6); }; }; if (_arg2.roc.rcMovementType == -1){ _arg2.roc.rcMovementType = 0; rmMovement = new CMoveStatic(); rmMovement.init(_arg2, null); _arg2.roc.rcDir = 0; }; } public function kill(_arg1:Boolean):void{ rmMovement.kill(); } } }//package Movements
Section 172
//CRunMvtExtension (Movements.CRunMvtExtension) package Movements { import Services.*; import RunLoop.*; import Objects.*; public class CRunMvtExtension { public var ho:CObject; public var rh:CRun; public function setYPosition(_arg1:int):void{ } public function collisions():void{ ho.hoAdRunHeader.rh3CollisionCount++; ho.rom.rmMovement.rmCollisionCount = ho.hoAdRunHeader.rh3CollisionCount; ho.hoAdRunHeader.newHandle_Collisions(ho); } public function stop(_arg1:Boolean):void{ } public function setSpeed(_arg1:int):void{ } public function setAcc(_arg1:int):void{ } public function bounce(_arg1:Boolean):void{ } public function colMaskTestRect(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int):Boolean{ if (ho.hoAdRunHeader.colMask_Test_Rect(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6)){ return (false); }; return (true); } public function colMaskTestPoint(_arg1:int, _arg2:int, _arg3:int, _arg4:int):Boolean{ if (ho.hoAdRunHeader.colMask_Test_XY(_arg1, _arg2, _arg3, _arg4)){ return (false); }; return (true); } public function setDir(_arg1:int):void{ } public function setMaxSpeed(_arg1:int):void{ } public function setDec(_arg1:int):void{ } public function init(_arg1:CObject):void{ ho = _arg1; rh = ho.hoAdRunHeader; } public function move():Boolean{ return (false); } public function setGravity(_arg1:int):void{ } public function getDeceleration():int{ return (0); } public function approachObject(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:CPoint):Boolean{ _arg1 = (_arg1 - ho.hoAdRunHeader.rhWindowX); _arg2 = (_arg2 - ho.hoAdRunHeader.rhWindowY); _arg3 = (_arg3 - ho.hoAdRunHeader.rhWindowX); _arg4 = (_arg4 - ho.hoAdRunHeader.rhWindowY); var _local8:Boolean = ho.rom.rmMovement.mpApproachSprite(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7); _arg7.x = (_arg7.x + ho.hoAdRunHeader.rhWindowX); _arg7.y = (_arg7.y + ho.hoAdRunHeader.rhWindowY); return (_local8); } public function initialize(_arg1:CBinaryFile):void{ } public function getSpeed():int{ return (0); } public function testPosition(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:Boolean):Boolean{ return (ho.rom.rmMovement.tst_SpritePosition(_arg1, _arg2, _arg3, _arg4, _arg5)); } public function actionEntry(_arg1:int):Number{ return (0); } public function kill():void{ } public function getGravity():int{ return (0); } public function getParamDouble():Number{ var _local1:CMoveExtension = CMoveExtension(ho.rom.rmMovement); return (_local1.callParam); } public function setXPosition(_arg1:int):void{ } public function reverse():void{ } public function moveIt():Boolean{ if (ho.rom.rmMovement.newMake_Move(ho.roc.rcSpeed, ho.roc.rcDir)){ return (true); }; return (false); } public function start():void{ } public function setPosition(_arg1:int, _arg2:int):void{ } public function animations(_arg1:int):void{ ho.roc.rcAnim = _arg1; if (ho.roa != null){ ho.roa.animate(); }; } public function dirAtStart(_arg1:int):int{ return (ho.rom.dirAtStart(ho, _arg1, 32)); } public function setRotSpeed(_arg1:int):void{ } public function getJoystick(_arg1:int):int{ return (ho.hoAdRunHeader.rhPlayer[_arg1]); } public function set8Dirs(_arg1:int):void{ } public function getAcceleration():int{ return (0); } public function extension(_arg1:int, _arg2:int):int{ return (0); } } }//package Movements
Section 173
//IAutomationObject (mx.automation.IAutomationObject) package mx.automation { import flash.events.*; public interface IAutomationObject { function createAutomationIDPart(_arg1:IAutomationObject):Object; function get automationName():String; function get showInAutomationHierarchy():Boolean; function set automationName(_arg1:String):void; function getAutomationChildAt(_arg1:int):IAutomationObject; function get automationDelegate():Object; 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 174
//Binding (mx.binding.Binding) package mx.binding { import flash.utils.*; 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 disabledRequests:Dictionary; mx_internal var isExecuting:Boolean; mx_internal var isHandlingEvent:Boolean; public var twoWayCounterpart:Binding; private var wrappedFunctionSuccessful:Boolean; mx_internal var _isEnabled:Boolean; public var uiComponentWatcher:int; private var lastValue:Object; mx_internal static const VERSION:String = "3.0.0.0"; public function Binding(_arg1:Object, _arg2:Function, _arg3:Function, _arg4:String){ this.document = _arg1; this.srcFunc = _arg2; this.destFunc = _arg3; this.destString = _arg4; _isEnabled = true; isExecuting = false; isHandlingEvent = false; hasHadValue = false; uiComponentWatcher = -1; BindingManager.addBinding(_arg1, _arg4, this); } private function registerDisabledExecute(_arg1:Object):void{ if (_arg1 != null){ disabledRequests = ((disabledRequests)!=null) ? disabledRequests : new Dictionary(true); disabledRequests[_arg1] = true; }; } 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 watcherFired(_arg1:Boolean, _arg2:int):void{ var commitEvent = _arg1; var cloneIndex = _arg2; if (isHandlingEvent){ return; }; try { isHandlingEvent = true; execute(cloneIndex); } finally { isHandlingEvent = false; }; } private function nodeSeqEqual(_arg1:XMLList, _arg2:XMLList):Boolean{ var _local4:uint; var _local3:uint = _arg1.length(); if (_local3 == _arg2.length()){ _local4 = 0; while ((((_local4 < _local3)) && ((_arg1[_local4] === _arg2[_local4])))) { _local4++; }; return ((_local4 == _local3)); //unresolved jump }; return (false); } mx_internal function set isEnabled(_arg1:Boolean):void{ _isEnabled = _arg1; if (_arg1){ processDisabledRequests(); }; } private function processDisabledRequests():void{ var _local1:Object; if (disabledRequests != null){ for (_local1 in disabledRequests) { execute(_local1); }; disabledRequests = null; }; } public function execute(_arg1:Object=null):void{ var o = _arg1; if (!isEnabled){ if (o != null){ registerDisabledExecute(o); }; return; }; if (((isExecuting) || (((twoWayCounterpart) && (twoWayCounterpart.isExecuting))))){ hasHadValue = true; return; }; try { isExecuting = true; wrapFunctionCall(this, innerExecute, o); } finally { isExecuting = false; }; } mx_internal function get isEnabled():Boolean{ return (_isEnabled); } private function innerExecute():void{ var _local1:Object = 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 175
//BindingManager (mx.binding.BindingManager) package mx.binding { public class BindingManager { mx_internal static const VERSION:String = "3.0.0.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 is IBindingClient)) || (_arg1.hasOwnProperty("_bindingsByDestination")))))) && (_arg1._bindingsByDestination))) && (_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 = _arg1.indexOf("."); var _local3:int = _arg1.indexOf("["); if (_local2 == _local3){ return (_arg1); }; var _local4:int = Math.min(_local2, _local3); if (_local4 == -1){ _local4 = Math.max(_local2, _local3); }; return (_arg1.substr(0, _local4)); } public static function setEnabled(_arg1:Object, _arg2:Boolean):void{ var _local3:Array; var _local4:uint; var _local5:Binding; if ((((_arg1 is IBindingClient)) && (_arg1._bindings))){ _local3 = (_arg1._bindings as Array); _local4 = 0; while (_local4 < _local3.length) { _local5 = _local3[_local4]; _local5.isEnabled = _arg2; _local4++; }; }; } } }//package mx.binding
Section 176
//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 = "3.0.0.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 177
//IBindingClient (mx.binding.IBindingClient) package mx.binding { public interface IBindingClient { } }//package mx.binding
Section 178
//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 = "3.0.0.0"; public function ItemPendingError(_arg1:String){ super(_arg1); } public function get responders():Array{ return (_responders); } public function addResponder(_arg1:IResponder):void{ if (!_responders){ _responders = []; }; _responders.push(_arg1); } } }//package mx.collections.errors
Section 179
//ConstraintError (mx.containers.errors.ConstraintError) package mx.containers.errors { public class ConstraintError extends Error { mx_internal static const VERSION:String = "3.0.0.0"; public function ConstraintError(_arg1:String){ super(_arg1); } } }//package mx.containers.errors
Section 180
//ApplicationLayout (mx.containers.utilityClasses.ApplicationLayout) package mx.containers.utilityClasses { import mx.core.*; public class ApplicationLayout extends BoxLayout { mx_internal static const VERSION:String = "3.0.0.0"; override public function updateDisplayList(_arg1:Number, _arg2:Number):void{ 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); var _local3:Container = 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 181
//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 = "3.0.0.0"; private function isVertical():Boolean{ return (!((direction == BoxDirection.HORIZONTAL))); } mx_internal function getHorizontalAlignValue():Number{ var _local1:String = target.getStyle("horizontalAlign"); if (_local1 == "center"){ return (0.5); }; if (_local1 == "right"){ return (1); }; return (0); } override public function updateDisplayList(_arg1:Number, _arg2:Number):void{ 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; var _local3:Container = super.target; var _local4:int = _local3.numChildren; if (_local4 == 0){ return; }; var _local5:EdgeMetrics = _local3.viewMetricsAndPadding; var _local6:Number = _local3.getStyle("paddingLeft"); var _local7:Number = _local3.getStyle("paddingTop"); var _local8:Number = getHorizontalAlignValue(); var _local9:Number = getVerticalAlignValue(); var _local10:Number = ((((_local3.scaleX > 0)) && (!((_local3.scaleX == 1))))) ? (_local3.minWidth / Math.abs(_local3.scaleX)) : _local3.minWidth; var _local11:Number = ((((_local3.scaleY > 0)) && (!((_local3.scaleY == 1))))) ? (_local3.minHeight / Math.abs(_local3.scaleY)) : _local3.minHeight; var _local12:Number = ((Math.max(_arg1, _local10) - _local5.right) - _local5.left); var _local13:Number = ((Math.max(_arg2, _local11) - _local5.bottom) - _local5.top); var _local14:ScrollBar = _local3.horizontalScrollBar; var _local15:ScrollBar = _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 = target.getStyle("verticalAlign"); if (_local1 == "middle"){ return (0.5); }; if (_local1 == "bottom"){ return (1); }; return (0); } mx_internal function heightPadding(_arg1:Number):Number{ var _local2:EdgeMetrics = target.viewMetricsAndPadding; var _local3:Number = (_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 = target.viewMetricsAndPadding; var _local3:Number = (_local2.left + _local2.right); if ((((_arg1 > 1)) && ((isVertical() == false)))){ _local3 = (_local3 + (target.getStyle("horizontalGap") * (_arg1 - 1))); }; return (_local3); } override public function measure():void{ var _local1:Container; var _local10:Number; var _local11:Number; var _local12:IUIComponent; var _local13:Number; var _local14:Number; _local1 = super.target; var _local2:Boolean = isVertical(); var _local3:Number = 0; var _local4:Number = 0; var _local5:Number = 0; var _local6:Number = 0; var _local7:int = _local1.numChildren; var _local8:int = _local7; var _local9:int; 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); } } }//package mx.containers.utilityClasses
Section 182
//CanvasLayout (mx.containers.utilityClasses.CanvasLayout) package mx.containers.utilityClasses { import mx.core.*; import mx.events.*; import flash.display.*; import flash.geom.*; import flash.utils.*; import mx.containers.errors.*; public class CanvasLayout extends Layout { private var colSpanChildren:Array; private var constraintRegionsInUse:Boolean;// = false private var rowSpanChildren:Array; private var constraintCache:Dictionary; private var _contentArea:Rectangle; mx_internal static const VERSION:String = "3.0.0.0"; private static var r:Rectangle = new Rectangle(); public function CanvasLayout(){ colSpanChildren = []; rowSpanChildren = []; constraintCache = new Dictionary(true); super(); } private function parseConstraints(_arg1:IUIComponent=null):ChildConstraintInfo{ var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:String; var _local11:String; var _local12:String; var _local13:String; var _local14:String; var _local15:String; var _local16:String; var _local17:Array; var _local18:int; var _local30:ConstraintColumn; var _local31:Boolean; var _local32:ConstraintRow; var _local2:LayoutConstraints = getLayoutConstraints(_arg1); if (!_local2){ return (null); }; while (true) { _local17 = parseConstraintExp(_local2.left); if (!_local17){ _local3 = NaN; } else { if (_local17.length == 1){ _local3 = Number(_local17[0]); } else { _local10 = _local17[0]; _local3 = _local17[1]; }; }; _local17 = parseConstraintExp(_local2.right); if (!_local17){ _local4 = NaN; } else { if (_local17.length == 1){ _local4 = Number(_local17[0]); } else { _local11 = _local17[0]; _local4 = _local17[1]; }; }; _local17 = parseConstraintExp(_local2.horizontalCenter); if (!_local17){ _local5 = NaN; } else { if (_local17.length == 1){ _local5 = Number(_local17[0]); } else { _local12 = _local17[0]; _local5 = _local17[1]; }; }; _local17 = parseConstraintExp(_local2.top); if (!_local17){ _local6 = NaN; } else { if (_local17.length == 1){ _local6 = Number(_local17[0]); } else { _local13 = _local17[0]; _local6 = _local17[1]; }; }; _local17 = parseConstraintExp(_local2.bottom); if (!_local17){ _local7 = NaN; } else { if (_local17.length == 1){ _local7 = Number(_local17[0]); } else { _local14 = _local17[0]; _local7 = _local17[1]; }; }; _local17 = parseConstraintExp(_local2.verticalCenter); if (!_local17){ _local8 = NaN; } else { if (_local17.length == 1){ _local8 = Number(_local17[0]); } else { _local15 = _local17[0]; _local8 = _local17[1]; }; }; _local17 = parseConstraintExp(_local2.baseline); if (!_local17){ _local9 = NaN; } else { if (_local17.length == 1){ _local9 = Number(_local17[0]); } else { _local16 = _local17[0]; _local9 = _local17[1]; }; }; break; }; var _local19:ContentColumnChild = new ContentColumnChild(); var _local20:Boolean; var _local21:Number = 0; var _local22:Number = 0; var _local23:Number = 0; _local18 = 0; while (_local18 < IConstraintLayout(target).constraintColumns.length) { _local30 = IConstraintLayout(target).constraintColumns[_local18]; if (_local30.mx_internal::contentSize){ if (_local30.id == _local10){ _local19.leftCol = _local30; _local19.leftOffset = _local3; _local21 = _local18; _local19.left = _local21; _local20 = true; }; if (_local30.id == _local11){ _local19.rightCol = _local30; _local19.rightOffset = _local4; _local22 = (_local18 + 1); _local19.right = _local22; _local20 = true; }; if (_local30.id == _local12){ _local19.hcCol = _local30; _local19.hcOffset = _local5; _local23 = (_local18 + 1); _local19.hc = _local23; _local20 = true; }; }; _local18++; }; if (_local20){ _local19.child = _arg1; if (((((((_local19.leftCol) && (!(_local19.rightCol)))) || (((_local19.rightCol) && (!(_local19.leftCol)))))) || (_local19.hcCol))){ _local19.span = 1; } else { _local19.span = (_local22 - _local21); }; _local31 = false; _local18 = 0; while (_local18 < colSpanChildren.length) { if (_local19.child == colSpanChildren[_local18].child){ _local31 = true; break; }; _local18++; }; if (!_local31){ colSpanChildren.push(_local19); }; }; _local20 = false; var _local24:ContentRowChild = new ContentRowChild(); var _local25:Number = 0; var _local26:Number = 0; var _local27:Number = 0; var _local28:Number = 0; _local18 = 0; while (_local18 < IConstraintLayout(target).constraintRows.length) { _local32 = IConstraintLayout(target).constraintRows[_local18]; if (_local32.mx_internal::contentSize){ if (_local32.id == _local13){ _local24.topRow = _local32; _local24.topOffset = _local6; _local25 = _local18; _local24.top = _local25; _local20 = true; }; if (_local32.id == _local14){ _local24.bottomRow = _local32; _local24.bottomOffset = _local7; _local26 = (_local18 + 1); _local24.bottom = _local26; _local20 = true; }; if (_local32.id == _local15){ _local24.vcRow = _local32; _local24.vcOffset = _local8; _local27 = (_local18 + 1); _local24.vc = _local27; _local20 = true; }; if (_local32.id == _local16){ _local24.baselineRow = _local32; _local24.baselineOffset = _local9; _local28 = (_local18 + 1); _local24.baseline = _local28; _local20 = true; }; }; _local18++; }; if (_local20){ _local24.child = _arg1; if (((((((((_local24.topRow) && (!(_local24.bottomRow)))) || (((_local24.bottomRow) && (!(_local24.topRow)))))) || (_local24.vcRow))) || (_local24.baselineRow))){ _local24.span = 1; } else { _local24.span = (_local26 - _local25); }; _local31 = false; _local18 = 0; while (_local18 < rowSpanChildren.length) { if (_local24.child == rowSpanChildren[_local18].child){ _local31 = true; break; }; _local18++; }; if (!_local31){ rowSpanChildren.push(_local24); }; }; var _local29:ChildConstraintInfo = new ChildConstraintInfo(_local3, _local4, _local5, _local6, _local7, _local8, _local9, _local10, _local11, _local12, _local13, _local14, _local15, _local16); constraintCache[_arg1] = _local29; return (_local29); } 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 shareRowSpace(_arg1:ContentRowChild, _arg2:Number):Number{ var _local11:Number; var _local12:Number; var _local13:Number; var _local3:ConstraintRow = _arg1.topRow; var _local4:ConstraintRow = _arg1.bottomRow; var _local5:IUIComponent = _arg1.child; var _local6:Number = 0; var _local7:Number = 0; var _local8:Number = (_arg1.topOffset) ? _arg1.topOffset : 0; var _local9:Number = (_arg1.bottomOffset) ? _arg1.bottomOffset : 0; if (((_local3) && (_local3.height))){ _local6 = (_local6 + _local3.height); } else { if (((_local4) && (!(_local3)))){ _local3 = IConstraintLayout(target).constraintRows[(_arg1.bottom - 2)]; if (((_local3) && (_local3.height))){ _local6 = (_local6 + _local3.height); }; }; }; if (((_local4) && (_local4.height))){ _local7 = (_local7 + _local4.height); } else { if (((_local3) && (!(_local4)))){ _local4 = IConstraintLayout(target).constraintRows[(_arg1.top + 1)]; if (((_local4) && (_local4.height))){ _local7 = (_local7 + _local4.height); }; }; }; if (((_local3) && (isNaN(_local3.height)))){ _local3.setActualHeight(Math.max(0, _local3.maxHeight)); }; if (((_local4) && (isNaN(_local4.height)))){ _local4.setActualHeight(Math.max(0, _local4.height)); }; var _local10:Number = _local5.getExplicitOrMeasuredHeight(); if (_local10){ if (!_arg1.topRow){ if (_local10 > _local6){ _local12 = ((_local10 - _local6) + _local9); } else { _local12 = (_local10 + _local9); }; }; if (!_arg1.bottomRow){ if (_local10 > _local7){ _local11 = ((_local10 - _local7) + _local8); } else { _local11 = (_local10 + _local8); }; }; if (((_arg1.topRow) && (_arg1.bottomRow))){ _local13 = (_local10 / Number(_arg1.span)); if ((_local13 + _local8) < _local6){ _local11 = _local6; _local12 = ((_local10 - (_local6 - _local8)) + _local9); } else { _local11 = (_local13 + _local8); }; if ((_local13 + _local9) < _local7){ _local12 = _local7; _local11 = ((_local10 - (_local7 - _local9)) + _local8); } else { _local12 = (_local13 + _local9); }; }; _local12 = bound(_local12, _local4.minHeight, _local4.maxHeight); _local4.setActualHeight(_local12); _arg2 = (_arg2 - _local12); _local11 = bound(_local11, _local3.minHeight, _local3.maxHeight); _local3.setActualHeight(_local11); _arg2 = (_arg2 - _local11); }; return (_arg2); } private function parseConstraintExp(_arg1:String):Array{ if (!_arg1){ return (null); }; var _local2:String = _arg1.replace(/:/g, " "); var _local3:Array = _local2.split(/\s+/); return (_local3); } private function measureColumnsAndRows():void{ var _local3:int; var _local4:int; var _local13:ConstraintColumn; var _local14:ConstraintRow; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:ContentColumnChild; var _local20:ContentRowChild; var _local1:Array = IConstraintLayout(target).constraintColumns; var _local2:Array = IConstraintLayout(target).constraintRows; if ((((!(_local2.length) > 0)) && ((!(_local1.length) > 0)))){ constraintRegionsInUse = false; return; }; constraintRegionsInUse = true; var _local5:Number = 0; var _local6:Number = 0; var _local7:EdgeMetrics = Container(target).viewMetrics; var _local8:Number = ((Container(target).width - _local7.left) - _local7.right); var _local9:Number = ((Container(target).height - _local7.top) - _local7.bottom); var _local10:Array = []; var _local11:Array = []; var _local12:Array = []; if (_local1.length > 0){ _local3 = 0; while (_local3 < _local1.length) { _local13 = _local1[_local3]; if (!isNaN(_local13.percentWidth)){ _local11.push(_local13); } else { if (((!(isNaN(_local13.width))) && (!(_local13.mx_internal::contentSize)))){ _local10.push(_local13); } else { _local12.push(_local13); _local13.mx_internal::contentSize = true; }; }; _local3++; }; _local3 = 0; while (_local3 < _local10.length) { _local13 = ConstraintColumn(_local10[_local3]); _local8 = (_local8 - _local13.width); _local3++; }; if (_local12.length > 0){ if (colSpanChildren.length > 0){ colSpanChildren.sortOn("span"); _local4 = 0; while (_local4 < colSpanChildren.length) { _local19 = colSpanChildren[_local4]; if (_local19.span == 1){ if (_local19.hcCol){ _local13 = ConstraintColumn(_local1[_local1.indexOf(_local19.hcCol)]); } else { if (_local19.leftCol){ _local13 = ConstraintColumn(_local1[_local1.indexOf(_local19.leftCol)]); } else { if (_local19.rightCol){ _local13 = ConstraintColumn(_local1[_local1.indexOf(_local19.rightCol)]); }; }; }; _local16 = _local19.child.getExplicitOrMeasuredWidth(); if (_local19.hcOffset){ _local16 = (_local16 + _local19.hcOffset); } else { if (_local19.leftOffset){ _local16 = (_local16 + _local19.leftOffset); }; if (_local19.rightOffset){ _local16 = (_local16 + _local19.rightOffset); }; }; if (!isNaN(_local13.width)){ _local16 = Math.max(_local13.width, _local16); }; _local16 = bound(_local16, _local13.minWidth, _local13.maxWidth); _local13.setActualWidth(_local16); _local8 = (_local8 - _local13.width); } else { _local8 = shareColumnSpace(_local19, _local8); }; _local4++; }; colSpanChildren = []; }; _local3 = 0; while (_local3 < _local12.length) { _local13 = _local12[_local3]; if (!_local13.width){ _local16 = bound(0, _local13.minWidth, 0); _local13.setActualWidth(_local16); }; _local3++; }; }; _local18 = _local8; _local3 = 0; while (_local3 < _local11.length) { _local13 = ConstraintColumn(_local11[_local3]); if (_local18 <= 0){ _local16 = 0; } else { _local16 = Math.round(((_local18 * _local13.percentWidth) / 100)); }; _local16 = bound(_local16, _local13.minWidth, _local13.maxWidth); _local13.setActualWidth(_local16); _local8 = (_local8 - _local16); _local3++; }; _local3 = 0; while (_local3 < _local1.length) { _local13 = ConstraintColumn(_local1[_local3]); _local13.x = _local5; _local5 = (_local5 + _local13.width); _local3++; }; }; _local10 = []; _local11 = []; _local12 = []; if (_local2.length > 0){ _local3 = 0; while (_local3 < _local2.length) { _local14 = _local2[_local3]; if (!isNaN(_local14.percentHeight)){ _local11.push(_local14); } else { if (((!(isNaN(_local14.height))) && (!(_local14.mx_internal::contentSize)))){ _local10.push(_local14); } else { _local12.push(_local14); _local14.mx_internal::contentSize = true; }; }; _local3++; }; _local3 = 0; while (_local3 < _local10.length) { _local14 = ConstraintRow(_local10[_local3]); _local9 = (_local9 - _local14.height); _local3++; }; if (_local12.length > 0){ if (rowSpanChildren.length > 0){ rowSpanChildren.sortOn("span"); _local4 = 0; while (_local4 < rowSpanChildren.length) { _local20 = rowSpanChildren[_local4]; if (_local20.span == 1){ if (_local20.vcRow){ _local14 = ConstraintRow(_local2[_local2.indexOf(_local20.vcRow)]); } else { if (_local20.baselineRow){ _local14 = ConstraintRow(_local2[_local2.indexOf(_local20.baselineRow)]); } else { if (_local20.topRow){ _local14 = ConstraintRow(_local2[_local2.indexOf(_local20.topRow)]); } else { if (_local20.bottomRow){ _local14 = ConstraintRow(_local2[_local2.indexOf(_local20.bottomRow)]); }; }; }; }; _local17 = _local20.child.getExplicitOrMeasuredHeight(); if (_local20.baselineOffset){ _local17 = (_local17 + _local20.baselineOffset); } else { if (_local20.vcOffset){ _local17 = (_local17 + _local20.vcOffset); } else { if (_local20.topOffset){ _local17 = (_local17 + _local20.topOffset); }; if (_local20.bottomOffset){ _local17 = (_local17 + _local20.bottomOffset); }; }; }; if (!isNaN(_local14.height)){ _local17 = Math.max(_local14.height, _local17); }; _local17 = bound(_local17, _local14.minHeight, _local14.maxHeight); _local14.setActualHeight(_local17); _local9 = (_local9 - _local14.height); } else { _local9 = shareRowSpace(_local20, _local9); }; _local4++; }; rowSpanChildren = []; }; _local3 = 0; while (_local3 < _local12.length) { _local14 = ConstraintRow(_local12[_local3]); if (!_local14.height){ _local17 = bound(0, _local14.minHeight, 0); _local14.setActualHeight(_local17); }; _local3++; }; }; _local18 = _local9; _local3 = 0; while (_local3 < _local11.length) { _local14 = ConstraintRow(_local11[_local3]); if (_local18 <= 0){ _local17 = 0; } else { _local17 = Math.round(((_local18 * _local14.percentHeight) / 100)); }; _local17 = bound(_local17, _local14.minHeight, _local14.maxHeight); _local14.setActualHeight(_local17); _local9 = (_local9 - _local17); _local3++; }; _local3 = 0; while (_local3 < _local2.length) { _local14 = _local2[_local3]; _local14.y = _local6; _local6 = (_local6 + _local14.height); _local3++; }; }; } private function child_moveHandler(_arg1:MoveEvent):void{ if ((_arg1.target is IUIComponent)){ if (!IUIComponent(_arg1.target).includeInLayout){ return; }; }; var _local2:Container = super.target; if (_local2){ _local2.invalidateSize(); _local2.invalidateDisplayList(); _contentArea = null; }; } private function applyAnchorStylesDuringMeasure(_arg1:IUIComponent, _arg2:Rectangle):void{ var _local13:int; var _local3:IConstraintClient = (_arg1 as IConstraintClient); if (!_local3){ return; }; var _local4:ChildConstraintInfo = constraintCache[_local3]; if (!_local4){ _local4 = parseConstraints(_arg1); }; var _local5:Number = _local4.left; var _local6:Number = _local4.right; var _local7:Number = _local4.hc; var _local8:Number = _local4.top; var _local9:Number = _local4.bottom; var _local10:Number = _local4.vc; var _local11:Array = IConstraintLayout(target).constraintColumns; var _local12:Array = IConstraintLayout(target).constraintRows; var _local14:Number = 0; if (!(_local11.length) > 0){ if (!isNaN(_local7)){ _arg2.x = Math.round((((target.width - _arg1.width) / 2) + _local7)); } else { if (((!(isNaN(_local5))) && (!(isNaN(_local6))))){ _arg2.x = _local5; _arg2.width = (_arg2.width + _local6); } else { if (!isNaN(_local5)){ _arg2.x = _local5; } else { if (!isNaN(_local6)){ _arg2.x = 0; _arg2.width = (_arg2.width + _local6); }; }; }; }; } else { _arg2.x = 0; _local13 = 0; while (_local13 < _local11.length) { _local14 = (_local14 + ConstraintColumn(_local11[_local13]).width); _local13++; }; _arg2.width = _local14; }; if (!(_local12.length) > 0){ if (!isNaN(_local10)){ _arg2.y = Math.round((((target.height - _arg1.height) / 2) + _local10)); } else { if (((!(isNaN(_local8))) && (!(isNaN(_local9))))){ _arg2.y = _local8; _arg2.height = (_arg2.height + _local9); } else { if (!isNaN(_local8)){ _arg2.y = _local8; } else { if (!isNaN(_local9)){ _arg2.y = 0; _arg2.height = (_arg2.height + _local9); }; }; }; }; } else { _local14 = 0; _arg2.y = 0; _local13 = 0; while (_local13 < _local12.length) { _local14 = (_local14 + ConstraintRow(_local12[_local13]).height); _local13++; }; _arg2.height = _local14; }; } override public function measure():void{ var _local1:Container; var _local5:EdgeMetrics; var _local6:Rectangle; var _local7:IUIComponent; var _local8:ConstraintColumn; var _local9:ConstraintRow; _local1 = super.target; var _local2:Number = 0; var _local3:Number = 0; var _local4:Number = 0; _local5 = _local1.viewMetrics; _local4 = 0; while (_local4 < _local1.numChildren) { _local7 = (_local1.getChildAt(_local4) as IUIComponent); parseConstraints(_local7); _local4++; }; _local4 = 0; while (_local4 < IConstraintLayout(_local1).constraintColumns.length) { _local8 = IConstraintLayout(_local1).constraintColumns[_local4]; if (_local8.mx_internal::contentSize){ _local8.mx_internal::_width = NaN; }; _local4++; }; _local4 = 0; while (_local4 < IConstraintLayout(_local1).constraintRows.length) { _local9 = IConstraintLayout(_local1).constraintRows[_local4]; if (_local9.mx_internal::contentSize){ _local9.mx_internal::_height = NaN; }; _local4++; }; measureColumnsAndRows(); _contentArea = null; _local6 = measureContentArea(); _local1.measuredWidth = ((_local6.width + _local5.left) + _local5.right); _local1.measuredHeight = ((_local6.height + _local5.top) + _local5.bottom); } private function target_childRemoveHandler(_arg1:ChildExistenceChangedEvent):void{ DisplayObject(_arg1.relatedObject).removeEventListener(MoveEvent.MOVE, child_moveHandler); delete constraintCache[_arg1.relatedObject]; } override public function set target(_arg1:Container):void{ var _local3:int; var _local4:int; var _local2:Container = 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; }; } private function measureContentArea():Rectangle{ var _local1:int; var _local3:Array; var _local4:Array; var _local5:IUIComponent; var _local6:LayoutConstraints; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; if (_contentArea){ return (_contentArea); }; _contentArea = new Rectangle(); var _local2:int = target.numChildren; if ((((_local2 == 0)) && (constraintRegionsInUse))){ _local3 = IConstraintLayout(target).constraintColumns; _local4 = IConstraintLayout(target).constraintRows; if (_local3.length > 0){ _contentArea.right = (_local3[(_local3.length - 1)].x + _local3[(_local3.length - 1)].width); } else { _contentArea.right = 0; }; if (_local4.length > 0){ _contentArea.bottom = (_local4[(_local4.length - 1)].y + _local4[(_local4.length - 1)].height); } else { _contentArea.bottom = 0; }; }; _local1 = 0; while (_local1 < _local2) { _local5 = (target.getChildAt(_local1) as IUIComponent); _local6 = getLayoutConstraints(_local5); if (!_local5.includeInLayout){ } else { _local7 = _local5.x; _local8 = _local5.y; _local9 = _local5.getExplicitOrMeasuredWidth(); _local10 = _local5.getExplicitOrMeasuredHeight(); if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){ if (((!(isNaN(_local5.percentWidth))) || (((((_local6) && (!(isNaN(_local6.left))))) && (!(isNaN(_local6.right))))))){ _local9 = _local5.minWidth; }; } else { if (((!(isNaN(_local5.percentWidth))) || (((((((_local6) && (!(isNaN(_local6.left))))) && (!(isNaN(_local6.right))))) && (isNaN(_local5.explicitWidth)))))){ _local9 = _local5.minWidth; }; }; if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){ if (((!(isNaN(_local5.percentHeight))) || (((((_local6) && (!(isNaN(_local6.top))))) && (!(isNaN(_local6.bottom))))))){ _local10 = _local5.minHeight; }; } else { if (((!(isNaN(_local5.percentHeight))) || (((((((_local6) && (!(isNaN(_local6.top))))) && (!(isNaN(_local6.bottom))))) && (isNaN(_local5.explicitHeight)))))){ _local10 = _local5.minHeight; }; }; r.x = _local7; r.y = _local8; r.width = _local9; r.height = _local10; applyAnchorStylesDuringMeasure(_local5, r); _local7 = r.x; _local8 = r.y; _local9 = r.width; _local10 = r.height; if (isNaN(_local7)){ _local7 = _local5.x; }; if (isNaN(_local8)){ _local8 = _local5.y; }; _local11 = _local7; _local12 = _local8; if (isNaN(_local9)){ _local9 = _local5.width; }; if (isNaN(_local10)){ _local10 = _local5.height; }; _local11 = (_local11 + _local9); _local12 = (_local12 + _local10); _contentArea.right = Math.max(_contentArea.right, _local11); _contentArea.bottom = Math.max(_contentArea.bottom, _local12); }; _local1++; }; return (_contentArea); } private function shareColumnSpace(_arg1:ContentColumnChild, _arg2:Number):Number{ var _local11:Number; var _local12:Number; var _local13:Number; var _local3:ConstraintColumn = _arg1.leftCol; var _local4:ConstraintColumn = _arg1.rightCol; var _local5:IUIComponent = _arg1.child; var _local6:Number = 0; var _local7:Number = 0; var _local8:Number = (_arg1.rightOffset) ? _arg1.rightOffset : 0; var _local9:Number = (_arg1.leftOffset) ? _arg1.leftOffset : 0; if (((_local3) && (_local3.width))){ _local6 = (_local6 + _local3.width); } else { if (((_local4) && (!(_local3)))){ _local3 = IConstraintLayout(target).constraintColumns[(_arg1.right - 2)]; if (((_local3) && (_local3.width))){ _local6 = (_local6 + _local3.width); }; }; }; if (((_local4) && (_local4.width))){ _local7 = (_local7 + _local4.width); } else { if (((_local3) && (!(_local4)))){ _local4 = IConstraintLayout(target).constraintColumns[(_arg1.left + 1)]; if (((_local4) && (_local4.width))){ _local7 = (_local7 + _local4.width); }; }; }; if (((_local3) && (isNaN(_local3.width)))){ _local3.setActualWidth(Math.max(0, _local3.maxWidth)); }; if (((_local4) && (isNaN(_local4.width)))){ _local4.setActualWidth(Math.max(0, _local4.maxWidth)); }; var _local10:Number = _local5.getExplicitOrMeasuredWidth(); if (_local10){ if (!_arg1.leftCol){ if (_local10 > _local6){ _local12 = ((_local10 - _local6) + _local8); } else { _local12 = (_local10 + _local8); }; }; if (!_arg1.rightCol){ if (_local10 > _local7){ _local11 = ((_local10 - _local7) + _local9); } else { _local11 = (_local10 + _local9); }; }; if (((_arg1.leftCol) && (_arg1.rightCol))){ _local13 = (_local10 / Number(_arg1.span)); if ((_local13 + _local9) < _local6){ _local11 = _local6; _local12 = ((_local10 - (_local6 - _local9)) + _local8); } else { _local11 = (_local13 + _local9); }; if ((_local13 + _local8) < _local7){ _local12 = _local7; _local11 = ((_local10 - (_local7 - _local8)) + _local9); } else { _local12 = (_local13 + _local8); }; }; _local11 = bound(_local11, _local3.minWidth, _local3.maxWidth); _local3.setActualWidth(_local11); _arg2 = (_arg2 - _local11); _local12 = bound(_local12, _local4.minWidth, _local4.maxWidth); _local4.setActualWidth(_local12); _arg2 = (_arg2 - _local12); }; return (_arg2); } private function getLayoutConstraints(_arg1:IUIComponent):LayoutConstraints{ var _local2:IConstraintClient = (_arg1 as IConstraintClient); if (!_local2){ return (null); }; var _local3:LayoutConstraints = new LayoutConstraints(); _local3.baseline = _local2.getConstraintValue("baseline"); _local3.bottom = _local2.getConstraintValue("bottom"); _local3.horizontalCenter = _local2.getConstraintValue("horizontalCenter"); _local3.left = _local2.getConstraintValue("left"); _local3.right = _local2.getConstraintValue("right"); _local3.top = _local2.getConstraintValue("top"); _local3.verticalCenter = _local2.getConstraintValue("verticalCenter"); return (_local3); } override public function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local3:int; var _local4:IUIComponent; var _local10:ConstraintColumn; var _local11:ConstraintRow; var _local5:Container = super.target; var _local6:int = _local5.numChildren; _local5.mx_internal::doingLayout = false; var _local7:EdgeMetrics = _local5.viewMetrics; _local5.mx_internal::doingLayout = true; var _local8:Number = ((_arg1 - _local7.left) - _local7.right); var _local9:Number = ((_arg2 - _local7.top) - _local7.bottom); if ((((IConstraintLayout(_local5).constraintColumns.length > 0)) || ((IConstraintLayout(_local5).constraintRows.length > 0)))){ constraintRegionsInUse = true; }; if (constraintRegionsInUse){ _local3 = 0; while (_local3 < _local6) { _local4 = (_local5.getChildAt(_local3) as IUIComponent); parseConstraints(_local4); _local3++; }; _local3 = 0; while (_local3 < IConstraintLayout(_local5).constraintColumns.length) { _local10 = IConstraintLayout(_local5).constraintColumns[_local3]; if (_local10.mx_internal::contentSize){ _local10.mx_internal::_width = NaN; }; _local3++; }; _local3 = 0; while (_local3 < IConstraintLayout(_local5).constraintRows.length) { _local11 = IConstraintLayout(_local5).constraintRows[_local3]; if (_local11.mx_internal::contentSize){ _local11.mx_internal::_height = NaN; }; _local3++; }; measureColumnsAndRows(); }; _local3 = 0; while (_local3 < _local6) { _local4 = (_local5.getChildAt(_local3) as IUIComponent); applyAnchorStylesDuringUpdateDisplayList(_local8, _local9, _local4); _local3++; }; } private function applyAnchorStylesDuringUpdateDisplayList(_arg1:Number, _arg2:Number, _arg3:IUIComponent=null):void{ var _local20:int; var _local21:Number; var _local22:Number; var _local23:Number; var _local24:Number; var _local25:String; var _local34:Number; var _local35:Number; var _local36:Number; var _local37:Number; var _local38:Number; var _local39:Boolean; var _local40:Boolean; var _local41:Boolean; var _local42:ConstraintColumn; var _local43:Boolean; var _local44:Boolean; var _local45:Boolean; var _local46:Boolean; var _local47:ConstraintRow; var _local4:IConstraintClient = (_arg3 as IConstraintClient); if (!_local4){ return; }; var _local5:ChildConstraintInfo = parseConstraints(_arg3); var _local6:Number = _local5.left; var _local7:Number = _local5.right; var _local8:Number = _local5.hc; var _local9:Number = _local5.top; var _local10:Number = _local5.bottom; var _local11:Number = _local5.vc; var _local12:Number = _local5.baseline; var _local13:String = _local5.leftBoundary; var _local14:String = _local5.rightBoundary; var _local15:String = _local5.hcBoundary; var _local16:String = _local5.topBoundary; var _local17:String = _local5.bottomBoundary; var _local18:String = _local5.vcBoundary; var _local19:String = _local5.baselineBoundary; var _local26:Boolean; var _local27:Boolean; var _local28:Boolean = ((((!(_local15)) && (!(_local13)))) && (!(_local14))); var _local29:Boolean = ((((((!(_local18)) && (!(_local16)))) && (!(_local17)))) && (!(_local19))); var _local30:Number = 0; var _local31:Number = _arg1; var _local32:Number = 0; var _local33:Number = _arg2; if (!_local28){ _local39 = (_local13) ? true : false; _local40 = (_local14) ? true : false; _local41 = (_local15) ? true : false; _local20 = 0; while (_local20 < IConstraintLayout(target).constraintColumns.length) { _local42 = ConstraintColumn(IConstraintLayout(target).constraintColumns[_local20]); if (_local39){ if (_local13 == _local42.id){ _local30 = _local42.x; _local39 = false; }; }; if (_local40){ if (_local14 == _local42.id){ _local31 = (_local42.x + _local42.width); _local40 = false; }; }; if (_local41){ if (_local15 == _local42.id){ _local35 = _local42.width; _local37 = _local42.x; _local41 = false; }; }; _local20++; }; if (_local39){ _local25 = resourceManager.getString("containers", "columnNotFound", [_local13]); throw (new ConstraintError(_local25)); }; if (_local40){ _local25 = resourceManager.getString("containers", "columnNotFound", [_local14]); throw (new ConstraintError(_local25)); }; if (_local41){ _local25 = resourceManager.getString("containers", "columnNotFound", [_local15]); throw (new ConstraintError(_local25)); }; } else { if (!_local28){ _local25 = resourceManager.getString("containers", "noColumnsFound"); throw (new ConstraintError(_local25)); }; }; _arg1 = Math.round((_local31 - _local30)); if (((!(isNaN(_local6))) && (!(isNaN(_local7))))){ _local21 = ((_arg1 - _local6) - _local7); if (_local21 < _arg3.minWidth){ _local21 = _arg3.minWidth; }; } else { if (!isNaN(_arg3.percentWidth)){ _local21 = ((_arg3.percentWidth / 100) * _arg1); _local21 = bound(_local21, _arg3.minWidth, _arg3.maxWidth); _local26 = true; } else { _local21 = _arg3.getExplicitOrMeasuredWidth(); }; }; if (((!(_local29)) && ((IConstraintLayout(target).constraintRows.length > 0)))){ _local43 = (_local16) ? true : false; _local44 = (_local17) ? true : false; _local45 = (_local18) ? true : false; _local46 = (_local19) ? true : false; _local20 = 0; while (_local20 < IConstraintLayout(target).constraintRows.length) { _local47 = ConstraintRow(IConstraintLayout(target).constraintRows[_local20]); if (_local43){ if (_local16 == _local47.id){ _local32 = _local47.y; _local43 = false; }; }; if (_local44){ if (_local17 == _local47.id){ _local33 = (_local47.y + _local47.height); _local44 = false; }; }; if (_local45){ if (_local18 == _local47.id){ _local34 = _local47.height; _local36 = _local47.y; _local45 = false; }; }; if (_local46){ if (_local19 == _local47.id){ _local38 = _local47.y; _local46 = false; }; }; _local20++; }; if (_local43){ _local25 = resourceManager.getString("containers", "rowNotFound", [_local16]); throw (new ConstraintError(_local25)); }; if (_local44){ _local25 = resourceManager.getString("containers", "rowNotFound", [_local17]); throw (new ConstraintError(_local25)); }; if (_local45){ _local25 = resourceManager.getString("containers", "rowNotFound", [_local18]); throw (new ConstraintError(_local25)); }; if (_local46){ _local25 = resourceManager.getString("containers", "rowNotFound", [_local19]); throw (new ConstraintError(_local25)); }; } else { if (((!(_local29)) && (!((IConstraintLayout(target).constraintRows.length > 0))))){ _local25 = resourceManager.getString("containers", "noRowsFound"); throw (new ConstraintError(_local25)); }; }; _arg2 = Math.round((_local33 - _local32)); if (((!(isNaN(_local9))) && (!(isNaN(_local10))))){ _local22 = ((_arg2 - _local9) - _local10); if (_local22 < _arg3.minHeight){ _local22 = _arg3.minHeight; }; } else { if (!isNaN(_arg3.percentHeight)){ _local22 = ((_arg3.percentHeight / 100) * _arg2); _local22 = bound(_local22, _arg3.minHeight, _arg3.maxHeight); _local27 = true; } else { _local22 = _arg3.getExplicitOrMeasuredHeight(); }; }; if (!isNaN(_local8)){ if (_local15){ _local23 = Math.round(((((_local35 - _local21) / 2) + _local8) + _local37)); } else { _local23 = Math.round((((_arg1 - _local21) / 2) + _local8)); }; } else { if (!isNaN(_local6)){ if (_local13){ _local23 = (_local30 + _local6); } else { _local23 = _local6; }; } else { if (!isNaN(_local7)){ if (_local14){ _local23 = ((_local31 - _local7) - _local21); } else { _local23 = ((_arg1 - _local7) - _local21); }; }; }; }; if (!isNaN(_local12)){ if (_local19){ _local24 = ((_local38 - _arg3.baselinePosition) + _local12); } else { _local24 = _local12; }; }; if (!isNaN(_local11)){ if (_local18){ _local24 = Math.round(((((_local34 - _local22) / 2) + _local11) + _local36)); } else { _local24 = Math.round((((_arg2 - _local22) / 2) + _local11)); }; } else { if (!isNaN(_local9)){ if (_local16){ _local24 = (_local32 + _local9); } else { _local24 = _local9; }; } else { if (!isNaN(_local10)){ if (_local17){ _local24 = ((_local33 - _local10) - _local22); } else { _local24 = ((_arg2 - _local10) - _local22); }; }; }; }; _local23 = (isNaN(_local23)) ? _arg3.x : _local23; _local24 = (isNaN(_local24)) ? _arg3.y : _local24; _arg3.move(_local23, _local24); if (_local26){ if ((_local23 + _local21) > _arg1){ _local21 = Math.max((_arg1 - _local23), _arg3.minWidth); }; }; if (_local27){ if ((_local24 + _local22) > _arg2){ _local22 = Math.max((_arg2 - _local24), _arg3.minHeight); }; }; if (((!(isNaN(_local21))) && (!(isNaN(_local22))))){ _arg3.setActualSize(_local21, _local22); }; } private function target_childAddHandler(_arg1:ChildExistenceChangedEvent):void{ DisplayObject(_arg1.relatedObject).addEventListener(MoveEvent.MOVE, child_moveHandler); } } }//package mx.containers.utilityClasses import mx.core.*; class LayoutConstraints { public var baseline; public var left; public var bottom; public var top; public var horizontalCenter; public var verticalCenter; public var right; private function LayoutConstraints():void{ } } class ChildConstraintInfo { public var baseline:Number; public var left:Number; public var baselineBoundary:String; public var leftBoundary:String; public var hcBoundary:String; public var top:Number; public var right:Number; public var topBoundary:String; public var rightBoundary:String; public var bottom:Number; public var vc:Number; public var bottomBoundary:String; public var vcBoundary:String; public var hc:Number; private function ChildConstraintInfo(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:String=null, _arg9:String=null, _arg10:String=null, _arg11:String=null, _arg12:String=null, _arg13:String=null, _arg14:String=null):void{ this.left = _arg1; this.right = _arg2; this.hc = _arg3; this.top = _arg4; this.bottom = _arg5; this.vc = _arg6; this.baseline = _arg7; this.leftBoundary = _arg8; this.rightBoundary = _arg9; this.hcBoundary = _arg10; this.topBoundary = _arg11; this.bottomBoundary = _arg12; this.vcBoundary = _arg13; this.baselineBoundary = _arg14; } } class ContentColumnChild { public var rightCol:ConstraintColumn; public var hcCol:ConstraintColumn; public var left:Number; public var child:IUIComponent; public var rightOffset:Number; public var span:Number; public var hcOffset:Number; public var leftCol:ConstraintColumn; public var leftOffset:Number; public var hc:Number; public var right:Number; private function ContentColumnChild():void{ } } class ContentRowChild { public var topRow:ConstraintRow; public var topOffset:Number; public var baseline:Number; public var baselineRow:ConstraintRow; public var span:Number; public var top:Number; public var vcOffset:Number; public var child:IUIComponent; public var bottomOffset:Number; public var bottom:Number; public var vc:Number; public var bottomRow:ConstraintRow; public var vcRow:ConstraintRow; public var baselineOffset:Number; private function ContentRowChild():void{ } }
Section 183
//ConstraintColumn (mx.containers.utilityClasses.ConstraintColumn) package mx.containers.utilityClasses { import mx.core.*; import flash.events.*; public class ConstraintColumn extends EventDispatcher implements IMXMLObject { private var _container:IInvalidating; private var _explicitMinWidth:Number; mx_internal var _width:Number; mx_internal var contentSize:Boolean;// = false private var _percentWidth:Number; private var _explicitWidth:Number; private var _explicitMaxWidth:Number; private var _x:Number; private var _id:String; mx_internal static const VERSION:String = "3.0.0.0"; public function get container():IInvalidating{ return (_container); } public function get width():Number{ return (_width); } public function get percentWidth():Number{ return (_percentWidth); } public function set container(_arg1:IInvalidating):void{ _container = _arg1; } public function set maxWidth(_arg1:Number):void{ if (_explicitMaxWidth != _arg1){ _explicitMaxWidth = _arg1; if (container){ container.invalidateSize(); container.invalidateDisplayList(); }; dispatchEvent(new Event("maxWidthChanged")); }; } public function set width(_arg1:Number):void{ if (explicitWidth != _arg1){ explicitWidth = _arg1; if (_width != _arg1){ _width = _arg1; if (container){ container.invalidateSize(); container.invalidateDisplayList(); }; dispatchEvent(new Event("widthChanged")); }; }; } public function get maxWidth():Number{ return (_explicitMaxWidth); } public function get minWidth():Number{ return (_explicitMinWidth); } public function get id():String{ return (_id); } public function initialized(_arg1:Object, _arg2:String):void{ this.id = _arg2; if (((!(this.width)) && (!(this.percentWidth)))){ contentSize = true; }; } public function set explicitWidth(_arg1:Number):void{ if (_explicitWidth == _arg1){ return; }; if (!isNaN(_arg1)){ _percentWidth = NaN; }; _explicitWidth = _arg1; if (container){ container.invalidateSize(); container.invalidateDisplayList(); }; dispatchEvent(new Event("explicitWidthChanged")); } public function setActualWidth(_arg1:Number):void{ if (_width != _arg1){ _width = _arg1; dispatchEvent(new Event("widthChanged")); }; } public function set minWidth(_arg1:Number):void{ if (_explicitMinWidth != _arg1){ _explicitMinWidth = _arg1; if (container){ container.invalidateSize(); container.invalidateDisplayList(); }; dispatchEvent(new Event("minWidthChanged")); }; } public function set percentWidth(_arg1:Number):void{ if (_percentWidth == _arg1){ return; }; if (!isNaN(_arg1)){ _explicitWidth = NaN; }; _percentWidth = _arg1; if (container){ container.invalidateSize(); container.invalidateDisplayList(); }; dispatchEvent(new Event("percentWidthChanged")); } public function set x(_arg1:Number):void{ if (_arg1 != _x){ _x = _arg1; dispatchEvent(new Event("xChanged")); }; } public function get explicitWidth():Number{ return (_explicitWidth); } public function set id(_arg1:String):void{ _id = _arg1; } public function get x():Number{ return (_x); } } }//package mx.containers.utilityClasses
Section 184
//ConstraintRow (mx.containers.utilityClasses.ConstraintRow) package mx.containers.utilityClasses { import mx.core.*; import flash.events.*; public class ConstraintRow extends EventDispatcher implements IMXMLObject { private var _container:IInvalidating; mx_internal var _height:Number; private var _explicitMinHeight:Number; private var _y:Number; private var _percentHeight:Number; private var _explicitMaxHeight:Number; mx_internal var contentSize:Boolean;// = false private var _explicitHeight:Number; private var _id:String; mx_internal static const VERSION:String = "3.0.0.0"; public function get container():IInvalidating{ return (_container); } public function set container(_arg1:IInvalidating):void{ _container = _arg1; } public function set y(_arg1:Number):void{ if (_arg1 != _y){ _y = _arg1; dispatchEvent(new Event("yChanged")); }; } public function set height(_arg1:Number):void{ if (explicitHeight != _arg1){ explicitHeight = _arg1; if (_height != _arg1){ _height = _arg1; if (container){ container.invalidateSize(); container.invalidateDisplayList(); }; dispatchEvent(new Event("heightChanged")); }; }; } public function set maxHeight(_arg1:Number):void{ if (_explicitMaxHeight != _arg1){ _explicitMaxHeight = _arg1; if (container){ container.invalidateSize(); container.invalidateDisplayList(); }; dispatchEvent(new Event("maxHeightChanged")); }; } public function setActualHeight(_arg1:Number):void{ if (_height != _arg1){ _height = _arg1; dispatchEvent(new Event("heightChanged")); }; } public function get minHeight():Number{ return (_explicitMinHeight); } public function get id():String{ return (_id); } public function set percentHeight(_arg1:Number):void{ if (_percentHeight == _arg1){ return; }; if (!isNaN(_arg1)){ _explicitHeight = NaN; }; _percentHeight = _arg1; if (container){ container.invalidateSize(); container.invalidateDisplayList(); }; } public function initialized(_arg1:Object, _arg2:String):void{ this.id = _arg2; if (((!(this.height)) && (!(this.percentHeight)))){ contentSize = true; }; } public function get percentHeight():Number{ return (_percentHeight); } public function get height():Number{ return (_height); } public function get maxHeight():Number{ return (_explicitMaxHeight); } public function set minHeight(_arg1:Number):void{ if (_explicitMinHeight != _arg1){ _explicitMinHeight = _arg1; if (container){ container.invalidateSize(); container.invalidateDisplayList(); }; dispatchEvent(new Event("minHeightChanged")); }; } public function set id(_arg1:String):void{ _id = _arg1; } public function get y():Number{ return (_y); } public function get explicitHeight():Number{ return (_explicitHeight); } public function set explicitHeight(_arg1:Number):void{ if (_explicitHeight == _arg1){ return; }; if (!isNaN(_arg1)){ _percentHeight = NaN; }; _explicitHeight = _arg1; if (container){ container.invalidateSize(); container.invalidateDisplayList(); }; dispatchEvent(new Event("explicitHeightChanged")); } } }//package mx.containers.utilityClasses
Section 185
//Flex (mx.containers.utilityClasses.Flex) package mx.containers.utilityClasses { import mx.core.*; public class Flex { mx_internal static const VERSION:String = "3.0.0.0"; public static function flexChildWidthsProportionally(_arg1:Container, _arg2:Number, _arg3:Number):Number{ var _local6:Array; var _local7:FlexChildInfo; var _local8:IUIComponent; var _local9:int; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local4:Number = _arg2; var _local5:Number = 0; _local6 = []; var _local10:int = _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++; }; if (FlexVersion.compatibilityVersion >= FlexVersion.VERSION_3_0){ distributeExtraWidth(_arg1, _arg2); }; }; return (_local4); } public static function distributeExtraHeight(_arg1:Container, _arg2:Number):void{ var _local5:int; var _local6:Number; var _local9:IUIComponent; var _local10:Number; var _local11:Number; var _local3:int = _arg1.numChildren; var _local4:Boolean; var _local7:Number = _arg2; var _local8:Number = 0; _local5 = 0; while (_local5 < _local3) { _local9 = IUIComponent(_arg1.getChildAt(_local5)); if (!_local9.includeInLayout){ } else { _local10 = _local9.height; _local6 = _local9.percentHeight; _local8 = (_local8 + _local10); if (!isNaN(_local6)){ _local11 = Math.ceil(((_local6 / 100) * _arg2)); if (_local11 > _local10){ _local4 = true; }; }; }; _local5++; }; if (!_local4){ return; }; _local7 = (_local7 - _local8); var _local12:Boolean; while (((_local12) && ((_local7 > 0)))) { _local12 = false; _local5 = 0; while (_local5 < _local3) { _local9 = IUIComponent(_arg1.getChildAt(_local5)); _local10 = _local9.height; _local6 = _local9.percentHeight; if (((((!(isNaN(_local6))) && (_local9.includeInLayout))) && ((_local10 < _local9.maxHeight)))){ _local11 = Math.ceil(((_local6 / 100) * _arg2)); if (_local11 > _local10){ _local9.setActualSize(_local9.width, (_local10 + 1)); _local7--; _local12 = true; if (_local7 == 0){ return; }; }; }; _local5++; }; }; } public static function distributeExtraWidth(_arg1:Container, _arg2:Number):void{ var _local5:int; var _local6:Number; var _local9:IUIComponent; var _local10:Number; var _local11:Number; var _local3:int = _arg1.numChildren; var _local4:Boolean; var _local7:Number = _arg2; var _local8:Number = 0; _local5 = 0; while (_local5 < _local3) { _local9 = IUIComponent(_arg1.getChildAt(_local5)); if (!_local9.includeInLayout){ } else { _local10 = _local9.width; _local6 = _local9.percentWidth; _local8 = (_local8 + _local10); if (!isNaN(_local6)){ _local11 = Math.ceil(((_local6 / 100) * _arg2)); if (_local11 > _local10){ _local4 = true; }; }; }; _local5++; }; if (!_local4){ return; }; _local7 = (_local7 - _local8); var _local12:Boolean; while (((_local12) && ((_local7 > 0)))) { _local12 = false; _local5 = 0; while (_local5 < _local3) { _local9 = IUIComponent(_arg1.getChildAt(_local5)); _local10 = _local9.width; _local6 = _local9.percentWidth; if (((((!(isNaN(_local6))) && (_local9.includeInLayout))) && ((_local10 < _local9.maxWidth)))){ _local11 = Math.ceil(((_local6 / 100) * _arg2)); if (_local11 > _local10){ _local9.setActualSize((_local10 + 1), _local9.height); _local7--; _local12 = true; if (_local7 == 0){ return; }; }; }; _local5++; }; }; } public static function flexChildrenProportionally(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Array):Number{ var _local6:Number; var _local7:Boolean; var _local9:*; var _local10:*; var _local11:*; var _local12:*; var _local13:*; var _local14:*; var _local5:int = _arg4.length; var _local8:Number = (_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)))); } public static function flexChildHeightsProportionally(_arg1:Container, _arg2:Number, _arg3:Number):Number{ var _local7:FlexChildInfo; var _local8:IUIComponent; var _local9:int; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local4:Number = _arg2; var _local5:Number = 0; var _local6:Array = []; var _local10:int = _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++; }; if (FlexVersion.compatibilityVersion >= FlexVersion.VERSION_3_0){ distributeExtraHeight(_arg1, _arg2); }; }; return (_local4); } } }//package mx.containers.utilityClasses
Section 186
//FlexChildInfo (mx.containers.utilityClasses.FlexChildInfo) package mx.containers.utilityClasses { import mx.core.*; public class FlexChildInfo { public var flex:Number;// = 0 public var preferred:Number;// = 0 public var percent:Number; public var width:Number; public var height:Number; public var size:Number;// = 0 public var max:Number; public var min:Number; public var child:IUIComponent; mx_internal static const VERSION:String = "3.0.0.0"; } }//package mx.containers.utilityClasses
Section 187
//IConstraintLayout (mx.containers.utilityClasses.IConstraintLayout) package mx.containers.utilityClasses { public interface IConstraintLayout { function get constraintColumns():Array; function set constraintRows(_arg1:Array):void; function get constraintRows():Array; function set constraintColumns(_arg1:Array):void; } }//package mx.containers.utilityClasses
Section 188
//Layout (mx.containers.utilityClasses.Layout) package mx.containers.utilityClasses { import mx.core.*; import mx.resources.*; public class Layout { private var _target:Container; protected var resourceManager:IResourceManager; mx_internal static const VERSION:String = "3.0.0.0"; public function Layout(){ resourceManager = ResourceManager.getInstance(); super(); } public function get target():Container{ return (_target); } public function set target(_arg1:Container):void{ _target = _arg1; } public function measure():void{ } public function updateDisplayList(_arg1:Number, _arg2:Number):void{ } } }//package mx.containers.utilityClasses
Section 189
//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 = "3.0.0.0"; } }//package mx.containers
Section 190
//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 = "3.0.0.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 191
//BaseListData (mx.controls.listClasses.BaseListData) package mx.controls.listClasses { import mx.core.*; public class BaseListData { private var _uid:String; public var owner:IUIComponent; public var label:String; public var rowIndex:int; public var columnIndex:int; mx_internal static const VERSION:String = "3.0.0.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 192
//IDropInListItemRenderer (mx.controls.listClasses.IDropInListItemRenderer) package mx.controls.listClasses { public interface IDropInListItemRenderer { function get listData():BaseListData; function set listData(_arg1:BaseListData):void; } }//package mx.controls.listClasses
Section 193
//IListItemRenderer (mx.controls.listClasses.IListItemRenderer) package mx.controls.listClasses { import mx.core.*; import flash.events.*; import mx.managers.*; import mx.styles.*; public interface IListItemRenderer extends IDataRenderer, IEventDispatcher, IFlexDisplayObject, ILayoutManagerClient, ISimpleStyleClient, IUIComponent { } }//package mx.controls.listClasses
Section 194
//ScrollBar (mx.controls.scrollClasses.ScrollBar) package mx.controls.scrollClasses { import mx.core.*; import mx.events.*; import flash.events.*; import flash.geom.*; import mx.styles.*; import mx.controls.*; import flash.ui.*; import flash.utils.*; public class ScrollBar extends UIComponent { private var _direction:String;// = "vertical" private var _pageScrollSize:Number;// = 0 mx_internal var scrollTrack:Button; mx_internal var downArrow:Button; mx_internal var scrollThumb:ScrollThumb; private var trackScrollRepeatDirection:int; private var _minScrollPosition:Number;// = 0 private var trackPosition:Number; private var _pageSize:Number;// = 0 mx_internal var _minHeight:Number;// = 32 private var _maxScrollPosition:Number;// = 0 private var trackScrollTimer:Timer; mx_internal var upArrow:Button; private var _lineScrollSize:Number;// = 1 private var _scrollPosition:Number;// = 0 private var trackScrolling:Boolean;// = false mx_internal var isScrolling:Boolean; mx_internal var oldPosition:Number; mx_internal var _minWidth:Number;// = 16 mx_internal static const VERSION:String = "3.0.0.0"; public static const THICKNESS:Number = 16; override public function set enabled(_arg1:Boolean):void{ super.enabled = _arg1; invalidateDisplayList(); } public function set lineScrollSize(_arg1:Number):void{ _lineScrollSize = _arg1; } public function get minScrollPosition():Number{ return (_minScrollPosition); } mx_internal function dispatchScrollEvent(_arg1:Number, _arg2:String):void{ var _local3:ScrollEvent = new ScrollEvent(ScrollEvent.SCROLL); _local3.detail = _arg2; _local3.position = scrollPosition; _local3.delta = (scrollPosition - _arg1); _local3.direction = direction; dispatchEvent(_local3); } private function downArrow_buttonDownHandler(_arg1:FlexEvent):void{ if (isNaN(oldPosition)){ oldPosition = scrollPosition; }; lineScroll(1); } private function scrollTrack_mouseDownHandler(_arg1:MouseEvent):void{ if (!(((_arg1.target == this)) || ((_arg1.target == scrollTrack)))){ 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); var _local2:Point = new Point(_arg1.localX, _arg1.localY); _local2 = _arg1.target.localToGlobal(_local2); _local2 = globalToLocal(_local2); trackPosition = _local2.y; if (isNaN(oldPosition)){ oldPosition = scrollPosition; }; trackScrollRepeatDirection = (((scrollThumb.y + scrollThumb.height) < _local2.y)) ? 1 : ((scrollThumb.y > _local2.y)) ? -1 : 0; pageScroll(trackScrollRepeatDirection); if (!trackScrollTimer){ trackScrollTimer = new Timer(getStyle("repeatDelay"), 1); trackScrollTimer.addEventListener(TimerEvent.TIMER, trackScrollTimerHandler); }; trackScrollTimer.start(); } public function set minScrollPosition(_arg1:Number):void{ _minScrollPosition = _arg1; } public function get scrollPosition():Number{ return (_scrollPosition); } mx_internal function get linePlusDetail():String{ return (((direction == ScrollBarDirection.VERTICAL)) ? ScrollEventDetail.LINE_DOWN : ScrollEventDetail.LINE_RIGHT); } public function get maxScrollPosition():Number{ return (_maxScrollPosition); } protected function get thumbStyleFilters():Object{ return (null); } override public function set doubleClickEnabled(_arg1:Boolean):void{ } public function get lineScrollSize():Number{ return (_lineScrollSize); } private function stage_scrollTrack_mouseMoveHandler(_arg1:MouseEvent):void{ if (_arg1.target != stage){ return; }; scrollTrack_mouseMoveHandler(_arg1); } mx_internal function get virtualHeight():Number{ return (unscaledHeight); } public function set scrollPosition(_arg1:Number):void{ var _local2:Number; var _local3:Number; var _local4: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); _local4 = (((virtualWidth - scrollThumb.width) / 2) + getStyle("thumbOffset")); scrollThumb.move(Math.round(_local4), Math.round(_local3)); }; }; } protected function get downArrowStyleFilters():Object{ return (null); } public function get pageSize():Number{ return (_pageSize); } public function set pageScrollSize(_arg1:Number):void{ _pageScrollSize = _arg1; } public function set maxScrollPosition(_arg1:Number):void{ _maxScrollPosition = _arg1; } mx_internal function pageScroll(_arg1:int):void{ var _local4:Number; var _local5:String; var _local2:Number = ((_pageScrollSize)!=0) ? _pageScrollSize : pageSize; var _local3:Number = (_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); }; } override protected function createChildren():void{ super.createChildren(); if (!scrollTrack){ scrollTrack = new Button(); scrollTrack.focusEnabled = false; scrollTrack.skinName = "trackSkin"; scrollTrack.upSkinName = "trackUpSkin"; scrollTrack.overSkinName = "trackOverSkin"; scrollTrack.downSkinName = "trackDownSkin"; scrollTrack.disabledSkinName = "trackDisabledSkin"; if ((scrollTrack is ISimpleStyleClient)){ ISimpleStyleClient(scrollTrack).styleName = this; }; addChild(scrollTrack); scrollTrack.validateProperties(); }; 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.skinName = "upArrowSkin"; upArrow.upIconName = ""; upArrow.overIconName = ""; upArrow.downIconName = ""; upArrow.disabledIconName = ""; addChild(upArrow); upArrow.styleName = new StyleProxy(this, upArrowStyleFilters); 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.skinName = "downArrowSkin"; downArrow.upIconName = ""; downArrow.overIconName = ""; downArrow.downIconName = ""; downArrow.disabledIconName = ""; addChild(downArrow); downArrow.styleName = new StyleProxy(this, downArrowStyleFilters); downArrow.validateProperties(); downArrow.addEventListener(FlexEvent.BUTTON_DOWN, downArrow_buttonDownHandler); }; } private function scrollTrack_mouseOverHandler(_arg1:MouseEvent):void{ if (!(((_arg1.target == this)) || ((_arg1.target == scrollTrack)))){ return; }; if (trackScrolling){ trackScrollTimer.start(); }; } private function get minDetail():String{ return (((direction == ScrollBarDirection.VERTICAL)) ? ScrollEventDetail.AT_TOP : ScrollEventDetail.AT_LEFT); } 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); } mx_internal function get lineMinusDetail():String{ return (((direction == ScrollBarDirection.VERTICAL)) ? ScrollEventDetail.LINE_UP : ScrollEventDetail.LINE_LEFT); } 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_mouseLeaveHandler(_arg1:Event):void{ 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 != scrollTrack){ return; }; var _local2:String = ((oldPosition > scrollPosition)) ? pageMinusDetail : pagePlusDetail; dispatchScrollEvent(oldPosition, _local2); oldPosition = NaN; } protected function get upArrowStyleFilters():Object{ return (null); } private function get trackHeight():Number{ return ((virtualHeight - (upArrow.getExplicitOrMeasuredHeight() + downArrow.getExplicitOrMeasuredHeight()))); } public function get pageScrollSize():Number{ return (_pageScrollSize); } override protected function measure():void{ super.measure(); upArrow.validateSize(); downArrow.validateSize(); scrollTrack.validateSize(); if (FlexVersion.compatibilityVersion >= FlexVersion.VERSION_3_0){ _minWidth = (scrollThumb) ? scrollThumb.getExplicitOrMeasuredWidth() : 0; _minWidth = Math.max(scrollTrack.getExplicitOrMeasuredWidth(), upArrow.getExplicitOrMeasuredWidth(), downArrow.getExplicitOrMeasuredWidth(), _minWidth); } else { _minWidth = upArrow.getExplicitOrMeasuredWidth(); }; _minHeight = (upArrow.getExplicitOrMeasuredHeight() + downArrow.getExplicitOrMeasuredHeight()); } mx_internal function lineScroll(_arg1:int):void{ var _local4:Number; var _local5:String; var _local2:Number = _lineScrollSize; var _local3:Number = (_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); }; } 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; scrollTrack.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 = new StyleProxy(this, thumbStyleFilters); scrollThumb.upSkinName = "thumbUpSkin"; scrollThumb.overSkinName = "thumbOverSkin"; scrollThumb.downSkinName = "thumbDownSkin"; scrollThumb.iconName = "thumbIcon"; scrollThumb.skinName = "thumbSkin"; }; _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(scrollThumb.measuredWidth, scrollThumb.minHeight); }; } else { scrollThumb.visible = true; scrollThumb.setActualSize(scrollThumb.measuredWidth, _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; scrollTrack.enabled = false; if (scrollThumb){ scrollThumb.visible = 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 upArrow_buttonDownHandler(_arg1:FlexEvent):void{ if (isNaN(oldPosition)){ oldPosition = scrollPosition; }; lineScroll(-1); } public function set pageSize(_arg1:Number):void{ _pageSize = _arg1; } private function get trackY():Number{ return (upArrow.getExplicitOrMeasuredHeight()); } private function scrollTrack_mouseOutHandler(_arg1:MouseEvent):void{ if (trackScrolling){ trackScrollTimer.stop(); }; } private function scrollTrack_mouseUpHandler(_arg1:MouseEvent):void{ scrollTrack_mouseLeaveHandler(_arg1); } 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; }; } 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.setActualSize(upArrow.getExplicitOrMeasuredWidth(), upArrow.getExplicitOrMeasuredHeight()); if (FlexVersion.compatibilityVersion >= FlexVersion.VERSION_3_0){ upArrow.move(((virtualWidth - upArrow.width) / 2), 0); } else { upArrow.move(0, 0); }; scrollTrack.setActualSize(scrollTrack.getExplicitOrMeasuredWidth(), virtualHeight); if (FlexVersion.compatibilityVersion >= FlexVersion.VERSION_3_0){ scrollTrack.x = ((virtualWidth - scrollTrack.width) / 2); }; scrollTrack.y = 0; downArrow.setActualSize(downArrow.getExplicitOrMeasuredWidth(), downArrow.getExplicitOrMeasuredHeight()); if (FlexVersion.compatibilityVersion >= FlexVersion.VERSION_3_0){ downArrow.move(((virtualWidth - downArrow.width) / 2), (virtualHeight - downArrow.getExplicitOrMeasuredHeight())); } else { downArrow.move(0, (virtualHeight - downArrow.getExplicitOrMeasuredHeight())); }; setScrollProperties(pageSize, minScrollPosition, maxScrollPosition, _pageScrollSize); scrollPosition = _scrollPosition; } mx_internal function get pagePlusDetail():String{ return (((direction == ScrollBarDirection.VERTICAL)) ? ScrollEventDetail.PAGE_DOWN : ScrollEventDetail.PAGE_RIGHT); } mx_internal function get virtualWidth():Number{ return (unscaledWidth); } public function set direction(_arg1:String):void{ _direction = _arg1; invalidateSize(); invalidateDisplayList(); dispatchEvent(new Event("directionChanged")); } public function get direction():String{ return (_direction); } } }//package mx.controls.scrollClasses
Section 195
//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 = "3.0.0.0"; } }//package mx.controls.scrollClasses
Section 196
//ScrollThumb (mx.controls.scrollClasses.ScrollThumb) package mx.controls.scrollClasses { import mx.events.*; import flash.events.*; import flash.geom.*; import mx.controls.*; public class ScrollThumb extends Button { private var lastY:Number; private var datamin:Number; private var ymax:Number; private var ymin:Number; private var datamax:Number; mx_internal static const VERSION:String = "3.0.0.0"; public function ScrollThumb(){ explicitMinHeight = 10; stickyHighlighting = true; } private function stopDragThumb():void{ var _local1:ScrollBar = 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); } override protected function mouseDownHandler(_arg1:MouseEvent):void{ super.mouseDownHandler(_arg1); var _local2:ScrollBar = ScrollBar(parent); _local2.oldPosition = _local2.scrollPosition; lastY = _arg1.localY; systemManager.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler, true); systemManager.stage.addEventListener(MouseEvent.MOUSE_MOVE, stage_mouseMoveHandler); } private function mouseMoveHandler(_arg1:MouseEvent):void{ if (ymin == ymax){ return; }; var _local2:Point = new Point(_arg1.stageX, _arg1.stageY); _local2 = globalToLocal(_local2); var _local3:Number = (_local2.y - lastY); _local3 = (_local3 + y); if (_local3 < ymin){ _local3 = ymin; } else { if (_local3 > ymax){ _local3 = ymax; }; }; var _local4:ScrollBar = ScrollBar(parent); _local4.isScrolling = true; $y = _local3; var _local5:Number = _local4.scrollPosition; var _local6:Number = (Math.round((((datamax - datamin) * (y - ymin)) / (ymax - ymin))) + datamin); _local4.scrollPosition = _local6; _local4.dispatchScrollEvent(_local5, ScrollEventDetail.THUMB_TRACK); _arg1.updateAfterEvent(); } override mx_internal function buttonReleased():void{ super.buttonReleased(); stopDragThumb(); } private function stage_mouseMoveHandler(_arg1:MouseEvent):void{ if (_arg1.target != stage){ return; }; mouseMoveHandler(_arg1); } 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; } } }//package mx.controls.scrollClasses
Section 197
//Button (mx.controls.Button) package mx.controls { import mx.core.*; import mx.events.*; import flash.events.*; import flash.display.*; import mx.managers.*; import mx.styles.*; import flash.text.*; import mx.controls.listClasses.*; import flash.ui.*; import flash.utils.*; import mx.controls.dataGridClasses.*; public class Button extends UIComponent implements IDataRenderer, IDropInListItemRenderer, IFocusManagerComponent, IListItemRenderer, IFontContextComponent, IButton { mx_internal var _emphasized:Boolean;// = false mx_internal var extraSpacing:Number;// = 20 private var icons:Array; public var selectedField:String;// = null private var labelChanged:Boolean;// = false private var skinMeasuredWidth:Number; mx_internal var checkedDefaultSkin:Boolean;// = false private var autoRepeatTimer:Timer; mx_internal var disabledIconName:String;// = "disabledIcon" mx_internal var disabledSkinName:String;// = "disabledSkin" mx_internal var checkedDefaultIcon:Boolean;// = false public var stickyHighlighting:Boolean;// = false private var enabledChanged:Boolean;// = false mx_internal var selectedUpIconName:String;// = "selectedUpIcon" mx_internal var selectedUpSkinName:String;// = "selectedUpSkin" mx_internal var upIconName:String;// = "upIcon" mx_internal var upSkinName:String;// = "upSkin" mx_internal var centerContent:Boolean;// = true mx_internal var buttonOffset:Number;// = 0 private var skinMeasuredHeight:Number; private var oldUnscaledWidth:Number; mx_internal var downIconName:String;// = "downIcon" mx_internal var _labelPlacement:String;// = "right" mx_internal var downSkinName:String;// = "downSkin" mx_internal var _toggle:Boolean;// = false private var _phase:String;// = "up" private var toolTipSet:Boolean;// = false private var _data:Object; mx_internal var currentIcon:IFlexDisplayObject; mx_internal var currentSkin:IFlexDisplayObject; mx_internal var overIconName:String;// = "overIcon" mx_internal var selectedDownIconName:String;// = "selectedDownIcon" mx_internal var overSkinName:String;// = "overSkin" mx_internal var iconName:String;// = "icon" mx_internal var skinName:String;// = "skin" mx_internal var selectedDownSkinName:String;// = "selectedDownSkin" private var skins:Array; private var selectedSet:Boolean; private var _autoRepeat:Boolean;// = false private var styleChangedFlag:Boolean;// = true mx_internal var selectedOverIconName:String;// = "selectedOverIcon" private var _listData:BaseListData; mx_internal var selectedOverSkinName:String;// = "selectedOverSkin" protected var textField:IUITextField; private var labelSet:Boolean; mx_internal var defaultIconUsesStates:Boolean;// = false mx_internal var defaultSkinUsesStates:Boolean;// = false mx_internal var toggleChanged:Boolean;// = false private var emphasizedChanged:Boolean;// = false private var _label:String;// = "" mx_internal var _selected:Boolean;// = false mx_internal var selectedDisabledIconName:String;// = "selectedDisabledIcon" mx_internal var selectedDisabledSkinName:String;// = "selectedDisabledSkin" mx_internal static const VERSION:String = "3.0.0.0"; mx_internal static var createAccessibilityImplementation:Function; mx_internal static var TEXT_WIDTH_PADDING:Number = 6; public function Button(){ skins = []; icons = []; 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); } private function previousVersion_measure():void{ var bm:EdgeMetrics; var lineMetrics:TextLineMetrics; var paddingLeft:Number; var paddingRight:Number; var paddingTop:Number; var paddingBottom:Number; var horizontalGap:Number; super.measure(); var textWidth:Number = 0; var textHeight:Number = 0; if (label){ lineMetrics = measureText(label); textWidth = lineMetrics.width; textHeight = lineMetrics.height; paddingLeft = getStyle("paddingLeft"); paddingRight = getStyle("paddingRight"); paddingTop = getStyle("paddingTop"); paddingBottom = getStyle("paddingBottom"); textWidth = (textWidth + ((paddingLeft + paddingRight) + getStyle("textIndent"))); textHeight = (textHeight + (paddingTop + paddingBottom)); }; try { bm = currentSkin["borderMetrics"]; } catch(e:Error) { bm = new EdgeMetrics(3, 3, 3, 3); }; var tempCurrentIcon:IFlexDisplayObject = getCurrentIcon(); var iconWidth:Number = (tempCurrentIcon) ? tempCurrentIcon.width : 0; var iconHeight:Number = (tempCurrentIcon) ? tempCurrentIcon.height : 0; var w:Number = 0; var h:Number = 0; if ((((labelPlacement == ButtonLabelPlacement.LEFT)) || ((labelPlacement == ButtonLabelPlacement.RIGHT)))){ w = (textWidth + iconWidth); if (iconWidth != 0){ horizontalGap = getStyle("horizontalGap"); w = (w + (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); } public function get label():String{ return (_label); } 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); } protected function mouseUpHandler(_arg1:MouseEvent):void{ if (!enabled){ return; }; phase = ButtonPhase.OVER; buttonReleased(); if (!toggle){ _arg1.updateAfterEvent(); }; } override protected function adjustFocusRect(_arg1:DisplayObject=null):void{ super.adjustFocusRect((currentSkin) ? this : DisplayObject(currentIcon)); } mx_internal function set phase(_arg1:String):void{ _phase = _arg1; invalidateSize(); invalidateDisplayList(); } mx_internal function viewIconForPhase(_arg1:String):IFlexDisplayObject{ var _local3:IFlexDisplayObject; var _local4:Boolean; var _local5:String; var _local2:Class = Class(getStyle(_arg1)); if (!_local2){ _local2 = Class(getStyle(iconName)); if (defaultIconUsesStates){ _arg1 = iconName; }; if (((!(checkedDefaultIcon)) && (_local2))){ _local3 = IFlexDisplayObject(new (_local2)); if (((!((_local3 is IProgrammaticSkin))) && ((_local3 is IStateClient)))){ defaultIconUsesStates = true; _arg1 = iconName; }; if (_local3){ checkedDefaultIcon = true; }; }; }; _local3 = IFlexDisplayObject(getChildByName(_arg1)); if (_local3 == null){ if (_local2 != null){ _local3 = IFlexDisplayObject(new (_local2)); _local3.name = _arg1; if ((_local3 is ISimpleStyleClient)){ ISimpleStyleClient(_local3).styleName = this; }; addChild(DisplayObject(_local3)); _local4 = false; if ((_local3 is IInvalidating)){ IInvalidating(_local3).validateNow(); _local4 = true; } else { if ((_local3 is IProgrammaticSkin)){ IProgrammaticSkin(_local3).validateDisplayList(); _local4 = true; }; }; if (((_local3) && ((_local3 is IUIComponent)))){ IUIComponent(_local3).enabled = enabled; }; if (_local4){ _local3.setActualSize(_local3.measuredWidth, _local3.measuredHeight); }; icons.push(_local3); }; }; if (currentIcon != null){ currentIcon.visible = false; }; currentIcon = _local3; if (((defaultIconUsesStates) && ((currentIcon is IStateClient)))){ _local5 = ""; if (!enabled){ _local5 = (selected) ? "selectedDisabled" : "disabled"; } else { if (phase == ButtonPhase.UP){ _local5 = (selected) ? "selectedUp" : "up"; } else { if (phase == ButtonPhase.OVER){ _local5 = (selected) ? "selectedOver" : "over"; } else { if (phase == ButtonPhase.DOWN){ _local5 = (selected) ? "selectedDown" : "down"; }; }; }; }; IStateClient(currentIcon).currentState = _local5; }; if (currentIcon != null){ currentIcon.visible = true; }; return (_local3); } mx_internal function viewSkinForPhase(_arg1:String, _arg2:String):void{ var _local4:IFlexDisplayObject; var _local5:Number; var _local6:ISimpleStyleClient; var _local3:Class = Class(getStyle(_arg1)); if (!_local3){ _local3 = Class(getStyle(skinName)); if (defaultSkinUsesStates){ _arg1 = skinName; }; if (((!(checkedDefaultSkin)) && (_local3))){ _local4 = IFlexDisplayObject(new (_local3)); if (((!((_local4 is IProgrammaticSkin))) && ((_local4 is IStateClient)))){ defaultSkinUsesStates = true; _arg1 = skinName; }; if (_local4){ checkedDefaultSkin = true; }; }; }; _local4 = IFlexDisplayObject(getChildByName(_arg1)); if (!_local4){ if (_local3){ _local4 = IFlexDisplayObject(new (_local3)); _local4.name = _arg1; _local6 = (_local4 as ISimpleStyleClient); if (_local6){ _local6.styleName = this; }; addChild(DisplayObject(_local4)); _local4.setActualSize(unscaledWidth, unscaledHeight); if ((((_local4 is IInvalidating)) && (initialized))){ IInvalidating(_local4).validateNow(); } else { if ((((_local4 is IProgrammaticSkin)) && (initialized))){ IProgrammaticSkin(_local4).validateDisplayList(); }; }; skins.push(_local4); }; }; if (currentSkin){ currentSkin.visible = false; }; currentSkin = _local4; if (((defaultSkinUsesStates) && ((currentSkin is IStateClient)))){ IStateClient(currentSkin).currentState = _arg2; }; if (currentSkin){ currentSkin.visible = true; }; if (enabled){ if (phase == ButtonPhase.OVER){ _local5 = textField.getStyle("textRollOverColor"); } else { if (phase == ButtonPhase.DOWN){ _local5 = textField.getStyle("textSelectedColor"); } else { _local5 = textField.getStyle("color"); }; }; textField.setColor(_local5); }; } mx_internal function getTextField():IUITextField{ return (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(); }; }; }; } override protected function createChildren():void{ super.createChildren(); if (!textField){ textField = IUITextField(createInFontContext(UITextField)); textField.styleName = this; addChild(DisplayObject(textField)); }; } mx_internal function setSelected(_arg1:Boolean, _arg2:Boolean=false):void{ if (_selected != _arg1){ _selected = _arg1; invalidateDisplayList(); if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){ if (toggle){ dispatchEvent(new Event(Event.CHANGE)); }; } else { if (((toggle) && (!(_arg2)))){ dispatchEvent(new Event(Event.CHANGE)); }; }; dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT)); }; } 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(); }; } public function get autoRepeat():Boolean{ return (_autoRepeat); } public function set selected(_arg1:Boolean):void{ selectedSet = true; setSelected(_arg1, true); } override protected function focusOutHandler(_arg1:FocusEvent):void{ super.focusOutHandler(_arg1); if (phase != ButtonPhase.UP){ phase = ButtonPhase.UP; }; } public function get labelPlacement():String{ return (_labelPlacement); } public function set autoRepeat(_arg1:Boolean):void{ _autoRepeat = _arg1; if (_arg1){ autoRepeatTimer = new Timer(1); } else { autoRepeatTimer = null; }; } mx_internal function changeIcons():void{ var _local1:int = icons.length; var _local2:int; while (_local2 < _local1) { removeChild(icons[_local2]); _local2++; }; icons = []; checkedDefaultIcon = false; defaultIconUsesStates = false; } 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)); } mx_internal function getCurrentIcon():IFlexDisplayObject{ var _local1:String = getCurrentIconName(); if (!_local1){ return (null); }; return (viewIconForPhase(_local1)); } public function get fontContext():IFlexModuleFactory{ return (moduleFactory); } public function get emphasized():Boolean{ return (_emphasized); } public function get listData():BaseListData{ return (_listData); } mx_internal function layoutContents(_arg1:Number, _arg2:Number, _arg3:Boolean):void{ var _local20:TextLineMetrics; var _local28:MoveEvent; if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){ previousVersion_layoutContents(_arg1, _arg2, _arg3); return; }; var _local4:Number = 0; var _local5:Number = 0; var _local6:Number = 0; var _local7:Number = 0; var _local8:Number = 0; var _local9:Number = 0; var _local10:Number = 0; var _local11:Number = 0; var _local12:Number = 0; var _local13:Number = 0; var _local14:Number = getStyle("paddingLeft"); var _local15:Number = getStyle("paddingRight"); var _local16:Number = getStyle("paddingTop"); var _local17:Number = getStyle("paddingBottom"); var _local18:Number = 0; var _local19:Number = 0; if (label){ _local20 = measureText(label); _local18 = (_local20.width + TEXT_WIDTH_PADDING); _local19 = (_local20.height + UITextField.TEXT_HEIGHT_PADDING); } else { _local20 = measureText("Wj"); _local19 = (_local20.height + UITextField.TEXT_HEIGHT_PADDING); }; var _local21:Number = (_arg3) ? buttonOffset : 0; var _local22:String = getStyle("textAlign"); var _local23:Number = _arg1; var _local24:Number = _arg2; var _local25:EdgeMetrics = (((((currentSkin) && ((currentSkin is IBorder)))) && (!((currentSkin is IFlexAsset))))) ? IBorder(currentSkin).borderMetrics : null; if (_local25){ _local23 = (_local23 - (_local25.left + _local25.right)); _local24 = (_local24 - (_local25.top + _local25.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(Math.min(((((_local23 - _local8) - _local12) - _local14) - _local15), _local18), 0); textField.width = _local4; } else { _local4 = 0; textField.width = _local4; }; _local5 = Math.min(_local24, _local19); textField.height = _local5; if (_local22 == "left"){ _local6 = (_local6 + _local14); } else { if (_local22 == "right"){ _local6 = (_local6 + ((((_local23 - _local4) - _local8) - _local12) - _local15)); } else { _local6 = (_local6 + (((((((_local23 - _local4) - _local8) - _local12) - _local14) - _local15) / 2) + _local14)); }; }; if (labelPlacement == ButtonLabelPlacement.RIGHT){ _local6 = (_local6 + (_local8 + _local12)); _local10 = (_local6 - (_local8 + _local12)); } else { _local10 = ((_local6 + _local4) + _local12); }; _local11 = (((((_local24 - _local9) - _local16) - _local17) / 2) + _local16); _local7 = (((((_local24 - _local5) - _local16) - _local17) / 2) + _local16); } else { _local13 = getStyle("verticalGap"); if ((((_local9 == 0)) || ((label == "")))){ _local13 = 0; }; if (_local18 > 0){ _local4 = Math.max(((_local23 - _local14) - _local15), 0); textField.width = _local4; _local5 = Math.min(((((_local24 - _local9) - _local16) - _local17) - _local13), _local19); textField.height = _local5; } else { _local4 = 0; textField.width = _local4; _local5 = 0; textField.height = _local5; }; _local6 = _local14; if (_local22 == "left"){ _local10 = (_local10 + _local14); } else { if (_local22 == "right"){ _local10 = (_local10 + Math.max(((_local23 - _local8) - _local15), _local14)); } else { _local10 = (_local10 + (((((_local23 - _local8) - _local14) - _local15) / 2) + _local14)); }; }; if (labelPlacement == ButtonLabelPlacement.TOP){ _local7 = (_local7 + (((((((_local24 - _local5) - _local9) - _local16) - _local17) - _local13) / 2) + _local16)); _local11 = (_local11 + ((_local7 + _local5) + _local13)); } else { _local11 = (_local11 + (((((((_local24 - _local5) - _local9) - _local16) - _local17) - _local13) / 2) + _local16)); _local7 = (_local7 + ((_local11 + _local9) + _local13)); }; }; var _local26:Number = _local21; var _local27:Number = _local21; if (_local25){ _local26 = (_local26 + _local25.left); _local27 = (_local27 + _local25.top); }; textField.x = Math.round((_local6 + _local26)); textField.y = Math.round((_local7 + _local27)); if (currentIcon){ _local10 = (_local10 + _local26); _local11 = (_local11 + _local27); _local28 = new MoveEvent(MoveEvent.MOVE); _local28.oldX = currentIcon.x; _local28.oldY = currentIcon.y; currentIcon.x = Math.round(_local10); currentIcon.y = Math.round(_local11); currentIcon.dispatchEvent(_local28); }; if (currentSkin){ setChildIndex(DisplayObject(currentSkin), (numChildren - 1)); }; if (currentIcon){ setChildIndex(DisplayObject(currentIcon), (numChildren - 1)); }; if (textField){ setChildIndex(DisplayObject(textField), (numChildren - 1)); }; } 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 protected function keyDownHandler(_arg1:KeyboardEvent):void{ if (!enabled){ return; }; if (_arg1.keyCode == Keyboard.SPACE){ buttonPressed(); }; } 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(); }; }; }; } mx_internal function get phase():String{ return (_phase); } override public function set enabled(_arg1:Boolean):void{ if (super.enabled == _arg1){ return; }; super.enabled = _arg1; enabledChanged = true; invalidateProperties(); invalidateDisplayList(); } override protected function measure():void{ var _local9:TextLineMetrics; if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){ previousVersion_measure(); return; }; super.measure(); var _local1:Number = 0; var _local2:Number = 0; if (label){ _local9 = measureText(label); _local1 = (_local9.width + TEXT_WIDTH_PADDING); _local2 = (_local9.height + UITextField.TEXT_HEIGHT_PADDING); }; var _local3:IFlexDisplayObject = getCurrentIcon(); var _local4:Number = (_local3) ? _local3.width : 0; var _local5:Number = (_local3) ? _local3.height : 0; var _local6:Number = 0; var _local7:Number = 0; if ((((labelPlacement == ButtonLabelPlacement.LEFT)) || ((labelPlacement == ButtonLabelPlacement.RIGHT)))){ _local6 = (_local1 + _local4); if (((_local1) && (_local4))){ _local6 = (_local6 + getStyle("horizontalGap")); }; _local7 = Math.max(_local2, _local5); } else { _local6 = Math.max(_local1, _local4); _local7 = (_local2 + _local5); if (((_local2) && (_local5))){ _local7 = (_local7 + getStyle("verticalGap")); }; }; if (((_local1) || (_local4))){ _local6 = (_local6 + (getStyle("paddingLeft") + getStyle("paddingRight"))); _local7 = (_local7 + (getStyle("paddingTop") + getStyle("paddingBottom"))); }; var _local8:EdgeMetrics = (((((currentSkin) && ((currentSkin is IBorder)))) && (!((currentSkin is IFlexAsset))))) ? IBorder(currentSkin).borderMetrics : null; if (_local8){ _local6 = (_local6 + (_local8.left + _local8.right)); _local7 = (_local7 + (_local8.top + _local8.bottom)); }; if (((currentSkin) && (((isNaN(skinMeasuredWidth)) || (isNaN(skinMeasuredHeight)))))){ skinMeasuredWidth = currentSkin.measuredWidth; skinMeasuredHeight = currentSkin.measuredHeight; }; if (!isNaN(skinMeasuredWidth)){ _local6 = Math.max(skinMeasuredWidth, _local6); }; if (!isNaN(skinMeasuredHeight)){ _local7 = Math.max(skinMeasuredHeight, _local7); }; measuredMinWidth = (measuredWidth = _local6); measuredMinHeight = (measuredHeight = _local7); } public function get toggle():Boolean{ return (_toggle); } 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(); }; } 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(); }; } 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 get selected():Boolean{ return (_selected); } public function set labelPlacement(_arg1:String):void{ _labelPlacement = _arg1; invalidateSize(); invalidateDisplayList(); dispatchEvent(new Event("labelPlacementChanged")); } protected function clickHandler(_arg1:MouseEvent):void{ if (!enabled){ _arg1.stopImmediatePropagation(); return; }; if (toggle){ setSelected(!(selected)); _arg1.updateAfterEvent(); }; } override protected function initializeAccessibility():void{ if (Button.createAccessibilityImplementation != null){ Button.createAccessibilityImplementation(this); }; } public function set toggle(_arg1:Boolean):void{ _toggle = _arg1; toggleChanged = true; invalidateProperties(); invalidateDisplayList(); dispatchEvent(new Event("toggleChanged")); } override public function get baselinePosition():Number{ var _local1:String; var _local2:TextLineMetrics; if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){ _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)); }; if (!validateBaselinePosition()){ return (NaN); }; return ((textField.y + textField.baselinePosition)); } public function get data():Object{ return (_data); } public function set fontContext(_arg1:IFlexModuleFactory):void{ this.moduleFactory = _arg1; } mx_internal function viewSkin():void{ var _local1:String; var _local2:String; if (!enabled){ _local1 = (selected) ? selectedDisabledSkinName : disabledSkinName; _local2 = (selected) ? "selectedDisabled" : "disabled"; } else { if (phase == ButtonPhase.UP){ _local1 = (selected) ? selectedUpSkinName : upSkinName; _local2 = (selected) ? "selectedUp" : "up"; } else { if (phase == ButtonPhase.OVER){ _local1 = (selected) ? selectedOverSkinName : overSkinName; _local2 = (selected) ? "selectedOver" : "over"; } else { if (phase == ButtonPhase.DOWN){ _local1 = (selected) ? selectedDownSkinName : downSkinName; _local2 = (selected) ? "selectedDown" : "down"; }; }; }; }; viewSkinForPhase(_local1, _local2); } override public function styleChanged(_arg1:String):void{ styleChangedFlag = true; super.styleChanged(_arg1); if (((!(_arg1)) || ((_arg1 == "styleName")))){ changeSkins(); changeIcons(); if (initialized){ viewSkin(); viewIcon(); }; } else { if (_arg1.toLowerCase().indexOf("skin") != -1){ changeSkins(); } else { if (_arg1.toLowerCase().indexOf("icon") != -1){ changeIcons(); invalidateSize(); }; }; }; } public function set emphasized(_arg1:Boolean):void{ _emphasized = _arg1; emphasizedChanged = true; invalidateDisplayList(); } mx_internal function viewIcon():void{ var _local1:String = getCurrentIconName(); viewIconForPhase(_local1); } override public function set toolTip(_arg1:String):void{ super.toolTip = _arg1; if (_arg1){ toolTipSet = true; } else { toolTipSet = false; invalidateDisplayList(); }; } override protected function commitProperties():void{ super.commitProperties(); if (((hasFontContextChanged()) && (!((textField == null))))){ removeChild(DisplayObject(textField)); textField = null; }; if (!textField){ textField = IUITextField(createInFontContext(UITextField)); textField.styleName = this; addChild(DisplayObject(textField)); enabledChanged = true; toggleChanged = true; }; if (!initialized){ viewSkin(); viewIcon(); }; if (enabledChanged){ textField.enabled = enabled; if (((currentIcon) && ((currentIcon is IUIComponent)))){ IUIComponent(currentIcon).enabled = enabled; }; enabledChanged = false; }; if (toggleChanged){ if (!toggle){ selected = false; }; toggleChanged = false; }; } mx_internal function changeSkins():void{ var _local1:int = skins.length; var _local2:int; while (_local2 < _local1) { removeChild(skins[_local2]); _local2++; }; skins = []; skinMeasuredWidth = NaN; skinMeasuredHeight = NaN; checkedDefaultSkin = false; defaultSkinUsesStates = false; if (((initialized) && ((FlexVersion.compatibilityVersion >= FlexVersion.VERSION_3_0)))){ viewSkin(); invalidateSize(); }; } private function autoRepeatTimer_timerHandler(_arg1:Event):void{ if (!enabled){ return; }; dispatchEvent(new FlexEvent(FlexEvent.BUTTON_DOWN)); } private function previousVersion_layoutContents(_arg1:Number, _arg2:Number, _arg3:Boolean):void{ var _local20:TextLineMetrics; var _local28:Number; var _local29:MoveEvent; var _local4:Number = 0; var _local5:Number = 0; var _local6:Number = 0; var _local7:Number = 0; var _local8:Number = 0; var _local9:Number = 0; var _local10:Number = 0; var _local11:Number = 0; var _local12:Number = 2; var _local13:Number = 2; var _local14:Number = getStyle("paddingLeft"); var _local15:Number = getStyle("paddingRight"); var _local16:Number = getStyle("paddingTop"); var _local17:Number = getStyle("paddingBottom"); var _local18:Number = 0; var _local19:Number = 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; }; var _local21:Number = (_arg3) ? buttonOffset : 0; var _local22:String = getStyle("textAlign"); var _local23:EdgeMetrics = (((currentSkin) && ((currentSkin is IRectangularBorder)))) ? IRectangularBorder(currentSkin).borderMetrics : null; var _local24:Number = _arg1; var _local25:Number = ((_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); }; }; var _local26:Number = _local21; var _local27:Number = _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); _local29 = new MoveEvent(MoveEvent.MOVE); _local29.oldX = currentIcon.x; _local29.oldY = currentIcon.y; currentIcon.x = Math.round(_local10); currentIcon.y = Math.round(_local11); currentIcon.dispatchEvent(_local29); }; if (currentSkin){ setChildIndex(DisplayObject(currentSkin), (numChildren - 1)); }; if (currentIcon){ setChildIndex(DisplayObject(currentIcon), (numChildren - 1)); }; if (textField){ setChildIndex(DisplayObject(textField), (numChildren - 1)); }; } private function systemManager_mouseUpHandler(_arg1:MouseEvent):void{ if (contains(DisplayObject(_arg1.target))){ return; }; phase = ButtonPhase.UP; buttonReleased(); _arg1.updateAfterEvent(); } public function set label(_arg1:String):void{ labelSet = true; if (_label != _arg1){ _label = _arg1; labelChanged = true; invalidateSize(); invalidateDisplayList(); dispatchEvent(new Event("labelChanged")); }; } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local5:IFlexDisplayObject; var _local6:Boolean; super.updateDisplayList(_arg1, _arg2); if (emphasizedChanged){ changeSkins(); emphasizedChanged = false; }; var _local3:int = skins.length; var _local4:int; while (_local4 < _local3) { _local5 = IFlexDisplayObject(skins[_local4]); _local5.setActualSize(_arg1, _arg2); _local4++; }; viewSkin(); viewIcon(); 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; } private function stage_mouseLeaveHandler(_arg1:Event):void{ phase = ButtonPhase.UP; buttonReleased(); } public function set listData(_arg1:BaseListData):void{ _listData = _arg1; } } }//package mx.controls
Section 198
//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 = "3.0.0.0"; public static const BOTTOM:String = "bottom"; public static const RIGHT:String = "right"; } }//package mx.controls
Section 199
//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 = "3.0.0.0"; public static const UP:String = "up"; } }//package mx.controls
Section 200
//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 = "3.0.0.0"; public function HScrollBar(){ super.direction = ScrollBarDirection.HORIZONTAL; scaleX = -1; rotation = -90; } override mx_internal function get virtualHeight():Number{ return (unscaledWidth); } override protected function measure():void{ super.measure(); measuredWidth = _minHeight; measuredHeight = _minWidth; } override public function get minHeight():Number{ return (_minWidth); } override mx_internal function get virtualWidth():Number{ return (unscaledHeight); } override public function get minWidth():Number{ return (_minHeight); } 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 public function set direction(_arg1:String):void{ } } }//package mx.controls
Section 201
//IFlexContextMenu (mx.controls.IFlexContextMenu) package mx.controls { import flash.display.*; public interface IFlexContextMenu { function setContextMenu(_arg1:InteractiveObject):void; function unsetContextMenu(_arg1:InteractiveObject):void; } }//package mx.controls
Section 202
//ToolTip (mx.controls.ToolTip) package mx.controls { import mx.core.*; import flash.display.*; import mx.styles.*; import flash.text.*; public class ToolTip extends UIComponent implements IToolTip, IFontContextComponent { private var textChanged:Boolean; private var _text:String; protected var textField:IUITextField; mx_internal var border:IFlexDisplayObject; mx_internal static const VERSION:String = "3.0.0.0"; public static var maxWidth:Number = 300; public function ToolTip(){ mouseEnabled = false; } public function set fontContext(_arg1:IFlexModuleFactory):void{ this.moduleFactory = _arg1; } override public function styleChanged(_arg1:String):void{ super.styleChanged(_arg1); if ((((((_arg1 == "borderStyle")) || ((_arg1 == "styleName")))) || ((_arg1 == null)))){ invalidateDisplayList(); }; } override protected function commitProperties():void{ var _local1:int; var _local2:TextFormat; super.commitProperties(); if (((hasFontContextChanged()) && (!((textField == null))))){ _local1 = getChildIndex(DisplayObject(textField)); removeTextField(); createTextField(_local1); invalidateSize(); textChanged = true; }; if (textChanged){ _local2 = textField.getTextFormat(); _local2.leftMargin = 0; _local2.rightMargin = 0; textField.defaultTextFormat = _local2; textField.text = _text; textChanged = false; }; } mx_internal function getTextField():IUITextField{ return (textField); } 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)); }; createTextField(-1); } override protected function measure():void{ var _local7:Number; super.measure(); var _local1:EdgeMetrics = borderMetrics; var _local2:Number = (_local1.left + getStyle("paddingLeft")); var _local3:Number = (_local1.top + getStyle("paddingTop")); var _local4:Number = (_local1.right + getStyle("paddingRight")); var _local5:Number = (_local1.bottom + getStyle("paddingBottom")); var _local6:Number = (_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); } public function get fontContext():IFlexModuleFactory{ return (moduleFactory); } public function set text(_arg1:String):void{ _text = _arg1; textChanged = true; invalidateProperties(); invalidateSize(); invalidateDisplayList(); } public function get text():String{ return (_text); } mx_internal function removeTextField():void{ if (textField){ removeChild(DisplayObject(textField)); textField = null; }; } mx_internal function createTextField(_arg1:int):void{ if (!textField){ textField = IUITextField(createInFontContext(UITextField)); textField.autoSize = TextFieldAutoSize.LEFT; textField.mouseEnabled = false; textField.multiline = true; textField.selectable = false; textField.wordWrap = false; textField.styleName = this; if (_arg1 == -1){ addChild(DisplayObject(textField)); } else { addChildAt(DisplayObject(textField), _arg1); }; }; } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ super.updateDisplayList(_arg1, _arg2); var _local3:EdgeMetrics = borderMetrics; var _local4:Number = (_local3.left + getStyle("paddingLeft")); var _local5:Number = (_local3.top + getStyle("paddingTop")); var _local6:Number = (_local3.right + getStyle("paddingRight")); var _local7:Number = (_local3.bottom + getStyle("paddingBottom")); var _local8:Number = (_local4 + _local6); var _local9:Number = (_local5 + _local7); border.setActualSize(_arg1, _arg2); textField.move(_local4, _local5); textField.setActualSize((_arg1 - _local8), (_arg2 - _local9)); } private function get borderMetrics():EdgeMetrics{ if ((border is IRectangularBorder)){ return (IRectangularBorder(border).borderMetrics); }; return (EdgeMetrics.EMPTY); } } }//package mx.controls
Section 203
//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 = "3.0.0.0"; public function VScrollBar(){ super.direction = ScrollBarDirection.VERTICAL; } override protected function measure():void{ super.measure(); measuredWidth = _minWidth; measuredHeight = _minHeight; } override public function get minHeight():Number{ return (_minHeight); } 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 public function get minWidth():Number{ return (_minWidth); } override public function set direction(_arg1:String):void{ } } }//package mx.controls
Section 204
//Application (mx.core.Application) package mx.core { import mx.events.*; import flash.events.*; import flash.display.*; import mx.managers.*; import mx.styles.*; import mx.effects.*; import mx.containers.utilityClasses.*; import flash.ui.*; import flash.utils.*; import flash.system.*; import flash.external.*; import flash.net.*; public class Application extends LayoutContainer { public var preloader:Object; public var pageTitle:String; private var resizeWidth:Boolean;// = true private var _applicationViewMetrics:EdgeMetrics; mx_internal var _parameters:Object; private var processingCreationQueue:Boolean;// = false public var scriptRecursionLimit:int; private var resizeHandlerAdded:Boolean;// = false private var preloadObj:Object; public var usePreloader:Boolean; mx_internal var _url:String; private var _viewSourceURL:String; public var resetHistory:Boolean;// = true public var historyManagementEnabled:Boolean;// = true public var scriptTimeLimit:Number; public var frameRate:Number; private var creationQueue:Array; private var resizeHeight:Boolean;// = true public var controlBar:IUIComponent; private var viewSourceCMI:ContextMenuItem; mx_internal static const VERSION:String = "3.0.0.0"; mx_internal static var useProgressiveLayout:Boolean = false; public function Application(){ creationQueue = []; name = "application"; UIComponentGlobals.layoutManager = ILayoutManager(Singleton.getInstance("mx.managers::ILayoutManager")); UIComponentGlobals.layoutManager.usePhasedInstantiation = true; if (!ApplicationGlobals.application){ ApplicationGlobals.application = this; }; super(); layoutObject = new ApplicationLayout(); layoutObject.target = this; boxLayoutClass = ApplicationLayout; showInAutomationHierarchy = true; } public function set viewSourceURL(_arg1:String):void{ _viewSourceURL = _arg1; } override public function set percentWidth(_arg1:Number):void{ super.percentWidth = _arg1; invalidateDisplayList(); } override public function prepareToPrint(_arg1:IFlexDisplayObject):Object{ var _local2:Object = {}; 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); } override protected function measure():void{ var _local2:Number; super.measure(); var _local1:EdgeMetrics = borderMetrics; if (((controlBar) && (controlBar.includeInLayout))){ _local2 = ((controlBar.getExplicitOrMeasuredWidth() + _local1.left) + _local1.right); measuredWidth = Math.max(measuredWidth, _local2); measuredMinWidth = Math.max(measuredMinWidth, _local2); }; } override public function getChildIndex(_arg1:DisplayObject):int{ if (((controlBar) && ((_arg1 == controlBar)))){ return (-1); }; return (super.getChildIndex(_arg1)); } 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(); } private function initManagers(_arg1:ISystemManager):void{ if (_arg1.isTopLevel()){ focusManager = new FocusManager(this); _arg1.activate(this); }; } override public function initialize():void{ var _local2:Object; var _local1:ISystemManager = 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); }; } override public function set percentHeight(_arg1:Number):void{ super.percentHeight = _arg1; invalidateDisplayList(); } override public function get id():String{ if (((((!(super.id)) && ((this == Application.application)))) && (ExternalInterface.available))){ return (ExternalInterface.objectID); }; return (super.id); } override mx_internal function setUnscaledWidth(_arg1:Number):void{ invalidateProperties(); super.setUnscaledWidth(_arg1); } private function debugTickler():void{ var _local1:int; } private function doNextQueueItem(_arg1:FlexEvent=null):void{ processingCreationQueue = true; Application.useProgressiveLayout = true; callLater(processNextQueueItem); } private function initContextMenu():void{ var _local2:String; if (flexContextMenu != null){ if ((systemManager is InteractiveObject)){ InteractiveObject(systemManager).contextMenu = contextMenu; }; return; }; var _local1:ContextMenu = new ContextMenu(); _local1.hideBuiltInItems(); _local1.builtInItems.print = true; if (_viewSourceURL){ _local2 = resourceManager.getString("core", "viewSource"); viewSourceCMI = new ContextMenuItem(_local2, true); viewSourceCMI.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, menuItemSelectHandler); _local1.customItems.push(viewSourceCMI); }; contextMenu = _local1; if ((systemManager is InteractiveObject)){ InteractiveObject(systemManager).contextMenu = _local1; }; } private function addedHandler(_arg1:Event):void{ if ((((_arg1.target == this)) && ((creationQueue.length > 0)))){ doNextQueueItem(); }; } public function get viewSourceURL():String{ return (_viewSourceURL); } override mx_internal function get usePadding():Boolean{ return (!((layout == ContainerLayout.ABSOLUTE))); } override mx_internal function setUnscaledHeight(_arg1:Number):void{ invalidateProperties(); super.setUnscaledHeight(_arg1); } 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 public function styleChanged(_arg1:String):void{ super.styleChanged(_arg1); if ((((_arg1 == "backgroundColor")) && ((getStyle("backgroundImage") == getStyle("defaultBackgroundImage"))))){ clearStyle("backgroundImage"); }; } override protected function layoutChrome(_arg1:Number, _arg2:Number):void{ super.layoutChrome(_arg1, _arg2); if (!doingLayout){ createBorder(); }; var _local3:EdgeMetrics = borderMetrics; var _local4:Number = getStyle("borderThickness"); var _local5:EdgeMetrics = 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); }; } protected function menuItemSelectHandler(_arg1:Event):void{ navigateToURL(new URLRequest(_viewSourceURL), "_blank"); } private function printCreationQueue():void{ var _local4:Object; var _local1 = ""; var _local2:Number = creationQueue.length; var _local3:int; while (_local3 < _local2) { _local4 = creationQueue[_local3]; _local1 = (_local1 + (((((" [" + _local3) + "] ") + _local4.id) + " ") + _local4.index)); _local3++; }; } override protected function resourcesChanged():void{ super.resourcesChanged(); if (viewSourceCMI){ viewSourceCMI.caption = resourceManager.getString("core", "viewSource"); }; } override protected function commitProperties():void{ super.commitProperties(); 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; }; }; } override public function set toolTip(_arg1:String):void{ } public function addToCreationQueue(_arg1:Object, _arg2:int=-1, _arg3:Function=null, _arg4:IFlexDisplayObject=null):void{ var _local8:int; var _local9:int; var _local10:int; var _local12:int; var _local5:int = creationQueue.length; var _local6:Object = {}; var _local7:Boolean; _local6.id = _arg1; _local6.parent = _arg4; _local6.callbackFunc = _arg3; _local6.index = _arg2; var _local11:int; 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 mx_internal function initThemeColor():Boolean{ var _local2:Object; var _local3:Number; var _local4:Number; var _local5:CSSStyleDeclaration; var _local1:Boolean = 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); } 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); } 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; }; }; } override public function set label(_arg1:String):void{ } public function get parameters():Object{ return (_parameters); } override public function get viewMetrics():EdgeMetrics{ if (!_applicationViewMetrics){ _applicationViewMetrics = new EdgeMetrics(); }; var _local1:EdgeMetrics = _applicationViewMetrics; var _local2:EdgeMetrics = super.viewMetrics; var _local3:Number = 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); } public function get url():String{ return (_url); } override public function set icon(_arg1:Class):void{ } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ super.updateDisplayList(_arg1, _arg2); createBorder(); } 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 set tabIndex(_arg1:int):void{ } public static function get application():Object{ return (ApplicationGlobals.application); } } }//package mx.core
Section 205
//ApplicationGlobals (mx.core.ApplicationGlobals) package mx.core { public class ApplicationGlobals { public static var application:Object; } }//package mx.core
Section 206
//ByteArrayAsset (mx.core.ByteArrayAsset) package mx.core { import flash.utils.*; public class ByteArrayAsset extends ByteArray implements IFlexAsset { mx_internal static const VERSION:String = "3.0.0.0"; } }//package mx.core
Section 207
//ComponentDescriptor (mx.core.ComponentDescriptor) package mx.core { public class ComponentDescriptor { public var events:Object; public var type:Class; public var document:Object; private var _properties:Object; public var propertiesFactory:Function; public var id:String; mx_internal static const VERSION:String = "3.0.0.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 208
//Container (mx.core.Container) package mx.core { import mx.events.*; import flash.events.*; import flash.display.*; import mx.managers.*; import flash.geom.*; import mx.styles.*; import mx.controls.*; import flash.text.*; import mx.graphics.*; import mx.controls.scrollClasses.*; import mx.binding.*; import mx.controls.listClasses.*; import flash.ui.*; import flash.utils.*; public class Container extends UIComponent implements IContainer, IDataRenderer, IFocusManagerContainer, IListItemRenderer, IRawChildrenContainer { private var forceLayout:Boolean;// = false private var _numChildrenCreated:int;// = -1 private var _horizontalLineScrollSize:Number;// = 5 mx_internal var border:IFlexDisplayObject; protected var actualCreationPolicy:String; private var _viewMetricsAndPadding:EdgeMetrics; private var _creatingContentPane:Boolean;// = false private var _childRepeaters:Array; private var scrollableWidth:Number;// = 0 private var _childDescriptors:Array; private var _rawChildren:ContainerRawChildrenList; private var _data:Object; private var _verticalPageScrollSize:Number;// = 0 private var _viewMetrics:EdgeMetrics; private var _verticalScrollBar:ScrollBar; private var scrollPropertiesChanged:Boolean;// = false private var changedStyles:String;// = null private var scrollPositionChanged:Boolean;// = true private var _defaultButton:IFlexDisplayObject; private var mouseEventReferenceCount:int;// = 0 private var _focusPane:Sprite; protected var whiteBox:Shape; private var _forceClippingCount:int; private var _horizontalPageScrollSize:Number;// = 0 private var _creationPolicy:String; private var _creationIndex:int;// = -1 private var _clipContent:Boolean;// = true private var _verticalScrollPosition:Number;// = 0 private var _autoLayout:Boolean;// = true private var _icon:Class;// = null mx_internal var doingLayout:Boolean;// = false private var _horizontalScrollBar:ScrollBar; private var numChildrenBefore:int; private var viewableHeight:Number;// = 0 private var viewableWidth:Number;// = 0 mx_internal var contentPane:Sprite;// = null private var _createdComponents:Array; private var _firstChildIndex:int;// = 0 private var scrollableHeight:Number;// = 0 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; mx_internal var _numChildren:int;// = 0 private var recursionFlag:Boolean;// = true private var _label:String;// = "" mx_internal var blocker:Sprite; mx_internal static const VERSION:String = "3.0.0.0"; private static const MULTIPLE_PROPERTIES:String = "<MULTIPLE>"; public function Container(){ tabChildren = true; tabEnabled = false; showInAutomationHierarchy = false; } public function set verticalScrollPolicy(_arg1:String):void{ if (_verticalScrollPolicy != _arg1){ _verticalScrollPolicy = _arg1; invalidateDisplayList(); dispatchEvent(new Event("verticalScrollPolicyChanged")); }; } 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 initializationComplete():void{ } mx_internal function rawChildren_getObjectsUnderPoint(_arg1:Point):Array{ return (super.getObjectsUnderPoint(_arg1)); } public function set creatingContentPane(_arg1:Boolean):void{ _creatingContentPane = _arg1; } public function set clipContent(_arg1:Boolean):void{ if (_clipContent != _arg1){ _clipContent = _arg1; invalidateDisplayList(); }; } protected function scrollChildren():void{ if (!contentPane){ return; }; var _local1:EdgeMetrics = viewMetrics; var _local2:Number = 0; var _local3:Number = 0; var _local4:Number = ((unscaledWidth - _local1.left) - _local1.right); var _local5:Number = ((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; }; var _local6:Rectangle = 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 IRectangularBorder)))) && (IRectangularBorder(border).hasBackgroundImage))){ IRectangularBorder(border).layoutBackgroundImage(); }; } 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 notifyStyleChangeInChildren(_arg1:String, _arg2:Boolean):void{ var _local5:ISimpleStyleClient; var _local3:int = super.numChildren; var _local4:int; 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(); }; } mx_internal function get createdComponents():Array{ return (_createdComponents); } public function get childDescriptors():Array{ return (_childDescriptors); } override public function get contentMouseY():Number{ if (contentPane){ return (contentPane.mouseY); }; return (super.contentMouseY); } mx_internal function get childRepeaters():Array{ return (_childRepeaters); } override public function contains(_arg1:DisplayObject):Boolean{ if (contentPane){ return (contentPane.contains(_arg1)); }; return (super.contains(_arg1)); } override public function get contentMouseX():Number{ if (contentPane){ return (contentPane.mouseX); }; return (super.contentMouseX); } mx_internal function set createdComponents(_arg1:Array):void{ _createdComponents = _arg1; } public function get horizontalScrollBar():ScrollBar{ return (_horizontalScrollBar); } 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); }; } public function get rawChildren():IChildList{ if (!_rawChildren){ _rawChildren = new ContainerRawChildrenList(this); }; return (_rawChildren); } override public function getChildAt(_arg1:int):DisplayObject{ if (contentPane){ return (contentPane.getChildAt(_arg1)); }; return (super.getChildAt((_firstChildIndex + _arg1))); } override protected function attachOverlay():void{ rawChildren_addChild(overlay); } 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 public function localToContent(_arg1:Point):Point{ if (!contentPane){ return (_arg1); }; _arg1 = localToGlobal(_arg1); return (globalToContent(_arg1)); } public function executeChildBindings(_arg1:Boolean):void{ var _local4:IUIComponent; var _local2:int = numChildren; var _local3:int; while (_local3 < _local2) { _local4 = IUIComponent(getChildAt(_local3)); if ((_local4 is IDeferredInstantiationUIComponent)){ IDeferredInstantiationUIComponent(_local4).executeBindings(_arg1); }; _local3++; }; } protected function createBorder():void{ var _local1:Class; if (((!(border)) && (isBorderNeeded()))){ _local1 = getStyle("borderSkin"); if (_local1 != null){ 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 get verticalScrollPosition():Number{ if (!isNaN(verticalScrollPositionPending)){ return (verticalScrollPositionPending); }; return (_verticalScrollPosition); } public function get horizontalScrollPosition():Number{ if (!isNaN(horizontalScrollPositionPending)){ return (horizontalScrollPositionPending); }; return (_horizontalScrollPosition); } protected function layoutChrome(_arg1:Number, _arg2:Number):void{ if (border){ updateBackgroundImageRect(); border.move(0, 0); border.setActualSize(_arg1, _arg2); }; } mx_internal function set childRepeaters(_arg1:Array):void{ _childRepeaters = _arg1; } override public function get focusPane():Sprite{ return (_focusPane); } public function set creationIndex(_arg1:int):void{ _creationIndex = _arg1; } public function get viewMetrics():EdgeMetrics{ var _local1:EdgeMetrics = borderMetrics; var _local2:Boolean = ((!((verticalScrollBar == null))) && (((doingLayout) || ((verticalScrollPolicy == ScrollPolicy.ON))))); var _local3:Boolean = ((!((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 verticalScrollBar(_arg1:ScrollBar):void{ _verticalScrollBar = _arg1; } 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 createOrDestroyScrollbars(_arg1:Boolean, _arg2:Boolean, _arg3:Boolean):Boolean{ var _local5:IFocusManager; var _local6:String; var _local7:String; var _local8:Graphics; var _local4:Boolean; 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 _local3:String; var _local4:Number; var _local2:Object = 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; }; }; } public function get icon():Class{ return (_icon); } 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; }; }; }; } 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 createComponentFromDescriptor(_arg1:ComponentDescriptor, _arg2:Boolean):IFlexDisplayObject{ var _local7:String; var _local10:IRepeaterClient; var _local11:IStyleClient; var _local12:String; var _local13:String; var _local3:UIComponentDescriptor = UIComponentDescriptor(_arg1); var _local4:Object = _local3.properties; if (((((((!((numChildrenBefore == 0))) || (!((numChildrenCreated == -1))))) && ((_local3.instanceIndices == null)))) && (hasChildMatchingDescriptor(_local3)))){ return (null); }; UIComponentGlobals.layoutManager.usePhasedInstantiation = true; var _local5:Class = _local3.type; var _local6:IDeferredInstantiationUIComponent = 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; }; }; var _local8:Object = _local3.events; if (_local8){ for (_local12 in _local8) { _local13 = _local8[_local12]; _local6.addEventListener(_local12, _local3.document[_local13]); }; }; var _local9:Array = _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); } override public function set enabled(_arg1:Boolean):void{ super.enabled = _arg1; if (horizontalScrollBar){ horizontalScrollBar.enabled = _arg1; }; if (verticalScrollBar){ verticalScrollBar.enabled = _arg1; }; invalidateProperties(); } public function set horizontalScrollBar(_arg1:ScrollBar):void{ _horizontalScrollBar = _arg1; } mx_internal function get usePadding():Boolean{ return (true); } override public function get baselinePosition():Number{ var _local2:IUIComponent; if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){ if ((((getStyle("verticalAlign") == "top")) && ((numChildren > 0)))){ _local2 = (getChildAt(0) as IUIComponent); if (_local2){ return ((_local2.y + _local2.baselinePosition)); }; }; return (super.baselinePosition); }; if (!validateBaselinePosition()){ return (NaN); }; var _local1:TextLineMetrics = measureText("Wj"); if (height < (((2 * viewMetrics.top) + 4) + _local1.ascent)){ return (int((height + ((_local1.ascent - height) / 2)))); }; return (((viewMetrics.top + 2) + _local1.ascent)); } 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); } public function get verticalLineScrollSize():Number{ return (_verticalLineScrollSize); } public function get horizontalScrollPolicy():String{ return (_horizontalScrollPolicy); } override public function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{ var _local3:DisplayObjectContainer = _arg1.parent; if (((_local3) && (!((_local3 is Loader))))){ _local3.removeChild(_arg1); }; addingChild(_arg1); if (contentPane){ contentPane.addChildAt(_arg1, _arg2); } else { $addChildAt(_arg1, (_firstChildIndex + _arg2)); }; childAdded(_arg1); if ((((_arg1 is UIComponent)) && (UIComponent(_arg1).isDocument))){ BindingManager.setEnabled(_arg1, true); }; return (_arg1); } public function get maxVerticalScrollPosition():Number{ return ((verticalScrollBar) ? verticalScrollBar.maxScrollPosition : Math.max((scrollableHeight - viewableHeight), 0)); } public function set horizontalScrollPosition(_arg1:Number):void{ if (_horizontalScrollPosition == _arg1){ return; }; _horizontalScrollPosition = _arg1; scrollPositionChanged = true; if (!initialized){ horizontalScrollPositionPending = _arg1; }; invalidateDisplayList(); dispatchEvent(new Event("viewChanged")); } mx_internal function invalidateViewMetricsAndPadding():void{ _viewMetricsAndPadding = null; } public function get horizontalLineScrollSize():Number{ return (_horizontalLineScrollSize); } override public function set focusPane(_arg1:Sprite):void{ var _local2:Boolean = invalidateSizeFlag; var _local3:Boolean = 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; } private function updateBackgroundImageRect():void{ var _local1:IRectangularBorder = (border as IRectangularBorder); if (!_local1){ return; }; if ((((viewableWidth == 0)) && ((viewableHeight == 0)))){ _local1.backgroundImageBounds = null; return; }; var _local2:EdgeMetrics = viewMetrics; var _local3:Number = (viewableWidth) ? viewableWidth : ((unscaledWidth - _local2.left) - _local2.right); var _local4:Number = (viewableHeight) ? viewableHeight : ((unscaledHeight - _local2.top) - _local2.bottom); if (getStyle("backgroundAttachment") == "fixed"){ _local1.backgroundImageBounds = new Rectangle(_local2.left, _local2.top, _local3, _local4); } else { _local1.backgroundImageBounds = new Rectangle(_local2.left, _local2.top, Math.max(scrollableWidth, _local3), Math.max(scrollableHeight, _local4)); }; } private function blocker_clickHandler(_arg1:Event):void{ _arg1.stopPropagation(); } 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); }; } public function get defaultButton():IFlexDisplayObject{ return (_defaultButton); } mx_internal function createContentPane():void{ var _local3:int; var _local5:IUIComponent; if (contentPane){ return; }; creatingContentPane = true; var _local1:int = numChildren; var _local2:Sprite = new FlexSprite(); _local2.name = "contentPane"; _local2.tabChildren = true; if (border){ _local3 = (rawChildren.getChildIndex(DisplayObject(border)) + 1); if ((((border is IRectangularBorder)) && (IRectangularBorder(border).hasBackgroundImage))){ _local3++; }; } else { _local3 = 0; }; rawChildren.addChildAt(_local2, _local3); var _local4:int; 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 set verticalPageScrollSize(_arg1:Number):void{ scrollPropertiesChanged = true; _verticalPageScrollSize = _arg1; invalidateDisplayList(); dispatchEvent(new Event("verticalPageScrollSizeChanged")); } mx_internal function setDocumentDescriptor(_arg1:UIComponentDescriptor):void{ var _local2:String; if (processedDescriptors){ return; }; if (((_documentDescriptor) && (_documentDescriptor.properties.childDescriptors))){ if (_arg1.properties.childDescriptors){ _local2 = resourceManager.getString("core", "multipleChildSets_ClassAndSubclass"); throw (new Error(_local2)); }; } else { _documentDescriptor = _arg1; _documentDescriptor.document = this; }; } 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); }; } public function get creationPolicy():String{ return (_creationPolicy); } public function set icon(_arg1:Class):void{ _icon = _arg1; dispatchEvent(new Event("iconChanged")); } private function dispatchScrollEvent(_arg1:String, _arg2:Number, _arg3:Number, _arg4:String):void{ var _local5:ScrollEvent = 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); } public function get verticalScrollPolicy():String{ return (_verticalScrollPolicy); } public function get borderMetrics():EdgeMetrics{ return ((((border) && ((border is IRectangularBorder)))) ? IRectangularBorder(border).borderMetrics : EdgeMetrics.EMPTY); } 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{ var _local2:int; var _local3:int; if ((((_arg1 is IDeferredInstantiationUIComponent)) && (IDeferredInstantiationUIComponent(_arg1).descriptor))){ if (createdComponents){ _local2 = createdComponents.length; _local3 = 0; while (_local3 < _local2) { if (createdComponents[_local3] === _arg1){ createdComponents.splice(_local3, 1); }; _local3++; }; }; }; removingChild(_arg1); if ((((_arg1 is UIComponent)) && (UIComponent(_arg1).isDocument))){ BindingManager.setEnabled(_arg1, false); }; if (contentPane){ contentPane.removeChild(_arg1); } else { $removeChild(_arg1); }; childRemoved(_arg1); return (_arg1); } final mx_internal function get $numChildren():int{ return (super.numChildren); } mx_internal function get numRepeaters():int{ return ((childRepeaters) ? childRepeaters.length : 0); } mx_internal function set numChildrenCreated(_arg1:int):void{ _numChildrenCreated = _arg1; } public function get creatingContentPane():Boolean{ return (_creatingContentPane); } public function get clipContent():Boolean{ return (_clipContent); } mx_internal function rawChildren_getChildIndex(_arg1:DisplayObject):int{ return (super.getChildIndex(_arg1)); } 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 IUITextField)) && (IUITextField(_local4).inheritingStyles))){ StyleProtoChain.initTextField(IUITextField(_local4)); }; }; _local3++; }; }; } override public function getChildIndex(_arg1:DisplayObject):int{ var _local2:int; if (contentPane){ return (contentPane.getChildIndex(_arg1)); }; _local2 = (super.getChildIndex(_arg1) - _firstChildIndex); return (_local2); } mx_internal function rawChildren_contains(_arg1:DisplayObject):Boolean{ return (super.contains(_arg1)); } mx_internal function getScrollableRect():Rectangle{ var _local9:DisplayObject; var _local1:Number = 0; var _local2:Number = 0; var _local3:Number = 0; var _local4:Number = 0; var _local5:int = numChildren; var _local6:int; 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++; }; var _local7:EdgeMetrics = viewMetrics; var _local8:Rectangle = 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); } 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(FlexEvent.UPDATE_COMPLETE, layoutCompleteHandler, false, 0, true); } override public function executeBindings(_arg1:Boolean=false):void{ var _local2:Object = (((descriptor) && (descriptor.document))) ? descriptor.document : parentDocument; BindingManager.executeBindings(_local2, id, this); if (_arg1){ executeChildBindings(_arg1); }; } override public function setChildIndex(_arg1:DisplayObject, _arg2:int):void{ var _local3:int; var _local4:int = _local3; var _local5:int = _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); }; var _local6:IndexChangedEvent = new IndexChangedEvent(IndexChangedEvent.CHILD_INDEX_CHANGE); _local6.relatedObject = _arg1; _local6.oldIndex = _local4; _local6.newIndex = _local5; dispatchEvent(_local6); dispatchEvent(new Event("childrenChanged")); } override public function globalToContent(_arg1:Point):Point{ if (contentPane){ return (contentPane.globalToLocal(_arg1)); }; return (globalToLocal(_arg1)); } mx_internal function rawChildren_removeChild(_arg1:DisplayObject):DisplayObject{ var _local2:int = rawChildren_getChildIndex(_arg1); return (rawChildren_removeChildAt(_local2)); } mx_internal function rawChildren_setChildIndex(_arg1:DisplayObject, _arg2:int):void{ var _local3:int = super.getChildIndex(_arg1); super.setChildIndex(_arg1, _arg2); if ((((_local3 < _firstChildIndex)) && ((_arg2 >= _firstChildIndex)))){ _firstChildIndex--; } else { if ((((_local3 >= _firstChildIndex)) && ((_arg2 <= _firstChildIndex)))){ _firstChildIndex++; }; }; dispatchEvent(new Event("childrenChanged")); } public function set verticalLineScrollSize(_arg1:Number):void{ scrollPropertiesChanged = true; _verticalLineScrollSize = _arg1; invalidateDisplayList(); dispatchEvent(new Event("verticalLineScrollSizeChanged")); } mx_internal function rawChildren_getChildAt(_arg1:int):DisplayObject{ return (super.getChildAt(_arg1)); } public function get creationIndex():int{ return (_creationIndex); } public function get verticalScrollBar():ScrollBar{ return (_verticalScrollBar); } public function get viewMetricsAndPadding():EdgeMetrics{ if (((((_viewMetricsAndPadding) && (((!(horizontalScrollBar)) || ((horizontalScrollPolicy == ScrollPolicy.ON)))))) && (((!(verticalScrollBar)) || ((verticalScrollPolicy == ScrollPolicy.ON)))))){ return (_viewMetricsAndPadding); }; if (!_viewMetricsAndPadding){ _viewMetricsAndPadding = new EdgeMetrics(); }; var _local1:EdgeMetrics = _viewMetricsAndPadding; var _local2:EdgeMetrics = 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); } override public function addChild(_arg1:DisplayObject):DisplayObject{ return (addChildAt(_arg1, numChildren)); } public function set horizontalPageScrollSize(_arg1:Number):void{ scrollPropertiesChanged = true; _horizontalPageScrollSize = _arg1; invalidateDisplayList(); dispatchEvent(new Event("horizontalPageScrollSizeChanged")); } override mx_internal function childAdded(_arg1:DisplayObject):void{ dispatchEvent(new Event("childrenChanged")); var _local2:ChildExistenceChangedEvent = 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")); }; } private function layoutCompleteHandler(_arg1:FlexEvent):void{ UIComponentGlobals.layoutManager.removeEventListener(FlexEvent.UPDATE_COMPLETE, layoutCompleteHandler); forceLayout = false; var _local2:Boolean; 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(); }; } public function createComponentsFromDescriptors(_arg1:Boolean=true):void{ var _local4:IFlexDisplayObject; numChildrenBefore = numChildren; createdComponents = []; var _local2:int = (childDescriptors) ? childDescriptors.length : 0; var _local3:int; 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 mx_internal function fillOverlay(_arg1:UIComponent, _arg2:uint, _arg3:RoundedRectangle=null):void{ var _local4:EdgeMetrics = viewMetrics; var _local5:Number = 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; }; var _local6:Graphics = _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(); } 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); }; }; } mx_internal function rawChildren_removeChildAt(_arg1:int):DisplayObject{ var _local2:DisplayObject = 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 set data(_arg1:Object):void{ _data = _arg1; dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE)); invalidateDisplayList(); } override public function removeChildAt(_arg1:int):DisplayObject{ return (removeChild(getChildAt(_arg1))); } private function isBorderNeeded():Boolean{ var c:Class = getStyle("borderSkin"); try { if (c != getDefinitionByName("mx.skins.halo::HaloBorder")){ return (true); }; } catch(e:Error) { return (true); }; var v:Object = getStyle("borderStyle"); if (v){ if (((!((v == "none"))) || ((((v == "none")) && (getStyle("mouseShield")))))){ return (true); }; }; v = getStyle("backgroundColor"); if (((!((v === null))) && (!((v === ""))))){ return (true); }; v = getStyle("backgroundImage"); return (((!((v == null))) && (!((v == ""))))); } 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(); }; }; } public function get verticalPageScrollSize():Number{ return (_verticalPageScrollSize); } public function getChildren():Array{ var _local1:Array = []; var _local2:int = numChildren; var _local3:int; while (_local3 < _local2) { _local1.push(getChildAt(_local3)); _local3++; }; return (_local1); } private function createScrollbarsIfNeeded(_arg1:Rectangle):Boolean{ var _local2:Number = _arg1.right; var _local3:Number = _arg1.bottom; var _local4:Number = unscaledWidth; var _local5:Number = unscaledHeight; var _local6:Boolean = (((_arg1.left < 0)) || ((_arg1.top < 0))); var _local7:EdgeMetrics = 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)); var _local8 = (horizontalScrollPolicy == ScrollPolicy.ON); var _local9 = (verticalScrollPolicy == ScrollPolicy.ON); var _local10:Boolean = ((((((((((_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; }; }; var _local11:Boolean = createOrDestroyScrollbars(_local8, _local9, _local10); if (((((!((scrollableWidth == _local2))) || (!((viewableWidth == _local4))))) || (_local11))){ if (horizontalScrollBar){ horizontalScrollBar.setScrollProperties(_local4, 0, (_local2 - _local4), horizontalPageScrollSize); scrollPositionChanged = true; }; viewableWidth = _local4; scrollableWidth = _local2; }; if (((((!((scrollableHeight == _local3))) || (!((viewableHeight == _local5))))) || (_local11))){ if (verticalScrollBar){ verticalScrollBar.setScrollProperties(_local5, 0, (_local3 - _local5), verticalPageScrollSize); scrollPositionChanged = true; }; viewableHeight = _local5; scrollableHeight = _local3; }; return (_local11); } override mx_internal function removingChild(_arg1:DisplayObject):void{ super.removingChild(_arg1); _arg1.dispatchEvent(new FlexEvent(FlexEvent.REMOVE)); var _local2:ChildExistenceChangedEvent = new ChildExistenceChangedEvent(ChildExistenceChangedEvent.CHILD_REMOVE); _local2.relatedObject = _arg1; dispatchEvent(_local2); } mx_internal function get numChildrenCreated():int{ return (_numChildrenCreated); } 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); } private function hasChildMatchingDescriptor(_arg1:UIComponentDescriptor):Boolean{ var _local4:int; var _local5:IUIComponent; var _local2:String = _arg1.id; if (((!((_local2 == null))) && ((document[_local2] == null)))){ return (false); }; var _local3:int = 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); } mx_internal function rawChildren_getChildByName(_arg1:String):DisplayObject{ return (super.getChildByName(_arg1)); } 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 (clampScrollPositions()){ scrollChildren(); }; 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 === null)) || (isNaN(Number(_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 initialize():void{ var _local1:*; var _local2:String; if (((((isDocument) && (documentDescriptor))) && (!(processedDescriptors)))){ _local1 = documentDescriptor.properties; if (((_local1) && (_local1.childDescriptors))){ if (_childDescriptors){ _local2 = resourceManager.getString("core", "multipleChildSets_ClassAndInstance"); throw (new Error(_local2)); }; _childDescriptors = _local1.childDescriptors; }; }; super.initialize(); } mx_internal function set forceClipping(_arg1:Boolean):void{ if (_clipContent){ if (_arg1){ _forceClippingCount++; } else { _forceClippingCount--; }; createContentPane(); scrollChildren(); }; } public function removeAllChildren():void{ while (numChildren > 0) { removeChildAt(0); }; } override public function contentToGlobal(_arg1:Point):Point{ if (contentPane){ return (contentPane.localToGlobal(_arg1)); }; return (localToGlobal(_arg1)); } public function get horizontalPageScrollSize():Number{ return (_horizontalPageScrollSize); } 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(FlexEvent.UPDATE_COMPLETE, layoutCompleteHandler, false, 0, true); }; dispatchEvent(new Event("childrenChanged")); } public function set defaultButton(_arg1:IFlexDisplayObject):void{ _defaultButton = _arg1; ContainerGlobals.focusedContainer = null; } public function get data():Object{ return (_data); } override public function get numChildren():int{ return ((contentPane) ? contentPane.numChildren : _numChildren); } public function get autoLayout():Boolean{ return (_autoLayout); } override public function styleChanged(_arg1:String):void{ var _local3:String; var _local4:String; var _local2:Boolean = (((_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; }; }; } 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 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 label(_arg1:String):void{ _label = _arg1; dispatchEvent(new Event("labelChanged")); } private function clampScrollPositions():Boolean{ var _local1:Boolean; if (_horizontalScrollPosition < 0){ _horizontalScrollPosition = 0; _local1 = true; } else { if (_horizontalScrollPosition > maxHorizontalScrollPosition){ _horizontalScrollPosition = maxHorizontalScrollPosition; _local1 = true; }; }; if (((horizontalScrollBar) && (!((horizontalScrollBar.scrollPosition == _horizontalScrollPosition))))){ horizontalScrollBar.scrollPosition = _horizontalScrollPosition; }; if (_verticalScrollPosition < 0){ _verticalScrollPosition = 0; _local1 = true; } else { if (_verticalScrollPosition > maxVerticalScrollPosition){ _verticalScrollPosition = maxVerticalScrollPosition; _local1 = true; }; }; if (((verticalScrollBar) && (!((verticalScrollBar.scrollPosition == _verticalScrollPosition))))){ verticalScrollBar.scrollPosition = _verticalScrollPosition; }; return (_local1); } override public function prepareToPrint(_arg1:IFlexDisplayObject):Object{ var _local2:Rectangle = (((contentPane) && (contentPane.scrollRect))) ? contentPane.scrollRect : null; if (_local2){ contentPane.scrollRect = null; }; super.prepareToPrint(_arg1); return (_local2); } mx_internal function get firstChildIndex():int{ return (_firstChildIndex); } 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); } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ var _local3:Object; var _local4:Number; super.updateDisplayList(_arg1, _arg2); layoutChrome(_arg1, _arg2); if (scrollPositionChanged){ clampScrollPositions(); 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 === null)) || (isNaN(Number(_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)); }; } override mx_internal function addingChild(_arg1:DisplayObject):void{ var _local2:IUIComponent = IUIComponent(_arg1); super.addingChild(_arg1); invalidateSize(); invalidateDisplayList(); if (!contentPane){ if (_numChildren == 0){ _firstChildIndex = super.numChildren; }; _numChildren++; }; if (((contentPane) && (!(autoLayout)))){ forceLayout = true; UIComponentGlobals.layoutManager.addEventListener(FlexEvent.UPDATE_COMPLETE, layoutCompleteHandler, false, 0, true); }; } mx_internal function setActualCreationPolicies(_arg1:String):void{ var _local5:IFlexDisplayObject; var _local6:Container; actualCreationPolicy = _arg1; var _local2:String = _arg1; if (_arg1 == ContainerCreationPolicy.QUEUED){ _local2 = ContainerCreationPolicy.AUTO; }; var _local3:int = numChildren; var _local4:int; while (_local4 < _local3) { _local5 = IFlexDisplayObject(getChildAt(_local4)); if ((_local5 is Container)){ _local6 = Container(_local5); if (_local6.creationPolicy == null){ _local6.setActualCreationPolicies(_local2); }; }; _local4++; }; } } }//package mx.core
Section 209
//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 = "3.0.0.0"; public static const AUTO:String = "auto"; } }//package mx.core
Section 210
//ContainerGlobals (mx.core.ContainerGlobals) package mx.core { import flash.display.*; import mx.managers.*; public class ContainerGlobals { public static var focusedContainer:InteractiveObject; public static function checkFocus(_arg1:InteractiveObject, _arg2:InteractiveObject):void{ var _local6:IFocusManager; var _local7:IButton; var _local3:InteractiveObject = _arg2; var _local4:InteractiveObject = _arg2; var _local5:IUIComponent; 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 IContainer)))) && (IContainer(_local4).defaultButton))){ break; }; }; if (((!((ContainerGlobals.focusedContainer == _local4))) || ((((ContainerGlobals.focusedContainer == null)) && ((_local4 == null)))))){ if (!_local4){ _local4 = InteractiveObject(_local5); }; if (((_local4) && ((_local4 is IContainer)))){ _local6 = IContainer(_local4).focusManager; if (!_local6){ return; }; _local7 = (IContainer(_local4).defaultButton as IButton); if (_local7){ ContainerGlobals.focusedContainer = InteractiveObject(_local4); _local6.defaultButton = (_local7 as IButton); } else { ContainerGlobals.focusedContainer = InteractiveObject(_local4); _local6.defaultButton = null; }; }; }; } } }//package mx.core
Section 211
//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 = "3.0.0.0"; } }//package mx.core
Section 212
//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 = "3.0.0.0"; public function ContainerRawChildrenList(_arg1:Container){ this.owner = _arg1; } public function addChild(_arg1:DisplayObject):DisplayObject{ return (owner.mx_internal::rawChildren_addChild(_arg1)); } public function getChildIndex(_arg1:DisplayObject):int{ return (owner.mx_internal::rawChildren_getChildIndex(_arg1)); } public function setChildIndex(_arg1:DisplayObject, _arg2:int):void{ var _local3 = owner; _local3.mx_internal::rawChildren_setChildIndex(_arg1, _arg2); } 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 get numChildren():int{ return (owner.mx_internal::$numChildren); } 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 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)); } } }//package mx.core
Section 213
//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 = "3.0.0.0"; public function DragSource(){ dataHolder = {}; formatHandlers = {}; _formats = []; super(); } public function hasFormat(_arg1:String):Boolean{ var _local2:int = _formats.length; var _local3:int; while (_local3 < _local2) { if (_formats[_local3] == _arg1){ return (true); }; _local3++; }; return (false); } public function addData(_arg1:Object, _arg2:String):void{ _formats.push(_arg2); dataHolder[_arg2] = _arg1; } public function dataForFormat(_arg1:String):Object{ var _local2:Object = 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 get formats():Array{ return (_formats); } } }//package mx.core
Section 214
//EdgeMetrics (mx.core.EdgeMetrics) package mx.core { public class EdgeMetrics { public var top:Number; public var left:Number; public var bottom:Number; public var right:Number; mx_internal static const VERSION:String = "3.0.0.0"; public static const EMPTY:EdgeMetrics = new EdgeMetrics(0, 0, 0, 0); ; public function EdgeMetrics(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0){ this.left = _arg1; this.top = _arg2; this.right = _arg3; this.bottom = _arg4; } public function clone():EdgeMetrics{ return (new EdgeMetrics(left, top, right, bottom)); } } }//package mx.core
Section 215
//EmbeddedFont (mx.core.EmbeddedFont) package mx.core { public class EmbeddedFont { private var _fontName:String; private var _fontStyle:String; mx_internal static const VERSION:String = "3.0.0.0"; public function EmbeddedFont(_arg1:String, _arg2:Boolean, _arg3:Boolean){ _fontName = _arg1; _fontStyle = EmbeddedFontRegistry.getFontStyle(_arg2, _arg3); } public function get fontStyle():String{ return (_fontStyle); } public function get fontName():String{ return (_fontName); } } }//package mx.core
Section 216
//EmbeddedFontRegistry (mx.core.EmbeddedFontRegistry) package mx.core { import flash.text.*; import flash.utils.*; public class EmbeddedFontRegistry implements IEmbeddedFontRegistry { mx_internal static const VERSION:String = "3.0.0.0"; private static var fonts:Object = {}; private static var instance:IEmbeddedFontRegistry; public function getAssociatedModuleFactory(_arg1:EmbeddedFont, _arg2:IFlexModuleFactory):IFlexModuleFactory{ var _local4:int; var _local5:Object; var _local3:Dictionary = fonts[createFontKey(_arg1)]; if (_local3){ _local4 = _local3[_arg2]; if (_local4){ return (_arg2); }; for (_local5 in _local3) { return ((_local5 as IFlexModuleFactory)); }; }; return (null); } public function deregisterFont(_arg1:EmbeddedFont, _arg2:IFlexModuleFactory):void{ var _local5:int; var _local6:Object; var _local3:String = createFontKey(_arg1); var _local4:Dictionary = fonts[_local3]; if (_local4 != null){ delete _local4[_arg2]; _local5 = 0; for (_local6 in _local4) { _local5++; }; if (_local5 == 0){ delete fonts[_local3]; }; }; } public function getFonts():Array{ var _local2:String; var _local1:Array = []; for (_local2 in fonts) { _local1.push(createEmbeddedFont(_local2)); }; return (_local1); } public function registerFont(_arg1:EmbeddedFont, _arg2:IFlexModuleFactory):void{ var _local3:String = createFontKey(_arg1); var _local4:Dictionary = fonts[_local3]; if (!_local4){ _local4 = new Dictionary(true); fonts[_local3] = _local4; }; _local4[_arg2] = 1; } public static function registerFonts(_arg1:Object, _arg2:IFlexModuleFactory):void{ var _local4:Object; var _local5:Object; var _local6:String; var _local7:Boolean; var _local8:Boolean; var _local3:IEmbeddedFontRegistry = IEmbeddedFontRegistry(Singleton.getInstance("mx.core::IEmbeddedFontRegistry")); for (_local4 in _arg1) { _local5 = _arg1[_local4]; for (_local6 in _local5) { if (_local5[_local6] == false){ } else { if (_local6 == "regular"){ _local7 = false; _local8 = false; } else { if (_local6 == "boldItalic"){ _local7 = true; _local8 = true; } else { if (_local6 == "bold"){ _local7 = true; _local8 = false; } else { if (_local6 == "italic"){ _local7 = false; _local8 = true; }; }; }; }; _local3.registerFont(new EmbeddedFont(String(_local4), _local7, _local8), _arg2); }; }; }; } public static function getInstance():IEmbeddedFontRegistry{ if (!instance){ instance = new (EmbeddedFontRegistry); }; return (instance); } public static function getFontStyle(_arg1:Boolean, _arg2:Boolean):String{ var _local3:String = FontStyle.REGULAR; if (((_arg1) && (_arg2))){ _local3 = FontStyle.BOLD_ITALIC; } else { if (_arg1){ _local3 = FontStyle.BOLD; } else { if (_arg2){ _local3 = FontStyle.ITALIC; }; }; }; return (_local3); } private static function createFontKey(_arg1:EmbeddedFont):String{ return ((_arg1.fontName + _arg1.fontStyle)); } private static function createEmbeddedFont(_arg1:String):EmbeddedFont{ var _local2:String; var _local3:Boolean; var _local4:Boolean; var _local5:int = endsWith(_arg1, FontStyle.REGULAR); if (_local5 > 0){ _local2 = _arg1.substring(0, _local5); return (new EmbeddedFont(_local2, false, false)); }; _local5 = endsWith(_arg1, FontStyle.BOLD); if (_local5 > 0){ _local2 = _arg1.substring(0, _local5); return (new EmbeddedFont(_local2, true, false)); }; _local5 = endsWith(_arg1, FontStyle.BOLD_ITALIC); if (_local5 > 0){ _local2 = _arg1.substring(0, _local5); return (new EmbeddedFont(_local2, true, true)); }; _local5 = endsWith(_arg1, FontStyle.ITALIC); if (_local5 > 0){ _local2 = _arg1.substring(0, _local5); return (new EmbeddedFont(_local2, false, true)); }; return (new EmbeddedFont("", false, false)); } private static function endsWith(_arg1:String, _arg2:String):int{ var _local3:int = _arg1.lastIndexOf(_arg2); if ((((_local3 > 0)) && (((_local3 + _arg2.length) == _arg1.length)))){ return (_local3); }; return (-1); } } }//package mx.core
Section 217
//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 = "3.0.0.0"; } }//package mx.core
Section 218
//FlexLoader (mx.core.FlexLoader) package mx.core { import flash.display.*; import mx.utils.*; public class FlexLoader extends Loader { mx_internal static const VERSION:String = "3.0.0.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 219
//FlexShape (mx.core.FlexShape) package mx.core { import flash.display.*; import mx.utils.*; public class FlexShape extends Shape { mx_internal static const VERSION:String = "3.0.0.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 220
//FlexSprite (mx.core.FlexSprite) package mx.core { import flash.display.*; import mx.utils.*; public class FlexSprite extends Sprite { mx_internal static const VERSION:String = "3.0.0.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 221
//FlexTextField (mx.core.FlexTextField) package mx.core { import flash.text.*; import mx.utils.*; public class FlexTextField extends TextField { mx_internal static const VERSION:String = "3.0.0.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 222
//FlexVersion (mx.core.FlexVersion) package mx.core { import mx.resources.*; public class FlexVersion { public static const VERSION_2_0_1:uint = 33554433; public static const CURRENT_VERSION:uint = 50331648; public static const VERSION_3_0:uint = 50331648; public static const VERSION_2_0:uint = 33554432; public static const VERSION_ALREADY_READ:String = "versionAlreadyRead"; public static const VERSION_ALREADY_SET:String = "versionAlreadySet"; mx_internal static const VERSION:String = "3.0.0.0"; private static var compatibilityVersionChanged:Boolean = false; private static var _compatibilityErrorFunction:Function; private static var _compatibilityVersion:uint = 50331648; private static var compatibilityVersionRead:Boolean = false; mx_internal static function changeCompatibilityVersionString(_arg1:String):void{ var _local2:Array = _arg1.split("."); var _local3:uint = parseInt(_local2[0]); var _local4:uint = parseInt(_local2[1]); var _local5:uint = parseInt(_local2[2]); _compatibilityVersion = (((_local3 << 24) + (_local4 << 16)) + _local5); } public static function set compatibilityVersion(_arg1:uint):void{ var _local2:String; if (_arg1 == _compatibilityVersion){ return; }; if (compatibilityVersionChanged){ if (compatibilityErrorFunction == null){ _local2 = ResourceManager.getInstance().getString("core", VERSION_ALREADY_SET); throw (new Error(_local2)); }; compatibilityErrorFunction(_arg1, VERSION_ALREADY_SET); }; if (compatibilityVersionRead){ if (compatibilityErrorFunction == null){ _local2 = ResourceManager.getInstance().getString("core", VERSION_ALREADY_READ); throw (new Error(_local2)); }; compatibilityErrorFunction(_arg1, VERSION_ALREADY_READ); }; _compatibilityVersion = _arg1; compatibilityVersionChanged = true; } public static function get compatibilityVersion():uint{ compatibilityVersionRead = true; return (_compatibilityVersion); } public static function set compatibilityErrorFunction(_arg1:Function):void{ _compatibilityErrorFunction = _arg1; } public static function set compatibilityVersionString(_arg1:String):void{ var _local2:Array = _arg1.split("."); var _local3:uint = parseInt(_local2[0]); var _local4:uint = parseInt(_local2[1]); var _local5:uint = parseInt(_local2[2]); compatibilityVersion = (((_local3 << 24) + (_local4 << 16)) + _local5); } public static function get compatibilityErrorFunction():Function{ return (_compatibilityErrorFunction); } public static function get compatibilityVersionString():String{ var _local1:uint = ((compatibilityVersion >> 24) & 0xFF); var _local2:uint = ((compatibilityVersion >> 16) & 0xFF); var _local3:uint = (compatibilityVersion & 0xFFFF); return (((((_local1.toString() + ".") + _local2.toString()) + ".") + _local3.toString())); } } }//package mx.core
Section 223
//IBorder (mx.core.IBorder) package mx.core { public interface IBorder { function get borderMetrics():EdgeMetrics; } }//package mx.core
Section 224
//IButton (mx.core.IButton) package mx.core { public interface IButton extends IUIComponent { function get emphasized():Boolean; function set emphasized(_arg1:Boolean):void; function callLater(_arg1:Function, _arg2:Array=null):void; } }//package mx.core
Section 225
//IChildList (mx.core.IChildList) package mx.core { import flash.display.*; import flash.geom.*; public interface IChildList { function get numChildren():int; function removeChild(_arg1:DisplayObject):DisplayObject; 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 setChildIndex(_arg1:DisplayObject, _arg2:int):void; function getChildAt(_arg1:int):DisplayObject; function addChild(_arg1:DisplayObject):DisplayObject; function contains(_arg1:DisplayObject):Boolean; } }//package mx.core
Section 226
//IConstraintClient (mx.core.IConstraintClient) package mx.core { public interface IConstraintClient { function setConstraintValue(_arg1:String, _arg2):void; function getConstraintValue(_arg1:String); } }//package mx.core
Section 227
//IContainer (mx.core.IContainer) package mx.core { import flash.display.*; import mx.managers.*; import flash.geom.*; import flash.text.*; import flash.media.*; public interface IContainer extends IUIComponent { function set hitArea(_arg1:Sprite):void; function swapChildrenAt(_arg1:int, _arg2:int):void; function getChildByName(_arg1:String):DisplayObject; function get doubleClickEnabled():Boolean; function get graphics():Graphics; function get useHandCursor():Boolean; function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject; function set mouseChildren(_arg1:Boolean):void; function set creatingContentPane(_arg1:Boolean):void; function get textSnapshot():TextSnapshot; function getChildIndex(_arg1:DisplayObject):int; function set doubleClickEnabled(_arg1:Boolean):void; function getObjectsUnderPoint(_arg1:Point):Array; function get creatingContentPane():Boolean; function setChildIndex(_arg1:DisplayObject, _arg2:int):void; function get soundTransform():SoundTransform; function set useHandCursor(_arg1:Boolean):void; function get numChildren():int; function contains(_arg1:DisplayObject):Boolean; function get verticalScrollPosition():Number; function set defaultButton(_arg1:IFlexDisplayObject):void; function swapChildren(_arg1:DisplayObject, _arg2:DisplayObject):void; function set horizontalScrollPosition(_arg1:Number):void; function get focusManager():IFocusManager; function startDrag(_arg1:Boolean=false, _arg2:Rectangle=null):void; function set mouseEnabled(_arg1:Boolean):void; function getChildAt(_arg1:int):DisplayObject; function set soundTransform(_arg1:SoundTransform):void; function get tabChildren():Boolean; function get tabIndex():int; function set focusRect(_arg1:Object):void; function get hitArea():Sprite; function get mouseChildren():Boolean; function removeChildAt(_arg1:int):DisplayObject; function get defaultButton():IFlexDisplayObject; function stopDrag():void; function set tabEnabled(_arg1:Boolean):void; function get horizontalScrollPosition():Number; function get focusRect():Object; function get viewMetrics():EdgeMetrics; function set verticalScrollPosition(_arg1:Number):void; function get dropTarget():DisplayObject; function get mouseEnabled():Boolean; function set tabChildren(_arg1:Boolean):void; function set buttonMode(_arg1:Boolean):void; function get tabEnabled():Boolean; function get buttonMode():Boolean; function removeChild(_arg1:DisplayObject):DisplayObject; function set tabIndex(_arg1:int):void; function addChild(_arg1:DisplayObject):DisplayObject; function areInaccessibleObjectsUnderPoint(_arg1:Point):Boolean; } }//package mx.core
Section 228
//IDataRenderer (mx.core.IDataRenderer) package mx.core { public interface IDataRenderer { function get data():Object; function set data(_arg1:Object):void; } }//package mx.core
Section 229
//IDeferredInstantiationUIComponent (mx.core.IDeferredInstantiationUIComponent) package mx.core { public interface IDeferredInstantiationUIComponent extends IUIComponent { function set cacheHeuristic(_arg1:Boolean):void; function createReferenceOnParentDocument(_arg1:IFlexDisplayObject):void; function get cachePolicy():String; function set id(_arg1:String):void; function registerEffects(_arg1:Array):void; function executeBindings(_arg1:Boolean=false):void; function get id():String; function deleteReferenceOnParentDocument(_arg1:IFlexDisplayObject):void; function set descriptor(_arg1:UIComponentDescriptor):void; function get descriptor():UIComponentDescriptor; } }//package mx.core
Section 230
//IEmbeddedFontRegistry (mx.core.IEmbeddedFontRegistry) package mx.core { public interface IEmbeddedFontRegistry { function getAssociatedModuleFactory(_arg1:EmbeddedFont, _arg2:IFlexModuleFactory):IFlexModuleFactory; function registerFont(_arg1:EmbeddedFont, _arg2:IFlexModuleFactory):void; function deregisterFont(_arg1:EmbeddedFont, _arg2:IFlexModuleFactory):void; function getFonts():Array; } }//package mx.core
Section 231
//IFlexAsset (mx.core.IFlexAsset) package mx.core { public interface IFlexAsset { } }//package mx.core
Section 232
//IFlexDisplayObject (mx.core.IFlexDisplayObject) package mx.core { import flash.display.*; import flash.geom.*; import flash.accessibility.*; import flash.events.*; public interface IFlexDisplayObject extends IBitmapDrawable, IEventDispatcher { function get visible():Boolean; function get rotation():Number; function localToGlobal(_arg1:Point):Point; function get name():String; function set width(_arg1:Number):void; function get measuredHeight():Number; function get blendMode():String; function get scale9Grid():Rectangle; function set name(_arg1:String):void; function set scaleX(_arg1:Number):void; function set scaleY(_arg1:Number):void; function get measuredWidth():Number; function get accessibilityProperties():AccessibilityProperties; function set scrollRect(_arg1:Rectangle):void; function get cacheAsBitmap():Boolean; function globalToLocal(_arg1:Point):Point; function get height():Number; function set blendMode(_arg1:String):void; function get parent():DisplayObjectContainer; function getBounds(_arg1:DisplayObject):Rectangle; function get opaqueBackground():Object; function set scale9Grid(_arg1:Rectangle):void; function setActualSize(_arg1:Number, _arg2:Number):void; function set alpha(_arg1:Number):void; function set accessibilityProperties(_arg1:AccessibilityProperties):void; function get width():Number; function hitTestPoint(_arg1:Number, _arg2:Number, _arg3:Boolean=false):Boolean; function set cacheAsBitmap(_arg1:Boolean):void; function get scaleX():Number; function get scaleY():Number; function get scrollRect():Rectangle; function get mouseX():Number; function get mouseY():Number; function set height(_arg1:Number):void; function set mask(_arg1:DisplayObject):void; function getRect(_arg1:DisplayObject):Rectangle; function get alpha():Number; function set transform(_arg1:Transform):void; function move(_arg1:Number, _arg2:Number):void; function get loaderInfo():LoaderInfo; function get root():DisplayObject; function hitTestObject(_arg1:DisplayObject):Boolean; function set opaqueBackground(_arg1:Object):void; function set visible(_arg1:Boolean):void; function get mask():DisplayObject; function set x(_arg1:Number):void; function set y(_arg1:Number):void; function get transform():Transform; function set filters(_arg1:Array):void; function get x():Number; function get y():Number; function get filters():Array; function set rotation(_arg1:Number):void; function get stage():Stage; } }//package mx.core
Section 233
//IFlexModule (mx.core.IFlexModule) package mx.core { public interface IFlexModule { function set moduleFactory(_arg1:IFlexModuleFactory):void; function get moduleFactory():IFlexModuleFactory; } }//package mx.core
Section 234
//IFlexModuleFactory (mx.core.IFlexModuleFactory) package mx.core { public interface IFlexModuleFactory { function create(... _args):Object; function info():Object; } }//package mx.core
Section 235
//IFontContextComponent (mx.core.IFontContextComponent) package mx.core { public interface IFontContextComponent { function get fontContext():IFlexModuleFactory; function set fontContext(_arg1:IFlexModuleFactory):void; } }//package mx.core
Section 236
//IIMESupport (mx.core.IIMESupport) package mx.core { public interface IIMESupport { function set imeMode(_arg1:String):void; function get imeMode():String; } }//package mx.core
Section 237
//IInvalidating (mx.core.IInvalidating) package mx.core { public interface IInvalidating { function validateNow():void; function invalidateSize():void; function invalidateDisplayList():void; function invalidateProperties():void; } }//package mx.core
Section 238
//IMXMLObject (mx.core.IMXMLObject) package mx.core { public interface IMXMLObject { function initialized(_arg1:Object, _arg2:String):void; } }//package mx.core
Section 239
//IProgrammaticSkin (mx.core.IProgrammaticSkin) package mx.core { public interface IProgrammaticSkin { function validateNow():void; function validateDisplayList():void; } }//package mx.core
Section 240
//IPropertyChangeNotifier (mx.core.IPropertyChangeNotifier) package mx.core { import flash.events.*; public interface IPropertyChangeNotifier extends IEventDispatcher, IUID { } }//package mx.core
Section 241
//IRawChildrenContainer (mx.core.IRawChildrenContainer) package mx.core { public interface IRawChildrenContainer { function get rawChildren():IChildList; } }//package mx.core
Section 242
//IRectangularBorder (mx.core.IRectangularBorder) package mx.core { import flash.geom.*; public interface IRectangularBorder extends IBorder { function get backgroundImageBounds():Rectangle; function get hasBackgroundImage():Boolean; function set backgroundImageBounds(_arg1:Rectangle):void; function layoutBackgroundImage():void; } }//package mx.core
Section 243
//IRepeater (mx.core.IRepeater) package mx.core { public interface IRepeater { function get container():IContainer; function set startingIndex(_arg1:int):void; function get startingIndex():int; function set recycleChildren(_arg1:Boolean):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:IContainer, _arg2:Boolean):void; function get currentIndex():int; function get dataProvider():Object; function set count(_arg1:int):void; } }//package mx.core
Section 244
//IRepeaterClient (mx.core.IRepeaterClient) package mx.core { public interface IRepeaterClient { function get instanceIndices():Array; function set instanceIndices(_arg1:Array):void; function get isDocument():Boolean; function set repeaters(_arg1:Array):void; function initializeRepeaterArrays(_arg1:IRepeaterClient):void; function get repeaters():Array; function set repeaterIndices(_arg1:Array):void; function get repeaterIndices():Array; } }//package mx.core
Section 245
//IStateClient (mx.core.IStateClient) package mx.core { public interface IStateClient { function get currentState():String; function set currentState(_arg1:String):void; } }//package mx.core
Section 246
//ITextFieldFactory (mx.core.ITextFieldFactory) package mx.core { import flash.text.*; public interface ITextFieldFactory { function createTextField(_arg1:IFlexModuleFactory):TextField; } }//package mx.core
Section 247
//IToolTip (mx.core.IToolTip) package mx.core { import flash.geom.*; public interface IToolTip extends IUIComponent { function set text(_arg1:String):void; function get screen():Rectangle; function get text():String; } }//package mx.core
Section 248
//IUIComponent (mx.core.IUIComponent) package mx.core { import flash.display.*; import mx.managers.*; public interface IUIComponent extends IFlexDisplayObject { function set focusPane(_arg1:Sprite):void; function get enabled():Boolean; function set enabled(_arg1:Boolean):void; function set isPopUp(_arg1:Boolean):void; function get explicitMinHeight():Number; function get percentWidth():Number; function get isPopUp():Boolean; function get owner():DisplayObjectContainer; function get percentHeight():Number; function get baselinePosition():Number; function owns(_arg1:DisplayObject):Boolean; function initialize():void; function get maxWidth():Number; function get minWidth():Number; function getExplicitOrMeasuredWidth():Number; function get explicitMaxWidth():Number; function get explicitMaxHeight():Number; function set percentHeight(_arg1:Number):void; function get minHeight():Number; function set percentWidth(_arg1:Number):void; function get document():Object; function get focusPane():Sprite; function getExplicitOrMeasuredHeight():Number; function set tweeningProperties(_arg1:Array):void; function set explicitWidth(_arg1:Number):void; function set measuredMinHeight(_arg1:Number):void; function get explicitMinWidth():Number; function get tweeningProperties():Array; function get maxHeight():Number; function set owner(_arg1:DisplayObjectContainer):void; function set includeInLayout(_arg1:Boolean):void; function setVisible(_arg1:Boolean, _arg2:Boolean=false):void; function parentChanged(_arg1:DisplayObjectContainer):void; function get explicitWidth():Number; function get measuredMinHeight():Number; function set measuredMinWidth(_arg1:Number):void; 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 set document(_arg1:Object):void; function get systemManager():ISystemManager; } }//package mx.core
Section 249
//IUID (mx.core.IUID) package mx.core { public interface IUID { function get uid():String; function set uid(_arg1:String):void; } }//package mx.core
Section 250
//IUITextField (mx.core.IUITextField) package mx.core { import flash.display.*; import mx.managers.*; import flash.geom.*; import mx.styles.*; import flash.text.*; public interface IUITextField extends IIMESupport, IFlexModule, IInvalidating, ISimpleStyleClient, IToolTipManagerClient, IUIComponent { function replaceText(_arg1:int, _arg2:int, _arg3:String):void; function get doubleClickEnabled():Boolean; function get nestLevel():int; function get caretIndex():int; function set doubleClickEnabled(_arg1:Boolean):void; function get maxScrollH():int; function set nestLevel(_arg1:int):void; function get numLines():int; function get scrollH():int; function setColor(_arg1:uint):void; function get maxScrollV():int; function getImageReference(_arg1:String):DisplayObject; function get scrollV():int; function get border():Boolean; function get text():String; function get styleSheet():StyleSheet; function getCharBoundaries(_arg1:int):Rectangle; function get background():Boolean; function set scrollH(_arg1:int):void; function getFirstCharInParagraph(_arg1:int):int; function get type():String; function replaceSelectedText(_arg1:String):void; function set borderColor(_arg1:uint):void; function get alwaysShowSelection():Boolean; function get sharpness():Number; function get tabIndex():int; function get textColor():uint; function set defaultTextFormat(_arg1:TextFormat):void; function get condenseWhite():Boolean; function get displayAsPassword():Boolean; function get autoSize():String; function setSelection(_arg1:int, _arg2:int):void; function set scrollV(_arg1:int):void; function set useRichTextClipboard(_arg1:Boolean):void; function get selectionBeginIndex():int; function get selectable():Boolean; function set border(_arg1:Boolean):void; function set multiline(_arg1:Boolean):void; function set background(_arg1:Boolean):void; function set embedFonts(_arg1:Boolean):void; function set text(_arg1:String):void; function get selectionEndIndex():int; function set mouseWheelEnabled(_arg1:Boolean):void; function appendText(_arg1:String):void; function get antiAliasType():String; function set styleSheet(_arg1:StyleSheet):void; function set nonInheritingStyles(_arg1:Object):void; function set textColor(_arg1:uint):void; function get wordWrap():Boolean; function getLineIndexAtPoint(_arg1:Number, _arg2:Number):int; function get htmlText():String; function set tabIndex(_arg1:int):void; function get thickness():Number; function getLineIndexOfChar(_arg1:int):int; function get bottomScrollV():int; function set restrict(_arg1:String):void; function set alwaysShowSelection(_arg1:Boolean):void; function getTextFormat(_arg1:int=-1, _arg2:int=-1):TextFormat; function set sharpness(_arg1:Number):void; function set type(_arg1:String):void; function setTextFormat(_arg1:TextFormat, _arg2:int=-1, _arg3:int=-1):void; function set gridFitType(_arg1:String):void; function getUITextFormat():UITextFormat; function set inheritingStyles(_arg1:Object):void; function setFocus():void; function get borderColor():uint; function set condenseWhite(_arg1:Boolean):void; function get textWidth():Number; function getLineOffset(_arg1:int):int; function set displayAsPassword(_arg1:Boolean):void; function set autoSize(_arg1:String):void; function get defaultTextFormat():TextFormat; function get useRichTextClipboard():Boolean; function get nonZeroTextHeight():Number; function set backgroundColor(_arg1:uint):void; function get embedFonts():Boolean; function set selectable(_arg1:Boolean):void; function get multiline():Boolean; function set maxChars(_arg1:int):void; function get textHeight():Number; function get nonInheritingStyles():Object; function getLineText(_arg1:int):String; function set focusRect(_arg1:Object):void; function get mouseWheelEnabled():Boolean; function get restrict():String; function getParagraphLength(_arg1:int):int; function set mouseEnabled(_arg1:Boolean):void; function get gridFitType():String; function get inheritingStyles():Object; function set ignorePadding(_arg1:Boolean):void; function set antiAliasType(_arg1:String):void; function get backgroundColor():uint; function getCharIndexAtPoint(_arg1:Number, _arg2:Number):int; function set tabEnabled(_arg1:Boolean):void; function get maxChars():int; function get focusRect():Object; function get ignorePadding():Boolean; function get mouseEnabled():Boolean; function get length():int; function set wordWrap(_arg1:Boolean):void; function get tabEnabled():Boolean; function set thickness(_arg1:Number):void; function getLineLength(_arg1:int):int; function truncateToFit(_arg1:String=null):Boolean; function set htmlText(_arg1:String):void; function getLineMetrics(_arg1:int):TextLineMetrics; function getStyle(_arg1:String); } }//package mx.core
Section 251
//LayoutContainer (mx.core.LayoutContainer) package mx.core { import flash.events.*; import mx.containers.utilityClasses.*; import mx.containers.*; public class LayoutContainer extends Container implements IConstraintLayout { private var _constraintColumns:Array; protected var layoutObject:Layout; private var _layout:String;// = "vertical" private var processingCreationQueue:Boolean;// = false protected var boxLayoutClass:Class; private var resizeHandlerAdded:Boolean;// = false private var preloadObj:Object; private var creationQueue:Array; private var _constraintRows:Array; protected var canvasLayoutClass:Class; mx_internal static const VERSION:String = "3.0.0.0"; mx_internal static var useProgressiveLayout:Boolean = false; public function LayoutContainer(){ layoutObject = new BoxLayout(); canvasLayoutClass = CanvasLayout; boxLayoutClass = BoxLayout; creationQueue = []; _constraintColumns = []; _constraintRows = []; super(); layoutObject.target = this; } public function get constraintColumns():Array{ return (_constraintColumns); } override mx_internal function get usePadding():Boolean{ return (!((layout == ContainerLayout.ABSOLUTE))); } override protected function layoutChrome(_arg1:Number, _arg2:Number):void{ super.layoutChrome(_arg1, _arg2); if (!doingLayout){ createBorder(); }; } public function set constraintColumns(_arg1:Array):void{ var _local2:int; var _local3:int; if (_arg1 != _constraintColumns){ _local2 = _arg1.length; _local3 = 0; while (_local3 < _local2) { ConstraintColumn(_arg1[_local3]).container = this; _local3++; }; _constraintColumns = _arg1; invalidateSize(); invalidateDisplayList(); }; } 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 constraintRows():Array{ return (_constraintRows); } override protected function measure():void{ super.measure(); layoutObject.measure(); } override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ super.updateDisplayList(_arg1, _arg2); layoutObject.updateDisplayList(_arg1, _arg2); createBorder(); } public function get layout():String{ return (_layout); } public function set constraintRows(_arg1:Array):void{ var _local2:int; var _local3:int; if (_arg1 != _constraintRows){ _local2 = _arg1.length; _local3 = 0; while (_local3 < _local2) { ConstraintRow(_arg1[_local3]).container = this; _local3++; }; _constraintRows = _arg1; invalidateSize(); invalidateDisplayList(); }; } } }//package mx.core
Section 252
//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 253
//ResourceModuleRSLItem (mx.core.ResourceModuleRSLItem) package mx.core { import flash.events.*; import mx.events.*; import mx.resources.*; public class ResourceModuleRSLItem extends RSLItem { mx_internal static const VERSION:String = "3.0.0.0"; public function ResourceModuleRSLItem(_arg1:String){ super(_arg1); } private function resourceErrorHandler(_arg1:ResourceEvent):void{ var _local2:IOErrorEvent = new IOErrorEvent(IOErrorEvent.IO_ERROR); _local2.text = _arg1.errorText; super.itemErrorHandler(_local2); } override public function load(_arg1:Function, _arg2:Function, _arg3:Function, _arg4:Function, _arg5:Function):void{ chainedProgressHandler = _arg1; chainedCompleteHandler = _arg2; chainedIOErrorHandler = _arg3; chainedSecurityErrorHandler = _arg4; chainedRSLErrorHandler = _arg5; var _local6:IResourceManager = ResourceManager.getInstance(); var _local7:IEventDispatcher = _local6.loadResourceModule(url); _local7.addEventListener(ResourceEvent.PROGRESS, itemProgressHandler); _local7.addEventListener(ResourceEvent.COMPLETE, itemCompleteHandler); _local7.addEventListener(ResourceEvent.ERROR, resourceErrorHandler); } } }//package mx.core
Section 254
//RSLItem (mx.core.RSLItem) package mx.core { import flash.display.*; import flash.events.*; import mx.events.*; import flash.system.*; import flash.net.*; public class RSLItem { protected var chainedSecurityErrorHandler:Function; public var total:uint;// = 0 public var loaded:uint;// = 0 private var completed:Boolean;// = false protected var chainedRSLErrorHandler:Function; protected var chainedIOErrorHandler:Function; protected var chainedCompleteHandler:Function; private var errorText:String; protected var chainedProgressHandler:Function; public var urlRequest:URLRequest; protected var url:String; mx_internal static const VERSION:String = "3.0.0.0"; public function RSLItem(_arg1:String){ this.url = _arg1; } public function itemProgressHandler(_arg1:ProgressEvent):void{ loaded = _arg1.bytesLoaded; total = _arg1.bytesTotal; if (chainedProgressHandler != null){ chainedProgressHandler(_arg1); }; } public function itemErrorHandler(_arg1:ErrorEvent):void{ errorText = decodeURI(_arg1.text); completed = true; loaded = 0; total = 0; trace(errorText); if ((((_arg1.type == IOErrorEvent.IO_ERROR)) && (!((chainedIOErrorHandler == null))))){ chainedIOErrorHandler(_arg1); } else { if ((((_arg1.type == SecurityErrorEvent.SECURITY_ERROR)) && (!((chainedSecurityErrorHandler == null))))){ chainedSecurityErrorHandler(_arg1); } else { if ((((_arg1.type == RSLEvent.RSL_ERROR)) && (!((chainedRSLErrorHandler == null))))){ chainedRSLErrorHandler(_arg1); }; }; }; } public function load(_arg1:Function, _arg2:Function, _arg3:Function, _arg4:Function, _arg5:Function):void{ chainedProgressHandler = _arg1; chainedCompleteHandler = _arg2; chainedIOErrorHandler = _arg3; chainedSecurityErrorHandler = _arg4; chainedRSLErrorHandler = _arg5; var _local6:Loader = new Loader(); var _local7:LoaderContext = new LoaderContext(); urlRequest = new URLRequest(url); _local6.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, itemProgressHandler); _local6.contentLoaderInfo.addEventListener(Event.COMPLETE, itemCompleteHandler); _local6.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, itemErrorHandler); _local6.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, itemErrorHandler); _local7.applicationDomain = ApplicationDomain.currentDomain; _local6.load(urlRequest, _local7); } public function itemCompleteHandler(_arg1:Event):void{ completed = true; if (chainedCompleteHandler != null){ chainedCompleteHandler(_arg1); }; } } }//package mx.core
Section 255
//RSLListLoader (mx.core.RSLListLoader) package mx.core { import flash.events.*; public class RSLListLoader { private var chainedSecurityErrorHandler:Function; private var chainedIOErrorHandler:Function; private var rslList:Array; private var chainedRSLErrorHandler:Function; private var chainedCompleteHandler:Function; private var currentIndex:int;// = 0 private var chainedProgressHandler:Function; mx_internal static const VERSION:String = "3.0.0.0"; public function RSLListLoader(_arg1:Array){ rslList = []; super(); this.rslList = _arg1; } private function loadNext():void{ if (!isDone()){ currentIndex++; if (currentIndex < rslList.length){ rslList[currentIndex].load(chainedProgressHandler, listCompleteHandler, listIOErrorHandler, listSecurityErrorHandler, chainedRSLErrorHandler); }; }; } public function getIndex():int{ return (currentIndex); } public function load(_arg1:Function, _arg2:Function, _arg3:Function, _arg4:Function, _arg5:Function):void{ chainedProgressHandler = _arg1; chainedCompleteHandler = _arg2; chainedIOErrorHandler = _arg3; chainedSecurityErrorHandler = _arg4; chainedRSLErrorHandler = _arg5; currentIndex = -1; loadNext(); } private function listCompleteHandler(_arg1:Event):void{ if (chainedCompleteHandler != null){ chainedCompleteHandler(_arg1); }; loadNext(); } public function isDone():Boolean{ return ((currentIndex >= rslList.length)); } private function listSecurityErrorHandler(_arg1:Event):void{ if (chainedSecurityErrorHandler != null){ chainedSecurityErrorHandler(_arg1); }; } public function getItemCount():int{ return (rslList.length); } public function getItem(_arg1:int):RSLItem{ if ((((_arg1 < 0)) || ((_arg1 >= rslList.length)))){ return (null); }; return (rslList[_arg1]); } private function listIOErrorHandler(_arg1:Event):void{ if (chainedIOErrorHandler != null){ chainedIOErrorHandler(_arg1); }; } } }//package mx.core
Section 256
//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 = "3.0.0.0"; public static const OFF:String = "off"; } }//package mx.core
Section 257
//Singleton (mx.core.Singleton) package mx.core { public class Singleton { mx_internal static const VERSION:String = "3.0.0.0"; private static var classMap:Object = {}; public static function registerClass(_arg1:String, _arg2:Class):void{ var _local3:Class = classMap[_arg1]; if (!_local3){ classMap[_arg1] = _arg2; }; } public static function getClass(_arg1:String):Class{ return (classMap[_arg1]); } public static function getInstance(_arg1:String):Object{ var _local2:Class = classMap[_arg1]; if (!_local2){ throw (new Error((("No class registered for interface '" + _arg1) + "'."))); }; return (_local2["getInstance"]()); } } }//package mx.core
Section 258
//SoundAsset (mx.core.SoundAsset) package mx.core { import flash.media.*; public class SoundAsset extends Sound implements IFlexAsset { mx_internal static const VERSION:String = "3.0.0.0"; } }//package mx.core
Section 259
//SpriteAsset (mx.core.SpriteAsset) package mx.core { public class SpriteAsset extends FlexSprite implements IFlexAsset, IFlexDisplayObject, IBorder { private var _measuredHeight:Number; private var _measuredWidth:Number; mx_internal static const VERSION:String = "3.0.0.0"; public function SpriteAsset(){ _measuredWidth = width; _measuredHeight = height; } public function get measuredWidth():Number{ return (_measuredWidth); } public function get measuredHeight():Number{ return (_measuredHeight); } public function setActualSize(_arg1:Number, _arg2:Number):void{ width = _arg1; height = _arg2; } public function move(_arg1:Number, _arg2:Number):void{ this.x = _arg1; this.y = _arg2; } public function get borderMetrics():EdgeMetrics{ if (scale9Grid == null){ return (EdgeMetrics.EMPTY); }; return (new EdgeMetrics(scale9Grid.left, scale9Grid.top, Math.ceil((measuredWidth - scale9Grid.right)), Math.ceil((measuredHeight - scale9Grid.bottom)))); } } }//package mx.core
Section 260
//TextFieldFactory (mx.core.TextFieldFactory) package mx.core { import flash.text.*; import flash.utils.*; public class TextFieldFactory implements ITextFieldFactory { private var textFields:Dictionary; mx_internal static const VERSION:String = "3.0.0.0"; private static var instance:ITextFieldFactory; public function TextFieldFactory(){ textFields = new Dictionary(true); super(); } public function createTextField(_arg1:IFlexModuleFactory):TextField{ var _local4:Object; var _local2:TextField; var _local3:Dictionary = textFields[_arg1]; if (_local3){ for (_local4 in _local3) { _local2 = TextField(_local4); break; }; }; if (!_local2){ if (_arg1){ _local2 = TextField(_arg1.create("flash.text.TextField")); } else { _local2 = new TextField(); }; if (!_local3){ _local3 = new Dictionary(true); }; _local3[_local2] = 1; textFields[_arg1] = _local3; }; return (_local2); } public static function getInstance():ITextFieldFactory{ if (!instance){ instance = new (TextFieldFactory); }; return (instance); } } }//package mx.core
Section 261
//UIComponent (mx.core.UIComponent) package mx.core { import mx.events.*; import mx.automation.*; import flash.events.*; import flash.display.*; import mx.managers.*; import mx.resources.*; import flash.geom.*; import mx.styles.*; import mx.controls.*; import flash.text.*; import mx.states.*; import mx.effects.*; import mx.graphics.*; import mx.binding.*; import mx.validators.*; import mx.utils.*; import flash.utils.*; import flash.system.*; import mx.modules.*; public class UIComponent extends FlexSprite implements IAutomationObject, IChildList, IDeferredInstantiationUIComponent, IFlexDisplayObject, IFlexModule, IInvalidating, ILayoutManagerClient, IPropertyChangeNotifier, IRepeaterClient, ISimpleStyleClient, IStyleClient, IToolTipManagerClient, IUIComponent, IValidatorListener, IStateClient, IConstraintClient { private var cachedEmbeddedFont:EmbeddedFont;// = null 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 _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; mx_internal var overlayReferenceCount:int;// = 0 private var hasFontContextBeenSaved:Boolean;// = false private var _repeaterIndices:Array; private var oldExplicitWidth:Number; mx_internal var _descriptor:UIComponentDescriptor; private var _initialized:Boolean;// = false private var _focusEnabled:Boolean;// = true private var cacheAsBitmapCount:int;// = 0 private var requestedCurrentState:String; 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 mx_internal var invalidateSizeFlag:Boolean;// = false private var _scaleX:Number;// = 1 private var _scaleY:Number;// = 1 private var _styleDeclaration:CSSStyleDeclaration; private var _resourceManager:IResourceManager; mx_internal var _affectedProperties:Object; mx_internal var _documentDescriptor:UIComponentDescriptor; 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 _explicitWidth:Number; private var _enabled:Boolean;// = false public var states:Array; private var _mouseFocusEnabled:Boolean;// = true private var oldHeight:Number;// = 0 private var _currentStateChanged:Boolean; private var cachedTextFormat:UITextFormat; mx_internal var _height:Number; private var _automationDelegate:IAutomationObject; private var _percentWidth:Number; private var _automationName:String;// = null private var _isEffectStarted:Boolean;// = false private var _styleName:Object; private var lastUnscaledWidth:Number; mx_internal var _document:Object; mx_internal var _errorString:String;// = "" private var oldExplicitHeight:Number; private var _nestLevel:int;// = 0 private var _systemManagerDirty:Boolean;// = false private var _explicitHeight:Number; mx_internal var _toolTip:String; private var _filters:Array; private var _focusPane:Sprite; private var playStateTransition:Boolean;// = true private var _nonInheritingStyles:Object; private var _showInAutomationHierarchy:Boolean;// = true private var _moduleFactory:IFlexModuleFactory; private var preventDrawFocus:Boolean;// = false 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; mx_internal var _explicitMinWidth:Number; private var lastUnscaledHeight:Number; mx_internal var _explicitMaxWidth:Number; private var _measuredMinHeight:Number;// = 0 private var _uid:String; private var _currentTransitionEffect:IEffect; private var _updateCompletePendingFlag:Boolean;// = false private var oldMinHeight:Number; private var _flexContextMenu:IFlexContextMenu; mx_internal var _explicitMinHeight:Number; private var _percentHeight:Number; private var oldEmbeddedFontContext:IFlexModuleFactory;// = null 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 = "3.0.0.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"); private static var _embeddedFontRegistry:IEmbeddedFontRegistry; public function UIComponent(){ methodQueue = []; _resourceManager = ResourceManager.getInstance(); _inheritingStyles = UIComponent.STYLE_UNINITIALIZED; _nonInheritingStyles = UIComponent.STYLE_UNINITIALIZED; states = []; transitions = []; _effectsStarted = []; _affectedProperties = {}; _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); }; resourcesChanged(); resourceManager.addEventListener(Event.CHANGE, resourceManager_changeHandler, false, 0, true); _width = super.width; _height = super.height; } override public function get filters():Array{ return ((_filters) ? _filters : super.filters); } 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 _local4:Number; var _local5:Number; var _local6:Point; var _local7:Number; if (!_arg1){ _arg1 = this; }; if (((isNaN(_arg1.width)) || (isNaN(_arg1.height)))){ return; }; var _local2:IFocusManager = focusManager; if (!_local2){ return; }; var _local3:IFlexDisplayObject = 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 IProgrammaticSkin)){ IProgrammaticSkin(_local3).validateNow(); }; }; }; } mx_internal function setUnscaledWidth(_arg1:Number):void{ var _local2:Number = (_arg1 * Math.abs(oldScaleX)); if (_explicitWidth == _local2){ return; }; if (!isNaN(_local2)){ _percentWidth = NaN; }; _explicitWidth = _local2; invalidateSize(); var _local3:IInvalidating = (parent as IInvalidating); if (((_local3) && (includeInLayout))){ _local3.invalidateSize(); _local3.invalidateDisplayList(); }; } public function set nestLevel(_arg1:int):void{ var _local2:IChildList; var _local3:int; var _local4:int; var _local5:ILayoutManagerClient; var _local6:IUITextField; 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 IUITextField); if (_local6){ _local6.nestLevel = (_arg1 + 1); }; }; _local4++; }; }; } public function getExplicitOrMeasuredHeight():Number{ return ((isNaN(explicitHeight)) ? measuredHeight : explicitHeight); } private function callLaterDispatcher(_arg1:Event):void{ var callLaterErrorEvent:DynamicEvent; var event = _arg1; UIComponentGlobals.callLaterDispatcherCount++; if (!UIComponentGlobals.catchCallLaterExceptions){ callLaterDispatcher2(event); } else { try { callLaterDispatcher2(event); } catch(e:Error) { callLaterErrorEvent = new DynamicEvent("callLaterError"); callLaterErrorEvent.error = e; systemManager.dispatchEvent(callLaterErrorEvent); }; }; UIComponentGlobals.callLaterDispatcherCount--; } public function getStyle(_arg1:String){ return ((StyleManager.inheritingStyles[_arg1]) ? _inheritingStyles[_arg1] : _nonInheritingStyles[_arg1]); } final mx_internal function get $width():Number{ return (super.width); } public function get className():String{ var _local1:String = getQualifiedClassName(this); var _local2:int = _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 = []; 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; } protected function isOurFocus(_arg1:DisplayObject):Boolean{ return ((_arg1 == this)); } public function get errorString():String{ return (_errorString); } mx_internal function setUnscaledHeight(_arg1:Number):void{ var _local2:Number = (_arg1 * Math.abs(oldScaleY)); if (_explicitHeight == _local2){ return; }; if (!isNaN(_local2)){ _percentHeight = NaN; }; _explicitHeight = _local2; invalidateSize(); var _local3:IInvalidating = (parent as IInvalidating); if (((_local3) && (includeInLayout))){ _local3.invalidateSize(); _local3.invalidateDisplayList(); }; } 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); }; }; } mx_internal function initThemeColor():Boolean{ var _local2:Object; var _local3:Number; var _local4:Number; var _local5:Object; var _local6:Array; var _local7:int; var _local8:CSSStyleDeclaration; var _local1:Object = _styleName; if (_styleDeclaration){ _local2 = _styleDeclaration.getStyle("themeColor"); _local3 = _styleDeclaration.getStyle("rollOverColor"); _local4 = _styleDeclaration.getStyle("selectionColor"); }; if ((((((_local2 === null)) || (!(StyleManager.isValidStyleValue(_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 === null)) || (!(StyleManager.isValidStyleValue(_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 === null))) && (StyleManager.isValidStyleValue(_local2)))){ break; }; _local7++; }; }; if (((((((!((_local2 === null))) && (StyleManager.isValidStyleValue(_local2)))) && (isNaN(_local3)))) && (isNaN(_local4)))){ setThemeColor(_local2); return (true); }; return (((((((!((_local2 === null))) && (StyleManager.isValidStyleValue(_local2)))) && (!(isNaN(_local3))))) && (!(isNaN(_local4))))); } override public function get scaleX():Number{ return (_scaleX); } public function get uid():String{ if (!_uid){ _uid = toString(); }; return (_uid); } override public function get mouseX():Number{ if (((((!(root)) || ((root is Stage)))) || ((root[fakeMouseX] === undefined)))){ return (super.mouseX); }; return (globalToLocal(new Point(root[fakeMouseX], 0)).x); } override public function stopDrag():void{ super.stopDrag(); invalidateProperties(); dispatchEvent(new Event("xChanged")); dispatchEvent(new Event("yChanged")); } public function get focusPane():Sprite{ return (_focusPane); } public function set tweeningProperties(_arg1:Array):void{ _tweeningProperties = _arg1; } 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 get isDocument():Boolean{ return ((document == this)); } public function set validationSubField(_arg1:String):void{ _validationSubField = _arg1; } override public function get scaleY():Number{ return (_scaleY); } protected function keyDownHandler(_arg1:KeyboardEvent):void{ } protected function createInFontContext(_arg1:Class):Object{ hasFontContextBeenSaved = true; var _local2:String = StringUtil.trimArrayElements(getStyle("fontFamily"), ","); var _local3:String = getStyle("fontWeight"); var _local4:String = getStyle("fontStyle"); var _local5 = (_local3 == "bold"); var _local6 = (_local4 == "italic"); oldEmbeddedFontContext = getFontContext(_local2, _local5, _local6); var _local7:Object = createInModuleContext((oldEmbeddedFontContext) ? oldEmbeddedFontContext : moduleFactory, getQualifiedClassName(_arg1)); if (_local7 == null){ _local7 = new (_arg1); }; return (_local7); } public function get screen():Rectangle{ var _local1:ISystemManager = systemManager; return ((_local1) ? _local1.screen : null); } protected function focusInHandler(_arg1:FocusEvent):void{ var _local2:IFocusManager; if (isOurFocus(DisplayObject(_arg1.target))){ _local2 = focusManager; if (((_local2) && (_local2.showFocusIndicator))){ drawFocus(true); }; ContainerGlobals.checkFocus(_arg1.relatedObject, this); }; } public function hasFontContextChanged():Boolean{ if (!hasFontContextBeenSaved){ return (false); }; var _local1:String = StringUtil.trimArrayElements(getStyle("fontFamily"), ","); var _local2:String = getStyle("fontWeight"); var _local3:String = getStyle("fontStyle"); var _local4 = (_local2 == "bold"); var _local5 = (_local3 == "italic"); var _local6:EmbeddedFont = getEmbeddedFont(_local1, _local4, _local5); var _local7:IFlexModuleFactory = embeddedFontRegistry.getAssociatedModuleFactory(_local6, moduleFactory); return (!((_local7 == oldEmbeddedFontContext))); } public function get explicitHeight():Number{ return (_explicitHeight); } override public function get x():Number{ return (super.x); } override public function get y():Number{ return (super.y); } override public function get visible():Boolean{ return (_visible); } mx_internal function addOverlay(_arg1:uint, _arg2:RoundedRectangle=null):void{ if (!overlay){ overlayColor = _arg1; overlay = new UIComponent(); overlay.name = "overlay"; overlay.$visible = true; 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)); } public function get percentWidth():Number{ return (_percentWidth); } public function set explicitMinHeight(_arg1:Number):void{ if (_explicitMinHeight == _arg1){ return; }; _explicitMinHeight = _arg1; invalidateSize(); var _local2:IInvalidating = (parent as IInvalidating); if (_local2){ _local2.invalidateSize(); _local2.invalidateDisplayList(); }; dispatchEvent(new Event("explicitMinHeightChanged")); } public function set automationName(_arg1:String):void{ _automationName = _arg1; } public function get mouseFocusEnabled():Boolean{ return (_mouseFocusEnabled); } mx_internal function getEmbeddedFont(_arg1:String, _arg2:Boolean, _arg3:Boolean):EmbeddedFont{ if (cachedEmbeddedFont){ if ((((cachedEmbeddedFont.fontName == _arg1)) && ((cachedEmbeddedFont.fontStyle == EmbeddedFontRegistry.getFontStyle(_arg2, _arg3))))){ return (cachedEmbeddedFont); }; }; cachedEmbeddedFont = new EmbeddedFont(_arg1, _arg2, _arg3); return (cachedEmbeddedFont); } public function stylesInitialized():void{ } public function set errorString(_arg1:String):void{ var _local2:String = _errorString; _errorString = _arg1; ToolTipManager.registerErrorString(this, _local2, _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; } protected function keyUpHandler(_arg1:KeyboardEvent):void{ } 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")); } public function set uid(_arg1:String):void{ this._uid = _arg1; } public function createAutomationIDPart(_arg1:IAutomationObject):Object{ if (automationDelegate){ return (automationDelegate.createAutomationIDPart(_arg1)); }; return (null); } public function getAutomationChildAt(_arg1:int):IAutomationObject{ if (automationDelegate){ return (automationDelegate.getAutomationChildAt(_arg1)); }; return (null); } mx_internal function get isEffectStarted():Boolean{ return (_isEffectStarted); } override public function get parent():DisplayObjectContainer{ return ((_parent) ? _parent : super.parent); } override public function get mouseY():Number{ if (((((!(root)) || ((root is Stage)))) || ((root[fakeMouseY] === undefined)))){ return (super.mouseY); }; return (globalToLocal(new Point(0, root[fakeMouseY])).y); } public function setActualSize(_arg1:Number, _arg2:Number):void{ var _local3:Boolean; 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(); }; } private function focusObj_resizeHandler(_arg1:ResizeEvent):void{ adjustFocusRect(); } mx_internal function adjustSizesForScaleChanges():void{ var _local3:Number; var _local1:Number = scaleX; var _local2:Number = 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.mask = null; _focusPane = null; }; } public function determineTextFormatFromStyles():UITextFormat{ var _local2:String; var _local1:UITextFormat = cachedTextFormat; if (!_local1){ _local2 = StringUtil.trimArrayElements(_inheritingStyles.fontFamily, ","); _local1 = new UITextFormat(getNonNullSystemManager(), _local2); _local1.moduleFactory = moduleFactory; _local1.align = _inheritingStyles.textAlign; _local1.bold = (_inheritingStyles.fontWeight == "bold"); _local1.color = (enabled) ? _inheritingStyles.color : _inheritingStyles.disabledColor; _local1.font = _local2; _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 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); } private function focusObj_scrollHandler(_arg1:Event):void{ adjustFocusRect(); } final mx_internal function get $x():Number{ return (super.x); } final mx_internal function get $y():Number{ return (super.y); } public function setConstraintValue(_arg1:String, _arg2):void{ setStyle(_arg1, _arg2); } protected function resourcesChanged():void{ } public function registerEffects(_arg1:Array):void{ var _local4:String; var _local2:int = _arg1.length; var _local3:int; while (_local3 < _local2) { _local4 = EffectManager.getEventForEffectTrigger(_arg1[_local3]); if (((!((_local4 == null))) && (!((_local4 == ""))))){ addEventListener(_local4, EffectManager.eventHandler, false, EventPriority.EFFECT); }; _local3++; }; } public function get explicitMinWidth():Number{ return (_explicitMinWidth); } private function filterChangeHandler(_arg1:Event):void{ super.filters = _filters; } override public function set visible(_arg1:Boolean):void{ setVisible(_arg1); } public function set explicitHeight(_arg1:Number):void{ if (_explicitHeight == _arg1){ return; }; if (!isNaN(_arg1)){ _percentHeight = NaN; }; _explicitHeight = _arg1; invalidateSize(); var _local2:IInvalidating = (parent as IInvalidating); if (((_local2) && (includeInLayout))){ _local2.invalidateSize(); _local2.invalidateDisplayList(); }; dispatchEvent(new Event("explicitHeightChanged")); } override public function set x(_arg1:Number):void{ if (super.x == _arg1){ return; }; super.x = _arg1; invalidateProperties(); dispatchEvent(new Event("xChanged")); } public function set showInAutomationHierarchy(_arg1:Boolean):void{ _showInAutomationHierarchy = _arg1; } override public function set y(_arg1:Number):void{ if (super.y == _arg1){ return; }; super.y = _arg1; invalidateProperties(); dispatchEvent(new Event("yChanged")); } private function resourceManager_changeHandler(_arg1:Event):void{ resourcesChanged(); } public function set systemManager(_arg1:ISystemManager):void{ _systemManager = _arg1; _systemManagerDirty = false; } mx_internal function getFocusObject():DisplayObject{ var _local1:IFocusManager = focusManager; if (((!(_local1)) || (!(_local1.focusPane)))){ return (null); }; return (((_local1.focusPane.numChildren == 0)) ? null : _local1.focusPane.getChildAt(0)); } public function set percentWidth(_arg1:Number):void{ if (_percentWidth == _arg1){ return; }; if (!isNaN(_arg1)){ _explicitWidth = NaN; }; _percentWidth = _arg1; var _local2:IInvalidating = (parent as IInvalidating); if (_local2){ _local2.invalidateSize(); _local2.invalidateDisplayList(); }; } public function get moduleFactory():IFlexModuleFactory{ return (_moduleFactory); } override public function addChild(_arg1:DisplayObject):DisplayObject{ var _local2:DisplayObjectContainer = _arg1.parent; if (((_local2) && (!((_local2 is Loader))))){ _local2.removeChild(_arg1); }; var _local3:int = (((overlayReferenceCount) && (!((_arg1 == overlay))))) ? Math.max(0, (super.numChildren - 1)) : super.numChildren; addingChild(_arg1); $addChildAt(_arg1, _local3); childAdded(_arg1); return (_arg1); } 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; if ((_local2 is String)){ _local2 = parseInt(String(_arg1)); } else { _local2 = Number(_arg1); }; if (isNaN(_local2)){ _local2 = StyleManager.getColorName(_arg1); }; var _local3:Number = ColorUtil.adjustBrightness2(_local2, 50); var _local4:Number = ColorUtil.adjustBrightness2(_local2, 70); setStyle("selectionColor", _local3); setStyle("rollOverColor", _local4); } public function get explicitMaxWidth():Number{ return (_explicitMaxWidth); } public function get id():String{ return (_id); } override public function get height():Number{ return (_height); } 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 = repeaters; if (_arg1 == -1){ _arg1 = (_local2.length - 1); }; return (_local2[_arg1].getItemAt(repeaterIndices[_arg1])); } public function executeBindings(_arg1:Boolean=false):void{ var _local2:Object = (((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); } mx_internal function getFontContext(_arg1:String, _arg2:Boolean, _arg3:Boolean):IFlexModuleFactory{ return (embeddedFontRegistry.getAssociatedModuleFactory(getEmbeddedFont(_arg1, _arg2, _arg3), moduleFactory)); } public function get instanceIndex():int{ return ((_instanceIndices) ? _instanceIndices[(_instanceIndices.length - 1)] : -1); } public function set measuredWidth(_arg1:Number):void{ _measuredWidth = _arg1; } public function effectFinished(_arg1:IEffectInstance):void{ _endingEffectInstances.push(_arg1); invalidateProperties(); UIComponentGlobals.layoutManager.addEventListener(FlexEvent.UPDATE_COMPLETE, updateCompleteHandler, false, 0, true); } mx_internal function set isEffectStarted(_arg1:Boolean):void{ _isEffectStarted = _arg1; } mx_internal function fillOverlay(_arg1:UIComponent, _arg2:uint, _arg3:RoundedRectangle=null):void{ if (!_arg3){ _arg3 = new RoundedRectangle(0, 0, unscaledWidth, unscaledHeight, 0); }; var _local4:Graphics = _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(); } public function get instanceIndices():Array{ return ((_instanceIndices) ? _instanceIndices.slice(0) : null); } 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)); } mx_internal function removingChild(_arg1:DisplayObject):void{ } mx_internal function getEffectsForProperty(_arg1:String):Array{ return (((_affectedProperties[_arg1])!=undefined) ? _affectedProperties[_arg1] : []); } override public function removeChildAt(_arg1:int):DisplayObject{ var _local2:DisplayObject = getChildAt(_arg1); removingChild(_local2); $removeChild(_local2); childRemoved(_local2); return (_local2); } protected function measure():void{ measuredMinWidth = 0; measuredMinHeight = 0; measuredWidth = 0; measuredHeight = 0; } public function set owner(_arg1:DisplayObjectContainer):void{ _owner = _arg1; } mx_internal function getNonNullSystemManager():ISystemManager{ var _local1:ISystemManager = systemManager; if (!_local1){ _local1 = ISystemManager(SystemManager.getSWFRoot(this)); }; if (!_local1){ return (SystemManagerGlobals.topLevelSystemManagers[0]); }; return (_local1); } 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 _local3:int; var _local4:IEffectInstance; var _local5:IEffectInstance; var _local6:Array; var _local7:int; var _local8:String; var _local9:int; var _local2:int = (_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; if (((_local4) && (_local4.hideFocusRing))){ preventDrawFocus = false; }; } private function commitCurrentState():void{ var _local3:StateChangeEvent; var _local1:IEffect = (playStateTransition) ? getTransition(_currentState, requestedCurrentState) : null; var _local2:String = findCommonBaseState(_currentState, requestedCurrentState); var _local4:String = (_currentState) ? _currentState : ""; var _local5:State = 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 includeInLayout():Boolean{ return (_includeInLayout); } private function dispatchResizeEvent():void{ var _local1:ResizeEvent = new ResizeEvent(ResizeEvent.RESIZE); _local1.oldWidth = oldWidth; _local1.oldHeight = oldHeight; dispatchEvent(_local1); oldWidth = width; oldHeight = height; } public function set maxWidth(_arg1:Number):void{ if (explicitMaxWidth == _arg1){ return; }; explicitMaxWidth = _arg1; } public function validateDisplayList():void{ var _local1:ISystemManager; var _local2:Number; var _local3:Number; if (invalidateDisplayListFlag){ _local1 = (parent as ISystemManager); if (_local1){ if ((((_local1 == systemManager.topLevelSystemManager)) && (!((_local1.document == this))))){ setActualSize(getExplicitOrMeasuredWidth(), getExplicitOrMeasuredHeight()); }; }; _local2 = ((scaleX == 0)) ? 0 : (width / scaleX); _local3 = ((scaleY == 0)) ? 0 : (height / scaleY); if (Math.abs((_local2 - lastUnscaledWidth)) < 1E-5){ _local2 = lastUnscaledWidth; }; if (Math.abs((_local3 - lastUnscaledHeight)) < 1E-5){ _local3 = lastUnscaledHeight; }; updateDisplayList(_local2, _local3); lastUnscaledWidth = _local2; lastUnscaledHeight = _local3; 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 set inheritingStyles(_arg1:Object):void{ _inheritingStyles = _arg1; } public function setFocus():void{ var _local1:ISystemManager = 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); }; } private function getTransition(_arg1:String, _arg2:String):IEffect{ var _local6:Transition; var _local3:IEffect; var _local4:int; if (!transitions){ return (null); }; if (!_arg1){ _arg1 = ""; }; if (!_arg2){ _arg2 = ""; }; var _local5:int; 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 initialized(_arg1:Boolean):void{ _initialized = _arg1; if (_arg1){ setVisible(_visible, true); dispatchEvent(new FlexEvent(FlexEvent.CREATION_COMPLETE)); }; } final mx_internal function set $y(_arg1:Number):void{ super.y = _arg1; } public function owns(_arg1:DisplayObject):Boolean{ var _local2:IChildList = ((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 $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); }; }; }; } public function get nonInheritingStyles():Object{ return (_nonInheritingStyles); } public function effectStarted(_arg1:IEffectInstance):void{ var _local4:String; _effectsStarted.push(_arg1); var _local2:Array = _arg1.effect.getAffectedProperties(); var _local3:int; while (_local3 < _local2.length) { _local4 = _local2[_local3]; if (_affectedProperties[_local4] == undefined){ _affectedProperties[_local4] = []; }; _affectedProperties[_local4].push(_arg1); _local3++; }; isEffectStarted = true; if (_arg1.hideFocusRing){ preventDrawFocus = true; drawFocus(false); }; } final mx_internal function set $x(_arg1:Number):void{ super.x = _arg1; } private function applyState(_arg1:String, _arg2:String):void{ var _local4:Array; var _local5:int; var _local3:State = getState(_arg1); if (_arg1 == _arg2){ return; }; 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(); }; } 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); } override public function get width():Number{ return (_width); } final mx_internal function get $parent():DisplayObjectContainer{ return (super.parent); } public function set explicitMinWidth(_arg1:Number):void{ if (_explicitMinWidth == _arg1){ return; }; _explicitMinWidth = _arg1; invalidateSize(); var _local2:IInvalidating = (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 _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; var _local1:Boolean; 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 = new MoveEvent(MoveEvent.MOVE); _local1.oldX = oldX; _local1.oldY = oldY; dispatchEvent(_local1); oldX = x; oldY = y; } public function drawFocus(_arg1:Boolean):void{ var _local4:DisplayObjectContainer; var _local5:Class; if (!parent){ return; }; var _local2:DisplayObject = getFocusObject(); var _local3:Sprite = (focusManager) ? focusManager.focusPane : null; if (((_arg1) && (!(preventDrawFocus)))){ _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){ hasFocusRect = false; 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); }; }; } public function get flexContextMenu():IFlexContextMenu{ return (_flexContextMenu); } private function get indexedID():String{ var _local1:String = id; var _local2:Array = instanceIndices; if (_local2){ _local1 = (_local1 + (("[" + _local2.join("][")) + "]")); }; return (_local1); } public function get measuredMinHeight():Number{ return (_measuredMinHeight); } mx_internal function addingChild(_arg1:DisplayObject):void{ if ((((_arg1 is IUIComponent)) && (!(IUIComponent(_arg1).document)))){ IUIComponent(_arg1).document = (document) ? document : ApplicationGlobals.application; }; if ((((_arg1 is UIComponent)) && ((UIComponent(_arg1).moduleFactory == null)))){ if (moduleFactory != null){ UIComponent(_arg1).moduleFactory = moduleFactory; } else { if ((((document is IFlexModule)) && (!((document.moduleFactory == null))))){ UIComponent(_arg1).moduleFactory = document.moduleFactory; } else { if ((((parent is UIComponent)) && (!((UIComponent(parent).moduleFactory == null))))){ UIComponent(_arg1).moduleFactory = UIComponent(parent).moduleFactory; }; }; }; }; if ((((((_arg1 is IFontContextComponent)) && ((!(_arg1) is UIComponent)))) && ((IFontContextComponent(_arg1).fontContext == null)))){ IFontContextComponent(_arg1).fontContext = moduleFactory; }; if ((_arg1 is IUIComponent)){ IUIComponent(_arg1).parentChanged(this); }; if ((_arg1 is ILayoutManagerClient)){ ILayoutManagerClient(_arg1).nestLevel = (nestLevel + 1); } else { if ((_arg1 is IUITextField)){ IUITextField(_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 IUITextField)) && (IUITextField(_arg1).inheritingStyles))){ StyleProtoChain.initTextField(IUITextField(_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(); }; } public function set repeaterIndices(_arg1:Array):void{ _repeaterIndices = _arg1; } protected function initializationComplete():void{ processedDescriptors = true; } public function set moduleFactory(_arg1:IFlexModuleFactory):void{ var _local4:UIComponent; var _local2:int = numChildren; var _local3:int; while (_local3 < _local2) { _local4 = (getChildAt(_local3) as UIComponent); if (!_local4){ } else { if ((((_local4.moduleFactory == null)) || ((_local4.moduleFactory == _moduleFactory)))){ _local4.moduleFactory = _arg1; }; }; _local3++; }; _moduleFactory = _arg1; } private function focusObj_removedHandler(_arg1:Event):void{ if (_arg1.target != this){ return; }; var _local2:DisplayObject = 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 _local4:InteractiveObject; super.doubleClickEnabled = _arg1; if ((this is IRawChildrenContainer)){ _local2 = IRawChildrenContainer(this).rawChildren; } else { _local2 = IChildList(this); }; var _local3:int; 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 _local5:ISimpleStyleClient; cachedTextFormat = null; var _local3:int = numChildren; var _local4:int; 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{ if (_explicitMaxWidth == _arg1){ return; }; _explicitMaxWidth = _arg1; invalidateSize(); var _local2:IInvalidating = (parent as IInvalidating); if (_local2){ _local2.invalidateSize(); _local2.invalidateDisplayList(); }; dispatchEvent(new Event("explicitMaxWidthChanged")); } public function set document(_arg1:Object):void{ var _local4:IUIComponent; var _local2:int = numChildren; var _local3:int; while (_local3 < _local2) { _local4 = (getChildAt(_local3) as IUIComponent); if (!_local4){ } else { if ((((_local4.document == _document)) || ((_local4.document == ApplicationGlobals.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(); }; }; }; } public function get validationSubField():String{ return (_validationSubField); } override public function dispatchEvent(_arg1:Event):Boolean{ if (dispatchEventHook != null){ dispatchEventHook(_arg1, this); }; return (super.dispatchEvent(_arg1)); } public function set id(_arg1:String):void{ _id = _arg1; } private function overlay_resizeHandler(_arg1:Event):void{ fillOverlay(overlay, overlayColor, null); } public function set updateCompletePendingFlag(_arg1:Boolean):void{ _updateCompletePendingFlag = _arg1; } final mx_internal function get $height():Number{ return (super.height); } protected function attachOverlay():void{ addChild(overlay); } public function get explicitMinHeight():Number{ return (_explicitMinHeight); } 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")); }; } public function get numAutomationChildren():int{ if (automationDelegate){ return (automationDelegate.numAutomationChildren); }; return (0); } public function get parentApplication():Object{ var _local2:UIComponent; var _local1:Object = systemManager.document; if (_local1 == this){ _local2 = (_local1.systemManager.parent as UIComponent); _local1 = (_local2) ? _local2.systemManager.document : null; }; return (_local1); } public function localToContent(_arg1:Point):Point{ return (_arg1); } public function get repeaterIndex():int{ return ((_repeaterIndices) ? _repeaterIndices[(_repeaterIndices.length - 1)] : -1); } private function removeState(_arg1:String, _arg2:String):void{ var _local4:Array; var _local5:int; var _local3:State = getState(_arg1); if (_arg1 == _arg2){ return; }; 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{ if (_arg1 == "styleName"){ styleName = _arg2; return; }; if (EffectManager.getEventForEffectTrigger(_arg1) != ""){ EffectManager.setStyle(_arg1, this); }; var _local3:Boolean = StyleManager.isInheritingStyle(_arg1); var _local4 = !((inheritingStyles == UIComponent.STYLE_UNINITIALIZED)); var _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 showInAutomationHierarchy():Boolean{ return (_showInAutomationHierarchy); } public function get systemManager():ISystemManager{ var _local1:DisplayObject; var _local2:DisplayObjectContainer; var _local3:IUIComponent; if (((!(_systemManager)) || (_systemManagerDirty))){ _local1 = root; if (((_local1) && (!((_local1 is Stage))))){ _systemManager = (_local1 as ISystemManager); } else { if (_local1){ _systemManager = (Stage(_local1).getChildAt(0) as ISystemManager); } else { _local2 = parent; while (_local2) { _local3 = (_local2 as IUIComponent); if (_local3){ _systemManager = _local3.systemManager; break; }; _local2 = _local2.parent; }; }; }; _systemManagerDirty = false; }; return (_systemManager); } private function isBaseState(_arg1:String):Boolean{ return (((!(_arg1)) || ((_arg1 == "")))); } public function set enabled(_arg1:Boolean):void{ _enabled = _arg1; cachedTextFormat = null; invalidateDisplayList(); dispatchEvent(new Event("enabledChanged")); } public function set focusEnabled(_arg1:Boolean):void{ _focusEnabled = _arg1; } public function get minWidth():Number{ if (!isNaN(explicitMinWidth)){ return (explicitMinWidth); }; return (measuredMinWidth); } private function setFocusLater(_arg1:Event=null):void{ var _local2:ISystemManager = 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 initializeRepeaterArrays(_arg1:IRepeaterClient):void{ if (((((((_arg1) && (_arg1.instanceIndices))) && (!(_instanceIndices)))) && (!(_arg1.isDocument)))){ _instanceIndices = _arg1.instanceIndices; _repeaters = _arg1.repeaters; _repeaterIndices = _arg1.repeaterIndices; }; } public function get baselinePosition():Number{ if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){ return (NaN); }; if (!validateBaselinePosition()){ return (NaN); }; var _local1:TextLineMetrics = measureText("Wj"); if (height < ((2 + _local1.ascent) + 2)){ return (int((height + ((_local1.ascent - height) / 2)))); }; return ((2 + _local1.ascent)); } public function get measuredWidth():Number{ return (_measuredWidth); } public function set instanceIndices(_arg1:Array):void{ _instanceIndices = _arg1; } 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 ([]); } private function addedHandler(_arg1:Event):void{ if (_arg1.eventPhase != EventPhase.AT_TARGET){ return; }; if ((((parent is IContainer)) && (IContainer(parent).creatingContentPane))){ _arg1.stopImmediatePropagation(); return; }; } public function parentChanged(_arg1:DisplayObjectContainer):void{ if (!_arg1){ _parent = null; _nestLevel = 0; } else { if ((_arg1 is IStyleClient)){ _parent = _arg1; } else { if ((_arg1 is ISystemManager)){ _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 addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject{ var _local3:DisplayObjectContainer = _arg1.parent; if (((_local3) && (!((_local3 is Loader))))){ _local3.removeChild(_arg1); }; 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 get maxWidth():Number{ return ((isNaN(explicitMaxWidth)) ? DEFAULT_MAX_WIDTH : explicitMaxWidth); } override public function set alpha(_arg1:Number):void{ super.alpha = _arg1; dispatchEvent(new Event("alphaChanged")); } private function removedHandler(_arg1:Event):void{ if (_arg1.eventPhase != EventPhase.AT_TARGET){ return; }; if ((((parent is IContainer)) && (IContainer(parent).creatingContentPane))){ _arg1.stopImmediatePropagation(); return; }; _systemManagerDirty = true; } public function callLater(_arg1:Function, _arg2:Array=null):void{ methodQueue.push(new MethodQueueElement(_arg1, _arg2)); var _local3:ISystemManager = 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(); }; } public function get initialized():Boolean{ return (_initialized); } private function callLaterDispatcher2(_arg1:Event):void{ var _local6:MethodQueueElement; if (UIComponentGlobals.callLaterSuspendCount > 0){ return; }; var _local2:ISystemManager = systemManager; if (((((_local2) && (_local2.stage))) && (listeningForRender))){ _local2.stage.removeEventListener(Event.RENDER, callLaterDispatcher); _local2.stage.removeEventListener(Event.ENTER_FRAME, callLaterDispatcher); listeningForRender = false; }; var _local3:Array = methodQueue; methodQueue = []; var _local4:int = _local3.length; var _local5:int; 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{ if (((!(states)) || (isBaseState(_arg1)))){ return (null); }; var _local2:int; while (_local2 < states.length) { if (states[_local2].name == _arg1){ return (states[_local2]); }; _local2++; }; var _local3:String = resourceManager.getString("core", "stateUndefined", [_arg1]); throw (new ArgumentError(_local3)); } public function validateProperties():void{ if (invalidatePropertiesFlag){ commitProperties(); invalidatePropertiesFlag = false; }; } 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 cache:Array; var myRoot:DisplayObject; var s:CSSStyleDeclaration; var factory:IFlexModuleFactory = ModuleManager.getAssociatedFactory(this); if (factory != null){ myApplicationDomain = ApplicationDomain(factory.info()["currentDomain"]); } else { myRoot = SystemManager.getSWFRoot(this); if (!myRoot){ return ([]); }; myApplicationDomain = myRoot.loaderInfo.applicationDomain; }; var className:String = getQualifiedClassName(this); className = className.replace("::", "."); cache = StyleManager.typeSelectorCache[className]; if (cache){ return (cache); }; var decls:Array = []; var classNames:Array = []; var caches:Array = []; var declcache:Array = []; 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 set measuredMinWidth(_arg1:Number):void{ _measuredMinWidth = _arg1; } private function initializeState(_arg1:String):void{ var _local2:State = getState(_arg1); while (_local2) { _local2.initialize(); _local2 = getState(_local2.basedOn); }; } mx_internal function initProtoChain():void{ var _local1:CSSStyleDeclaration; var _local7:Object; var _local8:CSSStyleDeclaration; if (styleName){ if ((styleName is CSSStyleDeclaration)){ _local1 = CSSStyleDeclaration(styleName); } else { if ((((styleName is IFlexDisplayObject)) || ((styleName is IStyleClient)))){ StyleProtoChain.initProtoChainForUIComponentStyleName(this); return; }; if ((styleName is String)){ _local1 = StyleManager.getStyleDeclaration(("." + styleName)); }; }; }; var _local2:Object = StyleManager.stylesRoot; if (((_local2) && (_local2.effects))){ registerEffects(_local2.effects); }; var _local3:IStyleClient = (parent as IStyleClient); if (_local3){ _local7 = _local3.inheritingStyles; if (_local7 == UIComponent.STYLE_UNINITIALIZED){ _local7 = _local2; }; } else { if (isPopUp){ if ((((((FlexVersion.compatibilityVersion >= FlexVersion.VERSION_3_0)) && (_owner))) && ((_owner is IStyleClient)))){ _local7 = IStyleClient(_owner).inheritingStyles; } else { _local7 = ApplicationGlobals.application.inheritingStyles; }; } else { _local7 = StyleManager.stylesRoot; }; }; var _local4:Array = getClassStyleDeclarations(); var _local5:int = _local4.length; var _local6:int; 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() : []); } override public function removeChild(_arg1:DisplayObject):DisplayObject{ removingChild(_arg1); $removeChild(_arg1); childRemoved(_arg1); return (_arg1); } private function focusObj_moveHandler(_arg1:MoveEvent):void{ adjustFocusRect(); } public function get styleDeclaration():CSSStyleDeclaration{ return (_styleDeclaration); } override public function get doubleClickEnabled():Boolean{ return (super.doubleClickEnabled); } public function contentToLocal(_arg1:Point):Point{ return (_arg1); } private function creationCompleteHandler(_arg1:FlexEvent):void{ if (_currentStateChanged){ _currentStateChanged = false; commitCurrentState(); validateNow(); }; removeEventListener(FlexEvent.CREATION_COMPLETE, creationCompleteHandler); } public function set measuredHeight(_arg1:Number):void{ _measuredHeight = _arg1; } protected function createChildren():void{ } public function get activeEffects():Array{ return (_effectsStarted); } 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 regenerateStyleCache(_arg1:Boolean):void{ var _local5:DisplayObject; initProtoChain(); var _local2:IChildList = ((this is IRawChildrenContainer)) ? IRawChildrenContainer(this).rawChildren : IChildList(this); var _local3:int = _local2.numChildren; var _local4:int; 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 IUITextField)){ if (IUITextField(_local5).inheritingStyles){ StyleProtoChain.initTextField(IUITextField(_local5)); }; }; }; _local4++; }; } public function get updateCompletePendingFlag():Boolean{ return (_updateCompletePendingFlag); } protected function focusOutHandler(_arg1:FocusEvent):void{ if (isOurFocus(DisplayObject(_arg1.target))){ drawFocus(false); }; } public function getFocus():InteractiveObject{ var _local1:ISystemManager = systemManager; if (!_local1){ return (null); }; if (UIComponentGlobals.nextFocusObject){ return (UIComponentGlobals.nextFocusObject); }; return (_local1.stage.focus); } public function endEffectsStarted():void{ var _local1:int = _effectsStarted.length; var _local2:int; while (_local2 < _local1) { _effectsStarted[_local2].end(); _local2++; }; } protected function get unscaledHeight():Number{ return ((height / Math.abs(scaleY))); } public function get enabled():Boolean{ return (_enabled); } public function get focusEnabled():Boolean{ return (_focusEnabled); } override public function set cacheAsBitmap(_arg1:Boolean):void{ super.cacheAsBitmap = _arg1; cacheAsBitmapCount = (_arg1) ? 1 : 0; } 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 getConstraintValue(_arg1:String){ return (getStyle(_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 get cursorManager():ICursorManager{ var _local2:ICursorManager; var _local1:DisplayObject = parent; while (_local1) { if ((((_local1 is IUIComponent)) && (("cursorManager" in _local1)))){ _local2 = _local1["cursorManager"]; return (_local2); }; _local1 = _local1.parent; }; return (CursorManager.getInstance()); } 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 get repeater():IRepeater{ return ((_repeaters) ? _repeaters[(_repeaters.length - 1)] : null); } public function set isPopUp(_arg1:Boolean):void{ _isPopUp = _arg1; } public function get measuredHeight():Number{ return (_measuredHeight); } public function initialize():void{ if (initialized){ return; }; dispatchEvent(new FlexEvent(FlexEvent.PREINITIALIZE)); createChildren(); childrenCreated(); initializeAccessibility(); initializationComplete(); } 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 set percentHeight(_arg1:Number):void{ if (_percentHeight == _arg1){ return; }; if (!isNaN(_arg1)){ _explicitHeight = NaN; }; _percentHeight = _arg1; var _local2:IInvalidating = (parent as IInvalidating); if (_local2){ _local2.invalidateSize(); _local2.invalidateDisplayList(); }; } final mx_internal function set $visible(_arg1:Boolean):void{ super.visible = _arg1; } private function findCommonBaseState(_arg1:String, _arg2:String):String{ var _local3:State = getState(_arg1); var _local4:State = getState(_arg2); if (((!(_local3)) || (!(_local4)))){ return (""); }; if (((isBaseState(_local3.basedOn)) && (isBaseState(_local4.basedOn)))){ return (""); }; var _local5:Array = getBaseStates(_local3); var _local6:Array = getBaseStates(_local4); var _local7 = ""; while (_local5[(_local5.length - 1)] == _local6[(_local6.length - 1)]) { _local7 = _local5.pop(); _local6.pop(); if (((!(_local5.length)) || (!(_local6.length)))){ break; }; }; if (((_local5.length) && ((_local5[(_local5.length - 1)] == _local4.name)))){ _local7 = _local4.name; } else { if (((_local6.length) && ((_local6[(_local6.length - 1)] == _local3.name)))){ _local7 = _local3.name; }; }; 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); } protected function initializeAccessibility():void{ if (UIComponent.createAccessibilityImplementation != null){ UIComponent.createAccessibilityImplementation(this); }; } public function set explicitMaxHeight(_arg1:Number):void{ if (_explicitMaxHeight == _arg1){ return; }; _explicitMaxHeight = _arg1; invalidateSize(); var _local2:IInvalidating = (parent as IInvalidating); if (_local2){ _local2.invalidateSize(); _local2.invalidateDisplayList(); }; dispatchEvent(new Event("explicitMaxHeightChanged")); } public function get focusManager():IFocusManager{ if (_focusManager){ return (_focusManager); }; var _local1:DisplayObject = 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); } protected function get resourceManager():IResourceManager{ return (_resourceManager); } mx_internal function validateBaselinePosition():Boolean{ var _local1:Number; var _local2:Number; if (!parent){ return (false); }; if ((((width == 0)) && ((height == 0)))){ validateNow(); _local1 = getExplicitOrMeasuredWidth(); _local2 = getExplicitOrMeasuredHeight(); setActualSize(_local1, _local2); }; validateNow(); return (true); } mx_internal function cancelAllCallLaters():void{ var _local1:ISystemManager = 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:FlexEvent):void{ UIComponentGlobals.layoutManager.removeEventListener(FlexEvent.UPDATE_COMPLETE, updateCompleteHandler); processEffectFinished(_endingEffectInstances); _endingEffectInstances = []; } public function styleChanged(_arg1:String):void{ if ((((this is IFontContextComponent)) && (hasFontContextChanged()))){ invalidateProperties(); }; 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 _local13:Number; var _local14:Array; var _local15:Matrix; var _local16:Object; var _local12:Graphics = 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; 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{ var _local2:String = _toolTip; _toolTip = _arg1; ToolTipManager.registerToolTip(this, _local2, _arg1); dispatchEvent(new Event("toolTipChanged")); } public function set repeaters(_arg1:Array):void{ _repeaters = _arg1; } public function get explicitMaxHeight():Number{ return (_explicitMaxHeight); } public function measureText(_arg1:String):TextLineMetrics{ return (determineTextFormatFromStyles().measureText(_arg1)); } public function get styleName():Object{ return (_styleName); } protected function createInModuleContext(_arg1:IFlexModuleFactory, _arg2:String):Object{ var _local3:Object; if (_arg1){ _local3 = _arg1.create(_arg2); }; return (_local3); } 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); } protected function childrenCreated():void{ invalidateProperties(); invalidateSize(); invalidateDisplayList(); } public function set flexContextMenu(_arg1:IFlexContextMenu):void{ if (_flexContextMenu){ _flexContextMenu.unsetContextMenu(this); }; _flexContextMenu = _arg1; if (_arg1 != null){ _flexContextMenu.setContextMenu(this); }; } public function set explicitWidth(_arg1:Number):void{ if (_explicitWidth == _arg1){ return; }; if (!isNaN(_arg1)){ _percentWidth = NaN; }; _explicitWidth = _arg1; invalidateSize(); var _local2:IInvalidating = (parent as IInvalidating); if (((_local2) && (includeInLayout))){ _local2.invalidateSize(); _local2.invalidateDisplayList(); }; dispatchEvent(new Event("explicitWidthChanged")); } private function setBorderColorForErrorString():void{ if (((!(_errorString)) || ((_errorString.length == 0)))){ if (!isNaN(origBorderColor)){ setStyle("borderColor", origBorderColor); saveBorderColor = true; }; } else { if (saveBorderColor){ saveBorderColor = false; origBorderColor = getStyle("borderColor"); }; setStyle("borderColor", getStyle("errorColor")); }; styleChanged("themeColor"); var _local1:IFocusManager = focusManager; var _local2:DisplayObject = (_local1) ? DisplayObject(_local1.getFocus()) : null; if (((((_local1) && (_local1.showFocusIndicator))) && ((_local2 == this)))){ drawFocus(true); }; } public function get explicitWidth():Number{ return (_explicitWidth); } public function invalidateSize():void{ if (!invalidateSizeFlag){ invalidateSizeFlag = true; if (((parent) && (UIComponentGlobals.layoutManager))){ UIComponentGlobals.layoutManager.invalidateSize(this); }; }; } public function set measuredMinHeight(_arg1:Number):void{ _measuredMinHeight = _arg1; } protected function updateDisplayList(_arg1:Number, _arg2:Number):void{ } 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; } private static function get embeddedFontRegistry():IEmbeddedFontRegistry{ if (!_embeddedFontRegistry){ _embeddedFontRegistry = IEmbeddedFontRegistry(Singleton.getInstance("mx.core::IEmbeddedFontRegistry")); }; return (_embeddedFontRegistry); } public static function resumeBackgroundProcessing():void{ var _local1:ISystemManager; 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 262
//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 = "3.0.0.0"; public static const OFF:String = "off"; } }//package mx.core
Section 263
//UIComponentDescriptor (mx.core.UIComponentDescriptor) package mx.core { public class UIComponentDescriptor extends ComponentDescriptor { mx_internal var instanceIndices:Array; public var stylesFactory:Function; public var effects:Array; mx_internal var repeaters:Array; mx_internal var repeaterIndices:Array; mx_internal static const VERSION:String = "3.0.0.0"; public function UIComponentDescriptor(_arg1:Object){ super(_arg1); } override public function toString():String{ return (("UIComponentDescriptor_" + id)); } } }//package mx.core
Section 264
//UIComponentGlobals (mx.core.UIComponentGlobals) package mx.core { import flash.display.*; import mx.managers.*; import flash.geom.*; 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; private static var _catchCallLaterExceptions:Boolean = false; public static function set catchCallLaterExceptions(_arg1:Boolean):void{ _catchCallLaterExceptions = _arg1; } public static function get designMode():Boolean{ return (designTime); } public static function set designMode(_arg1:Boolean):void{ designTime = _arg1; } public static function get catchCallLaterExceptions():Boolean{ return (_catchCallLaterExceptions); } } }//package mx.core
Section 265
//UITextField (mx.core.UITextField) package mx.core { import mx.automation.*; import flash.events.*; import flash.display.*; import mx.managers.*; import mx.resources.*; import mx.styles.*; import flash.text.*; import mx.utils.*; import flash.utils.*; public class UITextField extends FlexTextField implements IAutomationObject, IIMESupport, IFlexModule, IInvalidating, ISimpleStyleClient, IToolTipManagerClient, IUITextField { private var _enabled:Boolean;// = true private var untruncatedText:String; private var cachedEmbeddedFont:EmbeddedFont;// = null private var cachedTextFormat:TextFormat; private var _automationDelegate:IAutomationObject; private var _automationName:String; private var _styleName:Object; private var _document:Object; mx_internal var _toolTip:String; private var _nestLevel:int;// = 0 private var _explicitHeight:Number; private var _moduleFactory:IFlexModuleFactory; private var _initialized:Boolean;// = false private var _nonInheritingStyles:Object; private var _inheritingStyles:Object; private var _includeInLayout:Boolean;// = true private var invalidateDisplayListFlag:Boolean;// = true mx_internal var explicitColor:uint;// = 4294967295 private var _processedDescriptors:Boolean;// = true private var _updateCompletePendingFlag:Boolean;// = false private var explicitHTMLText:String;// = null mx_internal var _parent:DisplayObjectContainer; private var _imeMode:String;// = null private var resourceManager:IResourceManager; mx_internal var styleChangedFlag:Boolean;// = true private var _ignorePadding:Boolean;// = true private var _owner:DisplayObjectContainer; private var _explicitWidth:Number; mx_internal static const TEXT_WIDTH_PADDING:int = 5; mx_internal static const TEXT_HEIGHT_PADDING:int = 4; mx_internal static const VERSION:String = "3.0.0.0"; private static var truncationIndicatorResource:String; private static var _embeddedFontRegistry:IEmbeddedFontRegistry; mx_internal static var debuggingBorders:Boolean = false; public function UITextField(){ resourceManager = ResourceManager.getInstance(); _inheritingStyles = UIComponent.STYLE_UNINITIALIZED; _nonInheritingStyles = UIComponent.STYLE_UNINITIALIZED; super(); super.text = ""; focusRect = false; selectable = false; tabEnabled = false; if (debuggingBorders){ border = true; }; if (!truncationIndicatorResource){ truncationIndicatorResource = resourceManager.getString("core", "truncationIndicator"); }; addEventListener(Event.CHANGE, changeHandler); addEventListener("textFieldStyleChange", textFieldStyleChangeHandler); resourceManager.addEventListener(Event.CHANGE, resourceManager_changeHandler, false, 0, true); } public function set imeMode(_arg1:String):void{ _imeMode = _arg1; } public function get nestLevel():int{ return (_nestLevel); } private function textFieldStyleChangeHandler(_arg1:Event):void{ if (explicitHTMLText != null){ super.htmlText = explicitHTMLText; }; } public function truncateToFit(_arg1:String=null):Boolean{ var _local4:String; if (!_arg1){ _arg1 = truncationIndicatorResource; }; validateNow(); var _local2:String = super.text; untruncatedText = _local2; var _local3:Number = width; if (((!((_local2 == ""))) && (((textWidth + TEXT_WIDTH_PADDING) > (_local3 + 1E-14))))){ 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 set nestLevel(_arg1:int):void{ if ((((_arg1 > 1)) && (!((_nestLevel == _arg1))))){ _nestLevel = _arg1; StyleProtoChain.initTextField(this); styleChangedFlag = true; validateNow(); }; } public function get minHeight():Number{ return (0); } public function getExplicitOrMeasuredHeight():Number{ return ((isNaN(explicitHeight)) ? measuredHeight : explicitHeight); } 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 className():String{ var _local1:String = getQualifiedClassName(this); var _local2:int = _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(); } override public function replaceText(_arg1:int, _arg2:int, _arg3:String):void{ super.replaceText(_arg1, _arg2, _arg3); dispatchEvent(new Event("textReplace")); } private function creatingSystemManager():ISystemManager{ return ((((!((moduleFactory == null))) && ((moduleFactory is ISystemManager)))) ? ISystemManager(moduleFactory) : systemManager); } public function set document(_arg1:Object):void{ _document = _arg1; } public function get automationName():String{ if (_automationName){ return (_automationName); }; if (automationDelegate){ return (automationDelegate.automationName); }; return (""); } public function get explicitMinHeight():Number{ return (NaN); } public function get focusPane():Sprite{ return (null); } public function getTextStyles():TextFormat{ var _local1:TextFormat = 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); } 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 getExplicitOrMeasuredWidth():Number{ return ((isNaN(explicitWidth)) ? measuredWidth : explicitWidth); } public function get showInAutomationHierarchy():Boolean{ return (true); } public function set automationName(_arg1:String):void{ _automationName = _arg1; } public function get systemManager():ISystemManager{ var _local2:IUIComponent; var _local1:DisplayObject = parent; while (_local1) { _local2 = (_local1 as IUIComponent); if (_local2){ return (_local2.systemManager); }; _local1 = _local1.parent; }; return (null); } public function setStyle(_arg1:String, _arg2):void{ } public function get percentWidth():Number{ return (NaN); } public function get explicitHeight():Number{ return (_explicitHeight); } public function get baselinePosition():Number{ var _local1:TextLineMetrics; if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){ _local1 = getLineMetrics(0); return (((height - 4) - _local1.descent)); }; if (!parent){ return (NaN); }; var _local2 = (text == ""); if (_local2){ super.text = "Wj"; }; _local1 = getLineMetrics(0); if (_local2){ super.text = ""; }; return ((2 + _local1.ascent)); } 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 tweeningProperties():Array{ return (null); } public function get measuredWidth():Number{ validateNow(); if (!stage){ return ((textWidth + TEXT_WIDTH_PADDING)); }; return (((textWidth * transform.concatenatedMatrix.d) + TEXT_WIDTH_PADDING)); } public function set tweeningProperties(_arg1:Array):void{ } public function createAutomationIDPart(_arg1:IAutomationObject):Object{ return (null); } override public function get parent():DisplayObjectContainer{ return ((_parent) ? _parent : super.parent); } public function set updateCompletePendingFlag(_arg1:Boolean):void{ _updateCompletePendingFlag = _arg1; } public function setActualSize(_arg1:Number, _arg2:Number):void{ if (width != _arg1){ width = _arg1; }; if (height != _arg2){ height = _arg2; }; } public function get numAutomationChildren():int{ return (0); } public function set focusPane(_arg1:Sprite):void{ } public function getAutomationChildAt(_arg1:int):IAutomationObject{ return (null); } public function get inheritingStyles():Object{ return (_inheritingStyles); } public function get owner():DisplayObjectContainer{ return ((_owner) ? _owner : parent); } 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 maxWidth():Number{ return (UIComponent.DEFAULT_MAX_WIDTH); } private function getEmbeddedFont(_arg1:String, _arg2:Boolean, _arg3:Boolean):EmbeddedFont{ if (cachedEmbeddedFont){ if ((((cachedEmbeddedFont.fontName == _arg1)) && ((cachedEmbeddedFont.fontStyle == EmbeddedFontRegistry.getFontStyle(_arg2, _arg3))))){ return (cachedEmbeddedFont); }; }; cachedEmbeddedFont = new EmbeddedFont(_arg1, _arg2, _arg3); return (cachedEmbeddedFont); } public function get initialized():Boolean{ return (_initialized); } public function invalidateDisplayList():void{ invalidateDisplayListFlag = true; } public function invalidateProperties():void{ } override public function insertXMLText(_arg1:int, _arg2:int, _arg3:String, _arg4:Boolean=false):void{ super.insertXMLText(_arg1, _arg2, _arg3, _arg4); dispatchEvent(new Event("textInsert")); } 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 showInAutomationHierarchy(_arg1:Boolean):void{ } private function resourceManager_changeHandler(_arg1:Event):void{ truncationIndicatorResource = resourceManager.getString("core", "truncationIndicator"); if (untruncatedText != null){ super.text = untruncatedText; truncateToFit(); }; } public function set measuredMinWidth(_arg1:Number):void{ } public function set explicitHeight(_arg1:Number):void{ _explicitHeight = _arg1; } public function get explicitMinWidth():Number{ return (NaN); } public function set percentWidth(_arg1:Number):void{ } public function get imeMode():String{ return (_imeMode); } public function get moduleFactory():IFlexModuleFactory{ return (_moduleFactory); } public function set systemManager(_arg1:ISystemManager):void{ } public function get explicitMaxWidth():Number{ return (NaN); } public function get document():Object{ return (_document); } public function get updateCompletePendingFlag():Boolean{ return (_updateCompletePendingFlag); } public function replayAutomatableEvent(_arg1:Event):Boolean{ if (automationDelegate){ return (automationDelegate.replayAutomatableEvent(_arg1)); }; return (false); } public function get enabled():Boolean{ return (_enabled); } public function set owner(_arg1:DisplayObjectContainer):void{ _owner = _arg1; } public function get automationTabularData():Object{ return (null); } public function set nonInheritingStyles(_arg1:Object):void{ _nonInheritingStyles = _arg1; } public function get includeInLayout():Boolean{ return (_includeInLayout); } public function get measuredMinWidth():Number{ return (0); } public function set isPopUp(_arg1:Boolean):void{ } public function set automationDelegate(_arg1:Object):void{ _automationDelegate = (_arg1 as IAutomationObject); } public function get measuredHeight():Number{ validateNow(); if (!stage){ return ((textHeight + TEXT_HEIGHT_PADDING)); }; return (((textHeight * transform.concatenatedMatrix.a) + TEXT_HEIGHT_PADDING)); } public function set processedDescriptors(_arg1:Boolean):void{ _processedDescriptors = _arg1; } public function setFocus():void{ systemManager.stage.focus = this; } public function initialize():void{ } public function set percentHeight(_arg1:Number):void{ } public function resolveAutomationIDPart(_arg1:Object):Array{ return ([]); } public function set inheritingStyles(_arg1:Object):void{ _inheritingStyles = _arg1; } public function getUITextFormat():UITextFormat{ validateNow(); var _local1:UITextFormat = new UITextFormat(creatingSystemManager()); _local1.moduleFactory = moduleFactory; _local1.copyFrom(getTextFormat()); _local1.antiAliasType = antiAliasType; _local1.gridFitType = gridFitType; _local1.sharpness = sharpness; _local1.thickness = thickness; return (_local1); } private function changeHandler(_arg1:Event):void{ explicitHTMLText = null; } public function set initialized(_arg1:Boolean):void{ _initialized = _arg1; } public function get nonZeroTextHeight():Number{ var _local1:Number; if (super.text == ""){ super.text = "Wj"; _local1 = textHeight; super.text = ""; return (_local1); }; return (textHeight); } public function owns(_arg1:DisplayObject):Boolean{ return ((_arg1 == this)); } 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 get nonInheritingStyles():Object{ return (_nonInheritingStyles); } public function setVisible(_arg1:Boolean, _arg2:Boolean=false):void{ this.visible = _arg1; } public function get maxHeight():Number{ return (UIComponent.DEFAULT_MAX_HEIGHT); } public function get automationDelegate():Object{ return (_automationDelegate); } public function get isPopUp():Boolean{ return (false); } public function set ignorePadding(_arg1:Boolean):void{ _ignorePadding = _arg1; styleChanged(null); } public function set styleName(_arg1:Object):void{ if (_styleName === _arg1){ return; }; _styleName = _arg1; if (parent){ StyleProtoChain.initTextField(this); styleChanged("styleName"); }; } public function styleChanged(_arg1:String):void{ styleChangedFlag = true; if (!invalidateDisplayListFlag){ invalidateDisplayListFlag = true; if (("callLater" in parent)){ Object(parent).callLater(validateNow); }; }; } public function get percentHeight():Number{ return (NaN); } private function get isHTML():Boolean{ return (!((explicitHTMLText == null))); } public function get explicitMaxHeight():Number{ return (NaN); } public function get styleName():Object{ return (_styleName); } public function set explicitWidth(_arg1:Number):void{ _explicitWidth = _arg1; } public function validateNow():void{ var _local1:TextFormat; var _local2:EmbeddedFont; var _local3:IFlexModuleFactory; var _local4: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(); if (_local1.font){ _local2 = getEmbeddedFont(_local1.font, _local1.bold, _local1.italic); _local3 = embeddedFontRegistry.getAssociatedModuleFactory(_local2, moduleFactory); if (_local3 != null){ embedFonts = true; } else { _local4 = creatingSystemManager(); embedFonts = ((!((_local4 == null))) && (_local4.isFontFaceEmbedded(_local1))); }; } else { embedFonts = getStyle("embedFonts"); }; if (getStyle("fontAntiAliasType") != undefined){ 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 set toolTip(_arg1:String):void{ var _local2:String = _toolTip; _toolTip = _arg1; ToolTipManager.registerToolTip(this, _local2, _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 get ignorePadding():Boolean{ return (_ignorePadding); } public function get explicitWidth():Number{ return (_explicitWidth); } public function invalidateSize():void{ invalidateDisplayListFlag = true; } public function set measuredMinHeight(_arg1:Number):void{ } public function get measuredMinHeight():Number{ return (0); } public function set moduleFactory(_arg1:IFlexModuleFactory):void{ _moduleFactory = _arg1; } private static function get embeddedFontRegistry():IEmbeddedFontRegistry{ if (!_embeddedFontRegistry){ _embeddedFontRegistry = IEmbeddedFontRegistry(Singleton.getInstance("mx.core::IEmbeddedFontRegistry")); }; return (_embeddedFontRegistry); } } }//package mx.core
Section 266
//UITextFormat (mx.core.UITextFormat) package mx.core { import mx.managers.*; import flash.text.*; public class UITextFormat extends TextFormat { private var systemManager:ISystemManager; public var sharpness:Number; public var gridFitType:String; public var antiAliasType:String; public var thickness:Number; private var cachedEmbeddedFont:EmbeddedFont;// = null private var _moduleFactory:IFlexModuleFactory; mx_internal static const VERSION:String = "3.0.0.0"; private static var _embeddedFontRegistry:IEmbeddedFontRegistry; private static var _textFieldFactory:ITextFieldFactory; 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 set moduleFactory(_arg1:IFlexModuleFactory):void{ _moduleFactory = _arg1; } 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; } private function getEmbeddedFont(_arg1:String, _arg2:Boolean, _arg3:Boolean):EmbeddedFont{ if (cachedEmbeddedFont){ if ((((cachedEmbeddedFont.fontName == _arg1)) && ((cachedEmbeddedFont.fontStyle == EmbeddedFontRegistry.getFontStyle(_arg2, _arg3))))){ return (cachedEmbeddedFont); }; }; cachedEmbeddedFont = new EmbeddedFont(_arg1, _arg2, _arg3); return (cachedEmbeddedFont); } public function measureText(_arg1:String, _arg2:Boolean=true):TextLineMetrics{ return (measure(_arg1, false, _arg2)); } private function measure(_arg1:String, _arg2:Boolean, _arg3:Boolean):TextLineMetrics{ if (!_arg1){ _arg1 = ""; }; var _local4:Boolean; var _local5:IFlexModuleFactory = embeddedFontRegistry.getAssociatedModuleFactory(getEmbeddedFont(font, bold, italic), moduleFactory); _local4 = !((_local5 == null)); if (_local5 == null){ _local5 = systemManager; }; var _local6:TextField; _local6 = TextField(textFieldFactory.createTextField(_local5)); if (_arg2){ _local6.htmlText = ""; } else { _local6.text = ""; }; _local6.defaultTextFormat = this; if (font){ _local6.embedFonts = ((_local4) || (((!((systemManager == null))) && (systemManager.isFontFaceEmbedded(this))))); } else { _local6.embedFonts = false; }; _local6.antiAliasType = antiAliasType; _local6.gridFitType = gridFitType; _local6.sharpness = sharpness; _local6.thickness = thickness; if (_arg2){ _local6.htmlText = _arg1; } else { _local6.text = _arg1; }; var _local7:TextLineMetrics = _local6.getLineMetrics(0); if (_arg3){ _local7.width = Math.ceil(_local7.width); _local7.height = Math.ceil(_local7.height); }; return (_local7); } public function measureHTMLText(_arg1:String, _arg2:Boolean=true):TextLineMetrics{ return (measure(_arg1, true, _arg2)); } public function get moduleFactory():IFlexModuleFactory{ return (_moduleFactory); } private static function get embeddedFontRegistry():IEmbeddedFontRegistry{ if (!_embeddedFontRegistry){ _embeddedFontRegistry = IEmbeddedFontRegistry(Singleton.getInstance("mx.core::IEmbeddedFontRegistry")); }; return (_embeddedFontRegistry); } private static function get textFieldFactory():ITextFieldFactory{ if (!_textFieldFactory){ _textFieldFactory = ITextFieldFactory(Singleton.getInstance("mx.core::ITextFieldFactory")); }; return (_textFieldFactory); } } }//package mx.core
Section 267
//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 = "3.0.0.0"; public function AddRemoveEffectTargetFilter(){ filterProperties = ["parent"]; } override protected function defaultFilterFunction(_arg1:Array, _arg2:Object):Boolean{ var _local5:PropertyChanges; var _local3:int = _arg1.length; var _local4:int; 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 268
//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 = "3.0.0.0"; public function HideShowEffectTargetFilter(){ filterProperties = ["visible"]; } override protected function defaultFilterFunction(_arg1:Array, _arg2:Object):Boolean{ var _local5:PropertyChanges; var _local3:int = _arg1.length; var _local4:int; while (_local4 < _local3) { _local5 = _arg1[_local4]; if (_local5.target == _arg2){ return ((_local5.end["visible"] == show)); }; _local4++; }; return (false); } } }//package mx.effects.effectClasses
Section 269
//PropertyChanges (mx.effects.effectClasses.PropertyChanges) package mx.effects.effectClasses { public class PropertyChanges { public var target:Object; public var start:Object; public var end:Object; mx_internal static const VERSION:String = "3.0.0.0"; public function PropertyChanges(_arg1:Object){ end = {}; start = {}; super(); this.target = _arg1; } } }//package mx.effects.effectClasses
Section 270
//TweenEffectInstance (mx.effects.effectClasses.TweenEffectInstance) package mx.effects.effectClasses { import mx.core.*; import mx.events.*; import mx.effects.*; public class TweenEffectInstance extends EffectInstance { private var _seekTime:Number;// = 0 public var easingFunction:Function; public var tween:Tween; mx_internal var needToLayout:Boolean;// = false mx_internal static const VERSION:String = "3.0.0.0"; public function TweenEffectInstance(_arg1:Object){ super(_arg1); } override public function stop():void{ super.stop(); if (tween){ tween.stop(); }; } mx_internal function applyTweenStartValues():void{ if (duration > 0){ onTweenUpdate(tween.getCurrentValue(0)); }; } override public function get playheadTime():Number{ if (tween){ return ((tween.playheadTime + super.playheadTime)); }; return (0); } protected function createTween(_arg1:Object, _arg2:Object, _arg3:Object, _arg4:Number=-1, _arg5:Number=-1):Tween{ var _local6:Tween = 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); } private function tweenEventHandler(_arg1:TweenEvent):void{ dispatchEvent(_arg1); } 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); } 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 onTweenEnd(_arg1:Object):void{ onTweenUpdate(_arg1); tween = null; if (needToLayout){ UIComponentGlobals.layoutManager.validateNow(); }; finishRepeat(); } public function onTweenUpdate(_arg1:Object):void{ } override public function pause():void{ super.pause(); if (tween){ tween.pause(); }; } public function seek(_arg1:Number):void{ if (tween){ tween.seek(_arg1); } else { _seekTime = _arg1; }; } } }//package mx.effects.effectClasses
Section 271
//ZoomInstance (mx.effects.effectClasses.ZoomInstance) package mx.effects.effectClasses { import mx.core.*; import mx.events.*; import flash.events.*; import mx.effects.*; public class ZoomInstance extends TweenEffectInstance { private var newY:Number; public var originY:Number; private var origX:Number; private var origY:Number; public var originX:Number; private var origPercentHeight:Number; public var zoomWidthFrom:Number; public var zoomWidthTo:Number; private var newX:Number; public var captureRollEvents:Boolean; private var origPercentWidth:Number; public var zoomHeightFrom:Number; private var origScaleX:Number; public var zoomHeightTo:Number; private var origScaleY:Number; private var scaledOriginX:Number; private var scaledOriginY:Number; private var show:Boolean;// = true private var _mouseHasMoved:Boolean;// = false mx_internal static const VERSION:String = "3.0.0.0"; public function ZoomInstance(_arg1:Object){ 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)))); } override public function initEffect(_arg1:Event):void{ super.initEffect(_arg1); if ((((_arg1.type == FlexEvent.HIDE)) || ((_arg1.type == Event.REMOVED)))){ show = false; }; } private function getScaleFromHeight(_arg1:Number):Number{ return ((_arg1 / (target.height / Math.abs(target.scaleY)))); } private function applyPropertyChanges():void{ var _local2:Boolean; var _local3:Boolean; var _local1:PropertyChanges = 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"]; }; }; } 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 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.mx_internal::_width = _local2; }; }; if (!isNaN(origPercentHeight)){ _local3 = target.height; target.percentHeight = origPercentHeight; if (((target.parent) && ((target.parent.autoLayout == false)))){ target.mx_internal::_height = _local3; }; }; super.onTweenEnd(_arg1); if (mx_internal::hideOnEffectEnd){ EffectManager.suspendEventHandling(); target.scaleX = origScaleX; target.scaleY = origScaleY; target.move(origX, origY); EffectManager.resumeEventHandling(); }; } override public function onTweenUpdate(_arg1:Object):void{ EffectManager.suspendEventHandling(); if (Math.abs((newX - target.x)) > 0.1){ origX = (origX + (Number(target.x.toFixed(1)) - newX)); }; if (Math.abs((newY - target.y)) > 0.1){ origY = (origY + (Number(target.y.toFixed(1)) - newY)); }; target.scaleX = _arg1[0]; target.scaleY = _arg1[1]; var _local2:Number = (_arg1[0] / origScaleX); var _local3:Number = (_arg1[1] / origScaleY); var _local4:Number = (scaledOriginX * _local2); var _local5:Number = (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(); } } }//package mx.effects.effectClasses
Section 272
//Effect (mx.effects.Effect) package mx.effects { import mx.core.*; import mx.events.*; import flash.events.*; import mx.managers.*; import mx.effects.effectClasses.*; import flash.utils.*; public class Effect extends EventDispatcher implements IEffect { private var _perElementOffset:Number;// = 0 private var _hideFocusRing:Boolean;// = false private var _customFilter:EffectTargetFilter; public var repeatCount:int;// = 1 public var suspendBackgroundProcessing:Boolean;// = false public var startDelay:int;// = 0 private var _relevantProperties:Array; private var _callValidateNow:Boolean;// = false mx_internal var applyActualDimensions:Boolean;// = true private var _filter:String; private var _triggerEvent:Event; private var _effectTargetHost:IEffectTargetHost; mx_internal var durationExplicitlySet:Boolean;// = false public var repeatDelay:int;// = 0 private var _targets:Array; mx_internal var propertyChangesArray:Array; mx_internal var filterObject:EffectTargetFilter; protected var endValuesCaptured:Boolean;// = false public var instanceClass:Class; private var _duration:Number;// = 500 private var isPaused:Boolean;// = false private var _relevantStyles:Array; private var _instances:Array; mx_internal static const VERSION:String = "3.0.0.0"; public function Effect(_arg1:Object=null){ _instances = []; instanceClass = IEffectInstance; _relevantStyles = []; _targets = []; super(); this.target = _arg1; } public function get targets():Array{ return (_targets); } public function set targets(_arg1:Array):void{ var _local2:int = _arg1.length; var _local3:int = (_local2 - 1); while (_local3 > 0) { if (_arg1[_local3] == null){ _arg1.splice(_local3, 1); }; _local3--; }; _targets = _arg1; } public function set hideFocusRing(_arg1:Boolean):void{ _hideFocusRing = _arg1; } public function get hideFocusRing():Boolean{ return (_hideFocusRing); } public function stop():void{ var _local3:IEffectInstance; var _local1:int = _instances.length; var _local2:int = _local1; while (_local2 >= 0) { _local3 = IEffectInstance(_instances[_local2]); if (_local3){ _local3.stop(); }; _local2--; }; } 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); }; endValuesCaptured = false; } mx_internal function captureValues(_arg1:Array, _arg2:Boolean):Array{ var _local4:Object; var _local5:Object; var _local6:int; var _local7:int; var _local8:int; var _local9:int; var _local3:Array = (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++; }; }; var _local10:Array = (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); } protected function getValueFromTarget(_arg1:Object, _arg2:String){ if ((_arg2 in _arg1)){ return (_arg1[_arg2]); }; return (undefined); } public function set target(_arg1:Object):void{ _targets.splice(0); if (_arg1){ _targets[0] = _arg1; }; } public function get className():String{ var _local1:String = getQualifiedClassName(this); var _local2:int = _local1.indexOf("::"); if (_local2 != -1){ _local1 = _local1.substr((_local2 + 2)); }; return (_local1); } public function set perElementOffset(_arg1:Number):void{ _perElementOffset = _arg1; } 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 duration(_arg1:Number):void{ durationExplicitlySet = true; _duration = _arg1; } public function play(_arg1:Array=null, _arg2:Boolean=false):Array{ var _local6:IEffectInstance; if ((((_arg1 == null)) && (!((propertyChangesArray == null))))){ if (_callValidateNow){ LayoutManager.getInstance().validateNow(); }; if (!endValuesCaptured){ propertyChangesArray = captureValues(propertyChangesArray, false); }; propertyChangesArray = stripUnchangedValues(propertyChangesArray); applyStartValues(propertyChangesArray, this.targets); }; var _local3:Array = createInstances(_arg1); var _local4:int = _local3.length; var _local5:int; while (_local5 < _local4) { _local6 = IEffectInstance(_local3[_local5]); Object(_local6).playReversed = _arg2; _local6.startEffect(); _local5++; }; return (_local3); } public function captureEndValues():void{ propertyChangesArray = captureValues(propertyChangesArray, false); endValuesCaptured = true; } protected function filterInstance(_arg1:Array, _arg2:Object):Boolean{ if (filterObject){ return (filterObject.filterInstance(_arg1, effectTargetHost, _arg2)); }; return (true); } public function get customFilter():EffectTargetFilter{ return (_customFilter); } public function get effectTargetHost():IEffectTargetHost{ return (_effectTargetHost); } public function set relevantProperties(_arg1:Array):void{ _relevantProperties = _arg1; } public function captureMoreStartValues(_arg1:Array):void{ var _local2:Array; var _local3:int; if (_arg1.length > 0){ _local2 = []; _local3 = 0; while (_local3 < _arg1.length) { _local2.push(new PropertyChanges(_arg1[_local3])); _local3++; }; _local2 = captureValues(_local2, true); propertyChangesArray = propertyChangesArray.concat(_local2); }; } public function deleteInstance(_arg1:IEffectInstance):void{ EventDispatcher(_arg1).removeEventListener(EffectEvent.EFFECT_START, effectStartHandler); EventDispatcher(_arg1).removeEventListener(EffectEvent.EFFECT_END, effectEndHandler); var _local2:int = _instances.length; var _local3:int; while (_local3 < _local2) { if (_instances[_local3] === _arg1){ _instances.splice(_local3, 1); }; _local3++; }; } public function get filter():String{ return (_filter); } public function set triggerEvent(_arg1:Event):void{ _triggerEvent = _arg1; } public function get target():Object{ if (_targets.length > 0){ return (_targets[0]); }; return (null); } public function get duration():Number{ return (_duration); } public function set customFilter(_arg1:EffectTargetFilter):void{ _customFilter = _arg1; filterObject = _arg1; } public function get perElementOffset():Number{ return (_perElementOffset); } public function set effectTargetHost(_arg1:IEffectTargetHost):void{ _effectTargetHost = _arg1; } public function get isPlaying():Boolean{ return (((_instances) && ((_instances.length > 0)))); } protected function effectEndHandler(_arg1:EffectEvent):void{ var _local2:IEffectInstance = IEffectInstance(_arg1.effectInstance); deleteInstance(_local2); dispatchEvent(_arg1); } public function get relevantProperties():Array{ if (_relevantProperties){ return (_relevantProperties); }; return (getAffectedProperties()); } public function createInstance(_arg1:Object=null):IEffectInstance{ var _local6:int; var _local7:int; if (!_arg1){ _arg1 = this.target; }; var _local2:IEffectInstance; var _local3:PropertyChanges; var _local4:Boolean; var _local5:Boolean; 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 (triggerEvent){ _local2.initEffect(triggerEvent); }; }; return (_local2); } protected function effectStartHandler(_arg1:EffectEvent):void{ dispatchEvent(_arg1); } public function getAffectedProperties():Array{ return ([]); } public function set relevantStyles(_arg1:Array):void{ _relevantStyles = _arg1; } public function get triggerEvent():Event{ return (_triggerEvent); } 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 initInstance(_arg1:IEffectInstance):void{ _arg1.duration = duration; Object(_arg1).durationExplicitlySet = durationExplicitlySet; _arg1.effect = this; _arg1.effectTargetHost = effectTargetHost; _arg1.hideFocusRing = hideFocusRing; _arg1.repeatCount = repeatCount; _arg1.repeatDelay = repeatDelay; _arg1.startDelay = startDelay; _arg1.suspendBackgroundProcessing = suspendBackgroundProcessing; } mx_internal function applyStartValues(_arg1:Array, _arg2:Array):void{ var _local6:int; var _local7:int; var _local8:Object; var _local9:Boolean; var _local3:Array = relevantProperties; var _local4:int = _arg1.length; var _local5:int; 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 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--; }; }; } public function get relevantStyles():Array{ return (_relevantStyles); } public function createInstances(_arg1:Array=null):Array{ var _local6:IEffectInstance; if (!_arg1){ _arg1 = this.targets; }; var _local2:Array = []; var _local3:int = _arg1.length; var _local4:Number = 0; var _local5:int; while (_local5 < _local3) { _local6 = createInstance(_arg1[_local5]); if (_local6){ _local6.startDelay = (_local6.startDelay + _local4); _local4 = (_local4 + perElementOffset); _local2.push(_local6); }; _local5++; }; triggerEvent = null; return (_local2); } 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 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; case "addItem": filterObject = new EffectTargetFilter(); filterObject.requiredSemantics = {added:true}; break; case "removeItem": filterObject = new EffectTargetFilter(); filterObject.requiredSemantics = {removed:true}; break; case "replacedItem": filterObject = new EffectTargetFilter(); filterObject.requiredSemantics = {replaced:true}; break; case "replacementItem": filterObject = new EffectTargetFilter(); filterObject.requiredSemantics = {replacement:true}; break; default: filterObject = null; break; }; }; } 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++; }; }; } 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 _local3:Object; var _local2:int; 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 273
//EffectInstance (mx.effects.EffectInstance) package mx.effects { import mx.core.*; import mx.events.*; import flash.events.*; import mx.effects.effectClasses.*; import flash.utils.*; public class EffectInstance extends EventDispatcher implements IEffectInstance { private var _hideFocusRing:Boolean; private var delayStartTime:Number;// = 0 mx_internal var stopRepeat:Boolean;// = false private var playCount:int;// = 0 private var _repeatCount:int;// = 0 private var _suspendBackgroundProcessing:Boolean;// = false mx_internal var delayTimer:Timer; private var _triggerEvent:Event; private var _effectTargetHost:IEffectTargetHost; mx_internal var parentCompositeEffectInstance:EffectInstance; mx_internal var durationExplicitlySet:Boolean;// = false private var _effect:IEffect; private var _target:Object; mx_internal var hideOnEffectEnd:Boolean;// = false private var _startDelay:int;// = 0 private var delayElapsedTime:Number;// = 0 private var _rep