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

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

Block Squad - save the city from an infestation of pesky blocks.swf

This is the info page for
Flash #90938

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


ActionScript [AS3]
Section 1
//DebugDispatcher (com.blitzagency.xray.logger.events.DebugDispatcher) package com.blitzagency.xray.logger.events { import flash.events.*; public class DebugDispatcher extends EventDispatcher { public static var TRACE:String = "trace"; public function sendEvent(_arg1:String, _arg2:Object):void{ trace(_arg2.message); dispatchEvent(new DebugEvent(DebugDispatcher.TRACE, false, false, _arg2)); } } }//package com.blitzagency.xray.logger.events
Section 2
//DebugEvent (com.blitzagency.xray.logger.events.DebugEvent) package com.blitzagency.xray.logger.events { import flash.events.*; public class DebugEvent extends Event { public var obj:Object; public function DebugEvent(_arg1:String, _arg2:Boolean, _arg3:Boolean, _arg4:Object):void{ obj = new Object(); super(_arg1, _arg2, _arg3); obj = _arg4; } } }//package com.blitzagency.xray.logger.events
Section 3
//ObjectTools (com.blitzagency.xray.logger.util.ObjectTools) package com.blitzagency.xray.logger.util { import com.blitzagency.xray.logger.*; import flash.utils.*; public class ObjectTools { private static var log:XrayLog = new XrayLog(); public function resolveBaseType(_arg1:Object):String{ return (""); } public static function getImmediateClassPath(_arg1:Object):String{ var _local2:String = getQualifiedClassName(_arg1); var _local3:String = getQualifiedSuperclassName(_arg1); _local2 = ((_local2.indexOf("::") > -1)) ? _local2.split("::").join(".") : _local2; if (_local3 == null){ return (_local2); }; _local3 = ((_local3.indexOf("::") > -1)) ? _local3.split("::").join(".") : _local3; return (((_local3 + ".") + _local2)); } public static function getFullClassPath(_arg1:Object):String{ var _local5:XML; var _local6:String; var _local2:XML = describeType(_arg1); var _local3:Array = []; var _local4:String = getQualifiedClassName(_arg1); _local4 = ((_local4.indexOf("::") > -1)) ? _local4.split("::").join(".") : _local4; _local3.push(_local4); for each (_local5 in _local2.extendsClass) { _local6 = ((_local5.@type.toString().indexOf("::") > -1)) ? _local5.@type.toString().split("::")[1] : _local5.@type.toString(); _local3.push(_local6); }; return (_local3.join(".")); } } }//package com.blitzagency.xray.logger.util
Section 4
//PropertyTools (com.blitzagency.xray.logger.util.PropertyTools) package com.blitzagency.xray.logger.util { import flash.utils.*; public class PropertyTools { private static function getVariables():void{ } public static function getProperties(_arg1:Object):Array{ var xmlDoc:XML; var item:XML; var name:String; var type:String; var value:Object; var obj = _arg1; var ary:Array = []; try { xmlDoc = describeType(obj); for each (item in xmlDoc.variable) { name = item.@name.toString(); type = item.@type.toString(); value = ((obj[name])!=null) ? obj[name] : ""; ary.push({name:name, type:type, value:value}); }; } catch(e:Error) { }; return (ary); } private static function getMethods():void{ } } }//package com.blitzagency.xray.logger.util
Section 5
//Debug (com.blitzagency.xray.logger.Debug) package com.blitzagency.xray.logger { import flash.events.*; import flash.net.*; import flash.utils.*; import com.blitzagency.xray.logger.events.*; public class Debug { private static var connected:Boolean = false; private static var xrayLC:LocalConnection; private static var ed:DebugDispatcher = new DebugDispatcher(); public static function traceObject(_arg1:Object, _arg2:Number=254, _arg3:Number=0, _arg4:String="", _arg5:Number=0):void{ var recurseDepth:Number; var indent:Number; var prop:String; var lead:String; var i:Number; var obj:String; var o = _arg1; var pRecurseDepth = _arg2; var pIndent = _arg3; var pPackage = _arg4; var pLevel = _arg5; try { recurseDepth = pRecurseDepth; indent = pIndent; for (prop in o) { lead = ""; i = 0; while (i < indent) { lead = (lead + " "); i = (i + 1); }; obj = o[prop].toString(); if ((o[prop] is Array)){ obj = "[Array]"; }; if (obj == "[object Object]"){ obj = "[Object]"; }; Debug.trace((((lead + prop) + ": ") + obj), pPackage, pLevel); if (recurseDepth > 0){ Debug.traceObject(o[prop], (recurseDepth - 1), (indent + 1), pPackage, pLevel); }; }; } catch(e:Error) { }; } public static function trace(_arg1:Object, _arg2:String="", _arg3:Number=0):void{ var msg:String; var pMsg = _arg1; var pPackage = _arg2; var pLevel = _arg3; ed.sendEvent(DebugDispatcher.TRACE, {message:pMsg, classPackage:pPackage}); if (!connected){ makeConnection(); }; if (connected){ try { msg = ((String(pMsg).length >= 39995)) ? (String(pMsg).substr(0, 39995) + "...") : String(pMsg); xrayLC.send("_xray_view_conn", "setTrace", msg, pLevel, pPackage); } catch(e:LogError) { LogError("No Xray Interface running"); }; }; } private static function makeConnection():void{ var err:LogError; xrayLC = new LocalConnection(); xrayLC.addEventListener("status", statusHandler); xrayLC.allowDomain("*"); try { xrayLC.connect(("_xray_standAlone_debug" + getTimer())); connected = true; } catch(e:Error) { err = new LogError("log"); setTimeout(makeConnection, 1000); }; } public static function addEventListener(_arg1:String, _arg2:Function):void{ ed.addEventListener(_arg1, _arg2); } private static function initialize():Boolean{ ed = new DebugDispatcher(); return (true); } private static function statusHandler(_arg1:StatusEvent):void{ if ((((((_arg1.code == null)) && ((_arg1.level == "error")))) && (connected))){ connected = false; } else { if ((((_arg1.level == "status")) && ((_arg1.code == null)))){ connected = true; }; }; } } }//package com.blitzagency.xray.logger class LogError extends Error { private function LogError(_arg1:String){ super(_arg1); } }
Section 6
//Log (com.blitzagency.xray.logger.Log) package com.blitzagency.xray.logger { import com.blitzagency.xray.logger.util.*; public class Log { private var level:Number; private var message:String; private var caller:String;// = "" private var classPackage:String; private var dump:Object; public function Log(_arg1:String, _arg2:Object, _arg3:Number, ... _args){ var err:LogError; var nullArray:Array; var str:String; var p_message = _arg1; var p_dump = _arg2; var p_level = _arg3; var rest = _args; super(); try { nullArray.push("bogus"); } catch(e:Error) { err = new LogError("log"); } finally { if (err.hasOwnProperty("getStackTrace")){ str = err.getStackTrace(); setCaller(resolveCaller(str)); } else { setCaller(""); }; setMessage(p_message); setDump(p_dump); setLevel(p_level); setClassPackage(p_dump); }; } public function getCaller():String{ return (caller); } public function setLevel(_arg1:Number):void{ level = _arg1; } public function setMessage(_arg1:String):void{ message = _arg1; } public function getLevel():Number{ return (level); } public function getDump():Object{ return (dump); } public function setCaller(_arg1:String):void{ caller = _arg1; } public function setClassPackage(_arg1:Object):void{ classPackage = ObjectTools.getImmediateClassPath(_arg1); } public function getMessage():String{ return (message); } private function resolveCaller(_arg1:String):String{ var str = _arg1; var ary:Array = []; try { str = str.split("\n").join(""); ary = str.split("\tat "); str = ary[3]; } catch(e:Error) { } finally { str = ""; }; return (str); } public function getClassPackage():String{ return (classPackage); } public function setDump(_arg1:Object):void{ dump = _arg1; } } }//package com.blitzagency.xray.logger class LogError extends Error { private function LogError(_arg1:String){ super(_arg1); } }
Section 7
//Logger (com.blitzagency.xray.logger.Logger) package com.blitzagency.xray.logger { public interface Logger { function setLevel(_arg1:Number=0):void; function debug(_arg1:Log):void; function fatal(_arg1:Log):void; function warn(_arg1:Log):void; function error(_arg1:Log):void; function log(_arg1:String, _arg2:String, _arg3:String, _arg4:Number, _arg5:Object=null):void; function info(_arg1:Log):void; } }//package com.blitzagency.xray.logger
Section 8
//XrayLog (com.blitzagency.xray.logger.XrayLog) package com.blitzagency.xray.logger { public class XrayLog { private var logger:XrayLogger; public function XrayLog(){ logger = XrayLogger.getInstance(); } public function debug(_arg1:String, ... _args):void{ if (_args.length == 0){ logger.debug(new Log(_arg1, null, XrayLogger.DEBUG)); }; var _local3:Number = 0; while (_local3 < _args.length) { if (_local3 > 0){ _arg1 = ""; }; logger.debug(new Log(_arg1, _args[_local3], XrayLogger.DEBUG)); _local3++; }; } public function fatal(_arg1:String, ... _args):void{ if (_args.length == 0){ logger.fatal(new Log(_arg1, null, XrayLogger.FATAL)); }; var _local3:Number = 0; while (_local3 < _args.length) { if (_local3 > 0){ _arg1 = ""; }; logger.fatal(new Log(_arg1, _args[_local3], XrayLogger.FATAL)); _local3++; }; } public function warn(_arg1:String, ... _args):void{ if (_args.length == 0){ logger.warn(new Log(_arg1, null, XrayLogger.WARN)); }; var _local3:Number = 0; while (_local3 < _args.length) { if (_local3 > 0){ _arg1 = ""; }; logger.warn(new Log(_arg1, _args[_local3], XrayLogger.WARN)); _local3++; }; } public function error(_arg1:String, ... _args):void{ if (_args.length == 0){ logger.error(new Log(_arg1, null, XrayLogger.ERROR)); }; var _local3:Number = 0; while (_local3 < _args.length) { if (_local3 > 0){ _arg1 = ""; }; logger.error(new Log(_arg1, _args[_local3], XrayLogger.ERROR)); _local3++; }; } public function info(_arg1:String, ... _args):void{ if (_args.length == 0){ logger.info(new Log(_arg1, null, XrayLogger.INFO)); }; var _local3:Number = 0; while (_local3 < _args.length) { if (_local3 > 0){ _arg1 = ""; }; logger.info(new Log(_arg1, _args[_local3], XrayLogger.INFO)); _local3++; }; } } }//package com.blitzagency.xray.logger
Section 9
//XrayLogger (com.blitzagency.xray.logger.XrayLogger) package com.blitzagency.xray.logger { import flash.events.*; import flash.utils.*; import com.blitzagency.xray.logger.util.*; public class XrayLogger extends EventDispatcher implements Logger { private var displayObjectRecursionDepth:Number;// = 3 private var level:Number;// = 0 private var indentation:Number;// = 0 private var objectRecursionDepth:Number;// = 254 private var filters:Array; public static var FATAL:Number = 4; public static var WARN:Number = 2; public static var ERROR:Number = 3; public static var INFO:Number = 1; public static var DEBUG:Number = 0; private static var _instance:XrayLogger = null; public static var NONE:Number = 5; public function XrayLogger(){ filters = []; super(); } public function warn(_arg1:Log):void{ if (_arg1.getLevel() >= level){ log(_arg1.getMessage(), _arg1.getCaller(), _arg1.getClassPackage(), 2, _arg1.getDump()); }; } public function setIndentation(_arg1:Number=0):void{ indentation = _arg1; } public function setLevel(_arg1:Number=0):void{ level = _arg1; } public function debug(_arg1:Log):void{ if (_arg1.getLevel() == level){ log(_arg1.getMessage(), _arg1.getCaller(), _arg1.getClassPackage(), 0, _arg1.getDump()); }; } public function error(_arg1:Log):void{ if (_arg1.getLevel() >= level){ log(_arg1.getMessage(), _arg1.getCaller(), _arg1.getClassPackage(), 3, _arg1.getDump()); }; } public function setDisplayClipRecursionDepth(_arg1:Number):void{ displayObjectRecursionDepth = _arg1; } public function fatal(_arg1:Log):void{ if (_arg1.getLevel() >= level){ log(_arg1.getMessage(), _arg1.getCaller(), _arg1.getClassPackage(), 4, _arg1.getDump()); }; } public function setObjectRecursionDepth(_arg1:Number):void{ objectRecursionDepth = _arg1; } public function checkFilters():Boolean{ if (filters.length == 0){ return (true); }; var _local1:uint; while (_local1 < filters.length) { _local1++; }; return (true); } public function log(_arg1:String, _arg2:String, _arg3:String, _arg4:Number, _arg5:Object=null):void{ var _local8:String; var _local9:Object; var _local6 = (("(" + getTimer()) + ") "); if (_arg3.length > 0){ _local6 = (_local6 + (_arg2 + "\n")); }; _local6 = (_local6 + _arg1); if (_arg1.length > 0){ Debug.trace(_local6, _arg3, _arg4); }; if (_arg5 == null){ return; }; var _local7 = typeof(_arg5); if ((((((((((_local7 == "string")) || ((_local7 == "number")))) || ((_local7 == "boolean")))) || ((_local7 == "undefined")))) || ((_local7 == "null")))){ Debug.trace(_arg5, _arg3, _arg4); } else { if (_local7 == "xml"){ Debug.trace(_arg5.toString(), _arg3, _arg4); } else { _local8 = ObjectTools.getImmediateClassPath(_arg5); if ((((_local8 == "Object")) || ((_local8 == "Object.Array")))){ Debug.traceObject(_arg5, objectRecursionDepth, indentation, _arg3, _arg4); } else { _local9 = PropertyTools.getProperties(_arg5); Debug.traceObject(_local9, displayObjectRecursionDepth, indentation, _arg3, _arg4); }; }; }; } public function info(_arg1:Log):void{ if (_arg1.getLevel() >= level){ log(_arg1.getMessage(), _arg1.getCaller(), _arg1.getClassPackage(), 1, _arg1.getDump()); }; } public function setFilters(_arg1:Array):void{ filters = _arg1; } public static function getInstance():XrayLogger{ if (_instance == null){ _instance = new (XrayLogger); }; return (_instance); } public static function resolveLevelAsName(_arg1:Number):String{ switch (_arg1){ case 0: return ("debug"); case 1: return ("info"); case 2: return ("warn"); case 3: return ("error"); case 4: return ("fatal"); default: return ("debug"); }; } } }//package com.blitzagency.xray.logger
Section 10
//Api (frosmo.Api) package frosmo { import flash.display.*; import flash.events.*; import flash.net.*; import flash.utils.*; public class Api { private static const STATE_SCORE_SUBMITTED:int = 5; private static const LOADER_TIMEOUT:int = 10000; private static const DEFAULT_GATEWAY_URL:String = (DEFAULT_SERVER + "secure_gateway_2.00.swf"); public static const DEFAULT_SERVER:String = "http://frosmo.com/frosmo_api/"; private static const STATE_UNCONNECTED:int = 0; private static const CALL_CHANNEL_NAME:String = "_esn_public_channel"; private static const STATE_LOADING_GATEWAY:int = 1; private static const STATE_CALLING_GATEWAY:int = 2; private static const CIRC_STORE_DELAY:Number = 500; private static const STATE_WAITING_PARAMETERS:int = 3; private static const CIRC_BUFFER_SIZE:Number = 20; private static const STATE_WAITING_SUBMIT_SCORE:int = 4; private static var _container:DisplayObject; private static var _state:int = 0; private static var _check:Object = {values:{}, seed:0, diff:0, checksum:0, tampered:false}; private static var _version:String = "2.00"; private static var _params:Object = {gameParameters:String, exitUrl:String, rngSeed:String}; private static var _gatewayUrl:String = DEFAULT_GATEWAY_URL; private static var _gameClientId:String; private static var _loader:Loader; private static var _handlers:Object = {ErrorHandler:Function, ReadyHandler:Function}; private static var _fps:Object = {CounterMC:MovieClip, EventEnterFrame:Function, TimeData:Array}; private static var _mcGateway:MovieClip; private static var _sessionId:String = "0"; private static var _seed:uint = 0; private static var _loaderTimeout:Timer; private static var _comm:Object = {callChannel:LocalConnection, SendChannel:LocalConnection, SendChannelName:String, ReceiveChannel:LocalConnection}; private static var _currentRequestArgs:Object; public static function get gameParameters():String{ return (_params.gameParameters); } private static function send(_arg1:String, _arg2:Object, _arg3:Object=null, _arg4:Object=null):void{ if (_currentRequestArgs != null){ showError("Can't run multiple request at once"); return; }; _currentRequestArgs = {methodName:_arg1, args:_arg2, callbackObject:_arg3, callbackMethod:_arg4}; var _local5:Object = {methodName:_arg1, args:_arg2, callbackID:1}; _comm.SendChannel.send(_comm.SendChannelName, "onReceive", _local5); } public static function get game_client_id():String{ return (_gameClientId); } private static function showError(_arg1:String):void{ trace(_arg1); if (_handlers.ErrorHandler != null){ _handlers.ErrorHandler(_arg1); }; } private static function addFPSCounter():void{ var ind:Number; var lastTime:Number; var circleBuffer:Array; var lastCircTime:Number; var circSum:Number; ind = 0; lastTime = 0; _fps.CounterMC = new MovieClip(); _container.stage.addChild(_fps.CounterMC); circleBuffer = new Array(CIRC_BUFFER_SIZE); lastCircTime = 0; circSum = 0; _fps.TimeData = new Array(); var i:Number = 0; while (i < CIRC_BUFFER_SIZE) { circleBuffer[i] = 0; i = (i + 1); }; _fps.EventEnterFrame = function (_arg1:Event):void{ var _local4:Number; var _local2:Number = getRealTime(); var _local3:Number = (_local2 - lastTime); if ((((((lastTime == 0)) || ((_local3 < 0)))) || ((_local3 > 1000)))){ lastTime = _local2; lastCircTime = _local2; return; }; circSum = (circSum - circleBuffer[(ind % CIRC_BUFFER_SIZE)]); circleBuffer[(ind % CIRC_BUFFER_SIZE)] = _local3; circSum = (circSum + _local3); if ((_local2 - lastCircTime) >= CIRC_STORE_DELAY){ _local4 = int((circSum / Math.min(CIRC_BUFFER_SIZE, (ind + 1)))); _fps.TimeData.push(_local4); lastCircTime = _local2; }; lastTime = _local2; ind++; }; _fps.CounterMC.addEventListener(Event.ENTER_FRAME, _fps.EventEnterFrame); } private static function initParameters(_arg1:String):void{ _gameClientId = _arg1; var _local2:Object = _container.root.loaderInfo.parameters; if (_local2){ if (_local2["esn_session_id"]){ _sessionId = _local2["esn_session_id"]; }; if (_local2["esn_url_v2"]){ _gatewayUrl = _local2["esn_url_v2"]; }; }; } private static function disconnect():void{ _state = STATE_UNCONNECTED; try { _comm.ReceiveChannel.close(); _comm.SendChannel.close(); } catch(error:Error) { }; if (_loaderTimeout != null){ try { _loaderTimeout.stop(); } catch(error:Error) { }; }; } public static function getRealTime():Number{ var _local1:Date = new Date(); var _local2:Number = _local1.getHours(); var _local3:Number = _local1.getMinutes(); var _local4:Number = _local1.getSeconds(); var _local5:Number = _local1.getMilliseconds(); return ((_local5 + (1000 * ((_local4 + (60 * _local3)) + (3600 * _local2))))); } private static function eventOpenCallChannel(_arg1:Event):void{ var event = _arg1; setState(STATE_CALLING_GATEWAY); _comm.callChannel = new LocalConnection(); _comm.callChannel.allowDomain("*"); _comm.callChannel.client = _mcGateway; _comm.callChannel.client.handshake = receiveCallChannelHandshake; try { _comm.callChannel.connect(CALL_CHANNEL_NAME); } catch(error:Error) { showError("Call channel already in use"); disconnect(); }; } private static function openCommChannel(_arg1:String):void{ setState(STATE_WAITING_PARAMETERS); _comm.SendChannel = new LocalConnection(); _comm.SendChannelName = (_arg1 + "_fromgame"); _comm.ReceiveChannel = new LocalConnection(); _comm.ReceiveChannel.allowDomain("*"); _comm.ReceiveChannel.client = _mcGateway; _comm.ReceiveChannel.client.onReceive = handleMessageFromGateway; _comm.ReceiveChannel.connect(_arg1); send("connect_to_session", [_sessionId, _gameClientId]); } private static function receiveCallChannelHandshake(_arg1:Object):void{ _comm.callChannel.close(); _loaderTimeout.stop(); openCommChannel(_arg1.private_channel_name); } public static function get rngSeed():String{ return (_params.rngSeed); } public static function random(_arg1:int=-1):Number{ if (_seed == 0){ trace("*** FROSMO API ERROR *** :: frosmo.api.random called before connect. RETURNING ZERO"); return (0); }; _seed = ((_seed * 16807) % 2147483647); var _local2:Number = (_seed / 2147483647); trace(("uint(max * rnd) = " + uint((_arg1 * _local2)))); if (_arg1 == -1){ return (_local2); }; return (uint((_arg1 * _local2))); } public static function getNumber(_arg1:String):Number{ return ((_check.values[_arg1] - _check.diff)); } public static function setNumber(_arg1:String, _arg2:Number):void{ var _local5:Number; var _local6:Number; var _local7:Number; var _local3:Object = _check; var _local4:Object = _local3.values; if (_local4[_arg1] == (_arg2 + _local3.diff)){ return; }; if (isFinite(_local4[_arg1])){ _local3.checksum = (_local3.checksum - _local4[_arg1]); }; _local4[_arg1] = (_arg2 + _local3.diff); _local3.checksum = (_local3.checksum + _local4[_arg1]); if (_local3.seed == 0){ _local3.seed = ((Math.random() * 2) ^ 31); } else { _local3.seed = ((_local3.seed * 16807) % 2147483647); }; if ((_local3.seed % 10) == 0){ _local5 = (_local3.seed & (1023 - 0x0200)); _local6 = 0; _local7 = 0; _local3.diff = (_local3.diff + _local5); for (_arg1 in _local4) { _local6 = (_local6 + _local4[_arg1]); _local4[_arg1] = (_local4[_arg1] + _local5); _local7++; }; if (_local6 != _local3.checksum){ _local3.tampered = true; }; _local3.checksum = (_local6 + (_local7 * _local5)); }; } private static function handleResponseToConnectToSession(_arg1:Object):void{ setState(STATE_WAITING_SUBMIT_SCORE); _params.gameParameters = _arg1[0]; _params.exitUrl = _arg1[1]; _params.rngSeed = _arg1[2]; _seed = int(_params.rngSeed); if (_handlers.ReadyHandler != null){ _handlers.ReadyHandler(); }; addFPSCounter(); } public static function get version():String{ return (_version); } public static function submitScore(_arg1:String, _arg2:Object, _arg3:Object):void{ if (_state != STATE_WAITING_SUBMIT_SCORE){ showError("Can't submit score until receiving parameters from EsnServer"); return; }; _fps.CounterMC.removeEventListener(Event.ENTER_FRAME, _fps.EventEnterFrame); var _local4:Object = [_sessionId, _gameClientId, _arg1, getFpsData(), (_check.tampered) ? "1" : "0"]; send("set_score", _local4, _arg2, _arg3); } public static function initLevel(_arg1:uint):void{ _seed = (uint(_params.rngSeed) + _arg1); } private static function setState(_arg1:int):void{ if (_state != (_arg1 - 1)){ showError("invalid state"); }; _state = _arg1; } public static function connect(_arg1:String, _arg2:DisplayObject, _arg3:Function, _arg4:Function):void{ if (_arg3 != null){ _handlers.ErrorHandler = _arg3; }; if (_arg4 != null){ _handlers.ReadyHandler = _arg4; }; if ((_arg2 is DisplayObject)){ if (_state == STATE_UNCONNECTED){ _container = _arg2; initParameters(_arg1); loadGateway(); }; } else { showError("ERROR::EsnServices requires a Sprite, Movieclip or instance of the stage."); }; } private static function handleResponseToSetScore(_arg1:Object):void{ trace((("score: " + _arg1[2]) + " submitted succesfully")); } public static function get exitUrl():String{ return (_params.exitUrl); } private static function handleMessageFromGateway(_arg1:Object):void{ if (_arg1.errorID != null){ showError(_arg1.description); _currentRequestArgs = null; return; }; switch (_currentRequestArgs.methodName){ case "set_score": handleResponseToSetScore(_currentRequestArgs.args); break; case "connect_to_session": handleResponseToConnectToSession(_arg1.args); break; }; var _local2:Object = _currentRequestArgs.callbackMethod; var _local3:Object = _currentRequestArgs.callbackObject; if (_local2 != null){ _local2.apply(_local3, _arg1.args); }; _currentRequestArgs = null; } public static function get session_id():String{ return (_sessionId); } private static function getFpsData():String{ if (_fps.TimeData == null){ return (""); }; var _local1:String = _fps.TimeData.join(","); return (_local1); } private static function loadGateway():void{ setState(STATE_LOADING_GATEWAY); _mcGateway = new MovieClip(); var eventFailure:Function = function (_arg1:Event):void{ showError("Loading gateway took too mach time"); disconnect(); }; _loaderTimeout = new Timer(LOADER_TIMEOUT, 1); _loaderTimeout.addEventListener(TimerEvent.TIMER, eventFailure); _loaderTimeout.start(); _loader = new Loader(); _loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, eventFailure); _loader.contentLoaderInfo.addEventListener(Event.COMPLETE, eventOpenCallChannel); _loader.load(new URLRequest(_gatewayUrl)); } } }//package frosmo
Section 11
//MochiAd (mochi.as3.MochiAd) package mochi.as3 { import flash.display.*; import flash.events.*; import flash.net.*; import flash.utils.*; import flash.system.*; public class MochiAd { public static function getVersion():String{ return ("3.0 as3"); } public static function showClickAwayAd(_arg1:Object):void{ var clip:Object; var mc:MovieClip; var chk:MovieClip; var options = _arg1; var DEFAULTS:Object = {ad_timeout:2000, regpt:"o", method:"showClickAwayAd", res:"300x250", no_bg:true, ad_started:function ():void{ }, ad_finished:function ():void{ }, ad_loaded:function (_arg1:Number, _arg2:Number):void{ }, ad_failed:function ():void{ trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software"); }, ad_skipped:function ():void{ }}; options = MochiAd._parseOptions(options, DEFAULTS); clip = options.clip; var ad_timeout:Number = options.ad_timeout; delete options.ad_timeout; if (!MochiAd.load(options)){ options.ad_failed(); options.ad_finished(); return; }; options.ad_started(); mc = clip._mochiad; mc["onUnload"] = function ():void{ MochiAd._cleanup(mc); options.ad_finished(); }; var wh:Array = MochiAd._getRes(options, clip); var w:Number = wh[0]; var h:Number = wh[1]; mc.x = (w * 0.5); mc.y = (h * 0.5); chk = createEmptyMovieClip(mc, "_mochiad_wait", 3); chk.ad_timeout = ad_timeout; chk.started = getTimer(); chk.showing = false; mc.unloadAd = function ():void{ MochiAd.unload(clip); }; mc.adLoaded = options.ad_loaded; mc.adSkipped = options.ad_skipped; mc.rpc = function (_arg1:Number, _arg2:Object):void{ MochiAd.rpc(clip, _arg1, _arg2); }; var sendHostProgress:Boolean; mc.regContLC = function (_arg1:String):void{ mc._containerLCName = _arg1; }; chk["onEnterFrame"] = function ():void{ var _local4:Number; if (!this.parent){ delete this.onEnterFrame; return; }; var _local1:Object = this.parent._mochiad_ctr; var _local2:Number = (getTimer() - this.started); var _local3:Boolean; if (!chk.showing){ _local4 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal; if (_local4 > 0){ chk.showing = true; _local3 = true; chk.started = getTimer(); } else { if (_local2 > chk.ad_timeout){ options.ad_failed(); _local3 = true; }; }; }; if (this.root == null){ _local3 = true; }; if (_local3){ delete this.onEnterFrame; }; }; doOnEnterFrame(chk); } public static function _isNetworkAvailable():Boolean{ return (!((Security.sandboxType == "localWithFile"))); } public static function _allowDomains(_arg1:String):String{ var _local2:String = _arg1.split("/")[2].split(":")[0]; if (Security.sandboxType == "application"){ return (_local2); }; Security.allowDomain("*"); Security.allowDomain(_local2); Security.allowInsecureDomain("*"); Security.allowInsecureDomain(_local2); return (_local2); } public static function unload(_arg1:Object):Boolean{ if (((_arg1.clip) && (_arg1.clip._mochiad))){ _arg1 = _arg1.clip; }; if (_arg1.origFrameRate != undefined){ _arg1.stage.frameRate = _arg1.origFrameRate; }; if (!_arg1._mochiad){ return (false); }; if (_arg1._mochiad._containerLCName != undefined){ _arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "notify", {id:"unload"}); }; if (_arg1._mochiad.onUnload){ _arg1._mochiad.onUnload(); }; delete _arg1._mochiad_loaded; delete _arg1._mochiad; return (true); } public static function showInterLevelAd(_arg1:Object):void{ var clip:Object; var mc:MovieClip; var chk:MovieClip; var options = _arg1; var DEFAULTS:Object = {ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function ():void{ if ((this.clip is MovieClip)){ this.clip.stop(); } else { throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers.")); }; }, ad_finished:function ():void{ if ((this.clip is MovieClip)){ this.clip.play(); } else { throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers.")); }; }, ad_loaded:function (_arg1:Number, _arg2:Number):void{ }, ad_failed:function ():void{ trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software"); }, ad_skipped:function ():void{ }}; options = MochiAd._parseOptions(options, DEFAULTS); clip = options.clip; var ad_msec:Number = 11000; var ad_timeout:Number = options.ad_timeout; delete options.ad_timeout; var fadeout_time:Number = options.fadeout_time; delete options.fadeout_time; if (!MochiAd.load(options)){ options.ad_failed(); options.ad_finished(); return; }; options.ad_started(); mc = clip._mochiad; mc["onUnload"] = function ():void{ MochiAd._cleanup(mc); options.ad_finished(); }; var wh:Array = MochiAd._getRes(options, clip); var w:Number = wh[0]; var h:Number = wh[1]; mc.x = (w * 0.5); mc.y = (h * 0.5); chk = createEmptyMovieClip(mc, "_mochiad_wait", 3); chk.ad_msec = ad_msec; chk.ad_timeout = ad_timeout; chk.started = getTimer(); chk.showing = false; chk.fadeout_time = fadeout_time; chk.fadeFunction = function ():void{ if (!this.parent){ delete this.onEnterFrame; delete this.fadeFunction; return; }; var _local1:Number = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time))); if (_local1 > 0){ this.parent.alpha = (_local1 * 0.01); } else { MochiAd.unload(clip); delete this["onEnterFrame"]; }; }; mc.unloadAd = function ():void{ MochiAd.unload(clip); }; mc.adLoaded = options.ad_loaded; mc.adSkipped = options.ad_skipped; mc.adjustProgress = function (_arg1:Number):void{ var _local2:Object = mc._mochiad_wait; _local2.server_control = true; _local2.showing = true; _local2.started = getTimer(); _local2.ad_msec = (_arg1 - 250); }; mc.rpc = function (_arg1:Number, _arg2:Object):void{ MochiAd.rpc(clip, _arg1, _arg2); }; chk["onEnterFrame"] = function ():void{ var _local4:Number; if (!this.parent){ delete this.onEnterFrame; delete this.fadeFunction; return; }; var _local1:Object = this.parent._mochiad_ctr; var _local2:Number = (getTimer() - this.started); var _local3:Boolean; if (!chk.showing){ _local4 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal; if (_local4 > 0){ chk.showing = true; chk.started = getTimer(); MochiAd.adShowing(clip); } else { if (_local2 > chk.ad_timeout){ options.ad_failed(); _local3 = true; }; }; }; if (_local2 > chk.ad_msec){ _local3 = true; }; if (_local3){ if (this.server_control){ delete this.onEnterFrame; } else { this.fadeout_start = getTimer(); this.onEnterFrame = this.fadeFunction; }; }; }; doOnEnterFrame(chk); } public static function _parseOptions(_arg1:Object, _arg2:Object):Object{ var _local4:String; var _local5:Array; var _local6:Number; var _local7:Array; var _local3:Object = {}; for (_local4 in _arg2) { _local3[_local4] = _arg2[_local4]; }; if (_arg1){ for (_local4 in _arg1) { _local3[_local4] = _arg1[_local4]; }; }; if (_local3.clip == undefined){ throw (new Error("MochiAd is missing the 'clip' parameter. This should be a MovieClip, Sprite or an instance of a class that extends MovieClip or Sprite.")); }; _arg1 = _local3.clip.loaderInfo.parameters.mochiad_options; if (_arg1){ _local5 = _arg1.split("&"); _local6 = 0; while (_local6 < _local5.length) { _local7 = _local5[_local6].split("="); _local3[unescape(_local7[0])] = unescape(_local7[1]); _local6++; }; }; if (_local3.id == "test"){ trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!"); }; return (_local3); } public static function _cleanup(_arg1:Object):void{ var k:String; var lc:LocalConnection; var f:Function; var mc = _arg1; if (("lc" in mc)){ lc = mc.lc; f = function ():void{ try { lc.client = null; lc.close(); } catch(e:Error) { }; }; setTimeout(f, 0); }; var idx:Number = DisplayObjectContainer(mc).numChildren; while (idx > 0) { idx = (idx - 1); DisplayObjectContainer(mc).removeChildAt(idx); }; for (k in mc) { delete mc[k]; }; } public static function load(_arg1:Object):MovieClip{ var clip:Object; var k:String; var server:String; var hostname:String; var lc:LocalConnection; var name:String; var loader:Loader; var g:Function; var req:URLRequest; var v:Object; var options = _arg1; var DEFAULTS:Object = {server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"}; options = MochiAd._parseOptions(options, DEFAULTS); options.swfv = 9; options.mav = MochiAd.getVersion(); clip = options.clip; if (!MochiAd._isNetworkAvailable()){ return (null); }; try { if (clip._mochiad_loaded){ return (null); }; } catch(e:Error) { throw (new Error("MochiAd requires a clip that is an instance of a dynamic class. If your class extends Sprite or MovieClip, you must make it dynamic.")); }; var depth:Number = options.depth; delete options.depth; var mc:MovieClip = createEmptyMovieClip(clip, "_mochiad", depth); var wh:Array = MochiAd._getRes(options, clip); options.res = ((wh[0] + "x") + wh[1]); options.server = (options.server + options.id); delete options.id; clip._mochiad_loaded = true; if (clip.loaderInfo.loaderURL.indexOf("http") == 0){ options.as3_swf = clip.loaderInfo.loaderURL; } else { trace("[MochiAd] NOTE: Security Sandbox Violation errors below are normal"); }; var lv:URLVariables = new URLVariables(); for (k in options) { v = options[k]; if (!(v is Function)){ lv[k] = v; }; }; server = lv.server; delete lv.server; hostname = _allowDomains(server); lc = new LocalConnection(); lc.client = mc; name = ["", Math.floor(new Date().getTime()), Math.floor((Math.random() * 999999))].join("_"); lc.allowDomain("*", "localhost"); lc.allowInsecureDomain("*", "localhost"); lc.connect(name); mc.lc = lc; mc.lcName = name; lv.lc = name; lv.st = getTimer(); loader = new Loader(); g = function (_arg1:Object):void{ _arg1.target.removeEventListener(_arg1.type, arguments.callee); MochiAd.unload(clip); }; loader.contentLoaderInfo.addEventListener(Event.UNLOAD, g); req = new URLRequest(((server + ".swf?cacheBust=") + new Date().getTime())); req.contentType = "application/x-www-form-urlencoded"; req.method = URLRequestMethod.POST; req.data = lv; loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, function (_arg1:IOErrorEvent):void{ trace("[MochiAds] Blocked URL"); }); loader.load(req); mc.addChild(loader); mc._mochiad_ctr = loader; return (mc); } public static function runMethod(_arg1:Object, _arg2:String, _arg3:Array):Object{ var _local4:Array = _arg2.split("."); var _local5:Number = 0; while (_local5 < (_local4.length - 1)) { if ((((_arg1[_local4[_local5]] == undefined)) || ((_arg1[_local4[_local5]] == null)))){ return (undefined); }; _arg1 = _arg1[_local4[_local5]]; _local5++; }; if (typeof(_arg1[_local4[_local5]]) == "function"){ return (_arg1[_local4[_local5]].apply(_arg1, _arg3)); }; return (undefined); } public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number):MovieClip{ var _local4:MovieClip = new MovieClip(); if (((false) && (_arg3))){ _arg1.addChildAt(_local4, _arg3); } else { _arg1.addChild(_local4); }; _arg1[_arg2] = _local4; _local4["_name"] = _arg2; return (_local4); } public static function _getRes(_arg1:Object, _arg2:Object):Array{ var _local6:Array; var _local3:Object = _arg2.getBounds(_arg2.root); var _local4:Number = 0; var _local5:Number = 0; if (typeof(_arg1.res) != "undefined"){ _local6 = _arg1.res.split("x"); _local4 = parseFloat(_local6[0]); _local5 = parseFloat(_local6[1]); } else { _local4 = (_local3.xMax - _local3.xMin); _local5 = (_local3.yMax - _local3.yMin); }; if ((((_local4 == 0)) || ((_local5 == 0)))){ _local4 = _arg2.stage.stageWidth; _local5 = _arg2.stage.stageHeight; }; return ([_local4, _local5]); } public static function adShowing(_arg1:Object):void{ _arg1.origFrameRate = _arg1.stage.frameRate; _arg1.stage.frameRate = 30; } public static function getValue(_arg1:Object, _arg2:String):Object{ var _local3:Array = _arg2.split("."); var _local4:Number = 0; while (_local4 < (_local3.length - 1)) { if ((((_arg1[_local3[_local4]] == undefined)) || ((_arg1[_local3[_local4]] == null)))){ return (undefined); }; _arg1 = _arg1[_local3[_local4]]; _local4++; }; return (_arg1[_local3[_local4]]); } public static function rpc(_arg1:Object, _arg2:Number, _arg3:Object):void{ var _local4:Object; var _local5:Object; switch (_arg3.id){ case "setValue": MochiAd.setValue(_arg1, _arg3.objectName, _arg3.value); break; case "getValue": _local4 = MochiAd.getValue(_arg1, _arg3.objectName); _arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "rpcResult", _arg2, _local4); break; case "runMethod": _local5 = MochiAd.runMethod(_arg1, _arg3.method, _arg3.args); _arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "rpcResult", _arg2, _local5); break; default: trace(("[mochiads rpc] unknown rpc id: " + _arg3.id)); }; } public static function setValue(_arg1:Object, _arg2:String, _arg3:Object):void{ var _local4:Array = _arg2.split("."); var _local5:Number = 0; while (_local5 < (_local4.length - 1)) { if ((((_arg1[_local4[_local5]] == undefined)) || ((_arg1[_local4[_local5]] == null)))){ return; }; _arg1 = _arg1[_local4[_local5]]; _local5++; }; _arg1[_local4[_local5]] = _arg3; } public static function showPreGameAd(_arg1:Object):void{ var clip:Object; var mc:MovieClip; var chk:MovieClip; var complete:Boolean; var unloaded:Boolean; var sendHostProgress:Boolean; var fn:Function; var r:MovieClip; var options = _arg1; var DEFAULTS:Object = {ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:0xFF8A00, background:16777161, outline:13994812, no_progress_bar:false, ad_started:function ():void{ if ((this.clip is MovieClip)){ this.clip.stop(); } else { throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers.")); }; }, ad_finished:function ():void{ if ((this.clip is MovieClip)){ this.clip.play(); } else { throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers.")); }; }, ad_loaded:function (_arg1:Number, _arg2:Number):void{ }, ad_failed:function ():void{ trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software"); }, ad_skipped:function ():void{ }, ad_progress:function (_arg1:Number):void{ }}; options = MochiAd._parseOptions(options, DEFAULTS); if ("c862232051e0a94e1c3609b3916ddb17".substr(0) == "dfeada81ac97cde83665f81c12da7def"){ options.ad_started(); fn = function ():void{ options.ad_finished(); }; setTimeout(fn, 100); return; }; clip = options.clip; var ad_msec:Number = 11000; var ad_timeout:Number = options.ad_timeout; delete options.ad_timeout; var fadeout_time:Number = options.fadeout_time; delete options.fadeout_time; if (!MochiAd.load(options)){ options.ad_failed(); options.ad_finished(); return; }; options.ad_started(); mc = clip._mochiad; mc["onUnload"] = function ():void{ MochiAd._cleanup(mc); var fn:Function = function ():void{ options.ad_finished(); }; setTimeout(fn, 100); }; var wh:Array = MochiAd._getRes(options, clip); var w:Number = wh[0]; var h:Number = wh[1]; mc.x = (w * 0.5); mc.y = (h * 0.5); chk = createEmptyMovieClip(mc, "_mochiad_wait", 3); chk.x = (w * -0.5); chk.y = (h * -0.5); var bar:MovieClip = createEmptyMovieClip(chk, "_mochiad_bar", 4); if (options.no_progress_bar){ bar.visible = false; delete options.no_progress_bar; } else { bar.x = 10; bar.y = (h - 20); }; var bar_color:Number = options.color; delete options.color; var bar_background:Number = options.background; delete options.background; var bar_outline:Number = options.outline; delete options.outline; var backing_mc:MovieClip = createEmptyMovieClip(bar, "_outline", 1); var backing:Object = backing_mc.graphics; backing.beginFill(bar_background); backing.moveTo(0, 0); backing.lineTo((w - 20), 0); backing.lineTo((w - 20), 10); backing.lineTo(0, 10); backing.lineTo(0, 0); backing.endFill(); var inside_mc:MovieClip = createEmptyMovieClip(bar, "_inside", 2); var inside:Object = inside_mc.graphics; inside.beginFill(bar_color); inside.moveTo(0, 0); inside.lineTo((w - 20), 0); inside.lineTo((w - 20), 10); inside.lineTo(0, 10); inside.lineTo(0, 0); inside.endFill(); inside_mc.scaleX = 0; var outline_mc:MovieClip = createEmptyMovieClip(bar, "_outline", 3); var outline:Object = outline_mc.graphics; outline.lineStyle(0, bar_outline, 100); outline.moveTo(0, 0); outline.lineTo((w - 20), 0); outline.lineTo((w - 20), 10); outline.lineTo(0, 10); outline.lineTo(0, 0); chk.ad_msec = ad_msec; chk.ad_timeout = ad_timeout; chk.started = getTimer(); chk.showing = false; chk.last_pcnt = 0; chk.fadeout_time = fadeout_time; chk.fadeFunction = function ():void{ var _local1:Number = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time))); if (_local1 > 0){ this.parent.alpha = (_local1 * 0.01); } else { MochiAd.unload(clip); delete this["onEnterFrame"]; }; }; complete = false; unloaded = false; var f:Function = function (_arg1:Event):void{ _arg1.target.removeEventListener(_arg1.type, arguments.callee); complete = true; if (unloaded){ MochiAd.unload(clip); }; }; clip.loaderInfo.addEventListener(Event.COMPLETE, f); if ((clip.root is MovieClip)){ r = (clip.root as MovieClip); if (r.framesLoaded >= r.totalFrames){ complete = true; }; }; mc.unloadAd = function ():void{ unloaded = true; if (complete){ MochiAd.unload(clip); }; }; mc.adLoaded = options.ad_loaded; mc.adSkipped = options.ad_skipped; mc.adjustProgress = function (_arg1:Number):void{ var _local2:Object = mc._mochiad_wait; _local2.server_control = true; _local2.showing = true; _local2.started = getTimer(); _local2.ad_msec = _arg1; }; mc.rpc = function (_arg1:Number, _arg2:Object):void{ MochiAd.rpc(clip, _arg1, _arg2); }; mc.rpcTestFn = function (_arg1:String):Object{ trace(("[MOCHIAD rpcTestFn] " + _arg1)); return (_arg1); }; mc.regContLC = function (_arg1:String):void{ mc._containerLCName = _arg1; }; sendHostProgress = false; mc.sendHostLoadProgress = function (_arg1:String):void{ sendHostProgress = true; }; chk["onEnterFrame"] = function ():void{ var _local11:Number; if (((!(this.parent)) || (!(this.parent.parent)))){ delete this["onEnterFrame"]; return; }; var _local1:Object = this.parent.parent.root; var _local2:Object = this.parent._mochiad_ctr; var _local3:Number = (getTimer() - this.started); var _local4:Boolean; var _local5:Number = _local1.loaderInfo.bytesTotal; var _local6:Number = _local1.loaderInfo.bytesLoaded; if (complete){ _local6 = Math.max(1, _local6); _local5 = _local6; }; var _local7:Number = ((100 * _local6) / _local5); var _local8:Number = ((100 * _local3) / chk.ad_msec); var _local9:Object = this._mochiad_bar._inside; var _local10:Number = Math.min(100, Math.min(((_local7) || (0)), _local8)); _local10 = Math.max(this.last_pcnt, _local10); this.last_pcnt = _local10; _local9.scaleX = (_local10 * 0.01); options.ad_progress(_local10); if (sendHostProgress){ clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"hostLoadPcnt", pcnt:_local7}); if (_local7 == 100){ sendHostProgress = false; }; }; if (!chk.showing){ _local11 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal; if (_local11 > 0){ chk.showing = true; chk.started = getTimer(); MochiAd.adShowing(clip); } else { if ((((_local3 > chk.ad_timeout)) && ((_local7 == 100)))){ options.ad_failed(); _local4 = true; }; }; }; if (_local3 > chk.ad_msec){ _local4 = true; }; if (((complete) && (_local4))){ if (this.server_control){ delete this.onEnterFrame; } else { this.fadeout_start = getTimer(); this.onEnterFrame = chk.fadeFunction; }; }; }; doOnEnterFrame(chk); } public static function showPreloaderAd(_arg1:Object):void{ trace("[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0"); MochiAd.showPreGameAd(_arg1); } public static function showTimedAd(_arg1:Object):void{ trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0"); MochiAd.showInterLevelAd(_arg1); } public static function doOnEnterFrame(_arg1:MovieClip):void{ var mc = _arg1; var f:Function = function (_arg1:Object):void{ if (((("onEnterFrame" in mc)) && (mc.onEnterFrame))){ mc.onEnterFrame(); } else { _arg1.target.removeEventListener(_arg1.type, arguments.callee); }; }; mc.addEventListener(Event.ENTER_FRAME, f); } } }//package mochi.as3
Section 12
//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 13
//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){ if (options.clip != null){ if ((options.clip is Sprite)){ MochiServices.setContainer(options.clip); }; delete options.clip; } else { MochiServices.setContainer(); }; MochiServices.stayOnTop(); 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; }; }; 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; trace((("scoresArrayToObjects(" + _arg1) + ")")); var _local2:Object = {}; for (_local7 in _arg1) { trace(("item = " + _local7)); if (typeof(_arg1[_local7]) == "object"){ if (((!((_arg1[_local7].cols == null))) && (!((_arg1[_local7].rows == null))))){ _local2[_local7] = []; _local5 = _arg1[_local7]; trace(("o.rows.length = " + _local5.rows.length)); _local4 = 0; while (_local4 < _local5.rows.length) { _local6 = {}; trace(("o.cols.length = " + _local5.cols.length)); _local3 = 0; while (_local3 < _local5.cols.length) { trace(((((("o.rows[" + _local4) + "][") + _local3) + "] = ") + _local5.rows[_local4][_local3])); _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]; trace(((((("so[" + _local7) + "][") + _local8) + "] = ") + _local2[_local7][_local8])); }; }; } else { _local2[_local7] = _arg1[_local7]; trace(((("so[" + _local7) + "] = ") + _local2[_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 != null){ if (_arg1.error != null){ if (_arg1.error == true){ if (onErrorHandler != null){ if (_arg1.errorCode == null){ _arg1.errorCode = "IOError"; }; onErrorHandler(_arg1.errorCode); MochiServices.doClose(); return; }; }; }; }; onCloseHandler(); MochiServices.doClose(); } public static function setBoardID(_arg1:String):void{ MochiScores.boardID = _arg1; MochiServices.send("scores_setBoardID", {boardID:_arg1}); } } }//package mochi.as3
Section 14
//MochiServices (mochi.as3.MochiServices) package mochi.as3 { import flash.display.*; import flash.events.*; import flash.geom.*; import flash.net.*; import flash.utils.*; import flash.system.*; public class MochiServices { private static var _container:Object; private static var _connected:Boolean = false; private static var _swfVersion:String; public static var netupAttempted:Boolean = false; private static var _sendChannel:LocalConnection; private static var _clip:MovieClip; private static var _loader:Loader; private static var _id:String; private static var _listenChannel:LocalConnection; public static var widget:Boolean = false; private static var _timer:Timer; private static var _sendChannelName:String; private static var _connecting:Boolean = false; public static var onError:Object; private static var _listenChannelName:String = "__ms_"; private static var _servicesURL:String = "http://www.mochiads.com/static/lib/services/services.swf"; public static var netup:Boolean = true; public static function isNetworkAvailable():Boolean{ return (!((Security.sandboxType == "localWithFile"))); } public static function get connected():Boolean{ return (_connected); } private static function flush(_arg1:Boolean):void{ var _local2:Object; var _local3:Object; if (_clip != null){ if (_clip._queue != null){ while (_clip._queue.length > 0) { _local2 = _clip._queue.shift(); _local3 = null; if (_local2 != null){ if (_local2.callbackID != null){ _local3 = _clip._callbacks[_local2.callbackID]; }; delete _clip._callbacks[_local2.callbackID]; if (((_arg1) && (!((_local3 == null))))){ handleError(_local2.args, _local3.callbackObject, _local3.callbackMethod); }; }; }; }; }; } public static function send(_arg1:String, _arg2:Object=null, _arg3:Object=null, _arg4:Object=null):void{ if (_connected){ _sendChannel.send(_sendChannelName, "onReceive", {methodName:_arg1, args:_arg2, callbackID:_clip._nextcallbackID}); } else { if ((((_clip == null)) || (!(_connecting)))){ onError("NotConnected"); handleError(_arg2, _arg3, _arg4); flush(true); return; }; _clip._queue.push({methodName:_arg1, args:_arg2, callbackID:_clip._nextcallbackID}); }; if (_clip != null){ if (((!((_clip._callbacks == null))) && (!((_clip._nextcallbackID == null))))){ _clip._callbacks[_clip._nextcallbackID] = {callbackObject:_arg3, callbackMethod:_arg4}; _clip._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().getTime())); _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 { _listenChannel.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.0"); } public static function doClose():void{ _container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop); if (_clip.parent != null){ Sprite(_clip.parent).removeChild(_clip); }; } private static function onStatus(_arg1:StatusEvent):void{ switch (_arg1.level){ case "error": _connected = false; _listenChannel.connect(_listenChannelName); break; }; } public static function get id():String{ return (_id); } private static function urlOptions(_arg1:Object):Object{ var _local4:Array; var _local5:Number; var _local6:Array; var _local2:Object = {}; var _local3:String = _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 (_arg1 != null){ if ((_arg1 is Sprite)){ _container = _arg1; }; }; if (_arg2){ if ((_container is Sprite)){ Sprite(_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 initComChannels():void{ if (!_connected){ _sendChannel.addEventListener(StatusEvent.STATUS, MochiServices.onStatus); _sendChannel.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"}); _sendChannel.send(_sendChannelName, "onReceive", {methodName:"registerGame", id:_id, clip:_container, version:getVersion(), parentURL:_container.loaderInfo.loaderURL}); _listenChannel.addEventListener(StatusEvent.STATUS, MochiServices.onStatus); _clip.onReceive = function (_arg1:Object):void{ var methodName:String; var pkg = _arg1; var cb:String = pkg.callbackID; var cblst:Object = this.client._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 this.client._callbacks[cb]; }; _clip.onError = function ():void{ MochiServices.onError("IOError"); }; trace("connected!"); _connecting = false; _connected = true; while (_clip._queue.length > 0) { _sendChannel.send(_sendChannelName, "onReceive", _clip._queue.shift()); }; }; } private static function listen():void{ _listenChannel = new LocalConnection(); _listenChannel.client = _clip; _clip.handshake = function (_arg1:Object):void{ MochiServices.comChannelName = _arg1.newChannel; }; _listenChannel.allowDomain("*", "localhost"); _listenChannel.allowInsecureDomain("*", "localhost"); _listenChannel.connect(_listenChannelName); trace("Waiting for MochiAds services to connect..."); } public static function set comChannelName(_arg1:String):void{ if (_arg1 != null){ if (_arg1.length > 3){ _sendChannelName = (_arg1 + "_fromgame"); initComChannels(); }; }; } private static function loadCommunicator(_arg1:String, _arg2:Object):MovieClip{ var id = _arg1; var clip = _arg2; var clipname:String = ("_mochiservices_com_" + id); if (_clip != null){ return (_clip); }; if (!MochiServices.isNetworkAvailable()){ return (null); }; if (urlOptions(clip).servicesURL != undefined){ _servicesURL = urlOptions(clip).servicesURL; }; MochiServices.allowDomains(_servicesURL); _clip = createEmptyMovieClip(clip, clipname, 10336, false); _loader = new Loader(); var f:Function = function (_arg1:Object):void{ _clip._mochiad_ctr_failed = true; trace("MochiServices could not load."); MochiServices.disconnect(); MochiServices.onError("IOError"); }; _listenChannelName = (_listenChannelName + ((Math.floor(new Date().getTime()) + "_") + Math.floor((Math.random() * 99999)))); _loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, f); var req:URLRequest = new URLRequest(_servicesURL); var vars:URLVariables = new URLVariables(); vars.listenLC = _listenChannelName; vars.mochiad_options = clip.loaderInfo.parameters.mochiad_options; if (widget){ vars.widget = true; }; req.data = vars; listen(); _loader.load(req); _clip.addChild(_loader); _clip._mochiservices_com = _loader; _sendChannel = new LocalConnection(); _clip._queue = []; _clip._nextcallbackID = 0; _clip._callbacks = {}; _timer = new Timer(10000, 1); _timer.addEventListener(TimerEvent.TIMER, connectWait); _timer.start(); return (_clip); } public static function get clip():Object{ return (_container); } public static function bringToTop(_arg1:Event):void{ var e = _arg1; if (MochiServices.clip != null){ if (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 connect(_arg1:String, _arg2:Object, _arg3:Object=null):void{ var id = _arg1; var clip = _arg2; var onError = _arg3; if ((clip is DisplayObject)){ 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 createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Boolean=true):MovieClip{ var parent = _arg1; var name = _arg2; var depth = _arg3; var doAdd = _arg4; var mc:MovieClip = new MovieClip(); if (doAdd){ if (((false) && (depth))){ parent.addChildAt(mc, depth); } else { parent.addChild(mc); }; }; try { parent[name] = mc; } catch(e:Error) { throw (new Error("MochiServices requires a clip that is an instance of a dynamic class. If your class extends Sprite or MovieClip, you must make it dynamic.")); }; mc["_name"] = name; return (mc); } 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 15
//BitmapAsset (mx.core.BitmapAsset) package mx.core { import flash.display.*; public class BitmapAsset extends FlexBitmap implements IFlexAsset, IFlexDisplayObject { mx_internal static const VERSION:String = "3.2.0.3958"; public function BitmapAsset(_arg1:BitmapData=null, _arg2:String="auto", _arg3:Boolean=false){ super(_arg1, _arg2, _arg3); } public function get measuredWidth():Number{ if (bitmapData){ return (bitmapData.width); }; return (0); } public function get measuredHeight():Number{ if (bitmapData){ return (bitmapData.height); }; return (0); } public function setActualSize(_arg1:Number, _arg2:Number):void{ width = _arg1; height = _arg2; } public function move(_arg1:Number, _arg2:Number):void{ this.x = _arg1; this.y = _arg2; } } }//package mx.core
Section 16
//FlexBitmap (mx.core.FlexBitmap) package mx.core { import flash.display.*; import mx.utils.*; public class FlexBitmap extends Bitmap { mx_internal static const VERSION:String = "3.2.0.3958"; public function FlexBitmap(_arg1:BitmapData=null, _arg2:String="auto", _arg3:Boolean=false){ var bitmapData = _arg1; var pixelSnapping = _arg2; var smoothing = _arg3; super(bitmapData, pixelSnapping, smoothing); try { name = NameUtil.createUniqueName(this); } catch(e:Error) { }; } override public function toString():String{ return (NameUtil.displayObjectToString(this)); } } }//package mx.core
Section 17
//IFlexAsset (mx.core.IFlexAsset) package mx.core { public interface IFlexAsset { } }//package mx.core
Section 18
//IFlexDisplayObject (mx.core.IFlexDisplayObject) package mx.core { import flash.display.*; import flash.events.*; import flash.geom.*; import flash.accessibility.*; public interface IFlexDisplayObject extends IBitmapDrawable, IEventDispatcher { function get visible():Boolean; function get rotation():Number; function localToGlobal(_arg1:Point):Point; function get name():String; function set width(_arg1:Number):void; function get measuredHeight():Number; function get blendMode():String; function get scale9Grid():Rectangle; function set name(_arg1:String):void; function set scaleX(_arg1:Number):void; function set scaleY(_arg1:Number):void; function get measuredWidth():Number; function get accessibilityProperties():AccessibilityProperties; function set scrollRect(_arg1:Rectangle):void; function get cacheAsBitmap():Boolean; function globalToLocal(_arg1:Point):Point; function get height():Number; function set blendMode(_arg1:String):void; function get parent():DisplayObjectContainer; function getBounds(_arg1:DisplayObject):Rectangle; function get opaqueBackground():Object; function set scale9Grid(_arg1:Rectangle):void; function setActualSize(_arg1:Number, _arg2:Number):void; function set alpha(_arg1:Number):void; function set accessibilityProperties(_arg1:AccessibilityProperties):void; function get width():Number; function hitTestPoint(_arg1:Number, _arg2:Number, _arg3:Boolean=false):Boolean; function set cacheAsBitmap(_arg1:Boolean):void; function get scaleX():Number; function get scaleY():Number; function get scrollRect():Rectangle; function get mouseX():Number; function get mouseY():Number; function set height(_arg1:Number):void; function set mask(_arg1:DisplayObject):void; function getRect(_arg1:DisplayObject):Rectangle; function get alpha():Number; function set transform(_arg1:Transform):void; function move(_arg1:Number, _arg2:Number):void; function get loaderInfo():LoaderInfo; function get root():DisplayObject; function hitTestObject(_arg1:DisplayObject):Boolean; function set opaqueBackground(_arg1:Object):void; function set visible(_arg1:Boolean):void; function get mask():DisplayObject; function set x(_arg1:Number):void; function set y(_arg1:Number):void; function get transform():Transform; function set filters(_arg1:Array):void; function get x():Number; function get y():Number; function get filters():Array; function set rotation(_arg1:Number):void; function get stage():Stage; } }//package mx.core
Section 19
//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 20
//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 21
//SoundAsset (mx.core.SoundAsset) package mx.core { import flash.media.*; public class SoundAsset extends Sound implements IFlexAsset { mx_internal static const VERSION:String = "3.2.0.3958"; } }//package mx.core
Section 22
//NameUtil (mx.utils.NameUtil) package mx.utils { import flash.display.*; import mx.core.*; import flash.utils.*; public class NameUtil { mx_internal static const VERSION:String = "3.2.0.3958"; private static var counter:int = 0; public static function displayObjectToString(_arg1:DisplayObject):String{ var result:String; var o:DisplayObject; var s:String; var indices:Array; var displayObject = _arg1; try { o = displayObject; while (o != null) { if (((((o.parent) && (o.stage))) && ((o.parent == o.stage)))){ break; }; s = o.name; if ((o is IRepeaterClient)){ indices = IRepeaterClient(o).instanceIndices; if (indices){ s = (s + (("[" + indices.join("][")) + "]")); }; }; result = ((result == null)) ? s : ((s + ".") + result); o = o.parent; }; } catch(e:SecurityError) { }; return (result); } public static function createUniqueName(_arg1:Object):String{ if (!_arg1){ return (null); }; var _local2:String = getQualifiedClassName(_arg1); var _local3:int = _local2.indexOf("::"); if (_local3 != -1){ _local2 = _local2.substr((_local3 + 2)); }; var _local4:int = _local2.charCodeAt((_local2.length - 1)); if ((((_local4 >= 48)) && ((_local4 <= 57)))){ _local2 = (_local2 + "_"); }; return ((_local2 + counter++)); } } }//package mx.utils
Section 23
//Camera3D (org.papervision3d.cameras.Camera3D) package org.papervision3d.cameras { import flash.geom.*; import org.papervision3d.objects.*; import org.papervision3d.core.culling.*; import org.papervision3d.core.proto.*; import org.papervision3d.core.math.*; public class Camera3D extends CameraObject3D { private var _prevHeight:Number; private var _focusFix:Matrix3D; private var _prevZoom:Number; private var _prevFocus:Number; private var _frustumCulling:Boolean; private var _prevWidth:Number; private var _far:Number; public static var DEFAULT_FAR:Number = 20000; public function Camera3D(_arg1:Number=10, _arg2:Number=40, _arg3:Boolean=false){ super(_arg1, _arg2); _prevFocus = 0; _prevZoom = 0; _frustumCulling = _arg3; _far = DEFAULT_FAR; _focusFix = Matrix3D.IDENTITY; } public function get near():Number{ return (this.focus); } public function update(_arg1:Rectangle):void{ if (!_arg1){ throw (new Error(("Camera3D#update: Invalid viewport rectangle! " + _arg1))); }; this.viewport = _arg1; _prevFocus = this.focus; _prevZoom = this.zoom; _prevWidth = this.viewport.width; _prevHeight = this.viewport.height; this.frustumCulling = _frustumCulling; } override public function orbit(_arg1:Number, _arg2:Number, _arg3:Boolean=true, _arg4:DisplayObject3D=null):void{ _arg4 = ((_arg4) || (_target)); _arg4 = ((_arg4) || (DisplayObject3D.ZERO)); if (_arg3){ _arg1 = (_arg1 * (Math.PI / 180)); _arg2 = (_arg2 * (Math.PI / 180)); }; var _local5:Number = (_arg4.world.n14 - this.x); var _local6:Number = (_arg4.world.n24 - this.y); var _local7:Number = (_arg4.world.n34 - this.z); var _local8:Number = Math.sqrt((((_local5 * _local5) + (_local6 * _local6)) + (_local7 * _local7))); var _local9:Number = (Math.cos(_arg2) * Math.sin(_arg1)); var _local10:Number = (Math.sin(_arg2) * Math.sin(_arg1)); var _local11:Number = Math.cos(_arg1); this.x = (_arg4.world.n14 + (_local9 * _local8)); this.y = (_arg4.world.n24 + (_local11 * _local8)); this.z = (_arg4.world.n34 + (_local10 * _local8)); this.lookAt(_arg4); } public function set far(_arg1:Number):void{ if (_arg1 > this.focus){ _far = _arg1; this.update(this.viewport); }; } public function set near(_arg1:Number):void{ if (_arg1 > 0){ this.focus = _arg1; this.update(this.viewport); }; } override public function transformView(_arg1:Matrix3D=null):void{ if (((((((!((focus == _prevFocus))) || (!((zoom == _prevZoom))))) || (!((viewport.width == _prevWidth))))) || (!((viewport.height == _prevHeight))))){ update(viewport); }; if (_target){ lookAt(_target); } else { if (_transformDirty){ updateTransform(); }; }; _focusFix.copy(this.transform); _focusFix.n14 = (_focusFix.n14 + (focus * this.transform.n13)); _focusFix.n24 = (_focusFix.n24 + (focus * this.transform.n23)); _focusFix.n34 = (_focusFix.n34 + (focus * this.transform.n33)); super.transformView(_focusFix); if ((frustum is FrustumCuller)){ frustum.transform.copy(this.transform); }; } public function get frustumCulling():Boolean{ return (_frustumCulling); } public function get far():Number{ return (_far); } public function set frustumCulling(_arg1:Boolean):void{ _frustumCulling = _arg1; if (_frustumCulling){ if (!this.frustum){ this.frustum = new FrustumCuller(); }; this.frustum.initialize(this.fov, (this.viewport.width / this.viewport.height), (this.focus / this.zoom), _far); } else { this.frustum = null; }; } } }//package org.papervision3d.cameras
Section 24
//CoordinateTools (org.papervision3d.core.components.as3.utils.CoordinateTools) package org.papervision3d.core.components.as3.utils { import flash.display.*; import flash.geom.*; public class CoordinateTools { public static function random(_arg1:Number):Number{ return (Math.floor((Math.random() * _arg1))); } public static function localToLocal(_arg1:DisplayObject, _arg2:DisplayObject, _arg3:Point=null):Point{ var _local4:Point = (_arg3) ? _arg3 : new Point(); _local4 = _arg1.localToGlobal(_local4); _local4 = _arg2.globalToLocal(_local4); return (_local4); } } }//package org.papervision3d.core.components.as3.utils
Section 25
//DefaultLineCuller (org.papervision3d.core.culling.DefaultLineCuller) package org.papervision3d.core.culling { import org.papervision3d.core.geom.renderables.*; public class DefaultLineCuller implements ILineCuller { public function testLine(_arg1:Line3D):Boolean{ return (((_arg1.v0.vertex3DInstance.visible) && (_arg1.v1.vertex3DInstance.visible))); } } }//package org.papervision3d.core.culling
Section 26
//DefaultParticleCuller (org.papervision3d.core.culling.DefaultParticleCuller) package org.papervision3d.core.culling { import org.papervision3d.core.geom.renderables.*; public class DefaultParticleCuller implements IParticleCuller { public function testParticle(_arg1:Particle):Boolean{ if (_arg1.material.invisible == false){ if (_arg1.vertex3D.vertex3DInstance.visible == true){ return (true); }; }; return (false); } } }//package org.papervision3d.core.culling
Section 27
//DefaultTriangleCuller (org.papervision3d.core.culling.DefaultTriangleCuller) package org.papervision3d.core.culling { import org.papervision3d.core.proto.*; import org.papervision3d.core.geom.renderables.*; public class DefaultTriangleCuller implements ITriangleCuller { protected static var y2:Number; protected static var y1:Number; protected static var y0:Number; protected static var x0:Number; protected static var x1:Number; protected static var x2:Number; public function testFace(_arg1:Triangle3D, _arg2:Vertex3DInstance, _arg3:Vertex3DInstance, _arg4:Vertex3DInstance):Boolean{ var _local5:MaterialObject3D; if (((((_arg2.visible) && (_arg3.visible))) && (_arg4.visible))){ _local5 = (_arg1.material) ? _arg1.material : _arg1.instance.material; if (_local5.invisible){ return (false); }; x0 = _arg2.x; y0 = _arg2.y; x1 = _arg3.x; y1 = _arg3.y; x2 = _arg4.x; y2 = _arg4.y; if (_local5.oneSide){ if (_local5.opposite){ if ((((x2 - x0) * (y1 - y0)) - ((y2 - y0) * (x1 - x0))) > 0){ return (false); }; } else { if ((((x2 - x0) * (y1 - y0)) - ((y2 - y0) * (x1 - x0))) < 0){ return (false); }; }; }; return (true); }; return (false); } } }//package org.papervision3d.core.culling
Section 28
//FrustumCuller (org.papervision3d.core.culling.FrustumCuller) package org.papervision3d.core.culling { import org.papervision3d.objects.*; import org.papervision3d.core.math.*; import org.papervision3d.core.geom.renderables.*; public class FrustumCuller implements IObjectCuller { private var _tang:Number; private var _near:Number; private var _ratio:Number; private var _fov:Number; private var _far:Number; private var _nh:Number; private var _fh:Number; private var _nw:Number; public var transform:Matrix3D; private var _sphereY:Number; private var _sphereX:Number; private var _fw:Number; public static const OUTSIDE:int = -1; public static const INSIDE:int = 1; public static const INTERSECT:int = 0; public function FrustumCuller(){ this.transform = Matrix3D.IDENTITY; this.initialize(); } public function get ratio():Number{ return (_ratio); } public function pointInFrustum(_arg1:Number, _arg2:Number, _arg3:Number):int{ var _local4:Matrix3D = this.transform; var _local5:Number = (_arg1 - _local4.n14); var _local6:Number = (_arg2 - _local4.n24); var _local7:Number = (_arg3 - _local4.n34); var _local8:Number = (((_local5 * _local4.n13) + (_local6 * _local4.n23)) + (_local7 * _local4.n33)); if ((((_local8 > _far)) || ((_local8 < _near)))){ return (OUTSIDE); }; var _local9:Number = (((_local5 * _local4.n12) + (_local6 * _local4.n22)) + (_local7 * _local4.n32)); var _local10:Number = (_local8 * _tang); if ((((_local9 > _local10)) || ((_local9 < -(_local10))))){ return (OUTSIDE); }; var _local11:Number = (((_local5 * _local4.n11) + (_local6 * _local4.n21)) + (_local7 * _local4.n31)); _local10 = (_local10 * _ratio); if ((((_local11 > _local10)) || ((_local11 < -(_local10))))){ return (OUTSIDE); }; return (INSIDE); } public function get fov():Number{ return (_fov); } public function set ratio(_arg1:Number):void{ this.initialize(_fov, _arg1, _near, _far); } public function set near(_arg1:Number):void{ this.initialize(_fov, _ratio, _arg1, _far); } public function set fov(_arg1:Number):void{ this.initialize(_arg1, _ratio, _near, _far); } public function get far():Number{ return (_far); } public function initialize(_arg1:Number=60, _arg2:Number=1.333, _arg3:Number=1, _arg4:Number=5000):void{ _fov = _arg1; _ratio = _arg2; _near = _arg3; _far = _arg4; var _local5:Number = (((Math.PI / 180) * _fov) * 0.5); _tang = Math.tan(_local5); _nh = (_near * _tang); _nw = (_nh * _ratio); _fh = (_far * _tang); _fw = (_fh * _ratio); var _local6:Number = Math.atan((_tang * _ratio)); _sphereX = (1 / Math.cos(_local6)); _sphereY = (1 / Math.cos(_local5)); } public function set far(_arg1:Number):void{ this.initialize(_fov, _ratio, _near, _arg1); } public function get near():Number{ return (_near); } public function sphereInFrustum(_arg1:DisplayObject3D, _arg2:BoundingSphere):int{ var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local3:Number = _arg2.radius; var _local8:int = INSIDE; var _local9:Matrix3D = this.transform; var _local10:Number = (_arg1.world.n14 - _local9.n14); var _local11:Number = (_arg1.world.n24 - _local9.n24); var _local12:Number = (_arg1.world.n34 - _local9.n34); _local7 = (((_local10 * _local9.n13) + (_local11 * _local9.n23)) + (_local12 * _local9.n33)); if ((((_local7 > (_far + _local3))) || ((_local7 < (_near - _local3))))){ return (OUTSIDE); }; if ((((_local7 > (_far - _local3))) || ((_local7 < (_near + _local3))))){ _local8 = INTERSECT; }; _local6 = (((_local10 * _local9.n12) + (_local11 * _local9.n22)) + (_local12 * _local9.n32)); _local4 = (_sphereY * _local3); _local7 = (_local7 * _tang); if ((((_local6 > (_local7 + _local4))) || ((_local6 < (-(_local7) - _local4))))){ return (OUTSIDE); }; if ((((_local6 > (_local7 - _local4))) || ((_local6 < (-(_local7) + _local4))))){ _local8 = INTERSECT; }; _local5 = (((_local10 * _local9.n11) + (_local11 * _local9.n21)) + (_local12 * _local9.n31)); _local7 = (_local7 * _ratio); _local4 = (_sphereX * _local3); if ((((_local5 > (_local7 + _local4))) || ((_local5 < (-(_local7) - _local4))))){ return (OUTSIDE); }; if ((((_local5 > (_local7 - _local4))) || ((_local5 < (-(_local7) + _local4))))){ _local8 = INTERSECT; }; return (_local8); } public function testObject(_arg1:DisplayObject3D):int{ var _local2:int = INSIDE; if (((((!(_arg1.geometry)) || (!(_arg1.geometry.vertices)))) || (!(_arg1.geometry.vertices.length)))){ return (_local2); }; switch (_arg1.frustumTestMethod){ case FrustumTestMethod.BOUNDING_SPHERE: _local2 = sphereInFrustum(_arg1, _arg1.geometry.boundingSphere); break; case FrustumTestMethod.BOUNDING_BOX: _local2 = aabbInFrustum(_arg1, _arg1.geometry.aabb); break; default: break; }; return (_local2); } public function aabbInFrustum(_arg1:DisplayObject3D, _arg2:AxisAlignedBoundingBox, _arg3:Boolean=true):int{ var _local4:Vertex3D; var _local5:Number3D; var _local6:int; var _local7:int; var _local8:Array = _arg2.getBoxVertices(); for each (_local4 in _local8) { _local5 = _local4.toNumber3D(); Matrix3D.multiplyVector(_arg1.world, _local5); if (pointInFrustum(_local5.x, _local5.y, _local5.z) == INSIDE){ _local6++; if (_arg3){ return (INSIDE); }; } else { _local7++; }; if (((_local6) && (_local7))){ return (INTERSECT); }; }; if (_local6){ return (((_local6 < 8)) ? INTERSECT : INSIDE); //unresolved jump }; return (OUTSIDE); } } }//package org.papervision3d.core.culling
Section 29
//FrustumTestMethod (org.papervision3d.core.culling.FrustumTestMethod) package org.papervision3d.core.culling { public class FrustumTestMethod { public static const BOUNDING_BOX:int = 1; public static const NO_TESTING:int = -1; public static const BOUNDING_SPHERE:int = 0; } }//package org.papervision3d.core.culling
Section 30
//ILineCuller (org.papervision3d.core.culling.ILineCuller) package org.papervision3d.core.culling { import org.papervision3d.core.geom.renderables.*; public interface ILineCuller { function testLine(_arg1:Line3D):Boolean; } }//package org.papervision3d.core.culling
Section 31
//IObjectCuller (org.papervision3d.core.culling.IObjectCuller) package org.papervision3d.core.culling { import org.papervision3d.objects.*; public interface IObjectCuller { function testObject(_arg1:DisplayObject3D):int; } }//package org.papervision3d.core.culling
Section 32
//IParticleCuller (org.papervision3d.core.culling.IParticleCuller) package org.papervision3d.core.culling { import org.papervision3d.core.geom.renderables.*; public interface IParticleCuller { function testParticle(_arg1:Particle):Boolean; } }//package org.papervision3d.core.culling
Section 33
//ITriangleCuller (org.papervision3d.core.culling.ITriangleCuller) package org.papervision3d.core.culling { import org.papervision3d.core.geom.renderables.*; public interface ITriangleCuller { function testFace(_arg1:Triangle3D, _arg2:Vertex3DInstance, _arg3:Vertex3DInstance, _arg4:Vertex3DInstance):Boolean; } }//package org.papervision3d.core.culling
Section 34
//RectangleLineCuller (org.papervision3d.core.culling.RectangleLineCuller) package org.papervision3d.core.culling { import flash.geom.*; import org.papervision3d.core.geom.renderables.*; import org.papervision3d.core.math.util.*; public class RectangleLineCuller implements ILineCuller { private var lineBoundsRect:Rectangle; private var rectIntersection:Rectangle; private var cullingRectangle:Rectangle; public function RectangleLineCuller(_arg1:Rectangle=null):void{ if (_arg1){ this.cullingRectangle = _arg1; }; lineBoundsRect = new Rectangle(); rectIntersection = new Rectangle(); } public function testLine(_arg1:Line3D):Boolean{ if (((!(_arg1.v0.vertex3DInstance.visible)) || (!(_arg1.v1.vertex3DInstance.visible)))){ return (false); }; var _local2:Number = _arg1.v0.vertex3DInstance.x; var _local3:Number = _arg1.v0.vertex3DInstance.y; var _local4:Number = _arg1.v1.vertex3DInstance.x; var _local5:Number = _arg1.v1.vertex3DInstance.y; lineBoundsRect.width = Math.abs((_local4 - _local2)); lineBoundsRect.height = Math.abs((_local5 - _local3)); if (_local2 < _local4){ lineBoundsRect.x = _local2; } else { lineBoundsRect.x = _local4; }; if (_local3 < _local5){ lineBoundsRect.y = _local3; } else { lineBoundsRect.y = _local5; }; if (cullingRectangle.containsRect(lineBoundsRect)){ return (true); }; if (!FastRectangleTools.intersects(lineBoundsRect, cullingRectangle)){ return (false); }; rectIntersection = FastRectangleTools.intersection(lineBoundsRect, cullingRectangle); var _local6:Number = ((_local5 - _local3) / (_local4 - _local2)); var _local7:Number = (_local3 - (_local6 * _local2)); var _local8:Number = ((cullingRectangle.top - _local7) / _local6); if ((((_local8 > rectIntersection.left)) && ((_local8 < rectIntersection.right)))){ return (true); }; _local8 = ((cullingRectangle.bottom - _local7) / _local6); if ((((_local8 > rectIntersection.left)) && ((_local8 < rectIntersection.right)))){ return (true); }; var _local9:Number = ((_local6 * cullingRectangle.left) + _local7); if ((((_local9 > rectIntersection.top)) && ((_local9 < rectIntersection.bottom)))){ return (true); }; _local9 = ((_local6 * cullingRectangle.right) + _local7); if ((((_local9 > rectIntersection.top)) && ((_local9 < rectIntersection.bottom)))){ return (true); }; return (false); } } }//package org.papervision3d.core.culling
Section 35
//RectangleParticleCuller (org.papervision3d.core.culling.RectangleParticleCuller) package org.papervision3d.core.culling { import flash.geom.*; import org.papervision3d.core.geom.renderables.*; import org.papervision3d.core.math.util.*; public class RectangleParticleCuller implements IParticleCuller { public var cullingRectangle:Rectangle; private static var vInstance:Vertex3DInstance; private static var testPoint:Point; public function RectangleParticleCuller(_arg1:Rectangle=null){ this.cullingRectangle = _arg1; testPoint = new Point(); } public function testParticle(_arg1:Particle):Boolean{ vInstance = _arg1.vertex3D.vertex3DInstance; if (_arg1.material.invisible == false){ if (vInstance.visible){ if (FastRectangleTools.intersects(_arg1.renderRect, cullingRectangle)){ return (true); }; }; }; return (false); } } }//package org.papervision3d.core.culling
Section 36
//RectangleTriangleCuller (org.papervision3d.core.culling.RectangleTriangleCuller) package org.papervision3d.core.culling { import flash.geom.*; import org.papervision3d.core.geom.renderables.*; import org.papervision3d.core.math.util.*; public class RectangleTriangleCuller extends DefaultTriangleCuller implements ITriangleCuller { public var cullingRectangle:Rectangle; private static const DEFAULT_RECT_X:Number = -((DEFAULT_RECT_W / 2)); private static const DEFAULT_RECT_W:Number = 640; private static const DEFAULT_RECT_H:Number = 480; private static const DEFAULT_RECT_Y:Number = -((DEFAULT_RECT_H / 2)); private static var hitRect:Rectangle = new Rectangle(); public function RectangleTriangleCuller(_arg1:Rectangle=null):void{ cullingRectangle = new Rectangle(DEFAULT_RECT_X, DEFAULT_RECT_Y, DEFAULT_RECT_W, DEFAULT_RECT_H); super(); if (_arg1){ this.cullingRectangle = _arg1; }; } override public function testFace(_arg1:Triangle3D, _arg2:Vertex3DInstance, _arg3:Vertex3DInstance, _arg4:Vertex3DInstance):Boolean{ if (super.testFace(_arg1, _arg2, _arg3, _arg4)){ hitRect.x = Math.min(_arg4.x, Math.min(_arg3.x, _arg2.x)); hitRect.width = (Math.max(_arg4.x, Math.max(_arg3.x, _arg2.x)) + Math.abs(hitRect.x)); hitRect.y = Math.min(_arg4.y, Math.min(_arg3.y, _arg2.y)); hitRect.height = (Math.max(_arg4.y, Math.max(_arg3.y, _arg2.y)) + Math.abs(hitRect.y)); return (FastRectangleTools.intersects(cullingRectangle, hitRect)); }; return (false); } } }//package org.papervision3d.core.culling
Section 37
//ViewportObjectFilter (org.papervision3d.core.culling.ViewportObjectFilter) package org.papervision3d.core.culling { import org.papervision3d.objects.*; import flash.utils.*; public class ViewportObjectFilter implements IObjectCuller { protected var _mode:int; protected var objects:Dictionary; public function ViewportObjectFilter(_arg1:int):void{ this.mode = _arg1; init(); } public function addObject(_arg1:DisplayObject3D):void{ objects[_arg1] = _arg1; } public function get mode():int{ return (_mode); } public function set mode(_arg1:int):void{ _mode = _arg1; } public function removeObject(_arg1:DisplayObject3D):void{ delete objects[_arg1]; } private function init():void{ objects = new Dictionary(true); } public function testObject(_arg1:DisplayObject3D):int{ if (objects[_arg1]){ if (_mode == ViewportObjectFilterMode.INCLUSIVE){ return (1); }; if (_mode == ViewportObjectFilterMode.EXCLUSIVE){ return (0); }; } else { if (_mode == ViewportObjectFilterMode.INCLUSIVE){ return (0); }; if (_mode == ViewportObjectFilterMode.EXCLUSIVE){ return (1); }; }; return (0); } public function destroy():void{ objects = null; } } }//package org.papervision3d.core.culling
Section 38
//ViewportObjectFilterMode (org.papervision3d.core.culling.ViewportObjectFilterMode) package org.papervision3d.core.culling { public class ViewportObjectFilterMode { public static const INCLUSIVE:int = 0; public static const EXCLUSIVE:int = 1; } }//package org.papervision3d.core.culling
Section 39
//UserData (org.papervision3d.core.data.UserData) package org.papervision3d.core.data { public class UserData { public var data; public function UserData(_arg1=null){ this.data = _arg1; } } }//package org.papervision3d.core.data
Section 40
//AbstractRenderable (org.papervision3d.core.geom.renderables.AbstractRenderable) package org.papervision3d.core.geom.renderables { import org.papervision3d.objects.*; import org.papervision3d.core.render.command.*; import org.papervision3d.core.data.*; public class AbstractRenderable implements IRenderable { public var _userData:UserData; public var instance:DisplayObject3D; public function set userData(_arg1:UserData):void{ _userData = _arg1; } public function get userData():UserData{ return (_userData); } public function getRenderListItem():IRenderListItem{ return (null); } } }//package org.papervision3d.core.geom.renderables
Section 41
//IRenderable (org.papervision3d.core.geom.renderables.IRenderable) package org.papervision3d.core.geom.renderables { import org.papervision3d.core.render.command.*; public interface IRenderable { function getRenderListItem():IRenderListItem; } }//package org.papervision3d.core.geom.renderables
Section 42
//Line3D (org.papervision3d.core.geom.renderables.Line3D) package org.papervision3d.core.geom.renderables { import org.papervision3d.core.render.command.*; import org.papervision3d.core.geom.*; import org.papervision3d.materials.special.*; public class Line3D extends AbstractRenderable implements IRenderable { public var size:Number; public var material:LineMaterial; public var cV:Vertex3D; public var renderCommand:RenderLine; public var v0:Vertex3D; public var v1:Vertex3D; public function Line3D(_arg1:Lines3D, _arg2:LineMaterial, _arg3:Number, _arg4:Vertex3D, _arg5:Vertex3D, _arg6:Vertex3D=null){ this.size = _arg3; this.material = _arg2; this.v0 = _arg4; this.v1 = _arg5; this.cV = _arg5; this.instance = _arg1; this.renderCommand = new RenderLine(this); } public function addControlVertex(_arg1:Number, _arg2:Number, _arg3:Number):void{ cV = new Vertex3D(_arg1, _arg2, _arg3); if (instance.geometry.vertices.indexOf(cV) == -1){ instance.geometry.vertices.push(cV); }; } override public function getRenderListItem():IRenderListItem{ return (this.renderCommand); } } }//package org.papervision3d.core.geom.renderables
Section 43
//Particle (org.papervision3d.core.geom.renderables.Particle) package org.papervision3d.core.geom.renderables { import flash.geom.*; import org.papervision3d.core.render.command.*; import org.papervision3d.materials.special.*; public class Particle extends AbstractRenderable implements IRenderable { public var size:Number; public var material:ParticleMaterial; public var renderScale:Number; public var vertex3D:Vertex3D; public var renderRect:Rectangle; public var renderCommand:RenderParticle; public function Particle(_arg1:ParticleMaterial, _arg2:Number=1, _arg3:Number=0, _arg4:Number=0, _arg5:Number=0){ this.material = _arg1; this.size = _arg2; this.renderCommand = new RenderParticle(this); this.renderRect = new Rectangle(); vertex3D = new Vertex3D(_arg3, _arg4, _arg5); } public function updateRenderRect():void{ material.updateRenderRect(this); } public function get z():Number{ return (vertex3D.z); } public function set z(_arg1:Number):void{ vertex3D.z = _arg1; } public function set x(_arg1:Number):void{ vertex3D.x = _arg1; } public function set y(_arg1:Number):void{ vertex3D.y = _arg1; } public function get x():Number{ return (vertex3D.x); } public function get y():Number{ return (vertex3D.y); } override public function getRenderListItem():IRenderListItem{ return (renderCommand); } } }//package org.papervision3d.core.geom.renderables
Section 44
//Triangle3D (org.papervision3d.core.geom.renderables.Triangle3D) package org.papervision3d.core.geom.renderables { import org.papervision3d.objects.*; import org.papervision3d.core.render.command.*; import org.papervision3d.core.proto.*; import org.papervision3d.core.math.*; public class Triangle3D extends AbstractRenderable implements IRenderable { public var _uvArray:Array; public var face3DInstance:Triangle3DInstance; public var renderCommand:RenderTriangle; public var id:Number; public var material:MaterialObject3D; public var faceNormal:Number3D; public var screenZ:Number; public var uv0:NumberUV; public var uv1:NumberUV; public var _materialName:String; public var visible:Boolean; public var uv2:NumberUV; public var vertices:Array; public var v0:Vertex3D; public var v1:Vertex3D; public var v2:Vertex3D; private static var _totalFaces:Number = 0; public function Triangle3D(_arg1:DisplayObject3D, _arg2:Array, _arg3:MaterialObject3D=null, _arg4:Array=null){ this.instance = _arg1; this.renderCommand = new RenderTriangle(this); face3DInstance = new Triangle3DInstance(this, _arg1); faceNormal = new Number3D(); if (((_arg2) && ((_arg2.length == 3)))){ this.vertices = _arg2; v0 = _arg2[0]; v1 = _arg2[1]; v2 = _arg2[2]; createNormal(); } else { _arg2 = new Array(); v0 = (_arg2[0] = new Vertex3D()); v1 = (_arg2[1] = new Vertex3D()); v2 = (_arg2[2] = new Vertex3D()); }; this.material = _arg3; this.uv = _arg4; this.id = _totalFaces++; } public function set uv(_arg1:Array):void{ if (((_arg1) && ((_arg1.length == 3)))){ uv0 = NumberUV(_arg1[0]); uv1 = NumberUV(_arg1[1]); uv2 = NumberUV(_arg1[2]); }; _uvArray = _arg1; } override public function getRenderListItem():IRenderListItem{ return (renderCommand); } public function updateVertices():void{ v0 = vertices[0]; v1 = vertices[1]; v2 = vertices[2]; } public function createNormal():void{ var _local1:Number3D = v0.getPosition(); var _local2:Number3D = v1.getPosition(); var _local3:Number3D = v2.getPosition(); _local2.minusEq(_local1); _local3.minusEq(_local1); faceNormal = Number3D.cross(_local2, _local3, faceNormal); faceNormal.normalize(); } public function get uv():Array{ return (_uvArray); } } }//package org.papervision3d.core.geom.renderables
Section 45
//Triangle3DInstance (org.papervision3d.core.geom.renderables.Triangle3DInstance) package org.papervision3d.core.geom.renderables { import flash.display.*; import org.papervision3d.objects.*; import org.papervision3d.core.math.*; public class Triangle3DInstance { public var container:Sprite; public var instance:DisplayObject3D; public var visible:Boolean;// = false public var faceNormal:Number3D; public var screenZ:Number; public function Triangle3DInstance(_arg1:Triangle3D, _arg2:DisplayObject3D){ this.instance = _arg2; faceNormal = new Number3D(); } } }//package org.papervision3d.core.geom.renderables
Section 46
//Vertex3D (org.papervision3d.core.geom.renderables.Vertex3D) package org.papervision3d.core.geom.renderables { import org.papervision3d.core.render.command.*; import org.papervision3d.core.math.*; import flash.utils.*; public class Vertex3D extends AbstractRenderable implements IRenderable { public var normal:Number3D; protected var position:Number3D; public var vertex3DInstance:Vertex3DInstance; public var connectedFaces:Dictionary; public var extra:Object; public var x:Number; public var y:Number; public var z:Number; public function Vertex3D(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0){ position = new Number3D(); super(); this.x = (position.x = _arg1); this.y = (position.y = _arg2); this.z = (position.z = _arg3); this.vertex3DInstance = new Vertex3DInstance(); this.normal = new Number3D(); this.connectedFaces = new Dictionary(); } override public function getRenderListItem():IRenderListItem{ return (null); } public function getPosition():Number3D{ position.x = x; position.y = y; position.z = z; return (position); } public function toNumber3D():Number3D{ return (new Number3D(x, y, z)); } public function calculateNormal():void{ var _local1:Triangle3D; var _local2:Number = 0; normal.reset(); for each (_local1 in connectedFaces) { if (_local1.faceNormal){ _local2++; normal.plusEq(_local1.faceNormal); }; }; normal.x = (normal.x / _local2); normal.y = (normal.y / _local2); normal.z = (normal.z / _local2); normal.normalize(); } public function clone():Vertex3D{ var _local1:Vertex3D = new Vertex3D(x, y, z); _local1.extra = extra; _local1.vertex3DInstance = vertex3DInstance.clone(); _local1.normal = normal.clone(); return (_local1); } } }//package org.papervision3d.core.geom.renderables
Section 47
//Vertex3DInstance (org.papervision3d.core.geom.renderables.Vertex3DInstance) package org.papervision3d.core.geom.renderables { import org.papervision3d.core.math.*; public class Vertex3DInstance { public var y:Number; public var normal:Number3D; public var visible:Boolean; public var extra:Object; public var x:Number; public var z:Number; public function Vertex3DInstance(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0){ this.x = _arg1; this.y = _arg2; this.z = _arg3; this.visible = false; this.normal = new Number3D(); } public function clone():Vertex3DInstance{ var _local1:Vertex3DInstance = new Vertex3DInstance(x, y, z); _local1.visible = visible; _local1.extra = extra; return (_local1); } public static function cross(_arg1:Vertex3DInstance, _arg2:Vertex3DInstance):Number{ return (((_arg1.x * _arg2.y) - (_arg2.x * _arg1.y))); } public static function dot(_arg1:Vertex3DInstance, _arg2:Vertex3DInstance):Number{ return (((_arg1.x * _arg2.x) + (_arg1.y * _arg2.y))); } public static function subTo(_arg1:Vertex3DInstance, _arg2:Vertex3DInstance, _arg3:Vertex3DInstance):void{ _arg3.x = (_arg2.x - _arg1.x); _arg3.y = (_arg2.y - _arg1.y); } public static function sub(_arg1:Vertex3DInstance, _arg2:Vertex3DInstance):Vertex3DInstance{ return (new Vertex3DInstance((_arg2.x - _arg1.x), (_arg2.y - _arg1.y))); } } }//package org.papervision3d.core.geom.renderables
Section 48
//Lines3D (org.papervision3d.core.geom.Lines3D) package org.papervision3d.core.geom { import org.papervision3d.core.render.data.*; import org.papervision3d.objects.*; import org.papervision3d.core.geom.renderables.*; import org.papervision3d.materials.special.*; import org.papervision3d.core.render.draw.*; import org.papervision3d.*; public class Lines3D extends Vertices3D { private var _material:ILineDrawer; public var lines:Array; public function Lines3D(_arg1:LineMaterial, _arg2:String=null){ super(null, _arg2); this.material = _arg1; init(); } private function init():void{ this.lines = new Array(); } public function removeAllLines():void{ trace("WARNING - Lines3D.removeAllLines not yet implemented"); } public function addLine(_arg1:Line3D):void{ lines.push(_arg1); _arg1.instance = this; if (geometry.vertices.indexOf(_arg1.v0) == -1){ geometry.vertices.push(_arg1.v0); }; if (geometry.vertices.indexOf(_arg1.v1) == -1){ geometry.vertices.push(_arg1.v1); }; if (_arg1.cV){ if (geometry.vertices.indexOf(_arg1.cV) == -1){ geometry.vertices.push(_arg1.cV); }; }; } public function addNewSegmentedLine(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number):void{ var _local12:Line3D; var _local14:Vertex3D; var _local9:Number = ((_arg6 - _arg3) / _arg2); var _local10:Number = ((_arg7 - _arg4) / _arg2); var _local11:Number = ((_arg8 - _arg5) / _arg2); var _local13:Vertex3D = new Vertex3D(_arg3, _arg4, _arg5); var _local15:Number = 0; while (_local15 <= _arg2) { _local14 = new Vertex3D((_arg3 + (_local9 * _local15)), (_arg4 + (_local10 * _local15)), (_arg5 + (_local11 * _local15))); _local12 = new Line3D(this, (material as LineMaterial), _arg1, _local13, _local14); addLine(_local12); _local13 = _local14; _local15++; }; } public function removeLine(_arg1:Line3D):void{ var _local2:int = lines.indexOf(_arg1); if (_local2 > -1){ lines.splice(_local2, 1); } else { if (Papervision3D.VERBOSE){ trace("Papervision3D Lines3D.removeLine : WARNING removal of non-existant line attempted. "); }; }; } override public function project(_arg1:DisplayObject3D, _arg2:RenderSessionData):Number{ var _local3:Line3D; var _local4:Number; super.project(_arg1, _arg2); for each (_local3 in lines) { if (_arg2.viewPort.lineCuller.testLine(_local3)){ _local3.renderCommand.renderer = _local3.material; _local4 = (_local4 + (_local3.renderCommand.screenDepth = ((_local3.v0.vertex3DInstance.z + _local3.v1.vertex3DInstance.z) / 2))); _arg2.renderer.addToRenderList(_local3.renderCommand); }; }; return ((_local4 / (lines.length + 1))); } public function addNewLine(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number):Line3D{ var _local8:Line3D = new Line3D(this, (material as LineMaterial), _arg1, new Vertex3D(_arg2, _arg3, _arg4), new Vertex3D(_arg5, _arg6, _arg7)); addLine(_local8); return (_local8); } } }//package org.papervision3d.core.geom
Section 49
//TriangleMesh3D (org.papervision3d.core.geom.TriangleMesh3D) package org.papervision3d.core.geom { import org.papervision3d.core.render.data.*; import org.papervision3d.objects.*; import org.papervision3d.core.render.command.*; import org.papervision3d.core.culling.*; import org.papervision3d.core.proto.*; import org.papervision3d.core.math.*; import org.papervision3d.core.geom.renderables.*; import flash.utils.*; import org.papervision3d.core.render.draw.*; public class TriangleMesh3D extends Vertices3D { public function TriangleMesh3D(_arg1:MaterialObject3D, _arg2:Array, _arg3:Array, _arg4:String=null){ super(_arg2, _arg4); this.geometry.faces = ((_arg3) || (new Array())); this.material = ((_arg1) || (MaterialObject3D.DEFAULT)); } public function mergeVertices():void{ var _local3:Vertex3D; var _local4:Triangle3D; var _local5:Vertex3D; var _local1:Dictionary = new Dictionary(); var _local2:Array = new Array(); for each (_local3 in this.geometry.vertices) { for each (_local5 in _local1) { if ((((((_local3.x == _local5.x)) && ((_local3.y == _local5.y)))) && ((_local3.z == _local5.z)))){ _local1[_local3] = _local5; break; }; }; if (!_local1[_local3]){ _local1[_local3] = _local3; _local2.push(_local3); }; }; this.geometry.vertices = _local2; for each (_local4 in geometry.faces) { _local4.v0 = _local1[_local4.v0]; _local4.v1 = _local1[_local4.v1]; _local4.v2 = _local1[_local4.v2]; }; } public function projectTexture(_arg1:String="x", _arg2:String="y"):void{ var _local10:String; var _local11:Triangle3D; var _local12:Array; var _local13:Vertex3D; var _local14:Vertex3D; var _local15:Vertex3D; var _local16:NumberUV; var _local17:NumberUV; var _local18:NumberUV; var _local3:Array = this.geometry.faces; var _local4:Object = this.boundingBox(); var _local5:Number = _local4.min[_arg1]; var _local6:Number = _local4.size[_arg1]; var _local7:Number = _local4.min[_arg2]; var _local8:Number = _local4.size[_arg2]; var _local9:MaterialObject3D = this.material; for (_local10 in _local3) { _local11 = _local3[Number(_local10)]; _local12 = _local11.vertices; _local13 = _local12[0]; _local14 = _local12[1]; _local15 = _local12[2]; _local16 = new NumberUV(((_local13[_arg1] - _local5) / _local6), ((_local13[_arg2] - _local7) / _local8)); _local17 = new NumberUV(((_local14[_arg1] - _local5) / _local6), ((_local14[_arg2] - _local7) / _local8)); _local18 = new NumberUV(((_local15[_arg1] - _local5) / _local6), ((_local15[_arg2] - _local7) / _local8)); _local11.uv = [_local16, _local17, _local18]; }; } override public function project(_arg1:DisplayObject3D, _arg2:RenderSessionData):Number{ var _local3:Array; var _local4:Number; var _local5:Number; var _local6:ITriangleCuller; var _local7:Vertex3DInstance; var _local8:Vertex3DInstance; var _local9:Vertex3DInstance; var _local10:Triangle3DInstance; var _local11:Triangle3D; var _local12:MaterialObject3D; var _local13:RenderTriangle; super.project(_arg1, _arg2); if (!this.culled){ _local3 = this.geometry.faces; _local4 = 0; _local5 = 0; _local6 = _arg2.triangleCuller; for each (_local11 in _local3) { _local12 = (_local11.material) ? _local11.material : material; _local10 = _local11.face3DInstance; _local7 = _local11.v0.vertex3DInstance; _local8 = _local11.v1.vertex3DInstance; _local9 = _local11.v2.vertex3DInstance; if ((_local10.visible = _local6.testFace(_local11, _local7, _local8, _local9))){ _local4 = (_local4 + (_local10.screenZ = (((_local7.z + _local8.z) + _local9.z) / 3))); _local13 = _local11.renderCommand; _local5++; _local13.renderer = (_local12 as ITriangleDrawer); _local13.screenDepth = _local10.screenZ; _arg2.renderer.addToRenderList(_local13); } else { _arg2.renderStatistics.culledTriangles++; }; }; return ((this.screenZ = (_local4 / _local5))); //unresolved jump }; _arg2.renderStatistics.culledObjects++; return (0); } public function quarterFaces():void{ var _local4:Triangle3D; var _local6:Vertex3D; var _local7:Vertex3D; var _local8:Vertex3D; var _local9:Vertex3D; var _local10:Vertex3D; var _local11:Vertex3D; var _local12:NumberUV; var _local13:NumberUV; var _local14:NumberUV; var _local15:NumberUV; var _local16:NumberUV; var _local17:NumberUV; var _local18:Triangle3D; var _local19:Triangle3D; var _local20:Triangle3D; var _local21:Triangle3D; var _local1:Array = new Array(); var _local2:Array = new Array(); var _local3:Array = this.geometry.faces; var _local5:int = _local3.length; while ((_local4 = _local3[--_local5])) { _local6 = _local4.v0; _local7 = _local4.v1; _local8 = _local4.v2; _local9 = new Vertex3D(((_local6.x + _local7.x) / 2), ((_local6.y + _local7.y) / 2), ((_local6.z + _local7.z) / 2)); _local10 = new Vertex3D(((_local7.x + _local8.x) / 2), ((_local7.y + _local8.y) / 2), ((_local7.z + _local8.z) / 2)); _local11 = new Vertex3D(((_local8.x + _local6.x) / 2), ((_local8.y + _local6.y) / 2), ((_local8.z + _local6.z) / 2)); this.geometry.vertices.push(_local9, _local10, _local11); _local12 = _local4.uv[0]; _local13 = _local4.uv[1]; _local14 = _local4.uv[2]; _local15 = new NumberUV(((_local12.u + _local13.u) / 2), ((_local12.v + _local13.v) / 2)); _local16 = new NumberUV(((_local13.u + _local14.u) / 2), ((_local13.v + _local14.v) / 2)); _local17 = new NumberUV(((_local14.u + _local12.u) / 2), ((_local14.v + _local12.v) / 2)); _local18 = new Triangle3D(this, [_local6, _local9, _local11], _local4.material, [_local12, _local15, _local17]); _local19 = new Triangle3D(this, [_local9, _local7, _local10], _local4.material, [_local15, _local13, _local16]); _local20 = new Triangle3D(this, [_local11, _local10, _local8], _local4.material, [_local17, _local16, _local14]); _local21 = new Triangle3D(this, [_local9, _local10, _local11], _local4.material, [_local15, _local16, _local17]); _local2.push(_local18, _local19, _local20, _local21); }; this.geometry.faces = _local2; this.mergeVertices(); this.geometry.ready = true; } override public function clone():DisplayObject3D{ var _local1:DisplayObject3D = super.clone(); var _local2:TriangleMesh3D = new TriangleMesh3D(this.material, [], [], _local1.name); if (this.materials){ _local2.materials = this.materials.clone(); }; if (_local1.geometry){ _local2.geometry = _local1.geometry.clone(_local2); }; _local2.copyTransform(this.transform); return (_local2); } override public function set material(_arg1:MaterialObject3D):void{ var _local2:Triangle3D; super.material = _arg1; for each (_local2 in geometry.faces) { _local2.material = _arg1; }; } } }//package org.papervision3d.core.geom
Section 50
//Vertices3D (org.papervision3d.core.geom.Vertices3D) package org.papervision3d.core.geom { import org.papervision3d.core.render.data.*; import flash.geom.*; import org.papervision3d.objects.*; import org.papervision3d.core.culling.*; import org.papervision3d.core.proto.*; import org.papervision3d.core.math.*; import org.papervision3d.core.geom.renderables.*; public class Vertices3D extends DisplayObject3D { public function Vertices3D(_arg1:Array, _arg2:String=null){ super(_arg2, new GeometryObject3D()); this.geometry.vertices = ((_arg1) || (new Array())); } public function projectFrustum(_arg1:DisplayObject3D, _arg2:RenderSessionData):Number{ var _local17:Number; var _local18:Number; var _local19:Number; var _local20:Number; var _local21:Number; var _local22:Number; var _local23:Number; var _local26:Vertex3D; var _local27:Vertex3DInstance; var _local3:Matrix3D = this.view; var _local4:Rectangle = _arg2.camera.viewport; var _local5:Number = _local3.n11; var _local6:Number = _local3.n12; var _local7:Number = _local3.n13; var _local8:Number = _local3.n21; var _local9:Number = _local3.n22; var _local10:Number = _local3.n23; var _local11:Number = _local3.n31; var _local12:Number = _local3.n32; var _local13:Number = _local3.n33; var _local14:Number = _local3.n41; var _local15:Number = _local3.n42; var _local16:Number = _local3.n43; var _local24:Number = (_local4.width / 2); var _local25:Number = (_local4.height / 2); var _local28:Array = this.geometry.vertices; var _local29:int = _local28.length; while ((_local26 = _local28[--_local29])) { _local17 = _local26.x; _local18 = _local26.y; _local19 = _local26.z; _local22 = ((((_local17 * _local11) + (_local18 * _local12)) + (_local19 * _local13)) + _local3.n34); _local23 = ((((_local17 * _local14) + (_local18 * _local15)) + (_local19 * _local16)) + _local3.n44); _local27 = _local26.vertex3DInstance; _local22 = (_local22 / _local23); if ((_local27.visible = (((_local22 > 0)) && ((_local22 < 1))))){ _local20 = (((((_local17 * _local5) + (_local18 * _local6)) + (_local19 * _local7)) + _local3.n14) / _local23); _local21 = (((((_local17 * _local8) + (_local18 * _local9)) + (_local19 * _local10)) + _local3.n24) / _local23); _local27.x = (_local20 * _local24); _local27.y = (_local21 * _local25); _local27.z = (_local22 * _local23); }; }; return (0); } override public function project(_arg1:DisplayObject3D, _arg2:RenderSessionData):Number{ var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Vertex3D; var _local20:Vertex3DInstance; var _local21:Number; super.project(_arg1, _arg2); if (this.culled){ return (0); }; if ((_arg2.camera is IObjectCuller)){ return (projectFrustum(_arg1, _arg2)); }; var _local3:Matrix3D = this.view; var _local4:Number = _local3.n11; var _local5:Number = _local3.n12; var _local6:Number = _local3.n13; var _local7:Number = _local3.n21; var _local8:Number = _local3.n22; var _local9:Number = _local3.n23; var _local10:Number = _local3.n31; var _local11:Number = _local3.n32; var _local12:Number = _local3.n33; var _local22:Array = this.geometry.vertices; var _local23:int = _local22.length; var _local24:Number = _arg2.camera.focus; var _local25:Number = (_local24 * _arg2.camera.zoom); while ((_local19 = _local22[--_local23])) { _local13 = _local19.x; _local14 = _local19.y; _local15 = _local19.z; _local18 = ((((_local13 * _local10) + (_local14 * _local11)) + (_local15 * _local12)) + _local3.n34); _local20 = _local19.vertex3DInstance; if ((_local20.visible = ((_local24 + _local18) > 0))){ _local16 = ((((_local13 * _local4) + (_local14 * _local5)) + (_local15 * _local6)) + _local3.n14); _local17 = ((((_local13 * _local7) + (_local14 * _local8)) + (_local15 * _local9)) + _local3.n24); _local21 = (_local25 / (_local24 + _local18)); _local20.x = (_local16 * _local21); _local20.y = (_local17 * _local21); _local20.z = _local18; }; }; return (0); } public function transformVertices(_arg1:Matrix3D):void{ geometry.transformVertices(_arg1); } override public function clone():DisplayObject3D{ var _local1:DisplayObject3D = super.clone(); var _local2:Vertices3D = new Vertices3D(null, _local1.name); _local2.material = _local1.material; if (_local1.materials){ _local2.materials = _local1.materials.clone(); }; if (this.geometry){ _local2.geometry = this.geometry.clone(_local2); }; _local2.copyTransform(this.transform); return (_local2); } public function boundingBox():Object{ var _local3:Vertex3D; var _local1:Array = this.geometry.vertices; var _local2:Object = new Object(); _local2.min = new Number3D(Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE); _local2.max = new Number3D(-(Number.MAX_VALUE), -(Number.MAX_VALUE), -(Number.MAX_VALUE)); _local2.size = new Number3D(); for each (_local3 in _local1) { _local2.min.x = Math.min(_local3.x, _local2.min.x); _local2.min.y = Math.min(_local3.y, _local2.min.y); _local2.min.z = Math.min(_local3.z, _local2.min.z); _local2.max.x = Math.max(_local3.x, _local2.max.x); _local2.max.y = Math.max(_local3.y, _local2.max.y); _local2.max.z = Math.max(_local3.z, _local2.max.z); }; _local2.size.x = (_local2.max.x - _local2.min.x); _local2.size.y = (_local2.max.y - _local2.min.y); _local2.size.z = (_local2.max.z - _local2.min.z); return (_local2); } } }//package org.papervision3d.core.geom
Section 51
//TriangleMaterial (org.papervision3d.core.material.TriangleMaterial) package org.papervision3d.core.material { import flash.display.*; import org.papervision3d.core.render.data.*; import flash.geom.*; import org.papervision3d.core.proto.*; import org.papervision3d.core.geom.renderables.*; import org.papervision3d.core.render.draw.*; public class TriangleMaterial extends MaterialObject3D implements ITriangleDrawer { override public function drawTriangle(_arg1:Triangle3D, _arg2:Graphics, _arg3:RenderSessionData, _arg4:BitmapData=null, _arg5:Matrix=null):void{ } } }//package org.papervision3d.core.material
Section 52
//FastRectangleTools (org.papervision3d.core.math.util.FastRectangleTools) package org.papervision3d.core.math.util { import flash.geom.*; public class FastRectangleTools { public static function intersection(_arg1:Rectangle, _arg2:Rectangle, _arg3:Rectangle=null):Rectangle{ if (!_arg3){ _arg3 = new Rectangle(); }; if (!intersects(_arg1, _arg2)){ _arg3.x = (_arg3.y = (_arg3.width = (_arg3.height = 0))); return (_arg3); }; _arg3.left = ((_arg1.left)>_arg2.left) ? _arg1.left : _arg2.left; _arg3.right = ((_arg1.right)<_arg2.right) ? _arg1.right : _arg2.right; _arg3.top = ((_arg1.top)>_arg2.top) ? _arg1.top : _arg2.top; _arg3.bottom = ((_arg1.bottom)<_arg2.bottom) ? _arg1.bottom : _arg2.bottom; return (_arg3); } public static function intersects(_arg1:Rectangle, _arg2:Rectangle):Boolean{ if (!(((_arg1.right < _arg2.left)) || ((_arg1.left > _arg2.right)))){ if (!(((_arg1.bottom < _arg2.top)) || ((_arg1.top > _arg2.bottom)))){ return (true); }; }; return (false); } } }//package org.papervision3d.core.math.util
Section 53
//AxisAlignedBoundingBox (org.papervision3d.core.math.AxisAlignedBoundingBox) package org.papervision3d.core.math { import org.papervision3d.core.geom.renderables.*; public class AxisAlignedBoundingBox { public var minX:Number; public var minY:Number; public var minZ:Number; public var maxX:Number; public var maxY:Number; public var maxZ:Number; protected var _vertices:Array; public function AxisAlignedBoundingBox(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number){ this.minX = _arg1; this.minY = _arg2; this.minZ = _arg3; this.maxX = _arg4; this.maxY = _arg5; this.maxZ = _arg6; createBoxVertices(); } protected function createBoxVertices():void{ _vertices = new Array(); _vertices.push(new Vertex3D(minX, minY, minZ)); _vertices.push(new Vertex3D(minX, minY, maxZ)); _vertices.push(new Vertex3D(minX, maxY, minZ)); _vertices.push(new Vertex3D(minX, maxY, maxZ)); _vertices.push(new Vertex3D(maxX, minY, minZ)); _vertices.push(new Vertex3D(maxX, minY, maxZ)); _vertices.push(new Vertex3D(maxX, maxY, minZ)); _vertices.push(new Vertex3D(maxX, maxY, maxZ)); } public function getBoxVertices():Array{ return (_vertices); } public static function createFromVertices(_arg1:Array):AxisAlignedBoundingBox{ var _local8:Vertex3D; var _local2:Number = 0; var _local3:Number = 0; var _local4:Number = 0; var _local5:Number = 0; var _local6:Number = 0; var _local7:Number = 0; for each (_local8 in _arg1) { _local2 = ((_local8.x)<_local2) ? _local8.x : _local2; _local4 = ((_local8.y)<_local4) ? _local8.y : _local4; _local6 = ((_local8.z)<_local6) ? _local8.z : _local6; _local3 = ((_local8.x)>_local3) ? _local8.x : _local3; _local5 = ((_local8.y)>_local5) ? _local8.y : _local5; _local7 = ((_local8.z)>_local7) ? _local8.z : _local7; }; return (new AxisAlignedBoundingBox(_local2, _local4, _local6, _local3, _local5, _local7)); } } }//package org.papervision3d.core.math
Section 54
//BoundingSphere (org.papervision3d.core.math.BoundingSphere) package org.papervision3d.core.math { import org.papervision3d.core.geom.renderables.*; public class BoundingSphere { public var maxDistance:Number; public var radius:Number; public function BoundingSphere(_arg1:Number){ this.maxDistance = _arg1; this.radius = Math.sqrt(_arg1); } public static function getFromVertices(_arg1:Array):BoundingSphere{ var _local3:Number; var _local4:Vertex3D; var _local2:Number = 0; for each (_local4 in _arg1) { _local3 = (((_local4.x * _local4.x) + (_local4.y * _local4.y)) + (_local4.z * _local4.z)); _local2 = ((_local3)>_local2) ? _local3 : _local2; }; return (new BoundingSphere(_local2)); } } }//package org.papervision3d.core.math
Section 55
//Matrix3D (org.papervision3d.core.math.Matrix3D) package org.papervision3d.core.math { public class Matrix3D { public var n31:Number; public var n32:Number; public var n11:Number; public var n34:Number; public var n13:Number; public var n14:Number; public var n33:Number; public var n12:Number; public var n41:Number; public var n42:Number; public var n21:Number; public var n22:Number; public var n23:Number; public var n24:Number; public var n44:Number; public var n43:Number; private static var _cos:Function = Math.cos; private static var _sin:Function = Math.sin; private static var temp:Matrix3D = Matrix3D.IDENTITY; private static var n3Di:Number3D = Number3D.ZERO; private static var n3Dj:Number3D = Number3D.ZERO; private static var n3Dk:Number3D = Number3D.ZERO; private static var toDEGREES:Number = 57.2957795130823; private static var toRADIANS:Number = 0.0174532925199433; public function Matrix3D(_arg1:Array=null){ reset(_arg1); } public function calculateMultiply3x3(_arg1:Matrix3D, _arg2:Matrix3D):void{ var _local3:Number = _arg1.n11; var _local4:Number = _arg2.n11; var _local5:Number = _arg1.n21; var _local6:Number = _arg2.n21; var _local7:Number = _arg1.n31; var _local8:Number = _arg2.n31; var _local9:Number = _arg1.n12; var _local10:Number = _arg2.n12; var _local11:Number = _arg1.n22; var _local12:Number = _arg2.n22; var _local13:Number = _arg1.n32; var _local14:Number = _arg2.n32; var _local15:Number = _arg1.n13; var _local16:Number = _arg2.n13; var _local17:Number = _arg1.n23; var _local18:Number = _arg2.n23; var _local19:Number = _arg1.n33; var _local20:Number = _arg2.n33; this.n11 = (((_local3 * _local4) + (_local9 * _local6)) + (_local15 * _local8)); this.n12 = (((_local3 * _local10) + (_local9 * _local12)) + (_local15 * _local14)); this.n13 = (((_local3 * _local16) + (_local9 * _local18)) + (_local15 * _local20)); this.n21 = (((_local5 * _local4) + (_local11 * _local6)) + (_local17 * _local8)); this.n22 = (((_local5 * _local10) + (_local11 * _local12)) + (_local17 * _local14)); this.n23 = (((_local5 * _local16) + (_local11 * _local18)) + (_local17 * _local20)); this.n31 = (((_local7 * _local4) + (_local13 * _local6)) + (_local19 * _local8)); this.n32 = (((_local7 * _local10) + (_local13 * _local12)) + (_local19 * _local14)); this.n33 = (((_local7 * _local16) + (_local13 * _local18)) + (_local19 * _local20)); } public function calculateMultiply4x4(_arg1:Matrix3D, _arg2:Matrix3D):void{ var _local3:Number = _arg1.n11; var _local4:Number = _arg2.n11; var _local5:Number = _arg1.n21; var _local6:Number = _arg2.n21; var _local7:Number = _arg1.n31; var _local8:Number = _arg2.n31; var _local9:Number = _arg1.n41; var _local10:Number = _arg2.n41; var _local11:Number = _arg1.n12; var _local12:Number = _arg2.n12; var _local13:Number = _arg1.n22; var _local14:Number = _arg2.n22; var _local15:Number = _arg1.n32; var _local16:Number = _arg2.n32; var _local17:Number = _arg1.n42; var _local18:Number = _arg2.n42; var _local19:Number = _arg1.n13; var _local20:Number = _arg2.n13; var _local21:Number = _arg1.n23; var _local22:Number = _arg2.n23; var _local23:Number = _arg1.n33; var _local24:Number = _arg2.n33; var _local25:Number = _arg1.n43; var _local26:Number = _arg2.n43; var _local27:Number = _arg1.n14; var _local28:Number = _arg2.n14; var _local29:Number = _arg1.n24; var _local30:Number = _arg2.n24; var _local31:Number = _arg1.n34; var _local32:Number = _arg2.n34; var _local33:Number = _arg1.n44; var _local34:Number = _arg2.n44; this.n11 = (((_local3 * _local4) + (_local11 * _local6)) + (_local19 * _local8)); this.n12 = (((_local3 * _local12) + (_local11 * _local14)) + (_local19 * _local16)); this.n13 = (((_local3 * _local20) + (_local11 * _local22)) + (_local19 * _local24)); this.n14 = ((((_local3 * _local28) + (_local11 * _local30)) + (_local19 * _local32)) + _local27); this.n21 = (((_local5 * _local4) + (_local13 * _local6)) + (_local21 * _local8)); this.n22 = (((_local5 * _local12) + (_local13 * _local14)) + (_local21 * _local16)); this.n23 = (((_local5 * _local20) + (_local13 * _local22)) + (_local21 * _local24)); this.n24 = ((((_local5 * _local28) + (_local13 * _local30)) + (_local21 * _local32)) + _local29); this.n31 = (((_local7 * _local4) + (_local15 * _local6)) + (_local23 * _local8)); this.n32 = (((_local7 * _local12) + (_local15 * _local14)) + (_local23 * _local16)); this.n33 = (((_local7 * _local20) + (_local15 * _local22)) + (_local23 * _local24)); this.n34 = ((((_local7 * _local28) + (_local15 * _local30)) + (_local23 * _local32)) + _local31); this.n41 = (((_local9 * _local4) + (_local17 * _local6)) + (_local25 * _local8)); this.n42 = (((_local9 * _local12) + (_local17 * _local14)) + (_local25 * _local16)); this.n43 = (((_local9 * _local20) + (_local17 * _local22)) + (_local25 * _local24)); this.n44 = ((((_local9 * _local28) + (_local17 * _local30)) + (_local25 * _local32)) + _local33); } public function get det():Number{ return ((((((this.n11 * this.n22) - (this.n21 * this.n12)) * this.n33) - (((this.n11 * this.n32) - (this.n31 * this.n12)) * this.n23)) + (((this.n21 * this.n32) - (this.n31 * this.n22)) * this.n13))); } public function copy(_arg1:Matrix3D):Matrix3D{ this.n11 = _arg1.n11; this.n12 = _arg1.n12; this.n13 = _arg1.n13; this.n14 = _arg1.n14; this.n21 = _arg1.n21; this.n22 = _arg1.n22; this.n23 = _arg1.n23; this.n24 = _arg1.n24; this.n31 = _arg1.n31; this.n32 = _arg1.n32; this.n33 = _arg1.n33; this.n34 = _arg1.n34; return (this); } public function copy3x3(_arg1:Matrix3D):Matrix3D{ this.n11 = _arg1.n11; this.n12 = _arg1.n12; this.n13 = _arg1.n13; this.n21 = _arg1.n21; this.n22 = _arg1.n22; this.n23 = _arg1.n23; this.n31 = _arg1.n31; this.n32 = _arg1.n32; this.n33 = _arg1.n33; return (this); } public function calculateAdd(_arg1:Matrix3D, _arg2:Matrix3D):void{ this.n11 = (_arg1.n11 + _arg2.n11); this.n12 = (_arg1.n12 + _arg2.n12); this.n13 = (_arg1.n13 + _arg2.n13); this.n14 = (_arg1.n14 + _arg2.n14); this.n21 = (_arg1.n21 + _arg2.n21); this.n22 = (_arg1.n22 + _arg2.n22); this.n23 = (_arg1.n23 + _arg2.n23); this.n24 = (_arg1.n24 + _arg2.n24); this.n31 = (_arg1.n31 + _arg2.n31); this.n32 = (_arg1.n32 + _arg2.n32); this.n33 = (_arg1.n33 + _arg2.n33); this.n34 = (_arg1.n34 + _arg2.n34); } public function calculateMultiply(_arg1:Matrix3D, _arg2:Matrix3D):void{ var _local3:Number = _arg1.n11; var _local4:Number = _arg2.n11; var _local5:Number = _arg1.n21; var _local6:Number = _arg2.n21; var _local7:Number = _arg1.n31; var _local8:Number = _arg2.n31; var _local9:Number = _arg1.n12; var _local10:Number = _arg2.n12; var _local11:Number = _arg1.n22; var _local12:Number = _arg2.n22; var _local13:Number = _arg1.n32; var _local14:Number = _arg2.n32; var _local15:Number = _arg1.n13; var _local16:Number = _arg2.n13; var _local17:Number = _arg1.n23; var _local18:Number = _arg2.n23; var _local19:Number = _arg1.n33; var _local20:Number = _arg2.n33; var _local21:Number = _arg1.n14; var _local22:Number = _arg2.n14; var _local23:Number = _arg1.n24; var _local24:Number = _arg2.n24; var _local25:Number = _arg1.n34; var _local26:Number = _arg2.n34; this.n11 = (((_local3 * _local4) + (_local9 * _local6)) + (_local15 * _local8)); this.n12 = (((_local3 * _local10) + (_local9 * _local12)) + (_local15 * _local14)); this.n13 = (((_local3 * _local16) + (_local9 * _local18)) + (_local15 * _local20)); this.n14 = ((((_local3 * _local22) + (_local9 * _local24)) + (_local15 * _local26)) + _local21); this.n21 = (((_local5 * _local4) + (_local11 * _local6)) + (_local17 * _local8)); this.n22 = (((_local5 * _local10) + (_local11 * _local12)) + (_local17 * _local14)); this.n23 = (((_local5 * _local16) + (_local11 * _local18)) + (_local17 * _local20)); this.n24 = ((((_local5 * _local22) + (_local11 * _local24)) + (_local17 * _local26)) + _local23); this.n31 = (((_local7 * _local4) + (_local13 * _local6)) + (_local19 * _local8)); this.n32 = (((_local7 * _local10) + (_local13 * _local12)) + (_local19 * _local14)); this.n33 = (((_local7 * _local16) + (_local13 * _local18)) + (_local19 * _local20)); this.n34 = ((((_local7 * _local22) + (_local13 * _local24)) + (_local19 * _local26)) + _local25); } public function reset(_arg1:Array=null):void{ if (((!(_arg1)) || ((_arg1.length < 12)))){ n11 = (n22 = (n33 = (n44 = 1))); n12 = (n13 = (n14 = (n21 = (n23 = (n24 = (n31 = (n32 = (n34 = (n41 = (n42 = (n43 = 0))))))))))); } else { n11 = _arg1[0]; n12 = _arg1[1]; n13 = _arg1[2]; n14 = _arg1[3]; n21 = _arg1[4]; n22 = _arg1[5]; n23 = _arg1[6]; n24 = _arg1[7]; n31 = _arg1[8]; n32 = _arg1[9]; n33 = _arg1[10]; n34 = _arg1[11]; if (_arg1.length == 16){ n41 = _arg1[12]; n42 = _arg1[13]; n43 = _arg1[14]; n44 = _arg1[15]; } else { n41 = (n42 = (n43 = 0)); n44 = 1; }; }; } public function invert():void{ temp.copy(this); calculateInverse(temp); } public function calculateInverse(_arg1:Matrix3D):void{ var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local2:Number = _arg1.det; if (Math.abs(_local2) > 0.001){ _local2 = (1 / _local2); _local3 = _arg1.n11; _local4 = _arg1.n21; _local5 = _arg1.n31; _local6 = _arg1.n12; _local7 = _arg1.n22; _local8 = _arg1.n32; _local9 = _arg1.n13; _local10 = _arg1.n23; _local11 = _arg1.n33; _local12 = _arg1.n14; _local13 = _arg1.n24; _local14 = _arg1.n34; this.n11 = (_local2 * ((_local7 * _local11) - (_local8 * _local10))); this.n12 = (-(_local2) * ((_local6 * _local11) - (_local8 * _local9))); this.n13 = (_local2 * ((_local6 * _local10) - (_local7 * _local9))); this.n14 = (-(_local2) * (((_local6 * ((_local10 * _local14) - (_local11 * _local13))) - (_local7 * ((_local9 * _local14) - (_local11 * _local12)))) + (_local8 * ((_local9 * _local13) - (_local10 * _local12))))); this.n21 = (-(_local2) * ((_local4 * _local11) - (_local5 * _local10))); this.n22 = (_local2 * ((_local3 * _local11) - (_local5 * _local9))); this.n23 = (-(_local2) * ((_local3 * _local10) - (_local4 * _local9))); this.n24 = (_local2 * (((_local3 * ((_local10 * _local14) - (_local11 * _local13))) - (_local4 * ((_local9 * _local14) - (_local11 * _local12)))) + (_local5 * ((_local9 * _local13) - (_local10 * _local12))))); this.n31 = (_local2 * ((_local4 * _local8) - (_local5 * _local7))); this.n32 = (-(_local2) * ((_local3 * _local8) - (_local5 * _local6))); this.n33 = (_local2 * ((_local3 * _local7) - (_local4 * _local6))); this.n34 = (-(_local2) * (((_local3 * ((_local7 * _local14) - (_local8 * _local13))) - (_local4 * ((_local6 * _local14) - (_local8 * _local12)))) + (_local5 * ((_local6 * _local13) - (_local7 * _local12))))); }; } public function toString():String{ var _local1 = ""; _local1 = (_local1 + ((((((((int((n11 * 1000)) / 1000) + "\t\t") + (int((n12 * 1000)) / 1000)) + "\t\t") + (int((n13 * 1000)) / 1000)) + "\t\t") + (int((n14 * 1000)) / 1000)) + "\n")); _local1 = (_local1 + ((((((((int((n21 * 1000)) / 1000) + "\t\t") + (int((n22 * 1000)) / 1000)) + "\t\t") + (int((n23 * 1000)) / 1000)) + "\t\t") + (int((n24 * 1000)) / 1000)) + "\n")); _local1 = (_local1 + ((((((((int((n31 * 1000)) / 1000) + "\t\t") + (int((n32 * 1000)) / 1000)) + "\t\t") + (int((n33 * 1000)) / 1000)) + "\t\t") + (int((n34 * 1000)) / 1000)) + "\n")); _local1 = (_local1 + ((((((((int((n41 * 1000)) / 1000) + "\t\t") + (int((n42 * 1000)) / 1000)) + "\t\t") + (int((n43 * 1000)) / 1000)) + "\t\t") + (int((n44 * 1000)) / 1000)) + "\n")); return (_local1); } public static function rotationMatrixWithReference(_arg1:Number3D, _arg2:Number, _arg3:Number3D):Matrix3D{ var _local4:Matrix3D = Matrix3D.translationMatrix(_arg3.x, -(_arg3.y), _arg3.z); Matrix3D.translationMatrix(_arg3.x, -(_arg3.y), _arg3.z).calculateMultiply(_local4, Matrix3D.rotationMatrix(_arg1.x, _arg1.y, _arg1.z, _arg2)); _local4.calculateMultiply(_local4, Matrix3D.translationMatrix(-(_arg3.x), _arg3.y, -(_arg3.z))); return (_local4); } public static function multiplyVector(_arg1:Matrix3D, _arg2:Number3D):void{ var _local4:Number; var _local5:Number; var _local3:Number = _arg2.x; _local4 = _arg2.y; _local5 = _arg2.z; _arg2.x = ((((_local3 * _arg1.n11) + (_local4 * _arg1.n12)) + (_local5 * _arg1.n13)) + _arg1.n14); _arg2.y = ((((_local3 * _arg1.n21) + (_local4 * _arg1.n22)) + (_local5 * _arg1.n23)) + _arg1.n24); _arg2.z = ((((_local3 * _arg1.n31) + (_local4 * _arg1.n32)) + (_local5 * _arg1.n33)) + _arg1.n34); } public static function multiplyVector4x4(_arg1:Matrix3D, _arg2:Number3D):void{ var _local3:Number; var _local5:Number; var _local6:Number; _local3 = _arg2.x; var _local4:Number = _arg2.y; _local5 = _arg2.z; _local6 = (1 / ((((_local3 * _arg1.n41) + (_local4 * _arg1.n42)) + (_local5 * _arg1.n43)) + _arg1.n44)); _arg2.x = ((((_local3 * _arg1.n11) + (_local4 * _arg1.n12)) + (_local5 * _arg1.n13)) + _arg1.n14); _arg2.y = ((((_local3 * _arg1.n21) + (_local4 * _arg1.n22)) + (_local5 * _arg1.n23)) + _arg1.n24); _arg2.z = ((((_local3 * _arg1.n31) + (_local4 * _arg1.n32)) + (_local5 * _arg1.n33)) + _arg1.n34); _arg2.x = (_arg2.x * _local6); _arg2.y = (_arg2.y * _local6); _arg2.z = (_arg2.z * _local6); } public static function multiply3x3(_arg1:Matrix3D, _arg2:Matrix3D):Matrix3D{ var _local3:Matrix3D = new (Matrix3D); _local3.calculateMultiply3x3(_arg1, _arg2); return (_local3); } public static function normalizeQuaternion(_arg1:Object):Object{ var _local2:Number = magnitudeQuaternion(_arg1); _arg1.x = (_arg1.x / _local2); _arg1.y = (_arg1.y / _local2); _arg1.z = (_arg1.z / _local2); _arg1.w = (_arg1.w / _local2); return (_arg1); } public static function multiplyVector3x3(_arg1:Matrix3D, _arg2:Number3D):void{ var _local5:Number; var _local3:Number = _arg2.x; var _local4:Number = _arg2.y; _local5 = _arg2.z; _arg2.x = (((_local3 * _arg1.n11) + (_local4 * _arg1.n12)) + (_local5 * _arg1.n13)); _arg2.y = (((_local3 * _arg1.n21) + (_local4 * _arg1.n22)) + (_local5 * _arg1.n23)); _arg2.z = (((_local3 * _arg1.n31) + (_local4 * _arg1.n32)) + (_local5 * _arg1.n33)); } public static function axis2quaternion(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Object{ var _local5:Number = Math.sin((_arg4 / 2)); var _local6:Number = Math.cos((_arg4 / 2)); var _local7:Object = new Object(); _local7.x = (_arg1 * _local5); _local7.y = (_arg2 * _local5); _local7.z = (_arg3 * _local5); _local7.w = _local6; return (normalizeQuaternion(_local7)); } public static function translationMatrix(_arg1:Number, _arg2:Number, _arg3:Number):Matrix3D{ var _local4:Matrix3D = IDENTITY; _local4.n14 = _arg1; _local4.n24 = _arg2; _local4.n34 = _arg3; return (_local4); } public static function magnitudeQuaternion(_arg1:Object):Number{ return (Math.sqrt(((((_arg1.w * _arg1.w) + (_arg1.x * _arg1.x)) + (_arg1.y * _arg1.y)) + (_arg1.z * _arg1.z)))); } public static function rotationX(_arg1:Number):Matrix3D{ var _local2:Matrix3D = IDENTITY; var _local3:Number = Math.cos(_arg1); var _local4:Number = Math.sin(_arg1); _local2.n22 = _local3; _local2.n23 = -(_local4); _local2.n32 = _local4; _local2.n33 = _local3; return (_local2); } public static function rotationY(_arg1:Number):Matrix3D{ var _local2:Matrix3D = IDENTITY; var _local3:Number = Math.cos(_arg1); var _local4:Number = Math.sin(_arg1); _local2.n11 = _local3; _local2.n13 = -(_local4); _local2.n31 = _local4; _local2.n33 = _local3; return (_local2); } public static function rotationZ(_arg1:Number):Matrix3D{ var _local2:Matrix3D = IDENTITY; var _local3:Number = Math.cos(_arg1); var _local4:Number = Math.sin(_arg1); _local2.n11 = _local3; _local2.n12 = -(_local4); _local2.n21 = _local4; _local2.n22 = _local3; return (_local2); } public static function clone(_arg1:Matrix3D):Matrix3D{ return (new Matrix3D([_arg1.n11, _arg1.n12, _arg1.n13, _arg1.n14, _arg1.n21, _arg1.n22, _arg1.n23, _arg1.n24, _arg1.n31, _arg1.n32, _arg1.n33, _arg1.n34])); } public static function rotationMatrix(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Matrix3D=null):Matrix3D{ var _local6:Matrix3D; if (!_arg5){ _local6 = IDENTITY; } else { _local6 = _arg5; }; var _local7:Number = Math.cos(_arg4); var _local8:Number = Math.sin(_arg4); var _local9:Number = (1 - _local7); var _local10:Number = ((_arg1 * _arg2) * _local9); var _local11:Number = ((_arg2 * _arg3) * _local9); var _local12:Number = ((_arg1 * _arg3) * _local9); var _local13:Number = (_local8 * _arg3); var _local14:Number = (_local8 * _arg2); var _local15:Number = (_local8 * _arg1); _local6.n11 = (_local7 + ((_arg1 * _arg1) * _local9)); _local6.n12 = (-(_local13) + _local10); _local6.n13 = (_local14 + _local12); _local6.n21 = (_local13 + _local10); _local6.n22 = (_local7 + ((_arg2 * _arg2) * _local9)); _local6.n23 = (-(_local15) + _local11); _local6.n31 = (-(_local14) + _local12); _local6.n32 = (_local15 + _local11); _local6.n33 = (_local7 + ((_arg3 * _arg3) * _local9)); return (_local6); } public static function add(_arg1:Matrix3D, _arg2:Matrix3D):Matrix3D{ var _local3:Matrix3D = new (Matrix3D); _local3.calculateAdd(_arg1, _arg2); return (_local3); } public static function multiply(_arg1:Matrix3D, _arg2:Matrix3D):Matrix3D{ var _local3:Matrix3D = new (Matrix3D); _local3.calculateMultiply(_arg1, _arg2); return (_local3); } public static function euler2quaternion(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Quaternion=null):Quaternion{ var _local13:Quaternion; var _local5:Number = Math.sin((_arg1 * 0.5)); var _local6:Number = Math.cos((_arg1 * 0.5)); var _local7:Number = Math.sin((_arg2 * 0.5)); var _local8:Number = Math.cos((_arg2 * 0.5)); var _local9:Number = Math.sin((_arg3 * 0.5)); var _local10:Number = Math.cos((_arg3 * 0.5)); var _local11:Number = (_local6 * _local8); var _local12:Number = (_local5 * _local7); if (!_arg4){ _local13 = new Quaternion(); } else { _local13 = _arg4; }; _local13.x = ((_local9 * _local11) - (_local10 * _local12)); _local13.y = (((_local10 * _local5) * _local8) + ((_local9 * _local6) * _local7)); _local13.z = (((_local10 * _local6) * _local7) - ((_local9 * _local5) * _local8)); _local13.w = ((_local10 * _local11) + (_local9 * _local12)); return (_local13); } public static function quaternion2matrix(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Matrix3D=null):Matrix3D{ var _local15:Matrix3D; var _local6:Number = (_arg1 * _arg1); var _local7:Number = (_arg1 * _arg2); var _local8:Number = (_arg1 * _arg3); var _local9:Number = (_arg1 * _arg4); var _local10:Number = (_arg2 * _arg2); var _local11:Number = (_arg2 * _arg3); var _local12:Number = (_arg2 * _arg4); var _local13:Number = (_arg3 * _arg3); var _local14:Number = (_arg3 * _arg4); if (!_arg5){ _local15 = IDENTITY; } else { _local15 = _arg5; }; _local15.n11 = (1 - (2 * (_local10 + _local13))); _local15.n12 = (2 * (_local7 - _local14)); _local15.n13 = (2 * (_local8 + _local12)); _local15.n21 = (2 * (_local7 + _local14)); _local15.n22 = (1 - (2 * (_local6 + _local13))); _local15.n23 = (2 * (_local11 - _local9)); _local15.n31 = (2 * (_local8 - _local12)); _local15.n32 = (2 * (_local11 + _local9)); _local15.n33 = (1 - (2 * (_local6 + _local10))); return (_local15); } public static function inverse(_arg1:Matrix3D):Matrix3D{ var _local2:Matrix3D = new (Matrix3D); _local2.calculateInverse(_arg1); return (_local2); } public static function euler2matrix(_arg1:Number3D):Matrix3D{ temp.reset(); var _local2:Matrix3D = temp; _local2 = temp; var _local3:Number = (_arg1.x * toRADIANS); var _local4:Number = (_arg1.y * toRADIANS); var _local5:Number = (_arg1.z * toRADIANS); var _local6:Number = Math.cos(_local3); var _local7:Number = Math.sin(_local3); var _local8:Number = Math.cos(_local4); var _local9:Number = Math.sin(_local4); var _local10:Number = Math.cos(_local5); var _local11:Number = Math.sin(_local5); var _local12:Number = (_local6 * _local9); var _local13:Number = (_local7 * _local9); _local2.n11 = (_local8 * _local10); _local2.n12 = (-(_local8) * _local11); _local2.n13 = _local9; _local2.n21 = ((_local13 * _local10) + (_local6 * _local11)); _local2.n22 = ((-(_local13) * _local11) + (_local6 * _local10)); _local2.n23 = (-(_local7) * _local8); _local2.n31 = ((-(_local12) * _local10) + (_local7 * _local11)); _local2.n32 = ((_local12 * _local11) + (_local7 * _local10)); _local2.n33 = (_local6 * _local8); return (_local2); } public static function scaleMatrix(_arg1:Number, _arg2:Number, _arg3:Number):Matrix3D{ var _local4:Matrix3D = IDENTITY; _local4.n11 = _arg1; _local4.n22 = _arg2; _local4.n33 = _arg3; return (_local4); } public static function rotateAxis(_arg1:Matrix3D, _arg2:Number3D):void{ var _local3:Number = _arg2.x; var _local4:Number = _arg2.y; var _local5:Number = _arg2.z; _arg2.x = (((_local3 * _arg1.n11) + (_local4 * _arg1.n12)) + (_local5 * _arg1.n13)); _arg2.y = (((_local3 * _arg1.n21) + (_local4 * _arg1.n22)) + (_local5 * _arg1.n23)); _arg2.z = (((_local3 * _arg1.n31) + (_local4 * _arg1.n32)) + (_local5 * _arg1.n33)); _arg2.normalize(); } public static function matrix2euler(_arg1:Matrix3D, _arg2:Number3D=null):Number3D{ if (!_arg2){ _arg2 = Number3D.ZERO; }; n3Di.reset(_arg1.n11, _arg1.n21, _arg1.n31); n3Dj.reset(_arg1.n12, _arg1.n22, _arg1.n32); n3Dk.reset(_arg1.n13, _arg1.n23, _arg1.n33); n3Di.normalize(); n3Dj.normalize(); n3Dk.normalize(); temp.reset([n3Di.x, n3Dj.x, n3Dk.x, 0, n3Di.y, n3Dj.y, n3Dk.y, 0, n3Di.z, n3Dj.z, n3Dk.z, 0]); var _local3:Matrix3D = temp; _arg2.x = Math.atan2(_local3.n23, _local3.n33); var _local4:Matrix3D = Matrix3D.rotationX(-(_arg2.x)); var _local5:Matrix3D = Matrix3D.multiply(_local4, _local3); var _local6:Number = Math.sqrt(((_local5.n11 * _local5.n11) + (_local5.n21 * _local5.n21))); _arg2.y = Math.atan2(-(_local5.n31), _local6); _arg2.z = Math.atan2(-(_local5.n12), _local5.n11); if (_arg2.x == Math.PI){ if (_arg2.y > 0){ _arg2.y = (_arg2.y - Math.PI); } else { _arg2.y = (_arg2.y + Math.PI); }; _arg2.x = 0; _arg2.z = (_arg2.z + Math.PI); }; _arg2.x = (_arg2.x * toDEGREES); _arg2.y = (_arg2.y * toDEGREES); _arg2.z = (_arg2.z * toDEGREES); return (_arg2); } public static function multiplyQuaternion(_arg1:Object, _arg2:Object):Object{ var _local3:Number = _arg1.x; var _local4:Number = _arg1.y; var _local5:Number = _arg1.z; var _local6:Number = _arg1.w; var _local7:Number = _arg2.x; var _local8:Number = _arg2.y; var _local9:Number = _arg2.z; var _local10:Number = _arg2.w; var _local11:Object = new Object(); _local11.x = ((((_local6 * _local7) + (_local3 * _local10)) + (_local4 * _local9)) - (_local5 * _local8)); _local11.y = ((((_local6 * _local8) + (_local4 * _local10)) + (_local5 * _local7)) - (_local3 * _local9)); _local11.z = ((((_local6 * _local9) + (_local5 * _local10)) + (_local3 * _local8)) - (_local4 * _local7)); _local11.w = ((((_local6 * _local10) - (_local3 * _local7)) - (_local4 * _local8)) - (_local5 * _local9)); return (_local11); } public static function get IDENTITY():Matrix3D{ return (new Matrix3D([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1])); } } }//package org.papervision3d.core.math
Section 56
//Number2D (org.papervision3d.core.math.Number2D) package org.papervision3d.core.math { import org.papervision3d.*; public class Number2D { public var x:Number; public var y:Number; public static const DEGTORAD:Number = 0.0174532925199433; public static const RADTODEG:Number = 57.2957795130823; public function Number2D(_arg1:Number=0, _arg2:Number=0){ this.x = _arg1; this.y = _arg2; } public function isModuloLessThan(_arg1:Number):Boolean{ return ((moduloSquared < (_arg1 * _arg1))); } public function reverse():void{ this.x = -(this.x); this.y = -(this.y); } public function divideEq(_arg1:Number):void{ x = (x / _arg1); y = (y / _arg1); } public function plusEq(_arg1:Number2D):void{ x = (x + _arg1.x); y = (y + _arg1.y); } public function multiplyEq(_arg1:Number):void{ x = (x * _arg1); y = (y * _arg1); } public function isModuloGreaterThan(_arg1:Number):Boolean{ return ((moduloSquared > (_arg1 * _arg1))); } public function toString():String{ var _local1:Number = (Math.round((this.x * 1000)) / 1000); var _local2:Number = (Math.round((this.y * 1000)) / 1000); return ((((("[" + _local1) + ", ") + _local2) + "]")); } public function reset(_arg1:Number=0, _arg2:Number=0):void{ this.x = _arg1; this.y = _arg2; } public function get moduloSquared():Number{ return (((this.x * this.x) + (this.y * this.y))); } public function normalise():void{ var _local1:Number = this.modulo; this.x = (this.x / _local1); this.y = (this.y / _local1); } public function get modulo():Number{ return (Math.sqrt(((x * x) + (y * y)))); } public function copyTo(_arg1:Number2D):void{ _arg1.x = this.x; _arg1.y = this.y; } public function angle():Number{ if (Papervision3D.useDEGREES){ return ((RADTODEG * Math.atan2(y, x))); }; return (Math.atan2(y, x)); } public function rotate(_arg1:Number):void{ var _local4:Number2D; if (Papervision3D.useDEGREES){ _arg1 = (_arg1 * DEGTORAD); }; var _local2:Number = Math.cos(_arg1); var _local3:Number = Math.sin(_arg1); _local4 = clone(); this.x = ((_local4.x * _local2) - (_local4.y * _local3)); this.y = ((_local4.x * _local3) + (_local4.y * _local2)); } public function minusEq(_arg1:Number2D):void{ x = (x - _arg1.x); y = (y - _arg1.y); } public function clone():Number2D{ return (new Number2D(this.x, this.y)); } public function isModuloEqualTo(_arg1:Number):Boolean{ return ((moduloSquared == (_arg1 * _arg1))); } public function copyFrom(_arg1:Number2D):void{ this.x = _arg1.x; this.y = _arg1.y; } public static function multiplyScalar(_arg1:Number2D, _arg2:Number):Number2D{ return (new Number2D((_arg1.x * _arg2), (_arg1.y * _arg2))); } public static function add(_arg1:Number2D, _arg2:Number2D):Number2D{ return (new Number2D((_arg1.x = (_arg1.x + _arg2.x)), (_arg1.y + _arg2.y))); } public static function dot(_arg1:Number2D, _arg2:Number2D):Number{ return (((_arg1.x * _arg2.x) + (_arg1.y * _arg2.y))); } public static function subtract(_arg1:Number2D, _arg2:Number2D):Number2D{ return (new Number2D((_arg1.x - _arg2.x), (_arg1.y - _arg2.y))); } } }//package org.papervision3d.core.math
Section 57
//Number3D (org.papervision3d.core.math.Number3D) package org.papervision3d.core.math { import org.papervision3d.*; public class Number3D { public var x:Number; public var y:Number; public var z:Number; public static var toDEGREES:Number = 57.2957795130823; private static var temp:Number3D = Number3D.ZERO; public static var toRADIANS:Number = 0.0174532925199433; public function Number3D(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0){ this.x = _arg1; this.y = _arg2; this.z = _arg3; } public function isModuloLessThan(_arg1:Number):Boolean{ return ((moduloSquared < (_arg1 * _arg1))); } public function rotateX(_arg1:Number):void{ if (Papervision3D.useDEGREES){ _arg1 = (_arg1 * toRADIANS); }; var _local2:Number = Math.cos(_arg1); var _local3:Number = Math.sin(_arg1); temp.copyFrom(this); this.y = ((temp.y * _local2) - (temp.z * _local3)); this.z = ((temp.y * _local3) + (temp.z * _local2)); } public function rotateY(_arg1:Number):void{ if (Papervision3D.useDEGREES){ _arg1 = (_arg1 * toRADIANS); }; var _local2:Number = Math.cos(_arg1); var _local3:Number = Math.sin(_arg1); temp.copyFrom(this); this.x = ((temp.x * _local2) + (temp.z * _local3)); this.z = ((temp.x * -(_local3)) + (temp.z * _local2)); } public function plusEq(_arg1:Number3D):void{ x = (x + _arg1.x); y = (y + _arg1.y); z = (z + _arg1.z); } public function multiplyEq(_arg1:Number):void{ x = (x * _arg1); y = (y * _arg1); z = (z * _arg1); } public function toString():String{ return (((((("x:" + (Math.round((x * 100)) / 100)) + " y:") + (Math.round((y * 100)) / 100)) + " z:") + (Math.round((z * 100)) / 100))); } public function normalize():void{ var _local1:Number = this.modulo; if (((!((_local1 == 0))) && (!((_local1 == 1))))){ this.x = (this.x / _local1); this.y = (this.y / _local1); this.z = (this.z / _local1); }; } public function rotateZ(_arg1:Number):void{ if (Papervision3D.useDEGREES){ _arg1 = (_arg1 * toRADIANS); }; var _local2:Number = Math.cos(_arg1); var _local3:Number = Math.sin(_arg1); temp.copyFrom(this); this.x = ((temp.x * _local2) - (temp.y * _local3)); this.y = ((temp.x * _local3) + (temp.y * _local2)); } public function reset(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0):void{ x = _arg1; y = _arg2; z = _arg3; } public function get moduloSquared():Number{ return ((((this.x * this.x) + (this.y * this.y)) + (this.z * this.z))); } public function get modulo():Number{ return (Math.sqrt((((this.x * this.x) + (this.y * this.y)) + (this.z * this.z)))); } public function copyTo(_arg1:Number3D):void{ _arg1.x = x; _arg1.y = y; _arg1.z = z; } public function isModuloGreaterThan(_arg1:Number):Boolean{ return ((moduloSquared > (_arg1 * _arg1))); } public function minusEq(_arg1:Number3D):void{ x = (x - _arg1.x); y = (y - _arg1.y); z = (z - _arg1.z); } public function clone():Number3D{ return (new Number3D(this.x, this.y, this.z)); } public function isModuloEqualTo(_arg1:Number):Boolean{ return ((moduloSquared == (_arg1 * _arg1))); } public function copyFrom(_arg1:Number3D):void{ x = _arg1.x; y = _arg1.y; z = _arg1.z; } public static function sub(_arg1:Number3D, _arg2:Number3D):Number3D{ return (new Number3D((_arg1.x - _arg2.x), (_arg1.y - _arg2.y), (_arg1.z - _arg2.z))); } public static function add(_arg1:Number3D, _arg2:Number3D):Number3D{ return (new Number3D((_arg1.x + _arg2.x), (_arg1.y + _arg2.y), (_arg1.z + _arg2.z))); } public static function cross(_arg1:Number3D, _arg2:Number3D, _arg3:Number3D=null):Number3D{ if (!_arg3){ _arg3 = ZERO; }; _arg3.reset(((_arg2.y * _arg1.z) - (_arg2.z * _arg1.y)), ((_arg2.z * _arg1.x) - (_arg2.x * _arg1.z)), ((_arg2.x * _arg1.y) - (_arg2.y * _arg1.x))); return (_arg3); } public static function dot(_arg1:Number3D, _arg2:Number3D):Number{ return ((((_arg1.x * _arg2.x) + (_arg1.y * _arg2.y)) + (_arg2.z * _arg1.z))); } public static function get ZERO():Number3D{ return (new Number3D(0, 0, 0)); } } }//package org.papervision3d.core.math
Section 58
//NumberUV (org.papervision3d.core.math.NumberUV) package org.papervision3d.core.math { public class NumberUV { public var u:Number; public var v:Number; public function NumberUV(_arg1:Number=0, _arg2:Number=0){ this.u = _arg1; this.v = _arg2; } public function toString():String{ return (((("u:" + u) + " v:") + v)); } public function clone():NumberUV{ return (new NumberUV(this.u, this.v)); } public static function get ZERO():NumberUV{ return (new NumberUV(0, 0)); } } }//package org.papervision3d.core.math
Section 59
//Quaternion (org.papervision3d.core.math.Quaternion) package org.papervision3d.core.math { public class Quaternion { private var _matrix:Matrix3D; public var w:Number; public var x:Number; public var y:Number; public var z:Number; public static const EPSILON:Number = 1E-6; public static const DEGTORAD:Number = 0.0174532925199433; public static const RADTODEG:Number = 57.2957795130823; public function Quaternion(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=1):void{ this.x = _arg1; this.y = _arg2; this.z = _arg3; this.w = _arg4; _matrix = Matrix3D.IDENTITY; } public function toString():String{ return (((((((("Quaternion: x:" + this.x) + " y:") + this.y) + " z:") + this.z) + " w:") + this.w)); } public function normalize():void{ var _local2:Number; var _local1:Number = this.modulo; if (Math.abs(_local1) < EPSILON){ x = (y = (z = 0)); w = 1; } else { _local2 = (1 / _local1); x = (x * _local2); y = (y * _local2); z = (z * _local2); w = (w * _local2); }; } public function get modulo():Number{ return (Math.sqrt(((((x * x) + (y * y)) + (z * z)) + (w * w)))); } public function toMatrix():Matrix3D{ var _local1:Number = (x * x); var _local2:Number = (x * y); var _local3:Number = (x * z); var _local4:Number = (x * w); var _local5:Number = (y * y); var _local6:Number = (y * z); var _local7:Number = (y * w); var _local8:Number = (z * z); var _local9:Number = (z * w); _matrix.n11 = (1 - (2 * (_local5 + _local8))); _matrix.n12 = (2 * (_local2 - _local9)); _matrix.n13 = (2 * (_local3 + _local7)); _matrix.n21 = (2 * (_local2 + _local9)); _matrix.n22 = (1 - (2 * (_local1 + _local8))); _matrix.n23 = (2 * (_local6 - _local4)); _matrix.n31 = (2 * (_local3 - _local7)); _matrix.n32 = (2 * (_local6 + _local4)); _matrix.n33 = (1 - (2 * (_local1 + _local5))); return (_matrix); } public function mult(_arg1:Quaternion):void{ var _local2:Number = this.w; var _local3:Number = this.x; var _local4:Number = this.y; var _local5:Number = this.z; x = ((((_local2 * _arg1.x) + (_local3 * _arg1.w)) + (_local4 * _arg1.z)) - (_local5 * _arg1.y)); y = ((((_local2 * _arg1.y) - (_local3 * _arg1.z)) + (_local4 * _arg1.w)) + (_local5 * _arg1.x)); z = ((((_local2 * _arg1.z) + (_local3 * _arg1.y)) - (_local4 * _arg1.x)) + (_local5 * _arg1.w)); w = ((((_local2 * _arg1.w) - (_local3 * _arg1.x)) - (_local4 * _arg1.y)) - (_local5 * _arg1.z)); } public static function sub(_arg1:Quaternion, _arg2:Quaternion):Quaternion{ return (new Quaternion((_arg1.x - _arg2.x), (_arg1.y - _arg2.y), (_arg1.z - _arg2.z), (_arg1.w - _arg2.w))); } public static function add(_arg1:Quaternion, _arg2:Quaternion):Quaternion{ return (new Quaternion((_arg1.x + _arg2.x), (_arg1.y + _arg2.y), (_arg1.z + _arg2.z), (_arg1.w + _arg2.w))); } public static function createFromEuler(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Boolean=false):Quaternion{ if (_arg4){ _arg1 = (_arg1 * DEGTORAD); _arg2 = (_arg2 * DEGTORAD); _arg3 = (_arg3 * DEGTORAD); }; var _local5:Number = Math.sin((_arg1 * 0.5)); var _local6:Number = Math.cos((_arg1 * 0.5)); var _local7:Number = Math.sin((_arg2 * 0.5)); var _local8:Number = Math.cos((_arg2 * 0.5)); var _local9:Number = Math.sin((_arg3 * 0.5)); var _local10:Number = Math.cos((_arg3 * 0.5)); var _local11:Number = (_local6 * _local8); var _local12:Number = (_local5 * _local7); var _local13:Quaternion = new (Quaternion); _local13.x = ((_local9 * _local11) - (_local10 * _local12)); _local13.y = (((_local10 * _local5) * _local8) + ((_local9 * _local6) * _local7)); _local13.z = (((_local10 * _local6) * _local7) - ((_local9 * _local5) * _local8)); _local13.w = ((_local10 * _local11) + (_local9 * _local12)); return (_local13); } public static function createFromMatrix(_arg1:Matrix3D):Quaternion{ var _local3:Number; var _local5:int; var _local6:int; var _local7:int; var _local9:Array; var _local10:Array; var _local2:Quaternion = new (Quaternion); var _local4:Array = new Array(4); var _local8:Number = ((_arg1.n11 + _arg1.n22) + _arg1.n33); if (_local8 > 0){ _local3 = Math.sqrt((_local8 + 1)); _local2.w = (_local3 / 2); _local3 = (0.5 / _local3); _local2.x = ((_arg1.n32 - _arg1.n23) * _local3); _local2.y = ((_arg1.n13 - _arg1.n31) * _local3); _local2.z = ((_arg1.n21 - _arg1.n12) * _local3); } else { _local9 = [1, 2, 0]; _local10 = [[_arg1.n11, _arg1.n12, _arg1.n13, _arg1.n14], [_arg1.n21, _arg1.n22, _arg1.n23, _arg1.n24], [_arg1.n31, _arg1.n32, _arg1.n33, _arg1.n34]]; _local5 = 0; if (_local10[1][1] > _local10[0][0]){ _local5 = 1; }; if (_local10[2][2] > _local10[_local5][_local5]){ _local5 = 2; }; _local6 = _local9[_local5]; _local7 = _local9[_local6]; _local3 = Math.sqrt(((_local10[_local5][_local5] - (_local10[_local6][_local6] + _local10[_local7][_local7])) + 1)); _local4[_local5] = (_local3 * 0.5); if (_local3 != 0){ _local3 = (0.5 / _local3); }; _local4[3] = ((_local10[_local7][_local6] - _local10[_local6][_local7]) * _local3); _local4[_local6] = ((_local10[_local6][_local5] + _local10[_local5][_local6]) * _local3); _local4[_local7] = ((_local10[_local7][_local5] + _local10[_local5][_local7]) * _local3); _local2.x = _local4[0]; _local2.y = _local4[1]; _local2.z = _local4[2]; _local2.w = _local4[3]; }; return (_local2); } public static function dot(_arg1:Quaternion, _arg2:Quaternion):Number{ return (((((_arg1.x * _arg2.x) + (_arg1.y * _arg2.y)) + (_arg1.z * _arg2.z)) + (_arg1.w * _arg2.w))); } public static function multiply(_arg1:Quaternion, _arg2:Quaternion):Quaternion{ var _local3:Quaternion = new (Quaternion); _local3.x = ((((_arg1.w * _arg2.x) + (_arg1.x * _arg2.w)) + (_arg1.y * _arg2.z)) - (_arg1.z * _arg2.y)); _local3.y = ((((_arg1.w * _arg2.y) - (_arg1.x * _arg2.z)) + (_arg1.y * _arg2.w)) + (_arg1.z * _arg2.x)); _local3.z = ((((_arg1.w * _arg2.z) + (_arg1.x * _arg2.y)) - (_arg1.y * _arg2.x)) + (_arg1.z * _arg2.w)); _local3.w = ((((_arg1.w * _arg2.w) - (_arg1.x * _arg2.x)) - (_arg1.y * _arg2.y)) - (_arg1.z * _arg2.z)); return (_local3); } public static function createFromAxisAngle(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Quaternion{ var _local5:Number = Math.sin((_arg4 / 2)); var _local6:Number = Math.cos((_arg4 / 2)); var _local7:Quaternion = new (Quaternion); _local7.x = (_arg1 * _local5); _local7.y = (_arg2 * _local5); _local7.z = (_arg3 * _local5); _local7.w = _local6; _local7.normalize(); return (_local7); } public static function slerp(_arg1:Quaternion, _arg2:Quaternion, _arg3:Number):Quaternion{ var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local4:Number = ((((_arg1.w * _arg2.w) + (_arg1.x * _arg2.x)) + (_arg1.y * _arg2.y)) + (_arg1.z * _arg2.z)); if (_local4 < 0){ _arg1.x = (_arg1.x * -1); _arg1.y = (_arg1.y * -1); _arg1.z = (_arg1.z * -1); _arg1.w = (_arg1.w * -1); _local4 = (_local4 * -1); }; if ((_local4 + 1) > EPSILON){ if ((1 - _local4) >= EPSILON){ _local7 = Math.acos(_local4); _local8 = (1 / Math.sin(_local7)); _local5 = (Math.sin((_local7 * (1 - _arg3))) * _local8); _local6 = (Math.sin((_local7 * _arg3)) * _local8); } else { _local5 = (1 - _arg3); _local6 = _arg3; }; } else { _arg2.y = -(_arg1.y); _arg2.x = _arg1.x; _arg2.w = -(_arg1.w); _arg2.z = _arg1.z; _local5 = Math.sin((Math.PI * (0.5 - _arg3))); _local6 = Math.sin((Math.PI * _arg3)); }; return (new Quaternion(((_local5 * _arg1.x) + (_local6 * _arg2.x)), ((_local5 * _arg1.y) + (_local6 * _arg2.y)), ((_local5 * _arg1.z) + (_local6 * _arg2.z)), ((_local5 * _arg1.w) + (_local6 * _arg2.w)))); } public static function createFromOrthoMatrix(_arg1:Matrix3D):Quaternion{ var _local2:Quaternion = new (Quaternion); _local2.w = (Math.sqrt(Math.max(0, (((1 + _arg1.n11) + _arg1.n22) + _arg1.n33))) / 2); _local2.x = (Math.sqrt(Math.max(0, (((1 + _arg1.n11) - _arg1.n22) - _arg1.n33))) / 2); _local2.y = (Math.sqrt(Math.max(0, (((1 - _arg1.n11) + _arg1.n22) - _arg1.n33))) / 2); _local2.z = (Math.sqrt(Math.max(0, (((1 - _arg1.n11) - _arg1.n22) + _arg1.n33))) / 2); _local2.x = (((_arg1.n32 - _arg1.n23) < 0)) ? ((_local2.x < 0)) ? _local2.x : -(_local2.x) : ((_local2.x < 0)) ? -(_local2.x) : _local2.x; _local2.y = (((_arg1.n13 - _arg1.n31) < 0)) ? ((_local2.y < 0)) ? _local2.y : -(_local2.y) : ((_local2.y < 0)) ? -(_local2.y) : _local2.y; _local2.z = (((_arg1.n21 - _arg1.n12) < 0)) ? ((_local2.z < 0)) ? _local2.z : -(_local2.z) : ((_local2.z < 0)) ? -(_local2.z) : _local2.z; return (_local2); } public static function conjugate(_arg1:Quaternion):Quaternion{ var _local2:Quaternion = new (Quaternion); _local2.x = -(_arg1.x); _local2.y = -(_arg1.y); _local2.z = -(_arg1.z); _local2.w = _arg1.w; return (_local2); } public static function slerpOld(_arg1:Quaternion, _arg2:Quaternion, _arg3:Number):Quaternion{ var _local4:Quaternion = new (Quaternion); var _local5:Number = ((((_arg1.w * _arg2.w) + (_arg1.x * _arg2.x)) + (_arg1.y * _arg2.y)) + (_arg1.z * _arg2.z)); if (Math.abs(_local5) >= 1){ _local4.w = _arg1.w; _local4.x = _arg1.x; _local4.y = _arg1.y; _local4.z = _arg1.z; return (_local4); }; var _local6:Number = Math.acos(_local5); var _local7:Number = Math.sqrt((1 - (_local5 * _local5))); if (Math.abs(_local7) < 0.001){ _local4.w = ((_arg1.w * 0.5) + (_arg2.w * 0.5)); _local4.x = ((_arg1.x * 0.5) + (_arg2.x * 0.5)); _local4.y = ((_arg1.y * 0.5) + (_arg2.y * 0.5)); _local4.z = ((_arg1.z * 0.5) + (_arg2.z * 0.5)); return (_local4); }; var _local8:Number = (Math.sin(((1 - _arg3) * _local6)) / _local7); var _local9:Number = (Math.sin((_arg3 * _local6)) / _local7); _local4.w = ((_arg1.w * _local8) + (_arg2.w * _local9)); _local4.x = ((_arg1.x * _local8) + (_arg2.x * _local9)); _local4.y = ((_arg1.y * _local8) + (_arg2.y * _local9)); _local4.z = ((_arg1.z * _local8) + (_arg2.z * _local9)); return (_local4); } } }//package org.papervision3d.core.math
Section 60
//pv3dview (org.papervision3d.core.ns.pv3dview) package org.papervision3d.core.ns { public namespace pv3dview; }//package org.papervision3d.core.ns
Section 61
//CameraObject3D (org.papervision3d.core.proto.CameraObject3D) package org.papervision3d.core.proto { import flash.geom.*; import org.papervision3d.objects.*; import org.papervision3d.core.culling.*; import org.papervision3d.core.math.*; import org.papervision3d.*; public class CameraObject3D extends DisplayObject3D { public var zoom:Number; public var yUP:Boolean; public var focus:Number; public var sort:Boolean; public var frustum:FrustumCuller; public var viewport:Rectangle; protected var _target:DisplayObject3D; public var eye:Matrix3D; public static var DEFAULT_VIEWPORT:Rectangle = new Rectangle(0, 0, 550, 400); public static var DEFAULT_POS:Number3D = new Number3D(0, 0, -1000); public static var DEFAULT_UP:Number3D = new Number3D(0, 1, 0); private static var _flipY:Matrix3D = Matrix3D.scaleMatrix(1, -1, 1); public function CameraObject3D(_arg1:Number=500, _arg2:Number=3){ this.x = DEFAULT_POS.x; this.y = DEFAULT_POS.y; this.z = DEFAULT_POS.z; this.zoom = _arg2; this.focus = _arg1; this.eye = Matrix3D.IDENTITY; this.viewport = DEFAULT_VIEWPORT; this.sort = true; if (Papervision3D.useRIGHTHANDED){ DEFAULT_UP.y = -1; this.yUP = false; this.lookAt(DisplayObject3D.ZERO); } else { this.yUP = true; }; } public function orbit(_arg1:Number, _arg2:Number, _arg3:Boolean=true, _arg4:DisplayObject3D=null):void{ } public function get fov():Number{ if (((!(viewport)) || (viewport.isEmpty()))){ Papervision3D.log("[WARNING] CameraObject3D#viewport not set, can't calculate fov!"); return (NaN); }; var _local1:Number = 0; var _local2:Number = 0; var _local3:Number = 0; if (_target){ _local1 = _target.world.n14; _local2 = _target.world.n24; _local3 = _target.world.n34; }; var _local4:Number = (this.x - _local1); var _local5:Number = (this.y - _local2); var _local6:Number = (this.z - _local3); var _local7:Number = this.focus; var _local8:Number = this.zoom; var _local9:Number = (Math.sqrt((((_local4 * _local4) + (_local5 * _local5)) + (_local6 * _local6))) + _local7); var _local10:Number = (viewport.height / 2); var _local11:Number = (180 / Math.PI); return (((Math.atan(((((_local9 / _local7) / _local8) * _local10) / _local9)) * _local11) * 2)); } public function get target():DisplayObject3D{ return (_target); } public function set fov(_arg1:Number):void{ if (((!(viewport)) || (viewport.isEmpty()))){ Papervision3D.log("[WARNING] CameraObject3D#viewport not set, can't set fov!"); return; }; var _local2:Number = 0; var _local3:Number = 0; var _local4:Number = 0; if (_target){ _local2 = _target.world.n14; _local3 = _target.world.n24; _local4 = _target.world.n34; }; var _local5:Number = (this.x - _local2); var _local6:Number = (this.y - _local3); var _local7:Number = (this.z - _local4); var _local8:Number = (viewport.height / 2); var _local9:Number = (Math.sqrt((((_local5 * _local5) + (_local6 * _local6)) + (_local7 * _local7))) + this.focus); var _local10:Number = (180 / Math.PI); var _local11:Number = ((_arg1 / 2) * (Math.PI / 180)); this.focus = ((_local8 / Math.tan(_local11)) / this.zoom); } public function pan(_arg1:Number):void{ if (_target){ super.yaw(_arg1); }; } public function unproject(_arg1:Number, _arg2:Number):Number3D{ var _local3:Number = ((focus * zoom) / focus); var _local4:Number3D = new Number3D((_arg1 / _local3), (-(_arg2) / _local3), focus); Matrix3D.multiplyVector3x3(transform, _local4); return (_local4); } public function transformView(_arg1:Matrix3D=null):void{ if (this.yUP){ eye.calculateMultiply(((_arg1) || (this.transform)), _flipY); eye.invert(); } else { eye.calculateInverse(((_arg1) || (this.transform))); }; } override public function lookAt(_arg1:DisplayObject3D, _arg2:Number3D=null):void{ if (this.yUP){ super.lookAt(_arg1, _arg2); } else { super.lookAt(_arg1, ((_arg2) || (DEFAULT_UP))); }; } public function set target(_arg1:DisplayObject3D):void{ _target = _arg1; } public function tilt(_arg1:Number):void{ if (!_target){ super.pitch(_arg1); }; } } }//package org.papervision3d.core.proto
Section 62
//DisplayObjectContainer3D (org.papervision3d.core.proto.DisplayObjectContainer3D) package org.papervision3d.core.proto { import flash.events.*; import org.papervision3d.objects.*; import flash.utils.*; public class DisplayObjectContainer3D extends EventDispatcher { protected var _childrenByName:Object; public var root:DisplayObjectContainer3D; private var _childrenTotal:int; protected var _children:Dictionary; public function DisplayObjectContainer3D():void{ this._children = new Dictionary(false); this._childrenByName = new Dictionary(true); this._childrenTotal = 0; } private function findChildByName(_arg1:String, _arg2:DisplayObject3D=null):DisplayObject3D{ var _local3:DisplayObject3D; var _local4:DisplayObject3D; _arg2 = ((_arg2) || (DisplayObject3D(this))); if (!_arg2){ return (null); }; if (_arg2.name == _arg1){ return (_arg2); }; for each (_local3 in _arg2.children) { _local4 = findChildByName(_arg1, _local3); if (_local4){ return (_local4); }; }; return (null); } public function getChildByName(_arg1:String, _arg2:Boolean=false):DisplayObject3D{ if (_arg2){ return (findChildByName(_arg1)); }; return (this._childrenByName[_arg1]); } override public function toString():String{ return (childrenList()); } public function addChildren(_arg1:DisplayObject3D):DisplayObjectContainer3D{ var _local2:DisplayObject3D; for each (_local2 in _arg1.children) { _arg1.removeChild(_local2); this.addChild(_local2); }; return (this); } public function get numChildren():int{ return (this._childrenTotal); } public function removeChild(_arg1:DisplayObject3D):DisplayObject3D{ if (_arg1){ delete this._childrenByName[this._children[_arg1]]; delete this._children[_arg1]; _arg1.parent = null; _arg1.root = null; _childrenTotal--; return (_arg1); }; return (null); } public function removeChildByName(_arg1:String):DisplayObject3D{ return (removeChild(getChildByName(_arg1))); } public function addChild(_arg1:DisplayObject3D, _arg2:String=null):DisplayObject3D{ _arg2 = ((((_arg2) || (_arg1.name))) || (String(_arg1.id))); this._children[_arg1] = _arg2; this._childrenByName[_arg2] = _arg1; this._childrenTotal++; _arg1.parent = this; _arg1.root = this.root; return (_arg1); } public function childrenList():String{ var _local2:String; var _local1 = ""; for (_local2 in this._children) { _local1 = (_local1 + (_local2 + "\n")); }; return (_local1); } public function get children():Object{ return (this._childrenByName); } } }//package org.papervision3d.core.proto
Section 63
//GeometryObject3D (org.papervision3d.core.proto.GeometryObject3D) package org.papervision3d.core.proto { import flash.events.*; import org.papervision3d.objects.*; import org.papervision3d.core.math.*; import org.papervision3d.core.geom.renderables.*; import flash.utils.*; public class GeometryObject3D extends EventDispatcher { protected var _boundingSphereDirty:Boolean;// = true public var dirty:Boolean; protected var _aabbDirty:Boolean;// = true public var _ready:Boolean;// = false protected var _boundingSphere:BoundingSphere; public var faces:Array; private var _numInstances:uint;// = 0 public var vertices:Array; protected var _aabb:AxisAlignedBoundingBox; public function GeometryObject3D():void{ dirty = true; } public function transformVertices(_arg1:Matrix3D):void{ var _local15:Vertex3D; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:Number; var _local21:Number; var _local2:Number = _arg1.n11; var _local3:Number = _arg1.n12; var _local4:Number = _arg1.n13; var _local5:Number = _arg1.n21; var _local6:Number = _arg1.n22; var _local7:Number = _arg1.n23; var _local8:Number = _arg1.n31; var _local9:Number = _arg1.n32; var _local10:Number = _arg1.n33; var _local11:Number = _arg1.n14; var _local12:Number = _arg1.n24; var _local13:Number = _arg1.n34; var _local14:int = vertices.length; while ((_local15 = vertices[--_local14])) { _local16 = _local15.x; _local17 = _local15.y; _local18 = _local15.z; _local19 = ((((_local16 * _local2) + (_local17 * _local3)) + (_local18 * _local4)) + _local11); _local20 = ((((_local16 * _local5) + (_local17 * _local6)) + (_local18 * _local7)) + _local12); _local21 = ((((_local16 * _local8) + (_local17 * _local9)) + (_local18 * _local10)) + _local13); _local15.x = _local19; _local15.y = _local20; _local15.z = _local21; }; } public function set ready(_arg1:Boolean):void{ if (_arg1){ createVertexNormals(); this.dirty = false; }; _ready = _arg1; } public function flipFaces():void{ var _local1:Triangle3D; var _local2:Vertex3D; for each (_local1 in this.faces) { _local2 = _local1.v0; _local1.v0 = _local1.v2; _local1.v2 = _local2; _local1.uv = [_local1.uv2, _local1.uv1, _local1.uv0]; _local1.createNormal(); }; this.ready = true; } private function createVertexNormals():void{ var _local2:Triangle3D; var _local3:Vertex3D; var _local1:Dictionary = new Dictionary(true); for each (_local2 in faces) { _local2.v0.connectedFaces[_local2] = _local2; _local2.v1.connectedFaces[_local2] = _local2; _local2.v2.connectedFaces[_local2] = _local2; _local1[_local2.v0] = _local2.v0; _local1[_local2.v1] = _local2.v1; _local1[_local2.v2] = _local2.v2; }; for each (_local3 in _local1) { _local3.calculateNormal(); }; } public function transformUV(_arg1:MaterialObject3D):void{ var _local2:String; if (_arg1.bitmap){ for (_local2 in this.faces) { faces[_local2].transformUV(_arg1); }; }; } public function get boundingSphere():BoundingSphere{ if (_boundingSphereDirty){ _boundingSphere = BoundingSphere.getFromVertices(vertices); _boundingSphereDirty = false; }; return (_boundingSphere); } public function clone(_arg1:DisplayObject3D=null):GeometryObject3D{ var _local5:int; var _local6:MaterialObject3D; var _local7:Vertex3D; var _local8:Triangle3D; var _local9:Vertex3D; var _local10:Vertex3D; var _local11:Vertex3D; var _local2:Dictionary = new Dictionary(true); var _local3:Dictionary = new Dictionary(true); var _local4:GeometryObject3D = new GeometryObject3D(); _local4.vertices = new Array(); _local4.faces = new Array(); _local5 = 0; while (_local5 < this.vertices.length) { _local7 = this.vertices[_local5]; _local3[_local7] = _local7.clone(); _local4.vertices.push(_local3[_local7]); _local5++; }; _local5 = 0; while (_local5 < this.faces.length) { _local8 = this.faces[_local5]; _local9 = _local3[_local8.v0]; _local10 = _local3[_local8.v1]; _local11 = _local3[_local8.v2]; _local4.faces.push(new Triangle3D(_arg1, [_local9, _local10, _local11], _local8.material, _local8.uv)); _local2[_local8.material] = _local8.material; _local5++; }; for each (_local6 in _local2) { _local6.registerObject(_arg1); }; return (_local4); } public function get ready():Boolean{ return (_ready); } public function get aabb():AxisAlignedBoundingBox{ if (_aabbDirty){ _aabb = AxisAlignedBoundingBox.createFromVertices(vertices); _aabbDirty = false; }; return (_aabb); } } }//package org.papervision3d.core.proto
Section 64
//MaterialObject3D (org.papervision3d.core.proto.MaterialObject3D) package org.papervision3d.core.proto { import flash.events.*; import flash.display.*; import org.papervision3d.core.render.data.*; import flash.geom.*; import org.papervision3d.objects.*; import org.papervision3d.core.geom.renderables.*; import org.papervision3d.core.render.material.*; import org.papervision3d.materials.*; import flash.utils.*; import org.papervision3d.core.render.draw.*; public class MaterialObject3D extends EventDispatcher implements ITriangleDrawer { public var interactive:Boolean;// = false public var lineAlpha:Number;// = 0 public var name:String; public var lineColor:Number; public var id:Number; public var oneSide:Boolean;// = true public var lineThickness:Number;// = 1 public var heightOffset:Number;// = 0 public var fillAlpha:Number;// = 0 protected var objects:Dictionary; public var fillColor:Number; public var invisible:Boolean;// = false public var smooth:Boolean;// = false public var bitmap:BitmapData; public var maxU:Number; public var maxV:Number; public var tiled:Boolean;// = false public var widthOffset:Number;// = 0 public var opposite:Boolean;// = false public static var DEFAULT_COLOR:int = 0; public static var DEBUG_COLOR:int = 0xFF00FF; private static var _totalMaterialObjects:Number = 0; public function MaterialObject3D(){ lineColor = DEFAULT_COLOR; fillColor = DEFAULT_COLOR; super(); this.id = _totalMaterialObjects++; MaterialManager.registerMaterial(this); objects = new Dictionary(true); } public function registerObject(_arg1:DisplayObject3D):void{ objects[_arg1] = _arg1; } public function destroy():void{ objects = null; bitmap = null; MaterialManager.unRegisterMaterial(this); } public function clone():MaterialObject3D{ var _local1:MaterialObject3D = new MaterialObject3D(); _local1.copy(this); return (_local1); } public function updateBitmap():void{ } override public function toString():String{ return (((((("[MaterialObject3D] bitmap:" + this.bitmap) + " lineColor:") + this.lineColor) + " fillColor:") + fillColor)); } public function unregisterObject(_arg1:DisplayObject3D):void{ if (((objects) && (!((objects[_arg1] == null))))){ delete objects[_arg1]; }; } public function get doubleSided():Boolean{ return (!(this.oneSide)); } public function copy(_arg1:MaterialObject3D):void{ this.bitmap = _arg1.bitmap; this.smooth = _arg1.smooth; this.lineColor = _arg1.lineColor; this.lineAlpha = _arg1.lineAlpha; this.fillColor = _arg1.fillColor; this.fillAlpha = _arg1.fillAlpha; this.oneSide = _arg1.oneSide; this.opposite = _arg1.opposite; this.invisible = _arg1.invisible; this.name = _arg1.name; this.maxU = _arg1.maxU; this.maxV = _arg1.maxV; } public function set doubleSided(_arg1:Boolean):void{ this.oneSide = !(_arg1); } public function drawTriangle(_arg1:Triangle3D, _arg2:Graphics, _arg3:RenderSessionData, _arg4:BitmapData=null, _arg5:Matrix=null):void{ } public static function get DEFAULT():MaterialObject3D{ var _local1:MaterialObject3D = new WireframeMaterial(); _local1.lineColor = (0xFFFFFF * Math.random()); _local1.lineAlpha = 1; _local1.fillColor = DEFAULT_COLOR; _local1.fillAlpha = 1; _local1.doubleSided = false; return (_local1); } public static function get DEBUG():MaterialObject3D{ var _local1:MaterialObject3D = new (MaterialObject3D); _local1.lineColor = (0xFFFFFF * Math.random()); _local1.lineAlpha = 1; _local1.fillColor = DEBUG_COLOR; _local1.fillAlpha = 0.37; _local1.doubleSided = true; return (_local1); } } }//package org.papervision3d.core.proto
Section 65
//SceneObject3D (org.papervision3d.core.proto.SceneObject3D) package org.papervision3d.core.proto { import org.papervision3d.objects.*; import org.papervision3d.materials.utils.*; import org.papervision3d.*; public class SceneObject3D extends DisplayObjectContainer3D { public var objects:Array; public var materials:MaterialsList; public function SceneObject3D(){ this.objects = new Array(); this.materials = new MaterialsList(); Papervision3D.log((((((Papervision3D.NAME + " ") + Papervision3D.VERSION) + " (") + Papervision3D.DATE) + ")\n")); this.root = this; } override public function removeChild(_arg1:DisplayObject3D):DisplayObject3D{ super.removeChild(_arg1); var _local2:int; while (_local2 < this.objects.length) { if (this.objects[_local2] === _arg1){ this.objects.splice(_local2, 1); return (_arg1); }; _local2++; }; return (_arg1); } override public function addChild(_arg1:DisplayObject3D, _arg2:String=null):DisplayObject3D{ var _local3:DisplayObject3D = super.addChild(_arg1, (_arg2) ? _arg2 : _arg1.name); _arg1.scene = this; _arg1.parent = null; this.objects.push(_local3); return (_local3); } } }//package org.papervision3d.core.proto
Section 66
//AbstractRenderListItem (org.papervision3d.core.render.command.AbstractRenderListItem) package org.papervision3d.core.render.command { import flash.display.*; import org.papervision3d.core.render.data.*; public class AbstractRenderListItem implements IRenderListItem { public var screenDepth:Number; public function render(_arg1:RenderSessionData, _arg2:Graphics):void{ } } }//package org.papervision3d.core.render.command
Section 67
//IRenderListItem (org.papervision3d.core.render.command.IRenderListItem) package org.papervision3d.core.render.command { import flash.display.*; import org.papervision3d.core.render.data.*; public interface IRenderListItem { function render(_arg1:RenderSessionData, _arg2:Graphics):void; } }//package org.papervision3d.core.render.command
Section 68
//RenderableListItem (org.papervision3d.core.render.command.RenderableListItem) package org.papervision3d.core.render.command { import org.papervision3d.core.render.data.*; import flash.geom.*; import org.papervision3d.objects.*; import org.papervision3d.core.geom.renderables.*; public class RenderableListItem extends AbstractRenderListItem { public var renderable:Class; public var instance:DisplayObject3D; public var renderableInstance:AbstractRenderable; public function hitTestPoint2D(_arg1:Point, _arg2:RenderHitData):RenderHitData{ return (_arg2); } } }//package org.papervision3d.core.render.command
Section 69
//RenderLine (org.papervision3d.core.render.command.RenderLine) package org.papervision3d.core.render.command { import flash.display.*; import org.papervision3d.core.render.data.*; import flash.geom.*; import org.papervision3d.core.math.*; import org.papervision3d.core.geom.renderables.*; import org.papervision3d.materials.special.*; public class RenderLine extends RenderableListItem implements IRenderListItem { public var renderer:LineMaterial; private var l1:Number2D; private var l2:Number2D; private var p:Number2D; public var line:Line3D; private var v:Number2D; private var cp3d:Number3D; private static var mouseVector:Number3D = Number3D.ZERO; private static var lineVector:Number3D = Number3D.ZERO; public function RenderLine(_arg1:Line3D){ this.renderable = Line3D; this.renderableInstance = _arg1; this.line = _arg1; p = new Number2D(); l1 = new Number2D(); l2 = new Number2D(); v = new Number2D(); cp3d = new Number3D(); } override public function hitTestPoint2D(_arg1:Point, _arg2:RenderHitData):RenderHitData{ var _local3:Number; var _local4:Number; var _local5:Number; if (renderer.interactive){ _local3 = line.size; p.reset(_arg1.x, _arg1.y); l1.reset(line.v0.vertex3DInstance.x, line.v0.vertex3DInstance.y); l2.reset(line.v1.vertex3DInstance.x, line.v1.vertex3DInstance.y); v.copyFrom(l2); v.minusEq(l1); _local4 = ((((p.x - l1.x) * (l2.x - l1.x)) + ((p.y - l1.y) * (l2.y - l1.y))) / ((v.x * v.x) + (v.y * v.y))); if ((((_local4 > 0)) && ((_local4 < 1)))){ v.multiplyEq(_local4); v.plusEq(l1); v.minusEq(p); _local5 = ((v.x * v.x) + (v.y * v.y)); if (_local5 < (_local3 * _local3)){ _arg2.displayObject3D = line.instance; _arg2.material = renderer; _arg2.renderable = line; _arg2.hasHit = true; cp3d.reset((line.v1.x - line.v0.x), (line.v1.y - line.v0.y), (line.v1.x - line.v0.x)); cp3d.x = (cp3d.x * _local4); cp3d.y = (cp3d.y * _local4); cp3d.z = (cp3d.z * _local4); cp3d.x = (cp3d.x + line.v0.x); cp3d.y = (cp3d.y + line.v0.y); cp3d.z = (cp3d.z + line.v0.z); _arg2.x = cp3d.x; _arg2.y = cp3d.y; _arg2.z = cp3d.z; _arg2.u = 0; _arg2.v = 0; return (_arg2); }; }; }; return (_arg2); } override public function render(_arg1:RenderSessionData, _arg2:Graphics):void{ renderer.drawLine(line, _arg2, _arg1); } } }//package org.papervision3d.core.render.command
Section 70
//RenderParticle (org.papervision3d.core.render.command.RenderParticle) package org.papervision3d.core.render.command { import flash.display.*; import org.papervision3d.core.render.data.*; import flash.geom.*; import org.papervision3d.core.geom.renderables.*; import org.papervision3d.materials.special.*; public class RenderParticle extends RenderableListItem implements IRenderListItem { public var renderMat:ParticleMaterial; public var particle:Particle; public function RenderParticle(_arg1:Particle){ this.particle = _arg1; this.renderableInstance = _arg1; this.renderable = Particle; } override public function render(_arg1:RenderSessionData, _arg2:Graphics):void{ particle.material.drawParticle(particle, _arg2, _arg1); } override public function hitTestPoint2D(_arg1:Point, _arg2:RenderHitData):RenderHitData{ renderMat = particle.material; if (renderMat.interactive){ if (particle.renderRect.contains(_arg1.x, _arg1.y)){ _arg2.displayObject3D = particle.instance; _arg2.material = renderMat; _arg2.renderable = particle; _arg2.hasHit = true; _arg2.x = particle.x; _arg2.y = particle.y; _arg2.z = particle.z; _arg2.u = 0; _arg2.v = 0; return (_arg2); }; }; return (_arg2); } } }//package org.papervision3d.core.render.command
Section 71
//RenderTriangle (org.papervision3d.core.render.command.RenderTriangle) package org.papervision3d.core.render.command { import flash.display.*; import org.papervision3d.core.render.data.*; import flash.geom.*; import org.papervision3d.core.proto.*; import org.papervision3d.core.math.*; import org.papervision3d.core.geom.renderables.*; import org.papervision3d.materials.*; import org.papervision3d.core.render.draw.*; public class RenderTriangle extends RenderableListItem implements IRenderListItem { public var container:Sprite; public var renderer:ITriangleDrawer; public var triangle:Triangle3D; private var position:Number3D; public var renderMat:MaterialObject3D; protected static var resPA:Vertex3DInstance = new Vertex3DInstance(); protected static var resBA:Vertex3DInstance = new Vertex3DInstance(); protected static var vPoint:Vertex3DInstance = new Vertex3DInstance(); protected static var resRA:Vertex3DInstance = new Vertex3DInstance(); public function RenderTriangle(_arg1:Triangle3D):void{ position = new Number3D(); super(); this.triangle = _arg1; renderableInstance = _arg1; renderable = Triangle3D; } override public function hitTestPoint2D(_arg1:Point, _arg2:RenderHitData):RenderHitData{ var _local3:Vertex3DInstance; var _local4:Vertex3DInstance; var _local5:Vertex3DInstance; var _local6:Vertex3DInstance; renderMat = triangle.material; if (!renderMat){ renderMat = triangle.instance.material; }; if (renderMat.interactive){ _local3 = RenderTriangle.vPoint; _local3.x = _arg1.x; _local3.y = _arg1.y; _local4 = triangle.v0.vertex3DInstance; _local5 = triangle.v1.vertex3DInstance; _local6 = triangle.v2.vertex3DInstance; if (sameSide(_local3, _local4, _local5, _local6)){ if (sameSide(_local3, _local5, _local4, _local6)){ if (sameSide(_local3, _local6, _local4, _local5)){ return (deepHitTest(triangle, _local3, _arg2)); }; }; }; }; return (_arg2); } public function sameSide(_arg1:Vertex3DInstance, _arg2:Vertex3DInstance, _arg3:Vertex3DInstance, _arg4:Vertex3DInstance):Boolean{ Vertex3DInstance.subTo(_arg4, _arg3, resBA); Vertex3DInstance.subTo(_arg1, _arg3, resPA); Vertex3DInstance.subTo(_arg2, _arg3, resRA); return (((Vertex3DInstance.cross(resBA, resPA) * Vertex3DInstance.cross(resBA, resRA)) > 0)); } override public function render(_arg1:RenderSessionData, _arg2:Graphics):void{ renderer.drawTriangle(triangle, _arg2, _arg1); } private function deepHitTest(_arg1:Triangle3D, _arg2:Vertex3DInstance, _arg3:RenderHitData):RenderHitData{ var _local44:MovieMaterial; var _local45:Rectangle; var _local4:Vertex3DInstance = _arg1.v0.vertex3DInstance; var _local5:Vertex3DInstance = _arg1.v1.vertex3DInstance; var _local6:Vertex3DInstance = _arg1.v2.vertex3DInstance; var _local7:Number = (_local6.x - _local4.x); var _local8:Number = (_local6.y - _local4.y); var _local9:Number = (_local5.x - _local4.x); var _local10:Number = (_local5.y - _local4.y); var _local11:Number = (_arg2.x - _local4.x); var _local12:Number = (_arg2.y - _local4.y); var _local13:Number = ((_local7 * _local7) + (_local8 * _local8)); var _local14:Number = ((_local7 * _local9) + (_local8 * _local10)); var _local15:Number = ((_local7 * _local11) + (_local8 * _local12)); var _local16:Number = ((_local9 * _local9) + (_local10 * _local10)); var _local17:Number = ((_local9 * _local11) + (_local10 * _local12)); var _local18:Number = (1 / ((_local13 * _local16) - (_local14 * _local14))); var _local19:Number = (((_local16 * _local15) - (_local14 * _local17)) * _local18); var _local20:Number = (((_local13 * _local17) - (_local14 * _local15)) * _local18); var _local21:Number = (_arg1.v2.x - _arg1.v0.x); var _local22:Number = (_arg1.v2.y - _arg1.v0.y); var _local23:Number = (_arg1.v2.z - _arg1.v0.z); var _local24:Number = (_arg1.v1.x - _arg1.v0.x); var _local25:Number = (_arg1.v1.y - _arg1.v0.y); var _local26:Number = (_arg1.v1.z - _arg1.v0.z); var _local27:Number = ((_arg1.v0.x + (_local21 * _local19)) + (_local24 * _local20)); var _local28:Number = ((_arg1.v0.y + (_local22 * _local19)) + (_local25 * _local20)); var _local29:Number = ((_arg1.v0.z + (_local23 * _local19)) + (_local26 * _local20)); var _local30:Array = _arg1.uv; var _local31:Number = _local30[0].u; var _local32:Number = _local30[1].u; var _local33:Number = _local30[2].u; var _local34:Number = _local30[0].v; var _local35:Number = _local30[1].v; var _local36:Number = _local30[2].v; var _local37:Number = ((((_local32 - _local31) * _local20) + ((_local33 - _local31) * _local19)) + _local31); var _local38:Number = ((((_local35 - _local34) * _local20) + ((_local36 - _local34) * _local19)) + _local34); if (triangle.material){ renderMat = _arg1.material; } else { renderMat = _arg1.instance.material; }; var _local39:BitmapData = renderMat.bitmap; var _local40:Number = 1; var _local41:Number = 1; var _local42:Number = 0; var _local43:Number = 0; if ((renderMat is MovieMaterial)){ _local44 = (renderMat as MovieMaterial); _local45 = _local44.rect; if (_local45){ _local42 = _local45.x; _local43 = _local45.y; _local40 = _local45.width; _local41 = _local45.height; }; } else { if (_local39){ _local40 = (BitmapMaterial.AUTO_MIP_MAPPING) ? renderMat.widthOffset : _local39.width; _local41 = (BitmapMaterial.AUTO_MIP_MAPPING) ? renderMat.heightOffset : _local39.height; }; }; _arg3.displayObject3D = _arg1.instance; _arg3.material = renderMat; _arg3.renderable = _arg1; _arg3.hasHit = true; position.x = _local27; position.y = _local28; position.z = _local29; Matrix3D.multiplyVector(_arg1.instance.world, position); _arg3.x = position.x; _arg3.y = position.y; _arg3.z = position.z; _arg3.u = ((_local37 * _local40) + _local42); _arg3.v = ((_local41 - (_local38 * _local41)) + _local43); return (_arg3); } } }//package org.papervision3d.core.render.command
Section 72
//RenderHitData (org.papervision3d.core.render.data.RenderHitData) package org.papervision3d.core.render.data { import org.papervision3d.objects.*; import org.papervision3d.core.proto.*; import org.papervision3d.core.geom.renderables.*; public class RenderHitData { public var y:Number; public var z:Number; public var endTime:int;// = 0 public var startTime:int;// = 0 public var displayObject3D:DisplayObject3D; public var hasHit:Boolean;// = false public var material:MaterialObject3D; public var renderable:IRenderable; public var u:Number; public var v:Number; public var x:Number; public function RenderHitData():void{ } public function clear():void{ startTime = 0; endTime = 0; hasHit = false; displayObject3D = null; material = null; renderable = null; u = 0; v = 0; x = 0; y = 0; z = 0; } public function clone():RenderHitData{ var _local1:RenderHitData = new RenderHitData(); _local1.startTime = startTime; _local1.endTime = endTime; _local1.hasHit = hasHit; _local1.displayObject3D = displayObject3D; _local1.material = material; _local1.renderable = renderable; _local1.u = u; _local1.v = v; _local1.x = x; _local1.y = y; _local1.z = z; return (_local1); } public function toString():String{ return (((displayObject3D + " ") + renderable)); } } }//package org.papervision3d.core.render.data
Section 73
//RenderSessionData (org.papervision3d.core.render.data.RenderSessionData) package org.papervision3d.core.render.data { import flash.display.*; import org.papervision3d.core.culling.*; import org.papervision3d.core.proto.*; import org.papervision3d.view.*; import org.papervision3d.core.render.*; public class RenderSessionData { public var container:Sprite; public var renderer:IRenderEngine; public var particleCuller:IParticleCuller; public var viewPort:Viewport3D; public var triangleCuller:ITriangleCuller; public var scene:SceneObject3D; public var camera:CameraObject3D; public var renderStatistics:RenderStatistics; public var sorted:Boolean; public var renderObjects:Array; public var renderLayers:Array; public function RenderSessionData():void{ this.renderStatistics = new RenderStatistics(); } public function clone():RenderSessionData{ var _local1:RenderSessionData = new RenderSessionData(); _local1.triangleCuller = triangleCuller; _local1.particleCuller = particleCuller; _local1.viewPort = viewPort; _local1.container = container; _local1.scene = scene; _local1.camera = camera; _local1.renderer = renderer; _local1.renderStatistics = renderStatistics.clone(); return (_local1); } public function destroy():void{ triangleCuller = null; particleCuller = null; viewPort = null; container = null; scene = null; camera = null; renderer = null; renderStatistics = null; renderObjects = null; renderLayers = null; } } }//package org.papervision3d.core.render.data
Section 74
//RenderStatistics (org.papervision3d.core.render.data.RenderStatistics) package org.papervision3d.core.render.data { public class RenderStatistics { public var renderTime:int;// = 0 public var culledObjects:int;// = 0 public var shadedTriangles:int;// = 0 public var culledParticles:int;// = 0 public var culledTriangles:int;// = 0 public var triangles:int;// = 0 public var particles:int;// = 0 public var rendered:int;// = 0 public var projectionTime:int;// = 0 public var filteredObjects:int;// = 0 public var lines:int;// = 0 public function clear():void{ projectionTime = 0; renderTime = 0; rendered = 0; particles = 0; triangles = 0; culledTriangles = 0; culledParticles = 0; lines = 0; shadedTriangles = 0; filteredObjects = 0; culledObjects = 0; } public function clone():RenderStatistics{ var _local1:RenderStatistics = new RenderStatistics(); _local1.projectionTime = projectionTime; _local1.renderTime = renderTime; _local1.rendered = rendered; _local1.particles = particles; _local1.triangles = triangles; _local1.culledTriangles = culledTriangles; _local1.lines = lines; _local1.shadedTriangles = shadedTriangles; _local1.filteredObjects = filteredObjects; _local1.culledObjects = culledObjects; return (_local1); } public function toString():String{ return (new String((((((((((((((((((("ProjectionTime:" + projectionTime) + " RenderTime:") + renderTime) + " Particles:") + particles) + " CulledParticles :") + culledParticles) + " Triangles:") + triangles) + " ShadedTriangles :") + shadedTriangles) + " CulledTriangles:") + culledTriangles) + " FilteredObjects:") + filteredObjects) + " CulledObjects:") + culledObjects) + ""))); } } }//package org.papervision3d.core.render.data
Section 75
//ILineDrawer (org.papervision3d.core.render.draw.ILineDrawer) package org.papervision3d.core.render.draw { import flash.display.*; import org.papervision3d.core.render.data.*; import org.papervision3d.core.geom.renderables.*; public interface ILineDrawer { function drawLine(_arg1:Line3D, _arg2:Graphics, _arg3:RenderSessionData):void; } }//package org.papervision3d.core.render.draw
Section 76
//IParticleDrawer (org.papervision3d.core.render.draw.IParticleDrawer) package org.papervision3d.core.render.draw { import flash.display.*; import org.papervision3d.core.render.data.*; import org.papervision3d.core.geom.renderables.*; public interface IParticleDrawer { function drawParticle(_arg1:Particle, _arg2:Graphics, _arg3:RenderSessionData):void; function updateRenderRect(_arg1:Particle):void; } }//package org.papervision3d.core.render.draw
Section 77
//ITriangleDrawer (org.papervision3d.core.render.draw.ITriangleDrawer) package org.papervision3d.core.render.draw { import flash.display.*; import org.papervision3d.core.render.data.*; import flash.geom.*; import org.papervision3d.core.geom.renderables.*; public interface ITriangleDrawer { function drawTriangle(_arg1:Triangle3D, _arg2:Graphics, _arg3:RenderSessionData, _arg4:BitmapData=null, _arg5:Matrix=null):void; } }//package org.papervision3d.core.render.draw
Section 78
//BasicRenderFilter (org.papervision3d.core.render.filter.BasicRenderFilter) package org.papervision3d.core.render.filter { public class BasicRenderFilter implements IRenderFilter { public function filter(_arg1:Array):int{ return (0); } } }//package org.papervision3d.core.render.filter
Section 79
//IRenderFilter (org.papervision3d.core.render.filter.IRenderFilter) package org.papervision3d.core.render.filter { public interface IRenderFilter { function filter(_arg1:Array):int; } }//package org.papervision3d.core.render.filter
Section 80
//IUpdateAfterMaterial (org.papervision3d.core.render.material.IUpdateAfterMaterial) package org.papervision3d.core.render.material { import org.papervision3d.core.render.data.*; public interface IUpdateAfterMaterial { function updateAfterRender(_arg1:RenderSessionData):void; } }//package org.papervision3d.core.render.material
Section 81
//IUpdateBeforeMaterial (org.papervision3d.core.render.material.IUpdateBeforeMaterial) package org.papervision3d.core.render.material { import org.papervision3d.core.render.data.*; public interface IUpdateBeforeMaterial { function updateBeforeRender(_arg1:RenderSessionData):void; } }//package org.papervision3d.core.render.material
Section 82
//MaterialManager (org.papervision3d.core.render.material.MaterialManager) package org.papervision3d.core.render.material { import org.papervision3d.core.render.data.*; import org.papervision3d.core.proto.*; import flash.utils.*; public class MaterialManager { private var materials:Dictionary; private static var instance:MaterialManager; public function MaterialManager():void{ if (instance){ throw (new Error("Only 1 instance of materialmanager allowed")); }; init(); } private function init():void{ materials = new Dictionary(true); } private function _unRegisterMaterial(_arg1:MaterialObject3D):void{ delete materials[_arg1]; } public function updateMaterialsAfterRender(_arg1:RenderSessionData):void{ var _local2:IUpdateAfterMaterial; var _local3:MaterialObject3D; for each (_local3 in materials) { if ((_local3 is IUpdateAfterMaterial)){ _local2 = (_local3 as IUpdateAfterMaterial); _local2.updateAfterRender(_arg1); }; }; } private function _registerMaterial(_arg1:MaterialObject3D):void{ materials[_arg1] = _arg1; } public function updateMaterialsBeforeRender(_arg1:RenderSessionData):void{ var _local2:IUpdateBeforeMaterial; var _local3:MaterialObject3D; for each (_local3 in materials) { if ((_local3 is IUpdateBeforeMaterial)){ _local2 = (_local3 as IUpdateBeforeMaterial); _local2.updateBeforeRender(_arg1); }; }; } public static function getInstance():MaterialManager{ if (!instance){ instance = new (MaterialManager); }; return (instance); } public static function unRegisterMaterial(_arg1:MaterialObject3D):void{ getInstance()._unRegisterMaterial(_arg1); } public static function registerMaterial(_arg1:MaterialObject3D):void{ getInstance()._registerMaterial(_arg1); } } }//package org.papervision3d.core.render.material
Section 83
//BasicProjectionPipeline (org.papervision3d.core.render.project.BasicProjectionPipeline) package org.papervision3d.core.render.project { import org.papervision3d.core.render.data.*; import org.papervision3d.objects.*; import org.papervision3d.core.culling.*; public class BasicProjectionPipeline extends ProjectionPipeline { public function BasicProjectionPipeline(){ init(); } protected function init():void{ } override public function project(_arg1:RenderSessionData):void{ var _local3:DisplayObject3D; _arg1.camera.transformView(); var _local2:Array = _arg1.renderObjects; var _local4:Number = _local2.length; if ((_arg1.camera is IObjectCuller)){ for each (_local3 in _local2) { if (_local3.visible){ if (_arg1.viewPort.viewportObjectFilter){ if (_arg1.viewPort.viewportObjectFilter.testObject(_local3)){ _local3.view.calculateMultiply4x4(_arg1.camera.eye, _local3.transform); projectObject(_local3, _arg1); } else { _arg1.renderStatistics.filteredObjects++; }; } else { _local3.view.calculateMultiply4x4(_arg1.camera.eye, _local3.transform); projectObject(_local3, _arg1); }; }; }; } else { for each (_local3 in _local2) { if (_local3.visible){ if (_arg1.viewPort.viewportObjectFilter){ if (_arg1.viewPort.viewportObjectFilter.testObject(_local3)){ _local3.view.calculateMultiply(_arg1.camera.eye, _local3.transform); projectObject(_local3, _arg1); } else { _arg1.renderStatistics.filteredObjects++; }; } else { _local3.view.calculateMultiply(_arg1.camera.eye, _local3.transform); projectObject(_local3, _arg1); }; }; }; }; } protected function projectObject(_arg1:DisplayObject3D, _arg2:RenderSessionData):void{ _arg1.project(_arg2.camera, _arg2); } } }//package org.papervision3d.core.render.project
Section 84
//ProjectionPipeline (org.papervision3d.core.render.project.ProjectionPipeline) package org.papervision3d.core.render.project { import org.papervision3d.core.render.data.*; public class ProjectionPipeline { public function project(_arg1:RenderSessionData):void{ } } }//package org.papervision3d.core.render.project
Section 85
//BasicRenderSorter (org.papervision3d.core.render.sort.BasicRenderSorter) package org.papervision3d.core.render.sort { public class BasicRenderSorter implements IRenderSorter { public function sort(_arg1:Array):void{ _arg1.sortOn("screenDepth", Array.NUMERIC); } } }//package org.papervision3d.core.render.sort
Section 86
//IRenderSorter (org.papervision3d.core.render.sort.IRenderSorter) package org.papervision3d.core.render.sort { public interface IRenderSorter { function sort(_arg1:Array):void; } }//package org.papervision3d.core.render.sort
Section 87
//AbstractRenderEngine (org.papervision3d.core.render.AbstractRenderEngine) package org.papervision3d.core.render { import flash.events.*; import org.papervision3d.core.render.data.*; import org.papervision3d.core.render.command.*; import org.papervision3d.core.proto.*; import org.papervision3d.view.*; public class AbstractRenderEngine extends EventDispatcher implements IRenderEngine { public function AbstractRenderEngine(_arg1:IEventDispatcher=null){ super(_arg1); } public function addToRenderList(_arg1:IRenderListItem):int{ return (0); } public function removeFromRenderList(_arg1:IRenderListItem):int{ return (0); } public function renderScene(_arg1:SceneObject3D, _arg2:CameraObject3D, _arg3:Viewport3D, _arg4:Boolean=true):RenderStatistics{ return (null); } } }//package org.papervision3d.core.render
Section 88
//IRenderEngine (org.papervision3d.core.render.IRenderEngine) package org.papervision3d.core.render { import org.papervision3d.core.render.data.*; import org.papervision3d.core.render.command.*; import org.papervision3d.core.proto.*; import org.papervision3d.view.*; public interface IRenderEngine { function addToRenderList(_arg1:IRenderListItem):int; function removeFromRenderList(_arg1:IRenderListItem):int; function renderScene(_arg1:SceneObject3D, _arg2:CameraObject3D, _arg3:Viewport3D, _arg4:Boolean=true):RenderStatistics; } }//package org.papervision3d.core.render
Section 89
//IVirtualMouseEvent (org.papervision3d.core.utils.virtualmouse.IVirtualMouseEvent) package org.papervision3d.core.utils.virtualmouse { public interface IVirtualMouseEvent { } }//package org.papervision3d.core.utils.virtualmouse
Section 90
//VirtualMouse (org.papervision3d.core.utils.virtualmouse.VirtualMouse) package org.papervision3d.core.utils.virtualmouse { import flash.events.*; import flash.display.*; import flash.geom.*; import com.blitzagency.xray.logger.*; import flash.utils.*; import org.papervision3d.core.components.as3.utils.*; public class VirtualMouse extends EventDispatcher { private var _container:Sprite; private var _stage:Stage; private var lastDownTarget:DisplayObject; private var target:InteractiveObject; private var updateMouseDown:Boolean;// = false private var eventEvent:Class; private var _lastEvent:Event; private var mouseEventEvent:Class; private var location:Point; private var delta:int;// = 0 private var log:XrayLog; private var ignoredInstances:Dictionary; private var disabledEvents:Object; private var isLocked:Boolean;// = false private var lastWithinStage:Boolean;// = true private var lastLocation:Point; private var isDoubleClickEvent:Boolean;// = false private var lastMouseDown:Boolean;// = false private var ctrlKey:Boolean;// = false private var altKey:Boolean;// = false private var _useNativeEvents:Boolean;// = false private var shiftKey:Boolean;// = false public static const UPDATE:String = "update"; private static var _mouseIsDown:Boolean = false; public function VirtualMouse(_arg1:Stage=null, _arg2:Sprite=null, _arg3:Number=0, _arg4:Number=0){ disabledEvents = new Object(); ignoredInstances = new Dictionary(true); eventEvent = VirtualMouseEvent; mouseEventEvent = VirtualMouseMouseEvent; log = new XrayLog(); super(); this.stage = _arg1; this.container = _arg2; location = new Point(_arg3, _arg4); lastLocation = location.clone(); addEventListener(UPDATE, handleUpdate); update(); } public function get mouseIsDown():Boolean{ return (_mouseIsDown); } public function get container():Sprite{ return (_container); } public function exitContainer():void{ var _local1:Point = target.globalToLocal(location); if (!disabledEvents[MouseEvent.MOUSE_OUT]){ _lastEvent = new mouseEventEvent(MouseEvent.MOUSE_OUT, true, false, _local1.x, _local1.y, container, ctrlKey, altKey, shiftKey, _mouseIsDown, delta); container.dispatchEvent(new mouseEventEvent(MouseEvent.MOUSE_OUT, true, false, _local1.x, _local1.y, container, ctrlKey, altKey, shiftKey, _mouseIsDown, delta)); dispatchEvent(new mouseEventEvent(MouseEvent.MOUSE_OUT, true, false, _local1.x, _local1.y, container, ctrlKey, altKey, shiftKey, _mouseIsDown, delta)); }; if (!disabledEvents[MouseEvent.ROLL_OUT]){ _lastEvent = new mouseEventEvent(MouseEvent.ROLL_OUT, false, false, _local1.x, _local1.y, container, ctrlKey, altKey, shiftKey, _mouseIsDown, delta); container.dispatchEvent(new mouseEventEvent(MouseEvent.ROLL_OUT, false, false, _local1.x, _local1.y, container, ctrlKey, altKey, shiftKey, _mouseIsDown, delta)); dispatchEvent(new mouseEventEvent(MouseEvent.ROLL_OUT, false, false, _local1.x, _local1.y, container, ctrlKey, altKey, shiftKey, _mouseIsDown, delta)); }; if (target != container){ if (!disabledEvents[MouseEvent.MOUSE_OUT]){ _lastEvent = new mouseEventEvent(MouseEvent.MOUSE_OUT, true, false, _local1.x, _local1.y, container, ctrlKey, altKey, shiftKey, _mouseIsDown, delta); target.dispatchEvent(new mouseEventEvent(MouseEvent.MOUSE_OUT, true, false, _local1.x, _local1.y, container, ctrlKey, altKey, shiftKey, _mouseIsDown, delta)); dispatchEvent(new mouseEventEvent(MouseEvent.MOUSE_OUT, true, false, _local1.x, _local1.y, container, ctrlKey, altKey, shiftKey, _mouseIsDown, delta)); }; if (!disabledEvents[MouseEvent.ROLL_OUT]){ _lastEvent = new mouseEventEvent(MouseEvent.ROLL_OUT, false, false, _local1.x, _local1.y, container, ctrlKey, altKey, shiftKey, _mouseIsDown, delta); target.dispatchEvent(new mouseEventEvent(MouseEvent.ROLL_OUT, false, false, _local1.x, _local1.y, container, ctrlKey, altKey, shiftKey, _mouseIsDown, delta)); dispatchEvent(new mouseEventEvent(MouseEvent.ROLL_OUT, false, false, _local1.x, _local1.y, container, ctrlKey, altKey, shiftKey, _mouseIsDown, delta)); }; }; target = _stage; } public function release():void{ updateMouseDown = true; _mouseIsDown = false; if (!isLocked){ update(); }; } private function keyHandler(_arg1:KeyboardEvent):void{ altKey = _arg1.altKey; ctrlKey = _arg1.ctrlKey; shiftKey = _arg1.shiftKey; } public function click():void{ press(); release(); } public function disableEvent(_arg1:String):void{ disabledEvents[_arg1] = true; } public function set container(_arg1:Sprite):void{ _container = _arg1; } public function get y():Number{ return (location.y); } public function set x(_arg1:Number):void{ location.x = _arg1; if (!isLocked){ update(); }; } public function get lastEvent():Event{ return (_lastEvent); } private function handleUpdate(_arg1:Event):void{ var _local4:InteractiveObject; var _local5:DisplayObject; var _local9:Boolean; if (!container){ return; }; var _local2:Point = CoordinateTools.localToLocal(container, stage, location); var _local3:Array = container.getObjectsUnderPoint(location); var _local6:int = _local3.length; while (_local6--) { _local5 = _local3[_local6]; while (_local5) { if (ignoredInstances[_local5]){ _local4 = null; break; }; if (((_local4) && ((_local5 is SimpleButton)))){ _local4 = null; } else { if (((_local4) && (!(DisplayObjectContainer(_local5).mouseChildren)))){ _local4 = null; }; }; if (((((!(_local4)) && ((_local5 is InteractiveObject)))) && (InteractiveObject(_local5).mouseEnabled))){ _local4 = InteractiveObject(_local5); }; _local5 = _local5.parent; }; if (_local4){ break; }; }; if (!_local4){ _local4 = _stage; }; var _local7:Point = target.globalToLocal(location); var _local8:Point = _local4.globalToLocal(location); if (((!((lastLocation.x == location.x))) || (!((lastLocation.y == location.y))))){ _local9 = false; if (stage){ _local9 = (((((((location.x >= 0)) && ((location.y >= 0)))) && ((location.x <= stage.stageWidth)))) && ((location.y <= stage.stageHeight))); }; if (((((!(_local9)) && (lastWithinStage))) && (!(disabledEvents[Event.MOUSE_LEAVE])))){ _lastEvent = new eventEvent(Event.MOUSE_LEAVE, false, false); stage.dispatchEvent(_lastEvent); dispatchEvent(_lastEvent); }; if (((_local9) && (!(disabledEvents[MouseEvent.MOUSE_MOVE])))){ _lastEvent = new mouseEventEvent(MouseEvent.MOUSE_MOVE, true, false, _local8.x, _local8.y, _local4, ctrlKey, altKey, shiftKey, _mouseIsDown, delta); _local4.dispatchEvent(_lastEvent); dispatchEvent(_lastEvent); }; lastWithinStage = _local9; }; if (_local4 != target){ if (!disabledEvents[MouseEvent.MOUSE_OUT]){ _lastEvent = new mouseEventEvent(MouseEvent.MOUSE_OUT, true, false, _local7.x, _local7.y, _local4, ctrlKey, altKey, shiftKey, _mouseIsDown, delta); target.dispatchEvent(_lastEvent); dispatchEvent(_lastEvent); }; if (!disabledEvents[MouseEvent.ROLL_OUT]){ _lastEvent = new mouseEventEvent(MouseEvent.ROLL_OUT, false, false, _local7.x, _local7.y, _local4, ctrlKey, altKey, shiftKey, _mouseIsDown, delta); target.dispatchEvent(_lastEvent); dispatchEvent(_lastEvent); }; if (!disabledEvents[MouseEvent.MOUSE_OVER]){ _lastEvent = new mouseEventEvent(MouseEvent.MOUSE_OVER, true, false, _local8.x, _local8.y, target, ctrlKey, altKey, shiftKey, _mouseIsDown, delta); _local4.dispatchEvent(_lastEvent); dispatchEvent(_lastEvent); }; if (!disabledEvents[MouseEvent.ROLL_OVER]){ _lastEvent = new mouseEventEvent(MouseEvent.ROLL_OVER, false, false, _local8.x, _local8.y, target, ctrlKey, altKey, shiftKey, _mouseIsDown, delta); _local4.dispatchEvent(_lastEvent); dispatchEvent(_lastEvent); }; }; if (updateMouseDown){ if (_mouseIsDown){ if (!disabledEvents[MouseEvent.MOUSE_DOWN]){ _lastEvent = new mouseEventEvent(MouseEvent.MOUSE_DOWN, true, false, _local8.x, _local8.y, _local4, ctrlKey, altKey, shiftKey, _mouseIsDown, delta); _local4.dispatchEvent(_lastEvent); dispatchEvent(_lastEvent); }; lastDownTarget = _local4; updateMouseDown = false; } else { if (!disabledEvents[MouseEvent.MOUSE_UP]){ _lastEvent = new mouseEventEvent(MouseEvent.MOUSE_UP, true, false, _local8.x, _local8.y, _local4, ctrlKey, altKey, shiftKey, _mouseIsDown, delta); _local4.dispatchEvent(_lastEvent); dispatchEvent(_lastEvent); }; if (((!(disabledEvents[MouseEvent.CLICK])) && ((_local4 == lastDownTarget)))){ _lastEvent = new mouseEventEvent(MouseEvent.CLICK, true, false, _local8.x, _local8.y, _local4, ctrlKey, altKey, shiftKey, _mouseIsDown, delta); _local4.dispatchEvent(_lastEvent); dispatchEvent(_lastEvent); }; lastDownTarget = null; updateMouseDown = false; }; }; if (((((isDoubleClickEvent) && (!(disabledEvents[MouseEvent.DOUBLE_CLICK])))) && (_local4.doubleClickEnabled))){ _lastEvent = new mouseEventEvent(MouseEvent.DOUBLE_CLICK, true, false, _local8.x, _local8.y, _local4, ctrlKey, altKey, shiftKey, _mouseIsDown, delta); _local4.dispatchEvent(_lastEvent); dispatchEvent(_lastEvent); }; lastLocation = location.clone(); lastMouseDown = _mouseIsDown; target = _local4; } public function getLocation():Point{ return (location.clone()); } public function lock():void{ isLocked = true; } public function get useNativeEvents():Boolean{ return (_useNativeEvents); } public function setLocation(_arg1, _arg2=null):void{ var _local3:Point; if ((_arg1 is Point)){ _local3 = (_arg1 as Point); trace(_local3); location.x = _local3.x; location.y = _local3.y; } else { location.x = Number(_arg1); location.y = Number(_arg2); }; if (!isLocked){ update(); }; } public function unignore(_arg1:DisplayObject):void{ if ((_arg1 in ignoredInstances)){ delete ignoredInstances[_arg1]; }; } public function doubleClick():void{ if (isLocked){ release(); } else { click(); press(); isDoubleClickEvent = true; release(); isDoubleClickEvent = false; }; } public function update():void{ dispatchEvent(new Event(UPDATE, false, false)); } public function unlock():void{ isLocked = false; update(); } public function ignore(_arg1:DisplayObject):void{ ignoredInstances[_arg1] = true; } public function enableEvent(_arg1:String):void{ if ((_arg1 in disabledEvents)){ delete disabledEvents[_arg1]; }; } public function press():void{ updateMouseDown = true; _mouseIsDown = true; if (!isLocked){ update(); }; } public function set useNativeEvents(_arg1:Boolean):void{ if (_arg1 == _useNativeEvents){ return; }; _useNativeEvents = _arg1; if (_useNativeEvents){ eventEvent = VirtualMouseEvent; mouseEventEvent = VirtualMouseMouseEvent; } else { eventEvent = Event; mouseEventEvent = MouseEvent; }; } public function set y(_arg1:Number):void{ location.y = _arg1; if (!isLocked){ update(); }; } public function set stage(_arg1:Stage):void{ var _local2:Boolean; if (_stage){ _local2 = true; _stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyHandler); _stage.removeEventListener(KeyboardEvent.KEY_UP, keyHandler); } else { _local2 = false; }; _stage = _arg1; if (_stage){ _stage.addEventListener(KeyboardEvent.KEY_DOWN, keyHandler); _stage.addEventListener(KeyboardEvent.KEY_UP, keyHandler); target = _stage; if (!_local2){ update(); }; }; } public function get stage():Stage{ return (_stage); } public function get x():Number{ return (location.x); } } }//package org.papervision3d.core.utils.virtualmouse
Section 91
//VirtualMouseEvent (org.papervision3d.core.utils.virtualmouse.VirtualMouseEvent) package org.papervision3d.core.utils.virtualmouse { import flash.events.*; public class VirtualMouseEvent extends Event implements IVirtualMouseEvent { public function VirtualMouseEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){ super(_arg1, _arg2, _arg3); } } }//package org.papervision3d.core.utils.virtualmouse
Section 92
//VirtualMouseMouseEvent (org.papervision3d.core.utils.virtualmouse.VirtualMouseMouseEvent) package org.papervision3d.core.utils.virtualmouse { import flash.events.*; import flash.display.*; public class VirtualMouseMouseEvent extends MouseEvent implements IVirtualMouseEvent { public function VirtualMouseMouseEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Number=NaN, _arg5:Number=NaN, _arg6:InteractiveObject=null, _arg7:Boolean=false, _arg8:Boolean=false, _arg9:Boolean=false, _arg10:Boolean=false, _arg11:int=0){ super(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10, _arg11); } } }//package org.papervision3d.core.utils.virtualmouse
Section 93
//InteractiveSceneManager (org.papervision3d.core.utils.InteractiveSceneManager) package org.papervision3d.core.utils { import flash.events.*; import flash.display.*; import org.papervision3d.core.render.data.*; import flash.geom.*; import org.papervision3d.objects.*; import org.papervision3d.core.proto.*; import org.papervision3d.view.*; import org.papervision3d.core.geom.renderables.*; import com.blitzagency.xray.logger.*; import org.papervision3d.materials.*; import org.papervision3d.events.*; import org.papervision3d.core.utils.virtualmouse.*; public class InteractiveSceneManager extends EventDispatcher { public var currentMaterial:MaterialObject3D; public var container:Sprite; protected var log:XrayLog; public var debug:Boolean;// = false public var mouse3D:Mouse3D; public var enableOverOut:Boolean;// = true public var currentDisplayObject3D:DisplayObject3D; public var virtualMouse:VirtualMouse; public var viewport:Viewport3D; public var renderHitData:RenderHitData; public var currentMouseDO3D:DisplayObject3D;// = null public static var MOUSE_IS_DOWN:Boolean = false; public function InteractiveSceneManager(_arg1:Viewport3D){ virtualMouse = new VirtualMouse(); mouse3D = new Mouse3D(); log = new XrayLog(); super(); this.viewport = _arg1; this.container = _arg1.containerSprite; init(); } protected function handleMouseClick(_arg1:MouseEvent):void{ if ((_arg1 is IVirtualMouseEvent)){ return; }; if (((renderHitData) && (renderHitData.hasHit))){ dispatchObjectEvent(InteractiveScene3DEvent.OBJECT_CLICK, currentDisplayObject3D); }; } protected function initVirtualMouse():void{ virtualMouse.stage = container.stage; virtualMouse.container = container; } public function initListeners():void{ if (viewport.interactive){ container.addEventListener(MouseEvent.MOUSE_DOWN, handleMousePress); container.addEventListener(MouseEvent.MOUSE_UP, handleMouseRelease); container.addEventListener(MouseEvent.CLICK, handleMouseClick); container.stage.addEventListener(MouseEvent.MOUSE_MOVE, handleMouseMove); }; } protected function handleMouseOver(_arg1:DisplayObject3D):void{ dispatchObjectEvent(InteractiveScene3DEvent.OBJECT_OVER, _arg1); } protected function handleMouseMove(_arg1:MouseEvent):void{ var _local2:MovieMaterial; updateRenderHitData(); if ((_arg1 is IVirtualMouseEvent)){ return; }; if (((virtualMouse) && (renderHitData))){ _local2 = (currentMaterial as MovieMaterial); if (_local2){ virtualMouse.container = (_local2.movie as Sprite); }; if (virtualMouse.container){ virtualMouse.setLocation(renderHitData.u, renderHitData.v); }; if (((((Mouse3D.enabled) && (renderHitData))) && (renderHitData.hasHit))){ mouse3D.updatePosition(renderHitData); }; dispatchObjectEvent(InteractiveScene3DEvent.OBJECT_MOVE, currentDisplayObject3D); } else { if (((renderHitData) && (renderHitData.hasHit))){ dispatchObjectEvent(InteractiveScene3DEvent.OBJECT_MOVE, currentDisplayObject3D); }; }; } protected function resolveRenderHitData():void{ var _local1:Point = new Point(); _local1.x = container.mouseX; _local1.y = container.mouseY; renderHitData = (viewport.hitTestPoint2D(_local1) as RenderHitData); } public function updateRenderHitData():void{ resolveRenderHitData(); currentDisplayObject3D = renderHitData.displayObject3D; currentMaterial = renderHitData.material; manageOverOut(); } public function init():void{ if (container){ if (container.stage){ initVirtualMouse(); initListeners(); } else { container.addEventListener(Event.ADDED_TO_STAGE, handleAddedToStage); }; }; } protected function dispatchObjectEvent(_arg1:String, _arg2:DisplayObject3D):void{ var _local3:Number; var _local4:Number; if (debug){ log.debug(_arg1, _arg2.name); }; if (((renderHitData) && (renderHitData.hasHit))){ _local3 = (renderHitData.u) ? renderHitData.u : 0; _local4 = (renderHitData.v) ? renderHitData.v : 0; dispatchEvent(new InteractiveScene3DEvent(_arg1, _arg2, container, (renderHitData.renderable as Triangle3D), _local3, _local4)); _arg2.dispatchEvent(new InteractiveScene3DEvent(_arg1, _arg2, container, (renderHitData.renderable as Triangle3D), _local3, _local4)); } else { dispatchEvent(new InteractiveScene3DEvent(_arg1, _arg2, container)); if (_arg2){ _arg2.dispatchEvent(new InteractiveScene3DEvent(_arg1, _arg2, container)); }; }; } protected function handleMouseRelease(_arg1:MouseEvent):void{ if ((_arg1 is IVirtualMouseEvent)){ return; }; MOUSE_IS_DOWN = false; if (virtualMouse){ virtualMouse.release(); }; if (((((Mouse3D.enabled) && (renderHitData))) && (!((renderHitData.renderable == null))))){ mouse3D.updatePosition(renderHitData); }; if (((renderHitData) && (renderHitData.hasHit))){ dispatchObjectEvent(InteractiveScene3DEvent.OBJECT_RELEASE, currentDisplayObject3D); }; } protected function handleAddedToStage(_arg1:Event):void{ initVirtualMouse(); initListeners(); } protected function handleMouseOut(_arg1:DisplayObject3D):void{ var _local2:MovieMaterial; if (_arg1){ _local2 = (_arg1.material as MovieMaterial); if (_local2){ virtualMouse.exitContainer(); }; }; dispatchObjectEvent(InteractiveScene3DEvent.OBJECT_OUT, _arg1); } protected function manageOverOut():void{ if (!enableOverOut){ return; }; if (((renderHitData) && (renderHitData.hasHit))){ if (((!(currentMouseDO3D)) && (currentDisplayObject3D))){ handleMouseOver(currentDisplayObject3D); currentMouseDO3D = currentDisplayObject3D; } else { if (((currentMouseDO3D) && (!((currentMouseDO3D == currentDisplayObject3D))))){ handleMouseOut(currentMouseDO3D); handleMouseOver(currentDisplayObject3D); currentMouseDO3D = currentDisplayObject3D; }; }; } else { if (currentMouseDO3D != null){ handleMouseOut(currentMouseDO3D); currentMouseDO3D = null; }; }; } public function destroy():void{ viewport = null; renderHitData = null; currentDisplayObject3D = null; currentMaterial = null; currentMouseDO3D = null; container.removeEventListener(MouseEvent.MOUSE_DOWN, handleMousePress); container.removeEventListener(MouseEvent.MOUSE_UP, handleMouseRelease); container.removeEventListener(MouseEvent.CLICK, handleMouseClick); if (container.stage){ container.stage.removeEventListener(MouseEvent.MOUSE_MOVE, handleMouseMove); }; container = null; } protected function handleMousePress(_arg1:MouseEvent):void{ if ((_arg1 is IVirtualMouseEvent)){ return; }; MOUSE_IS_DOWN = true; if (virtualMouse){ virtualMouse.press(); }; if (((((Mouse3D.enabled) && (renderHitData))) && (!((renderHitData.renderable == null))))){ mouse3D.updatePosition(renderHitData); }; if (((renderHitData) && (renderHitData.hasHit))){ dispatchObjectEvent(InteractiveScene3DEvent.OBJECT_PRESS, currentDisplayObject3D); }; } } }//package org.papervision3d.core.utils
Section 94
//Mouse3D (org.papervision3d.core.utils.Mouse3D) package org.papervision3d.core.utils { import org.papervision3d.core.render.data.*; import org.papervision3d.objects.*; import org.papervision3d.core.math.*; import org.papervision3d.core.geom.renderables.*; public class Mouse3D extends DisplayObject3D { private var target:Number3D; private var position:Number3D; public static var enabled:Boolean = false; private static var UP:Number3D = new Number3D(0, 1, 0); public function Mouse3D():void{ position = new Number3D(0, 0, 0); target = new Number3D(); super(); } public function updatePosition(_arg1:RenderHitData):void{ var _local5:Number3D; var _local6:Number3D; var _local7:Matrix3D; var _local2:Triangle3D = (_arg1.renderable as Triangle3D); target.x = _local2.faceNormal.x; target.y = _local2.faceNormal.y; target.z = _local2.faceNormal.z; var _local3:Number3D = Number3D.sub(target, position); _local3.normalize(); if (_local3.modulo > 0.1){ _local5 = Number3D.cross(_local3, UP); _local5.normalize(); _local6 = Number3D.cross(_local3, _local5); _local6.normalize(); _local7 = this.transform; _local7.n11 = _local5.x; _local7.n21 = _local5.y; _local7.n31 = _local5.z; _local7.n12 = -(_local6.x); _local7.n22 = -(_local6.y); _local7.n32 = -(_local6.z); _local7.n13 = _local3.x; _local7.n23 = _local3.y; _local7.n33 = _local3.z; }; var _local4:Matrix3D = Matrix3D.IDENTITY; this.transform = Matrix3D.multiply(_local2.instance.world, _local7); x = _arg1.x; y = _arg1.y; z = _arg1.z; } } }//package org.papervision3d.core.utils
Section 95
//StopWatch (org.papervision3d.core.utils.StopWatch) package org.papervision3d.core.utils { import flash.events.*; import flash.utils.*; public class StopWatch extends EventDispatcher { private var startTime:int; private var elapsedTime:int; private var isRunning:Boolean; private var stopTime:int; public function start():void{ if (!isRunning){ startTime = getTimer(); isRunning = true; }; } public function stop():int{ if (isRunning){ stopTime = getTimer(); elapsedTime = (stopTime - startTime); isRunning = false; return (elapsedTime); }; return (0); } public function reset():void{ isRunning = false; } } }//package org.papervision3d.core.utils
Section 96
//IViewport3D (org.papervision3d.core.view.IViewport3D) package org.papervision3d.core.view { import org.papervision3d.core.render.data.*; public interface IViewport3D { function updateAfterRender(_arg1:RenderSessionData):void; function updateBeforeRender(_arg1:RenderSessionData):void; } }//package org.papervision3d.core.view
Section 97
//InteractiveScene3DEvent (org.papervision3d.events.InteractiveScene3DEvent) package org.papervision3d.events { import flash.events.*; import flash.display.*; import org.papervision3d.core.render.data.*; import org.papervision3d.objects.*; import org.papervision3d.core.geom.renderables.*; public class InteractiveScene3DEvent extends Event { public var y:Number;// = 0 public var sprite:Sprite;// = null public var renderHitData:RenderHitData; public var face3d:Triangle3D;// = null public var x:Number;// = 0 public var displayObject3D:DisplayObject3D;// = null public static const OBJECT_ADDED:String = "objectAdded"; public static const OBJECT_PRESS:String = "mousePress"; public static const OBJECT_RELEASE:String = "mouseRelease"; public static const OBJECT_CLICK:String = "mouseClick"; public static const OBJECT_RELEASE_OUTSIDE:String = "mouseReleaseOutside"; public static const OBJECT_OUT:String = "mouseOut"; public static const OBJECT_MOVE:String = "mouseMove"; public static const OBJECT_OVER:String = "mouseOver"; public function InteractiveScene3DEvent(_arg1:String, _arg2:DisplayObject3D=null, _arg3:Sprite=null, _arg4:Triangle3D=null, _arg5:Number=0, _arg6:Number=0, _arg7:RenderHitData=null, _arg8:Boolean=false, _arg9:Boolean=false){ super(_arg1, _arg8, _arg9); this.displayObject3D = _arg2; this.sprite = _arg3; this.face3d = _arg4; this.x = _arg5; this.y = _arg6; this.renderHitData = _arg7; } override public function toString():String{ return (((((((("Type : " + type) + ", DO3D : ") + displayObject3D) + " Sprite : ") + sprite) + " Face : ") + face3d)); } } }//package org.papervision3d.events
Section 98
//RendererEvent (org.papervision3d.events.RendererEvent) package org.papervision3d.events { import flash.events.*; import org.papervision3d.core.render.data.*; public class RendererEvent extends Event { public var renderSessionData:RenderSessionData; public static const PROJECTION_DONE:String = "projectionDone"; public static const RENDER_DONE:String = "renderDone"; public function RendererEvent(_arg1:String, _arg2:RenderSessionData){ super(_arg1); this.renderSessionData = _arg2; } public function clear():void{ renderSessionData = null; } override public function clone():Event{ return (new RendererEvent(type, renderSessionData)); } } }//package org.papervision3d.events
Section 99
//LineMaterial (org.papervision3d.materials.special.LineMaterial) package org.papervision3d.materials.special { import flash.display.*; import org.papervision3d.core.render.data.*; import org.papervision3d.core.proto.*; import org.papervision3d.core.geom.renderables.*; import org.papervision3d.core.render.draw.*; public class LineMaterial extends MaterialObject3D implements ILineDrawer { public function LineMaterial(_arg1:Number=0xFF0000, _arg2:Number=1){ this.lineColor = _arg1; this.lineAlpha = _arg2; } public function drawLine(_arg1:Line3D, _arg2:Graphics, _arg3:RenderSessionData):void{ _arg2.lineStyle(_arg1.size, lineColor, lineAlpha); _arg2.moveTo(_arg1.v0.vertex3DInstance.x, _arg1.v0.vertex3DInstance.y); if (_arg1.cV){ _arg2.curveTo(_arg1.cV.vertex3DInstance.x, _arg1.cV.vertex3DInstance.y, _arg1.v1.vertex3DInstance.x, _arg1.v1.vertex3DInstance.y); } else { _arg2.lineTo(_arg1.v1.vertex3DInstance.x, _arg1.v1.vertex3DInstance.y); }; _arg2.moveTo(0, 0); _arg2.lineStyle(); } } }//package org.papervision3d.materials.special
Section 100
//ParticleMaterial (org.papervision3d.materials.special.ParticleMaterial) package org.papervision3d.materials.special { import flash.display.*; import org.papervision3d.core.render.data.*; import flash.geom.*; import org.papervision3d.core.proto.*; import org.papervision3d.core.geom.renderables.*; import org.papervision3d.core.render.draw.*; public class ParticleMaterial extends MaterialObject3D implements IParticleDrawer { public var shape:int; public static var SHAPE_SQUARE:int = 0; public static var SHAPE_CIRCLE:int = 1; public function ParticleMaterial(_arg1:Number, _arg2:Number, _arg3:int=0){ this.shape = _arg3; this.fillAlpha = _arg2; this.fillColor = _arg1; } public function drawParticle(_arg1:Particle, _arg2:Graphics, _arg3:RenderSessionData):void{ _arg2.beginFill(fillColor, fillAlpha); var _local4:Rectangle = _arg1.renderRect; if (shape == SHAPE_SQUARE){ _arg2.drawRect(_local4.x, _local4.y, _local4.width, _local4.height); } else { if (shape == SHAPE_CIRCLE){ _arg2.drawCircle((_local4.x + (_local4.width / 2)), (_local4.y + (_local4.width / 2)), (_local4.width / 2)); } else { trace("warning - Particle material has no valid shape - Must be ParticleMaterial.SHAPE_SQUARE or ParticleMaterial.SHAPE_CIRCLE"); }; }; _arg2.endFill(); _arg3.renderStatistics.particles++; } public function updateRenderRect(_arg1:Particle):void{ var _local2:Rectangle = _arg1.renderRect; if (_arg1.size == 0){ _local2.width = 1; _local2.height = 1; } else { _local2.width = (_arg1.renderScale * _arg1.size); _local2.height = (_arg1.renderScale * _arg1.size); }; _local2.x = (_arg1.vertex3D.vertex3DInstance.x - (_local2.width / 2)); _local2.y = (_arg1.vertex3D.vertex3DInstance.y - (_local2.width / 2)); } } }//package org.papervision3d.materials.special
Section 101
//MaterialsList (org.papervision3d.materials.utils.MaterialsList) package org.papervision3d.materials.utils { import org.papervision3d.core.proto.*; import flash.utils.*; public class MaterialsList { protected var _materials:Dictionary; public var materialsByName:Dictionary; private var _materialsTotal:int; public function MaterialsList(_arg1=null):void{ var _local2:String; var _local3:String; super(); this.materialsByName = new Dictionary(true); this._materials = new Dictionary(false); this._materialsTotal = 0; if (_arg1){ if ((_arg1 is Array)){ for (_local2 in _arg1) { this.addMaterial(_arg1[_local2]); }; } else { if ((_arg1 is Object)){ for (_local3 in _arg1) { this.addMaterial(_arg1[_local3], _local3); }; }; }; }; } public function get numMaterials():int{ return (_materialsTotal); } public function addMaterial(_arg1:MaterialObject3D, _arg2:String=null):MaterialObject3D{ _arg2 = ((((_arg2) || (_arg1.name))) || (String(_arg1.id))); this._materials[_arg1] = _arg2; this.materialsByName[_arg2] = _arg1; this._materialsTotal++; return (_arg1); } public function removeMaterial(_arg1:MaterialObject3D):MaterialObject3D{ delete this.materialsByName[this._materials[_arg1]]; delete this._materials[_arg1]; return (_arg1); } public function toString():String{ var _local2:MaterialObject3D; var _local1 = ""; for each (_local2 in this.materialsByName) { _local1 = (_local1 + (this._materials[_local2] + "\n")); }; return (_local1); } public function removeMaterialByName(_arg1:String):MaterialObject3D{ return (removeMaterial(getMaterialByName(_arg1))); } public function clone():MaterialsList{ var _local2:MaterialObject3D; var _local1:MaterialsList = new MaterialsList(); for each (_local2 in this.materialsByName) { _local1.addMaterial(_local2.clone(), this._materials[_local2]); }; return (_local1); } public function getMaterialByName(_arg1:String):MaterialObject3D{ return ((this.materialsByName[_arg1]) ? this.materialsByName[_arg1] : this.materialsByName["all"]); } } }//package org.papervision3d.materials.utils
Section 102
//RenderRecStorage (org.papervision3d.materials.utils.RenderRecStorage) package org.papervision3d.materials.utils { import flash.geom.*; import org.papervision3d.core.geom.renderables.*; public class RenderRecStorage { public var mat:Matrix; public var v0:Vertex3DInstance; public var v1:Vertex3DInstance; public var v2:Vertex3DInstance; public function RenderRecStorage(){ v0 = new Vertex3DInstance(); v1 = new Vertex3DInstance(); v2 = new Vertex3DInstance(); mat = new Matrix(); super(); } } }//package org.papervision3d.materials.utils
Section 103
//BitmapMaterial (org.papervision3d.materials.BitmapMaterial) package org.papervision3d.materials { import flash.display.*; import org.papervision3d.core.render.data.*; import flash.geom.*; import org.papervision3d.core.proto.*; import org.papervision3d.core.geom.renderables.*; import org.papervision3d.materials.utils.*; import flash.utils.*; import org.papervision3d.core.render.draw.*; import org.papervision3d.core.material.*; import org.papervision3d.*; import org.papervision3d.core.math.util.*; public class BitmapMaterial extends TriangleMaterial implements ITriangleDrawer { protected var renderRecStorage:Array; protected var dsbc:Number; private var b2:Number; public var uvMatrices:Dictionary; protected var _precise:Boolean; protected var faz:Number; protected var dsca:Number; private var c2:Number; protected var ax:Number; protected var ay:Number; protected var az:Number; protected var fbz:Number; protected var mcax:Number; protected var mcay:Number; protected var mcaz:Number; private var d2:Number; protected var bx:Number; protected var by:Number; protected var bz:Number; protected var fcz:Number; public var minimumRenderSize:Number;// = 4 protected var dbcx:Number; protected var dbcy:Number; protected var cx:Number; protected var cy:Number; protected var cz:Number; protected var dabx:Number; protected var _perPixelPrecision:int;// = 8 protected var daby:Number; private var x0:Number; private var x1:Number; private var x2:Number; protected var mbcy:Number; protected var mbcz:Number; protected var mbcx:Number; private var y0:Number; protected var focus:Number;// = 200 private var y2:Number; protected var _texture:Object; protected var tempTriangleMatrix:Matrix; private var y1:Number; protected var maby:Number; protected var mabz:Number; protected var dsab:Number; private var a2:Number; protected var dcax:Number; protected var dcay:Number; protected var mabx:Number; protected var _precision:int;// = 8 protected static const DEFAULT_FOCUS:Number = 200; protected static var _triMatrix:Matrix = new Matrix(); protected static var _triMap:Matrix; public static var AUTO_MIP_MAPPING:Boolean = false; public static var MIP_MAP_DEPTH:Number = 8; protected static var hitRect:Rectangle = new Rectangle(); protected static var _localMatrix:Matrix = new Matrix(); public function BitmapMaterial(_arg1:BitmapData=null, _arg2:Boolean=false){ uvMatrices = new Dictionary(); tempTriangleMatrix = new Matrix(); super(); if (_arg1){ texture = _arg1; }; this.precise = _arg2; createRenderRecStorage(); } public function transformUV(_arg1:Triangle3D):Matrix{ var _local2:Array; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Matrix; var _local16:Matrix; if (!_arg1.uv){ Papervision3D.log("MaterialObject3D: transformUV() uv not found!"); } else { if (bitmap){ _local2 = _arg1.uv; _local3 = (bitmap.width * maxU); _local4 = (bitmap.height * maxV); _local5 = (_local3 * _arg1.uv0.u); _local6 = (_local4 * (1 - _arg1.uv0.v)); _local7 = (_local3 * _arg1.uv1.u); _local8 = (_local4 * (1 - _arg1.uv1.v)); _local9 = (_local3 * _arg1.uv2.u); _local10 = (_local4 * (1 - _arg1.uv2.v)); if ((((((_local5 == _local7)) && ((_local6 == _local8)))) || ((((_local5 == _local9)) && ((_local6 == _local10)))))){ _local5 = (_local5 - ((_local5)>0.05) ? 0.05 : -0.05); _local6 = (_local6 - ((_local6)>0.07) ? 0.07 : -0.07); }; if ((((_local9 == _local7)) && ((_local10 == _local8)))){ _local9 = (_local9 - ((_local9)>0.05) ? 0.04 : -0.04); _local10 = (_local10 - ((_local10)>0.06) ? 0.06 : -0.06); }; _local11 = (_local7 - _local5); _local12 = (_local8 - _local6); _local13 = (_local9 - _local5); _local14 = (_local10 - _local6); _local15 = new Matrix(_local11, _local12, _local13, _local14, _local5, _local6); if (Papervision3D.useRIGHTHANDED){ _local15.scale(-1, 1); _local15.translate(_local3, 0); }; _local15.invert(); _local16 = (uvMatrices[_arg1]) ? uvMatrices[_arg1] : uvMatrices[_arg1] = _local15.clone(); _local16.a = _local15.a; _local16.b = _local15.b; _local16.c = _local15.c; _local16.d = _local15.d; _local16.tx = _local15.tx; _local16.ty = _local15.ty; } else { Papervision3D.log("MaterialObject3D: transformUV() material.bitmap not found!"); }; }; return (_local16); } protected function renderRec(_arg1:Graphics, _arg2:Matrix, _arg3:Vertex3DInstance, _arg4:Vertex3DInstance, _arg5:Vertex3DInstance, _arg6:Number, _arg7:RenderSessionData, _arg8:BitmapData):void{ az = _arg3.z; bz = _arg4.z; cz = _arg5.z; if ((((((az <= 0)) && ((bz <= 0)))) && ((cz <= 0)))){ return; }; cx = _arg5.x; cy = _arg5.y; bx = _arg4.x; by = _arg4.y; ax = _arg3.x; ay = _arg3.y; if (_arg7.viewPort.cullingRectangle){ hitRect.x = Math.min(cx, Math.min(bx, ax)); hitRect.width = (Math.max(cx, Math.max(bx, ax)) + Math.abs(hitRect.x)); hitRect.y = Math.min(cy, Math.min(by, ay)); hitRect.height = (Math.max(cy, Math.max(by, ay)) + Math.abs(hitRect.y)); if (!FastRectangleTools.intersects(hitRect, _arg7.viewPort.cullingRectangle)){ return; }; }; if ((((((((_arg6 >= 100)) || ((hitRect.width < minimumRenderSize)))) || ((hitRect.height < minimumRenderSize)))) || ((focus == Infinity)))){ renderTriangleBitmap(_arg1, _arg2, _arg3, _arg4, _arg5, smooth, tiled, _arg8); _arg7.renderStatistics.triangles++; return; }; faz = (focus + az); fbz = (focus + bz); fcz = (focus + cz); mabz = (2 / (faz + fbz)); mbcz = (2 / (fbz + fcz)); mcaz = (2 / (fcz + faz)); mabx = (((ax * faz) + (bx * fbz)) * mabz); maby = (((ay * faz) + (by * fbz)) * mabz); mbcx = (((bx * fbz) + (cx * fcz)) * mbcz); mbcy = (((by * fbz) + (cy * fcz)) * mbcz); mcax = (((cx * fcz) + (ax * faz)) * mcaz); mcay = (((cy * fcz) + (ay * faz)) * mcaz); dabx = ((ax + bx) - mabx); daby = ((ay + by) - maby); dbcx = ((bx + cx) - mbcx); dbcy = ((by + cy) - mbcy); dcax = ((cx + ax) - mcax); dcay = ((cy + ay) - mcay); dsab = ((dabx * dabx) + (daby * daby)); dsbc = ((dbcx * dbcx) + (dbcy * dbcy)); dsca = ((dcax * dcax) + (dcay * dcay)); var _local9:int = (_arg6 + 1); var _local10:RenderRecStorage = RenderRecStorage(renderRecStorage[int(_arg6)]); var _local11:Matrix = _local10.mat; if ((((((dsab <= _precision)) && ((dsca <= _precision)))) && ((dsbc <= _precision)))){ renderTriangleBitmap(_arg1, _arg2, _arg3, _arg4, _arg5, smooth, tiled, _arg8); _arg7.renderStatistics.triangles++; return; }; if ((((((dsab > _precision)) && ((dsca > _precision)))) && ((dsbc > _precision)))){ _local11.a = (_arg2.a * 2); _local11.b = (_arg2.b * 2); _local11.c = (_arg2.c * 2); _local11.d = (_arg2.d * 2); _local11.tx = (_arg2.tx * 2); _local11.ty = (_arg2.ty * 2); _local10.v0.x = (mabx * 0.5); _local10.v0.y = (maby * 0.5); _local10.v0.z = ((az + bz) * 0.5); _local10.v1.x = (mbcx * 0.5); _local10.v1.y = (mbcy * 0.5); _local10.v1.z = ((bz + cz) * 0.5); _local10.v2.x = (mcax * 0.5); _local10.v2.y = (mcay * 0.5); _local10.v2.z = ((cz + az) * 0.5); renderRec(_arg1, _local11, _arg3, _local10.v0, _local10.v2, _local9, _arg7, _arg8); _local11.tx = (_local11.tx - 1); renderRec(_arg1, _local11, _local10.v0, _arg4, _local10.v1, _local9, _arg7, _arg8); _local11.ty = (_local11.ty - 1); _local11.tx = (_arg2.tx * 2); renderRec(_arg1, _local11, _local10.v2, _local10.v1, _arg5, _local9, _arg7, _arg8); _local11.a = (-(_arg2.a) * 2); _local11.b = (-(_arg2.b) * 2); _local11.c = (-(_arg2.c) * 2); _local11.d = (-(_arg2.d) * 2); _local11.tx = ((-(_arg2.tx) * 2) + 1); _local11.ty = ((-(_arg2.ty) * 2) + 1); renderRec(_arg1, _local11, _local10.v1, _local10.v2, _local10.v0, _local9, _arg7, _arg8); return; }; var _local12:Number = Math.max(dsab, Math.max(dsca, dsbc)); if (dsab == _local12){ _local11.a = (_arg2.a * 2); _local11.b = _arg2.b; _local11.c = (_arg2.c * 2); _local11.d = _arg2.d; _local11.tx = (_arg2.tx * 2); _local11.ty = _arg2.ty; _local10.v0.x = (mabx * 0.5); _local10.v0.y = (maby * 0.5); _local10.v0.z = ((az + bz) * 0.5); renderRec(_arg1, _local11, _arg3, _local10.v0, _arg5, _local9, _arg7, _arg8); _local11.a = ((_arg2.a * 2) + _arg2.b); _local11.c = ((2 * _arg2.c) + _arg2.d); _local11.tx = (((_arg2.tx * 2) + _arg2.ty) - 1); renderRec(_arg1, _local11, _local10.v0, _arg4, _arg5, _local9, _arg7, _arg8); return; }; if (dsca == _local12){ _local11.a = _arg2.a; _local11.b = (_arg2.b * 2); _local11.c = _arg2.c; _local11.d = (_arg2.d * 2); _local11.tx = _arg2.tx; _local11.ty = (_arg2.ty * 2); _local10.v2.x = (mcax * 0.5); _local10.v2.y = (mcay * 0.5); _local10.v2.z = ((cz + az) * 0.5); renderRec(_arg1, _local11, _arg3, _arg4, _local10.v2, _local9, _arg7, _arg8); _local11.b = (_local11.b + _arg2.a); _local11.d = (_local11.d + _arg2.c); _local11.ty = (_local11.ty + (_arg2.tx - 1)); renderRec(_arg1, _local11, _local10.v2, _arg4, _arg5, _local9, _arg7, _arg8); return; }; _local11.a = (_arg2.a - _arg2.b); _local11.b = (_arg2.b * 2); _local11.c = (_arg2.c - _arg2.d); _local11.d = (_arg2.d * 2); _local11.tx = (_arg2.tx - _arg2.ty); _local11.ty = (_arg2.ty * 2); _local10.v1.x = (mbcx * 0.5); _local10.v1.y = (mbcy * 0.5); _local10.v1.z = ((bz + cz) * 0.5); renderRec(_arg1, _local11, _arg3, _arg4, _local10.v1, _local9, _arg7, _arg8); _local11.a = (_arg2.a * 2); _local11.b = (_arg2.b - _arg2.a); _local11.c = (_arg2.c * 2); _local11.d = (_arg2.d - _arg2.c); _local11.tx = (_arg2.tx * 2); _local11.ty = (_arg2.ty - _arg2.tx); renderRec(_arg1, _local11, _arg3, _local10.v1, _arg5, _local9, _arg7, _arg8); } protected function createRenderRecStorage():void{ this.renderRecStorage = new Array(); var _local1:int; while (_local1 <= 100) { this.renderRecStorage[_local1] = new RenderRecStorage(); _local1++; }; } public function get texture():Object{ return (this._texture); } public function resetUVS():void{ uvMatrices = new Dictionary(false); } public function set pixelPrecision(_arg1:int):void{ _precision = ((_arg1 * _arg1) * 1.4); _perPixelPrecision = _arg1; } public function set texture(_arg1:Object):void{ if ((_arg1 is BitmapData) == false){ Papervision3D.log("Error: BitmapMaterial.texture requires a BitmapData object for the texture"); return; }; bitmap = createBitmap(BitmapData(_arg1)); _texture = _arg1; } protected function correctBitmap(_arg1:BitmapData):BitmapData{ var _local2:BitmapData; var _local3:Number = (1 << MIP_MAP_DEPTH); var _local4:Number = (_arg1.width / _local3); _local4 = ((_local4 == uint(_local4))) ? _local4 : (uint(_local4) + 1); var _local5:Number = (_arg1.height / _local3); _local5 = ((_local5 == uint(_local5))) ? _local5 : (uint(_local5) + 1); var _local6:Number = (_local3 * _local4); var _local7:Number = (_local3 * _local5); var _local8:Boolean; if (_local6 > 2880){ _local6 = _arg1.width; _local8 = false; }; if (_local7 > 2880){ _local7 = _arg1.height; _local8 = false; }; if (!_local8){ Papervision3D.log((("Material " + this.name) + ": Texture too big for mip mapping. Resizing recommended for better performance and quality.")); }; if (((_arg1) && (((!(((_arg1.width % _local3) == 0))) || (!(((_arg1.height % _local3) == 0))))))){ _local2 = new BitmapData(_local6, _local7, _arg1.transparent, 0); widthOffset = _arg1.width; heightOffset = _arg1.height; this.maxU = (_arg1.width / _local6); this.maxV = (_arg1.height / _local7); _local2.draw(_arg1); extendBitmapEdges(_local2, _arg1.width, _arg1.height); } else { this.maxU = (this.maxV = 1); _local2 = _arg1; }; return (_local2); } protected function createBitmap(_arg1:BitmapData):BitmapData{ var _local2:BitmapData; resetMapping(); if (AUTO_MIP_MAPPING){ _local2 = correctBitmap(_arg1); } else { this.maxU = (this.maxV = 1); _local2 = _arg1; }; return (_local2); } public function get precise():Boolean{ return (_precise); } override public function clone():MaterialObject3D{ var _local1:MaterialObject3D = super.clone(); _local1.maxU = this.maxU; _local1.maxV = this.maxV; return (_local1); } public function resetMapping():void{ uvMatrices = new Dictionary(); } override public function drawTriangle(_arg1:Triangle3D, _arg2:Graphics, _arg3:RenderSessionData, _arg4:BitmapData=null, _arg5:Matrix=null):void{ if (!_precise){ if (lineAlpha){ _arg2.lineStyle(lineThickness, lineColor, lineAlpha); }; if (bitmap){ _triMap = (_arg5) ? _arg5 : ((uvMatrices[_arg1]) || (transformUV(_arg1))); x0 = _arg1.v0.vertex3DInstance.x; y0 = _arg1.v0.vertex3DInstance.y; x1 = _arg1.v1.vertex3DInstance.x; y1 = _arg1.v1.vertex3DInstance.y; x2 = _arg1.v2.vertex3DInstance.x; y2 = _arg1.v2.vertex3DInstance.y; _triMatrix.a = (x1 - x0); _triMatrix.b = (y1 - y0); _triMatrix.c = (x2 - x0); _triMatrix.d = (y2 - y0); _triMatrix.tx = x0; _triMatrix.ty = y0; _localMatrix.a = _triMap.a; _localMatrix.b = _triMap.b; _localMatrix.c = _triMap.c; _localMatrix.d = _triMap.d; _localMatrix.tx = _triMap.tx; _localMatrix.ty = _triMap.ty; _localMatrix.concat(_triMatrix); _arg2.beginBitmapFill((_arg4) ? _arg4 : bitmap, _localMatrix, tiled, smooth); }; _arg2.moveTo(x0, y0); _arg2.lineTo(x1, y1); _arg2.lineTo(x2, y2); _arg2.lineTo(x0, y0); if (bitmap){ _arg2.endFill(); }; if (lineAlpha){ _arg2.lineStyle(); }; _arg3.renderStatistics.triangles++; } else { _triMap = (_arg5) ? _arg5 : ((uvMatrices[_arg1]) || (transformUV(_arg1))); focus = _arg3.camera.focus; renderRec(_arg2, _triMap, _arg1.v0.vertex3DInstance, _arg1.v1.vertex3DInstance, _arg1.v2.vertex3DInstance, 0, _arg3, (_arg4) ? _arg4 : bitmap); }; } public function get precision():int{ return (_precision); } public function renderTriangleBitmap(_arg1:Graphics, _arg2:Matrix, _arg3:Vertex3DInstance, _arg4:Vertex3DInstance, _arg5:Vertex3DInstance, _arg6:Boolean, _arg7:Boolean, _arg8:BitmapData):void{ a2 = (_arg4.x - _arg3.x); b2 = (_arg4.y - _arg3.y); c2 = (_arg5.x - _arg3.x); d2 = (_arg5.y - _arg3.y); tempTriangleMatrix.a = ((_arg2.a * a2) + (_arg2.b * c2)); tempTriangleMatrix.b = ((_arg2.a * b2) + (_arg2.b * d2)); tempTriangleMatrix.c = ((_arg2.c * a2) + (_arg2.d * c2)); tempTriangleMatrix.d = ((_arg2.c * b2) + (_arg2.d * d2)); tempTriangleMatrix.tx = (((_arg2.tx * a2) + (_arg2.ty * c2)) + _arg3.x); tempTriangleMatrix.ty = (((_arg2.tx * b2) + (_arg2.ty * d2)) + _arg3.y); _arg1.beginBitmapFill(_arg8, tempTriangleMatrix, _arg7, _arg6); _arg1.moveTo(_arg3.x, _arg3.y); _arg1.lineTo(_arg4.x, _arg4.y); _arg1.lineTo(_arg5.x, _arg5.y); _arg1.endFill(); } override public function toString():String{ return (((((("Texture:" + this.texture) + " lineColor:") + this.lineColor) + " lineAlpha:") + this.lineAlpha)); } override public function copy(_arg1:MaterialObject3D):void{ super.copy(_arg1); this.maxU = _arg1.maxU; this.maxV = _arg1.maxV; } public function get pixelPrecision():int{ return (_perPixelPrecision); } public function set precise(_arg1:Boolean):void{ _precise = _arg1; } protected function extendBitmapEdges(_arg1:BitmapData, _arg2:Number, _arg3:Number):void{ var _local6:int; var _local4:Rectangle = new Rectangle(); var _local5:Point = new Point(); if (_arg1.width > _arg2){ _local4.x = (_arg2 - 1); _local4.y = 0; _local4.width = 1; _local4.height = _arg3; _local5.y = 0; _local6 = _arg2; while (_local6 < _arg1.width) { _local5.x = _local6; _arg1.copyPixels(_arg1, _local4, _local5); _local6++; }; }; if (_arg1.height > _arg3){ _local4.x = 0; _local4.y = (_arg3 - 1); _local4.width = _arg1.width; _local4.height = 1; _local5.x = 0; _local6 = _arg3; while (_local6 < _arg1.height) { _local5.y = _local6; _arg1.copyPixels(_arg1, _local4, _local5); _local6++; }; }; } override public function destroy():void{ super.destroy(); if (uvMatrices){ uvMatrices = null; }; if (bitmap){ bitmap.dispose(); }; this.renderRecStorage = null; } public function set precision(_arg1:int):void{ _precision = _arg1; } } }//package org.papervision3d.materials
Section 104
//MovieMaterial (org.papervision3d.materials.MovieMaterial) package org.papervision3d.materials { import flash.display.*; import org.papervision3d.core.render.data.*; import flash.geom.*; import org.papervision3d.core.render.material.*; import org.papervision3d.core.render.draw.*; import org.papervision3d.*; public class MovieMaterial extends BitmapMaterial implements ITriangleDrawer, IUpdateBeforeMaterial { public var movieTransparent:Boolean; private var stage:Stage; private var userClipRect:Rectangle; private var autoClipRect:Rectangle; public var allowAutoResize:Boolean;// = true public var movie:DisplayObject; private var movieAnimated:Boolean; private var quality:String; public function MovieMaterial(_arg1:DisplayObject=null, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Boolean=false, _arg5:Rectangle=null){ movieTransparent = _arg2; this.animated = _arg3; this.precise = _arg4; userClipRect = _arg5; if (_arg1){ texture = _arg1; }; } public function set animated(_arg1:Boolean):void{ movieAnimated = _arg1; } public function set rect(_arg1:Rectangle):void{ userClipRect = _arg1; createBitmapFromSprite(movie); } public function drawBitmap():void{ var _local3:String; bitmap.fillRect(bitmap.rect, fillColor); if (((stage) && (quality))){ _local3 = stage.quality; stage.quality = quality; }; var _local1:Rectangle = rect; var _local2:Matrix = new Matrix(1, 0, 0, 1, -(_local1.x), -(_local1.y)); bitmap.draw(movie, _local2, movie.transform.colorTransform, null); if (!userClipRect){ autoClipRect = movie.getBounds(movie); }; if (((stage) && (quality))){ stage.quality = _local3; }; } override public function get texture():Object{ return (this._texture); } public function updateBeforeRender(_arg1:RenderSessionData):void{ var _local2:int; var _local3:int; var _local4:Boolean; if (movieAnimated){ if (userClipRect){ _local2 = int((userClipRect.width + 0.5)); _local3 = int((userClipRect.height + 0.5)); } else { _local2 = int((movie.width + 0.5)); _local3 = int((movie.height + 0.5)); }; if (((allowAutoResize) && (((!((_local2 == bitmap.width))) || (!((_local3 == bitmap.height))))))){ initBitmap(movie); _local4 = true; }; drawBitmap(); if (_local4){ bitmap = super.createBitmap(bitmap); }; }; } protected function initBitmap(_arg1:DisplayObject):void{ if (bitmap){ bitmap.dispose(); }; if (userClipRect){ bitmap = new BitmapData(int((userClipRect.width + 0.5)), int((userClipRect.height + 0.5)), movieTransparent, fillColor); } else { if ((((_arg1.width == 0)) || ((_arg1.height == 0)))){ bitmap = new BitmapData(0x0100, 0x0100, movieTransparent, fillColor); } else { bitmap = new BitmapData(int((_arg1.width + 0.5)), int((_arg1.height + 0.5)), movieTransparent, fillColor); }; }; } public function get animated():Boolean{ return (movieAnimated); } public function get rect():Rectangle{ var _local1:Rectangle = ((userClipRect) || (autoClipRect)); if (((!(_local1)) && (movie))){ _local1 = movie.getBounds(movie); }; return (_local1); } override public function set texture(_arg1:Object):void{ if ((_arg1 is DisplayObject) == false){ Papervision3D.log("Error: MovieMaterial.texture requires a Sprite to be passed as the object"); return; }; bitmap = createBitmapFromSprite(DisplayObject(_arg1)); _texture = _arg1; } protected function createBitmapFromSprite(_arg1:DisplayObject):BitmapData{ movie = _arg1; initBitmap(movie); drawBitmap(); bitmap = super.createBitmap(bitmap); return (bitmap); } public function setQuality(_arg1:String, _arg2:Stage, _arg3:Boolean=true):void{ this.quality = _arg1; this.stage = _arg2; if (_arg3){ createBitmapFromSprite(movie); }; } } }//package org.papervision3d.materials
Section 105
//WireframeMaterial (org.papervision3d.materials.WireframeMaterial) package org.papervision3d.materials { import flash.display.*; import org.papervision3d.core.render.data.*; import flash.geom.*; import org.papervision3d.core.geom.renderables.*; import org.papervision3d.core.render.draw.*; import org.papervision3d.core.material.*; public class WireframeMaterial extends TriangleMaterial implements ITriangleDrawer { public function WireframeMaterial(_arg1:Number=0xFF00FF, _arg2:Number=100, _arg3:Number=0){ this.lineColor = _arg1; this.lineAlpha = _arg2; this.lineThickness = _arg3; this.doubleSided = false; } override public function toString():String{ return (((("WireframeMaterial - color:" + this.lineColor) + " alpha:") + this.lineAlpha)); } override public function drawTriangle(_arg1:Triangle3D, _arg2:Graphics, _arg3:RenderSessionData, _arg4:BitmapData=null, _arg5:Matrix=null):void{ var _local6:Number = _arg1.v0.vertex3DInstance.x; var _local7:Number = _arg1.v0.vertex3DInstance.y; if (lineAlpha){ _arg2.lineStyle(lineThickness, lineColor, lineAlpha); _arg2.moveTo(_local6, _local7); _arg2.lineTo(_arg1.v1.vertex3DInstance.x, _arg1.v1.vertex3DInstance.y); _arg2.lineTo(_arg1.v2.vertex3DInstance.x, _arg1.v2.vertex3DInstance.y); _arg2.lineTo(_local6, _local7); _arg2.lineStyle(); _arg3.renderStatistics.triangles++; }; } } }//package org.papervision3d.materials
Section 106
//Cube (org.papervision3d.objects.primitives.Cube) package org.papervision3d.objects.primitives { import org.papervision3d.core.proto.*; import org.papervision3d.core.math.*; import org.papervision3d.core.geom.renderables.*; import org.papervision3d.materials.utils.*; import org.papervision3d.core.geom.*; import org.papervision3d.*; public class Cube extends TriangleMesh3D { public var segments:Number3D; private var insideFaces:int; private var excludeFaces:int; public static var ALL:int = (((((FRONT + BACK) + RIGHT) + LEFT) + TOP) + BOTTOM); public static var LEFT:int = 8; public static var FRONT:int = 1; public static var BOTTOM:int = 32; public static var TOP:int = 16; public static var BACK:int = 2; public static var NONE:int = 0; public static var RIGHT:int = 4; public function Cube(_arg1:MaterialsList, _arg2:Number=500, _arg3:Number=500, _arg4:Number=500, _arg5:int=1, _arg6:int=1, _arg7:int=1, _arg8:int=0, _arg9:int=0){ super(_arg1.getMaterialByName("all"), new Array(), new Array(), null); this.materials = _arg1; this.insideFaces = _arg8; this.excludeFaces = _arg9; segments = new Number3D(_arg5, _arg6, _arg7); buildCube(_arg2, _arg4, _arg3); } private function buildCube(_arg1:Number, _arg2:Number, _arg3:Number):void{ var _local4:Number = (_arg1 / 2); var _local5:Number = (_arg2 / 2); var _local6:Number = (_arg3 / 2); if (!(excludeFaces & FRONT)){ buildPlane("front", "x", "y", _arg1, _arg2, _local6, !(Boolean((insideFaces & FRONT)))); }; if (!(excludeFaces & BACK)){ buildPlane("back", "x", "y", _arg1, _arg2, -(_local6), Boolean((insideFaces & BACK))); }; if (!(excludeFaces & RIGHT)){ buildPlane("right", "z", "y", _arg3, _arg2, _local4, Boolean((insideFaces & RIGHT))); }; if (!(excludeFaces & LEFT)){ buildPlane("left", "z", "y", _arg3, _arg2, -(_local4), !(Boolean((insideFaces & LEFT)))); }; if (!(excludeFaces & TOP)){ buildPlane("top", "x", "z", _arg1, _arg3, _local5, Boolean((insideFaces & TOP))); }; if (!(excludeFaces & BOTTOM)){ buildPlane("bottom", "x", "z", _arg1, _arg3, -(_local5), !(Boolean((insideFaces & BOTTOM)))); }; mergeVertices(); this.geometry.ready = true; if (Papervision3D.useRIGHTHANDED){ this.geometry.flipFaces(); }; } private function buildPlane(_arg1:String, _arg2:String, _arg3:String, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Boolean=false):void{ var _local8:MaterialObject3D; var _local9:String; var _local23:NumberUV; var _local24:NumberUV; var _local25:NumberUV; var _local26:int; var _local27:Vertex3D; var _local28:Vertex3D; var _local29:Vertex3D; var _local30:Vertex3D; _local8 = materials.getMaterialByName(_arg1); if (!_local8){ _local8 = materials.getMaterialByName("all"); if (!_local8){ Papervision3D.log("Cube: Required material not found in given materials list. Supported materials are: front, back, right, left, top, bottom & all."); return; }; }; if ((((((_arg2 == "x")) && ((_arg3 == "y")))) || ((((_arg2 == "y")) && ((_arg3 == "x")))))){ _local9 = "z"; } else { if ((((((_arg2 == "x")) && ((_arg3 == "z")))) || ((((_arg2 == "z")) && ((_arg3 == "x")))))){ _local9 = "y"; } else { if ((((((_arg2 == "z")) && ((_arg3 == "y")))) || ((((_arg2 == "y")) && ((_arg3 == "z")))))){ _local9 = "x"; }; }; }; var _local10:Number = (_arg7) ? -1 : 1; var _local11:Number = this.segments[_arg2]; var _local12:Number = this.segments[_arg3]; var _local13:Number = (_local11 + 1); var _local14:Number = (_local12 + 1); var _local15:Array = this.geometry.vertices; var _local16:Array = this.geometry.faces; var _local17:Array = new Array(); var _local18:Number = (_arg4 / 2); var _local19:Number = (_arg5 / 2); var _local20:Number = (_arg4 / _local11); var _local21:Number = (_arg5 / _local12); var _local22:int; while (_local22 < _local13) { _local26 = 0; while (_local26 < _local14) { _local27 = new Vertex3D(); _local27[_arg2] = (((_local22 * _local20) - _local18) * _local10); _local27[_arg3] = ((_local26 * _local21) - _local19); _local27[_local9] = _arg6; _local15.push(_local27); _local17.push(_local27); _local26++; }; _local22++; }; _local22 = 0; while (_local22 < _local11) { _local26 = 0; while (_local26 < _local12) { _local28 = _local17[((_local22 * _local14) + _local26)]; _local29 = _local17[((_local22 * _local14) + (_local26 + 1))]; _local30 = _local17[(((_local22 + 1) * _local14) + _local26)]; _local23 = new NumberUV((_local22 / _local11), (_local26 / _local12)); _local24 = new NumberUV((_local22 / _local11), ((_local26 + 1) / _local12)); _local25 = new NumberUV(((_local22 + 1) / _local11), (_local26 / _local12)); _local16.push(new Triangle3D(this, [_local28, _local30, _local29], _local8, [_local23, _local25, _local24])); _local28 = _local17[(((_local22 + 1) * _local14) + (_local26 + 1))]; _local29 = _local17[(((_local22 + 1) * _local14) + _local26)]; _local30 = _local17[((_local22 * _local14) + (_local26 + 1))]; _local23 = new NumberUV(((_local22 + 1) / _local11), ((_local26 + 1) / _local12)); _local24 = new NumberUV(((_local22 + 1) / _local11), (_local26 / _local12)); _local25 = new NumberUV((_local22 / _local11), ((_local26 + 1) / _local12)); _local16.push(new Triangle3D(this, [_local29, _local28, _local30], _local8, [_local24, _local23, _local25])); _local26++; }; _local22++; }; } } }//package org.papervision3d.objects.primitives
Section 107
//DisplayObject3D (org.papervision3d.objects.DisplayObject3D) package org.papervision3d.objects { import org.papervision3d.core.render.data.*; import org.papervision3d.view.layer.*; import org.papervision3d.core.culling.*; import org.papervision3d.core.proto.*; import org.papervision3d.view.*; import org.papervision3d.core.math.*; import org.papervision3d.core.data.*; import org.papervision3d.materials.utils.*; import org.papervision3d.*; public class DisplayObject3D extends DisplayObjectContainer3D { public var extra:Object; public var frustumTestMethod:int;// = 0 private var _rotationX:Number; private var _rotationY:Number; private var _rotationZ:Number; private var position:Number3D; public var meshSort:uint;// = 1 public var materials:MaterialsList; public var id:int; private var xAxis:Number3D; private var zAxis:Number3D; private var _scaleDirty:Boolean;// = false private var _numClones:uint;// = 0 public var alpha:Number;// = 1 public var screen:Number3D; private var _scaleX:Number; private var _scaleY:Number; private var _scaleZ:Number; public var visible:Boolean; public var transform:Matrix3D; protected var _userData:UserData; public var screenZ:Number; public var container:ViewportLayer; protected var _useOwnContainer:Boolean;// = false private var _material:MaterialObject3D; public var geometry:GeometryObject3D; public var name:String; protected var _scene:SceneObject3D;// = null private var target:Number3D; public var world:Matrix3D; public var blendMode:String;// = "normal" public var culled:Boolean; public var view:Matrix3D; public var parent:DisplayObjectContainer3D; private var yAxis:Number3D; public var faces:Array; public var flipLightDirection:Boolean;// = false private var _rotation:Number3D; protected var _sorted:Array; protected var _transformDirty:Boolean;// = false private var _rotationDirty:Boolean;// = false public var parentContainer:DisplayObject3D; public var filters:Array; private static const LEFT:Number3D = new Number3D(-1, 0, 0); public static const MESH_SORT_CLOSE:uint = 3; public static const MESH_SORT_CENTER:uint = 1; private static const BACKWARD:Number3D = new Number3D(0, 0, -1); private static const FORWARD:Number3D = new Number3D(0, 0, 1); public static const MESH_SORT_FAR:uint = 2; private static const DOWN:Number3D = new Number3D(0, -1, 0); private static const UP:Number3D = new Number3D(0, 1, 0); private static const RIGHT:Number3D = new Number3D(1, 0, 0); private static var entry_count:uint = 0; private static var _totalDisplayObjects:int = 0; private static var _tempMatrix:Matrix3D = Matrix3D.IDENTITY; public static var sortedArray:Array = new Array(); private static var _tempQuat:Quaternion = new Quaternion(); private static var toDEGREES:Number = 57.2957795130823; public static var faceLevelMode:Boolean; private static var toRADIANS:Number = 0.0174532925199433; public function DisplayObject3D(_arg1:String=null, _arg2:GeometryObject3D=null):void{ position = Number3D.ZERO; target = Number3D.ZERO; zAxis = Number3D.ZERO; xAxis = Number3D.ZERO; yAxis = Number3D.ZERO; _rotation = Number3D.ZERO; filters = []; screen = new Number3D(); faces = new Array(); super(); if (_arg1 != null){ Papervision3D.log(("DisplayObject3D: " + _arg1)); }; this.culled = false; this.transform = Matrix3D.IDENTITY; this.world = Matrix3D.IDENTITY; this.view = Matrix3D.IDENTITY; this.x = 0; this.y = 0; this.z = 0; rotationX = 0; rotationY = 0; rotationZ = 0; var _local3:Number = (Papervision3D.usePERCENT) ? 100 : 1; scaleX = _local3; scaleY = _local3; scaleZ = _local3; this.visible = true; this.id = _totalDisplayObjects++; this.name = ((_arg1) || (String(this.id))); _numClones = 0; if (_arg2){ addGeometry(_arg2); }; } override public function addChild(_arg1:DisplayObject3D, _arg2:String=null):DisplayObject3D{ _arg1 = super.addChild(_arg1, _arg2); if (_arg1.scene == null){ _arg1.scene = scene; }; if (this.useOwnContainer){ _arg1.parentContainer = this; }; return (_arg1); } public function moveDown(_arg1:Number):void{ translate(_arg1, DOWN); } public function set scene(_arg1:SceneObject3D):void{ var _local2:DisplayObject3D; _scene = _arg1; for each (_local2 in this._childrenByName) { if (_local2.scene == null){ _local2.scene = _scene; }; }; } public function project(_arg1:DisplayObject3D, _arg2:RenderSessionData):Number{ var _local5:DisplayObject3D; if (this._transformDirty){ updateTransform(); }; this.world.calculateMultiply(_arg1.world, this.transform); if (_arg2.camera.frustum){ if (this === _arg2.camera){ this.culled = true; } else { this.culled = (_arg2.camera.frustum.testObject(this) < 0); }; if (this.culled){ _arg2.renderStatistics.culledObjects++; return (0); }; if (_arg1 !== _arg2.camera){ this.view.calculateMultiply(_arg1.view, this.transform); }; } else { if ((_arg2.camera is IObjectCuller)){ if (this === _arg2.camera){ this.culled = true; } else { this.culled = (IObjectCuller(_arg2.camera).testObject(this) < 0); }; if (this.culled){ _arg2.renderStatistics.culledObjects++; return (0); }; if (_arg1 !== _arg2.camera){ this.view.calculateMultiply4x4(_arg1.view, this.transform); }; } else { if (_arg1 !== _arg2.camera){ this.view.calculateMultiply(_arg1.view, this.transform); }; }; }; calculateScreenCoords(_arg2.camera); var _local3:Number = 0; var _local4:Number = 0; for each (_local5 in this._childrenByName) { if (_local5.visible){ _local3 = (_local3 + _local5.project(this, _arg2)); _local4++; }; }; return ((this.screenZ = (_local3 / _local4))); } public function get material():MaterialObject3D{ return (_material); } public function get userData():UserData{ return (_userData); } public function calculateScreenCoords(_arg1:CameraObject3D):void{ var _local2:Number = ((_arg1.focus * _arg1.zoom) / (_arg1.focus + view.n34)); screen.x = (view.n14 * _local2); screen.y = (view.n24 * _local2); screen.z = view.n34; } public function lookAt(_arg1:DisplayObject3D, _arg2:Number3D=null):void{ var _local3:Matrix3D; position.reset(this.x, this.y, this.z); target.reset(_arg1.x, _arg1.y, _arg1.z); zAxis.copyFrom(target); zAxis.minusEq(position); zAxis.normalize(); if (zAxis.modulo > 0.1){ xAxis = Number3D.cross(zAxis, ((_arg2) || (UP)), xAxis); xAxis.normalize(); yAxis = Number3D.cross(zAxis, xAxis, yAxis); yAxis.normalize(); _local3 = this.transform; _local3.n11 = (xAxis.x * _scaleX); _local3.n21 = (xAxis.y * _scaleX); _local3.n31 = (xAxis.z * _scaleX); _local3.n12 = (-(yAxis.x) * _scaleY); _local3.n22 = (-(yAxis.y) * _scaleY); _local3.n32 = (-(yAxis.z) * _scaleY); _local3.n13 = (zAxis.x * _scaleZ); _local3.n23 = (zAxis.y * _scaleZ); _local3.n33 = (zAxis.z * _scaleZ); this._transformDirty = false; this._rotationDirty = true; } else { trace("lookAt error"); }; } public function set rotationX(_arg1:Number):void{ this._rotationX = (Papervision3D.useDEGREES) ? (-(_arg1) * toRADIANS) : -(_arg1); this._transformDirty = true; } protected function setParentContainer(_arg1:DisplayObject3D, _arg2:Boolean=true):void{ var _local3:DisplayObject3D; if (((_arg2) && (!((_arg1 == this))))){ parentContainer = _arg1; }; for each (_local3 in children) { _local3.setParentContainer(_arg1, _arg2); }; } public function set rotationY(_arg1:Number):void{ this._rotationY = (Papervision3D.useDEGREES) ? (-(_arg1) * toRADIANS) : -(_arg1); this._transformDirty = true; } public function set rotationZ(_arg1:Number):void{ this._rotationZ = (Papervision3D.useDEGREES) ? (-(_arg1) * toRADIANS) : -(_arg1); this._transformDirty = true; } public function pitch(_arg1:Number):void{ _arg1 = (Papervision3D.useDEGREES) ? (_arg1 * toRADIANS) : _arg1; var _local2:Number3D = RIGHT.clone(); if (this._transformDirty){ updateTransform(); }; Matrix3D.rotateAxis(transform, _local2); _tempMatrix = Matrix3D.rotationMatrix(_local2.x, _local2.y, _local2.z, _arg1, _tempMatrix); this.transform.calculateMultiply3x3(_tempMatrix, transform); this._rotationDirty = true; } public function get scale():Number{ if ((((this._scaleX == this._scaleY)) && ((this._scaleX == this._scaleZ)))){ if (Papervision3D.usePERCENT){ return ((this._scaleX * 100)); }; return (this._scaleX); //unresolved jump }; return (NaN); } public function addGeometry(_arg1:GeometryObject3D=null):void{ if (_arg1){ this.geometry = _arg1; }; } public function get sceneX():Number{ return (this.world.n14); } public function get sceneY():Number{ return (this.world.n24); } public function get scaleX():Number{ if (Papervision3D.usePERCENT){ return ((this._scaleX * 100)); }; return (this._scaleX); } public function get scaleY():Number{ if (Papervision3D.usePERCENT){ return ((this._scaleY * 100)); }; return (this._scaleY); } public function get scaleZ():Number{ if (Papervision3D.usePERCENT){ return ((this._scaleZ * 100)); }; return (this._scaleZ); } public function moveUp(_arg1:Number):void{ translate(_arg1, UP); } public function get sceneZ():Number{ return (this.world.n34); } public function distanceTo(_arg1:DisplayObject3D):Number{ var _local2:Number = (this.x - _arg1.x); var _local3:Number = (this.y - _arg1.y); var _local4:Number = (this.z - _arg1.z); return (Math.sqrt((((_local2 * _local2) + (_local3 * _local3)) + (_local4 * _local4)))); } public function set userData(_arg1:UserData):void{ _userData = _arg1; } public function clone():DisplayObject3D{ var _local3:DisplayObject3D; var _local1:String = ((this.name + "_") + _numClones++); var _local2:DisplayObject3D = new DisplayObject3D(_local1); if (this.material){ _local2.material = this.material; }; if (this.materials){ _local2.materials = this.materials.clone(); }; if (this.geometry){ _local2.geometry = this.geometry.clone(_local2); _local2.geometry.ready = true; }; _local2.copyTransform(this.transform); for each (_local3 in this.children) { _local2.addChild(_local3.clone()); }; return (_local2); } public function set material(_arg1:MaterialObject3D):void{ if (_material){ _material.unregisterObject(this); }; _material = _arg1; _material.registerObject(this); } private function updateRotation():void{ _rotation = Matrix3D.matrix2euler(this.transform, _rotation); this._rotationX = (_rotation.x * toRADIANS); this._rotationY = (_rotation.y * toRADIANS); this._rotationZ = (_rotation.z * toRADIANS); this._rotationDirty = false; } public function hitTestObject(_arg1:DisplayObject3D, _arg2:Number=1):Boolean{ var _local3:Number = (this.x - _arg1.x); var _local4:Number = (this.y - _arg1.y); var _local5:Number = (this.z - _arg1.z); var _local6:Number = (((_local3 * _local3) + (_local4 * _local4)) + (_local5 * _local5)); var _local7:Number = (this.geometry) ? this.geometry.boundingSphere.maxDistance : 0; var _local8:Number = (_arg1.geometry) ? _arg1.geometry.boundingSphere.maxDistance : 0; _local7 = (_local7 * _arg2); return (((_local7 + _local8) > _local6)); } public function translate(_arg1:Number, _arg2:Number3D):void{ var _local3:Number3D = _arg2.clone(); if (this._transformDirty){ updateTransform(); }; Matrix3D.rotateAxis(transform, _local3); this.x = (this.x + (_arg1 * _local3.x)); this.y = (this.y + (_arg1 * _local3.y)); this.z = (this.z + (_arg1 * _local3.z)); } public function copyTransform(_arg1):void{ var _local2:Matrix3D = this.transform; var _local3:Matrix3D = ((_arg1 is DisplayObject3D)) ? _arg1.transform : _arg1; _local2.n11 = _local3.n11; _local2.n12 = _local3.n12; _local2.n13 = _local3.n13; _local2.n14 = _local3.n14; _local2.n21 = _local3.n21; _local2.n22 = _local3.n22; _local2.n23 = _local3.n23; _local2.n24 = _local3.n24; _local2.n31 = _local3.n31; _local2.n32 = _local3.n32; _local2.n33 = _local3.n33; _local2.n34 = _local3.n34; this._transformDirty = false; this._rotationDirty = true; } public function get x():Number{ return (this.transform.n14); } public function get z():Number{ return (this.transform.n34); } public function roll(_arg1:Number):void{ _arg1 = (Papervision3D.useDEGREES) ? (_arg1 * toRADIANS) : _arg1; var _local2:Number3D = FORWARD.clone(); if (this._transformDirty){ updateTransform(); }; Matrix3D.rotateAxis(transform, _local2); _tempMatrix = Matrix3D.rotationMatrix(_local2.x, _local2.y, _local2.z, _arg1, _tempMatrix); this.transform.calculateMultiply3x3(_tempMatrix, transform); this._rotationDirty = true; } public function yaw(_arg1:Number):void{ _arg1 = (Papervision3D.useDEGREES) ? (_arg1 * toRADIANS) : _arg1; var _local2:Number3D = UP.clone(); if (this._transformDirty){ updateTransform(); }; Matrix3D.rotateAxis(transform, _local2); _tempMatrix = Matrix3D.rotationMatrix(_local2.x, _local2.y, _local2.z, _arg1, _tempMatrix); this.transform.calculateMultiply3x3(_tempMatrix, transform); this._rotationDirty = true; } public function getMaterialByName(_arg1:String):MaterialObject3D{ var _local3:DisplayObject3D; var _local2:MaterialObject3D = (this.materials) ? this.materials.getMaterialByName(_arg1) : null; if (_local2){ return (_local2); }; for each (_local3 in this._childrenByName) { _local2 = _local3.getMaterialByName(_arg1); if (_local2){ return (_local2); }; }; return (null); } public function get y():Number{ return (this.transform.n24); } public function set useOwnContainer(_arg1:Boolean):void{ _useOwnContainer = _arg1; setParentContainer(this, true); } public function moveLeft(_arg1:Number):void{ translate(_arg1, LEFT); } public function get scene():SceneObject3D{ return (_scene); } public function get rotationX():Number{ if (this._rotationDirty){ updateRotation(); }; return ((Papervision3D.useDEGREES) ? (-(this._rotationX) * toDEGREES) : -(this._rotationX)); } public function get rotationY():Number{ if (this._rotationDirty){ updateRotation(); }; return ((Papervision3D.useDEGREES) ? (-(this._rotationY) * toDEGREES) : -(this._rotationY)); } public function get rotationZ():Number{ if (this._rotationDirty){ updateRotation(); }; return ((Papervision3D.useDEGREES) ? (-(this._rotationZ) * toDEGREES) : -(this._rotationZ)); } public function set scaleY(_arg1:Number):void{ if (Papervision3D.usePERCENT){ this._scaleY = (_arg1 / 100); } else { this._scaleY = _arg1; }; this._transformDirty = true; } public function set scaleZ(_arg1:Number):void{ if (Papervision3D.usePERCENT){ this._scaleZ = (_arg1 / 100); } else { this._scaleZ = _arg1; }; this._transformDirty = true; } public function set scaleX(_arg1:Number):void{ if (Papervision3D.usePERCENT){ this._scaleX = (_arg1 / 100); } else { this._scaleX = _arg1; }; this._transformDirty = true; } public function createViewportLayer(_arg1:Viewport3D, _arg2:Boolean=true):ViewportLayer{ var _local3:ViewportLayer = _arg1.getChildLayer(this, true); if (_arg2){ addChildrenToLayer(this, _local3); }; return (_local3); } protected function updateTransform():void{ _tempQuat = Matrix3D.euler2quaternion(-(this._rotationY), -(this._rotationZ), this._rotationX, _tempQuat); _tempMatrix = Matrix3D.quaternion2matrix(_tempQuat.x, _tempQuat.y, _tempQuat.z, _tempQuat.w, _tempMatrix); var _local1:Matrix3D = this.transform; _tempMatrix.n14 = _local1.n14; _tempMatrix.n24 = _local1.n24; _tempMatrix.n34 = _local1.n34; _local1.copy(_tempMatrix); _tempMatrix.reset(); _tempMatrix.n11 = this._scaleX; _tempMatrix.n22 = this._scaleY; _tempMatrix.n33 = this._scaleZ; this.transform.calculateMultiply(_local1, _tempMatrix); this._transformDirty = false; } public function moveForward(_arg1:Number):void{ translate(_arg1, FORWARD); } public function set scale(_arg1:Number):void{ if (Papervision3D.usePERCENT){ _arg1 = (_arg1 / 100); }; this._scaleX = (this._scaleY = (this._scaleZ = _arg1)); this._transformDirty = true; } public function copyPosition(_arg1):void{ var _local2:Matrix3D = this.transform; var _local3:Matrix3D = ((_arg1 is DisplayObject3D)) ? _arg1.transform : _arg1; _local2.n14 = _local3.n14; _local2.n24 = _local3.n24; _local2.n34 = _local3.n34; } override public function toString():String{ return (((((((this.name + ": x:") + Math.round(this.x)) + " y:") + Math.round(this.y)) + " z:") + Math.round(this.z))); } public function get useOwnContainer():Boolean{ return (_useOwnContainer); } public function addChildrenToLayer(_arg1:DisplayObject3D, _arg2:ViewportLayer):void{ var _local3:DisplayObject3D; for each (_local3 in _arg1.children) { _arg2.addDisplayObject3D(_local3); _local3.addChildrenToLayer(_local3, _arg2); }; } public function hitTestPoint(_arg1:Number, _arg2:Number, _arg3:Number):Boolean{ var _local4:Number = (this.x - _arg1); var _local5:Number = (this.y - _arg2); var _local6:Number = (this.z - _arg3); var _local7:Number = (((_local4 * _local4) + (_local5 * _local5)) + (_local6 * _local6)); var _local8:Number = (this.geometry) ? this.geometry.boundingSphere.maxDistance : 0; return ((_local8 > _local7)); } public function moveRight(_arg1:Number):void{ translate(_arg1, RIGHT); } public function moveBackward(_arg1:Number):void{ translate(_arg1, BACKWARD); } public function set x(_arg1:Number):void{ this.transform.n14 = _arg1; } public function materialsList():String{ var _local2:String; var _local3:DisplayObject3D; var _local1 = ""; for (_local2 in this.materials) { _local1 = (_local1 + (_local2 + "\n")); }; for each (_local3 in this._childrenByName) { for (_local2 in _local3.materials.materialsByName) { _local1 = (_local1 + (("+ " + _local2) + "\n")); }; }; return (_local1); } public function set y(_arg1:Number):void{ this.transform.n24 = _arg1; } public function set z(_arg1:Number):void{ this.transform.n34 = _arg1; } public static function get ZERO():DisplayObject3D{ return (new (DisplayObject3D)); } } }//package org.papervision3d.objects
Section 108
//BasicRenderEngine (org.papervision3d.render.BasicRenderEngine) package org.papervision3d.render { import org.papervision3d.core.render.data.*; import flash.geom.*; import org.papervision3d.view.layer.*; import org.papervision3d.core.render.command.*; import org.papervision3d.core.proto.*; import org.papervision3d.view.*; import org.papervision3d.core.render.material.*; import org.papervision3d.core.utils.*; import org.papervision3d.core.render.*; import org.papervision3d.events.*; import org.papervision3d.core.render.sort.*; import org.papervision3d.core.render.project.*; import org.papervision3d.core.render.filter.*; public class BasicRenderEngine extends AbstractRenderEngine implements IRenderEngine { protected var renderDoneEvent:RendererEvent; public var sorter:IRenderSorter; public var projectionPipeline:ProjectionPipeline; protected var renderList:Array; protected var renderStatistics:RenderStatistics; protected var cleanRHD:RenderHitData; protected var projectionDoneEvent:RendererEvent; protected var renderSessionData:RenderSessionData; protected var stopWatch:StopWatch; public var filter:IRenderFilter; public function BasicRenderEngine():void{ cleanRHD = new RenderHitData(); super(); init(); } protected function doRender(_arg1:RenderSessionData, _arg2:Array=null):RenderStatistics{ var _local3:RenderableListItem; var _local5:ViewportLayer; stopWatch.reset(); stopWatch.start(); MaterialManager.getInstance().updateMaterialsBeforeRender(_arg1); filter.filter(renderList); sorter.sort(renderList); var _local4:Viewport3D = _arg1.viewPort; while ((_local3 = renderList.pop())) { _local5 = _local4.accessLayerFor(_local3, true); _local3.render(_arg1, _local5.graphicsChannel); _local4.lastRenderList.push(_local3); _local5.processRenderItem(_local3); }; MaterialManager.getInstance().updateMaterialsAfterRender(_arg1); _arg1.renderStatistics.renderTime = stopWatch.stop(); _arg1.viewPort.updateAfterRender(_arg1); return (renderStatistics); } override public function removeFromRenderList(_arg1:IRenderListItem):int{ return (renderList.splice(renderList.indexOf(_arg1), 1)); } protected function init():void{ renderStatistics = new RenderStatistics(); projectionPipeline = new BasicProjectionPipeline(); stopWatch = new StopWatch(); sorter = new BasicRenderSorter(); filter = new BasicRenderFilter(); renderList = new Array(); renderSessionData = new RenderSessionData(); renderSessionData.renderer = this; projectionDoneEvent = new RendererEvent(RendererEvent.PROJECTION_DONE, renderSessionData); renderDoneEvent = new RendererEvent(RendererEvent.RENDER_DONE, renderSessionData); } public function hitTestPoint2D(_arg1:Point, _arg2:Viewport3D):RenderHitData{ return (_arg2.hitTestPoint2D(_arg1)); } override public function renderScene(_arg1:SceneObject3D, _arg2:CameraObject3D, _arg3:Viewport3D, _arg4:Boolean=true):RenderStatistics{ _arg2.viewport = _arg3.sizeRectangle; renderSessionData.scene = _arg1; renderSessionData.camera = _arg2; renderSessionData.viewPort = _arg3; renderSessionData.container = _arg3.containerSprite; renderSessionData.triangleCuller = _arg3.triangleCuller; renderSessionData.particleCuller = _arg3.particleCuller; renderSessionData.renderObjects = _arg1.objects; renderSessionData.renderLayers = null; renderSessionData.renderStatistics.clear(); _arg3.updateBeforeRender(renderSessionData); projectionPipeline.project(renderSessionData); if (hasEventListener(RendererEvent.PROJECTION_DONE)){ dispatchEvent(projectionDoneEvent); }; doRender(renderSessionData, null); if (hasEventListener(RendererEvent.RENDER_DONE)){ dispatchEvent(renderDoneEvent); }; return (renderSessionData.renderStatistics); } override public function addToRenderList(_arg1:IRenderListItem):int{ return (renderList.push(_arg1)); } private function getLayerObjects(_arg1:Array):Array{ var _local3:ViewportLayer; var _local2:Array = new Array(); for each (_local3 in _arg1) { _local2 = _local2.concat(_local3.getLayerObjects()); }; return (_local2); } public function destroy():void{ renderDoneEvent = null; projectionDoneEvent = null; projectionPipeline = null; sorter = null; filter = null; renderStatistics = null; renderList = null; renderSessionData.destroy(); renderSessionData = null; cleanRHD = null; stopWatch = null; } public function renderLayers(_arg1:SceneObject3D, _arg2:CameraObject3D, _arg3:Viewport3D, _arg4:Array=null, _arg5:Boolean=true):RenderStatistics{ renderSessionData.scene = _arg1; renderSessionData.camera = _arg2; renderSessionData.viewPort = _arg3; renderSessionData.container = _arg3.containerSprite; renderSessionData.triangleCuller = _arg3.triangleCuller; renderSessionData.particleCuller = _arg3.particleCuller; renderSessionData.renderObjects = getLayerObjects(_arg4); renderSessionData.renderLayers = _arg4; renderSessionData.renderStatistics.clear(); _arg3.updateBeforeRender(renderSessionData); projectionPipeline.project(renderSessionData); if (hasEventListener(RendererEvent.PROJECTION_DONE)){ dispatchEvent(projectionDoneEvent); }; doRender(renderSessionData); if (hasEventListener(RendererEvent.RENDER_DONE)){ dispatchEvent(renderDoneEvent); }; return (renderSessionData.renderStatistics); } } }//package org.papervision3d.render
Section 109
//Scene3D (org.papervision3d.scenes.Scene3D) package org.papervision3d.scenes { import org.papervision3d.core.proto.*; public class Scene3D extends SceneObject3D { } }//package org.papervision3d.scenes
Section 110
//ViewportLayerSortMode (org.papervision3d.view.layer.util.ViewportLayerSortMode) package org.papervision3d.view.layer.util { public class ViewportLayerSortMode { public static var Z_SORT:String = "z"; public static var INDEX_SORT:String = "index"; } }//package org.papervision3d.view.layer.util
Section 111
//ViewportBaseLayer (org.papervision3d.view.layer.ViewportBaseLayer) package org.papervision3d.view.layer { import org.papervision3d.objects.*; import org.papervision3d.view.*; public class ViewportBaseLayer extends ViewportLayer { public function ViewportBaseLayer(_arg1:Viewport3D){ super(_arg1, null); } override public function getChildLayer(_arg1:DisplayObject3D, _arg2:Boolean=true, _arg3:Boolean=false):ViewportLayer{ if (layers[_arg1]){ return (layers[_arg1]); }; if (((_arg2) || (_arg1.useOwnContainer))){ return (getChildLayerFor(_arg1, _arg3)); }; return (this); } override public function updateBeforeRender():void{ clear(); var _local1:int = (childLayers.length - 1); while (_local1 >= 0) { if (childLayers[_local1].dynamicLayer){ removeLayerAt(_local1); }; _local1--; }; super.updateBeforeRender(); } } }//package org.papervision3d.view.layer
Section 112
//ViewportLayer (org.papervision3d.view.layer.ViewportLayer) package org.papervision3d.view.layer { import flash.display.*; import org.papervision3d.objects.*; import org.papervision3d.core.render.command.*; import org.papervision3d.view.*; import flash.utils.*; import org.papervision3d.view.layer.util.*; public class ViewportLayer extends Sprite { public var layerIndex:Number; public var layers:Dictionary; public var childLayers:Array; public var weight:Number;// = 0 public var dynamicLayer:Boolean;// = false public var forceDepth:Boolean;// = false public var displayObject3D:DisplayObject3D; public var sortMode:String; protected var viewport:Viewport3D; public var displayObjects:Dictionary; public var graphicsChannel:Graphics; public var screenDepth:Number;// = 0 public function ViewportLayer(_arg1:Viewport3D, _arg2:DisplayObject3D, _arg3:Boolean=false){ layers = new Dictionary(true); displayObjects = new Dictionary(true); sortMode = ViewportLayerSortMode.Z_SORT; super(); this.viewport = _arg1; this.displayObject3D = _arg2; this.dynamicLayer = _arg3; this.graphicsChannel = this.graphics; if (_arg3){ this.filters = _arg2.filters; this.blendMode = _arg2.blendMode; this.alpha = _arg2.alpha; }; if (_arg2){ addDisplayObject3D(_arg2); }; init(); } public function removeLayerAt(_arg1:Number):void{ var _local2:DisplayObject3D; for each (_local2 in childLayers[_arg1].displayObjects) { unlinkChild(_local2); }; removeChild(childLayers[_arg1]); childLayers.splice(_arg1, 1); } private function onChildAdded(_arg1:ViewportLayerEvent):void{ if (_arg1.do3d){ linkChild(_arg1.do3d, _arg1.layer, _arg1); }; } public function addLayer(_arg1:ViewportLayer):void{ var _local2:DisplayObject3D; var _local3:ViewportLayer; childLayers.push(_arg1); addChild(_arg1); _arg1.addEventListener(ViewportLayerEvent.CHILD_ADDED, onChildAdded); _arg1.addEventListener(ViewportLayerEvent.CHILD_REMOVED, onChildRemoved); for each (_local2 in _arg1.displayObjects) { linkChild(_local2, _arg1); }; for each (_local3 in _arg1.layers) { for each (_local2 in _local3.displayObjects) { linkChild(_local2, _local3); }; }; } public function getChildLayer(_arg1:DisplayObject3D, _arg2:Boolean=true, _arg3:Boolean=false):ViewportLayer{ _arg1 = (_arg1.parentContainer) ? _arg1.parentContainer : _arg1; if (layers[_arg1]){ return (layers[_arg1]); }; if (_arg2){ return (getChildLayerFor(_arg1, _arg3)); }; return (null); } protected function getChildLayerFor(_arg1:DisplayObject3D, _arg2:Boolean=false):ViewportLayer{ var _local3:ViewportLayer; if (_arg1){ _local3 = new ViewportLayer(viewport, _arg1, _arg1.useOwnContainer); addLayer(_local3); if (_arg2){ _arg1.addChildrenToLayer(_arg1, _local3); }; return (_local3); } else { trace("Needs to be a do3d"); }; return (null); } public function updateAfterRender():void{ var _local1:ViewportLayer; for each (_local1 in childLayers) { _local1.updateAfterRender(); }; } protected function init():void{ childLayers = new Array(); } public function clear():void{ graphicsChannel.clear(); reset(); } protected function reset():void{ if (!forceDepth){ screenDepth = 0; }; this.weight = 0; } public function updateInfo():void{ var _local1:ViewportLayer; for each (_local1 in childLayers) { _local1.updateInfo(); if (!forceDepth){ this.weight = (this.weight + _local1.weight); this.screenDepth = (this.screenDepth + (_local1.screenDepth * _local1.weight)); }; }; if (!forceDepth){ this.screenDepth = (this.screenDepth / this.weight); }; } private function linkChild(_arg1:DisplayObject3D, _arg2:ViewportLayer, _arg3:ViewportLayerEvent=null):void{ layers[_arg1] = _arg2; dispatchEvent(new ViewportLayerEvent(ViewportLayerEvent.CHILD_ADDED, _arg1, _arg2)); } protected function orderLayers():void{ var _local1:int; while (_local1 < childLayers.length) { this.setChildIndex(childLayers[_local1], _local1); childLayers[_local1].sortChildLayers(); _local1++; }; } public function updateBeforeRender():void{ var _local1:ViewportLayer; clear(); for each (_local1 in childLayers) { _local1.updateBeforeRender(); }; } public function hasDisplayObject3D(_arg1:DisplayObject3D):Boolean{ return (!((displayObjects[_arg1] == null))); } public function sortChildLayers():void{ if (sortMode == ViewportLayerSortMode.Z_SORT){ childLayers.sortOn("screenDepth", (Array.DESCENDING | Array.NUMERIC)); } else { childLayers.sortOn("layerIndex", Array.NUMERIC); }; orderLayers(); } private function onChildRemoved(_arg1:ViewportLayerEvent):void{ if (_arg1.do3d){ unlinkChild(_arg1.do3d, _arg1); }; } public function removeAllLayers():void{ var _local1:int = (childLayers.length - 1); while (_local1 >= 0) { removeLayerAt(_local1); _local1--; }; } public function processRenderItem(_arg1:RenderableListItem):void{ if (!forceDepth){ this.screenDepth = (this.screenDepth + _arg1.screenDepth); this.weight++; }; } public function removeLayer(_arg1:ViewportLayer):void{ var _local2:int = getChildIndex(_arg1); if (_local2 > -1){ removeLayerAt(_local2); } else { trace("Layer not found for removal."); }; } public function addDisplayObject3D(_arg1:DisplayObject3D, _arg2:Boolean=false):void{ if (!_arg1){ return; }; displayObjects[_arg1] = _arg1; dispatchEvent(new ViewportLayerEvent(ViewportLayerEvent.CHILD_ADDED, _arg1, this)); if (_arg2){ _arg1.addChildrenToLayer(_arg1, this); }; } public function removeDisplayObject3D(_arg1:DisplayObject3D):void{ displayObjects[_arg1] = null; dispatchEvent(new ViewportLayerEvent(ViewportLayerEvent.CHILD_REMOVED, _arg1, this)); } private function unlinkChild(_arg1:DisplayObject3D, _arg2:ViewportLayerEvent=null):void{ layers[_arg1] = null; dispatchEvent(new ViewportLayerEvent(ViewportLayerEvent.CHILD_REMOVED, _arg1)); } public function getLayerObjects(_arg1:Array=null):Array{ var _local2:DisplayObject3D; var _local3:ViewportLayer; if (!_arg1){ _arg1 = new Array(); }; for each (_local2 in this.displayObjects) { if (((_local2) && ((_local2.parent == null)))){ _arg1.push(_local2); }; }; for each (_local3 in childLayers) { _local3.getLayerObjects(_arg1); }; return (_arg1); } public function childLayerIndex(_arg1:DisplayObject3D):Number{ _arg1 = (_arg1.parentContainer) ? _arg1.parentContainer : _arg1; var _local2:int; while (_local2 < childLayers.length) { if (childLayers[_local2].hasDisplayObject3D(_arg1)){ return (_local2); }; _local2++; }; return (-1); } } }//package org.papervision3d.view.layer
Section 113
//ViewportLayerEvent (org.papervision3d.view.layer.ViewportLayerEvent) package org.papervision3d.view.layer { import flash.events.*; import org.papervision3d.objects.*; public class ViewportLayerEvent extends Event { public var layer:ViewportLayer; public var do3d:DisplayObject3D; public static const CHILD_REMOVED:String = "childRemoved"; public static const CHILD_ADDED:String = "childAdded"; public function ViewportLayerEvent(_arg1:String, _arg2:DisplayObject3D=null, _arg3:ViewportLayer=null){ super(_arg1, false, false); this.do3d = _arg2; this.layer = _arg3; } } }//package org.papervision3d.view.layer
Section 114
//Viewport3D (org.papervision3d.view.Viewport3D) package org.papervision3d.view { import flash.events.*; import flash.display.*; import org.papervision3d.core.render.data.*; import flash.geom.*; import org.papervision3d.view.layer.*; import org.papervision3d.objects.*; import org.papervision3d.core.render.command.*; import org.papervision3d.core.culling.*; import org.papervision3d.core.view.*; import org.papervision3d.core.utils.*; import flash.utils.*; import org.papervision3d.core.render.*; public class Viewport3D extends Sprite implements IViewport3D { public var interactiveSceneManager:InteractiveSceneManager; public var lastRenderList:Array; public var cullingRectangle:Rectangle; protected var _interactive:Boolean; public var lineCuller:ILineCuller; protected var _autoCulling:Boolean; protected var _viewportObjectFilter:ViewportObjectFilter; public var particleCuller:IParticleCuller; protected var _height:Number; protected var _width:Number; protected var _layerInstances:Dictionary; protected var _autoScaleToStage:Boolean; public var triangleCuller:ITriangleCuller; protected var _lastRenderer:IRenderEngine; protected var _hWidth:Number; protected var _containerSprite:ViewportBaseLayer; protected var _hHeight:Number; public var sizeRectangle:Rectangle; protected var renderHitData:RenderHitData; protected var _autoClipping:Boolean; public function Viewport3D(_arg1:Number=640, _arg2:Number=480, _arg3:Boolean=false, _arg4:Boolean=false, _arg5:Boolean=true, _arg6:Boolean=true){ init(); this.interactive = _arg4; this.viewportWidth = _arg1; this.viewportHeight = _arg2; this.autoClipping = _arg5; this.autoCulling = _arg6; this.autoScaleToStage = _arg3; this._layerInstances = new Dictionary(true); } public function set viewportWidth(_arg1:Number):void{ _width = _arg1; _hWidth = (_arg1 / 2); containerSprite.x = _hWidth; cullingRectangle.x = -(_hWidth); cullingRectangle.width = _arg1; sizeRectangle.width = _arg1; if (_autoClipping){ scrollRect = sizeRectangle; }; } public function get autoCulling():Boolean{ return (_autoCulling); } protected function onRemovedFromStage(_arg1:Event):void{ stage.removeEventListener(Event.RESIZE, onStageResize); } public function set autoCulling(_arg1:Boolean):void{ if (_arg1){ triangleCuller = new RectangleTriangleCuller(cullingRectangle); particleCuller = new RectangleParticleCuller(cullingRectangle); lineCuller = new RectangleLineCuller(cullingRectangle); } else { if (!_arg1){ triangleCuller = new DefaultTriangleCuller(); particleCuller = new DefaultParticleCuller(); lineCuller = new DefaultLineCuller(); }; }; _autoCulling = _arg1; } public function getChildLayer(_arg1:DisplayObject3D, _arg2:Boolean=true, _arg3:Boolean=true):ViewportLayer{ return (containerSprite.getChildLayer(_arg1, _arg2, _arg3)); } protected function init():void{ this.renderHitData = new RenderHitData(); lastRenderList = new Array(); sizeRectangle = new Rectangle(); cullingRectangle = new Rectangle(); _containerSprite = new ViewportBaseLayer(this); addChild(_containerSprite); addEventListener(Event.ADDED_TO_STAGE, onAddedToStage); addEventListener(Event.REMOVED_FROM_STAGE, onRemovedFromStage); } public function get autoClipping():Boolean{ return (_autoClipping); } public function updateAfterRender(_arg1:RenderSessionData):void{ var _local2:ViewportLayer; if (interactive){ interactiveSceneManager.updateRenderHitData(); }; if (_arg1.renderLayers){ for each (_local2 in _arg1.renderLayers) { _local2.updateInfo(); _local2.sortChildLayers(); _local2.updateAfterRender(); }; } else { containerSprite.updateInfo(); containerSprite.updateAfterRender(); }; containerSprite.sortChildLayers(); } protected function onAddedToStage(_arg1:Event):void{ stage.addEventListener(Event.RESIZE, onStageResize); onStageResize(); } public function get containerSprite():ViewportLayer{ return (_containerSprite); } public function set autoClipping(_arg1:Boolean):void{ if (_arg1){ scrollRect = sizeRectangle; } else { scrollRect = null; }; _autoClipping = _arg1; } public function accessLayerFor(_arg1:RenderableListItem, _arg2:Boolean=false):ViewportLayer{ var _local3:DisplayObject3D; if (_arg1.renderableInstance){ _local3 = _arg1.renderableInstance.instance; _local3 = (_local3.parentContainer) ? _local3.parentContainer : _local3; if (containerSprite.layers[_local3]){ if (_arg2){ _local3.container = containerSprite.layers[_local3]; }; return (containerSprite.layers[_local3]); } else { if (_local3.useOwnContainer){ return (containerSprite.getChildLayer(_local3, true, true)); }; }; }; return (containerSprite); } public function get viewportWidth():Number{ return (_width); } public function set interactive(_arg1:Boolean):void{ if (_arg1 != _interactive){ if (((_interactive) && (interactiveSceneManager))){ interactiveSceneManager.destroy(); interactiveSceneManager = null; }; _interactive = _arg1; if (_arg1){ interactiveSceneManager = new InteractiveSceneManager(this); }; }; } public function set viewportObjectFilter(_arg1:ViewportObjectFilter):void{ _viewportObjectFilter = _arg1; } public function set autoScaleToStage(_arg1:Boolean):void{ _autoScaleToStage = _arg1; if (((_arg1) && (!((stage == null))))){ onStageResize(); }; } public function set viewportHeight(_arg1:Number):void{ _height = _arg1; _hHeight = (_arg1 / 2); containerSprite.y = _hHeight; cullingRectangle.y = -(_hHeight); cullingRectangle.height = _arg1; sizeRectangle.height = _arg1; if (_autoClipping){ scrollRect = sizeRectangle; }; } public function updateBeforeRender(_arg1:RenderSessionData):void{ var _local2:ViewportLayer; lastRenderList.length = 0; if (_arg1.renderLayers){ for each (_local2 in _arg1.renderLayers) { _local2.updateBeforeRender(); }; } else { _containerSprite.updateBeforeRender(); }; _layerInstances = new Dictionary(true); } public function hitTestMouse():RenderHitData{ var _local1:Point = new Point(containerSprite.mouseX, containerSprite.mouseY); return (hitTestPoint2D(_local1)); } public function get interactive():Boolean{ return (_interactive); } public function get autoScaleToStage():Boolean{ return (_autoScaleToStage); } public function hitTestPoint2D(_arg1:Point):RenderHitData{ var _local2:RenderableListItem; var _local3:RenderHitData; var _local4:IRenderListItem; var _local5:uint; renderHitData.clear(); if (interactive){ _local3 = renderHitData; _local5 = lastRenderList.length; while ((_local4 = lastRenderList[--_local5])) { if ((_local4 is RenderableListItem)){ _local2 = (_local4 as RenderableListItem); _local3 = _local2.hitTestPoint2D(_arg1, _local3); if (_local3.hasHit){ return (_local3); }; }; }; }; return (renderHitData); } public function get viewportHeight():Number{ return (_height); } protected function onStageResize(_arg1:Event=null):void{ if (_autoScaleToStage){ viewportWidth = stage.stageWidth; viewportHeight = stage.stageHeight; }; } public function destroy():void{ if (interactiveSceneManager){ interactiveSceneManager.destroy(); interactiveSceneManager = null; }; lastRenderList = null; } public function get viewportObjectFilter():ViewportObjectFilter{ return (_viewportObjectFilter); } } }//package org.papervision3d.view
Section 115
//Papervision3D (org.papervision3d.Papervision3D) package org.papervision3d { public class Papervision3D { public static var useDEGREES:Boolean = true; public static var useRIGHTHANDED:Boolean = false; public static var VERBOSE:Boolean = true; public static var NAME:String = "Papervision3D"; public static var DATE:String = "24.03.08"; public static var AUTHOR:String = "(c) 2006-2007 Copyright by Carlos Ulloa - | John Grden | Ralph Hauwert | Tim Knip | Andy Zupko"; public static var VERSION:String = "Public Alpha 2.0 - Great White"; public static var usePERCENT:Boolean = false; public static function log(_arg1:String):void{ if (Papervision3D.VERBOSE){ trace(_arg1); }; } } }//package org.papervision3d
Section 116
//BlockSquad (BlockSquad) package { import flash.events.*; import flash.display.*; import flash.media.*; import flash.geom.*; import org.papervision3d.materials.utils.*; import mochi.as3.*; import org.papervision3d.materials.*; import org.papervision3d.objects.primitives.*; import flash.filters.*; import flash.net.*; import flash.system.*; import frosmo.*; import flash.ui.*; public class BlockSquad extends PaperBase { private const _yi351:Class; private const LEFT:int = 8; private const _xt306:int = 2; private const _sb443:int = 10; private const _uq644:Sound; private const _xf298:Class; private const _hu657:int = 1; private const _ai499:Class; private const _ba576:Array; private const _qg69:int = 10; private const _gk716:Class; private const _xj423:Array; private const _ak442:int = 5; private const _mo361:BitmapData; private const _dn112:Class; private const _ln473:BitmapData; private const _vr315:BitmapData; private const _xa77:int = 6; private const _aw304:int = 38; private const _md149:Class; private const _ps384:Class; private const _hu686:Class; private const _qw306:BitmapData; private const _nr212:int = 5; private const _au124:Class; private const _og268:int = 13; private const _pa525:int = 4; private const _df421:Class; private const _np284:Number = 0.2; private const _oa48:int = 7; private const _eh402:int = 1; private const _sc114:Class; private const _cl175:int = 8; private const _kl294:int = 5; private const _jv162:Class; private const _td255:int = 16; private const _pc728:Array; private const _sl185:Sound; private const _ur322:BitmapData; private const _tf19:int = 100; private const _pv215:int = 2; private const _vq287:Class; private const _ps85:int = 5; private const _es672:Array; private const _ft329:int = 0; private const _ti728:int = 4; private const _be531:int = 480; private const _va601:Class; private const _cx299:BitmapData; private const _ib104:Class; private const _fi349:Class; private const _ym581:BitmapData; private const _pm669:BitmapData; private const _jy471:int = 3; private const _yl257:Sound; private const _rn115:Class; private const _py513:Class; private const _kp223:int = 8; private const _mf165:int; private const _pa598:int = 0; private const _du600:Class; private const _yc453:int = 0; private const _dt515:BitmapData; private const _ap518:Class; private const _by370:int = 1; private const _sf458:Class; private const _lo195:BitmapData; private const _rm297:int = 220; private const _nm613:Class; private const _qr84:BitmapData; private const _uh244:int = 8; private const _jq541:int = 180; private const _ox415:Class; private const _fj235:Class; private const _dn82:int = 31; private const _gb80:Class; private const _wt188:int = 30; private const _nw538:int = 2; private const RIGHT:int = 2; private const _ga479:BitmapData; private const _gm560:Class; private const _ke281:Class; private const _ch438:Array; private const _hd310:Class; private const _xy209:BitmapData; private const _pc100:BitmapData; private const _px486:int = 6; private const _be139:BitmapData; private const _vv589:Class; private const _pd689:BitmapData; private const _ew403:BitmapData; private const _wp609:BitmapData; private const _ut46:int = 9; private const _xn470:Class; private const _ci55:Class; private const _vy628:Class; private const _ny514:int = 4; private const _vw451:Class; private const _xe424:int = 1; private const _be158:int = 30; private const _gf723:int = 11; private const _um509:int = 4; private const _yd380:BitmapData; private const _ev330:BitmapData; private const _iq328:Class; private const _ja24:int = 150; private const _tv538:BitmapData; private const _na124:Number = 0.8; private const _br347:Class; private const _mm638:Array; private const _lv67:Class; private const _jt402:Array; private const _wp644:Class; private const _my501:int = 1; private const _ss480:Class; private const _vw244:BitmapData; private const _fb595:int = 6; private const _le67:Class; private const _lk444:Array; private const _pe104:Class; private const _ac34:int; private const _cr167:int; private const _fl266:int = 14; private const _ts293:Array; private const _oo699:int = 3; private const _up25:Array; private const _lx631:BitmapData; private const _nv38:int = 1; private const _is549:int = 1; private const _uy402:int = 7; private const _uw469:Class; private const _un415:Number = 6.28318530717959; private const _wc260:int = 8; private const _mb216:Class; private const _kh397:int = 2; private const _mx682:Class; private const _sa407:Class; private const _do717:int = 6; private const _la14:Class; private const _fe416:BitmapData; private const _mc551:BitmapData; private const _tk597:int = 10; private const _bs482:Class; private const _md647:Sound; private const _gn266:Array; private const _xr669:BitmapData; private const _ai543:int = 8; private const _yg77:int = 30; private const _sl650:int = 4; private const _sk329:int = 9; private const _ma144:BitmapData; private const _uv160:Class; private const _em115:Class; private const _pp383:int = 2; private const _sv561:Class; private const _hj724:int = 3; private const _ac89:int = 48; private const _en699:int = 5; private const _dx322:Class; private const _bt372:Number = 0.2; private const _ex376:Class; private const _tb582:Sound; private const _gk76:Class; private const _jk677:Class; private const _uk197:Sound; private const _is120:int = 5; private const _fy75:Class; private const _sv115:Class; private const _ex384:Class; private const _kw575:BitmapData; private const _ra667:Array; private const _lx469:Class; private const _dm598:int; private const _cd508:Class; private const _pj404:BitmapData; private const _ng537:BitmapData; private const _mx278:Number = 0.8; private const _am722:Class; private const _jl318:Number = 1.5707963267949; private const _kp718:Class; private const _lc584:int = 7; private const _ti11:int = 5; private const _bc633:int = 0; private const _lq616:int = 1; private const _tm378:BitmapData; private const _bw202:int = 0; private const _gg48:BitmapData; private const _iv431:Class; private const _qt135:Class; private const _fh534:int = 18; private const _tb396:Number = 0.05; private const _bk131:Class; private const _yi265:Class; private const _bm310:Class; private const _qi152:int = 418; private const _xt460:Class; private const _ya50:int = 3; private const _cl271:int = 5; private const _ij128:Class; private const _eq320:Sound; private const _ee242:Class; private const _gg265:int = 1; private const _pw629:int = 8; private const _tp673:int = 232; private const _kx480:Sound; private const _og145:Class; private const _sb134:int = 10; private const _ht481:Sound; private const _me374:int = 5; private const _tp688:int = 100; private const _ix411:Class; private const _dq545:int = -1; private const _px730:int = 0; private const _lo485:BitmapData; private const _tq302:int = 0; private const _gf194:Sound; private const _yo602:Class; private const _re629:int = 418; private const _bm48:int = 1; private const _gu315:Sound; private const _bd300:BitmapData; private const _qk370:Class; private const _vq151:int = 9; private const _kd210:Class; private const _tr647:BitmapData; private const _tq316:BitmapData; private const _bo309:int = 12; private const _wv652:int = 7; private const _in533:Class; private const _uq367:Sound; private const _wj12:BitmapData; private const _gs391:int = 7; private const _se676:Class; private const _hi293:int = 2; private const TOP:int = 1; private const _fl728:Class; private const _cy269:Class; private const _wm611:Class; private const _se213:int = 5; private const _gw526:Class; private const _sf74:int = 1; private const _hk488:BitmapData; private const _rm141:Sound; private const _rn477:int = 5; private const _lg567:Array; private const _ti628:Array; private const _ei676:BitmapData; private const _ol661:Class; private const _ur245:int = -1; private const _lf244:int = -2; private const _cx199:int = 11; private const _wl542:Array; private const _he718:Array; private const _dd192:int = 2; private const _jy97:Class; private const _mj411:Class; private const _cp480:BitmapData; private const _cp489:Class; private const _dm48:int; private const _qp644:BitmapData; private const _xk277:Class; private const _nt134:Sound; private const _cf581:BitmapData; private const _ao566:int = 5; private const _ms248:Class; private const _dt652:BitmapData; private const _nm500:Sound; private const _nl655:int = 2; private const _tg481:int = 2; private const _sg442:Class; private const _rd375:Class; private const _rg645:Class; private const _fj358:BitmapData; private const _mi596:Class; private const _lg379:Class; private const _sd185:Class; private const _dq160:BitmapData; private const _ao586:Sound; private const _gx438:Sound; private const _mu688:BitmapData; private const _vv453:Class; private const _hb250:int = 11; private const _kg71:int = 4; private const _mk94:Class; private const _aq536:Class; private const BOTTOM:int = 4; private const _ku615:BitmapData; private const _mv309:Class; private const _fc517:BitmapData; private const _ul529:int; private const _lu421:int = 4; private const _jq462:Class; private const _ww125:BitmapData; private const _mv14:int = 0; private const _bx60:BitmapData; private const _nk130:Class; private const _ap222:Class; private const _rq112:BitmapData; private const _xy357:int = 6; private const _sh582:BitmapData; private const _mt146:BitmapData; private const _oc211:int = 3; private const _qr649:int = -1; private const _ci438:Class; private const _vc24:int = 1; private const _gn329:BitmapData; private const _uu88:Class; private const _wm240:int = 8; private const _ao153:Class; private const _yd258:int = 0; private const _nx560:Class; private const _br227:int = 121; private const _iq692:Array; private const _fy519:int = 3; private const _tr72:BitmapData; private const _go202:Class; private const _oo322:int; private const _ty702:BitmapData; private const _wu55:int = 4; private const _ct229:int = 640; private const _io299:int = 3; private const _tu354:int = 0x0100; private const _ia88:int; private const _nd302:BitmapData; private const _eh27:BitmapData; private const _st473:int = 0; private const _hg541:Class; private const _rh351:Class; private const _yy95:Class; private const _na287:Class; private const _eu178:int = 47; private const _ir580:Class; private const _gd231:Sound; private const _ec550:Class; private const _uv260:Sound; private const _xq214:Sound; private const _qf389:BitmapData; private const _rl726:Class; private const _mv83:int; private const _pg438:Class; private const _bk642:BitmapData; private const _qk68:int; private const _mm587:int = 7; private const _qi421:int = 32; private const _ss175:Sound; private const _tp700:Class; private const _be96:int; private const _qt434:int = 10; private const _cj139:BitmapData; private const _kj256:Array; private const _il32:int = -3; private const _rv420:Class; private const _lb100:int = 0x0200; private const _dx457:int = 5; private const _uy103:Class; private const _mc74:BitmapData; private const _gg323:Sound; private const _yt104:BitmapData; private const _kp83:Class; private var _aj570:int; private var _mh703:Array; private var _dn349:SoundTransform; private var _ft731:int; private var hiscore_infinite:int;// = 0 private var o:Object; private var _mf321:int;// = 100 private var _cm486:Boolean; private var _bb214:Array; private var _rl599:Array; private var _ql319:Number;// = 1 private var _dp327:int;// = 0 private var _ni411:int; private var _kf501:Boolean; private var _ky468:int; private var _xt385:int; private var _kx394:MochiDigits; private var _xk102:int;// = 0 private var _ko590:int; private var paused:Boolean; private var _lf590:Number;// = 0 private var _aw377:int; private var _cq431:int; private var _mt420:int; private var _kd140:Boolean;// = false private var _uh229:Number; private var _xm561:int; private var _hp603:BitmapMaterial; private var _aw168:int;// = 0 private var _ha253:int; private var _ei577:Array; private var _kp258:int; private var _kj710:Number; private var _li75:int; private var _wm312:Array; private var _du647:Number;// = 0 private var _xk199:int; private var _nx12:Array; private var _ch693:Boolean;// = false private var _lx84:Array; private var _vc645:SoundTransform; private var _lv643:Array; private var _mx622:int;// = 0 private var ticks:int;// = 0 private var _kh108:Array; private var hiscore_adventure:int;// = 0 private var _ct553:int; private var _dj212:Number;// = 0 private var _id153:Boolean; private var _ut77:Number; private var _gm378:Number;// = 1 private var _he453:Number;// = 0 private var _yi616:int; private var _ve619:Sound; private var _om225:Array; private var _ah419:Array; private var _wy248:Array; private var _id198:int;// = 0 private var _uy653:Array; private var _to66:Boolean; private var _tm303:Array; private var _ju552:Boolean;// = false private var _fq518:Number; private var smoothing:Boolean;// = false private var _wq553:int; private var _mx470:Boolean; private var level:MochiDigits; private var _fp679:Number; private var _ck107:Array; private var _ik628:Array; private var _nx287:int; private var _yh110:int; private var _fm177:int;// = 0 private var _sj22:int; private var _db346:Array; private var _vo36:int;// = 0 private var _tp601:Number;// = 0 private var _xh561:Array; private var _gq589:int;// = 0 private var _rk569:Array; private var _cm325:Array; private var _dc464:MochiDigits; private var _ty453:MochiDigits; private var cube:Cube; private var _uy241:Array; private var _up449:Array; private var _ys160:Boolean;// = false private var _ee76:Array; private var _cn440:Array; private var _aa431:Number;// = -1 private var _vu710:Array; private var _et62:Array; private var _rc659:int; private var _uo389:int; private var _eg432:ColorMatrixFilter; private var _tp448:MochiDigits; private var _nu627:Array; private var _uf590:int; private var _rl251:int; private var _wh142:Number; private var _sg610:MochiDigits; private var _qy640:int; private var _sh98:int; private var _qa484:Array; private var _kg508:Array; private var _ce691:Boolean; private var save_data:SharedObject; private var _nt547:SoundChannel; private var _kf433:int;// = -1 private var _sf86:int; private var _jd461:Boolean; private var _ax358:Boolean; private var _ah31:Boolean; private var _wy724:Array; private var _jx296:Array; private var _pv153:Boolean;// = true private var _nb509:Number; private var _ww348:BitmapMaterial; private var _yl83:Array; private var _mu456:int; private var _mi374:int; private var _dm95:int;// = 0 private var _gn26:Number;// = -1 private var _yh11:MochiDigits; private var _wf34:Array; private var _yl95:Number; private var boardID:String; private var _rg222:int;// = 0 private var _gy336:int;// = -1 private var _ny655:Number;// = 0 private var _lf73:int;// = 1 private var _ld48:Number; private var _lv327:Array; private var _au75:Array; private var _fp504:Array; private var _ml454:Number; private var _bs587:Boolean;// = true private var _np643:int;// = -1 private var _pg434:Array; private var _vy594:int; private var _av617:Number; private var _ta357:Boolean;// = false private var _nr613:Number; private var _bh155:Array; private var _vd477:Number;// = 0 private var _ai459:SoundChannel; private var matrix:Matrix; private var _ll252:int;// = 0 private var _ao32:int; private var _aa510:Array; public function BlockSquad(){ _ch438 = ["87b71ed42aae5170", "dd1c48bc46471854"]; o = {n:[13, 13, 1, 12, 4, 8, 11, 12, 4, 6, 4, 7, 1, 8, 5, 4], f:function (_arg1:Number, _arg2:String):String{ if (_arg2.length == 16){ return (_arg2); }; return (this.f((_arg1 + 1), (_arg2 + this.n[_arg1].toString(16)))); }}; boardID = o.f(0, ""); _oo322 = (_ct229 >> 1); _dm598 = (_be531 >> 1); _wp609 = new BitmapData(_ct229, _be531, false, 0); matrix = new Matrix(); _yh110 = _aw168; _wl542 = [240, 437, 349, 271, 360]; _lg567 = [404, 386, 360, 342, 414]; _dm48 = (_oo322 - (_re629 >> 1)); _ul529 = (_dm598 - (_qi152 >> 1)); _lo485 = new BitmapData(_re629, _qi152, true, 0); _tm303 = new Array(); _lx84 = new Array(); _uy653 = new Array(); _rk569 = new Array(); _wy248 = new Array(); _lv327 = new Array(); _ba576 = [-1, -2, 0, 0, 1, 2, 0, 0, -1, -1, 0, -1, 1, 1, 0, 1, -1, -1, 0, 1, 1, 1, 0, -1]; _iq692 = [0, 0, -1, -2, 0, 0, 1, 2, 0, 1, -1, -1, 0, -1, 1, 1, 0, -1, -1, -1, 0, 1, 1, 1]; _ww348 = new BitmapMaterial(new BitmapData(_re629, _qi152, true, 0), false); _hp603 = new BitmapMaterial(new BitmapData(_re629, _qi152, true, 0), false); _au75 = new Array(_me374); _xh561 = new Array(_me374); _ao32 = _sf74; _es672 = [0, 4, 8, 12, 16, 20, 23, 26, 29]; _lk444 = [4, 4, 4, 4, 4, 3, 3, 3, 2]; _qk370 = BlockSquad__qk370; _tv538 = Bitmap(new _qk370()).bitmapData; _br347 = BlockSquad__br347; _ma144 = Bitmap(new _br347()).bitmapData; _vq287 = BlockSquad__vq287; _bd300 = Bitmap(new _vq287()).bitmapData; _ap518 = BlockSquad__ap518; _vw244 = Bitmap(new _ap518()).bitmapData; _rl726 = BlockSquad__rl726; _ew403 = Bitmap(new _rl726()).bitmapData; _vw451 = BlockSquad__vw451; _tr647 = Bitmap(new _vw451()).bitmapData; _uw469 = BlockSquad__uw469; _ty702 = Bitmap(new _uw469()).bitmapData; _jk677 = BlockSquad__jk677; _ur322 = Bitmap(new _jk677()).bitmapData; _og145 = BlockSquad__og145; _nd302 = Bitmap(new _og145()).bitmapData; _gw526 = BlockSquad__gw526; _hk488 = Bitmap(new _gw526()).bitmapData; _mv83 = ((_ct229 >> 3) - ((_hk488.width / _nl655) >> 1)); _be96 = ((_ct229 - (_ct229 >> 3)) - ((_hk488.width / _nl655) >> 1)); _mf165 = (_dm598 - (_hk488.height >> 1)); _cy269 = BlockSquad__cy269; _rq112 = Bitmap(new _cy269()).bitmapData; _ex384 = BlockSquad__ex384; _lx631 = Bitmap(new _ex384()).bitmapData; _ao153 = BlockSquad__ao153; _qp644 = Bitmap(new _ao153()).bitmapData; _ec550 = BlockSquad__ec550; _tq316 = Bitmap(new _ec550()).bitmapData; _sa407 = BlockSquad__sa407; _dt515 = Bitmap(new _sa407()).bitmapData; _gb80 = BlockSquad__gb80; _ng537 = Bitmap(new _gb80()).bitmapData; _xf298 = BlockSquad__xf298; _bk642 = Bitmap(new _xf298()).bitmapData; _ps384 = BlockSquad__ps384; _lo195 = Bitmap(new _ps384()).bitmapData; _fy75 = BlockSquad__fy75; _cp480 = Bitmap(new _fy75()).bitmapData; _mk94 = BlockSquad__mk94; _fl728 = BlockSquad__fl728; _vy628 = BlockSquad__vy628; _yo602 = BlockSquad__yo602; _ol661 = BlockSquad__ol661; _ti628 = [Bitmap(new _mk94()).bitmapData, Bitmap(new _fl728()).bitmapData, Bitmap(new _vy628()).bitmapData, Bitmap(new _yo602()).bitmapData, Bitmap(new _ol661()).bitmapData]; _ox415 = BlockSquad__ox415; _df421 = BlockSquad__df421; _tp700 = BlockSquad__tp700; _ss480 = BlockSquad__ss480; _rh351 = BlockSquad__rh351; _xj423 = [Bitmap(new _ox415()).bitmapData, Bitmap(new _df421()).bitmapData, Bitmap(new _tp700()).bitmapData, Bitmap(new _ss480()).bitmapData, Bitmap(new _rh351()).bitmapData]; _md149 = BlockSquad__md149; _wj12 = Bitmap(new _md149()).bitmapData; _ib104 = BlockSquad__ib104; _gg48 = Bitmap(new _ib104()).bitmapData; _am722 = BlockSquad__am722; _ei676 = Bitmap(new _am722()).bitmapData; _ci55 = BlockSquad__ci55; _mu688 = Bitmap(new _ci55()).bitmapData; _ij128 = BlockSquad__ij128; _bs482 = BlockSquad__bs482; _nk130 = BlockSquad__nk130; _mb216 = BlockSquad__mb216; _se676 = BlockSquad__se676; _yi351 = BlockSquad__yi351; _xn470 = BlockSquad__xn470; _ke281 = BlockSquad__ke281; _em115 = BlockSquad__em115; _ai499 = BlockSquad__ai499; _vv453 = BlockSquad__vv453; _vu710 = [Bitmap(new _mb216()).bitmapData, Bitmap(new _ij128()).bitmapData, Bitmap(new _nk130()).bitmapData, Bitmap(new _bs482()).bitmapData, Bitmap(new _se676()).bitmapData, Bitmap(new _yi351()).bitmapData, Bitmap(new _xn470()).bitmapData, Bitmap(new _ke281()).bitmapData, Bitmap(new _em115()).bitmapData, Bitmap(new _ai499()).bitmapData, Bitmap(new _vv453()).bitmapData]; _ac34 = _vu710.length; _pc728 = [_dn82, _dn82, _dn82, _dn82, _dn82, _uh244, _dx457, _eu178, _eu178, _wt188, _fh534]; _nu627 = new Array(_ac34); _ck107 = new Array(_ac34); _et62 = new Array(_ac34); _ee242 = BlockSquad__ee242; _xy209 = Bitmap(new _ee242()).bitmapData; _ir580 = BlockSquad__ir580; _cf581 = Bitmap(new _ir580()).bitmapData; _wm611 = BlockSquad__wm611; _cx299 = Bitmap(new _wm611()).bitmapData; _sd185 = BlockSquad__sd185; _mo361 = Bitmap(new _sd185()).bitmapData; _mj411 = BlockSquad__mj411; _tm378 = Bitmap(new _mj411()).bitmapData; _lg379 = BlockSquad__lg379; _be139 = Bitmap(new _lg379()).bitmapData; _uv160 = BlockSquad__uv160; _sh582 = Bitmap(new _uv160()).bitmapData; _kp718 = BlockSquad__kp718; _kw575 = Bitmap(new _kp718()).bitmapData; _ci438 = BlockSquad__ci438; _ev330 = Bitmap(new _ci438()).bitmapData; _pe104 = BlockSquad__pe104; _qf389 = Bitmap(new _pe104()).bitmapData; _rv420 = BlockSquad__rv420; _yd380 = Bitmap(new _rv420()).bitmapData; _qt135 = BlockSquad__qt135; _mc551 = Bitmap(new _qt135()).bitmapData; _mv309 = BlockSquad__mv309; _pj404 = Bitmap(new _mv309()).bitmapData; _hd310 = BlockSquad__hd310; _ku615 = Bitmap(new _hd310()).bitmapData; _sc114 = BlockSquad__sc114; _eh27 = Bitmap(new _sc114()).bitmapData; _yy95 = BlockSquad__yy95; _yt104 = Bitmap(new _yy95()).bitmapData; _gk716 = BlockSquad__gk716; _xr669 = Bitmap(new _gk716()).bitmapData; _dn112 = BlockSquad__dn112; _ln473 = Bitmap(new _dn112()).bitmapData; _gm560 = BlockSquad__gm560; _ww125 = Bitmap(new _gm560()).bitmapData; _du600 = BlockSquad__du600; _qw306 = Bitmap(new _du600()).bitmapData; _py513 = BlockSquad__py513; _cj139 = Bitmap(new _py513()).bitmapData; _ms248 = BlockSquad__ms248; _pc100 = Bitmap(new _ms248()).bitmapData; _jv162 = BlockSquad__jv162; _dt652 = Bitmap(new _jv162()).bitmapData; _jy97 = BlockSquad__jy97; _mt146 = Bitmap(new _jy97()).bitmapData; _fi349 = BlockSquad__fi349; _tr72 = Bitmap(new _fi349()).bitmapData; _dx322 = BlockSquad__dx322; _pm669 = Bitmap(new _dx322()).bitmapData; _gk76 = BlockSquad__gk76; _qr84 = Bitmap(new _gk76()).bitmapData; _ex376 = BlockSquad__ex376; _gn329 = Bitmap(new _ex376()).bitmapData; _xk277 = BlockSquad__xk277; _ym581 = Bitmap(new _xk277()).bitmapData; _sv115 = BlockSquad__sv115; _dq160 = Bitmap(new _sv115()).bitmapData; _go202 = BlockSquad__go202; _fe416 = Bitmap(new _go202()).bitmapData; _aq536 = BlockSquad__aq536; _mc74 = Bitmap(new _aq536()).bitmapData; _cp489 = BlockSquad__cp489; _bx60 = Bitmap(new _cp489()).bitmapData; _vv589 = BlockSquad__vv589; _vr315 = Bitmap(new _vv589()).bitmapData; _va601 = BlockSquad__va601; _fc517 = Bitmap(new _va601()).bitmapData; _rd375 = BlockSquad__rd375; _fj358 = Bitmap(new _rd375()).bitmapData; _wp644 = BlockSquad__wp644; _pd689 = Bitmap(new _wp644()).bitmapData; _rg645 = BlockSquad__rg645; _ga479 = Bitmap(new _rg645()).bitmapData; _cr167 = _ga479.width; _la14 = BlockSquad__la14; _kx480 = new _la14(); _hg541 = BlockSquad__hg541; _ht481 = new _hg541(); _bk131 = BlockSquad__bk131; _uq367 = new _bk131(); _in533 = BlockSquad__in533; _uq644 = new _in533(); _bm310 = BlockSquad__bm310; _xq214 = new _bm310(); _le67 = BlockSquad__le67; _rm141 = new _le67(); _sg442 = BlockSquad__sg442; _uk197 = new _sg442(); _iv431 = BlockSquad__iv431; _ss175 = new _iv431(); _uu88 = BlockSquad__uu88; _md647 = new _uu88(); _ix411 = BlockSquad__ix411; _nm500 = new _ix411(); _iq328 = BlockSquad__iq328; _eq320 = new _iq328(); _rn115 = BlockSquad__rn115; _sl185 = new _rn115(); _nm613 = BlockSquad__nm613; _uv260 = new _nm613(); _pg438 = BlockSquad__pg438; _gg323 = new _pg438(); _kp83 = BlockSquad__kp83; _gx438 = new _kp83(); _ap222 = BlockSquad__ap222; _gf194 = new _ap222(); _nx560 = BlockSquad__nx560; _gu315 = new _nx560(); _cd508 = BlockSquad__cd508; _ao586 = new _cd508(); _hu686 = BlockSquad__hu686; _gd231 = new _hu686(); _sf458 = BlockSquad__sf458; _tb582 = new _sf458(); _mx682 = BlockSquad__mx682; _mi596 = BlockSquad__mi596; _jq462 = BlockSquad__jq462; _lx469 = BlockSquad__lx469; _uy103 = BlockSquad__uy103; _he718 = [new _lx469(), new _mx682(), new _jq462(), new _mi596(), new _uy103()]; _fj235 = BlockSquad__fj235; _yl257 = new _fj235(); _xt460 = BlockSquad__xt460; _nt134 = new _xt460(); _nt547 = new SoundChannel(); _vc645 = new SoundTransform(); _ai459 = new SoundChannel(); _dn349 = new SoundTransform(); _ia88 = ((_be531 - 8) - _ur322.height); _qk68 = ((_ct229 - (_ur322.width >> 1)) - 8); _ut77 = -(_be531); save_data = SharedObject.getLocal(irrcrpt("eorfnvtxdg", 3)); _mh703 = new Array(_td255); _ee76 = new Array(_td255); _wy724 = new Array(_td255); _wf34 = new Array(_td255); _kg508 = new Array(_td255); _up25 = [_kw575, _lf244, _mc551, _yd258, _qw306, _gg265, _xr669, _tg481, _fj358, _bo309]; _jt402 = [_bx60, _lf244, null, _qr649, _vr315, _qg69, _fc517, _cx199, null, _qr649, _fe416, _fy519]; _mm638 = [_mc74, _lf244, null, _qr649, _vr315, _qg69, _fc517, _cx199, null, _qr649, _fe416, _fy519]; _gn266 = [_pm669, _lf244, null, _qr649, _gn329, _uy402, _ym581, _wc260, _dq160, _fy519, null, _qr649, _fj358, _bo309]; _ts293 = [_pj404, _lf244, null, _qr649, _ku615, _pa525, _dq160, _fy519, null, _qr649, _fj358, _bo309]; _kj256 = [_ev330, _qf389, _yd380]; _up449 = new Array(_qt434); _nx12 = new Array(_qt434); _kh108 = new Array(_qt434); _ei577 = new Array(_qt434); _cm325 = new Array(_qt434); _sv561 = BlockSquad__sv561; _lv67 = BlockSquad__lv67; _na287 = BlockSquad__na287; _au124 = BlockSquad__au124; _yi265 = BlockSquad__yi265; _kd210 = BlockSquad__kd210; _ra667 = [Bitmap(new _au124()).bitmapData, Bitmap(new _sv561()).bitmapData, Bitmap(new _na287()).bitmapData, Bitmap(new _lv67()).bitmapData, Bitmap(new _yi265()).bitmapData, Bitmap(new _kd210()).bitmapData]; _bh155 = new Array(_tf19); _cn440 = new Array(_tf19); _om225 = new Array(_tf19); _uy241 = new Array(_tf19); _fp504 = new Array(_tf19); _bb214 = new Array(_tf19); _pg434 = new Array(_tf19); _wm312 = new Array(_tf19); _qa484 = new Array(_tf19); _ah419 = new Array(_tf19); _rl599 = new Array(_rn477); _yl83 = new Array(_rn477); _lv643 = new Array(_rn477); _ik628 = new Array(_rn477); _jx296 = new Array(_rn477); _db346 = new Array(_rn477); super(); if (Preloader._fl304){ Api.setNumber("", 0); }; _ug596(); _ci573(); init(_ct229, _be531); init3d(); _pr476(); addEventListener(Event.ENTER_FRAME, update); } final private function _ck267():void{ var _local1:int; var _local4:int; var _local2:int = getValue(irrcrpt("pryhv", 3)); var _local3:int = (_mx470) ? 0 : 1; while (_local3 < (_hb250 - 1)) { _local4 = 1; while (_local4 < (_gf723 - 1)) { if (((((!((_tm303[_local4][_local3] == -1))) && ((_tm303[_local4][_local3] <= _se213)))) && ((((_local3 > 0)) || ((_uy653[_local4][_local3] > 0)))))){ switch (_tm303[_local4][_local3]){ case _by370: case _oo699: case _pv215: case _bc633: case _ti728: if (((!(_ce691)) && ((_local2 < 3)))){ _local1 = (_es672[_wm240] + (((ticks % 20))<10) ? 0 : 1); } else { if (((!(_ce691)) && ((_local2 < 6)))){ _local1 = (_es672[_oc211] + (((ticks % 20))<10) ? 0 : 1); } else { if ((((_local4 == _uf590)) && ((_local3 == _aw377)))){ _local1 = (_es672[_yi616] + _nx287); } else { _local1 = 0; }; }; }; break; case _se213: _local1 = _mi374; break; }; _kn511(_lo485, (_rk569[_local4][_local3]) ? _nu627[_do717][_tm303[_local4][_local3]] : _nu627[_tm303[_local4][_local3]][_local1], (_af494(_local4) + (((!(_ce691)) && ((_local2 < 10)))) ? _nb502(2) : 0), (_fa250(_local4, _local3) + (((!(_ce691)) && ((_local2 < 10)))) ? _nb502(2) : 0), (_tu354 | _lb100), 1, (((_rk569[_local4][_local3]) && (((ticks % 3) == 0)))) ? 1.5 : 1, _lv327[_local4][_local3], false); }; _local4++; }; _local3++; }; } final private function _ng666():void{ _wh142 = (_wh142 + (_xk199 * _bt372)); if (Math.abs(_wh142) >= _jl318){ _xy644(_xk199); }; } final private function _kp610():void{ var _local1:int; while (_local1 < _rn477) { if (_jx296[_local1] > 0){ _ih109(_wp609, _ei676, 11, _rl599[_local1], _yl83[_local1], _lv643[_local1], (_tu354 | _lb100), _jx296[_local1]); }; _local1++; }; } final private function _oh571():void{ if (!_cm486){ _cm486 = true; _xm561 = 50; _nu525(); _ao32 = _lu421; _rg222 = 33; SoundMixer.stopAll(); _qx16(((_fm177)==_eh402) ? _md647 : _xq214, _sw510(_ey181(_ko590))); _qx16(_tb582, 0); if (Preloader._mo595 == Preloader._vx135){ Api.submitScore(getValue(irrcrpt("sodbhu_vfruh", 3)).toString(), _vk23, null); }; }; } final private function _kv165(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int):void{ var _local6:Number = Math.random(); var _local7:int; while (_local7 < _arg5) { _fp504[_vo36] = 1; _bb214[_vo36] = _arg1; _pg434[_vo36] = 0; _wm312[_vo36] = 1; _ah419[_vo36] = 20; _bh155[_vo36] = _arg3; _cn440[_vo36] = _arg4; _qa484[_vo36] = 0; _om225[_vo36] = (Math.sin((((_un415 / _arg5) * _local7) + _local6)) * _sb443); _uy241[_vo36] = (Math.cos((((_un415 / _arg5) * _local7) + _local6)) * _sb443); if (++_vo36 >= _tf19){ _vo36 = 0; }; _local7++; }; } final private function _ql534():void{ var _local1:int; var _local2:int; var _local3:Array; var _local4:int; if (_xt385 > 0){ _xt385--; } else { _gm378 = (_gm378 + (_kf433 * _np284)); if ((((_gm378 <= 0)) || ((_gm378 >= 1)))){ if (_kf433 == _my501){ _mt420 = 0; _ys160 = false; _np643 = -1; _gy336 = -1; _yh110 = _aw168; _ql319 = 1; switch (_ll252){ case _bw202: break; case _is549: _pr476(); _cm486 = false; if (_ve619 != _kx480){ _so342(_kx480, true, _px730); }; switch (_aw168){ case _bw202: _am437(); stage.quality = StageQuality.HIGH; stage.addEventListener(MouseEvent.MOUSE_DOWN, _mu377); stage.addEventListener(MouseEvent.MOUSE_UP, _yx438); stage.addEventListener(KeyboardEvent.KEY_DOWN, _tg182); stage.addEventListener(KeyboardEvent.KEY_UP, _ur209); _ba377(_up25, true); break; default: _ba377(_up25, true); break; }; break; case _pp383: _rw268(_hu657, _rm297, _tp673, (_lx631.width >> 1), _lx631.height, (_tu354 | _lb100)); _rw268(_xt306, (_ct229 - _rm297), _tp673, (_lx631.width >> 1), _lx631.height, (_tu354 | _lb100)); if (Preloader._ob610 == Preloader._oj325){ _dc464 = new MochiDigits(0); _tp448 = new MochiDigits(0); _kx394 = new MochiDigits(0); level = new MochiDigits(0); _sg610 = new MochiDigits(0); _yh11 = new MochiDigits(0); _ty453 = new MochiDigits(0); }; _fm177 = -1; _kj710 = _ct229; _ha253 = 0; _sf86 = ((_lf73 == _lq616)) ? 0 : -1; _au75 = new Array(_me374); _xh561 = new Array(_me374); _local4 = 0; while (_local4 < _me374) { _au75[_local4] = false; _xh561[_local4] = 0; _local4++; }; _qy640 = 0; setValue(irrcrpt("rncagt_ueqtg", 2), 0); break; case _mm587: _pr476(); _sf86 = -1; _ce691 = false; trace((irrcrpt("wxsvc_hmjjmgypxc = ", 4) + _ha253)); _local1 = _ha253; _local4 = 0; while (_local4 < _me374) { if (!_au75[_local4]){ ++_local1; _xh561[_local4] = _local1; }; _local4++; }; if (_aw168 == _ny514){ _so342(_kx480, true, _px730); }; cube.visible = false; break; case _ny514: if ((((_aw168 == _ny514)) && (!(_cm486)))){ if (_lf73 == _lq616){ if (++_sf86 >= (_me374 - 1)){ _sf86 = 0; }; }; setValue(irrcrpt("pizip", 4), 0); } else { if (_cm486){ _cn682(); }; _up597(true); }; _fp244(); break; case _sk329: _ll252 = _ny514; _cm486 = true; _ba377(_gn266, true); break; case _en699: _local2 = _aw726(3); var _temp1 = _local2; _local2 = (_local2 + 1); var _temp2 = _local2; _local2 = (_local2 + 1); var _temp3 = _local2; _local2 = (_local2 + 1); _local3 = [_xr669, _lf244, null, _qr649, _kj256[(_temp1 % 3)], _il32, _kj256[(_temp2 % 3)], _il32, _kj256[(_temp3 % 3)], _il32, null, _qr649, _vw244, _og268, _ew403, _fl266, null, _qr649, _fe416, _fy519]; _ba377(_local3, true); break; case _fb595: switch (_yh110){ case _ny514: case _pw629: MochiScores.showLeaderboard({boardID:_ch438[_lf73], score:getValue(irrcrpt("tpeciv_wgsvi", 4)), onError:((_yh110 == _ny514)) ? _ci23 : _vk23, onClose:((_yh110 == _ny514)) ? _ci23 : _vk23}); break; default: MochiScores.showLeaderboard({boardID:_ch438[_lf73], onError:_vk23, onClose:_vk23}); break; }; Mouse.show(); _kd140 = false; break; case _pw629: _nu525(); _ld48 = 0; _mu456 = 0; _ot476(_gn329, _uy402, 0, _oo322, 420, (_tu354 | _lb100)); _so342(_kx480, true, _px730); break; }; _aw168 = _ll252; _kf433 = 0; startTransition(_dq545, _aw168); } else { _kf433 = 0; }; }; }; } final private function _hx42():int{ return (((mouseY - _ul529) / _aw304)); } final private function _oq393(_arg1:int, _arg2:int):void{ var _local3:int; var _local4:int; var _local5:int; var _local6:Boolean; var _local7:int; var _local8:int; if (_rk569[_arg1][_arg2]){ updateValue(irrcrpt("pryhv", 3), -(getValue(irrcrpt("pryh_frvw", 3)))); setValue(irrcrpt("pryhv", 3), Math.max(getValue(irrcrpt("oqxgu", 2)), 0)); if (_vy594 > 0){ _local5 = ((_vy594 * _vy594) * 10); updateValue(irrcrpt("qmbzfs_tdpsf", 1), _local5); _gj692(_local5.toString(), mouseX, mouseY, -1); }; _vy594 = 0; _qx16(((Math.random() < 0.5)) ? _uv260 : _gg323, _sw510(mouseX)); _lh196(true); } else { _qr155(); if (_tm303[_arg1][_arg2] <= _ti728){ _vy594 = 1; _local6 = true; _ni411 = _tm303[_arg1][_arg2]; _rk569[_arg1][_arg2] = true; while (_local6) { _local6 = false; _local3 = 1; while (_local3 < (_gf723 - 1)) { _local4 = 1; while (_local4 < (_hb250 - 1)) { if (_rk569[_local3][_local4]){ _local7 = -1; while (_local7 < 2) { _local8 = -1; while (_local8 < 2) { if ((Math.abs(_local7) + Math.abs(_local8)) < 2){ if (_rm352(_local3, _local4, (_local3 + _local7), (_local4 + _local8))){ _rk569[(_local3 + _local7)][(_local4 + _local8)] = true; _local6 = true; _vy594++; }; }; _local8++; }; _local7++; }; }; _local4++; }; _local3++; }; }; switch (_vy594){ case 1: setValue(irrcrpt("qszi_gswx", 4), 4); break; case 2: setValue(irrcrpt("pryh_frvw", 3), 2); break; default: setValue(irrcrpt("pryh_frvw", 3), 1); break; }; if (getValue(irrcrpt("qszi_gswx", 4)) <= getValue(irrcrpt("qsziw", 4))){ _qx16(_he718[_ni411], _sw510(mouseX)); } else { _qr155(); }; }; }; } final private function _up597(_arg1:Boolean):void{ var _local2:int; setValue(irrcrpt("qjajq", 5), 0); _local2 = 0; while (_local2 < _rn477) { _jx296[_local2] = 0; _local2++; }; _rw268(_pa598, _oo322, _dm598, (_re629 - (_aw304 << 1)), (_qi152 - (_aw304 << 1)), (_tu354 | _lb100)); _rw268(_hj724, _mv83, _dm598, (_hk488.width >> 1), _hk488.height, (LEFT | _lb100)); _rw268(_um509, _be96, _dm598, (_hk488.width >> 1), _hk488.height, (LEFT | _lb100)); _so342(((_fm177)==_eh402) ? _rm141 : _ht481, true, _px730); } final private function _ia690():Boolean{ if (((((((((((((((!(_ah31)) && (!(_cm486)))) && (!(paused)))) && (!(_ce691)))) && (!(_kf501)))) && (!(_mx470)))) && (!(_ax358)))) && ((_xk199 == 0)))){ return (true); }; return (false); } final private function _ey181(_arg1:int):int{ return (((_dm48 + (_arg1 * _aw304)) + (_aw304 >> 1))); } final private function update(_arg1:Event):void{ _ot313(); _eo527(); } final private function _to472(_arg1:BitmapData, _arg2:BitmapData, _arg3:int, _arg4:int, _arg5:int, _arg6:Number, _arg7:Number, _arg8:int, _arg9:Number, _arg10:Boolean, _arg11:Boolean, _arg12:String):void{ var _local13:int = (_arg2.width / _arg4); var _local14:int = (_arg2.height / _arg5); if ((_arg8 & _tu354) != 0){ _arg6 = (_arg6 - (_local13 >> 1)); } else { if ((_arg8 & RIGHT) != 0){ _arg6 = (_arg6 - _local13); }; }; if ((_arg8 & _lb100) != 0){ _arg7 = (_arg7 - (_local14 >> 1)); }; if ((_arg8 & BOTTOM) != 0){ _arg7 = (_arg7 - _local14); }; var _local15:int = (_arg3 % _arg4); var _local16:int = (_arg3 / _arg4); if (((((((_arg10) || (_arg11))) || (!((_arg9 == 1))))) || (!((_arg12 == null))))){ matrix = new Matrix(); if (((_arg10) || (_arg11))){ matrix.scale((_arg10) ? -1 : 1, (_arg11) ? -1 : 1); matrix.translate(((_arg6 + (_local15 * (((_arg11) && (!(_arg10)))) ? -(_local13) : _local13)) + (_arg10) ? _local13 : 0), ((_arg7 + (_local16 * _local14)) + (_arg11) ? _local14 : 0)); } else { matrix.translate((_arg6 - (_local15 * _local13)), (_arg7 - (_local16 * _local14))); }; _arg1.draw(_arg2, matrix, new ColorTransform(1, 1, 1, _arg9), _arg12, new Rectangle(_arg6, _arg7, _local13, _local14), false); } else { _arg1.copyPixels(_arg2, new Rectangle((_local15 * _local13), (_local16 * _local14), _local13, _local14), new Point(_arg6, _arg7), null, null, true); }; } final private function _am437():void{ var _local1:int; _local1 = 0; while (_local1 < _tf19) { _bh155[_local1] = 0; _cn440[_local1] = 0; _om225[_local1] = 0; _uy241[_local1] = 0; _fp504[_local1] = 0; _bb214[_local1] = -1; _wm312[_local1] = 0; _qa484[_local1] = 0; _pg434[_local1] = 0; _ah419[_local1] = 0; _local1++; }; } final private function _gs14(_arg1:BitmapData, _arg2:BitmapData, _arg3:Number, _arg4:Number, _arg5:int, _arg6:int, _arg7:int, _arg8:Number, _arg9:Number):void{ var _local10:int = (_arg2.width / _arg6); var _local11:int = _arg2.height; if ((_arg7 & _tu354) != 0){ _arg3 = (_arg3 - (_local10 >> 1)); } else { if ((_arg7 & RIGHT) != 0){ _arg3 = (_arg3 - _local10); }; }; if ((_arg7 & _lb100) != 0){ _arg4 = (_arg4 - (_local11 >> 1)); }; if ((_arg7 & BOTTOM) != 0){ _arg4 = (_arg4 - _local11); }; matrix = new Matrix(); matrix.translate((-((_local10 >> 1)) - (_arg5 * _local10)), (-(_local11) >> 1)); matrix.rotate(_arg9); matrix.translate((_arg3 + (_local10 >> 1)), (_arg4 + (_local11 >> 1))); _arg1.draw(_arg2, matrix, ((_arg8 < 1)) ? new ColorTransform(1, 1, 1, _arg8) : null, null, new Rectangle(_arg3, _arg4, _local10, _local11), true); } final private function _ba377(_arg1:Array, _arg2:Boolean):void{ var _local5:int; var _local6:BitmapData; var _local7:int; var _local8:Boolean; var _local10:int; trace(irrcrpt("tfuvqNfov", 1)); var _local3:int = _dm598; switch (_arg1){ case _up25: _local3 = 250; break; }; _aa510 = _arg1; _mu456 = 0; _gy336 = -1; _np643 = -1; _ys160 = true; _mu456 = 0; _fq518 = _ct229; _tp601 = (_qi421 * 16); var _local4:int; var _local9:int; while (_local9 < 2) { _local10 = 0; while (_local10 < (_arg1.length >> 1)) { _local7 = _arg1[((_local10 << 1) + 1)]; _local8 = true; _local6 = _arg1[(_local10 << 1)]; switch (_local7){ case _ao566: _local8 = _bs587; break; case _uy402: _local8 = ((Preloader._ru200) && (!(_to66))); break; }; if (_local8){ if (_local6 != null){ if (_local9 == 0){ _local4 = (_local4 + (_local6.height + _ai543)); } else { _ot476(_local6, _local7, _mu456, _oo322, _local5, (TOP | _tu354)); _local5 = (_local5 + (_local6.height + _ai543)); }; } else { if (_local9 == 0){ _local4 = (_local4 + _yg77); } else { _local5 = (_local5 + _yg77); }; }; }; _local10++; }; if (_local9 == 0){ _local5 = ((_local3 - (_local4 >> 1)) - _ai543); trace((irrcrpt("_qiry_limklx = ", 4) + _local4)); trace((irrcrpt("_rjsz_dhjsy = ", 5) + _local3)); trace((irrcrpt("_rjsz_d = ", 5) + _local5)); }; _local9++; }; _fq518 = (_arg2) ? _ct229 : 0; } final private function _gj692(_arg1:String, _arg2:int, _arg3:int, _arg4:int):void{ _rl599[_mx622] = _arg1; _yl83[_mx622] = _arg2; _lv643[_mx622] = _arg3; _ik628[_mx622] = 4; _jx296[_mx622] = 1; _db346[_mx622] = _arg4; if (++_mx622 >= _rn477){ _mx622 = 0; }; } final private function _ot476(_arg1:BitmapData, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int):void{ _ys160 = true; _fq518 = _ct229; _nx12[_arg3] = _arg2; _up449[_arg3] = _arg1; _cm325[_arg3] = _arg1.width; _kh108[_arg3] = _arg4; _ei577[_arg3] = (_arg5 + (_arg1.height >> 1)); _mu456++; } final private function _le242(_arg1:Event):void{ _vc645.volume = _na124; _nt547 = _ve619.play(_px730, 0); _nt547.soundTransform = _vc645; _nt547.addEventListener(Event.SOUND_COMPLETE, _le242); } final private function _nu525():void{ switch (_lf73){ case _st473: if (getValue(irrcrpt("sodbhu_vfruh", 3)) > hiscore_adventure){ hiscore_adventure = getValue(irrcrpt("uqfdjw_xhtwj", 5)); _nt122(); }; break; case _lq616: if (getValue(irrcrpt("qmbzfs_tdpsf", 1)) > hiscore_infinite){ hiscore_infinite = getValue(irrcrpt("rncagt_ueqtg", 2)); _nt122(); }; break; }; } final private function _th77():void{ if ((_id198 = (_id198 + 2)) >= _cr167){ _id198 = 0; }; } final private function _ug596():void{ var _local2:int; var _local3:int; var _local4:int; var _local5:int; var _local6:int; trace(irrcrpt("tqmjuJnbhft()", 1)); trace((irrcrpt("nrflj_gnyrfuifyf.qjslym = ", 5) + _vu710.length)); var _local1:int; while (_local1 < _ac34) { trace((irrcrpt("k = ", 2) + _local1)); _local2 = _pc728[_local1]; _local3 = (_vu710[_local1].width / _local2); _local4 = _vu710[_local1].height; _nu627[_local1] = new Array(_local2); _local5 = 0; while (_local5 < _local2) { _local6 = _local5; _ck107[_local1] = _local3; _et62[_local1] = _local4; _nu627[_local1][_local6] = new BitmapData(_local3, _local4, true, 0); _nu627[_local1][_local6].copyPixels(_vu710[_local1], new Rectangle((_local5 * _local3), 0, _local3, _local4), new Point(0, 0), null, null, false); _local5++; }; _local1++; }; _vu710 = null; trace(irrcrpt("HQG RI vsolwLpdjhv()", 3)); } final private function _wh295():void{ trace(irrcrpt("xskkpiJyppWgviir()", 4)); if (stage.displayState == StageDisplayState.FULL_SCREEN){ stage.displayState = StageDisplayState.NORMAL; smoothing = false; } else { stage.displayState = StageDisplayState.FULL_SCREEN; }; } final private function _fh263(_arg1:BitmapData, _arg2:BitmapData, _arg3:int, _arg4:int, _arg5:int):void{ var _local8:Number; var _local6:int = _arg2.width; var _local7:int = _arg2.height; if ((_arg5 & _tu354) != 0){ _arg3 = (_arg3 - (_local6 >> 1)); } else { if ((_arg5 & RIGHT) != 0){ _arg3 = (_arg3 - _local6); }; }; if ((_arg5 & _lb100) != 0){ _arg4 = (_arg4 - (_local7 >> 1)); }; if ((_arg5 & BOTTOM) != 0){ _arg4 = (_arg4 - _local7); }; var _local9:int; while (_local9 < _local7) { matrix = new Matrix(); if (Math.random() < 0.2){ _local8 = (-2 + (Math.random() * 3)); } else { _local8 = 0; }; matrix.translate((_arg3 + _local8), _arg4); _arg1.draw(_arg2, matrix, ((Math.random() < 0.01)) ? new ColorTransform(0.5, 0.5, 0.5, 1) : new ColorTransform(1, 1, 1, 1), null, new Rectangle(_arg3, (_arg4 + _local9), _local6, 1), false); _local9++; }; } final private function _xy644(_arg1:Number):void{ var _local6:int; var _local7:int; var _local8:int; var _local9:int; var _local2:Array = new Array(_gf723); var _local3:Array = new Array(_gf723); var _local4:Array = new Array(_gf723); var _local5:Array = new Array(_gf723); _local6 = 0; while (_local6 < _gf723) { _local2[_local6] = new Array(_hb250); _local3[_local6] = new Array(_hb250); _local4[_local6] = new Array(_hb250); _local5[_local6] = new Array(_hb250); _local7 = 0; while (_local7 < _hb250) { _lv327[_local6][_local7] = (_lv327[_local6][_local7] + ((_arg1 < 0)) ? -(_jl318) : _jl318); _local2[_local6][_local7] = _tm303[_local6][_local7]; _local3[_local6][_local7] = _wy248[_local6][_local7]; _local4[_local6][_local7] = _lv327[_local6][_local7]; _local5[_local6][_local7] = _rk569[_local6][_local7]; _local7++; }; _local6++; }; _local6 = 0; while (_local6 < _gf723) { _local7 = 0; while (_local7 < _hb250) { _local2[_local6][_local7] = _tm303[_local6][_local7]; _local3[_local6][_local7] = _wy248[_local6][_local7]; _local4[_local6][_local7] = _lv327[_local6][_local7]; _local5[_local6][_local7] = _rk569[_local6][_local7]; _local8 = ((_xk199 < 0)) ? ((_gf723 - 1) - _local7) : _local7; _local9 = ((_xk199 < 0)) ? _local6 : ((_gf723 - 1) - _local6); _tm303[_local6][_local7] = _local2[_local8][_local9]; _wy248[_local6][_local7] = _local3[_local8][_local9]; _lv327[_local6][_local7] = _local4[_local8][_local9]; _rk569[_local6][_local7] = _local5[_local8][_local9]; if (_tm303[_local6][_local7] > _do717){ _lv327[_local6][_local7] = 0; }; _local7++; }; _local6++; }; _wh142 = 0; _xk199 = 0; _ny655 = 0.1; _cr410(false); } final private function _gj271(_arg1:Boolean):void{ var _local3:int; var _local4:int; var _local6:int; var _local2:int; while (_local2 < _gf723) { _tm303[_local2] = new Array(); _lx84[_local2] = new Array(); _uy653[_local2] = new Array(); _rk569[_local2] = new Array(); _wy248[_local2] = new Array(); _lv327[_local2] = new Array(); _local6 = 0; while (_local6 < _hb250) { _tm303[_local2][_local6] = -1; _lx84[_local2][_local6] = 0; _uy653[_local2][_local6] = 0; _rk569[_local2][_local6] = false; _wy248[_local2][_local6] = 0; _lv327[_local2][_local6] = 0; if (_arg1){ _wk684(-1, -1, _local2, _local6); }; _local6++; }; _local2++; }; _wk684(((_fm177)==_eh402) ? _cl175 : _oa48, -1, 5, 5); trace((irrcrpt("igvXcnwg(ngxgn) = ", 2) + getValue(irrcrpt("ngxgn", 2)).toString())); switch (_lf73){ case _st473: _local4 = ((_ha253 + (getValue(irrcrpt("pizip", 4)) >> 1)) + 1); break; case _lq616: _local4 = ((2 + (_kp258 << 1)) + (getValue(irrcrpt("ngxgn", 2)) >> 1)); _local4 = Math.min(_local4, 10); break; }; trace((irrcrpt("uvqta_fkhhkewnva = ", 2) + _ha253)); setValue(irrcrpt("kvgou_vq_eqnngev", 2), Math.max((_local4 - 2), 1)); trace((irrcrpt("_kvgou_vq_cff = ", 2) + _local4)); trace((irrcrpt("jufnt_up_dpmmfdu = ", 1) + getValue(irrcrpt("kvgou_vq_eqnngev", 2)))); trace((irrcrpt("pizip = ", 4) + getValue(irrcrpt("ngxgn", 2)))); trace((irrcrpt("bsfbt_dmfbsfe = ", 1) + _kp258)); var _local5:int = (_aw726((_wt188 / _ps85)) * _ps85); _local3 = 0; while (_local3 < _local4) { _wk684(_vq151, (_local5 + _aw726(_ps85)), -1, -1); _local3++; }; _local3 = 0; while (_local3 < getValue(irrcrpt("ngxgn", 2))) { _wk684(_se213, -1, -1, -1); _local3++; }; _wk684(_tk597, -1, -1, -1); } final private function _ss651():Boolean{ var _local2:int; var _local1 = 1; while (_local1 < (_gf723 - 1)) { _local2 = 1; while (_local2 < (_hb250 - 1)) { if (_mb656(_local1, _local2, _wy248[_local1][_local2])){ return (true); }; _local2++; }; _local1++; }; return (false); } final private function _ci23():void{ startTransition(_my501, _sk329); } final private function setValue(_arg1:String, _arg2:Number):void{ trace(((((irrcrpt("tfuWbmvf(", 1) + _arg1) + irrcrpt(", ", 1)) + _arg2) + ")")); switch (Preloader._ob610){ case Preloader._oj325: switch (_arg1){ case irrcrpt("rncagt_ueqtg", 2): trace(irrcrpt("aq!", 2)); _dc464.setValue(_arg2, 0); break; case irrcrpt("oqxgu", 2): _tp448.setValue(_arg2); break; case irrcrpt("oqxg_equv", 2): _kx394.setValue(_arg2); break; case irrcrpt("mfwfm", 1): level.setValue(_arg2); break; case irrcrpt("pizip_xmqi", 4): _sg610.setValue(_arg2); break; case irrcrpt("mxiq_fsryw", 4): _yh11.setValue(_arg2); break; case irrcrpt("mxiqw_xs_gsppigx", 4): _ty453.setValue(_arg2); break; }; break; case Preloader._pj303: Api.setNumber(_arg1, _arg2); break; }; } final private function _bf22(_arg1:int):int{ return (((_ul529 + (_arg1 * _aw304)) + (_aw304 >> 1))); } final private function _he410(_arg1:int, _arg2:Number):void{ var _local3:Number; var _local4:Number; switch (_arg1){ case _tq302: _local3 = (_arg2 * 11); _local4 = (63.6 - (_arg2 * 698.5)); _eg432 = new ColorMatrixFilter([_local3, 0, 0, 0, _local4, 0, _local3, 0, 0, _local4, 0, 0, _local3, 0, _local4, 0, 0, 0, 1, 0]); _wp609.applyFilter(_wp609, _wp609.rect, new Point(0, 0), _eg432); break; case _bm48: _eg432 = new ColorMatrixFilter([0.3086, 0.6094, 0.082, 0, 0, 0.3086, 0.6094, 0.082, 0, 0, 0.3086, 0.6094, 0.082, 0, 0, 0, 0, 0, 1, 0]); _wp609.applyFilter(_wp609, _wp609.rect, new Point(0, 0), _eg432); break; case _hi293: _eg432 = new ColorMatrixFilter([-1, 0, 0, 0, 0xFF, 0, -1, 0, 0, 0xFF, 0, 0, -1, 0, 0xFF, 0, 0, 0, 1, 0]); _wp609.applyFilter(_wp609, _wp609.rect, new Point(0, 0), _eg432); break; case _cl271: _wp609.colorTransform(_wp609.rect, new ColorTransform((1 + _arg2), (1 + _arg2), (1 + _arg2), 1, 1, 1, 1, 1)); break; case _kg71: _wp609.colorTransform(_wp609.rect, new ColorTransform((1 - _arg2), (1 - _arg2), (1 - _arg2), 1, 1, 1, 1, 1)); break; case _wv652: _wp609.colorTransform(_wp609.rect, new ColorTransform(0.5, 0.6, 1, 1, 1, 1, 1, 1)); break; }; } final private function _vw442():void{ if ((ticks % 6) == 0){ if (++_nx287 >= _lk444[_yi616]){ _nx287 = 0; if (--_sh98 < 0){ _nu698(); }; }; }; if (--_wq553 < 0){ if (((((ticks % 2) == 0)) && ((++_mi374 >= _uh244)))){ _mi374 = 0; _wq553 = (50 + _aw726(100)); }; }; _ec200(); } final private function _tg182(_arg1:KeyboardEvent):void{ if (_kf433 == 0){ switch (_arg1.charCode){ case 122: case 90: case 97: case 65: _fl524(-1); break; case 120: case 88: case 115: case 83: _fl524(1); break; case 112: case 80: if (!_ta357){ _ta357 = true; _rm183(); }; break; case 70: case 102: _wh295(); break; }; switch (_arg1.keyCode){ case Keyboard.ESCAPE: if (!_ta357){ _ta357 = true; _rm183(); }; break; case Keyboard.LEFT: case Keyboard.RIGHT: _fl524(((_arg1.keyCode == Keyboard.LEFT)) ? -1 : 1); break; }; }; } final private function _mb656(_arg1:int, _arg2:int, _arg3:int):Boolean{ var _local5:int; var _local6:int; var _local7:int; var _local8:int; var _local9:int; var _local10:int; if (_tm303[_arg1][_arg2] > _ti728){ return (false); }; var _local4:int; while (_local4 < _is120) { _local5 = 0; while (_local5 <= 22) { _local6 = 1; _local7 = 0; while (_local7 < 2) { _local8 = (_arg1 + _ba576[(_local5 + _local7)]); _local9 = (_arg2 + _iq692[(_local5 + _local7)]); if (((((_la622(_local8, _local9)) && ((_tm303[_local8][_local9] <= _ti728)))) && (!(_rk569[_local8][_local9])))){ _local10 = _wy248[_local8][_local9]; if (_local10 == _arg3){ ++_local6; if (_local6 > 2){ return (true); }; } else { _local7 = 99; }; }; _local7++; }; _local5 = (_local5 + 2); }; _local4++; }; return (false); } final private function _ci573():void{ trace(irrcrpt("mpbeEbub()", 1)); if (Preloader._mo595 != Preloader._vx135){ try { if (save_data.data.save_exists){ hiscore_adventure = save_data.data.hiscore_adventure; hiscore_infinite = save_data.data.hiscore_infinite; }; } catch(e:Error) { trace((irrcrpt("ivvsv = ", 4) + e)); }; }; trace(irrcrpt("IRH SJ psehHexe()", 4)); } final private function _wy696():void{ if (_pv153){ _pv153 = false; SoundMixer.stopAll(); } else { _cn682(); }; } final private function _fa250(_arg1:int, _arg2:int):Number{ return ((((_arg2 * _aw304) + (_aw304 >> 1)) + _uy653[_arg1][_arg2])); } final private function _mu377(_arg1:MouseEvent):void{ var _local2:int; _ch693 = true; if (_kf433 == 0){ if (_gp281(_ur322, 2, _qk68, _ia88)){ _wy696(); } else { switch (_aw168){ case _is549: break; case _pp383: if (_fm177 != -1){ switch (_fm177){ case _mv14: _qx16(_uq644, -0.5); _dp327 = 22; _dm95 = 33; break; case _eh402: _qx16(_ss175, 0.5); _dm95 = 22; _dp327 = 33; break; }; startTransition(_my501, _io299); _xt385 = 50; _kv165(_nr212, 0, mouseX, mouseY, 32); _qx16(_yl257, 0); }; break; case _io299: _qx16(_yl257, 0); _kv165(_nr212, 0, mouseX, mouseY, 32); startTransition(_my501, ((_lf73 == _st473)) ? _mm587 : _ny514); break; case _mm587: if (_sf86 != -1){ _ha253 = _xh561[_sf86]; _qx16(_yl257, 0); _kv165(_nr212, 0, mouseX, mouseY, 32); startTransition(_my501, _ny514); }; break; case _ny514: if (_ia690()){ switch (_sn468()){ case _pa598: if (_ia690()){ _oq393(_kc113(), _hx42()); }; break; case _hj724: _fl524(-1); break; case _um509: _fl524(1); break; default: _qr155(); break; }; }; break; }; if (((((_ys160) && (!((_np643 == -1))))) && ((_fq518 <= 0)))){ _local2 = _nx12[_np643]; if (_local2 >= 0){ _kv165(_nr212, 0, mouseX, mouseY, 32); switch (_local2){ case _bo309: navigateToURL(new URLRequest(irrcrpt("jvvr://yyy.htquoq.eqo", 2)), irrcrpt("_gqfsp", 5)); break; case _fy519: if (_aw168 != _is549){ startTransition(_my501, _is549); } else { _ba377(_up25, true); }; break; case _qg69: case _cx199: _lf73 = ((_local2 == _qg69)) ? _st473 : _lq616; trace((irrcrpt("jdph_prgh = ", 3) + _lf73)); if (_aa510 == _jt402){ startTransition(_my501, _fb595); } else { startTransition(_my501, _pp383); }; break; case _yd258: _kp258 = 0; if (Preloader._mo595 == Preloader._vx135){ startTransition(_my501, _pp383); } else { _ba377(_mm638, true); }; break; case _gg265: _ba377(_jt402, true); break; case _tg481: startTransition(_my501, _en699); break; case _pa525: _al237(); break; case _ut46: _rm183(); break; case _wc260: setValue(irrcrpt("sodbhu_vfruh", 3), 0); _qy640 = 0; startTransition(_my501, _ny514); break; case _xy357: smoothing = !(smoothing); _ba377(_aa510, false); break; case _ao566: _wh295(); break; case _og268: navigateToURL(new URLRequest(irrcrpt("myyu://bbb.rjlfija.ht.zp", 5)), irrcrpt("_eodqn", 3)); break; case _fl266: navigateToURL(new URLRequest(irrcrpt("jvvr://vykvvgt.eqo/ogicfgx", 2)), irrcrpt("_eodqn", 3)); break; case _uy402: _to66 = true; startTransition(_my501, _fb595); break; }; _np643 = -1; _qx16(_yl257, 0); }; }; }; }; } final private function _bk727():void{ var _local1:int; if (_ct553 > 0){ if (--_ct553 == 0){ if (getValue(irrcrpt("qjajq", 5)) < _kl294){ _ww348.bitmap.fillRect(_ww348.bitmap.rect, 0); _hp603.bitmap.fillRect(_ww348.bitmap.rect, 0); cube.visible = true; _ww348.bitmap.copyPixels(_lo485, _lo485.rect, new Point(0, 0), null, null, false); }; }; } else { if (--_ft731 < 0){ if (getValue(irrcrpt("qsziw", 4)) > 0){ updateValue(irrcrpt("tpeciv_wgsvi", 4), 100); updateValue(irrcrpt("rtajx", 5), -1); if (getValue(irrcrpt("oqxgu", 2)) == 0){ _ft731 = 20; _qx16(_gu315, 0); } else { if ((ticks % 3) == 0){ _qx16(_gf194, 0); }; }; } else { if (getValue(irrcrpt("ohyho_wlph", 3)) > 0){ _local1 = Math.min(5, getValue(irrcrpt("mfwfm_ujnf", 1))); updateValue(irrcrpt("uqfdjw_xhtwj", 5), (_local1 * 50)); updateValue(irrcrpt("ngxgn_vkog", 2), -(_local1)); if (getValue(irrcrpt("ngxgn_vkog", 2)) <= 0){ _ft731 = 20; _qx16(_gu315, 0); } else { if ((ticks % 3) == 0){ _qx16(_gf194, 0); }; }; } else { if (getValue(irrcrpt("ngxgn", 2)) < _kl294){ _fp244(); _xl534(); _hp603.bitmap.copyPixels(_lo485, _lo485.rect, new Point(0, 0), null, null, false); cube.visible = true; _ax358 = true; _ft731 = 20; _nu525(); _qx16(_gx438, 0); } else { if (_li75 < _qr84.width){ _li75 = (_li75 + (2 + ((_qr84.width - _li75) * 0.2))); if (_li75 >= _qr84.width){ _ml454 = 2; }; } else { if ((_ml454 = (_ml454 - 0.1)) <= 0){ _rc659 = (_rc659 + (2 + ((_qr84.width - _rc659) * 0.2))); }; }; if (--_aj570 < 0){ if (_kf433 == 0){ _kp258++; _au75[_sf86] = true; if ((((_lf73 == _st473)) && ((_kp258 >= 5)))){ startTransition(_my501, _pw629); } else { startTransition(_my501, ((_lf73 == _st473)) ? _mm587 : _ny514); }; }; }; }; }; }; }; }; } final private function _jh340():void{ var _local1:int; var _local2:int; var _local3:int; var _local4:int; var _local5:int; var _local6:Boolean; var _local7:Number; var _local9:int; var _local8:int = (_mx470) ? 0 : 1; while (_local8 < (_hb250 - 1)) { _local9 = 1; while (_local9 < (_gf723 - 1)) { _local3 = _tm303[_local9][_local8]; if (((((!((_local3 == -1))) && ((_local3 > _se213)))) && ((((_local8 > 0)) || ((_uy653[_local9][_local8] > 0)))))){ _local1 = _af494(_local9); _local2 = _fa250(_local9, _local8); _local6 = false; _local7 = 1; switch (_local3){ case _oa48: case _cl175: _local4 = _rg222; if (_ce691){ _to472(_lo485, _nu627[_tk597][_sj22], 0, 1, 1, _uo389, _cq431, (_tu354 | _lb100), 1, false, false, null); }; break; case _vq151: _local4 = _wy248[_local9][_local8]; break; case _tk597: _local4 = _sj22; break; }; _kn511(_lo485, _nu627[_local3][_local4], _local1, _local2, (_tu354 | _lb100), _local7, 1, (_lv327[_local9][_local8] - _wh142), _local6); }; _local9++; }; _local8++; }; } final private function _af494(_arg1:int):Number{ return (((_arg1 * _aw304) + (_aw304 >> 1))); } final private function _lh196(_arg1:Boolean):void{ var _local3:int; var _local4:int; _mx470 = true; _kf501 = true; var _local2 = 1; while (_local2 < (_gf723 - 1)) { _local3 = 1; while (_local3 < (_hb250 - 1)) { if (_rk569[_local2][_local3]){ switch (_tm303[_local2][_local3]){ case _by370: case _oo699: case _pv215: case _bc633: case _ti728: _kv165(_tm303[_local2][_local3], 0, _ey181(_local2), _bf22(_local3), _kp223); break; }; _rk569[_local2][_local3] = false; _tm303[_local2][_local3] = -1; _local4 = _local3; while (_local4 >= 0) { _lx84[_local2][_local4] = (_arg1) ? 2 : _aw304; switch (_tm303[_local2][_local4]){ case _oa48: case _cl175: _rg222 = 8; _ao32 = _sf74; break; }; _local4--; }; }; _local3++; }; _local2++; }; } final function _eo527():void{ var _local1:int; var _local2:int; switch (_aw168){ case _bw202: _wp609.fillRect(_wp609.rect, 0xFFFFFF); _to472(_wp609, _tv538, 0, 1, 1, _oo322, _dm598, (_tu354 | _lb100), _vd477, false, false, null); _to472(_wp609, _nu627[_oa48][_rg222], 0, 1, 1, 250, (254 + _ut77), (_tu354 | BOTTOM), 1, false, false, null); _to472(_wp609, _nu627[_cl175][_rg222], 0, 1, 1, 410, (258 + _ut77), (_tu354 | BOTTOM), 1, true, false, null); break; case _fb595: case _is549: case _en699: _cc626(); break; case _pp383: _cc626(); _to472(_wp609, _be139, 0, 1, 1, _oo322, 10, (TOP | _tu354), 1, false, false, null); _to472(_wp609, _lx631, ((_fm177 == _mv14)) ? 0 : 1, 2, 1, (_rm297 - _kj710), _tp673, (_tu354 | _lb100), 1, false, false, null); _to472(_wp609, _rq112, ((_fm177 == _eh402)) ? 0 : 1, 2, 1, ((_ct229 - _rm297) + _kj710), _tp673, (_tu354 | _lb100), 1, false, false, null); _to472(_wp609, _nu627[_oa48][_dp327], 0, 1, 1, (_rm297 - _kj710), (_tp673 + (_lx631.height >> 1)), (_tu354 | _lb100), 1, false, false, null); _to472(_wp609, _nu627[_cl175][_dm95], 0, 1, 1, ((_ct229 - _rm297) + _kj710), (_tp673 + (_lx631.height >> 1)), (_tu354 | _lb100), 1, true, false, null); break; case _io299: _cc626(); _to472(_wp609, _nd302, 0, 1, 1, _oo322, _be531, (BOTTOM | _tu354), 1, false, false, null); break; case _mm587: _to472(_wp609, _cp480, 0, 1, 1, 0, 0, (TOP | LEFT), 1, false, false, null); _to472(_wp609, _nu627[((_fm177 == _eh402)) ? _cl175 : _oa48][_rg222], 0, 1, 1, 0xFF, 300, (_tu354 | _lb100), 1, false, false, null); if (_sf86 != -1){ _fh263(_wp609, _xj423[_sf86], 203, 53, (TOP | LEFT)); }; _to472(_wp609, _sh582, 0, 1, 1, _oo322, 10, (TOP | _tu354), 1, false, false, null); _local1 = 0; while (_local1 < _me374) { if (!_au75[_local1]){ _to472(_wp609, _wj12, ((_local1 == _sf86)) ? _xk102 : (_gs391 - 1), _gs391, 1, _wl542[_local1], _lg567[_local1], (_tu354 | _lb100), 1, false, false, null); _to472(_wp609, _tr647, 0, 1, 1, _wl542[_local1], (_lg567[_local1] - 8), (BOTTOM | _tu354), ((_local1 == _sf86)) ? 1 : 0.5, false, false, null); _local2 = 0; while (_local2 < _xh561[_local1]) { _to472(_wp609, _ty702, 0, 1, 1, ((_wl542[_local1] - 30) + ((_local2 % 5) * 12)), ((_lg567[_local1] - 38) + (int((_local2 / 5)) * 10)), (TOP | LEFT), ((_local1 == _sf86)) ? 1 : 0.5, false, false, null); _local2++; }; }; _local1++; }; break; case _ny514: _to472(_wp609, _ti628[_sf86], 0, 1, 1, 0, 0, (TOP | LEFT), 1, false, false, null); _local1 = -1; while (_local1 < 2) { _to472(_wp609, _hk488, ((((((_local1 == -1)) && ((_xk199 == -1)))) || ((((_local1 == 1)) && ((_xk199 == 1)))))) ? 1 : 0, _nl655, 1, ((_local1 == -1)) ? _mv83 : _be96, _mf165, (TOP | LEFT), _yl95, (_local1 == 1), false, null); _local1 = (_local1 + 2); }; if (!cube.visible){ _xl534(); }; if (!_ax358){ _kn511(_wp609, _lo485, (_oo322 + _nb502(_nr613)), (_dm598 + _nb502(_nb509)), (_tu354 | _lb100), 1, 1, (_wh142 + _nb502(_ny655)), false); }; _kn511(_wp609, _gg48, (_oo322 + _nb502(_nr613)), (_dm598 + _nb502(_nb509)), (_tu354 | _lb100), 1, 1, (_wh142 + _nb502(_ny655)), false); _to472(_wp609, ((((getValue(irrcrpt("qsziw", 4)) < 10)) && (!(_ce691)))) ? _mt146 : _dt652, 0, 1, 1, (_oo322 - 144), (_dm598 - (_gg48.height >> 1)), (LEFT | _lb100), 1, false, false, null); if ((((((getValue(irrcrpt("qsziw", 4)) > 9)) || (((ticks % 3) == 0)))) || (_ce691))){ _ih109(_wp609, _mu688, 11, getValue(irrcrpt("rtajx", 5)).toString(), (_oo322 + 69), (_dm598 - (_gg48.height >> 1)), (LEFT | _lb100), 1); }; _ih109(_wp609, _mu688, 11, getValue(irrcrpt("ngxgn_vkog", 2)).toString(), _oo322, (_dm598 + (_gg48.height >> 1)), (_lb100 | _tu354), 1); _to472(_wp609, _cj139, 0, 1, 1, 8, 8, (TOP | LEFT), 1, false, false, null); _ih109(_wp609, _ei676, 11, getValue(irrcrpt("qmbzfs_tdpsf", 1)).toString(), 8, (12 + _cj139.height), (TOP | LEFT), 1); _to472(_wp609, _pc100, 0, 1, 1, (_ct229 - 8), 8, (TOP | RIGHT), 1, false, false, null); _ih109(_wp609, _ei676, 11, ((_lf73 == _st473)) ? hiscore_adventure : hiscore_infinite.toString(), (_ct229 - 8), (12 + _pc100.height), (TOP | RIGHT), 1); _to472(_wp609, _ww125, 0, 1, 1, 8, (_be531 - 8), (BOTTOM | LEFT), 1, false, false, null); _ih109(_wp609, _ei676, 11, getValue(irrcrpt("lwhpv_wr_froohfw", 3)).toString(), (12 + _ww125.width), (_be531 - 44), (TOP | LEFT), 1); _kp610(); if ((((((_vy594 > 0)) && ((_sn468() == _pa598)))) && (_rk569[_kc113()][_hx42()]))){ _to472(_wp609, ((getValue(irrcrpt("qszi_gswx", 4)) == 1)) ? _ng537 : ((getValue(irrcrpt("qszi_gswx", 4)) == 2)) ? _bk642 : _lo195, 0, 1, 1, mouseX, mouseY, (BOTTOM | LEFT), 1, false, false, null); }; if (_ah31){ _to472(_wp609, _tr72, 0, 1, 1, (_oo322 + _fp679), _dm598, (_tu354 | _lb100), 1, false, false, null); _to472(_wp609, _ln473, 0, 1, 1, (_oo322 - _fp679), (_dm598 + 80), (TOP | _tu354), 1, false, false, null); _ih109(_wp609, _ei676, 11, (getValue(irrcrpt("qjajq", 5)).toString() + irrcrpt("/8", 3)), (((_oo322 - _fp679) + (_ln473.width >> 1)) + 4), (_dm598 + 88), (TOP | LEFT), 1); }; if (_cm486){ _he410(_wv652, 0); _to472(_wp609, _qp644, 0, 1, 1, (_dm48 + _af494(_ko590)), (_ul529 + _fa250(_ko590, (_ky468 + 2))), (_tu354 | BOTTOM), 1, false, false, null); _kn511(_wp609, _nu627[_tm303[_ko590][_ky468]][_rg222], (_dm48 + _af494(_ko590)), (_ul529 + _fa250(_ko590, _ky468)), (_tu354 | _lb100), 1, 1, 0, false); }; if (((_ce691) && ((getValue(irrcrpt("pizip", 4)) >= _kl294)))){ _wp609.copyPixels(_qr84, new Rectangle(_rc659, 0, (_li75 - _rc659), _qr84.height), new Point(((_oo322 - (_qr84.width >> 1)) + _rc659), (_dm598 - (_qr84.height >> 1))), null, null, false); if (_ml454 > 0){ _to472(_wp609, _qr84, 0, 1, 1, _oo322, _dm598, (_tu354 | _lb100), _ml454, false, false, BlendMode.ADD); }; }; if (_uh229 > 0){ _he410(_kg71, _uh229); }; break; case _pw629: _to472(_wp609, _ma144, 0, 1, 1, 0, 0, (TOP | LEFT), 1, false, false, null); _to472(_wp609, _tm378, 0, 1, 1, 27, 30, (TOP | LEFT), _ld48, false, false, null); _to472(_wp609, _mo361, 0, 1, 1, 43, 116, (TOP | LEFT), _ld48, false, false, null); _ih109(_wp609, _ei676, 11, _qy640.toString(), 93, 161, (TOP | LEFT), _ld48); _to472(_wp609, _xy209, 0, 1, 1, 43, 213, (TOP | LEFT), _ld48, false, false, null); _ih109(_wp609, _ei676, 11, getValue(irrcrpt("sodbhu_vfruh", 3)).toString(), 93, 248, (TOP | LEFT), _ld48); break; }; _to472(_wp609, _ur322, (_pv153) ? 0 : 1, 2, 1, _qk68, _ia88, (TOP | LEFT), 1, false, false, null); if (_ys160){ _tn297(); }; _es511(); if (_kd140){ _to472(_wp609, ((_fm177 == _mv14)) ? _tq316 : _dt515, (_ch693) ? 1 : 0, 2, 1, (mouseX - 4), (mouseY - 6), (TOP | LEFT), _ql319, false, false, null); }; graphics.clear(); graphics.beginBitmapFill(_wp609, null, false, smoothing); graphics.drawRect(0, 0, _ct229, _be531); graphics.endFill(); if (_kf433 != 0){ graphics.beginFill(0, _gm378); graphics.drawRect(0, 0, _ct229, _be531); graphics.endFill(); }; } final private function _ec200():void{ switch (_ao32){ case _ft329: if (((((ticks % 3) == 0)) && ((++_rg222 > 7)))){ _rg222 = 0; }; break; case _sf74: if (((((ticks % 2) == 0)) && ((++_rg222 > 12)))){ _rg222 = 10; }; break; case _kh397: if (((((ticks % 2) == 0)) && ((++_rg222 > 21)))){ if (((_ce691) || ((_aw168 == _bw202)))){ if (_aw168 == _bw202){ _qx16(_uq644, -0.5); _qx16(_ss175, 0.5); }; _ao32 = _ya50; _rg222 = 22; } else { _ao32 = _ft329; _rg222 = 0; }; }; break; case _ya50: if ((((_rg222 < 32)) && (((ticks % 3) == 0)))){ _rg222++; }; break; case _lu421: if (((((ticks % 2) == 0)) && ((++_rg222 >= _eu178)))){ _rg222 = 41; }; break; }; } final private function startTransition(_arg1:int, _arg2:int):void{ if (_kf433 == 0){ trace(((((irrcrpt("wxevxXverwmxmsr(", 4) + _arg1) + irrcrpt(", ", 2)) + _arg2) + ")")); _gy336 = _np643; _xt385 = _sb134; _kf433 = _arg1; _ll252 = _arg2; _gm378 = ((_arg1 == _my501)) ? 0 : 1; }; } final private function _ih109(_arg1:BitmapData, _arg2:BitmapData, _arg3:int, _arg4:String, _arg5:Number, _arg6:Number, _arg7:int, _arg8:Number):void{ var _local12:int; var _local14:int; var _local9:int = (_arg2.width / _arg3); var _local10:int = _arg2.height; var _local11:int = _arg4.length; if ((_arg7 & LEFT) == 0){ _local14 = (_local11 * _local9); if ((_arg7 & _tu354) != 0){ _arg5 = (_arg5 - (_local14 >> 1)); } else { if ((_arg7 & RIGHT) != 0){ _arg5 = (_arg5 - _local14); }; }; }; if ((_arg7 & _lb100) != 0){ _arg6 = (_arg6 - (_local10 >> 1)); }; if ((_arg7 & BOTTOM) != 0){ _arg6 = (_arg6 - _local10); }; var _local13:int; while (_local13 < _local11) { _local12 = (_arg4.charCodeAt(_local13) - 47); if (_arg8 < 1){ matrix = new Matrix(); matrix.translate((_arg5 - (_local12 * _local9)), _arg6); _arg1.draw(_arg2, matrix, new ColorTransform(1, 1, 1, _arg8), null, new Rectangle(_arg5, _arg6, _local9, _local10), true); } else { _arg1.copyPixels(_arg2, new Rectangle((_local12 * _local9), 0, _local9, _local10), new Point(_arg5, _arg6), null, null, true); }; _arg5 = (_arg5 + _local9); _local13++; }; } final private function _cc626():void{ var _local2:int; _to472(_wp609, _pd689, 0, 1, 1, 0, 0, (TOP | LEFT), 1, false, false, null); var _local1:int; while (_local1 < 5) { _local2 = 0; while (_local2 < 5) { _to472(_wp609, _ga479, 0, 1, 1, ((_local1 * _cr167) - _id198), ((_local2 * _cr167) - _id198), (TOP | LEFT), 1, false, false, null); _local2++; }; _local1++; }; } final private function _yw713(_arg1:BitmapData, _arg2:BitmapData, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:int, _arg8:Number, _arg9:Number):void{ var _local10:int = _arg2.width; var _local11:int = _arg2.height; if ((_arg7 & _tu354) != 0){ _arg3 = (_arg3 - ((_local10 >> 1) * _arg8)); } else { if ((_arg7 & RIGHT) != 0){ _arg3 = (_arg3 - (_local10 * _arg8)); }; }; if ((_arg7 & _lb100) != 0){ _arg4 = (_arg4 - ((_local11 >> 1) * _arg9)); }; if ((_arg7 & BOTTOM) != 0){ _arg4 = (_arg4 - (_local11 * _arg9)); }; matrix = new Matrix(); matrix.scale(_arg8, _arg9); matrix.translate(_arg3, _arg4); _arg1.draw(_arg2, matrix, new ColorTransform(_arg6, _arg6, _arg6, _arg5), null, null, true); } final private function _qr155():void{ var _local2:int; var _local1:int; while (_local1 < _gf723) { _local2 = 0; while (_local2 < _hb250) { _rk569[_local1][_local2] = false; _local2++; }; _local1++; }; } final private function _qh246():void{ var _local2:int; _mx470 = false; var _local1 = 1; while (_local1 < (_gf723 - 1)) { _local2 = (_hb250 - 1); while (_local2 >= 0) { if (_tm303[_local1][_local2] != -1){ if (_lx84[_local1][_local2] > 0){ _mx470 = true; if (_lx84[_local1][_local2] < _aw304){ _lx84[_local1][_local2] = (_lx84[_local1][_local2] + _vc24); }; _uy653[_local1][_local2] = (_uy653[_local1][_local2] + _lx84[_local1][_local2]); if (_uy653[_local1][_local2] >= _aw304){ _tm303[_local1][(_local2 + 1)] = _tm303[_local1][_local2]; _tm303[_local1][_local2] = -1; _wy248[_local1][(_local2 + 1)] = _wy248[_local1][_local2]; _lv327[_local1][(_local2 + 1)] = _lv327[_local1][_local2]; _lx84[_local1][(_local2 + 1)] = _lx84[_local1][_local2]; _uy653[_local1][_local2] = 0; _uy653[_local1][(_local2 + 1)] = 0; if ((((_local2 == (_hb250 - 2))) || ((((_tm303[_local1][(_local2 + 2)] > -1)) && ((_lx84[_local1][(_local2 + 2)] == 0)))))){ _lx84[_local1][_local2] = 0; _lx84[_local1][(_local2 + 1)] = 0; switch (_tm303[_local1][(_local2 + 1)]){ case _oa48: case _cl175: if (_lx84[_local1][(_local2 + 1)] == 0){ _ao32 = _kh397; _rg222 = 13; if (_fm177 == _eh402){ _nb509 = 12; }; }; break; }; }; if (_local2 == 0){ _wk684(_ur245, -1, _local1, _local2); }; }; }; }; _local2--; }; _local1++; }; if (!_mx470){ _kf501 = false; _vy594 = 0; _ni411 = -1; _cr410(true); }; } final private function _kn511(_arg1:BitmapData, _arg2:BitmapData, _arg3:Number, _arg4:Number, _arg5:int, _arg6:Number, _arg7:Number, _arg8:Number, _arg9:Boolean):void{ var _local10:int; var _local11:int; if ((((_arg7 == 1)) && ((_arg8 == 0)))){ _to472(_arg1, _arg2, 0, 1, 1, _arg3, _arg4, _arg5, _arg6, _arg9, false, null); } else { _local10 = _arg2.width; _local11 = _arg2.height; if ((_arg5 & _tu354) != 0){ _arg3 = (_arg3 - (_local10 >> 1)); } else { if ((_arg5 & RIGHT) != 0){ _arg3 = (_arg3 - _local10); }; }; if ((_arg5 & _lb100) != 0){ _arg4 = (_arg4 - (_local11 >> 1)); }; if ((_arg5 & BOTTOM) != 0){ _arg4 = (_arg4 - _local11); }; matrix = new Matrix(); if (_arg9){ matrix.scale(-1, 1); matrix.translate(_local10, 0); }; matrix.translate((-(_local10) / 2), (-(_local11) / 2)); matrix.rotate(_arg8); matrix.translate((_local10 / 2), (_local11 / 2)); matrix.translate(_arg3, _arg4); _arg1.draw(_arg2, matrix, (((!((_arg6 == 1))) || (!((_arg7 == 1))))) ? new ColorTransform(_arg7, _arg7, _arg7, _arg6) : null, null, null, true); }; } final private function _fp244():void{ updateValue(irrcrpt("mfwfm", 1), 1); _to66 = false; _yl95 = 0; _ah31 = true; _ce691 = false; _ql319 = 1; _cm486 = false; paused = false; _ax358 = false; _fp679 = _ct229; _aj570 = 100; setValue(irrcrpt("qjajq_ynrj", 5), 99); setValue(irrcrpt("mxiq_fsryw", 4), 1000); cube.visible = false; cube.rotationY = _jq541; setValue(irrcrpt("qsziw", 4), _be158); _wh142 = 0; _xk199 = 0; _ny655 = 0; _nr613 = 0; _nb509 = 0; _kf501 = false; _mx470 = false; _id153 = false; _sj22 = 0; _uo389 = 0; _cq431 = 0; _wq553 = 100; _mi374 = 0; _ni411 = -1; _vy594 = 0; _rc659 = 0; _li75 = 0; _rl251 = 100; _ml454 = 0; _gj271(true); _mu456 = 0; _ot476(_bd300, _bo309, 0, 504, 420, (_tu354 | _lb100)); } final private function _gp281(_arg1:BitmapData, _arg2:int, _arg3:int, _arg4:int):Boolean{ if ((((((((mouseX > _arg3)) && ((mouseX < (_arg3 + (_arg1.width / _arg2)))))) && ((mouseY > _arg4)))) && ((mouseY < (_arg4 + _arg1.height))))){ return (true); }; return (false); } final private function _cn682():void{ _pv153 = true; switch (_aw168){ default: _so342(_kx480, true, _px730); break; case _ny514: _so342(((_fm177)==_eh402) ? _rm141 : _ht481, true, _px730); break; }; } final private function _vk23():void{ startTransition(_my501, _is549); } final private function _es511():void{ var _local1:int; while (_local1 < _tf19) { if (_wm312[_local1] > 0){ _yw713(_wp609, _ra667[_bb214[_local1]], _bh155[_local1], _cn440[_local1], 1, 1, (_tu354 | _lb100), _wm312[_local1], _wm312[_local1]); }; _local1++; }; } final private function _ot313():void{ var _local1:int; var _local2:int; var _local3:int; if (((((!((mouseX == _aa431))) || (!((mouseY == _gn26))))) && (!((_aw168 == _fb595))))){ _pr476(); _aa431 = mouseX; _gn26 = mouseY; }; ticks++; if ((((_kf433 == 0)) && (_ys160))){ _iy135(); }; switch (_aw168){ case _bw202: if (_vd477 < 1){ _vd477 = (_vd477 + 0.1); }; _ec200(); if (_ut77 < 0){ _ut77 = (_ut77 + _he453++); if (_ut77 >= 0){ _ut77 = 0; _ao32 = _kh397; _rg222 = 13; }; }; if (--_mf321 == 0){ startTransition(_my501, _is549); }; break; case _is549: case _en699: case _io299: case _fb595: trace((irrcrpt("nfov_yp = ", 1) + _fq518)); _th77(); break; case _pp383: _th77(); if (_kf433 == 0){ _kj710 = Math.max(0, (_kj710 = (_kj710 - Math.max(1, (_kj710 * 0.6))))); if (_kj710 <= 0){ _local1 = _fm177; _fm177 = ((_sn468() == _hu657)) ? _mv14 : ((_sn468() == _xt306)) ? _eh402 : -1; if (((!((_fm177 == -1))) && (!((_fm177 == _local1))))){ _local1 = _fm177; _qx16(_nt134, 0); }; }; if ((ticks % 3) == 0){ if (++_dp327 > 7){ _dp327 = 0; }; if (++_dm95 > 7){ _dm95 = 0; }; }; } else { switch (_fm177){ case _mv14: if (((((ticks % 3) == 0)) && ((_dp327 < 32)))){ _dp327++; }; if (((((ticks % 2) == 0)) && ((++_dm95 >= _eu178)))){ _dm95 = 41; }; break; case _eh402: if (((((ticks % 3) == 0)) && ((_dm95 < 32)))){ _dm95++; }; if (((((ticks % 2) == 0)) && ((++_dp327 >= _eu178)))){ _dp327 = 41; }; break; }; }; break; case _mm587: if (((((ticks % 3) == 0)) && ((++_rg222 > 7)))){ _rg222 = 0; }; if (((((ticks % 2) == 0)) && ((++_xk102 >= _gs391)))){ _xk102 = 0; }; if (_kf433 == 0){ _local2 = -1; _local3 = 0; while (_local3 < _me374) { if ((((((((mouseX > (_wl542[_local3] - (_ac89 >> 1)))) && ((mouseX < (_wl542[_local3] + (_ac89 >> 1)))))) && ((mouseY > (_lg567[_local3] - (_ac89 >> 1)))))) && ((mouseY < (_lg567[_local3] + (_ac89 >> 1)))))){ _local2 = _local3; }; _local3++; }; if (_local2 != _sf86){ _sf86 = _local2; if (_sf86 != -1){ _qx16(_nt134, 0); }; }; }; break; case _ny514: if (!paused){ if (!_ax358){ if (_ah31){ _fp679--; if (_fp679 > 0){ _fp679 = (_fp679 * 0.9); } else { _fp679 = (_fp679 + _fp679); }; if (_fp679 < -(_ct229)){ _ah31 = false; }; }; if (_xk199 != 0){ _ng666(); } else { if (_ny655 > 0){ _ny655 = Math.max((_ny655 = (_ny655 - 0.01)), 0); }; if (_mx470){ _qh246(); }; }; if (_nr613 > 0){ _nr613 = Math.max((_nr613 = (_nr613 - 0.5)), 0); }; if (_nb509 > 0){ _nb509 = Math.max((_nb509 = (_nb509 - 0.5)), 0); }; _vw442(); if (((((_id153) && (((ticks % 3) == 0)))) && ((++_sj22 >= _fh534)))){ _sj22 = 10; }; if (((((((((!(_ah31)) && (!(_cm486)))) && (!(_ce691)))) && ((getValue(irrcrpt("pizip_xmqi", 4)) > 0)))) && (((ticks % 30) == 0)))){ updateValue(irrcrpt("pizip_xmqi", 4), -1); }; }; _xl128(); if (_ce691){ _bk727(); }; if (_ax358){ cube.rotationY = (cube.rotationY + (1 + ((270 - cube.rotationY) * 0.1))); if (cube.rotationY >= 270){ _ax358 = false; _nr613 = 9; cube.visible = false; cube.rotationY = _jq541; }; }; if (_uh229 > 0){ _uh229 = (_uh229 - 0.1); }; if (((_cm486) && ((--_xm561 == 0)))){ _ba377(_gn266, true); }; } else { if (_uh229 < 0.65){ _uh229 = (_uh229 + 0.05); }; }; if (((_ce691) && ((_yl95 > 0)))){ _yl95 = (_yl95 - 0.1); } else { if (((!(_ah31)) && ((_yl95 < 1)))){ _yl95 = (_yl95 + 0.1); }; }; if (((_ce691) && ((_ql319 > 0)))){ _ql319 = (_ql319 - 0.05); }; break; case _pw629: if (_ld48 < 1){ _ld48 = (_ld48 + 0.01); }; break; }; _af503(); if (_kf433 != 0){ _ql534(); }; } final private function _sn468():int{ var _local1:int; while (_local1 < _td255) { if ((((((((mouseX >= _mh703[_local1])) && ((mouseX <= (_mh703[_local1] + _wy724[_local1]))))) && ((mouseY >= _ee76[_local1])))) && ((mouseY <= (_ee76[_local1] + _wf34[_local1]))))){ return (_kg508[_local1]); }; _local1++; }; return (-1); } final private function _kc113():int{ return (((mouseX - _dm48) / _aw304)); } final private function _xj588():void{ var _local2:int; var _local1 = 1; while (_local1 < (_gf723 - 1)) { _local2 = 1; while (_local2 < (_hb250 - 1)) { switch (_tm303[_local1][_local2]){ case _oa48: case _cl175: _ko590 = _local1; _ky468 = _local2; _local1 = _gf723; _local2 = _hb250; break; }; _local2++; }; _local1++; }; } final private function _al237():void{ paused = false; _ys160 = false; _mu456 = 0; _ot476(_bd300, _bo309, 0, 504, 420, (_tu354 | _lb100)); } final private function _ur209(_arg1:KeyboardEvent):void{ switch (_arg1.keyCode){ case 112: case 80: _ta357 = false; break; }; switch (_arg1.keyCode){ case Keyboard.ESCAPE: _ta357 = false; break; case Keyboard.CONTROL: _ju552 = false; break; }; } final private function _so342(_arg1:Sound, _arg2:Boolean, _arg3:Number):void{ if (_pv153){ _nt547.stop(); _lf590 = 1; _ve619 = _arg1; _vc645.volume = _na124; _nt547 = _arg1.play(_arg3, 0); _nt547.soundTransform = _vc645; if (_arg2){ _nt547.addEventListener(Event.SOUND_COMPLETE, _le242); }; }; } final private function _tn297():void{ var _local1:Boolean; var _local2:Number; var _local3:Number; var _local4:int; while (_local4 < _mu456) { _local1 = false; _local2 = _ei577[_local4]; if (_nx12[_np643] > -1){ if ((((((_gy336 == -1)) && ((_np643 == _local4)))) || ((_local4 == _gy336)))){ _local1 = true; }; }; if (_nx12[_local4] == _lf244){ _local2 = (_local2 - (_tp601 + _nb502(_dj212))); }; if (((!((_gy336 == -1))) && ((_local4 == _gy336)))){ _local3 = 1.1; } else { _local3 = (_local1) ? (1 + (Math.sin(_du647) * 0.1)) : 1; }; if (((!((_local4 == _gy336))) || (((ticks % 2) == 0)))){ _yw713(_wp609, _up449[_local4], (_kh108[_local4] + ((_nx12[_local4] > -1)) ? (((_local4 % 2) == 0)) ? _fq518 : -(_fq518) : 0), _local2, 1, 1, (_tu354 | _lb100), _local3, _local3); }; _local4++; }; } final private function _yx438(_arg1:MouseEvent):void{ _ch693 = false; } final private function _rw268(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int):void{ trace(((irrcrpt("fiiHqnhpfgqjFwjf(", 5) + _arg1) + ")")); if ((_arg6 & _tu354) != 0){ _arg2 = (_arg2 - (_arg4 >> 1)); } else { if ((_arg6 & RIGHT) != 0){ _arg2 = (_arg2 - _arg4); }; }; if ((_arg6 & _lb100) != 0){ _arg3 = (_arg3 - (_arg5 >> 1)); }; if ((_arg6 & BOTTOM) != 0){ _arg3 = (_arg3 - _arg5); }; _mh703[_mt420] = _arg2; _ee76[_mt420] = _arg3; _wy724[_mt420] = _arg4; _wf34[_mt420] = _arg5; _kg508[_mt420] = _arg1; _mt420++; } final private function _tf336():int{ var _local1:int; while (_local1 < _mu456) { if ((((((((mouseX > (_kh108[_local1] - (_cm325[_local1] >> 1)))) && ((mouseX < (_kh108[_local1] + (_cm325[_local1] >> 1)))))) && ((mouseY > (_ei577[_local1] - (_up449[_local1].height >> 1)))))) && ((mouseY < (_ei577[_local1] + (_up449[_local1].height >> 1)))))){ return (_local1); }; _local1++; }; return (-1); } final private function _xl534():void{ _lo485.fillRect(_lo485.rect, 0); _ck267(); _jh340(); } final private function _ui643():void{ if (!_ce691){ _ys160 = false; _ce691 = true; _ct553 = 80; }; } final private function _wk684(_arg1:int, _arg2:int, _arg3:int, _arg4:int):void{ var _local5:int; if (_arg1 == _ur245){ _arg1 = _aw726((_ti728 + ((_kp258 > 2)) ? 1 : 0)); }; if ((((_arg3 == -1)) && ((_arg4 == -1)))){ do { _arg3 = (1 + _aw726((_gf723 - 2))); _arg4 = (1 + _aw726((_hb250 - 2))); _local5 = (Math.abs((_ko590 - _arg3)) + Math.abs((_ky468 - _arg4))); } while ((((((((_arg3 == _ko590)) || ((_arg4 == _ky468)))) || ((_tm303[_arg3][_arg4] > _ti728)))) || ((_local5 < 3)))); }; _tm303[_arg3][_arg4] = _arg1; _wy248[_arg3][_arg4] = 0; _lv327[_arg3][_arg4] = 0; switch (_arg1){ case _vq151: _wy248[_arg3][_arg4] = _arg2; break; case _oa48: case _cl175: _ko590 = _arg3; _ky468 = _arg4; _ao32 = _ft329; _rg222 = 0; break; }; if (_arg1 < _ti728){ _wy248[_arg3][_arg4] = 0; }; } final private function _rm352(_arg1:int, _arg2:int, _arg3:int, _arg4:int):Boolean{ if (((!(_la622(_arg3, _arg4))) || (_rk569[_arg3][_arg4]))){ return (false); }; var _local5:int = _tm303[_arg3][_arg4]; switch (_local5){ case _by370: case _oo699: case _pv215: case _bc633: case _ti728: if (_local5 == _ni411){ return (true); }; }; return (false); } final private function _cr410(_arg1:Boolean):void{ var _local2:int; var _local3:int; var _local4:int; if (((!(_cm486)) && (!(_ce691)))){ _xj588(); switch (_tm303[_ko590][(_ky468 + 1)]){ case _vq151: _qr155(); if (getValue(irrcrpt("nyjrx_yt_htqqjhy", 5)) > 0){ updateValue(irrcrpt("nyjrx_yt_htqqjhy", 5), -1); }; _qy640++; updateValue(irrcrpt("qmbzfs_tdpsf", 1), getValue(irrcrpt("lwhp_erqxv", 3))); _gj692(getValue(irrcrpt("lwhp_erqxv", 3)).toString(), _ey181(_ko590), _bf22(_ky468), -1); updateValue(irrcrpt("kvgo_dqpwu", 2), 1000); _kv165(_nr212, 0, _ey181(_ko590), _bf22((_ky468 + 1)), _kp223); _tm303[_ko590][(_ky468 + 1)] = -1; _rk569[_ko590][(_ky468 + 1)] = true; _lh196(!((_ao32 == _sf74))); _qx16(_ao586, 0); _qx16(((_fm177)==_eh402) ? _uk197 : _uq367, _sw510(_ey181(_ko590))); break; case _tk597: if (_id153){ _qr155(); _uo389 = ((_ko590 * _aw304) + (_aw304 >> 1)); _cq431 = (((_ky468 + 1) * _aw304) + (_aw304 >> 1)); _local4 = ((_kp258 + 1) * 1000); updateValue(irrcrpt("sodbhu_vfruh", 3), _local4); _gj692(_local4.toString(), _ey181(_ko590), _bf22(_ky468), -1); _qr155(); _tm303[_ko590][(_ky468 + 1)] = -1; _rk569[_ko590][(_ky468 + 1)] = true; _lh196(!((_ao32 == _sf74))); _ui643(); _qx16(_gd231, 0); _qx16(((_fm177)==_eh402) ? _ss175 : _uq644, _sw510(_ey181(_ko590))); }; break; }; }; if (((!(_id153)) && ((getValue(irrcrpt("kvgou_vq_eqnngev", 2)) <= 0)))){ setValue(irrcrpt("mxiqw_xs_gsppigx", 4), 0); _id153 = true; _qx16(_nm500, _sw510(_ey181(_ky468))); }; if (((((((_arg1) && (!(_ce691)))) && (!(_cm486)))) && (!((_ao32 == _sf74))))){ if ((((((((_tm303[(_ko590 - 1)][_ky468] == _vq151)) || ((_tm303[(_ko590 + 1)][_ky468] == _vq151)))) || ((_tm303[_ko590][(_ky468 - 1)] == _vq151)))) || (((_id153) && ((((((_tm303[(_ko590 - 1)][_ky468] == _tk597)) || ((_tm303[(_ko590 + 1)][_ky468] == _tk597)))) || ((_tm303[_ko590][(_ky468 - 1)] == _tk597)))))))){ } else { if ((((getValue(irrcrpt("pryhv", 3)) <= 0)) || ((((getValue(irrcrpt("rtajx", 5)) == 1)) && (!(_ss651())))))){ _oh571(); }; }; }; trace((irrcrpt("kvsytwViqemrmrk() = ", 4) + _ss651())); } final private function _nu698():void{ do { _uf590 = (1 + _aw726((_gf723 - 2))); _aw377 = (1 + _aw726((_hb250 - 2))); } while (_tm303[_uf590][_aw377] > _se213); _nx287 = 0; _sh98 = (2 + _aw726(4)); _yi616 = _yc453; if (_uf590 > (_ko590 + 2)){ _yi616 = _nv38; } else { if (_uf590 < (_ko590 - 2)){ _yi616 = _dd192; } else { _yi616 = _yc453; }; }; } final private function _af503():void{ var _local1:int; while (_local1 < _tf19) { if (_wm312[_local1] > 0){ _bh155[_local1] = (_bh155[_local1] + _om225[_local1]); _cn440[_local1] = (_cn440[_local1] + _uy241[_local1]); _om225[_local1] = (_om225[_local1] * 0.9); _uy241[_local1] = (_uy241[_local1] * 0.9); _wm312[_local1] = (_wm312[_local1] - _tb396); }; _local1++; }; } final private function _fl524(_arg1:int):void{ if ((((_aw168 == _ny514)) && (_ia690()))){ _xk199 = _arg1; _qx16(((Math.random() < 0.5)) ? _eq320 : _sl185, 0); }; } final private function _nb502(_arg1:Number):Number{ return ((paused) ? 0 : ((-(_arg1) / 2) + (Math.random() * _arg1))); } final private function _rm183():void{ if (Preloader._mo595 != Preloader._vx135){ if ((((((((((_aw168 == _ny514)) && (!(_cm486)))) && (!(_ce691)))) && (!(paused)))) && (!(_ax358)))){ paused = true; _uh229 = 0; _qx16(_yl257, 0); _ba377(_ts293, true); }; }; } final private function _xl128():void{ var _local1:int; while (_local1 < _rn477) { if (_jx296[_local1] > 0){ _lv643[_local1] = (_lv643[_local1] - _ik628[_local1]); if ((_ik628[_local1] = (_ik628[_local1] * 0.95)) < 0.5){ _jx296[_local1] = (_jx296[_local1] - 0.05); }; }; _local1++; }; } final private function _nt122():void{ var _wl319:String; trace(irrcrpt("xfajIfyf()", 5)); if (Preloader._mo595 != Preloader._vx135){ try { _wl319 = save_data.flush(); if (_wl319 == SharedObjectFlushStatus.PENDING){ save_data.addEventListener(NetStatusEvent.NET_STATUS, onStatus); } else { if (_wl319 == SharedObjectFlushStatus.FLUSHED){ save_data.data.save_exists = true; save_data.data.hiscore_adventure = hiscore_adventure; save_data.data.hiscore_infinite = hiscore_infinite; save_data.removeEventListener(NetStatusEvent.NET_STATUS, onStatus); }; }; } catch(e:Error) { trace((irrcrpt("jwwtw = ", 5) + e)); Security.showSettings(SecurityPanel.LOCAL_STORAGE); }; }; trace(irrcrpt("FOE PG tbwfEbub()", 1)); } final private function _iy135():void{ var _local1:int; if (_tp601 > 0){ if ((_tp601 = (_tp601 - _qi421)) <= 0){ _dj212 = 24; }; } else { if (_dj212 > 0){ _dj212 = (_dj212 - 2); }; }; if (_ys160){ _du647 = (_du647 + 0.5); if (_fq518 > 0){ _fq518 = Math.max(0, (_fq518 = (_fq518 - Math.max(1, (_fq518 * 0.6))))); } else { if (_kf433 == 0){ _local1 = _tf336(); if (_local1 != _np643){ _np643 = _local1; if ((((_np643 >= 0)) && ((_nx12[_np643] >= 0)))){ _qx16(_nt134, 0); }; }; }; }; }; } final private function updateValue(_arg1:String, _arg2:int):void{ var _local3:int; switch (Preloader._ob610){ case Preloader._oj325: switch (_arg1){ case irrcrpt("rncagt_ueqtg", 2): _dc464.addValue(_arg2); break; case irrcrpt("pryhv", 3): _tp448.addValue(_arg2); break; case irrcrpt("npwf_dptu", 1): _kx394.addValue(_arg2); break; case irrcrpt("qjajq", 5): level.addValue(_arg2); break; case irrcrpt("ohyho_wlph", 3): _sg610.addValue(_arg2); break; case irrcrpt("lwhp_erqxv", 3): _yh11.addValue(_arg2); break; case irrcrpt("mxiqw_xs_gsppigx", 4): _ty453.addValue(_arg2); break; }; break; case Preloader._pj303: _local3 = getValue(_arg1); _local3 = (_local3 + _arg2); setValue(_arg1, _local3); break; }; } final private function _la622(_arg1:int, _arg2:int):Boolean{ if ((((((((_arg1 < 1)) || ((_arg1 >= (_gf723 - 1))))) || ((_arg2 < 1)))) || ((_arg2 >= (_hb250 - 1))))){ return (false); }; return (true); } final private function onStatus(_arg1:NetStatusEvent):void{ if (_arg1.info.code == irrcrpt("XmfwjiTgojhy.Kqzxm.Xzhhjxx", 5)){ } else { if (_arg1.info.code == irrcrpt("VkduhgRemhfw.Ioxvk.Idlohg", 3)){ }; }; save_data.removeEventListener(NetStatusEvent.NET_STATUS, onStatus); } final private function _sw510(_arg1:int):Number{ return (((_arg1 / _oo322) - 1)); } final private function _qx16(_arg1:Sound, _arg2:Number):void{ if (_pv153){ _dn349.volume = _mx278; _dn349.pan = _arg2; _ai459 = _arg1.play(0, 1); _ai459.soundTransform = _dn349; }; } override protected function init3d():void{ default_camera.z = -1710; cube = new Cube(new MaterialsList({front:_ww348, back:null, left:_hp603, right:null, top:null, bottom:null}), _re629, _re629, _re629, 4, 4, 4); default_scene.addChild(cube); default_camera.zoom = _ja24; cube.visible = false; } final private function getValue(_arg1:String):Number{ switch (Preloader._ob610){ case Preloader._oj325: switch (_arg1){ case irrcrpt("qmbzfs_tdpsf", 1): return (_dc464.value); case irrcrpt("rtajx", 5): return (_tp448.value); case irrcrpt("rtaj_htxy", 5): return (_kx394.value); case irrcrpt("qjajq", 5): return (level.value); case irrcrpt("mfwfm_ujnf", 1): return (_sg610.value); case irrcrpt("nyjr_gtszx", 5): return (_yh11.value); case irrcrpt("jufnt_up_dpmmfdu", 1): return (_ty453.value); }; break; case Preloader._pj303: return (Api.getNumber(_arg1)); }; return (-666); } final private function _aw726(_arg1:int):int{ return (Math.round(((Preloader._mo595 == Preloader._fl304)) ? Api.random(_arg1) : (Math.random() * (_arg1 - 1)))); } final private function _pr476():void{ Mouse.hide(); _kd140 = true; } final private function _dm475():void{ var _local3:int; var _local1:int; var _local2:int; while (_local2 < _nu627.length) { _local3 = 0; while (_local3 < _nu627[_local2].length) { _to472(_wp609, _nu627[_local2][_local3], 0, 1, 1, (_local3 * _ck107[_local2]), _local1, (TOP | LEFT), 1, false, false, null); _local3++; }; _local1 = (_local1 + _et62[_local2]); _local2++; }; } } }//package
Section 117
//BlockSquad__ai499 (BlockSquad__ai499) package { import mx.core.*; public class BlockSquad__ai499 extends BitmapAsset { } }//package
Section 118
//BlockSquad__am722 (BlockSquad__am722) package { import mx.core.*; public class BlockSquad__am722 extends BitmapAsset { } }//package
Section 119
//BlockSquad__ao153 (BlockSquad__ao153) package { import mx.core.*; public class BlockSquad__ao153 extends BitmapAsset { } }//package
Section 120
//BlockSquad__ap222 (BlockSquad__ap222) package { import mx.core.*; public class BlockSquad__ap222 extends SoundAsset { } }//package
Section 121
//BlockSquad__ap518 (BlockSquad__ap518) package { import mx.core.*; public class BlockSquad__ap518 extends BitmapAsset { } }//package
Section 122
//BlockSquad__aq536 (BlockSquad__aq536) package { import mx.core.*; public class BlockSquad__aq536 extends BitmapAsset { } }//package
Section 123
//BlockSquad__au124 (BlockSquad__au124) package { import mx.core.*; public class BlockSquad__au124 extends BitmapAsset { } }//package
Section 124
//BlockSquad__bk131 (BlockSquad__bk131) package { import mx.core.*; public class BlockSquad__bk131 extends SoundAsset { } }//package
Section 125
//BlockSquad__bm310 (BlockSquad__bm310) package { import mx.core.*; public class BlockSquad__bm310 extends SoundAsset { } }//package
Section 126
//BlockSquad__br347 (BlockSquad__br347) package { import mx.core.*; public class BlockSquad__br347 extends BitmapAsset { } }//package
Section 127
//BlockSquad__bs482 (BlockSquad__bs482) package { import mx.core.*; public class BlockSquad__bs482 extends BitmapAsset { } }//package
Section 128
//BlockSquad__cd508 (BlockSquad__cd508) package { import mx.core.*; public class BlockSquad__cd508 extends SoundAsset { } }//package
Section 129
//BlockSquad__ci438 (BlockSquad__ci438) package { import mx.core.*; public class BlockSquad__ci438 extends BitmapAsset { } }//package
Section 130
//BlockSquad__ci55 (BlockSquad__ci55) package { import mx.core.*; public class BlockSquad__ci55 extends BitmapAsset { } }//package
Section 131
//BlockSquad__cp489 (BlockSquad__cp489) package { import mx.core.*; public class BlockSquad__cp489 extends BitmapAsset { } }//package
Section 132
//BlockSquad__cy269 (BlockSquad__cy269) package { import mx.core.*; public class BlockSquad__cy269 extends BitmapAsset { } }//package
Section 133
//BlockSquad__df421 (BlockSquad__df421) package { import mx.core.*; public class BlockSquad__df421 extends BitmapAsset { } }//package
Section 134
//BlockSquad__dn112 (BlockSquad__dn112) package { import mx.core.*; public class BlockSquad__dn112 extends BitmapAsset { } }//package
Section 135
//BlockSquad__du600 (BlockSquad__du600) package { import mx.core.*; public class BlockSquad__du600 extends BitmapAsset { } }//package
Section 136
//BlockSquad__dx322 (BlockSquad__dx322) package { import mx.core.*; public class BlockSquad__dx322 extends BitmapAsset { } }//package
Section 137
//BlockSquad__ec550 (BlockSquad__ec550) package { import mx.core.*; public class BlockSquad__ec550 extends BitmapAsset { } }//package
Section 138
//BlockSquad__ee242 (BlockSquad__ee242) package { import mx.core.*; public class BlockSquad__ee242 extends BitmapAsset { } }//package
Section 139
//BlockSquad__em115 (BlockSquad__em115) package { import mx.core.*; public class BlockSquad__em115 extends BitmapAsset { } }//package
Section 140
//BlockSquad__ex376 (BlockSquad__ex376) package { import mx.core.*; public class BlockSquad__ex376 extends BitmapAsset { } }//package
Section 141
//BlockSquad__ex384 (BlockSquad__ex384) package { import mx.core.*; public class BlockSquad__ex384 extends BitmapAsset { } }//package
Section 142
//BlockSquad__fi349 (BlockSquad__fi349) package { import mx.core.*; public class BlockSquad__fi349 extends BitmapAsset { } }//package
Section 143
//BlockSquad__fj235 (BlockSquad__fj235) package { import mx.core.*; public class BlockSquad__fj235 extends SoundAsset { } }//package
Section 144
//BlockSquad__fl728 (BlockSquad__fl728) package { import mx.core.*; public class BlockSquad__fl728 extends BitmapAsset { } }//package
Section 145
//BlockSquad__fy75 (BlockSquad__fy75) package { import mx.core.*; public class BlockSquad__fy75 extends BitmapAsset { } }//package
Section 146
//BlockSquad__gb80 (BlockSquad__gb80) package { import mx.core.*; public class BlockSquad__gb80 extends BitmapAsset { } }//package
Section 147
//BlockSquad__gk716 (BlockSquad__gk716) package { import mx.core.*; public class BlockSquad__gk716 extends BitmapAsset { } }//package
Section 148
//BlockSquad__gk76 (BlockSquad__gk76) package { import mx.core.*; public class BlockSquad__gk76 extends BitmapAsset { } }//package
Section 149
//BlockSquad__gm560 (BlockSquad__gm560) package { import mx.core.*; public class BlockSquad__gm560 extends BitmapAsset { } }//package
Section 150
//BlockSquad__go202 (BlockSquad__go202) package { import mx.core.*; public class BlockSquad__go202 extends BitmapAsset { } }//package
Section 151
//BlockSquad__gw526 (BlockSquad__gw526) package { import mx.core.*; public class BlockSquad__gw526 extends BitmapAsset { } }//package
Section 152
//BlockSquad__hd310 (BlockSquad__hd310) package { import mx.core.*; public class BlockSquad__hd310 extends BitmapAsset { } }//package
Section 153
//BlockSquad__hg541 (BlockSquad__hg541) package { import mx.core.*; public class BlockSquad__hg541 extends SoundAsset { } }//package
Section 154
//BlockSquad__hu686 (BlockSquad__hu686) package { import mx.core.*; public class BlockSquad__hu686 extends SoundAsset { } }//package
Section 155
//BlockSquad__ib104 (BlockSquad__ib104) package { import mx.core.*; public class BlockSquad__ib104 extends BitmapAsset { } }//package
Section 156
//BlockSquad__ij128 (BlockSquad__ij128) package { import mx.core.*; public class BlockSquad__ij128 extends BitmapAsset { } }//package
Section 157
//BlockSquad__in533 (BlockSquad__in533) package { import mx.core.*; public class BlockSquad__in533 extends SoundAsset { } }//package
Section 158
//BlockSquad__iq328 (BlockSquad__iq328) package { import mx.core.*; public class BlockSquad__iq328 extends SoundAsset { } }//package
Section 159
//BlockSquad__ir580 (BlockSquad__ir580) package { import mx.core.*; public class BlockSquad__ir580 extends BitmapAsset { } }//package
Section 160
//BlockSquad__iv431 (BlockSquad__iv431) package { import mx.core.*; public class BlockSquad__iv431 extends SoundAsset { } }//package
Section 161
//BlockSquad__ix411 (BlockSquad__ix411) package { import mx.core.*; public class BlockSquad__ix411 extends SoundAsset { } }//package
Section 162
//BlockSquad__jk677 (BlockSquad__jk677) package { import mx.core.*; public class BlockSquad__jk677 extends BitmapAsset { } }//package
Section 163
//BlockSquad__jq462 (BlockSquad__jq462) package { import mx.core.*; public class BlockSquad__jq462 extends SoundAsset { } }//package
Section 164
//BlockSquad__jv162 (BlockSquad__jv162) package { import mx.core.*; public class BlockSquad__jv162 extends BitmapAsset { } }//package
Section 165
//BlockSquad__jy97 (BlockSquad__jy97) package { import mx.core.*; public class BlockSquad__jy97 extends BitmapAsset { } }//package
Section 166
//BlockSquad__kd210 (BlockSquad__kd210) package { import mx.core.*; public class BlockSquad__kd210 extends BitmapAsset { } }//package
Section 167
//BlockSquad__ke281 (BlockSquad__ke281) package { import mx.core.*; public class BlockSquad__ke281 extends BitmapAsset { } }//package
Section 168
//BlockSquad__kp718 (BlockSquad__kp718) package { import mx.core.*; public class BlockSquad__kp718 extends BitmapAsset { } }//package
Section 169
//BlockSquad__kp83 (BlockSquad__kp83) package { import mx.core.*; public class BlockSquad__kp83 extends SoundAsset { } }//package
Section 170
//BlockSquad__la14 (BlockSquad__la14) package { import mx.core.*; public class BlockSquad__la14 extends SoundAsset { } }//package
Section 171
//BlockSquad__le67 (BlockSquad__le67) package { import mx.core.*; public class BlockSquad__le67 extends SoundAsset { } }//package
Section 172
//BlockSquad__lg379 (BlockSquad__lg379) package { import mx.core.*; public class BlockSquad__lg379 extends BitmapAsset { } }//package
Section 173
//BlockSquad__lv67 (BlockSquad__lv67) package { import mx.core.*; public class BlockSquad__lv67 extends BitmapAsset { } }//package
Section 174
//BlockSquad__lx469 (BlockSquad__lx469) package { import mx.core.*; public class BlockSquad__lx469 extends SoundAsset { } }//package
Section 175
//BlockSquad__mb216 (BlockSquad__mb216) package { import mx.core.*; public class BlockSquad__mb216 extends BitmapAsset { } }//package
Section 176
//BlockSquad__md149 (BlockSquad__md149) package { import mx.core.*; public class BlockSquad__md149 extends BitmapAsset { } }//package
Section 177
//BlockSquad__mi596 (BlockSquad__mi596) package { import mx.core.*; public class BlockSquad__mi596 extends SoundAsset { } }//package
Section 178
//BlockSquad__mj411 (BlockSquad__mj411) package { import mx.core.*; public class BlockSquad__mj411 extends BitmapAsset { } }//package
Section 179
//BlockSquad__mk94 (BlockSquad__mk94) package { import mx.core.*; public class BlockSquad__mk94 extends BitmapAsset { } }//package
Section 180
//BlockSquad__ms248 (BlockSquad__ms248) package { import mx.core.*; public class BlockSquad__ms248 extends BitmapAsset { } }//package
Section 181
//BlockSquad__mv309 (BlockSquad__mv309) package { import mx.core.*; public class BlockSquad__mv309 extends BitmapAsset { } }//package
Section 182
//BlockSquad__mx682 (BlockSquad__mx682) package { import mx.core.*; public class BlockSquad__mx682 extends SoundAsset { } }//package
Section 183
//BlockSquad__na287 (BlockSquad__na287) package { import mx.core.*; public class BlockSquad__na287 extends BitmapAsset { } }//package
Section 184
//BlockSquad__nk130 (BlockSquad__nk130) package { import mx.core.*; public class BlockSquad__nk130 extends BitmapAsset { } }//package
Section 185
//BlockSquad__nm613 (BlockSquad__nm613) package { import mx.core.*; public class BlockSquad__nm613 extends SoundAsset { } }//package
Section 186
//BlockSquad__nx560 (BlockSquad__nx560) package { import mx.core.*; public class BlockSquad__nx560 extends SoundAsset { } }//package
Section 187
//BlockSquad__og145 (BlockSquad__og145) package { import mx.core.*; public class BlockSquad__og145 extends BitmapAsset { } }//package
Section 188
//BlockSquad__ol661 (BlockSquad__ol661) package { import mx.core.*; public class BlockSquad__ol661 extends BitmapAsset { } }//package
Section 189
//BlockSquad__ox415 (BlockSquad__ox415) package { import mx.core.*; public class BlockSquad__ox415 extends BitmapAsset { } }//package
Section 190
//BlockSquad__pe104 (BlockSquad__pe104) package { import mx.core.*; public class BlockSquad__pe104 extends BitmapAsset { } }//package
Section 191
//BlockSquad__pg438 (BlockSquad__pg438) package { import mx.core.*; public class BlockSquad__pg438 extends SoundAsset { } }//package
Section 192
//BlockSquad__ps384 (BlockSquad__ps384) package { import mx.core.*; public class BlockSquad__ps384 extends BitmapAsset { } }//package
Section 193
//BlockSquad__py513 (BlockSquad__py513) package { import mx.core.*; public class BlockSquad__py513 extends BitmapAsset { } }//package
Section 194
//BlockSquad__qk370 (BlockSquad__qk370) package { import mx.core.*; public class BlockSquad__qk370 extends BitmapAsset { } }//package
Section 195
//BlockSquad__qt135 (BlockSquad__qt135) package { import mx.core.*; public class BlockSquad__qt135 extends BitmapAsset { } }//package
Section 196
//BlockSquad__rd375 (BlockSquad__rd375) package { import mx.core.*; public class BlockSquad__rd375 extends BitmapAsset { } }//package
Section 197
//BlockSquad__rg645 (BlockSquad__rg645) package { import mx.core.*; public class BlockSquad__rg645 extends BitmapAsset { } }//package
Section 198
//BlockSquad__rh351 (BlockSquad__rh351) package { import mx.core.*; public class BlockSquad__rh351 extends BitmapAsset { } }//package
Section 199
//BlockSquad__rl726 (BlockSquad__rl726) package { import mx.core.*; public class BlockSquad__rl726 extends BitmapAsset { } }//package
Section 200
//BlockSquad__rn115 (BlockSquad__rn115) package { import mx.core.*; public class BlockSquad__rn115 extends SoundAsset { } }//package
Section 201
//BlockSquad__rv420 (BlockSquad__rv420) package { import mx.core.*; public class BlockSquad__rv420 extends BitmapAsset { } }//package
Section 202
//BlockSquad__sa407 (BlockSquad__sa407) package { import mx.core.*; public class BlockSquad__sa407 extends BitmapAsset { } }//package
Section 203
//BlockSquad__sc114 (BlockSquad__sc114) package { import mx.core.*; public class BlockSquad__sc114 extends BitmapAsset { } }//package
Section 204
//BlockSquad__sd185 (BlockSquad__sd185) package { import mx.core.*; public class BlockSquad__sd185 extends BitmapAsset { } }//package
Section 205
//BlockSquad__se676 (BlockSquad__se676) package { import mx.core.*; public class BlockSquad__se676 extends BitmapAsset { } }//package
Section 206
//BlockSquad__sf458 (BlockSquad__sf458) package { import mx.core.*; public class BlockSquad__sf458 extends SoundAsset { } }//package
Section 207
//BlockSquad__sg442 (BlockSquad__sg442) package { import mx.core.*; public class BlockSquad__sg442 extends SoundAsset { } }//package
Section 208
//BlockSquad__ss480 (BlockSquad__ss480) package { import mx.core.*; public class BlockSquad__ss480 extends BitmapAsset { } }//package
Section 209
//BlockSquad__sv115 (BlockSquad__sv115) package { import mx.core.*; public class BlockSquad__sv115 extends BitmapAsset { } }//package
Section 210
//BlockSquad__sv561 (BlockSquad__sv561) package { import mx.core.*; public class BlockSquad__sv561 extends BitmapAsset { } }//package
Section 211
//BlockSquad__tp700 (BlockSquad__tp700) package { import mx.core.*; public class BlockSquad__tp700 extends BitmapAsset { } }//package
Section 212
//BlockSquad__uu88 (BlockSquad__uu88) package { import mx.core.*; public class BlockSquad__uu88 extends SoundAsset { } }//package
Section 213
//BlockSquad__uv160 (BlockSquad__uv160) package { import mx.core.*; public class BlockSquad__uv160 extends BitmapAsset { } }//package
Section 214
//BlockSquad__uw469 (BlockSquad__uw469) package { import mx.core.*; public class BlockSquad__uw469 extends BitmapAsset { } }//package
Section 215
//BlockSquad__uy103 (BlockSquad__uy103) package { import mx.core.*; public class BlockSquad__uy103 extends SoundAsset { } }//package
Section 216
//BlockSquad__va601 (BlockSquad__va601) package { import mx.core.*; public class BlockSquad__va601 extends BitmapAsset { } }//package
Section 217
//BlockSquad__wm611 (BlockSquad__wm611) package { import mx.core.*; public class BlockSquad__wm611 extends BitmapAsset { } }//package
Section 218
//BlockSquad__wp644 (BlockSquad__wp644) package { import mx.core.*; public class BlockSquad__wp644 extends BitmapAsset { } }//package
Section 219
//BlockSquad__vq287 (BlockSquad__vq287) package { import mx.core.*; public class BlockSquad__vq287 extends BitmapAsset { } }//package
Section 220
//BlockSquad__vw451 (BlockSquad__vw451) package { import mx.core.*; public class BlockSquad__vw451 extends BitmapAsset { } }//package
Section 221
//BlockSquad__vv453 (BlockSquad__vv453) package { import mx.core.*; public class BlockSquad__vv453 extends BitmapAsset { } }//package
Section 222
//BlockSquad__vv589 (BlockSquad__vv589) package { import mx.core.*; public class BlockSquad__vv589 extends BitmapAsset { } }//package
Section 223
//BlockSquad__vy628 (BlockSquad__vy628) package { import mx.core.*; public class BlockSquad__vy628 extends BitmapAsset { } }//package
Section 224
//BlockSquad__xf298 (BlockSquad__xf298) package { import mx.core.*; public class BlockSquad__xf298 extends BitmapAsset { } }//package
Section 225
//BlockSquad__xk277 (BlockSquad__xk277) package { import mx.core.*; public class BlockSquad__xk277 extends BitmapAsset { } }//package
Section 226
//BlockSquad__xn470 (BlockSquad__xn470) package { import mx.core.*; public class BlockSquad__xn470 extends BitmapAsset { } }//package
Section 227
//BlockSquad__xt460 (BlockSquad__xt460) package { import mx.core.*; public class BlockSquad__xt460 extends SoundAsset { } }//package
Section 228
//BlockSquad__yi265 (BlockSquad__yi265) package { import mx.core.*; public class BlockSquad__yi265 extends BitmapAsset { } }//package
Section 229
//BlockSquad__yi351 (BlockSquad__yi351) package { import mx.core.*; public class BlockSquad__yi351 extends BitmapAsset { } }//package
Section 230
//BlockSquad__yo602 (BlockSquad__yo602) package { import mx.core.*; public class BlockSquad__yo602 extends BitmapAsset { } }//package
Section 231
//BlockSquad__yy95 (BlockSquad__yy95) package { import mx.core.*; public class BlockSquad__yy95 extends BitmapAsset { } }//package
Section 232
//irrcrpt (irrcrpt) package { public function irrcrpt(_arg1:String, _arg2:int):String{ var _local5:int; var _local3:String = new String(); var _local4:int; while (_local4 < _arg1.length) { _local5 = _arg1.charCodeAt(_local4); if ((((_local5 >= 48)) && ((_local5 <= 57)))){ _local5 = ((_local5 - _arg2) - 48); if (_local5 < 0){ _local5 = (_local5 + ((57 - 48) + 1)); }; _local5 = ((_local5 % ((57 - 48) + 1)) + 48); } else { if ((((_local5 >= 65)) && ((_local5 <= 90)))){ _local5 = ((_local5 - _arg2) - 65); if (_local5 < 0){ _local5 = (_local5 + ((90 - 65) + 1)); }; _local5 = ((_local5 % ((90 - 65) + 1)) + 65); } else { if ((((_local5 >= 97)) && ((_local5 <= 122)))){ _local5 = ((_local5 - _arg2) - 97); if (_local5 < 0){ _local5 = (_local5 + ((122 - 97) + 1)); }; _local5 = ((_local5 % ((122 - 97) + 1)) + 97); }; }; }; _local3 = (_local3 + String.fromCharCode(_local5)); _local4++; }; return (_local3); } }//package
Section 233
//PaperBase (PaperBase) package { import flash.events.*; import flash.display.*; import org.papervision3d.view.*; import org.papervision3d.render.*; import org.papervision3d.cameras.*; import org.papervision3d.scenes.*; public class PaperBase extends Sprite { public var renderer:BasicRenderEngine; public var default_camera:Camera3D; public var default_scene:Scene3D; public var viewport:Viewport3D; protected function init3d():void{ } protected function init2d():void{ } protected function initPapervision(_arg1:Number, _arg2:Number):void{ viewport = new Viewport3D(_arg1, _arg2, false, true, true, true); addChild(viewport); renderer = new BasicRenderEngine(); default_scene = new Scene3D(); default_camera = new Camera3D(); } protected function initEvents():void{ addEventListener(Event.ENTER_FRAME, onEnterFrame); } public function init(_arg1:Number=800, _arg2:Number=600):void{ initPapervision(_arg1, _arg2); init3d(); init2d(); initEvents(); } protected function onEnterFrame(_arg1:Event):void{ processFrame(); renderer.renderScene(default_scene, default_camera, viewport); } protected function processFrame():void{ } } }//package
Section 234
//Preloader (Preloader) package { import flash.display.*; import flash.events.*; import flash.geom.*; import mochi.as3.*; import frosmo.*; import flash.net.*; import flash.utils.*; public dynamic class Preloader extends MovieClip { private const _qm152:int = 406; private const _oo322:int; private const _mochiads_game_id:String; private const _pc662:Boolean = true; private const _dm598:int; private var _nj523:Boolean;// = false private var _qf366:String; private var _bm58:Bitmap; private var _ul687:Sprite; private var _ao24:Number;// = 0 private var _or90:Class; private var _sh512:Boolean;// = false private var _js392:Boolean;// = false private var _rx433:Boolean;// = false private var _ij422:Boolean;// = false private var _mo216:Boolean;// = false private var _lj488:Sprite; private var _sq495:Number;// = 0 private var _tn349:Boolean;// = true public static const _fx397:int = 1; public static const _ct229:int = 640; public static const _be531:int = 480; public static const _dk400:int = 2; public static const _vx135:int = 0; public static const _ea392:Class = Preloader__ea392; public static const _rs402:int = 5; public static const _ku615:Bitmap = Bitmap(new _ea392()); public static const _vn116:int = 4; public static const _gr242:int = 3; public static const _nv602:int = -1; public static const _oj325:int = 0; public static const _pj303:int = 1; public static var _bs587:Boolean = true; public static var _ti316:Array = new Array(5); public static var _ru200:Boolean = true; public static var _ob610:int = 0; public static var host:String; public static var _mo595:int = -1; public static var _fl304:Boolean = false; public static var _cy97:Boolean = true; public function Preloader(){ _mochiads_game_id = irrcrpt("7675he721g98h900", 4); _oo322 = (_ct229 >> 1); _dm598 = (_be531 >> 1); _or90 = Preloader__or90; _ul687 = new Sprite(); _lj488 = new Sprite(); super(); host = this.root.loaderInfo.url.split("/")[2]; if (_mo595 == -1){ if (_la467(irrcrpt("lpohsfhbuf.dpn", 1))){ _mo595 = _gr242; } else { if (_la467(irrcrpt("okpflqnv.eqo", 2))){ _mo595 = _dk400; } else { if (_la467(irrcrpt("evqsvkeqiw.gsq", 4))){ _mo595 = _fx397; }; }; }; }; switch (_mo595){ case _nv602: _ru200 = true; _cy97 = true; _fl304 = false; _tn349 = true; _qf366 = irrcrpt("lxxt://aaa.jvswqs.gsq", 4); break; case _vx135: _ru200 = false; _bs587 = false; _nj523 = true; _fl304 = true; _tn349 = true; _qf366 = irrcrpt("myyu://bbb.kwtxrt.htr", 5); break; case _fx397: _tn349 = false; _ru200 = true; _bs587 = false; break; case _gr242: _ru200 = false; _tn349 = true; _qf366 = irrcrpt("iuuq://bsnpshbnft.dpn", 1); _bs587 = false; break; case _dk400: _tn349 = false; _ru200 = false; _bs587 = false; break; case _vn116: _ti316[0] = irrcrpt("ekwxeki.wlsgoaezi.gsq", 4); _ti316[1] = irrcrpt("ehhmgxmrkkeqiw.gsq", 4); _ru200 = true; _tn349 = false; _bs587 = false; break; case _rs402: _ti316[0] = irrcrpt("fsipts.htr", 5); _sh512 = false; _ru200 = true; _tn349 = true; _qf366 = irrcrpt("kwws://zzz.dqgnrq.frp", 3); break; }; if (_fl304){ Api.connect(irrcrpt("GE01I895OV", 4), this, _km127, onConnected); }; var _local1 = (_ti316[0] == undefined); var _local2:int; while (_local2 < _ti316.length) { trace((((irrcrpt("xnyj_qthp_zwq[", 5) + _local2) + irrcrpt("] = ", 5)) + _ti316[_local2])); if (((!((_ti316[_local2] == undefined))) && ((host.indexOf(_ti316[_local2]) == (host.length - _ti316[_local2].length))))){ trace(irrcrpt("wmxi mw so!", 4)); _local1 = true; _local2 = _ti316.length; }; _local2++; }; if (_local1){ MochiServices.connect(_mochiads_game_id, root); if (_tn349){ _ul687.addChild(Bitmap(new _or90())); _ul687.x = (_oo322 - (_ul687.width >> 1)); _ul687.y = ((_dm598 - (_ul687.height >> 1)) - (_ku615.height >> 1)); _ul687.addEventListener(MouseEvent.MOUSE_DOWN, _if381); _ul687.tabEnabled = false; _ul687.buttonMode = true; addChild(_ul687); }; if (_cy97){ MochiAd.showPreGameAd({clip:root, id:_mochiads_game_id, res:irrcrpt("862z602", 2), background:13429999, color:7321558, outline:7321558, no_bg:true, ad_finished:_kx357, ad_failed:_kx357, ad_skipped:_kx357}); }; stop(); stage.focus = this; addEventListener(Event.ENTER_FRAME, onEnterFrame); }; } public function onEnterFrame(_arg1:Event):void{ if (_rx433){ if (_ul687.alpha > 0){ _ul687.alpha = (_ul687.alpha - 0.1); } else { if ((_ao24 = (_ao24 + 0.05)) > 1.2){ init(); } else { graphics.beginFill(0xFFFFFF, _ao24); graphics.drawRect(0, 0, _ct229, _be531); graphics.endFill(); }; }; } else { if (_js392){ if (_lj488.alpha < 1){ _lj488.alpha = (_lj488.alpha + 0.1); }; }; }; } final private function _kx357():void{ _ij422 = true; if (((_fl304) && (_mo216))){ _pp123(); } else { _rx433 = true; }; } final private function init():void{ var _local2:Object; trace(irrcrpt("mrmx()", 4)); if (_tn349){ removeChild(_ul687); _ul687 = null; }; removeEventListener(Event.ENTER_FRAME, onEnterFrame); nextFrame(); var _local1:Class = Class(getDefinitionByName(irrcrpt("FpsgoWuyeh", 4))); if (_local1){ _local2 = new (_local1); addChild((_local2 as DisplayObject)); }; } final private function _ho31():void{ if (!_rx433){ _lj488.removeEventListener(MouseEvent.MOUSE_DOWN, _sk404, false); removeChild(_lj488); _rx433 = true; }; } final private function _of643(_arg1:Event):void{ trace(irrcrpt("ehPsehivEhhihXsWxeki!!!", 4)); } final private function _km127(_arg1:String):void{ trace(((irrcrpt("htquoqGttqt(", 2) + _arg1) + ")")); Api.connect(irrcrpt("EC89G673MT", 2), this, _km127, onConnected); } final private function _sk404(_arg1:MouseEvent):void{ trace(irrcrpt("eqpvkpwgEnkemgf", 2)); _ho31(); } final private function onConnected():void{ trace(irrcrpt("gsptnp bqj dpoofdufe", 1)); _mo216 = true; if (_ij422){ _pp123(); }; } final private function _if381(_arg1:MouseEvent):void{ _ul687.removeEventListener(MouseEvent.MOUSE_DOWN, _if381, false); navigateToURL(new URLRequest(_qf366), irrcrpt("_dncpm", 2)); } final private function _la467(_arg1:String):Boolean{ if (host.indexOf(_arg1) == (host.length - _arg1.length)){ return (true); }; return (false); } final private function _pp123():void{ _js392 = true; _lj488.addChild(_ku615); _lj488.x = (_oo322 - (_lj488.width >> 1)); _lj488.y = _qm152; _lj488.addEventListener(MouseEvent.MOUSE_DOWN, _sk404); _lj488.tabEnabled = false; addChild(_lj488); _lj488.alpha = 0; _lj488.mouseEnabled = true; _lj488.buttonMode = true; } public static function _to472(_arg1:BitmapData, _arg2:BitmapData, _arg3:Number, _arg4:Number):void{ _arg1.copyPixels(_arg2, _arg2.rect, new Point(_arg3, _arg4), null, null, true); } } }//package
Section 235
//Preloader__ea392 (Preloader__ea392) package { import mx.core.*; public class Preloader__ea392 extends BitmapAsset { } }//package
Section 236
//Preloader__or90 (Preloader__or90) package { import mx.core.*; public class Preloader__or90 extends BitmapAsset { } }//package

Library Items

Symbol 1 Bitmap {BlockSquad__hd310}
Symbol 2 Bitmap {Preloader__or90}
Symbol 3 Sound {BlockSquad__uu88} [BlockSquad__uu88]
Symbol 4 Sound {BlockSquad__sg442} [BlockSquad__sg442]
Symbol 5 Sound {BlockSquad__jq462} [BlockSquad__jq462]
Symbol 6 Sound {BlockSquad__mi596} [BlockSquad__mi596]
Symbol 7 Sound {BlockSquad__nm613} [BlockSquad__nm613]
Symbol 8 Sound {BlockSquad__mx682} [BlockSquad__mx682]
Symbol 9 Sound {BlockSquad__iq328} [BlockSquad__iq328]
Symbol 10 Sound {BlockSquad__ap222} [BlockSquad__ap222]
Symbol 11 Sound {BlockSquad__rn115} [BlockSquad__rn115]
Symbol 12 Sound {BlockSquad__lx469} [BlockSquad__lx469]
Symbol 13 Sound {BlockSquad__ix411} [BlockSquad__ix411]
Symbol 14 Sound {BlockSquad__bm310} [BlockSquad__bm310]
Symbol 15 Sound {BlockSquad__sf458} [BlockSquad__sf458]
Symbol 16 Sound {BlockSquad__uy103} [BlockSquad__uy103]
Symbol 17 Sound {BlockSquad__nx560} [BlockSquad__nx560]
Symbol 18 Sound {BlockSquad__cd508} [BlockSquad__cd508]
Symbol 19 Sound {BlockSquad__bk131} [BlockSquad__bk131]
Symbol 20 Sound {BlockSquad__hg541} [BlockSquad__hg541]
Symbol 21 Sound {BlockSquad__xt460} [BlockSquad__xt460]
Symbol 22 Sound {BlockSquad__hu686} [BlockSquad__hu686]
Symbol 23 Sound {BlockSquad__la14} [BlockSquad__la14]
Symbol 24 Sound {BlockSquad__in533} [BlockSquad__in533]
Symbol 25 Sound {BlockSquad__le67} [BlockSquad__le67]
Symbol 26 Sound {BlockSquad__kp83} [BlockSquad__kp83]
Symbol 27 Sound {BlockSquad__pg438} [BlockSquad__pg438]
Symbol 28 Sound {BlockSquad__fj235} [BlockSquad__fj235]
Symbol 29 Sound {BlockSquad__iv431} [BlockSquad__iv431]
Symbol 30 Bitmap {BlockSquad__au124}
Symbol 31 Bitmap {BlockSquad__ms248}
Symbol 32 Bitmap {BlockSquad__du600}
Symbol 33 Bitmap {BlockSquad__ex376}
Symbol 34 Bitmap {BlockSquad__jv162}
Symbol 35 Bitmap {BlockSquad__ao153}
Symbol 36 Bitmap {BlockSquad__ps384}
Symbol 37 Bitmap {BlockSquad__mb216}
Symbol 38 Bitmap {BlockSquad__em115}
Symbol 39 Bitmap {BlockSquad__ib104}
Symbol 40 Bitmap {BlockSquad__ij128}
Symbol 41 Bitmap {BlockSquad__jk677}
Symbol 42 Bitmap {BlockSquad__pe104}
Symbol 43 Bitmap {BlockSquad__uw469}
Symbol 44 Bitmap {BlockSquad__ci55}
Symbol 45 Bitmap {BlockSquad__vq287}
Symbol 46 Bitmap {BlockSquad__sd185}
Symbol 47 Bitmap {BlockSquad__uv160}
Symbol 48 Bitmap {BlockSquad__ci438}
Symbol 49 Bitmap {BlockSquad__vv453}
Symbol 50 Bitmap {BlockSquad__gb80}
Symbol 51 Bitmap {BlockSquad__wp644}
Symbol 52 Bitmap {BlockSquad__xn470}
Symbol 53 Bitmap {BlockSquad__og145}
Symbol 54 Bitmap {BlockSquad__gk76}
Symbol 55 Bitmap {BlockSquad__ap518}
Symbol 56 Bitmap {BlockSquad__ec550}
Symbol 57 Bitmap {BlockSquad__jy97}
Symbol 58 Bitmap {BlockSquad__mj411}
Symbol 59 Bitmap {BlockSquad__ee242}
Symbol 60 Bitmap {BlockSquad__yi265}
Symbol 61 Bitmap {BlockSquad__am722}
Symbol 62 Bitmap {BlockSquad__se676}
Symbol 63 Bitmap {BlockSquad__sv115}
Symbol 64 Bitmap {BlockSquad__yy95}
Symbol 65 Bitmap {BlockSquad__cp489}
Symbol 66 Bitmap {BlockSquad__dn112}
Symbol 67 Bitmap {BlockSquad__rg645}
Symbol 68 Bitmap {BlockSquad__vw451}
Symbol 69 Bitmap {BlockSquad__py513}
Symbol 70 Bitmap {BlockSquad__ss480}
Symbol 71 Bitmap {BlockSquad__gk716}
Symbol 72 Bitmap {BlockSquad__dx322}
Symbol 73 Bitmap {BlockSquad__go202}
Symbol 74 Bitmap {BlockSquad__cy269}
Symbol 75 Bitmap {BlockSquad__mk94}
Symbol 76 Bitmap {BlockSquad__ox415}
Symbol 77 Bitmap {BlockSquad__nk130}
Symbol 78 Bitmap {BlockSquad__yi351}
Symbol 79 Bitmap {BlockSquad__gm560}
Symbol 80 Bitmap {BlockSquad__kp718}
Symbol 81 Bitmap {BlockSquad__mv309}
Symbol 82 Bitmap {BlockSquad__fi349}
Symbol 83 Bitmap {BlockSquad__wm611}
Symbol 84 Bitmap {BlockSquad__ol661}
Symbol 85 Bitmap {BlockSquad__sc114}
Symbol 86 Bitmap {BlockSquad__vv589}
Symbol 87 Bitmap {BlockSquad__ai499}
Symbol 88 Bitmap {BlockSquad__na287}
Symbol 89 Bitmap {BlockSquad__fl728}
Symbol 90 Bitmap {BlockSquad__df421}
Symbol 91 Bitmap {BlockSquad__qt135}
Symbol 92 Bitmap {BlockSquad__vy628}
Symbol 93 Bitmap {BlockSquad__lv67}
Symbol 94 Bitmap {BlockSquad__gw526}
Symbol 95 Bitmap {BlockSquad__qk370}
Symbol 96 Bitmap {BlockSquad__xf298}
Symbol 97 Bitmap {BlockSquad__fy75}
Symbol 98 Bitmap {BlockSquad__yo602}
Symbol 99 Bitmap {BlockSquad__rh351}
Symbol 100 Bitmap {BlockSquad__ex384}
Symbol 101 Bitmap {BlockSquad__md149}
Symbol 102 Bitmap {BlockSquad__tp700}
Symbol 103 Bitmap {BlockSquad__bs482}
Symbol 104 Bitmap {BlockSquad__lg379}
Symbol 105 Bitmap {BlockSquad__ke281}
Symbol 106 Bitmap {BlockSquad__kd210}
Symbol 107 Bitmap {BlockSquad__sa407}
Symbol 108 Bitmap {BlockSquad__rv420}
Symbol 109 Bitmap {BlockSquad__ir580}
Symbol 110 Bitmap {BlockSquad__rl726}
Symbol 111 Bitmap {BlockSquad__xk277}
Symbol 112 Bitmap {BlockSquad__aq536}
Symbol 113 Bitmap {BlockSquad__rd375}
Symbol 114 Bitmap {BlockSquad__va601}
Symbol 115 Bitmap {BlockSquad__br347}
Symbol 116 Bitmap {BlockSquad__sv561}

Special Tags

FileAttributes (69)Timeline Frame 1Access network only, Metadata present, AS3.
SWFMetaData (77)Timeline Frame 1458 bytes "<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'><rdf:Description rdf:about='' xmlns ..."
ScriptLimits (65)Timeline Frame 1MaxRecursionDepth: 1000, ScriptTimeout: 60 seconds
ExportAssets (56)Timeline Frame 2Symbol 3 as "BlockSquad__uu88"
ExportAssets (56)Timeline Frame 2Symbol 4 as "BlockSquad__sg442"
ExportAssets (56)Timeline Frame 2Symbol 5 as "BlockSquad__jq462"
ExportAssets (56)Timeline Frame 2Symbol 6 as "BlockSquad__mi596"
ExportAssets (56)Timeline Frame 2Symbol 7 as "BlockSquad__nm613"
ExportAssets (56)Timeline Frame 2Symbol 8 as "BlockSquad__mx682"
ExportAssets (56)Timeline Frame 2Symbol 9 as "BlockSquad__iq328"
ExportAssets (56)Timeline Frame 2Symbol 10 as "BlockSquad__ap222"
ExportAssets (56)Timeline Frame 2Symbol 11 as "BlockSquad__rn115"
ExportAssets (56)Timeline Frame 2Symbol 12 as "BlockSquad__lx469"
ExportAssets (56)Timeline Frame 2Symbol 13 as "BlockSquad__ix411"
ExportAssets (56)Timeline Frame 2Symbol 14 as "BlockSquad__bm310"
ExportAssets (56)Timeline Frame 2Symbol 15 as "BlockSquad__sf458"
ExportAssets (56)Timeline Frame 2Symbol 16 as "BlockSquad__uy103"
ExportAssets (56)Timeline Frame 2Symbol 17 as "BlockSquad__nx560"
ExportAssets (56)Timeline Frame 2Symbol 18 as "BlockSquad__cd508"
ExportAssets (56)Timeline Frame 2Symbol 19 as "BlockSquad__bk131"
ExportAssets (56)Timeline Frame 2Symbol 20 as "BlockSquad__hg541"
ExportAssets (56)Timeline Frame 2Symbol 21 as "BlockSquad__xt460"
ExportAssets (56)Timeline Frame 2Symbol 22 as "BlockSquad__hu686"
ExportAssets (56)Timeline Frame 2Symbol 23 as "BlockSquad__la14"
ExportAssets (56)Timeline Frame 2Symbol 24 as "BlockSquad__in533"
ExportAssets (56)Timeline Frame 2Symbol 25 as "BlockSquad__le67"
ExportAssets (56)Timeline Frame 2Symbol 26 as "BlockSquad__kp83"
ExportAssets (56)Timeline Frame 2Symbol 27 as "BlockSquad__pg438"
ExportAssets (56)Timeline Frame 2Symbol 28 as "BlockSquad__fj235"
ExportAssets (56)Timeline Frame 2Symbol 29 as "BlockSquad__iv431"
SerialNumber (41)Timeline Frame 1

Labels

"Preloader"Frame 1
"BlockSquad"Frame 2




http://swfchan.com/19/90938/info.shtml
Created: 28/3 -2019 04:23:08 Last modified: 28/3 -2019 04:23:08 Server time: 14/11 -2024 18:20:32