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 (_arg1:String, _arg2:Object):void{
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
(_arg1:Object):String{
return ("");
}
public static function getImmediateClassPath(_arg1:Object):String{
var _local2:String;
var _local3:String;
_local2 = getQualifiedClassName(_arg1);
_local3 = 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 _local2:XML;
var _local3:Array;
var _local4:String;
var _local5:XML;
var _local6:String;
_local2 = describeType(_arg1);
_local3 = [];
_local4 = 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 ary:Array;
var xmlDoc:XML;
var item:XML;
var name:String;
var type:String;
var value:Object;
var obj = _arg1;
ary = [];
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.utils.*;
import com.blitzagency.xray.logger.events.*;
import flash.net.*;
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.(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. == "error")))) && (connected))){
connected = false;
} else {
if ((((_arg1. == "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 :Number;
private var :String;// = ""
private var classPackage:String;
private var :Object;
private var message:String;
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();
((str));
} else {
("");
};
(p_message);
(p_dump);
setLevel(p_level);
(p_dump);
};
}
public function setLevel(_arg1:Number):void{
= _arg1;
}
public function getCaller():String{
return ();
}
public function (_arg1:String):void{
message = _arg1;
}
public function getLevel():Number{
return ();
}
public function getDump():Object{
return ();
}
public function (_arg1:String):void{
= _arg1;
}
public function (_arg1:Object):void{
classPackage = ObjectTools.getImmediateClassPath(_arg1);
}
public function getMessage():String{
return (message);
}
public function getClassPackage():String{
return (classPackage);
}
public function (_arg1:Object):void{
= _arg1;
}
private function (_arg1:String):String{
var ary:Array;
var str = _arg1;
ary = [];
try {
str = str.split("\n").join("");
ary = str.split("\tat ");
str = ary[3];
} catch(e:Error) {
} finally {
str = "";
};
return (str);
}
}
}//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
:XrayLogger;
public function XrayLog(){
= XrayLogger.getInstance();
}
public function debug(_arg1:String, ... _args):void{
var _local3:Number;
if (_args.length == 0){
.debug(new Log(_arg1, null, XrayLogger.DEBUG));
};
_local3 = 0;
while (_local3 < _args.length) {
if (_local3 > 0){
_arg1 = "";
};
.debug(new Log(_arg1, _args[_local3], XrayLogger.DEBUG));
_local3++;
};
}
public function fatal(_arg1:String, ... _args):void{
var _local3:Number;
if (_args.length == 0){
.fatal(new Log(_arg1, null, XrayLogger.FATAL));
};
_local3 = 0;
while (_local3 < _args.length) {
if (_local3 > 0){
_arg1 = "";
};
.fatal(new Log(_arg1, _args[_local3], XrayLogger.FATAL));
_local3++;
};
}
public function info(_arg1:String, ... _args):void{
var _local3:Number;
if (_args.length == 0){
.info(new Log(_arg1, null, XrayLogger.INFO));
};
_local3 = 0;
while (_local3 < _args.length) {
if (_local3 > 0){
_arg1 = "";
};
.info(new Log(_arg1, _args[_local3], XrayLogger.INFO));
_local3++;
};
}
public function warn(_arg1:String, ... _args):void{
var _local3:Number;
if (_args.length == 0){
.warn(new Log(_arg1, null, XrayLogger.WARN));
};
_local3 = 0;
while (_local3 < _args.length) {
if (_local3 > 0){
_arg1 = "";
};
.warn(new Log(_arg1, _args[_local3], XrayLogger.WARN));
_local3++;
};
}
public function error(_arg1:String, ... _args):void{
var _local3:Number;
if (_args.length == 0){
.error(new Log(_arg1, null, XrayLogger.ERROR));
};
_local3 = 0;
while (_local3 < _args.length) {
if (_local3 > 0){
_arg1 = "";
};
.error(new Log(_arg1, _args[_local3], XrayLogger.ERROR));
_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 :Number;// = 3
private var :Number;// = 0
private var :Number;// = 0
private var :Number;// = 254
private var :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(){
= 0;
= 3;
= 254;
= 0;
= [];
super();
}
public function ():Boolean{
var _local1:uint;
if ( .length == 0){
return (true);
};
_local1 = 0;
while (_local1 < .length) {
_local1++;
};
return (true);
}
public function debug(_arg1:Log):void{
if (_arg1.getLevel() == ){
log(_arg1.getMessage(), _arg1.getCaller(), _arg1.getClassPackage(), 0, _arg1.getDump());
};
}
public function (_arg1:Number=0):void{
= _arg1;
}
public function error(_arg1:Log):void{
if (_arg1.getLevel() >= ){
log(_arg1.getMessage(), _arg1.getCaller(), _arg1.getClassPackage(), 3, _arg1.getDump());
};
}
public function setLevel(_arg1:Number=0):void{
= _arg1;
}
public function fatal(_arg1:Log):void{
if (_arg1.getLevel() >= ){
log(_arg1.getMessage(), _arg1.getCaller(), _arg1.getClassPackage(), 4, _arg1.getDump());
};
}
public function warn(_arg1:Log):void{
if (_arg1.getLevel() >= ){
log(_arg1.getMessage(), _arg1.getCaller(), _arg1.getClassPackage(), 2, _arg1.getDump());
};
}
public function (_arg1:Number):void{
= _arg1;
}
public function (_arg1:Number):void{
= _arg1;
}
public function info(_arg1:Log):void{
if (_arg1.getLevel() >= ){
log(_arg1.getMessage(), _arg1.getCaller(), _arg1.getClassPackage(), 1, _arg1.getDump());
};
}
public function log(_arg1:String, _arg2:String, _arg3:String, _arg4:Number, _arg5:Object=null):void{
var _local6:String;
var _local7:String;
var _local8:String;
var _local9:Object;
_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;
};
_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, , , _arg3, _arg4);
} else {
_local9 = PropertyTools.getProperties(_arg5);
Debug.traceObject(_local9, , , _arg3, _arg4);
};
};
};
}
public function (_arg1:Array):void{
= _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
//Stinger3D (com.candystand.Stinger.Stinger3D)
package com.candystand.Stinger {
import flash.events.*;
import com.caurina.transitions.*;
import flash.display.*;
import flash.geom.*;
import org.papervision3d.objects.*;
import org.papervision3d.core.proto.*;
import org.papervision3d.materials.*;
import com.caurina.transitions.properties.*;
import flash.utils.*;
import com.event.*;
import org.papervision3d.scenes.*;
import org.papervision3d.cameras.*;
import flash.text.*;
import flash.net.*;
public class Stinger3D extends MovieClip {
private var
:Number;// = 0
public var containerMask:MovieClip;
private var
:Camera3D;
private var :Number;
private var :DisplayObject3D;
private var :Number;
public var buttonText:TextField;
private var container:Sprite;
private var :Array;
private var
:Number;// = 540
private var :int;// = 20
private var scene:MovieScene3D;
public static var _instance:Stinger3D;
private static var GAME_NAMES:Array = [];
private static var GAME_LINKS:Array = [];
private static var GAME_ID:Number = 0;
public function Stinger3D(){
= 0;
= 20;
= 540;
= ((Math.PI * 2) / );
super();
Stinger3D._instance = this;
DisplayShortcuts.init();
trace("Created Stinger3D");
}
public function destroy():void{
this.removeEventListener(Event.ADDED_TO_STAGE, this.);
this.removeEventListener(Event.ENTER_FRAME, this.
);
this.parent.removeChild(this);
}
private function
(_arg1:MouseEvent):void{
var _local2:int;
var _local3:URLRequest;
if (_arg1.target.visible){
_local2 = int(_arg1.target.name.split("_")[1]);
_local3 = new URLRequest(((Stinger3D.GAME_LINKS[(_local2 % Stinger3D.GAME_NAMES.length)] + "&vgid=") + Stinger3D.GAME_ID));
navigateToURL(_local3, "_blank");
};
}
private function
(_arg1:MouseEvent):void{
if (_arg1.target.visible){
Tweener.addTween(_arg1.target, {scaleX:1, scaleY:1, time:0.5});
this.buttonText.text = "";
};
}
private function ():void{
var _local1:*;
var _local2:*;
var _local3:Number;
var _local4:Number;
_local1 = 0;
while (_local1 < this.) {
_local2 = _local1;
_local3 = (Math.cos((_local2 * this.)) * this.
);
_local4 = (Math.sin((_local2 * this.)) * this.
);
this.[_local1].extra = new Object();
this.[_local1].extra.angle = ((_local2 * this.) * (180 / Math.PI));
Tweener.addTween(this.[_local1], {x:_local3, y:0, z:_local4, time:1, delay:((_local1 * 0.1) + 2), onUpdate:this., onUpdateParams:[this.[_local1]], onComplete:this.});
_local1++;
};
this.dispatchEvent(new Event(StartEvent.START));
}
private function (_arg1:Plane):void{
_arg1.lookAt(this.);
if (_arg1.z >= 15){
_arg1.container.alpha = 0.3;
} else {
_arg1.container.alpha = 1;
};
}
private function (_arg1:Number):Number{
_arg1 = (_arg1 % 360);
if (_arg1 < 0){
_arg1 = (_arg1 + 360);
};
return (_arg1);
}
private function (_arg1:Number):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:Number;
var _local6:Number;
_local2 = 0;
while (_local2 < this.) {
_local3 = (this.[_local2].extra.angle + _arg1);
this.[_local2].extra.angle = _local3;
_local4 = (_local3 * (Math.PI / 180));
_local5 = (Math.cos(_local4) * this.
);
_local6 = (Math.sin(_local4) * this.
);
this.[_local2].x = _local5;
this.[_local2].z = _local6;
this.(this.[_local2]);
_local2++;
};
}
public function CSHomepageLink(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest(("http://www.candystand.com/index.do?vgid=" + GAME_ID));
navigateToURL(_local2, "_blank");
}
private function (_arg1:MouseEvent):void{
var _local2:int;
if (_arg1.target.visible){
_local2 = int(_arg1.target.name.split("_")[1]);
Tweener.addTween(_arg1.target, {scaleX:1.1, scaleY:1.1, time:0.5});
this.buttonText.text = Stinger3D.GAME_NAMES[(_local2 % Stinger3D.GAME_NAMES.length)].toUpperCase();
};
}
private function ():void{
this.
++;
if (
== ){
this.dispatchEvent(new Event(Event.COMPLETE));
};
}
private function
(_arg1:Event):void{
var _local2:int;
var _local3:Number;
if (getTimer() >= (this. + 3000)){
_local2 = 0;
if ((((this.mouseX > _local2)) || ((this.mouseX < -(_local2))))){
if (this.mouseX < 0){
_local2 = (_local2 * -1);
};
_local3 = ((this.mouseX - _local2) / ((stage.stageWidth / 2) - _local2));
_local3 = (_local3 * -2);
this.(_local3);
};
};
scene.renderCamera(this.
);
}
private function ():void{
var _local1:int;
var _local2:int;
this.container = new Sprite();
this.addChildAt(this.container, this.getChildIndex(this.buttonText));
this.container.x = 0;
this.container.y = 75;
this.scene = new MovieScene3D(this.container);
this.
= new Camera3D();
this.
.zoom = 5;
this.
.focus = 100;
this. = new DisplayObject3D();
this. = new Array();
_local1 = 725;
_local2 = 440;
this.containerMask.width = _local1;
this.containerMask.height = _local2;
this.containerMask.x = -((_local1 / 2));
this.containerMask.y = -((_local2 / 2));
this.container.cacheAsBitmap = true;
this.containerMask.cacheAsBitmap = true;
this.container.mask = this.containerMask;
}
public function (_arg1:Array, _arg2:Array, _arg3:Number):void{
var _local4:int;
var _local5:int;
GAME_NAMES = _arg1;
GAME_LINKS = _arg2;
GAME_ID = _arg3;
();
_local4 = 0;
while (_local4 < this.) {
_local5 = (_local4 - 14);
if (_local5 < 0){
_local5 = (_local4 + 6);
};
this.(_local5);
_local4++;
};
this.();
this. = getTimer();
this.addEventListener(Event.ENTER_FRAME, this.
, false, 0, true);
}
private function (_arg1:BitmapData):BitmapData{
var _local2:Boolean;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:MovieClip;
var _local7:MovieClip;
var _local8:MovieClip;
var _local9:BitmapData;
var _local10:Matrix;
var _local11:MovieClip;
var _local12:*;
_local2 = true;
_local3 = 1;
_local4 = 0.3;
_local5 = Math.floor((Math.random() * 1000000));
_local6 = new MovieClip();
_local7 = new MovieClip();
_local7.addChild(new Bitmap(_arg1));
_local8 = new MovieClip();
_local9 = new BitmapData(_arg1.width, (_arg1.height * 0.6));
_local9.draw(_arg1, new Matrix(1, 0, 0, -1, 0, _arg1.height));
_local8.addChild(new Bitmap(_local9));
_local10 = new Matrix();
_local10.createGradientBox(_local9.width, _local9.height, (Math.PI / 2));
_local11 = new MovieClip();
_local8.y = ((_local7.y + _local7.height) + 5);
_local11.graphics.lineStyle(0, 0xFFFFFF, 0);
_local11.graphics.beginGradientFill("linear", [0, 0xFFFFFF], [_local4, 0], [0, 150], _local10);
_local11.graphics.moveTo(0, 0);
_local11.graphics.lineTo(_arg1.width, 0);
_local11.graphics.lineTo(_arg1.width, (_local9.height * _local3));
_local11.graphics.lineTo(0, (_local9.height * _local3));
_local11.graphics.lineTo(0, 0);
_local11.graphics.endFill();
_local11.x = _local8.x;
_local11.y = _local8.y;
_local6.addChild(_local7);
_local6.addChild(_local8);
_local6.addChild(_local11);
_local8.cacheAsBitmap = true;
_local11.cacheAsBitmap = true;
_local8.mask = _local11;
_local12 = new BitmapData(_local6.width, _local6.height, _local2, 0);
_local12.draw(_local6);
_arg1.dispose();
_local9.dispose();
return (_local12);
}
private function (_arg1:int):void{
var _local2:int;
var _local3:Class;
var _local4:BitmapData;
var _local5:InteractiveBitmapMaterial;
var _local6:Plane;
var _local7:Sprite;
_local2 = (_arg1 % GAME_NAMES.length);
_local3 = (getDefinitionByName(("CSSet1Image" + _local2)) as Class);
_local4 = new _local3(240, 240);
_local4 = this.(_local4);
_local5 = new InteractiveBitmapMaterial(_local4);
_local5.doubleSided = true;
_local5.updateBitmap();
_local6 = new Plane(_local5, (_local4.width * 0.625), (_local4.height * 0.625), 2, 2);
this.scene.addChild(_local6, ("CSImage" + String(_arg1)));
_local6.x = -500;
_local6.y = -700;
_local6.z = -500;
_local7 = _local6.container;
_local7.name = ("container_" + _arg1);
_local7.addEventListener(MouseEvent.ROLL_OVER, );
_local7.addEventListener(MouseEvent.ROLL_OUT,
);
_local7.addEventListener(MouseEvent.MOUSE_DOWN,
);
this..push(_local6);
}
}
}//package com.candystand.Stinger
Section 11
//DisplayShortcuts (com.caurina.transitions.properties.DisplayShortcuts)
package com.caurina.transitions.properties {
import com.caurina.transitions.*;
import flash.geom.*;
public class DisplayShortcuts {
public function DisplayShortcuts(){
trace("This is an static class and should not be instantiated.");
}
public static function init():void{
Tweener.registerSpecialProperty("_frame", _frame_get, _frame_set);
Tweener.registerSpecialProperty("_autoAlpha", _autoAlpha_get, _autoAlpha_set);
Tweener.registerSpecialPropertySplitter("_scale", _scale_splitter);
Tweener.registerSpecialPropertySplitter("_scrollRect", _scrollRect_splitter);
Tweener.registerSpecialProperty("_scrollRect_x", _scrollRect_property_get, _scrollRect_property_set, ["x"]);
Tweener.registerSpecialProperty("_scrollRect_y", _scrollRect_property_get, _scrollRect_property_set, ["y"]);
Tweener.registerSpecialProperty("_scrollRect_left", _scrollRect_property_get, _scrollRect_property_set, ["left"]);
Tweener.registerSpecialProperty("_scrollRect_right", _scrollRect_property_get, _scrollRect_property_set, ["right"]);
Tweener.registerSpecialProperty("_scrollRect_top", _scrollRect_property_get, _scrollRect_property_set, ["top"]);
Tweener.registerSpecialProperty("_scrollRect_bottom", _scrollRect_property_get, _scrollRect_property_set, ["bottom"]);
Tweener.registerSpecialProperty("_scrollRect_width", _scrollRect_property_get, _scrollRect_property_set, ["width"]);
Tweener.registerSpecialProperty("_scrollRect_height", _scrollRect_property_get, _scrollRect_property_set, ["height"]);
}
public static function _frame_set(_arg1:Object, _arg2:Number, _arg3:Array, _arg4:Object=null):void{
_arg1.gotoAndStop(Math.round(_arg2));
}
public static function _autoAlpha_set(_arg1:Object, _arg2:Number, _arg3:Array, _arg4:Object=null):void{
_arg1.alpha = _arg2;
_arg1.visible = (_arg2 > 0);
}
public static function _frame_get(_arg1:Object, _arg2:Array, _arg3:Object=null):Number{
return (_arg1.currentFrame);
}
public static function _scrollRect_splitter(_arg1:Rectangle, _arg2:Array, _arg3:Object=null):Array{
var _local4:Array;
_local4 = new Array();
if (_arg1 == null){
_local4.push({name:"_scrollRect_x", value:0});
_local4.push({name:"_scrollRect_y", value:0});
_local4.push({name:"_scrollRect_width", value:100});
_local4.push({name:"_scrollRect_height", value:100});
} else {
_local4.push({name:"_scrollRect_x", value:_arg1.x});
_local4.push({name:"_scrollRect_y", value:_arg1.y});
_local4.push({name:"_scrollRect_width", value:_arg1.width});
_local4.push({name:"_scrollRect_height", value:_arg1.height});
};
return (_local4);
}
public static function _autoAlpha_get(_arg1:Object, _arg2:Array, _arg3:Object=null):Number{
return (_arg1.alpha);
}
public static function _scrollRect_property_get(_arg1:Object, _arg2:Array, _arg3:Object=null):Number{
return (_arg1.scrollRect[_arg2[0]]);
}
public static function _scale_splitter(_arg1:Number, _arg2:Array):Array{
var _local3:Array;
_local3 = new Array();
_local3.push({name:"scaleX", value:_arg1});
_local3.push({name:"scaleY", value:_arg1});
return (_local3);
}
public static function _scrollRect_property_set(_arg1:Object, _arg2:Number, _arg3:Array, _arg4:Object=null):void{
var _local5:Rectangle;
_local5 = _arg1.scrollRect;
_local5[_arg3[0]] = Math.round(_arg2);
_arg1.scrollRect = _local5;
}
}
}//package com.caurina.transitions.properties
Section 12
//AuxFunctions (com.caurina.transitions.AuxFunctions)
package com.caurina.transitions {
public class AuxFunctions {
public static function concatObjects(... _args):Object{
var _local2:Object;
var _local3:Object;
var _local4:int;
var _local5:String;
_local2 = {};
_local4 = 0;
while (_local4 < _args.length) {
_local3 = _args[_local4];
for (_local5 in _local3) {
if (_local3[_local5] == null){
delete _local2[_local5];
} else {
_local2[_local5] = _local3[_local5];
};
};
_local4++;
};
return (_local2);
}
public static function numberToG(_arg1:Number):Number{
return (((_arg1 & 0xFF00) >> 8));
}
public static function numberToR(_arg1:Number):Number{
return (((_arg1 & 0xFF0000) >> 16));
}
public static function isInArray(_arg1:String, _arg2:Array):Boolean{
var _local3:uint;
var _local4:uint;
_local3 = _arg2.length;
_local4 = 0;
while (_local4 < _local3) {
if (_arg2[_local4] == _arg1){
return (true);
};
_local4++;
};
return (false);
}
public static function getObjectLength(_arg1:Object):uint{
var _local2:uint;
var _local3:String;
_local2 = 0;
for (_local3 in _arg1) {
_local2++;
};
return (_local2);
}
public static function numberToB(_arg1:Number):Number{
return ((_arg1 & 0xFF));
}
}
}//package com.caurina.transitions
Section 13
//Equations (com.caurina.transitions.Equations)
package com.caurina.transitions {
public class Equations {
public function Equations(){
trace("Equations is a static class and should not be instantiated.");
}
public static function easeOutBounce(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / _arg4);
if (_arg1 < (1 / 2.75)){
return (((_arg3 * ((7.5625 * _arg1) * _arg1)) + _arg2));
};
if (_arg1 < (2 / 2.75)){
_arg1 = (_arg1 - (1.5 / 2.75));
return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.75)) + _arg2));
};
if (_arg1 < (2.5 / 2.75)){
_arg1 = (_arg1 - (2.25 / 2.75));
return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.9375)) + _arg2));
};
_arg1 = (_arg1 - (2.625 / 2.75));
return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.984375)) + _arg2));
}
public static function easeInOutElastic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
var _local6:Number;
var _local7:Number;
var _local8:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 == 2){
return ((_arg2 + _arg3));
};
_local6 = (((!(Boolean(_arg5))) || (isNaN(_arg5.period)))) ? (_arg4 * (0.3 * 1.5)) : _arg5.period;
_local8 = (((!(Boolean(_arg5))) || (isNaN(_arg5.amplitude)))) ? 0 : _arg5.amplitude;
if (((!(Boolean(_local8))) || ((_local8 < Math.abs(_arg3))))){
_local8 = _arg3;
_local7 = (_local6 / 4);
} else {
_local7 = ((_local6 / (2 * Math.PI)) * Math.asin((_arg3 / _local8)));
};
if (_arg1 < 1){
--_arg1;
return (((-0.5 * ((_local8 * Math.pow(2, (10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _local6)))) + _arg2));
};
--_arg1;
return ((((((_local8 * Math.pow(2, (-10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _local6))) * 0.5) + _arg3) + _arg2));
}
public static function easeInOutQuad(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return (((((_arg3 / 2) * _arg1) * _arg1) + _arg2));
};
--_arg1;
return ((((-(_arg3) / 2) * ((_arg1 * (_arg1 - 2)) - 1)) + _arg2));
}
public static function easeInOutBounce(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (((easeInBounce((_arg1 * 2), 0, _arg3, _arg4) * 0.5) + _arg2));
};
return ((((easeOutBounce(((_arg1 * 2) - _arg4), 0, _arg3, _arg4) * 0.5) + (_arg3 * 0.5)) + _arg2));
}
public static function easeInOutBack(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
var _local6:Number;
_local6 = (((!(Boolean(_arg5))) || (isNaN(_arg5.overshoot)))) ? 1.70158 : _arg5.overshoot;
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
_local6 = (_local6 * 1.525);
return ((((_arg3 / 2) * ((_arg1 * _arg1) * (((_local6 + 1) * _arg1) - _local6))) + _arg2));
};
_arg1 = (_arg1 - 2);
_local6 = (_local6 * 1.525);
return ((((_arg3 / 2) * (((_arg1 * _arg1) * (((_local6 + 1) * _arg1) + _local6)) + 2)) + _arg2));
}
public static function easeOutInCubic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutCubic((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInCubic(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
public static function easeNone(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
public static function easeOutBack(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
var _local6:Number;
_local6 = (((!(Boolean(_arg5))) || (isNaN(_arg5.overshoot)))) ? 1.70158 : _arg5.overshoot;
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * (((_arg1 * _arg1) * (((_local6 + 1) * _arg1) + _local6)) + 1)) + _arg2));
}
public static function easeInOutSine(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
return ((((-(_arg3) / 2) * (Math.cos(((Math.PI * _arg1) / _arg4)) - 1)) + _arg2));
}
public static function easeInBack(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
var _local6:Number;
_local6 = (((!(Boolean(_arg5))) || (isNaN(_arg5.overshoot)))) ? 1.70158 : _arg5.overshoot;
_arg1 = (_arg1 / _arg4);
return (((((_arg3 * _arg1) * _arg1) * (((_local6 + 1) * _arg1) - _local6)) + _arg2));
}
public static function easeInQuart(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / _arg4);
return ((((((_arg3 * _arg1) * _arg1) * _arg1) * _arg1) + _arg2));
}
public static function easeOutInQuint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutQuint((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInQuint(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
public static function easeOutInBounce(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutBounce((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInBounce(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
public static function init():void{
Tweener.registerTransition("easenone", easeNone);
Tweener.registerTransition("linear", easeNone);
Tweener.registerTransition("easeinquad", easeInQuad);
Tweener.registerTransition("easeoutquad", easeOutQuad);
Tweener.registerTransition("easeinoutquad", easeInOutQuad);
Tweener.registerTransition("easeoutinquad", easeOutInQuad);
Tweener.registerTransition("easeincubic", easeInCubic);
Tweener.registerTransition("easeoutcubic", easeOutCubic);
Tweener.registerTransition("easeinoutcubic", easeInOutCubic);
Tweener.registerTransition("easeoutincubic", easeOutInCubic);
Tweener.registerTransition("easeinquart", easeInQuart);
Tweener.registerTransition("easeoutquart", easeOutQuart);
Tweener.registerTransition("easeinoutquart", easeInOutQuart);
Tweener.registerTransition("easeoutinquart", easeOutInQuart);
Tweener.registerTransition("easeinquint", easeInQuint);
Tweener.registerTransition("easeoutquint", easeOutQuint);
Tweener.registerTransition("easeinoutquint", easeInOutQuint);
Tweener.registerTransition("easeoutinquint", easeOutInQuint);
Tweener.registerTransition("easeinsine", easeInSine);
Tweener.registerTransition("easeoutsine", easeOutSine);
Tweener.registerTransition("easeinoutsine", easeInOutSine);
Tweener.registerTransition("easeoutinsine", easeOutInSine);
Tweener.registerTransition("easeincirc", easeInCirc);
Tweener.registerTransition("easeoutcirc", easeOutCirc);
Tweener.registerTransition("easeinoutcirc", easeInOutCirc);
Tweener.registerTransition("easeoutincirc", easeOutInCirc);
Tweener.registerTransition("easeinexpo", easeInExpo);
Tweener.registerTransition("easeoutexpo", easeOutExpo);
Tweener.registerTransition("easeinoutexpo", easeInOutExpo);
Tweener.registerTransition("easeoutinexpo", easeOutInExpo);
Tweener.registerTransition("easeinelastic", easeInElastic);
Tweener.registerTransition("easeoutelastic", easeOutElastic);
Tweener.registerTransition("easeinoutelastic", easeInOutElastic);
Tweener.registerTransition("easeoutinelastic", easeOutInElastic);
Tweener.registerTransition("easeinback", easeInBack);
Tweener.registerTransition("easeoutback", easeOutBack);
Tweener.registerTransition("easeinoutback", easeInOutBack);
Tweener.registerTransition("easeoutinback", easeOutInBack);
Tweener.registerTransition("easeinbounce", easeInBounce);
Tweener.registerTransition("easeoutbounce", easeOutBounce);
Tweener.registerTransition("easeinoutbounce", easeInOutBounce);
Tweener.registerTransition("easeoutinbounce", easeOutInBounce);
}
public static function easeOutExpo(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
return (((_arg1)==_arg4) ? (_arg2 + _arg3) : (((_arg3 * 1.001) * (-(Math.pow(2, ((-10 * _arg1) / _arg4))) + 1)) + _arg2));
}
public static function easeOutInBack(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutBack((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInBack(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
public static function easeInExpo(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
return (((_arg1)==0) ? _arg2 : (((_arg3 * Math.pow(2, (10 * ((_arg1 / _arg4) - 1)))) + _arg2) - (_arg3 * 0.001)));
}
public static function easeInCubic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / _arg4);
return (((((_arg3 * _arg1) * _arg1) * _arg1) + _arg2));
}
public static function easeInQuint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / _arg4);
return (((((((_arg3 * _arg1) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2));
}
public static function easeInOutCirc(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return ((((-(_arg3) / 2) * (Math.sqrt((1 - (_arg1 * _arg1))) - 1)) + _arg2));
};
_arg1 = (_arg1 - 2);
return ((((_arg3 / 2) * (Math.sqrt((1 - (_arg1 * _arg1))) + 1)) + _arg2));
}
public static function easeInQuad(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / _arg4);
return ((((_arg3 * _arg1) * _arg1) + _arg2));
}
public static function easeInBounce(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
return (((_arg3 - easeOutBounce((_arg4 - _arg1), 0, _arg3, _arg4)) + _arg2));
}
public static function easeOutInExpo(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutExpo((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInExpo(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
public static function easeOutQuart(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = ((_arg1 / _arg4) - 1);
return (((-(_arg3) * ((((_arg1 * _arg1) * _arg1) * _arg1) - 1)) + _arg2));
}
public static function easeInSine(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
return ((((-(_arg3) * Math.cos(((_arg1 / _arg4) * (Math.PI / 2)))) + _arg3) + _arg2));
}
public static function easeInOutQuart(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return (((((((_arg3 / 2) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2));
};
_arg1 = (_arg1 - 2);
return ((((-(_arg3) / 2) * ((((_arg1 * _arg1) * _arg1) * _arg1) - 2)) + _arg2));
}
public static function easeOutQuad(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / _arg4);
return ((((-(_arg3) * _arg1) * (_arg1 - 2)) + _arg2));
}
public static function easeOutInElastic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutElastic((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInElastic(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
public static function easeInElastic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
var _local6:Number;
var _local7:Number;
var _local8:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / _arg4);
if (_arg1 == 1){
return ((_arg2 + _arg3));
};
_local6 = (((!(Boolean(_arg5))) || (isNaN(_arg5.period)))) ? (_arg4 * 0.3) : _arg5.period;
_local8 = (((!(Boolean(_arg5))) || (isNaN(_arg5.amplitude)))) ? 0 : _arg5.amplitude;
if (((!(Boolean(_local8))) || ((_local8 < Math.abs(_arg3))))){
_local8 = _arg3;
_local7 = (_local6 / 4);
} else {
_local7 = ((_local6 / (2 * Math.PI)) * Math.asin((_arg3 / _local8)));
};
--_arg1;
return ((-(((_local8 * Math.pow(2, (10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _local6)))) + _arg2));
}
public static function easeOutCubic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * (((_arg1 * _arg1) * _arg1) + 1)) + _arg2));
}
public static function easeOutQuint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * (((((_arg1 * _arg1) * _arg1) * _arg1) * _arg1) + 1)) + _arg2));
}
public static function easeOutInQuad(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutQuad((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInQuad(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
public static function easeOutSine(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
return (((_arg3 * Math.sin(((_arg1 / _arg4) * (Math.PI / 2)))) + _arg2));
}
public static function easeInOutCubic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return ((((((_arg3 / 2) * _arg1) * _arg1) * _arg1) + _arg2));
};
_arg1 = (_arg1 - 2);
return ((((_arg3 / 2) * (((_arg1 * _arg1) * _arg1) + 2)) + _arg2));
}
public static function easeInOutQuint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return ((((((((_arg3 / 2) * _arg1) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2));
};
_arg1 = (_arg1 - 2);
return ((((_arg3 / 2) * (((((_arg1 * _arg1) * _arg1) * _arg1) * _arg1) + 2)) + _arg2));
}
public static function easeInCirc(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = (_arg1 / _arg4);
return (((-(_arg3) * (Math.sqrt((1 - (_arg1 * _arg1))) - 1)) + _arg2));
}
public static function easeOutInSine(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutSine((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInSine(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
public static function easeInOutExpo(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 == 0){
return (_arg2);
};
if (_arg1 == _arg4){
return ((_arg2 + _arg3));
};
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return (((((_arg3 / 2) * Math.pow(2, (10 * (_arg1 - 1)))) + _arg2) - (_arg3 * 0.0005)));
};
--_arg1;
return (((((_arg3 / 2) * 1.0005) * (-(Math.pow(2, (-10 * _arg1))) + 2)) + _arg2));
}
public static function easeOutElastic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
var _local6:Number;
var _local7:Number;
var _local8:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / _arg4);
if (_arg1 == 1){
return ((_arg2 + _arg3));
};
_local6 = (((!(Boolean(_arg5))) || (isNaN(_arg5.period)))) ? (_arg4 * 0.3) : _arg5.period;
_local8 = (((!(Boolean(_arg5))) || (isNaN(_arg5.amplitude)))) ? 0 : _arg5.amplitude;
if (((!(Boolean(_local8))) || ((_local8 < Math.abs(_arg3))))){
_local8 = _arg3;
_local7 = (_local6 / 4);
} else {
_local7 = ((_local6 / (2 * Math.PI)) * Math.asin((_arg3 / _local8)));
};
return (((((_local8 * Math.pow(2, (-10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _local6))) + _arg3) + _arg2));
}
public static function easeOutCirc(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * Math.sqrt((1 - (_arg1 * _arg1)))) + _arg2));
}
public static function easeOutInQuart(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutQuart((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInQuart(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
public static function easeOutInCirc(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutCirc((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInCirc(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
}
}//package com.caurina.transitions
Section 14
//PropertyInfoObj (com.caurina.transitions.PropertyInfoObj)
package com.caurina.transitions {
public class PropertyInfoObj {
public var originalValueComplete:Object;
public var modifierParameters:Array;
public var isSpecialProperty:Boolean;
public var hasModifier:Boolean;
public var valueComplete:Number;
public var extra:Object;
public var valueStart:Number;
public var modifierFunction:Function;
public var arrayIndex:Number;
public function PropertyInfoObj(_arg1:Number, _arg2:Number, _arg3:Object, _arg4:Number, _arg5:Object, _arg6:Boolean, _arg7:Function, _arg8:Array){
valueStart = _arg1;
valueComplete = _arg2;
originalValueComplete = _arg3;
arrayIndex = _arg4;
extra = _arg5;
isSpecialProperty = _arg6;
hasModifier = Boolean(_arg7);
modifierFunction = _arg7;
modifierParameters = _arg8;
}
public function toString():String{
var _local1:String;
_local1 = "\n[PropertyInfoObj ";
_local1 = (_local1 + ("valueStart:" + String(valueStart)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("valueComplete:" + String(valueComplete)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("originalValueComplete:" + String(originalValueComplete)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("arrayIndex:" + String(arrayIndex)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("extra:" + String(extra)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("isSpecialProperty:" + String(isSpecialProperty)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("hasModifier:" + String(hasModifier)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("modifierFunction:" + String(modifierFunction)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("modifierParameters:" + String(modifierParameters)));
_local1 = (_local1 + "]\n");
return (_local1);
}
public function clone():PropertyInfoObj{
var _local1:PropertyInfoObj;
_local1 = new PropertyInfoObj(valueStart, valueComplete, originalValueComplete, arrayIndex, extra, isSpecialProperty, modifierFunction, modifierParameters);
return (_local1);
}
}
}//package com.caurina.transitions
Section 15
//SpecialProperty (com.caurina.transitions.SpecialProperty)
package com.caurina.transitions {
public class SpecialProperty {
public var parameters:Array;
public var preProcess:Function;
public var setValue:Function;
public var getValue:Function;
public function SpecialProperty(_arg1:Function, _arg2:Function, _arg3:Array=null, _arg4:Function=null){
getValue = _arg1;
setValue = _arg2;
parameters = _arg3;
preProcess = _arg4;
}
public function toString():String{
var _local1:String;
_local1 = "";
_local1 = (_local1 + "[SpecialProperty ");
_local1 = (_local1 + ("getValue:" + String(getValue)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("setValue:" + String(setValue)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("parameters:" + String(parameters)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("preProcess:" + String(preProcess)));
_local1 = (_local1 + "]");
return (_local1);
}
}
}//package com.caurina.transitions
Section 16
//SpecialPropertyModifier (com.caurina.transitions.SpecialPropertyModifier)
package com.caurina.transitions {
public class SpecialPropertyModifier {
public var getValue:Function;
public var modifyValues:Function;
public function SpecialPropertyModifier(_arg1:Function, _arg2:Function){
modifyValues = _arg1;
getValue = _arg2;
}
public function toString():String{
var _local1:String;
_local1 = "";
_local1 = (_local1 + "[SpecialPropertyModifier ");
_local1 = (_local1 + ("modifyValues:" + String(modifyValues)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("getValue:" + String(getValue)));
_local1 = (_local1 + "]");
return (_local1);
}
}
}//package com.caurina.transitions
Section 17
//SpecialPropertySplitter (com.caurina.transitions.SpecialPropertySplitter)
package com.caurina.transitions {
public class SpecialPropertySplitter {
public var parameters:Array;
public var splitValues:Function;
public function SpecialPropertySplitter(_arg1:Function, _arg2:Array){
splitValues = _arg1;
parameters = _arg2;
}
public function toString():String{
var _local1:String;
_local1 = "";
_local1 = (_local1 + "[SpecialPropertySplitter ");
_local1 = (_local1 + ("splitValues:" + String(splitValues)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("parameters:" + String(parameters)));
_local1 = (_local1 + "]");
return (_local1);
}
}
}//package com.caurina.transitions
Section 18
//Tweener (com.caurina.transitions.Tweener)
package com.caurina.transitions {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
public class Tweener {
private static var _timeScale:Number = 1;
private static var _currentTimeFrame:Number;
private static var _specialPropertySplitterList:Object;
private static var _engineExists:Boolean = false;
private static var _specialPropertyModifierList:Object;
private static var _currentTime:Number;
private static var _tweenList:Array;
private static var _specialPropertyList:Object;
private static var _transitionList:Object;
private static var _inited:Boolean = false;
private static var __tweener_controller__:MovieClip;
public function Tweener(){
trace("Tweener is a static class and should not be instantiated.");
}
public static function registerSpecialPropertyModifier(_arg1:String, _arg2:Function, _arg3:Function):void{
var _local4:SpecialPropertyModifier;
if (!_inited){
init();
};
_local4 = new SpecialPropertyModifier(_arg2, _arg3);
_specialPropertyModifierList[_arg1] = _local4;
}
public static function registerSpecialProperty(_arg1:String, _arg2:Function, _arg3:Function, _arg4:Array=null, _arg5:Function=null):void{
var _local6:SpecialProperty;
if (!_inited){
init();
};
_local6 = new SpecialProperty(_arg2, _arg3, _arg4, _arg5);
_specialPropertyList[_arg1] = _local6;
}
public static function init(... _args):void{
_inited = true;
_transitionList = new Object();
Equations.init();
_specialPropertyList = new Object();
_specialPropertyModifierList = new Object();
_specialPropertySplitterList = new Object();
}
private static function updateTweens():Boolean{
var _local1:int;
if (_tweenList.length == 0){
return (false);
};
_local1 = 0;
while (_local1 < _tweenList.length) {
if ((((_tweenList[_local1] == undefined)) || (!(_tweenList[_local1].isPaused)))){
if (!updateTweenByIndex(_local1)){
removeTweenByIndex(_local1);
};
if (_tweenList[_local1] == null){
removeTweenByIndex(_local1, true);
_local1--;
};
};
_local1++;
};
return (true);
}
public static function addCaller(_arg1:Object=null, _arg2:Object=null):Boolean{
var _local3:Number;
var _local4:Array;
var _local5:Object;
var _local6:Number;
var _local7:Number;
var _local8:Function;
var _local9:TweenListObj;
var _local10:Number;
var _local11:String;
if (!Boolean(_arg1)){
return (false);
};
if ((_arg1 is Array)){
_local4 = _arg1.concat();
} else {
_local4 = [_arg1];
};
_local5 = _arg2;
if (!_inited){
init();
};
if (((!(_engineExists)) || (!(Boolean(__tweener_controller__))))){
startEngine();
};
_local6 = (isNaN(_local5.time)) ? 0 : _local5.time;
_local7 = (isNaN(_local5.delay)) ? 0 : _local5.delay;
if (typeof(_local5.transition) == "string"){
_local11 = _local5.transition.toLowerCase();
_local8 = _transitionList[_local11];
} else {
_local8 = _local5.transition;
};
if (!Boolean(_local8)){
_local8 = _transitionList["easeoutexpo"];
};
_local3 = 0;
while (_local3 < _local4.length) {
if (_local5.useFrames == true){
_local9 = new TweenListObj(_local4[_local3], (_currentTimeFrame + (_local7 / _timeScale)), (_currentTimeFrame + ((_local7 + _local6) / _timeScale)), true, _local8, _local5.transitionParams);
} else {
_local9 = new TweenListObj(_local4[_local3], (_currentTime + ((_local7 * 1000) / _timeScale)), (_currentTime + (((_local7 * 1000) + (_local6 * 1000)) / _timeScale)), false, _local8, _local5.transitionParams);
};
_local9.properties = null;
_local9.onStart = _local5.onStart;
_local9.onUpdate = _local5.onUpdate;
_local9.onComplete = _local5.onComplete;
_local9.onOverwrite = _local5.onOverwrite;
_local9.onStartParams = _local5.onStartParams;
_local9.onUpdateParams = _local5.onUpdateParams;
_local9.onCompleteParams = _local5.onCompleteParams;
_local9.onOverwriteParams = _local5.onOverwriteParams;
_local9.onStartScope = _local5.onStartScope;
_local9.onUpdateScope = _local5.onUpdateScope;
_local9.onCompleteScope = _local5.onCompleteScope;
_local9.onOverwriteScope = _local5.onOverwriteScope;
_local9.onErrorScope = _local5.onErrorScope;
_local9. = true;
_local9.count = _local5.count;
_local9.waitFrames = _local5.waitFrames;
_tweenList.push(_local9);
if ((((_local6 == 0)) && ((_local7 == 0)))){
_local10 = (_tweenList.length - 1);
updateTweenByIndex(_local10);
removeTweenByIndex(_local10);
};
_local3++;
};
return (true);
}
public static function pauseAllTweens():Boolean{
var _local1:Boolean;
var _local2:uint;
if (!Boolean(_tweenList)){
return (false);
};
_local1 = false;
_local2 = 0;
while (_local2 < _tweenList.length) {
pauseTweenByIndex(_local2);
_local1 = true;
_local2++;
};
return (_local1);
}
public static function removeTweens(_arg1:Object, ... _args):Boolean{
var _local3:Array;
var _local4:uint;
_local3 = new Array();
_local4 = 0;
while (_local4 < _args.length) {
if ((((typeof(_args[_local4]) == "string")) && (!(AuxFunctions.isInArray(_args[_local4], _local3))))){
_local3.push(_args[_local4]);
};
_local4++;
};
return (affectTweens(removeTweenByIndex, _arg1, _local3));
}
public static function splitTweens(_arg1:Number, _arg2:Array):uint{
var _local3:TweenListObj;
var _local4:TweenListObj;
var _local5:uint;
var _local6:String;
var _local7:Boolean;
_local3 = _tweenList[_arg1];
_local4 = _local3.clone(false);
_local5 = 0;
while (_local5 < _arg2.length) {
_local6 = _arg2[_local5];
if (Boolean(_local3.properties[_local6])){
_local3.properties[_local6] = undefined;
delete _local3.properties[_local6];
};
_local5++;
};
for (_local6 in _local4.properties) {
_local7 = false;
_local5 = 0;
while (_local5 < _arg2.length) {
if (_arg2[_local5] == _local6){
_local7 = true;
break;
};
_local5++;
};
if (!_local7){
_local4.properties[_local6] = undefined;
delete _local4.properties[_local6];
};
};
_tweenList.push(_local4);
return ((_tweenList.length - 1));
}
public static function updateFrame():void{
_currentTimeFrame++;
}
public static function resumeTweenByIndex(_arg1:Number):Boolean{
var _local2:TweenListObj;
var _local3:Number;
_local2 = _tweenList[_arg1];
if ((((_local2 == null)) || (!(_local2.isPaused)))){
return (false);
};
_local3 = getCurrentTweeningTime(_local2);
_local2.timeStart = (_local2.timeStart + (_local3 - _local2.timePaused));
_local2.timeComplete = (_local2.timeComplete + (_local3 - _local2.timePaused));
_local2.timePaused = undefined;
_local2.isPaused = false;
return (true);
}
public static function getVersion():String{
return ("AS3 1.31.71");
}
public static function onEnterFrame(_arg1:Event):void{
var _local2:Boolean;
updateTime();
updateFrame();
_local2 = false;
_local2 = updateTweens();
if (!_local2){
stopEngine();
};
}
public static function updateTime():void{
_currentTime = getTimer();
}
private static function updateTweenByIndex(_arg1:Number):Boolean{
var tTweening:TweenListObj;
var isOver:Boolean;
var mustUpdate:Boolean;
var nv:Number;
var t:Number;
var b:Number;
var c:Number;
var d:Number;
var pName:String;
var eventScope:Object;
var tScope:Object;
var cTime:Number;
var tProperty:Object;
var pv:Number;
var i = _arg1;
tTweening = _tweenList[i];
if ((((tTweening == null)) || (!(Boolean(tTweening.scope))))){
return (false);
};
isOver = false;
cTime = getCurrentTweeningTime(tTweening);
if (cTime >= tTweening.timeStart){
tScope = tTweening.scope;
if (tTweening.){
do {
t = (((tTweening.timeComplete - tTweening.timeStart) / tTweening.count) * (tTweening. + 1));
b = tTweening.timeStart;
c = (tTweening.timeComplete - tTweening.timeStart);
d = (tTweening.timeComplete - tTweening.timeStart);
nv = tTweening.transition(t, b, c, d);
} while (!(cTime >= nv));
} else {
mustUpdate = (((((tTweening.skipUpdates < 1)) || (!(tTweening.skipUpdates)))) || ((tTweening. >= tTweening.skipUpdates)));
if (cTime >= tTweening.timeComplete){
isOver = true;
mustUpdate = true;
};
if (!tTweening.
){
if (Boolean(tTweening.onStart)){
eventScope = (Boolean(tTweening.onStartScope)) ? tTweening.onStartScope : tScope;
try {
tTweening.onStart.apply(eventScope, tTweening.onStartParams);
} catch(e:Error) {
handleError(tTweening, e, "onStart");
};
};
for (pName in tTweening.properties) {
if (tTweening.properties[pName].isSpecialProperty){
if (Boolean(_specialPropertyList[pName].preProcess)){
tTweening.properties[pName].valueComplete = _specialPropertyList[pName].preProcess(tScope, _specialPropertyList[pName].parameters, tTweening.properties[pName].originalValueComplete, tTweening.properties[pName].extra);
};
pv = _specialPropertyList[pName].getValue(tScope, _specialPropertyList[pName].parameters, tTweening.properties[pName].extra);
} else {
pv = tScope[pName];
};
tTweening.properties[pName].valueStart = (isNaN(pv)) ? tTweening.properties[pName].valueComplete : pv;
};
mustUpdate = true;
tTweening.
= true;
};
if (mustUpdate){
for (pName in tTweening.properties) {
tProperty = tTweening.properties[pName];
if (isOver){
nv = tProperty.valueComplete;
} else {
if (tProperty.hasModifier){
t = (cTime - tTweening.timeStart);
d = (tTweening.timeComplete - tTweening.timeStart);
nv = tTweening.transition(t, 0, 1, d, tTweening.transitionParams);
nv = tProperty.modifierFunction(tProperty.valueStart, tProperty.valueComplete, nv, tProperty.modifierParameters);
} else {
t = (cTime - tTweening.timeStart);
b = tProperty.valueStart;
c = (tProperty.valueComplete - tProperty.valueStart);
d = (tTweening.timeComplete - tTweening.timeStart);
nv = tTweening.transition(t, b, c, d, tTweening.transitionParams);
};
};
if (tTweening.rounded){
nv = Math.round(nv);
};
if (tProperty.isSpecialProperty){
_specialPropertyList[pName].setValue(tScope, nv, _specialPropertyList[pName].parameters, tTweening.properties[pName].extra);
} else {
tScope[pName] = nv;
};
};
tTweening. = 0;
if (Boolean(tTweening.onUpdate)){
eventScope = (Boolean(tTweening.onUpdateScope)) ? tTweening.onUpdateScope : tScope;
try {
tTweening.onUpdate.apply(eventScope, tTweening.onUpdateParams);
} catch(e:Error) {
handleError(tTweening, e, "onUpdate");
};
};
} else {
tTweening. ++;
};
};
if (((isOver) && (Boolean(tTweening.onComplete)))){
eventScope = (Boolean(tTweening.onCompleteScope)) ? tTweening.onCompleteScope : tScope;
try {
tTweening.onComplete.apply(eventScope, tTweening.onCompleteParams);
} catch(e:Error) {
handleError(tTweening, e, "onComplete");
};
};
return (!(isOver));
};
return (true);
}
public static function setTimeScale(_arg1:Number):void{
var _local2:Number;
var _local3:Number;
if (isNaN(_arg1)){
_arg1 = 1;
};
if (_arg1 < 1E-5){
_arg1 = 1E-5;
};
if (_arg1 != _timeScale){
if (_tweenList != null){
_local2 = 0;
while (_local2 < _tweenList.length) {
_local3 = getCurrentTweeningTime(_tweenList[_local2]);
_tweenList[_local2].timeStart = (_local3 - (((_local3 - _tweenList[_local2].timeStart) * _timeScale) / _arg1));
_tweenList[_local2].timeComplete = (_local3 - (((_local3 - _tweenList[_local2].timeComplete) * _timeScale) / _arg1));
if (_tweenList[_local2].timePaused != undefined){
_tweenList[_local2].timePaused = (_local3 - (((_local3 - _tweenList[_local2].timePaused) * _timeScale) / _arg1));
};
_local2++;
};
};
_timeScale = _arg1;
};
}
public static function resumeAllTweens():Boolean{
var _local1:Boolean;
var _local2:uint;
if (!Boolean(_tweenList)){
return (false);
};
_local1 = false;
_local2 = 0;
while (_local2 < _tweenList.length) {
resumeTweenByIndex(_local2);
_local1 = true;
_local2++;
};
return (_local1);
}
private static function handleError(_arg1:TweenListObj, _arg2:Error, _arg3:String):void{
var eventScope:Object;
var pTweening = _arg1;
var pError = _arg2;
var pCallBackName = _arg3;
if (((Boolean(pTweening.onError)) && ((pTweening.onError is Function)))){
eventScope = (Boolean(pTweening.onErrorScope)) ? pTweening.onErrorScope : pTweening.scope;
try {
pTweening.onError.apply(eventScope, [pTweening.scope, pError]);
} catch(metaError:Error) {
printError(((((String(pTweening.scope) + " raised an error while executing the 'onError' handler. Original error:\n ") + pError.getStackTrace()) + "\nonError error: ") + metaError.getStackTrace()));
};
} else {
if (!Boolean(pTweening.onError)){
printError(((((String(pTweening.scope) + " raised an error while executing the '") + pCallBackName) + "'handler. \n") + pError.getStackTrace()));
};
};
}
private static function startEngine():void{
_engineExists = true;
_tweenList = new Array();
__tweener_controller__ = new MovieClip();
__tweener_controller__.addEventListener(Event.ENTER_FRAME, Tweener.onEnterFrame);
_currentTimeFrame = 0;
updateTime();
}
public static function removeAllTweens():Boolean{
var _local1:Boolean;
var _local2:uint;
if (!Boolean(_tweenList)){
return (false);
};
_local1 = false;
_local2 = 0;
while (_local2 < _tweenList.length) {
removeTweenByIndex(_local2);
_local1 = true;
_local2++;
};
return (_local1);
}
public static function addTween(_arg1:Object=null, _arg2:Object=null):Boolean{
var _local3:Number;
var _local4:Number;
var _local5:String;
var _local6:Array;
var _local7:Object;
var _local8:Number;
var _local9:Number;
var _local10:Array;
var _local11:Object;
var _local12:Object;
var _local13:Function;
var _local14:Object;
var _local15:TweenListObj;
var _local16:Number;
var _local17:Array;
var _local18:Array;
var _local19:Array;
var _local20:String;
if (!Boolean(_arg1)){
return (false);
};
if ((_arg1 is Array)){
_local6 = _arg1.concat();
} else {
_local6 = [_arg1];
};
_local7 = TweenListObj.makePropertiesChain(_arg2);
if (!_inited){
init();
};
if (((!(_engineExists)) || (!(Boolean(__tweener_controller__))))){
startEngine();
};
_local8 = (isNaN(_local7.time)) ? 0 : _local7.time;
_local9 = (isNaN(_local7.delay)) ? 0 : _local7.delay;
_local10 = new Array();
_local11 = {time:true, delay:true, useFrames:true, skipUpdates:true, transition:true, transitionParams:true, onStart:true, onUpdate:true, onComplete:true, onOverwrite:true, onError:true, rounded:true, onStartParams:true, onUpdateParams:true, onCompleteParams:true, onOverwriteParams:true, onStartScope:true, onUpdateScope:true, onCompleteScope:true, onOverwriteScope:true, onErrorScope:true};
_local12 = new Object();
for (_local5 in _local7) {
if (!_local11[_local5]){
if (_specialPropertySplitterList[_local5]){
_local17 = _specialPropertySplitterList[_local5].splitValues(_local7[_local5], _specialPropertySplitterList[_local5].parameters);
_local3 = 0;
while (_local3 < _local17.length) {
if (_specialPropertySplitterList[_local17[_local3].name]){
_local18 = _specialPropertySplitterList[_local17[_local3].name].splitValues(_local17[_local3].value, _specialPropertySplitterList[_local17[_local3].name].parameters);
_local4 = 0;
while (_local4 < _local18.length) {
_local10[_local18[_local4].name] = {valueStart:undefined, valueComplete:_local18[_local4].value, arrayIndex:_local18[_local4].arrayIndex, isSpecialProperty:false};
_local4++;
};
} else {
_local10[_local17[_local3].name] = {valueStart:undefined, valueComplete:_local17[_local3].value, arrayIndex:_local17[_local3].arrayIndex, isSpecialProperty:false};
};
_local3++;
};
} else {
if (_specialPropertyModifierList[_local5] != undefined){
_local19 = _specialPropertyModifierList[_local5].modifyValues(_local7[_local5]);
_local3 = 0;
while (_local3 < _local19.length) {
_local12[_local19[_local3].name] = {modifierParameters:_local19[_local3].parameters, modifierFunction:_specialPropertyModifierList[_local5].getValue};
_local3++;
};
} else {
_local10[_local5] = {valueStart:undefined, valueComplete:_local7[_local5]};
};
};
};
};
for (_local5 in _local10) {
if (_specialPropertyList[_local5] != undefined){
_local10[_local5].isSpecialProperty = true;
} else {
if (_local6[0][_local5] == undefined){
printError((((("The property '" + _local5) + "' doesn't seem to be a normal object property of ") + String(_local6[0])) + " or a registered special property."));
};
};
};
for (_local5 in _local12) {
if (_local10[_local5] != undefined){
_local10[_local5].modifierParameters = _local12[_local5].modifierParameters;
_local10[_local5].modifierFunction = _local12[_local5].modifierFunction;
};
};
if (typeof(_local7.transition) == "string"){
_local20 = _local7.transition.toLowerCase();
_local13 = _transitionList[_local20];
} else {
_local13 = _local7.transition;
};
if (!Boolean(_local13)){
_local13 = _transitionList["easeoutexpo"];
};
_local3 = 0;
while (_local3 < _local6.length) {
_local14 = new Object();
for (_local5 in _local10) {
_local14[_local5] = new PropertyInfoObj(_local10[_local5].valueStart, _local10[_local5].valueComplete, _local10[_local5].valueComplete, _local10[_local5].arrayIndex, {}, _local10[_local5].isSpecialProperty, _local10[_local5].modifierFunction, _local10[_local5].modifierParameters);
};
if (_local7.useFrames == true){
_local15 = new TweenListObj(_local6[_local3], (_currentTimeFrame + (_local9 / _timeScale)), (_currentTimeFrame + ((_local9 + _local8) / _timeScale)), true, _local13, _local7.transitionParams);
} else {
_local15 = new TweenListObj(_local6[_local3], (_currentTime + ((_local9 * 1000) / _timeScale)), (_currentTime + (((_local9 * 1000) + (_local8 * 1000)) / _timeScale)), false, _local13, _local7.transitionParams);
};
_local15.properties = _local14;
_local15.onStart = _local7.onStart;
_local15.onUpdate = _local7.onUpdate;
_local15.onComplete = _local7.onComplete;
_local15.onOverwrite = _local7.onOverwrite;
_local15.onError = _local7.onError;
_local15.onStartParams = _local7.onStartParams;
_local15.onUpdateParams = _local7.onUpdateParams;
_local15.onCompleteParams = _local7.onCompleteParams;
_local15.onOverwriteParams = _local7.onOverwriteParams;
_local15.onStartScope = _local7.onStartScope;
_local15.onUpdateScope = _local7.onUpdateScope;
_local15.onCompleteScope = _local7.onCompleteScope;
_local15.onOverwriteScope = _local7.onOverwriteScope;
_local15.onErrorScope = _local7.onErrorScope;
_local15.rounded = _local7.rounded;
_local15.skipUpdates = _local7.skipUpdates;
removeTweensByTime(_local15.scope, _local15.properties, _local15.timeStart, _local15.timeComplete);
_tweenList.push(_local15);
if ((((_local8 == 0)) && ((_local9 == 0)))){
_local16 = (_tweenList.length - 1);
updateTweenByIndex(_local16);
removeTweenByIndex(_local16);
};
_local3++;
};
return (true);
}
public static function registerTransition(_arg1:String, _arg2:Function):void{
if (!_inited){
init();
};
_transitionList[_arg1] = _arg2;
}
public static function printError(_arg1:String):void{
trace(("## [Tweener] Error: " + _arg1));
}
private static function affectTweens(_arg1:Function, _arg2:Object, _arg3:Array):Boolean{
var _local4:Boolean;
var _local5:uint;
var _local6:Array;
var _local7:uint;
var _local8:uint;
var _local9:uint;
_local4 = false;
if (!Boolean(_tweenList)){
return (false);
};
_local5 = 0;
while (_local5 < _tweenList.length) {
if (((_tweenList[_local5]) && ((_tweenList[_local5].scope == _arg2)))){
if (_arg3.length == 0){
_arg1(_local5);
_local4 = true;
} else {
_local6 = new Array();
_local7 = 0;
while (_local7 < _arg3.length) {
if (Boolean(_tweenList[_local5].properties[_arg3[_local7]])){
_local6.push(_arg3[_local7]);
};
_local7++;
};
if (_local6.length > 0){
_local8 = AuxFunctions.getObjectLength(_tweenList[_local5].properties);
if (_local8 == _local6.length){
_arg1(_local5);
_local4 = true;
} else {
_local9 = splitTweens(_local5, _local6);
_arg1(_local9);
_local4 = true;
};
};
};
};
_local5++;
};
return (_local4);
}
public static function getTweens(_arg1:Object):Array{
var _local2:uint;
var _local3:String;
var _local4:Array;
if (!Boolean(_tweenList)){
return ([]);
};
_local4 = new Array();
_local2 = 0;
while (_local2 < _tweenList.length) {
if (((Boolean(_tweenList[_local2])) && ((_tweenList[_local2].scope == _arg1)))){
for (_local3 in _tweenList[_local2].properties) {
_local4.push(_local3);
};
};
_local2++;
};
return (_local4);
}
public static function isTweening(_arg1:Object):Boolean{
var _local2:uint;
if (!Boolean(_tweenList)){
return (false);
};
_local2 = 0;
while (_local2 < _tweenList.length) {
if (((Boolean(_tweenList[_local2])) && ((_tweenList[_local2].scope == _arg1)))){
return (true);
};
_local2++;
};
return (false);
}
public static function pauseTweenByIndex(_arg1:Number):Boolean{
var _local2:TweenListObj;
_local2 = _tweenList[_arg1];
if ((((_local2 == null)) || (_local2.isPaused))){
return (false);
};
_local2.timePaused = getCurrentTweeningTime(_local2);
_local2.isPaused = true;
return (true);
}
public static function getCurrentTweeningTime(_arg1:Object):Number{
return ((_arg1.useFrames) ? _currentTimeFrame : _currentTime);
}
public static function getTweenCount(_arg1:Object):Number{
var _local2:uint;
var _local3:Number;
if (!Boolean(_tweenList)){
return (0);
};
_local3 = 0;
_local2 = 0;
while (_local2 < _tweenList.length) {
if (((Boolean(_tweenList[_local2])) && ((_tweenList[_local2].scope == _arg1)))){
_local3 = (_local3 + AuxFunctions.getObjectLength(_tweenList[_local2].properties));
};
_local2++;
};
return (_local3);
}
private static function stopEngine():void{
_engineExists = false;
_tweenList = null;
_currentTime = 0;
_currentTimeFrame = 0;
__tweener_controller__.removeEventListener(Event.ENTER_FRAME, Tweener.onEnterFrame);
__tweener_controller__ = null;
}
public static function removeTweensByTime(_arg1:Object, _arg2:Object, _arg3:Number, _arg4:Number):Boolean{
var removed:Boolean;
var removedLocally:Boolean;
var i:uint;
var tl:uint;
var pName:String;
var eventScope:Object;
var p_scope = _arg1;
var p_properties = _arg2;
var p_timeStart = _arg3;
var p_timeComplete = _arg4;
removed = false;
tl = _tweenList.length;
i = 0;
while (i < tl) {
if (((Boolean(_tweenList[i])) && ((p_scope == _tweenList[i].scope)))){
if ((((p_timeComplete > _tweenList[i].timeStart)) && ((p_timeStart < _tweenList[i].timeComplete)))){
removedLocally = false;
for (pName in _tweenList[i].properties) {
if (Boolean(p_properties[pName])){
if (Boolean(_tweenList[i].onOverwrite)){
eventScope = (Boolean(_tweenList[i].onOverwriteScope)) ? _tweenList[i].onOverwriteScope : _tweenList[i].scope;
try {
_tweenList[i].onOverwrite.apply(eventScope, _tweenList[i].onOverwriteParams);
} catch(e:Error) {
handleError(_tweenList[i], e, "onOverwrite");
};
};
_tweenList[i].properties[pName] = undefined;
delete _tweenList[i].properties[pName];
removedLocally = true;
removed = true;
};
};
if (removedLocally){
if (AuxFunctions.getObjectLength(_tweenList[i].properties) == 0){
removeTweenByIndex(i);
};
};
};
};
i = (i + 1);
};
return (removed);
}
public static function registerSpecialPropertySplitter(_arg1:String, _arg2:Function, _arg3:Array=null):void{
var _local4:SpecialPropertySplitter;
if (!_inited){
init();
};
_local4 = new SpecialPropertySplitter(_arg2, _arg3);
_specialPropertySplitterList[_arg1] = _local4;
}
public static function removeTweenByIndex(_arg1:Number, _arg2:Boolean=false):Boolean{
_tweenList[_arg1] = null;
if (_arg2){
_tweenList.splice(_arg1, 1);
};
return (true);
}
public static function resumeTweens(_arg1:Object, ... _args):Boolean{
var _local3:Array;
var _local4:uint;
_local3 = new Array();
_local4 = 0;
while (_local4 < _args.length) {
if ((((typeof(_args[_local4]) == "string")) && (!(AuxFunctions.isInArray(_args[_local4], _local3))))){
_local3.push(_args[_local4]);
};
_local4++;
};
return (affectTweens(resumeTweenByIndex, _arg1, _local3));
}
public static function pauseTweens(_arg1:Object, ... _args):Boolean{
var _local3:Array;
var _local4:uint;
_local3 = new Array();
_local4 = 0;
while (_local4 < _args.length) {
if ((((typeof(_args[_local4]) == "string")) && (!(AuxFunctions.isInArray(_args[_local4], _local3))))){
_local3.push(_args[_local4]);
};
_local4++;
};
return (affectTweens(pauseTweenByIndex, _arg1, _local3));
}
}
}//package com.caurina.transitions
Section 19
//TweenListObj (com.caurina.transitions.TweenListObj)
package com.caurina.transitions {
public class TweenListObj {
public var onUpdate:Function;
public var useFrames:Boolean;
public var
:Boolean;
public var onOverwriteParams:Array;
public var timeStart:Number;
public var count:Number;
public var timeComplete:Number;
public var onStartParams:Array;
public var onUpdateScope:Object;
public var rounded:Boolean;
public var onUpdateParams:Array;
public var properties:Object;
public var onComplete:Function;
public var transitionParams:Object;
public var :Number;
public var onStart:Function;
public var onOverwriteScope:Object;
public var skipUpdates:Number;
public var onStartScope:Object;
public var scope:Object;
public var transition:Function;
public var timePaused:Number;
public var onCompleteParams:Array;
public var :Number;
public var :Boolean;
public var onError:Function;
public var onErrorScope:Object;
public var onOverwrite:Function;
public var isPaused:Boolean;
public var waitFrames:Boolean;
public var onCompleteScope:Object;
public function TweenListObj(_arg1:Object, _arg2:Number, _arg3:Number, _arg4:Boolean, _arg5:Function, _arg6:Object){
scope = _arg1;
timeStart = _arg2;
timeComplete = _arg3;
useFrames = _arg4;
transition = _arg5;
transitionParams = _arg6;
properties = new Object();
isPaused = false;
timePaused = undefined;
= false;
= 0;
= 0;
skipUpdates = 0;
= false;
}
public function clone(_arg1:Boolean):TweenListObj{
var _local2:TweenListObj;
var _local3:String;
_local2 = new TweenListObj(scope, timeStart, timeComplete, useFrames, transition, transitionParams);
_local2.properties = new Array();
for (_local3 in properties) {
_local2.properties[_local3] = properties[_local3].clone();
};
_local2.skipUpdates = skipUpdates;
_local2. = ;
if (!_arg1){
_local2.onStart = onStart;
_local2.onUpdate = onUpdate;
_local2.onComplete = onComplete;
_local2.onOverwrite = onOverwrite;
_local2.onError = onError;
_local2.onStartParams = onStartParams;
_local2.onUpdateParams = onUpdateParams;
_local2.onCompleteParams = onCompleteParams;
_local2.onOverwriteParams = onOverwriteParams;
_local2.onStartScope = onStartScope;
_local2.onUpdateScope = onUpdateScope;
_local2.onCompleteScope = onCompleteScope;
_local2.onOverwriteScope = onOverwriteScope;
_local2.onErrorScope = onErrorScope;
};
_local2.rounded = rounded;
_local2.isPaused = isPaused;
_local2.timePaused = timePaused;
_local2. = ;
_local2.count = count;
_local2. = ;
_local2.waitFrames = waitFrames;
_local2.
=
;
return (_local2);
}
public function toString():String{
var _local1:String;
var _local2:Boolean;
var _local3:String;
_local1 = "\n[TweenListObj ";
_local1 = (_local1 + ("scope:" + String(scope)));
_local1 = (_local1 + ", properties:");
_local2 = true;
for (_local3 in properties) {
if (!_local2){
_local1 = (_local1 + ",");
};
_local1 = (_local1 + ("[name:" + properties[_local3].name));
_local1 = (_local1 + (",valueStart:" + properties[_local3].valueStart));
_local1 = (_local1 + (",valueComplete:" + properties[_local3].valueComplete));
_local1 = (_local1 + "]");
_local2 = false;
};
_local1 = (_local1 + (", timeStart:" + String(timeStart)));
_local1 = (_local1 + (", timeComplete:" + String(timeComplete)));
_local1 = (_local1 + (", useFrames:" + String(useFrames)));
_local1 = (_local1 + (", transition:" + String(transition)));
_local1 = (_local1 + (", transitionParams:" + String(transitionParams)));
if (skipUpdates){
_local1 = (_local1 + (", skipUpdates:" + String(skipUpdates)));
};
if ( ){
_local1 = (_local1 + (", updatesSkipped:" + String( )));
};
if (Boolean(onStart)){
_local1 = (_local1 + (", onStart:" + String(onStart)));
};
if (Boolean(onUpdate)){
_local1 = (_local1 + (", onUpdate:" + String(onUpdate)));
};
if (Boolean(onComplete)){
_local1 = (_local1 + (", onComplete:" + String(onComplete)));
};
if (Boolean(onOverwrite)){
_local1 = (_local1 + (", onOverwrite:" + String(onOverwrite)));
};
if (Boolean(onError)){
_local1 = (_local1 + (", onError:" + String(onError)));
};
if (onStartParams){
_local1 = (_local1 + (", onStartParams:" + String(onStartParams)));
};
if (onUpdateParams){
_local1 = (_local1 + (", onUpdateParams:" + String(onUpdateParams)));
};
if (onCompleteParams){
_local1 = (_local1 + (", onCompleteParams:" + String(onCompleteParams)));
};
if (onOverwriteParams){
_local1 = (_local1 + (", onOverwriteParams:" + String(onOverwriteParams)));
};
if (onStartScope){
_local1 = (_local1 + (", onStartScope:" + String(onStartScope)));
};
if (onUpdateScope){
_local1 = (_local1 + (", onUpdateScope:" + String(onUpdateScope)));
};
if (onCompleteScope){
_local1 = (_local1 + (", onCompleteScope:" + String(onCompleteScope)));
};
if (onOverwriteScope){
_local1 = (_local1 + (", onOverwriteScope:" + String(onOverwriteScope)));
};
if (onErrorScope){
_local1 = (_local1 + (", onErrorScope:" + String(onErrorScope)));
};
if (rounded){
_local1 = (_local1 + (", rounded:" + String(rounded)));
};
if (isPaused){
_local1 = (_local1 + (", isPaused:" + String(isPaused)));
};
if (timePaused){
_local1 = (_local1 + (", timePaused:" + String(timePaused)));
};
if (){
_local1 = (_local1 + (", isCaller:" + String()));
};
if (count){
_local1 = (_local1 + (", count:" + String(count)));
};
if (){
_local1 = (_local1 + (", timesCalled:" + String()));
};
if (waitFrames){
_local1 = (_local1 + (", waitFrames:" + String(waitFrames)));
};
if (
){
_local1 = (_local1 + (", hasStarted:" + String(
)));
};
_local1 = (_local1 + "]\n");
return (_local1);
}
public static function makePropertiesChain(_arg1:Object):Object{
var _local2:Object;
var _local3:Object;
var _local4:Object;
var _local5:Object;
var _local6:Number;
var _local7:Number;
var _local8:Number;
_local2 = _arg1.base;
if (_local2){
_local3 = {};
if ((_local2 is Array)){
_local4 = [];
_local8 = 0;
while (_local8 < _local2.length) {
_local4.push(_local2[_local8]);
_local8++;
};
} else {
_local4 = [_local2];
};
_local4.push(_arg1);
_local6 = _local4.length;
_local7 = 0;
while (_local7 < _local6) {
if (_local4[_local7]["base"]){
_local5 = AuxFunctions.concatObjects(makePropertiesChain(_local4[_local7]["base"]), _local4[_local7]);
} else {
_local5 = _local4[_local7];
};
_local3 = AuxFunctions.concatObjects(_local3, _local5);
_local7++;
};
if (_local3["base"]){
delete _local3["base"];
};
return (_local3);
//unresolved jump
};
return (_arg1);
}
}
}//package com.caurina.transitions
Section 20
//StartEvent (com.event.StartEvent)
package com.event {
import flash.events.*;
public class StartEvent extends Event {
public static const START:String = "start";
public function StartEvent(_arg1:String){
super(_arg1);
}
}
}//package com.event
Section 21
//3dcslogo_8 (Off_Balance_viral_Scene1_fla.3dcslogo_8)
package Off_Balance_viral_Scene1_fla {
import flash.display.*;
public dynamic class 3dcslogo_8 extends MovieClip {
public function 3dcslogo_8(){
addFrameScript(29, );
}
function (){
stop();
}
}
}//package Off_Balance_viral_Scene1_fla
Section 22
//afaaaaaaaaaaaaaaa_68 (Off_Balance_viral_Scene1_fla.afaaaaaaaaaaaaaaa_68)
package Off_Balance_viral_Scene1_fla {
import flash.display.*;
public dynamic class afaaaaaaaaaaaaaaa_68 extends MovieClip {
public function afaaaaaaaaaaaaaaa_68(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Off_Balance_viral_Scene1_fla
Section 23
//anim_4 (Off_Balance_viral_Scene1_fla.anim_4)
package Off_Balance_viral_Scene1_fla {
import flash.display.*;
public dynamic class anim_4 extends MovieClip {
public var cslogo_mc:MovieClip;
}
}//package Off_Balance_viral_Scene1_fla
Section 24
//CSLOGO_5 (Off_Balance_viral_Scene1_fla.CSLOGO_5)
package Off_Balance_viral_Scene1_fla {
import flash.events.*;
import flash.display.*;
import com.candystand.Stinger.*;
public dynamic class CSLOGO_5 extends MovieClip {
public var logo_button:SimpleButton;
public function CSLOGO_5(){
addFrameScript(40, , 54, );
}
function (){
this.logo_button.addEventListener(MouseEvent.CLICK, Stinger3D._instance.CSHomepageLink, false, 0, true);
}
function (){
stop();
}
}
}//package Off_Balance_viral_Scene1_fla
Section 25
//dfhdfh_79 (Off_Balance_viral_Scene1_fla.dfhdfh_79)
package Off_Balance_viral_Scene1_fla {
import flash.display.*;
public dynamic class dfhdfh_79 extends MovieClip {
public function dfhdfh_79(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Off_Balance_viral_Scene1_fla
Section 26
//oiu_145 (Off_Balance_viral_Scene1_fla.oiu_145)
package Off_Balance_viral_Scene1_fla {
import flash.display.*;
public dynamic class oiu_145 extends MovieClip {
public function oiu_145(){
addFrameScript(36, frame37);
}
function frame37(){
stop();
}
}
}//package Off_Balance_viral_Scene1_fla
Section 27
//playButton_14 (Off_Balance_viral_Scene1_fla.playButton_14)
package Off_Balance_viral_Scene1_fla {
import flash.display.*;
import flash.text.*;
public dynamic class playButton_14 extends MovieClip {
public var buttonText:TextField;
}
}//package Off_Balance_viral_Scene1_fla
Section 28
//Symbol1_57 (Off_Balance_viral_Scene1_fla.Symbol1_57)
package Off_Balance_viral_Scene1_fla {
import flash.display.*;
public dynamic class Symbol1_57 extends MovieClip {
public function Symbol1_57(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Off_Balance_viral_Scene1_fla
Section 29
//Symbol11_83 (Off_Balance_viral_Scene1_fla.Symbol11_83)
package Off_Balance_viral_Scene1_fla {
import flash.display.*;
public dynamic class Symbol11_83 extends MovieClip {
public function Symbol11_83(){
addFrameScript(35,
);
}
function
(){
stop();
}
}
}//package Off_Balance_viral_Scene1_fla
Section 30
//Symbol14_19 (Off_Balance_viral_Scene1_fla.Symbol14_19)
package Off_Balance_viral_Scene1_fla {
import flash.display.*;
public dynamic class Symbol14_19 extends MovieClip {
public var aaa:MovieClip;
public function Symbol14_19(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Off_Balance_viral_Scene1_fla
Section 31
//Symbol16_88 (Off_Balance_viral_Scene1_fla.Symbol16_88)
package Off_Balance_viral_Scene1_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Symbol16_88 extends MovieClip {
public var point_out:TextField;
public var thin:MovieClip;
public function Symbol16_88(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Off_Balance_viral_Scene1_fla
Section 32
//Symbol18_77 (Off_Balance_viral_Scene1_fla.Symbol18_77)
package Off_Balance_viral_Scene1_fla {
import flash.display.*;
public dynamic class Symbol18_77 extends MovieClip {
public function Symbol18_77(){
addFrameScript(0, frame1, 26, frame27, 36, frame37, 47, );
}
function frame1(){
stop();
}
function frame27(){
gotoAndStop(1);
}
function frame37(){
gotoAndStop(1);
}
function (){
gotoAndStop(1);
}
}
}//package Off_Balance_viral_Scene1_fla
Section 33
//Symbol1copy_59 (Off_Balance_viral_Scene1_fla.Symbol1copy_59)
package Off_Balance_viral_Scene1_fla {
import flash.display.*;
public dynamic class Symbol1copy_59 extends MovieClip {
public var fat:MovieClip;
public var colors:MovieClip;
}
}//package Off_Balance_viral_Scene1_fla
Section 34
//Symbol21_60 (Off_Balance_viral_Scene1_fla.Symbol21_60)
package Off_Balance_viral_Scene1_fla {
import flash.display.*;
public dynamic class Symbol21_60 extends MovieClip {
public var a:MovieClip;
public function Symbol21_60(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Off_Balance_viral_Scene1_fla
Section 35
//Symbol23_38 (Off_Balance_viral_Scene1_fla.Symbol23_38)
package Off_Balance_viral_Scene1_fla {
import flash.events.*;
import flash.display.*;
public dynamic class Symbol23_38 extends MovieClip {
public var pressed:Boolean;
public var targ:Number;
public var but:MovieClip;
public var cad:MovieClip;
public function Symbol23_38(){
addFrameScript(0, frame1);
}
public function (_arg1:MouseEvent):void{
pressed = true;
}
function frame1(){
but.addEventListener(MouseEvent.MOUSE_DOWN, );
but.addEventListener(MouseEvent.MOUSE_UP, );
but.addEventListener(MouseEvent.ROLL_OUT, );
}
public function (_arg1:MouseEvent):void{
pressed = false;
}
}
}//package Off_Balance_viral_Scene1_fla
Section 36
//Symbol25_78 (Off_Balance_viral_Scene1_fla.Symbol25_78)
package Off_Balance_viral_Scene1_fla {
import flash.display.*;
public dynamic class Symbol25_78 extends MovieClip {
public function Symbol25_78(){
addFrameScript(0, frame1, 6, , 11, frame12, 16, frame17, 21, , 26, frame27, 31, frame32, 36, frame37, 41, , 46, );
}
function frame12(){
gotoAndStop(1);
}
function (){
gotoAndStop(1);
}
function frame1(){
stop();
}
function (){
gotoAndStop(1);
}
function frame17(){
gotoAndStop(1);
}
function frame27(){
gotoAndStop(1);
}
function frame37(){
gotoAndStop(1);
}
function (){
gotoAndStop(1);
}
function frame32(){
gotoAndStop(1);
}
function (){
gotoAndStop(1);
}
}
}//package Off_Balance_viral_Scene1_fla
Section 37
//Symbol28_39 (Off_Balance_viral_Scene1_fla.Symbol28_39)
package Off_Balance_viral_Scene1_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Symbol28_39 extends MovieClip {
public var yui:TextField;
}
}//package Off_Balance_viral_Scene1_fla
Section 38
//Symbol29_63 (Off_Balance_viral_Scene1_fla.Symbol29_63)
package Off_Balance_viral_Scene1_fla {
import flash.display.*;
public dynamic class Symbol29_63 extends MovieClip {
public var up:MovieClip;
public function Symbol29_63(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Off_Balance_viral_Scene1_fla
Section 39
//Symbol31_147 (Off_Balance_viral_Scene1_fla.Symbol31_147)
package Off_Balance_viral_Scene1_fla {
import flash.display.*;
public dynamic class Symbol31_147 extends MovieClip {
public function Symbol31_147(){
addFrameScript(0, frame1, 1, );
}
function frame1(){
stop();
}
function (){
stop();
}
}
}//package Off_Balance_viral_Scene1_fla
Section 40
//Symbol34_109 (Off_Balance_viral_Scene1_fla.Symbol34_109)
package Off_Balance_viral_Scene1_fla {
import flash.display.*;
public dynamic class Symbol34_109 extends MovieClip {
public var xpos:Number;
public var ypos:Number;
public var point_y:Number;
public var point_x:Number;
public var changed:Boolean;
public var face_mc:MovieClip;
public var sleep:Boolean;
public function Symbol34_109(){
addFrameScript(0, frame1, 38, );
}
function frame1(){
sleep = true;
changed = false;
xpos = MovieClip(this).x;
ypos = MovieClip(this).y;
point_x = MovieClip(this).x;
point_y = MovieClip(this).y;
stop();
}
function (){
stop();
}
}
}//package Off_Balance_viral_Scene1_fla
Section 41
//Symbol35_141 (Off_Balance_viral_Scene1_fla.Symbol35_141)
package Off_Balance_viral_Scene1_fla {
import flash.display.*;
public dynamic class Symbol35_141 extends MovieClip {
public function Symbol35_141(){
addFrameScript(90, );
}
function (){
stop();
}
}
}//package Off_Balance_viral_Scene1_fla
Section 42
//Symbol36_110 (Off_Balance_viral_Scene1_fla.Symbol36_110)
package Off_Balance_viral_Scene1_fla {
import flash.display.*;
public dynamic class Symbol36_110 extends MovieClip {
public function Symbol36_110(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Off_Balance_viral_Scene1_fla
Section 43
//Symbol4_62 (Off_Balance_viral_Scene1_fla.Symbol4_62)
package Off_Balance_viral_Scene1_fla {
import flash.display.*;
public dynamic class Symbol4_62 extends MovieClip {
public function Symbol4_62(){
addFrameScript(18,
);
}
function
(){
stop();
}
}
}//package Off_Balance_viral_Scene1_fla
Section 44
//Symbol41_138 (Off_Balance_viral_Scene1_fla.Symbol41_138)
package Off_Balance_viral_Scene1_fla {
import flash.display.*;
public dynamic class Symbol41_138 extends MovieClip {
public function Symbol41_138(){
addFrameScript(31, frame32);
}
function frame32(){
stop();
}
}
}//package Off_Balance_viral_Scene1_fla
Section 45
//Symbol46_48 (Off_Balance_viral_Scene1_fla.Symbol46_48)
package Off_Balance_viral_Scene1_fla {
import flash.display.*;
public dynamic class Symbol46_48 extends MovieClip {
public function Symbol46_48(){
addFrameScript(11, frame12);
}
function frame12(){
stop();
}
}
}//package Off_Balance_viral_Scene1_fla
Section 46
//Symbol46copy_53 (Off_Balance_viral_Scene1_fla.Symbol46copy_53)
package Off_Balance_viral_Scene1_fla {
import flash.display.*;
public dynamic class Symbol46copy_53 extends MovieClip {
public function Symbol46copy_53(){
addFrameScript(11, frame12);
}
function frame12(){
stop();
}
}
}//package Off_Balance_viral_Scene1_fla
Section 47
//Symbol46copy2_35 (Off_Balance_viral_Scene1_fla.Symbol46copy2_35)
package Off_Balance_viral_Scene1_fla {
import flash.display.*;
public dynamic class Symbol46copy2_35 extends MovieClip {
public function Symbol46copy2_35(){
addFrameScript(11, frame12);
}
function frame12(){
stop();
}
}
}//package Off_Balance_viral_Scene1_fla
Section 48
//Symbol46copy5_46 (Off_Balance_viral_Scene1_fla.Symbol46copy5_46)
package Off_Balance_viral_Scene1_fla {
import flash.display.*;
public dynamic class Symbol46copy5_46 extends MovieClip {
public function Symbol46copy5_46(){
addFrameScript(11, frame12);
}
function frame12(){
stop();
}
}
}//package Off_Balance_viral_Scene1_fla
Section 49
//Symbol49_50 (Off_Balance_viral_Scene1_fla.Symbol49_50)
package Off_Balance_viral_Scene1_fla {
import flash.display.*;
public dynamic class Symbol49_50 extends MovieClip {
public function Symbol49_50(){
addFrameScript(11, frame12);
}
function frame12(){
stop();
}
}
}//package Off_Balance_viral_Scene1_fla
Section 50
//Symbol5_64 (Off_Balance_viral_Scene1_fla.Symbol5_64)
package Off_Balance_viral_Scene1_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Symbol5_64 extends MovieClip {
public var scoring:TextField;
public function Symbol5_64(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Off_Balance_viral_Scene1_fla
Section 51
//Symbol51_33 (Off_Balance_viral_Scene1_fla.Symbol51_33)
package Off_Balance_viral_Scene1_fla {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.filters.*;
import flash.ui.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class Symbol51_33 extends MovieClip {
public var b2:SimpleButton;
public var sponsor:SimpleButton;
public var b1:SimpleButton;
public var b3:SimpleButton;
public var :Number;
public var ia:SimpleButton;
public var :int;
public var bl:SimpleButton;
public var inst:SimpleButton;
public var scroller:MovieClip;
public var options:SimpleButton;
public var
:Number;
public var :Number;
public var :Number;
public var :Number;
public var go:SimpleButton;
public var :Boolean;
public function Symbol51_33(){
addFrameScript(0, frame1);
}
public function
(_arg1:MouseEvent):void{
MovieClip(root).Game.score = MovieClip(root).points;
MovieClip(root).Game.submitScore();
}
public function (_arg1:MouseEvent):void{
= -870;
MovieClip(parent).gaga.gotoAndStop(4);
}
public function (_arg1:MouseEvent):void{
= 214;
MovieClip(parent).gaga.gotoAndStop(1);
}
public function (_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://www.candystand.com/index.do?vgid=18351"), "_blank");
}
function frame1(){
= 214;
= y;
= MovieClip(parent).ballo.x;
= MovieClip(parent).ballo.y;
= MovieClip(parent).ballo.x;
= MovieClip(parent).ballo.y;
= false;
MovieClip(parent).sensitivity = 1;
addEventListener(Event.ENTER_FRAME, );
ia.addEventListener(MouseEvent.CLICK, );
go.addEventListener(MouseEvent.CLICK,
);
inst.addEventListener(MouseEvent.CLICK, );
sponsor.addEventListener(MouseEvent.CLICK, );
bl.addEventListener(MouseEvent.CLICK, );
b1.addEventListener(MouseEvent.CLICK, );
b2.addEventListener(MouseEvent.CLICK, );
b3.addEventListener(MouseEvent.CLICK, );
go.addEventListener(MouseEvent.MOUSE_OVER, );
go.addEventListener(MouseEvent.MOUSE_OUT, );
inst.addEventListener(MouseEvent.MOUSE_OVER, );
inst.addEventListener(MouseEvent.MOUSE_OUT, );
sponsor.addEventListener(MouseEvent.MOUSE_OVER, );
sponsor.addEventListener(MouseEvent.MOUSE_OUT, );
bl.addEventListener(MouseEvent.MOUSE_OVER, );
bl.addEventListener(MouseEvent.MOUSE_OUT, );
b1.addEventListener(MouseEvent.MOUSE_OVER, );
b1.addEventListener(MouseEvent.MOUSE_OUT, );
b2.addEventListener(MouseEvent.MOUSE_OVER, );
b2.addEventListener(MouseEvent.MOUSE_OUT, );
b3.addEventListener(MouseEvent.MOUSE_OVER, );
b3.addEventListener(MouseEvent.MOUSE_OUT, );
ia.addEventListener(MouseEvent.MOUSE_OVER, );
ia.addEventListener(MouseEvent.MOUSE_OUT, );
}
public function
(_arg1:MouseEvent):void{
= 490;
MovieClip(parent).aaa.play();
MovieClip(parent).aaa.fat.gotoAndStop(2);
}
public function (_arg1:Event):void{
if (scroller.pressed){
if (scroller.mouseX > 114){
scroller.targ = 114;
} else {
if (scroller.mouseX < -114){
scroller.targ = -114;
} else {
scroller.targ = scroller.mouseX;
};
};
};
scroller.cad.x = (scroller.cad.x + ((scroller.targ - scroller.cad.x) / 5));
MovieClip(parent).sensitivity = (((scroller.cad.x + 114) / 228) * 2);
scroller.cad.yui.text = String((Math.round(((((scroller.cad.x + 114) / 228) * 2) * 10)) / 10));
x = (x + (( - x) / 10));
y = (y + (( - y) / 10));
if (){
MovieClip(parent).ballo.x = (MovieClip(parent).ballo.x + (((x +
) - MovieClip(parent).ballo.x) / 10));
MovieClip(parent).ballo.y = (MovieClip(parent).ballo.y + (((y + ) - MovieClip(parent).ballo.y) / 10));
} else {
MovieClip(parent).ballo.x = (MovieClip(parent).ballo.x + ((
- MovieClip(parent).ballo.x) / 10));
MovieClip(parent).ballo.y = (MovieClip(parent).ballo.y + (( - MovieClip(parent).ballo.y) / 10));
};
if (y > 480){
removeEventListener(Event.ENTER_FRAME, );
MovieClip(parent).play();
};
}
public function (_arg1:MouseEvent):void{
= -314;
MovieClip(parent).gaga.gotoAndStop(3);
}
public function (_arg1:MouseEvent):void{
= _arg1.target.x;
= (_arg1.target.y - 31);
= true;
}
public function (_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://www.candystand.com/play.do?id=18351&vgid=18351"), "_blank");
}
public function (_arg1:MouseEvent):void{
= 754;
MovieClip(parent).gaga.gotoAndStop(2);
}
public function (_arg1:MouseEvent):void{
= false;
= ;
= ;
}
}
}//package Off_Balance_viral_Scene1_fla
Section 52
//Symbol53_37 (Off_Balance_viral_Scene1_fla.Symbol53_37)
package Off_Balance_viral_Scene1_fla {
import flash.display.*;
public dynamic class Symbol53_37 extends MovieClip {
public function Symbol53_37(){
addFrameScript(11, frame12);
}
function frame12(){
stop();
}
}
}//package Off_Balance_viral_Scene1_fla
Section 53
//Symbol54_32 (Off_Balance_viral_Scene1_fla.Symbol54_32)
package Off_Balance_viral_Scene1_fla {
import flash.display.*;
public dynamic class Symbol54_32 extends MovieClip {
public var fat:MovieClip;
public function Symbol54_32(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Off_Balance_viral_Scene1_fla
Section 54
//Symbol55_16 (Off_Balance_viral_Scene1_fla.Symbol55_16)
package Off_Balance_viral_Scene1_fla {
import flash.display.*;
public dynamic class Symbol55_16 extends MovieClip {
public function Symbol55_16(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Off_Balance_viral_Scene1_fla
Section 55
//Symbol56_153 (Off_Balance_viral_Scene1_fla.Symbol56_153)
package Off_Balance_viral_Scene1_fla {
import flash.display.*;
public dynamic class Symbol56_153 extends MovieClip {
public var tetas:MovieClip;
}
}//package Off_Balance_viral_Scene1_fla
Section 56
//Symbol6_28 (Off_Balance_viral_Scene1_fla.Symbol6_28)
package Off_Balance_viral_Scene1_fla {
import flash.events.*;
import flash.display.*;
import flash.net.*;
public dynamic class Symbol6_28 extends MovieClip {
public var ia:SimpleButton;
public function Symbol6_28(){
addFrameScript(0, frame1, 339,
);
}
public function to_ia(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://www.insaneangelstudio.com"), "_blank");
}
function
(){
MovieClip(parent).play();
}
function frame1(){
MovieClip(parent).stop();
ia.addEventListener(MouseEvent.CLICK, to_ia);
}
}
}//package Off_Balance_viral_Scene1_fla
Section 57
//Symbol60_127 (Off_Balance_viral_Scene1_fla.Symbol60_127)
package Off_Balance_viral_Scene1_fla {
import flash.display.*;
public dynamic class Symbol60_127 extends MovieClip {
public var xpos:Number;
public var ypos:Number;
public var rosa:MovieClip;
public var point_y:Number;
public var point_x:Number;
public var changed:Boolean;
public var face_mc:MovieClip;
public var sleep:Boolean;
public function Symbol60_127(){
addFrameScript(0, frame1, 32,
);
}
function frame1(){
sleep = true;
changed = false;
xpos = MovieClip(this).x;
ypos = MovieClip(this).y;
point_x = MovieClip(this).x;
point_y = MovieClip(this).y;
stop();
}
function
(){
stop();
}
}
}//package Off_Balance_viral_Scene1_fla
Section 58
//Symbol8_69 (Off_Balance_viral_Scene1_fla.Symbol8_69)
package Off_Balance_viral_Scene1_fla {
import flash.display.*;
public dynamic class Symbol8_69 extends MovieClip {
public function Symbol8_69(){
addFrameScript(3, frame4);
}
function frame4(){
stop();
}
}
}//package Off_Balance_viral_Scene1_fla
Section 59
//Symbol81_148 (Off_Balance_viral_Scene1_fla.Symbol81_148)
package Off_Balance_viral_Scene1_fla {
import flash.display.*;
public dynamic class Symbol81_148 extends MovieClip {
public var colors:MovieClip;
}
}//package Off_Balance_viral_Scene1_fla
Section 60
//Symbol87_54 (Off_Balance_viral_Scene1_fla.Symbol87_54)
package Off_Balance_viral_Scene1_fla {
import flash.display.*;
public dynamic class Symbol87_54 extends MovieClip {
public function Symbol87_54(){
addFrameScript(16, frame17);
}
function frame17(){
stop();
}
}
}//package Off_Balance_viral_Scene1_fla
Section 61
//Symbol8copy_71 (Off_Balance_viral_Scene1_fla.Symbol8copy_71)
package Off_Balance_viral_Scene1_fla {
import flash.display.*;
public dynamic class Symbol8copy_71 extends MovieClip {
public function Symbol8copy_71(){
addFrameScript(15, );
}
function (){
stop();
}
}
}//package Off_Balance_viral_Scene1_fla
Section 62
//Symbol9_81 (Off_Balance_viral_Scene1_fla.Symbol9_81)
package Off_Balance_viral_Scene1_fla {
import flash.display.*;
public dynamic class Symbol9_81 extends MovieClip {
public function Symbol9_81(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Off_Balance_viral_Scene1_fla
Section 63
//Symbol90_133 (Off_Balance_viral_Scene1_fla.Symbol90_133)
package Off_Balance_viral_Scene1_fla {
import flash.events.*;
import flash.display.*;
import flash.net.*;
public dynamic class Symbol90_133 extends MovieClip {
public var ia:SimpleButton;
public var ca:SimpleButton;
public function Symbol90_133(){
addFrameScript(0, frame1);
}
public function to_ia(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://www.insaneangelstudio.com"), "_blank");
}
function frame1(){
ia.addEventListener(MouseEvent.CLICK, to_ia);
ca.addEventListener(MouseEvent.CLICK,
);
}
public function
(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://www.candystand.com/index.do?vgid=18351"), "_blank");
}
}
}//package Off_Balance_viral_Scene1_fla
Section 64
//tdd_20 (Off_Balance_viral_Scene1_fla.tdd_20)
package Off_Balance_viral_Scene1_fla {
import flash.display.*;
public dynamic class tdd_20 extends MovieClip {
public function tdd_20(){
addFrameScript(0, frame1, 2, , 3, frame4);
}
function (){
stop();
}
function frame1(){
stop();
}
function frame4(){
stop();
}
}
}//package Off_Balance_viral_Scene1_fla
Section 65
//Camera3D (org.papervision3d.cameras.Camera3D)
package org.papervision3d.cameras {
import org.papervision3d.objects.*;
import org.papervision3d.core.proto.*;
import org.papervision3d.core.*;
public class Camera3D extends CameraObject3D {
public var :Number3D;
public var target:DisplayObject3D;
public function Camera3D(_arg1:DisplayObject3D=null, _arg2:Number=2, _arg3:Number=100, _arg4:Object=null){
super(_arg2, _arg3, _arg4);
this.target = ((_arg1) || (DisplayObject3D.ZERO));
this. = new Number3D(this.x, this.y, this.z);
}
override public function transformView(_arg1:Matrix3D=null):void{
this.lookAt(this.target);
super.transformView();
}
public function (_arg1:Number, _arg2:Number, _arg3:Number):void{
var _local4:DisplayObject3D;
var _local5:Number3D;
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;
_local4 = this.target;
_local5 = this.;
_local6 = 8;
switch (_arg1){
case 0:
_local7 = (_local5.x - _local4.x);
_local8 = (_local5.z - _local4.z);
_local9 = Math.atan2(_local8, _local7);
_local10 = Math.sqrt(((_local7 * _local7) + (_local8 * _local8)));
_local11 = (0.5 * _arg2);
_local12 = (_local10 * Math.cos((_local9 - _local11)));
_local13 = (_local10 * Math.sin((_local9 - _local11)));
_local14 = (_local5.y - (300 * _arg3));
this.x = (this.x - ((this.x - _local12) / _local6));
this.y = (this.y - ((this.y - _local14) / _local6));
this.z = (this.z - ((this.z - _local13) / _local6));
break;
case 1:
this.x = (this.x - ((this.x - (1000 * _arg2)) / _local6));
this.y = (this.y - ((this.y - (1000 * _arg3)) / _local6));
break;
};
}
}
}//package org.papervision3d.cameras
Section 66
//DefaultTriangleCuller (org.papervision3d.core.culling.DefaultTriangleCuller)
package org.papervision3d.core.culling {
import org.papervision3d.objects.*;
import org.papervision3d.core.geom.*;
import org.papervision3d.core.proto.*;
public class DefaultTriangleCuller implements ITriangleCuller {
private static var y2:Number;
private static var y1:Number;
private static var y0:Number;
private static var x0:Number;
private static var x1:Number;
private static var x2:Number;
public function testFace(_arg1:DisplayObject3D, _arg2:Face3DInstance, _arg3:Vertex2D, _arg4:Vertex2D, _arg5:Vertex2D):Boolean{
var _local6:MaterialObject3D;
if (((((_arg3.visible) && (_arg4.visible))) && (_arg5.visible))){
_local6 = (_arg2.face.material) ? _arg2.face.material : _arg1.material;
if (_local6.invisible){
return (false);
};
x0 = _arg3.x;
y0 = _arg3.y;
x1 = _arg4.x;
y1 = _arg4.y;
x2 = _arg5.x;
y2 = _arg5.y;
if (_local6.oneSide){
if (_local6.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 67
//ITriangleCuller (org.papervision3d.core.culling.ITriangleCuller)
package org.papervision3d.core.culling {
import org.papervision3d.objects.*;
import org.papervision3d.core.geom.*;
public interface ITriangleCuller {
function testFace(_arg1:DisplayObject3D, _arg2:Face3DInstance, _arg3:Vertex2D, _arg4:Vertex2D, _arg5:Vertex2D):Boolean;
}
}//package org.papervision3d.core.culling
Section 68
//IFaceDrawer (org.papervision3d.core.draw.IFaceDrawer)
package org.papervision3d.core.draw {
import flash.display.*;
import org.papervision3d.objects.*;
import org.papervision3d.core.geom.*;
public interface IFaceDrawer {
function drawFace3D(_arg1:DisplayObject3D, _arg2:Face3D, _arg3:Graphics, _arg4:Vertex2D, _arg5:Vertex2D, _arg6:Vertex2D):int;
}
}//package org.papervision3d.core.draw
Section 69
//Face3D (org.papervision3d.core.geom.Face3D)
package org.papervision3d.core.geom {
import flash.display.*;
import org.papervision3d.objects.*;
import org.papervision3d.core.proto.*;
import org.papervision3d.core.*;
public class Face3D {
public var vertices:Array;
public var face3DInstance:Face3DInstance;
public var id:Number;
public var uv:Array;
public var material:MaterialObject3D;
private var :MaterialObject3D;
public var faceNormal:Number3D;
public var screenZ:Number;
public var :String;
public var visible:Boolean;
public var v0:Vertex3D;
public var v1:Vertex3D;
public var v2:Vertex3D;
private static var _totalFaces:Number = 0;
public function Face3D(_arg1:Array, _arg2:MaterialObject3D=null, _arg3:Array=null){
this.vertices = _arg1;
v0 = _arg1[0];
v1 = _arg1[1];
v2 = _arg1[2];
this.material = _arg2;
this.uv = _arg3;
this.id = _totalFaces++;
face3DInstance = new Face3DInstance(this);
();
}
protected function ():void{
var _local1:Number3D;
var _local2:Number3D;
var _local3:Number3D;
var _local4:Number3D;
var _local5:Number3D;
_local1 = v0.toNumber3D();
_local2 = v1.toNumber3D();
_local3 = v2.toNumber3D();
_local4 = Number3D.sub(_local2, _local1);
_local5 = Number3D.sub(_local3, _local1);
faceNormal = Number3D.cross(_local5, _local4);
faceNormal.normalize();
}
public function render(_arg1:DisplayObject3D, _arg2:Sprite):Number{
= (material) ? material : _arg1.material;
return ( .drawFace3D(_arg1, this, _arg2.graphics, v0.vertex2DInstance, v1.vertex2DInstance, v2.vertex2DInstance));
}
}
}//package org.papervision3d.core.geom
Section 70
//Face3DInstance (org.papervision3d.core.geom.Face3DInstance)
package org.papervision3d.core.geom {
import flash.display.*;
import org.papervision3d.objects.*;
import org.papervision3d.core.*;
public class Face3DInstance {
public var container:Sprite;
public var faceNormal:Number3D;
public var screenZ:Number;
public var visible:Boolean;// = false
public var instance:DisplayObject3D;
public var face:Face3D;
public function Face3DInstance(_arg1:Face3D, _arg2:DisplayObject3D=null){
visible = false;
super();
this.face = _arg1;
this.instance = _arg2;
faceNormal = new Number3D();
}
}
}//package org.papervision3d.core.geom
Section 71
//Mesh3D (org.papervision3d.core.geom.Mesh3D)
package org.papervision3d.core.geom {
import org.papervision3d.objects.*;
import org.papervision3d.core.proto.*;
import org.papervision3d.core.*;
import flash.utils.*;
import org.papervision3d.core.culling.*;
public class Mesh3D extends Vertices3D {
public function Mesh3D(_arg1:MaterialObject3D, _arg2:Array, _arg3:Array, _arg4:String=null, _arg5:Object=null){
super(_arg2, _arg4, _arg5);
this.geometry.faces = ((_arg3) || (new Array()));
this.material = ((_arg1) || (MaterialObject3D.DEFAULT));
}
override public function project(_arg1:DisplayObject3D, _arg2:CameraObject3D, _arg3:Array=null):Number{
var _local4:Array;
var _local5:Number;
var _local6:Number;
var _local7:ITriangleCuller;
var _local8:Vertex2D;
var _local9:Vertex2D;
var _local10:Vertex2D;
var _local11:Face3DInstance;
var _local12:Face3D;
var _local13:MaterialObject3D;
super.project(_arg1, _arg2, _arg3);
if (!_arg3){
_arg3 = this._sorted;
};
_local4 = this.geometry.faces;
_local5 = 0;
_local6 = 0;
_local7 = scene.triangleCuller;
for each (_local12 in _local4) {
_local13 = (_local12.material) ? _local12.material : material;
_local11 = _local12.face3DInstance;
_local11.instance = this;
_local8 = _local12.v0.vertex2DInstance;
_local9 = _local12.v1.vertex2DInstance;
_local10 = _local12.v2.vertex2DInstance;
if ((_local11.visible = _local7.testFace(this, _local11, _local8, _local9, _local10))){
if (_local13.needsFaceNormals){
_local12.faceNormal.copyTo(_local11.faceNormal);
Matrix3D.multiplyVector3x3(this.view, _local11.faceNormal);
};
if (_local13.needsVertexNormals){
_local12.v0.normal.copyTo(_local12.v0.vertex2DInstance.normal);
Matrix3D.multiplyVector3x3(this.view, _local12.v0.vertex2DInstance.normal);
_local12.v1.normal.copyTo(_local12.v1.vertex2DInstance.normal);
Matrix3D.multiplyVector3x3(this.view, _local12.v1.vertex2DInstance.normal);
_local12.v2.normal.copyTo(_local12.v2.vertex2DInstance.normal);
Matrix3D.multiplyVector3x3(this.view, _local12.v2.vertex2DInstance.normal);
};
switch (meshSort){
case DisplayObject3D.MESH_SORT_CENTER:
_local5 = (_local5 + (_local11.screenZ = (((_local8.z + _local9.z) + _local10.z) * 0.333)));
break;
case DisplayObject3D.MESH_SORT_FAR:
_local5 = (_local5 + (_local11.screenZ = Math.max(_local8.z, _local9.z, _local10.z)));
break;
case DisplayObject3D.MESH_SORT_CLOSE:
_local5 = (_local5 + (_local11.screenZ = Math.min(_local8.z, _local9.z, _local10.z)));
break;
};
_local6++;
_arg3.push(_local11);
} else {
scene.stats.culledTriangles++;
};
};
return ((this.screenZ = (_local5 / _local6)));
}
public function ():void{
var _local1:Dictionary;
var _local2:Array;
var _local3:Vertex3D;
var _local4:Face3D;
var _local5:Vertex3D;
_local1 = new Dictionary();
_local2 = 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 this.geometry.faces) {
_local4.v0 = _local1[_local4.v0];
_local4.v1 = _local1[_local4.v1];
_local4.v2 = _local1[_local4.v2];
};
}
public function (_arg1:String="x", _arg2:String="y"):void{
var _local3:Array;
var _local4:Object;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:MaterialObject3D;
var _local10:String;
var _local11:Face3D;
var _local12:Array;
var _local13:Vertex3D;
var _local14:Vertex3D;
var _local15:Vertex3D;
var _local16:NumberUV;
var _local17:NumberUV;
var _local18:NumberUV;
_local3 = this.geometry.faces;
_local4 = this.boundingBox();
_local5 = _local4.min[_arg1];
_local6 = _local4.size[_arg1];
_local7 = _local4.min[_arg2];
_local8 = _local4.size[_arg2];
_local9 = 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];
};
}
}
}//package org.papervision3d.core.geom
Section 72
//Vertex2D (org.papervision3d.core.geom.Vertex2D)
package org.papervision3d.core.geom {
import org.papervision3d.core.*;
public class Vertex2D {
public var visible:Boolean;
public var normal:Number3D;
public var extra:Object;
public var x:Number;
public var y:Number;
public var z:Number;
public function Vertex2D(_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():Vertex2D{
var _local1:Vertex2D;
_local1 = new Vertex2D(x, y, z);
_local1.visible = visible;
_local1.extra = extra;
return (_local1);
}
}
}//package org.papervision3d.core.geom
Section 73
//Vertex3D (org.papervision3d.core.geom.Vertex3D)
package org.papervision3d.core.geom {
import org.papervision3d.core.*;
import flash.utils.*;
public class Vertex3D {
public var vertex2DInstance:Vertex2D;
public var connectedFaces:Dictionary;
public var normal:Number3D;
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){
this.x = _arg1;
this.y = _arg2;
this.z = _arg3;
this.vertex2DInstance = new Vertex2D();
this.normal = new Number3D();
this.connectedFaces = new Dictionary();
}
public function calculateNormal():void{
var _local1:Face3D;
normal = new Number3D();
for each (_local1 in connectedFaces) {
normal = Number3D.add(_local1.faceNormal, normal);
};
normal.normalize();
}
public function toNumber3D():Number3D{
return (new Number3D(x, y, z));
}
public function clone():Vertex3D{
var _local1:Vertex3D;
_local1 = new Vertex3D(x, y, z);
_local1.extra = extra;
_local1.vertex2DInstance = vertex2DInstance.clone();
_local1.normal = normal.clone();
return (_local1);
}
}
}//package org.papervision3d.core.geom
Section 74
//Vertices3D (org.papervision3d.core.geom.Vertices3D)
package org.papervision3d.core.geom {
import org.papervision3d.objects.*;
import org.papervision3d.core.proto.*;
import org.papervision3d.core.*;
import org.papervision3d.scenes.*;
public class Vertices3D extends DisplayObject3D {
public function Vertices3D(_arg1:Array, _arg2:String=null, _arg3:Object=null){
super(_arg2, new GeometryObject3D(), _arg3);
this.geometry.vertices = ((_arg1) || (new Array()));
}
override public function project(_arg1:DisplayObject3D, _arg2:CameraObject3D, _arg3:Array=null):Number{
var _local4:Matrix3D;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local19:Number;
var _local20:Vertex3D;
var _local21:Vertex2D;
var _local22:Number;
var _local23:Array;
var _local24:int;
var _local25:Number;
var _local26:Number;
super.project(_arg1, _arg2, _arg3);
_local4 = this.view;
_local5 = _local4.n11;
_local6 = _local4.n12;
_local7 = _local4.n13;
_local8 = _local4.n21;
_local9 = _local4.n22;
_local10 = _local4.n23;
_local11 = _local4.n31;
_local12 = _local4.n32;
_local13 = _local4.n33;
_local23 = this.geometry.vertices;
_local24 = _local23.length;
_local25 = _arg2.focus;
_local26 = (_local25 * _arg2.zoom);
while ((_local20 = _local23[--_local24])) {
_local14 = _local20.x;
_local15 = _local20.y;
_local16 = _local20.z;
_local19 = ((((_local14 * _local11) + (_local15 * _local12)) + (_local16 * _local13)) + _local4.n34);
_local21 = _local20.vertex2DInstance;
if ((_local21.visible = (_local19 > 0))){
_local17 = ((((_local14 * _local5) + (_local15 * _local6)) + (_local16 * _local7)) + _local4.n14);
_local18 = ((((_local14 * _local8) + (_local15 * _local9)) + (_local16 * _local10)) + _local4.n24);
_local22 = (_local26 / (_local25 + _local19));
_local21.x = (_local17 * _local22);
_local21.y = (_local18 * _local22);
_local21.z = _local19;
};
};
return (0);
}
public function transformVertices(_arg1:Matrix3D):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Array;
var _local15:int;
var _local16:Vertex3D;
var _local17:Number;
var _local18:Number;
var _local19:Number;
var _local20:Number;
var _local21:Number;
var _local22:Number;
_local2 = _arg1.n11;
_local3 = _arg1.n12;
_local4 = _arg1.n13;
_local5 = _arg1.n21;
_local6 = _arg1.n22;
_local7 = _arg1.n23;
_local8 = _arg1.n31;
_local9 = _arg1.n32;
_local10 = _arg1.n33;
_local11 = _arg1.n14;
_local12 = _arg1.n24;
_local13 = _arg1.n34;
_local14 = this.geometry.vertices;
_local15 = _local14.length;
while ((_local16 = _local14[--_local15])) {
_local17 = _local16.x;
_local18 = _local16.y;
_local19 = _local16.z;
_local20 = ((((_local17 * _local2) + (_local18 * _local3)) + (_local19 * _local4)) + _local11);
_local21 = ((((_local17 * _local5) + (_local18 * _local6)) + (_local19 * _local7)) + _local12);
_local22 = ((((_local17 * _local8) + (_local18 * _local9)) + (_local19 * _local10)) + _local13);
_local16.x = _local20;
_local16.y = _local21;
_local16.z = _local22;
};
}
public function boundingBox():Object{
var _local1:Object;
var _local2:Object;
var _local3:String;
var _local4:Vertex3D;
_local1 = this.geometry.vertices;
_local2 = new Object();
_local2.min = new Number3D();
_local2.max = new Number3D();
_local2.size = new Number3D();
for (_local3 in _local1) {
_local4 = _local1[Number(_local3)];
_local2.min.x = ((_local2.min.x)==undefined) ? _local4.x : Math.min(_local4.x, _local2.min.x);
_local2.max.x = ((_local2.max.x)==undefined) ? _local4.x : Math.max(_local4.x, _local2.max.x);
_local2.min.y = ((_local2.min.y)==undefined) ? _local4.y : Math.min(_local4.y, _local2.min.y);
_local2.max.y = ((_local2.max.y)==undefined) ? _local4.y : Math.max(_local4.y, _local2.max.y);
_local2.min.z = ((_local2.min.z)==undefined) ? _local4.z : Math.min(_local4.z, _local2.min.z);
_local2.max.z = ((_local2.max.z)==undefined) ? _local4.z : Math.max(_local4.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 75
//CameraObject3D (org.papervision3d.core.proto.CameraObject3D)
package org.papervision3d.core.proto {
import org.papervision3d.objects.*;
import org.papervision3d.core.*;
public class CameraObject3D extends DisplayObject3D {
public var sort:Boolean;
public var zoom:Number;
public var focus:Number;
private static var _flipY:Matrix3D = Matrix3D.scaleMatrix(1, -1, 1);
public static var DEFAULT_POS:Number3D = new Number3D(0, 0, -1000);
public function CameraObject3D(_arg1:Number=3, _arg2:Number=500, _arg3:Object=null){
this.x = (_arg3) ? ((_arg3.x) || (DEFAULT_POS.x)) : DEFAULT_POS.x;
this.y = (_arg3) ? ((_arg3.y) || (DEFAULT_POS.y)) : DEFAULT_POS.y;
this.z = (_arg3) ? ((_arg3.z) || (DEFAULT_POS.z)) : DEFAULT_POS.z;
this.zoom = _arg1;
this.focus = _arg2;
this.sort = (_arg3) ? !((_arg3.sort == false)) : true;
}
public function transformView(_arg1:Matrix3D=null):void{
this.view = Matrix3D.inverse(Matrix3D.multiply(((_arg1) || (this.transform)), _flipY));
}
public function
(_arg1:Number):void{
super.yaw(_arg1);
}
public function (_arg1:Number):void{
super.pitch(_arg1);
}
}
}//package org.papervision3d.core.proto
Section 76
//DisplayObjectContainer3D (org.papervision3d.core.proto.DisplayObjectContainer3D)
package org.papervision3d.core.proto {
import flash.events.*;
import org.papervision3d.objects.*;
import org.papervision3d.materials.*;
import flash.utils.*;
import org.papervision3d.*;
public class DisplayObjectContainer3D extends EventDispatcher {
protected var :Dictionary;
public var root:DisplayObjectContainer3D;
private var :int;
protected var _childrenByName:Object;
public function DisplayObjectContainer3D():void{
this. = new Dictionary(false);
this._childrenByName = new Dictionary(true);
this. = 0;
}
public function (_arg1:String):DisplayObject3D{
return (this._childrenByName[_arg1]);
}
public function (_arg1:String, _arg2:MaterialsList=null, _arg3:Number=1):void{
Papervision3D.log("The addCollada() method has been deprecated. Use addChildren( new Collada( filename ) )");
}
public function (_arg1:String):DisplayObject3D{
return (removeChild((_arg1)));
}
public function get numChildren():int{
return (this.);
}
override public function toString():String{
return (
());
}
public function (_arg1:DisplayObject3D):DisplayObjectContainer3D{
var _local2:DisplayObject3D;
for each (_local2 in _arg1.children) {
_arg1.removeChild(_local2);
this.addChild(_local2);
};
return (this);
}
public function removeChild(_arg1:DisplayObject3D):DisplayObject3D{
if (_arg1){
delete this._childrenByName[this.[_arg1]];
delete this.[_arg1];
_arg1.parent = null;
_arg1.root = null;
return (_arg1);
};
return (null);
}
public function addChild(_arg1:DisplayObject3D, _arg2:String=null):DisplayObject3D{
_arg2 = ((((_arg2) || (_arg1.name))) || (String(_arg1.id)));
this.[_arg1] = _arg2;
this._childrenByName[_arg2] = _arg1;
this.++;
_arg1.parent = this;
_arg1.root = this.root;
return (_arg1);
}
public function
():String{
var _local1:String;
var _local2:String;
_local1 = "";
for (_local2 in this.) {
_local1 = (_local1 + (_local2 + "\n"));
};
return (_local1);
}
public function get children():Object{
return (this._childrenByName);
}
}
}//package org.papervision3d.core.proto
Section 77
//GeometryObject3D (org.papervision3d.core.proto.GeometryObject3D)
package org.papervision3d.core.proto {
import flash.events.*;
import org.papervision3d.core.geom.*;
import org.papervision3d.materials.*;
import org.papervision3d.core.*;
import flash.utils.*;
import org.papervision3d.scenes.*;
public class GeometryObject3D extends EventDispatcher {
protected var :Number;
protected var :Boolean;// = true
public var :Boolean;// = false
protected var :MaterialObject3D;
public var faces:Array;
public var vertices:Array;
public function GeometryObject3D(_arg1:Object=null):void{
= false;
= true;
super();
}
public function transformVertices(_arg1:Matrix3D):void{
}
public function get boundingSphere2():Number{
if (){
return (());
};
return ();
}
public function ():Number{
var _local1:Number;
var _local2:Number;
var _local3:Vertex3D;
_local1 = 0;
for each (_local3 in this.vertices) {
_local2 = (((_local3.x * _local3.x) + (_local3.y * _local3.y)) + (_local3.z * _local3.z));
_local1 = ((_local2)>_local1) ? _local2 : _local1;
};
this. = false;
return (( = _local1));
}
private function ():void{
var _local1:Dictionary;
var _local2:Face3D;
var _local3:Vertex3D;
_local1 = 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 set ready(_arg1:Boolean):void{
if (_arg1){
();
};
= _arg1;
}
public function get ready():Boolean{
return ();
}
}
}//package org.papervision3d.core.proto
Section 78
//MaterialObject3D (org.papervision3d.core.proto.MaterialObject3D)
package org.papervision3d.core.proto {
import flash.events.*;
import flash.display.*;
import org.papervision3d.objects.*;
import org.papervision3d.core.geom.*;
import org.papervision3d.materials.*;
import org.papervision3d.core.draw.*;
public class MaterialObject3D extends EventDispatcher implements IFaceDrawer {
public var widthOffset:Number;// = 0
public var name:String;
public var scene:SceneObject3D;
public var needsVertexNormals:Boolean;// = false
public var heightOffset:Number;// = 0
public var fillAlpha:Number;// = 0
public var fillColor:Number;
public var id:Number;
public var invisible:Boolean;// = false
public var smooth:Boolean;// = false
public var bitmap:BitmapData;
public var lineColor:Number;
public var lineAlpha:Number;// = 0
public var oneSide:Boolean;// = true
public var :Number;// = 1
public var opposite:Boolean;// = false
public var maxU:Number;
public var maxV:Number;
public var tiled:Boolean;// = false
public var needsFaceNormals: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(){
smooth = false;
tiled = false;
lineColor = DEFAULT_COLOR;
lineAlpha = 0;
= 1;
fillColor = DEFAULT_COLOR;
fillAlpha = 0;
oneSide = true;
invisible = false;
opposite = false;
needsFaceNormals = false;
needsVertexNormals = false;
widthOffset = 0;
heightOffset = 0;
super();
this.id = _totalMaterialObjects++;
}
public function get doubleSided():Boolean{
return (!(this.oneSide));
}
public function drawFace3D(_arg1:DisplayObject3D, _arg2:Face3D, _arg3:Graphics, _arg4:Vertex2D, _arg5:Vertex2D, _arg6:Vertex2D):int{
return (0);
}
public function set doubleSided(_arg1:Boolean):void{
this.oneSide = !(_arg1);
}
public function updateBitmap():void{
}
override public function toString():String{
return (((((("[MaterialObject3D] bitmap:" + this.bitmap) + " lineColor:") + this.lineColor) + " fillColor:") + fillColor));
}
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.needsFaceNormals = _arg1.needsFaceNormals;
this.needsVertexNormals = _arg1.needsVertexNormals;
this.oneSide = _arg1.oneSide;
this.opposite = _arg1.opposite;
this.invisible = _arg1.invisible;
this.scene = _arg1.scene;
this.name = _arg1.name;
this.maxU = _arg1.maxU;
this.maxV = _arg1.maxV;
}
public function clone():MaterialObject3D{
var _local1:MaterialObject3D;
_local1 = new MaterialObject3D();
_local1.copy(this);
return (_local1);
}
public static function get DEFAULT():MaterialObject3D{
var _local1:MaterialObject3D;
_local1 = 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;
_local1 = 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 79
//SceneObject3D (org.papervision3d.core.proto.SceneObject3D)
package org.papervision3d.core.proto {
import flash.display.*;
import org.papervision3d.objects.*;
import org.papervision3d.materials.*;
import flash.utils.*;
import org.papervision3d.core.stat.*;
import org.papervision3d.core.culling.*;
import org.papervision3d.*;
public class SceneObject3D extends DisplayObjectContainer3D {
public var container:Sprite;
public var triangleCuller:ITriangleCuller;
private var :Dictionary;
public var objects:Array;
public var stats:RenderStatistics;
public var materials:MaterialsList;
public function SceneObject3D(_arg1:Sprite){
triangleCuller = new DefaultTriangleCuller();
super();
if (_arg1){
this.container = _arg1;
} else {
Papervision3D.log("Scene3D: container argument required.");
};
this.objects = new Array();
this.materials = new MaterialsList();
Papervision3D.log((((((Papervision3D.NAME + " ") + Papervision3D.VERSION) + " (") + Papervision3D.DATE) + ")\n"));
this.stats = new RenderStatistics();
this.stats.points = 0;
this.stats. = 0;
this.stats.
= 0;
this.stats.performance = 0;
this.stats.rendered = 0;
this.root = this;
}
override public function addChild(_arg1:DisplayObject3D, _arg2:String=null):DisplayObject3D{
var _local3:DisplayObject3D;
_local3 = super.addChild(_arg1, _arg2);
_arg1.scene = this;
this.objects.push(_local3);
return (_local3);
}
public function renderCamera(_arg1:CameraObject3D):void{
var _local2:Array;
var _local3:DisplayObject3D;
var _local4:Number;
stats.clear();
stats.performance = getTimer();
MovieMaterial.updateAnimatedBitmaps();
if (_arg1){
_arg1.transformView();
_local2 = this.objects;
_local4 = _local2.length;
while ((_local3 = _local2[--_local4])) {
if (_local3.visible){
_local3.project(_arg1, _arg1);
};
};
};
if (_arg1.sort){
this.objects.sortOn("screenZ", Array.NUMERIC);
};
renderObjects(_arg1.sort);
}
protected function renderObjects(_arg1:Boolean):void{
}
override public function removeChild(_arg1:DisplayObject3D):DisplayObject3D{
var _local2:int;
super.removeChild(_arg1);
_local2 = 0;
while (_local2 < this.objects.length) {
if (this.objects[_local2] === _arg1){
this.objects.splice(_local2, 1);
return (_arg1);
};
_local2++;
};
return (_arg1);
}
}
}//package org.papervision3d.core.proto
Section 80
//RenderStatistics (org.papervision3d.core.stat.RenderStatistics)
package org.papervision3d.core.stat {
public class RenderStatistics {
public var points:int;// = 0
public var :int;// = 0
public var
:int;// = 0
public var :Number;
public var performance:int;// = 0
public var rendered:int;// = 0
public var culledTriangles:int;// = 0
public var :Number;
public function RenderStatistics(){
performance = 0;
points = 0;
= 0;
rendered = 0;
= 0;
culledTriangles = 0;
super();
}
public function clear():void{
performance = 0;
points = 0;
= 0;
rendered = 0;
= 0;
= 0;
= 0;
culledTriangles = 0;
}
public function toString():String{
return (new String(((((((((("Performance:" + performance) + ", Points:") + points) + " Polys:") + ) + " Rendered:") + rendered) + " Culled:") + culledTriangles)));
}
}
}//package org.papervision3d.core.stat
Section 81
//Matrix3D (org.papervision3d.core.Matrix3D)
package org.papervision3d.core {
public class Matrix3D {
public var n31:Number;
public var n32:Number;
public var n11:Number;
public var n13:Number;
public var n14:Number;
public var n33:Number;
public var n12:Number;
public var n21:Number;
public var n22:Number;
public var n23:Number;
public var n24:Number;
public var n34:Number;
private static var toDEGREES:Number = 57.2957795130823;
private static var toRADIANS:Number = 0.0174532925199433;
public function Matrix3D(_arg1:Array=null){
if (((!(_arg1)) || ((_arg1.length < 12)))){
n11 = (n22 = (n33 = 1));
n12 = (n13 = (n14 = (n21 = (n23 = (n24 = (n31 = (n32 = (n34 = 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];
};
}
public function calculateMultiply3x3(_arg1:Matrix3D, _arg2: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 _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local19:Number;
var _local20:Number;
_local3 = _arg1.n11;
_local4 = _arg2.n11;
_local5 = _arg1.n21;
_local6 = _arg2.n21;
_local7 = _arg1.n31;
_local8 = _arg2.n31;
_local9 = _arg1.n12;
_local10 = _arg2.n12;
_local11 = _arg1.n22;
_local12 = _arg2.n22;
_local13 = _arg1.n32;
_local14 = _arg2.n32;
_local15 = _arg1.n13;
_local16 = _arg2.n13;
_local17 = _arg1.n23;
_local18 = _arg2.n23;
_local19 = _arg1.n33;
_local20 = _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 get trace():Number{
return ((((this.n11 + this.n22) + this.n33) + 1));
}
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
(_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
(_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;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local19:Number;
var _local20:Number;
var _local21:Number;
var _local22:Number;
var _local23:Number;
var _local24:Number;
var _local25:Number;
var _local26:Number;
_local3 = _arg1.n11;
_local4 = _arg2.n11;
_local5 = _arg1.n21;
_local6 = _arg2.n21;
_local7 = _arg1.n31;
_local8 = _arg2.n31;
_local9 = _arg1.n12;
_local10 = _arg2.n12;
_local11 = _arg1.n22;
_local12 = _arg2.n22;
_local13 = _arg1.n32;
_local14 = _arg2.n32;
_local15 = _arg1.n13;
_local16 = _arg2.n13;
_local17 = _arg1.n23;
_local18 = _arg2.n23;
_local19 = _arg1.n33;
_local20 = _arg2.n33;
_local21 = _arg1.n14;
_local22 = _arg2.n14;
_local23 = _arg1.n24;
_local24 = _arg2.n24;
_local25 = _arg1.n34;
_local26 = _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 toString():String{
var _local1:String;
_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"));
return (_local1);
}
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 (_arg1:Matrix3D):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
_local2 = _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 static function rotationMatrixWithReference(_arg1:Number3D, _arg2:Number, _arg3:Number3D):Matrix3D{
var _local4:Matrix3D;
_local4 = 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 multiplyVector3x3(_arg1:Matrix3D, _arg2:Number3D):void{
var _local3:Number;
var _local4:Number;
var _local5:Number;
_local3 = _arg2.x;
_local4 = _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 multiply3x3(_arg1:Matrix3D, _arg2:Matrix3D):Matrix3D{
var _local3:Matrix3D;
_local3 = new (Matrix3D);
_local3.calculateMultiply3x3(_arg1, _arg2);
return (_local3);
}
public static function normalizeQuaternion(_arg1:Object):Object{
var _local2:Number;
_local2 = 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 multiplyVector(_arg1:Matrix3D, _arg2:Number3D):void{
var _local3:Number;
var _local4:Number;
var _local5:Number;
_local3 = _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 axis2quaternion(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Object{
var _local5:Number;
var _local6:Number;
var _local7:Object;
_local5 = Math.sin((_arg4 / 2));
_local6 = Math.cos((_arg4 / 2));
_local7 = 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;
_local4 = 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 euler2quaternion(_arg1:Number, _arg2:Number, _arg3:Number):Object{
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:Object;
_local4 = Math.sin((_arg1 * 0.5));
_local5 = Math.cos((_arg1 * 0.5));
_local6 = Math.sin((_arg2 * 0.5));
_local7 = Math.cos((_arg2 * 0.5));
_local8 = Math.sin((_arg3 * 0.5));
_local9 = Math.cos((_arg3 * 0.5));
_local10 = (_local5 * _local7);
_local11 = (_local4 * _local6);
_local12 = new Object();
_local12.x = ((_local8 * _local10) - (_local9 * _local11));
_local12.y = (((_local9 * _local4) * _local7) + ((_local8 * _local5) * _local6));
_local12.z = (((_local9 * _local5) * _local6) - ((_local8 * _local4) * _local7));
_local12.w = ((_local9 * _local10) + (_local8 * _local11));
return (_local12);
}
public static function rotationX(_arg1:Number):Matrix3D{
var _local2:Matrix3D;
var _local3:Number;
var _local4:Number;
_local2 = IDENTITY;
_local3 = Math.cos(_arg1);
_local4 = 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;
var _local3:Number;
var _local4:Number;
_local2 = IDENTITY;
_local3 = Math.cos(_arg1);
_local4 = 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;
var _local3:Number;
var _local4:Number;
_local2 = IDENTITY;
_local3 = Math.cos(_arg1);
_local4 = 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):Matrix3D{
var _local5:Matrix3D;
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;
_local5 = IDENTITY;
_local6 = Math.cos(_arg4);
_local7 = Math.sin(_arg4);
_local8 = (1 - _local6);
_local9 = ((_arg1 * _arg2) * _local8);
_local10 = ((_arg2 * _arg3) * _local8);
_local11 = ((_arg1 * _arg3) * _local8);
_local12 = (_local7 * _arg3);
_local13 = (_local7 * _arg2);
_local14 = (_local7 * _arg1);
_local5.n11 = (_local6 + ((_arg1 * _arg1) * _local8));
_local5.n12 = (-(_local12) + _local9);
_local5.n13 = (_local13 + _local11);
_local5.n21 = (_local12 + _local9);
_local5.n22 = (_local6 + ((_arg2 * _arg2) * _local8));
_local5.n23 = (-(_local14) + _local10);
_local5.n31 = (-(_local13) + _local11);
_local5.n32 = (_local14 + _local10);
_local5.n33 = (_local6 + ((_arg3 * _arg3) * _local8));
return (_local5);
}
public static function add(_arg1:Matrix3D, _arg2:Matrix3D):Matrix3D{
var _local3:Matrix3D;
_local3 = new (Matrix3D);
_local3.
(_arg1, _arg2);
return (_local3);
}
public static function rotateAxis(_arg1:Matrix3D, _arg2:Number3D):void{
var _local3:Number;
var _local4:Number;
var _local5:Number;
_local3 = _arg2.x;
_local4 = _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));
_arg2.normalize();
}
public static function multiply(_arg1:Matrix3D, _arg2:Matrix3D):Matrix3D{
var _local3:Matrix3D;
_local3 = new (Matrix3D);
_local3.calculateMultiply(_arg1, _arg2);
return (_local3);
}
public static function multiplyQuaternion(_arg1:Object, _arg2:Object):Object{
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:Object;
_local3 = _arg1.x;
_local4 = _arg1.y;
_local5 = _arg1.z;
_local6 = _arg1.w;
_local7 = _arg2.x;
_local8 = _arg2.y;
_local9 = _arg2.z;
_local10 = _arg2.w;
_local11 = 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 euler2matrix(_arg1:Number3D):Matrix3D{
var _local2:Matrix3D;
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;
_local2 = IDENTITY;
_local3 = (_arg1.x * toRADIANS);
_local4 = (_arg1.y * toRADIANS);
_local5 = (_arg1.z * toRADIANS);
_local6 = Math.cos(_local3);
_local7 = Math.sin(_local3);
_local8 = Math.cos(_local4);
_local9 = Math.sin(_local4);
_local10 = Math.cos(_local5);
_local11 = Math.sin(_local5);
_local12 = (_local6 * _local9);
_local13 = (_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;
_local4 = IDENTITY;
_local4.n11 = _arg1;
_local4.n22 = _arg2;
_local4.n33 = _arg3;
return (_local4);
}
public static function quaternion2matrix(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Matrix3D{
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:Matrix3D;
_local5 = (_arg1 * _arg1);
_local6 = (_arg1 * _arg2);
_local7 = (_arg1 * _arg3);
_local8 = (_arg1 * _arg4);
_local9 = (_arg2 * _arg2);
_local10 = (_arg2 * _arg3);
_local11 = (_arg2 * _arg4);
_local12 = (_arg3 * _arg3);
_local13 = (_arg3 * _arg4);
_local14 = IDENTITY;
_local14.n11 = (1 - (2 * (_local9 + _local12)));
_local14.n12 = (2 * (_local6 - _local13));
_local14.n13 = (2 * (_local7 + _local11));
_local14.n21 = (2 * (_local6 + _local13));
_local14.n22 = (1 - (2 * (_local5 + _local12)));
_local14.n23 = (2 * (_local10 - _local8));
_local14.n31 = (2 * (_local7 - _local11));
_local14.n32 = (2 * (_local10 + _local8));
_local14.n33 = (1 - (2 * (_local5 + _local9)));
return (_local14);
}
public static function inverse(_arg1:Matrix3D):Matrix3D{
var _local2:Matrix3D;
_local2 = new (Matrix3D);
_local2.(_arg1);
return (_local2);
}
public static function matrix2euler(_arg1:Matrix3D):Number3D{
var _local2:Number3D;
var _local3:Number3D;
var _local4:Number3D;
var _local5:Number3D;
var _local6:Matrix3D;
var _local7:Matrix3D;
var _local8:Matrix3D;
var _local9:Number;
_local2 = new Number3D();
_local3 = new Number3D(_arg1.n11, _arg1.n21, _arg1.n31);
_local4 = new Number3D(_arg1.n12, _arg1.n22, _arg1.n32);
_local5 = new Number3D(_arg1.n13, _arg1.n23, _arg1.n33);
_local3.normalize();
_local4.normalize();
_local5.normalize();
_local6 = new Matrix3D([_local3.x, _local4.x, _local5.x, 0, _local3.y, _local4.y, _local5.y, 0, _local3.z, _local4.z, _local5.z, 0]);
_local2.x = Math.atan2(_local6.n23, _local6.n33);
_local7 = Matrix3D.rotationX(-(_local2.x));
_local8 = Matrix3D.multiply(_local7, _local6);
_local9 = Math.sqrt(((_local8.n11 * _local8.n11) + (_local8.n21 * _local8.n21)));
_local2.y = Math.atan2(-(_local8.n31), _local9);
_local2.z = Math.atan2(-(_local8.n12), _local8.n11);
if (_local2.x == Math.PI){
if (_local2.y > 0){
_local2.y = (_local2.y - Math.PI);
} else {
_local2.y = (_local2.y + Math.PI);
};
_local2.x = 0;
_local2.z = (_local2.z + Math.PI);
};
_local2.x = (_local2.x * toDEGREES);
_local2.y = (_local2.y * toDEGREES);
_local2.z = (_local2.z * toDEGREES);
return (_local2);
}
public static function get IDENTITY():Matrix3D{
return (new Matrix3D([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0]));
}
}
}//package org.papervision3d.core
Section 82
//Number3D (org.papervision3d.core.Number3D)
package org.papervision3d.core {
public class Number3D {
public var x:Number;
public var y:Number;
public var z:Number;
public function Number3D(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0){
this.x = _arg1;
this.y = _arg2;
this.z = _arg3;
}
public function toString():String{
return (((((("x:" + x) + " y:") + y) + " z:") + z));
}
public function normalize():void{
var _local1:Number;
_local1 = this.modulo;
if (((!((_local1 == 0))) && (!((_local1 == 1))))){
this.x = (this.x / _local1);
this.y = (this.y / _local1);
this.z = (this.z / _local1);
};
}
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 clone():Number3D{
return (new Number3D(this.x, this.y, this.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):Number3D{
return (new Number3D(((_arg2.y * _arg1.z) - (_arg2.z * _arg1.y)), ((_arg2.z * _arg1.x) - (_arg2.x * _arg1.z)), ((_arg2.x * _arg1.y) - (_arg2.y * _arg1.x))));
}
public static function get ZERO():Number3D{
return (new Number3D(0, 0, 0));
}
public static function dot(_arg1:Number3D, _arg2:Number3D):Number{
return ((((_arg1.x * _arg2.x) + (_arg1.y * _arg2.y)) + (_arg2.z * _arg1.z)));
}
}
}//package org.papervision3d.core
Section 83
//NumberUV (org.papervision3d.core.NumberUV)
package org.papervision3d.core {
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
Section 84
//InteractiveScene3DEvent (org.papervision3d.events.InteractiveScene3DEvent)
package org.papervision3d.events {
import flash.events.*;
import flash.display.*;
import org.papervision3d.objects.*;
import org.papervision3d.core.geom.*;
import org.papervision3d.utils.*;
public class InteractiveScene3DEvent extends Event {
public var :Sprite;// = null
public var interactiveContainerData:InteractiveContainerData;// = null
public var displayObject3D:DisplayObject3D;// = null
public var face3d:Face3D;// = 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:Face3D=null, _arg5:InteractiveContainerData=null, _arg6:Boolean=false, _arg7:Boolean=false){
displayObject3D = null;
= null;
face3d = null;
interactiveContainerData = null;
super(_arg1, _arg6, _arg7);
this.displayObject3D = _arg2;
this. = _arg3;
this.face3d = _arg4;
this.interactiveContainerData = _arg5;
}
}
}//package org.papervision3d.events
Section 85
//BitmapMaterial (org.papervision3d.materials.BitmapMaterial)
package org.papervision3d.materials {
import flash.display.*;
import flash.geom.*;
import org.papervision3d.objects.*;
import org.papervision3d.core.geom.*;
import org.papervision3d.core.proto.*;
import org.papervision3d.core.draw.*;
import flash.utils.*;
import org.papervision3d.*;
public class BitmapMaterial extends MaterialObject3D implements IFaceDrawer {
public var :Dictionary;
protected var _texture:Object;
public static var AUTO_MIP_MAPPING:Boolean = false;
protected static var _localMatrix:Matrix = new Matrix();
public static var MIP_MAP_DEPTH:Number = 8;
protected static var _triMatrix:Matrix = new Matrix();
public function BitmapMaterial(_arg1:BitmapData=null){
= new Dictionary();
super();
if (_arg1){
texture = _arg1;
};
}
override public function drawFace3D(_arg1:DisplayObject3D, _arg2:Face3D, _arg3:Graphics, _arg4:Vertex2D, _arg5:Vertex2D, _arg6:Vertex2D):int{
var _local7:Matrix;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
if (lineAlpha){
_arg3.lineStyle(0, lineColor, lineAlpha);
};
if (bitmap){
_local7 = (([_arg2]) || (transformUV(_arg2, _arg1)));
_local8 = _arg4.x;
_local9 = _arg4.y;
_local10 = _arg5.x;
_local11 = _arg5.y;
_local12 = _arg6.x;
_local13 = _arg6.y;
_triMatrix.a = (_local10 - _local8);
_triMatrix.b = (_local11 - _local9);
_triMatrix.c = (_local12 - _local8);
_triMatrix.d = (_local13 - _local9);
_triMatrix.tx = _local8;
_triMatrix.ty = _local9;
_localMatrix.a = _local7.a;
_localMatrix.b = _local7.b;
_localMatrix.c = _local7.c;
_localMatrix.d = _local7.d;
_localMatrix.tx = _local7.tx;
_localMatrix.ty = _local7.ty;
_localMatrix.concat(_triMatrix);
_arg3.beginBitmapFill(bitmap, _localMatrix, tiled, smooth);
};
_arg3.moveTo(_local8, _local9);
_arg3.lineTo(_local10, _local11);
_arg3.lineTo(_local12, _local13);
_arg3.lineTo(_local8, _local9);
if (bitmap){
_arg3.endFill();
};
if (lineAlpha){
_arg3.lineStyle();
};
return (1);
}
public function ():void{
= new Dictionary();
}
public function transformUV(_arg1:Face3D, _arg2:DisplayObject3D=null):Matrix{
var _local3:Array;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Matrix;
var _local17:Matrix;
if (!_arg1.uv){
Papervision3D.log("MaterialObject3D: transformUV() uv not found!");
} else {
if (bitmap){
_local3 = _arg1.uv;
_local4 = (bitmap.width * maxU);
_local5 = (bitmap.height * maxV);
_local6 = (_local4 * _local3[0].u);
_local7 = (_local5 * (1 - _local3[0].v));
_local8 = (_local4 * _local3[1].u);
_local9 = (_local5 * (1 - _local3[1].v));
_local10 = (_local4 * _local3[2].u);
_local11 = (_local5 * (1 - _local3[2].v));
if ((((((_local6 == _local8)) && ((_local7 == _local9)))) || ((((_local6 == _local10)) && ((_local7 == _local11)))))){
_local6 = (_local6 - ((_local6)>0.05) ? 0.05 : -0.05);
_local7 = (_local7 - ((_local7)>0.07) ? 0.07 : -0.07);
};
if ((((_local10 == _local8)) && ((_local11 == _local9)))){
_local10 = (_local10 - ((_local10)>0.05) ? 0.04 : -0.04);
_local11 = (_local11 - ((_local11)>0.06) ? 0.06 : -0.06);
};
_local12 = (_local8 - _local6);
_local13 = (_local9 - _local7);
_local14 = (_local10 - _local6);
_local15 = (_local11 - _local7);
_local16 = new Matrix(_local12, _local13, _local14, _local15, _local6, _local7);
_local16.invert();
_local17 = (([_arg1]) || (([_arg1] = _local16.clone())));
_local17.a = _local16.a;
_local17.b = _local16.b;
_local17.c = _local16.c;
_local17.d = _local16.d;
_local17.tx = _local16.tx;
_local17.ty = _local16.ty;
} else {
Papervision3D.log("MaterialObject3D: transformUV() material.bitmap not found!");
};
};
return (_local17);
}
public function get texture():Object{
return (this._texture);
}
protected function (_arg1:BitmapData):BitmapData{
var _local2:BitmapData;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Boolean;
_local3 = (1 << MIP_MAP_DEPTH);
_local4 = (_arg1.width / _local3);
_local4 = ((_local4 == uint(_local4))) ? _local4 : (uint(_local4) + 1);
_local5 = (_arg1.height / _local3);
_local5 = ((_local5 == uint(_local5))) ? _local5 : (uint(_local5) + 1);
_local6 = (_local3 * _local4);
_local7 = (_local3 * _local5);
_local8 = true;
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);
(_local2, _arg1.width, _arg1.height);
} else {
this.maxU = (this.maxV = 1);
_local2 = _arg1;
};
return (_local2);
}
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 createBitmap(_arg1:BitmapData):BitmapData{
();
if (AUTO_MIP_MAPPING){
return ((_arg1));
};
this.maxU = (this.maxV = 1);
return (_arg1);
}
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;
}
protected function (_arg1:BitmapData, _arg2:Number, _arg3:Number):void{
var _local4:Rectangle;
var _local5:Point;
var _local6:int;
_local4 = new Rectangle();
_local5 = 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 clone():MaterialObject3D{
var _local1:MaterialObject3D;
_local1 = super.clone();
_local1.maxU = this.maxU;
_local1.maxV = this.maxV;
return (_local1);
}
}
}//package org.papervision3d.materials
Section 86
//InteractiveBitmapMaterial (org.papervision3d.materials.InteractiveBitmapMaterial)
package org.papervision3d.materials {
import flash.display.*;
import org.papervision3d.objects.*;
import org.papervision3d.core.geom.*;
public class InteractiveBitmapMaterial extends BitmapMaterial {
public function InteractiveBitmapMaterial(_arg1:BitmapData){
super(_arg1);
}
override public function drawFace3D(_arg1:DisplayObject3D, _arg2:Face3D, _arg3:Graphics, _arg4:Vertex2D, _arg5:Vertex2D, _arg6:Vertex2D):int{
var _local7:int;
_local7 = super.drawFace3D(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6);
if (((!((_arg1.interactiveSceneManager == null))) && (_local7))){
_arg1.interactiveSceneManager.drawFace(_arg1, _arg2, _arg4.x, _arg5.x, _arg6.x, _arg4.y, _arg5.y, _arg6.y);
};
return (_local7);
}
}
}//package org.papervision3d.materials
Section 87
//InteractiveMovieMaterial (org.papervision3d.materials.InteractiveMovieMaterial)
package org.papervision3d.materials {
import flash.display.*;
import org.papervision3d.objects.*;
import org.papervision3d.core.geom.*;
public class InteractiveMovieMaterial extends MovieMaterial {
public function InteractiveMovieMaterial(_arg1:Sprite, _arg2:Boolean=false, _arg3:Boolean=false){
super(_arg1, _arg2, _arg3);
}
override public function drawFace3D(_arg1:DisplayObject3D, _arg2:Face3D, _arg3:Graphics, _arg4:Vertex2D, _arg5:Vertex2D, _arg6:Vertex2D):int{
var _local7:int;
_local7 = super.drawFace3D(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6);
if (((!((_arg1.interactiveSceneManager == null))) && (_local7))){
_arg1.interactiveSceneManager.drawFace(_arg1, _arg2, _arg4.x, _arg5.x, _arg6.x, _arg4.y, _arg5.y, _arg6.y);
};
return (_local7);
}
}
}//package org.papervision3d.materials
Section 88
//MaterialsList (org.papervision3d.materials.MaterialsList)
package org.papervision3d.materials {
import org.papervision3d.core.proto.*;
import flash.utils.*;
public class MaterialsList {
public var materialsByName:Dictionary;
protected var :Dictionary;
private var :int;
public function MaterialsList(_arg1=null):void{
var _local2:String;
var _local3:String;
super();
this.materialsByName = new Dictionary(true);
this. = new Dictionary(false);
this. = 0;
if (_arg1){
if ((_arg1 is Array)){
for (_local2 in _arg1) {
this. (_arg1[_local2]);
};
} else {
if ((_arg1 is Object)){
for (_local3 in _arg1) {
this. (_arg1[_local3], _local3);
};
};
};
};
}
public function get numMaterials():int{
return (this. );
}
public function (_arg1:MaterialObject3D, _arg2:String=null):MaterialObject3D{
_arg2 = ((((_arg2) || (_arg1.name))) || (String(_arg1.id)));
this. [_arg1] = _arg2;
this.materialsByName[_arg2] = _arg1;
this. ++;
return (_arg1);
}
public function (_arg1:MaterialObject3D):MaterialObject3D{
delete this.materialsByName[this. [_arg1]];
delete this. [_arg1];
return (_arg1);
}
public function toString():String{
var _local1:String;
var _local2:MaterialObject3D;
_local1 = "";
for each (_local2 in this.materialsByName) {
_local1 = (_local1 + (this. [_local2] + "\n"));
};
return (_local1);
}
public function (_arg1:String):MaterialObject3D{
return ( (getMaterialByName(_arg1)));
}
public function clone():MaterialsList{
var _local1:MaterialsList;
var _local2:MaterialObject3D;
_local1 = new MaterialsList();
for each (_local2 in this.materialsByName) {
_local1. (_local2.clone(), this. [_local2]);
};
return (_local1);
}
public function getMaterialByName(_arg1:String):MaterialObject3D{
return ((this.materialsByName[_arg1]) ? this.materialsByName[_arg1] : this.materialsByName["all"]);
}
}
}//package org.papervision3d.materials
Section 89
//MovieMaterial (org.papervision3d.materials.MovieMaterial)
package org.papervision3d.materials {
import flash.display.*;
import flash.geom.*;
import flash.utils.*;
import org.papervision3d.*;
public class MovieMaterial extends BitmapMaterial {
public var
:Boolean;
public var :Boolean;// = true
public var movie:DisplayObject;
private static var animatedMaterials:Dictionary = new Dictionary(false);
public function MovieMaterial(_arg1:DisplayObject=null, _arg2:Boolean=false, _arg3:Boolean=false){
= true;
super();
= _arg2;
this.animated = _arg3;
if (_arg1){
texture = _arg1;
};
}
public function ():void{
var _local1:Matrix;
bitmap.fillRect(bitmap.rect, this.fillColor);
_local1 = new Matrix();
_local1.scale(movie.scaleX, movie.scaleY);
bitmap.draw(movie, _local1, movie.transform.colorTransform);
}
override public function get texture():Object{
return (this._texture);
}
public function get animated():Boolean{
return (animatedMaterials[this]);
}
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 = (DisplayObject(_arg1));
_texture = _arg1;
}
protected function (_arg1:DisplayObject):BitmapData{
movie = _arg1;
(movie);
();
bitmap = super.createBitmap(bitmap);
return (bitmap);
}
public function set animated(_arg1:Boolean):void{
animatedMaterials[this] = _arg1;
}
override public function updateBitmap():void{
var _local1:int;
var _local2:int;
_local1 = int(movie.width);
_local2 = int(movie.height);
if ((() && (((!((_local1 == bitmap.width))) || (!((_local2 == bitmap.height))))))){
(movie);
};
();
}
protected function (_arg1:DisplayObject):void{
if (bitmap){
bitmap.dispose();
};
bitmap = new BitmapData(_arg1.width, _arg1.height, this.
);
}
public static function updateAnimatedBitmaps():void{
var _local1:Object;
for (_local1 in animatedMaterials) {
if (animatedMaterials[_local1]){
_local1.updateBitmap();
};
};
}
}
}//package org.papervision3d.materials
Section 90
//WireframeMaterial (org.papervision3d.materials.WireframeMaterial)
package org.papervision3d.materials {
import flash.display.*;
import org.papervision3d.objects.*;
import org.papervision3d.core.geom.*;
import org.papervision3d.core.proto.*;
import org.papervision3d.core.draw.*;
public class WireframeMaterial extends MaterialObject3D implements IFaceDrawer {
public function WireframeMaterial(_arg1:Number=0xFF00FF, _arg2:Number=100){
this.lineColor = _arg1;
this.lineAlpha = _arg2;
this.doubleSided = false;
}
override public function drawFace3D(_arg1:DisplayObject3D, _arg2:Face3D, _arg3:Graphics, _arg4:Vertex2D, _arg5:Vertex2D, _arg6:Vertex2D):int{
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
_local7 = _arg4.x;
_local8 = _arg4.y;
_local9 = _arg5.x;
_local10 = _arg5.y;
_local11 = _arg6.x;
_local12 = _arg6.y;
if (lineAlpha){
_arg3.lineStyle(0, lineColor, lineAlpha);
_arg3.moveTo(_local7, _local8);
_arg3.lineTo(_local9, _local10);
_arg3.lineTo(_local11, _local12);
_arg3.lineTo(_local7, _local8);
_arg3.lineStyle();
return (1);
};
return (0);
}
override public function toString():String{
return (((("WireframeMaterial - color:" + this.lineColor) + " alpha:") + this.lineAlpha));
}
}
}//package org.papervision3d.materials
Section 91
//DisplayObject3D (org.papervision3d.objects.DisplayObject3D)
package org.papervision3d.objects {
import flash.display.*;
import org.papervision3d.core.geom.*;
import org.papervision3d.core.proto.*;
import org.papervision3d.materials.*;
import org.papervision3d.core.*;
import com.blitzagency.xray.logger.*;
import org.papervision3d.utils.*;
import org.papervision3d.*;
import org.papervision3d.scenes.*;
public class DisplayObject3D extends DisplayObjectContainer3D {
public var extra:Object;
public var id:int;
private var
:Number;
private var
:Number;
private var
:Number;
public var material:MaterialObject3D;
public var meshSort:uint;// = 1
public var materials:MaterialsList;
private var :Boolean;// = false
public var transform:Matrix3D;
public var screenZ:Number;
public var visible:Boolean;
private var :Number;
private var :Number;
private var :Number;
public var geometry:GeometryObject3D;
public var interactiveSceneManager:InteractiveSceneManager;
public var screen:Number3D;
public var name:String;
public var container:Sprite;
public var world:Matrix3D;
public var parent:DisplayObjectContainer3D;
public var view:Matrix3D;
protected var :SceneObject3D;// = null
public var faces:Array;
protected var :Boolean;// = false
private var :Boolean;// = false
protected var _sorted:Array;
public static const MESH_SORT_CENTER:uint = 1;
public static const MESH_SORT_CLOSE:uint = 3;
public static const MESH_SORT_FAR:uint = 2;
private static var LEFT:Number3D = new Number3D(-1, 0, 0);
private static var _totalDisplayObjects:int = 0;
private static var UP:Number3D = new Number3D(0, 1, 0);
private static var BACKWARD:Number3D = new Number3D(0, 0, -1);
private static var FORWARD:Number3D = new Number3D(0, 0, 1);
private static var DOWN:Number3D = new Number3D(0, -1, 0);
public static var faceLevelMode:Boolean;
private static var toDEGREES:Number = 57.2957795130823;
private static var toRADIANS:Number = 0.0174532925199433;
private static var RIGHT:Number3D = new Number3D(1, 0, 0);
public function DisplayObject3D(_arg1:String=null, _arg2:GeometryObject3D=null, _arg3:Object=null):void{
var _local4:Number;
screen = new Number3D();
= null;
meshSort = MESH_SORT_CENTER;
faces = new Array();
= false;
= false;
= false;
super();
Papervision3D.log(("DisplayObject3D: " + _arg1));
this.transform = Matrix3D.IDENTITY;
this.world = Matrix3D.IDENTITY;
this.view = Matrix3D.IDENTITY;
this.x = (_arg3) ? ((_arg3.x) || (0)) : 0;
this.y = (_arg3) ? ((_arg3.y) || (0)) : 0;
this.z = (_arg3) ? ((_arg3.z) || (0)) : 0;
rotationX = (_arg3) ? ((_arg3.rotationX) || (0)) : 0;
rotationY = (_arg3) ? ((_arg3.rotationY) || (0)) : 0;
rotationZ = (_arg3) ? ((_arg3.rotationZ) || (0)) : 0;
_local4 = (Papervision3D.usePERCENT) ? 100 : 1;
scaleX = (_arg3) ? ((_arg3.scaleX) || (_local4)) : _local4;
scaleY = (_arg3) ? ((_arg3.scaleY) || (_local4)) : _local4;
scaleZ = (_arg3) ? ((_arg3.scaleZ) || (_local4)) : _local4;
if (((_arg3) && (_arg3.extra))){
this.extra = _arg3.extra;
};
if (((_arg3) && (_arg3.container))){
this.container = _arg3.container;
};
this.visible = true;
this.id = _totalDisplayObjects++;
this.name = ((_arg1) || (String(this.id)));
if (_arg2){
(_arg2);
};
}
public function set z(_arg1:Number):void{
this.transform.n34 = _arg1;
}
override public function addChild(_arg1:DisplayObject3D, _arg2:String=null):DisplayObject3D{
_arg1 = super.addChild(_arg1, _arg2);
if (_arg1.scene == null){
_arg1.scene = scene;
};
return (_arg1);
}
public function
(_arg1:Number):void{
(_arg1, DOWN);
}
public function set scene(_arg1:SceneObject3D):void{
var _local2:DisplayObject3D;
= _arg1;
for each (_local2 in this._childrenByName) {
if (_local2.scene == null){
_local2.scene = ;
};
};
if (( is InteractiveScene3D) == false){
return;
};
interactiveSceneManager = InteractiveScene3D().interactiveSceneManager;
}
public function project(_arg1:DisplayObject3D, _arg2:CameraObject3D, _arg3:Array=null):Number{
var _local4:Number;
var _local5:Number;
var _local6:DisplayObject3D;
if (this.){
();
};
this.view.calculateMultiply(_arg1.view, this.transform);
this.world.calculateMultiply(_arg1.world, this.transform);
(_arg2);
_local4 = 0;
_local5 = 0;
if (!_arg3){
_arg3 = new Array();
this._sorted = _arg3;
};
for each (_local6 in this._childrenByName) {
if (_local6.visible){
_local4 = (_local4 + _local6.project(this, _arg2, _arg3));
_local5++;
};
};
return ((this.screenZ = (_local4 / _local5)));
}
private function
(_arg1:CameraObject3D):void{
var _local2:Number;
_local2 = ((_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:Number3D;
var _local4:Number3D;
var _local5:Number3D;
var _local6:Number3D;
var _local7:Number3D;
var _local8:Matrix3D;
var _local9:XrayLog;
_local3 = new Number3D(this.x, this.y, this.z);
_local4 = new Number3D(_arg1.x, _arg1.y, _arg1.z);
_local5 = Number3D.sub(_local4, _local3);
_local5.normalize();
if (_local5.modulo > 0.1){
_local6 = Number3D.cross(_local5, ((_arg2) || (UP)));
_local6.normalize();
_local7 = Number3D.cross(_local5, _local6);
_local7.normalize();
_local8 = this.transform;
_local8.n11 = (_local6.x * );
_local8.n21 = (_local6.y * );
_local8.n31 = (_local6.z * );
_local8.n12 = (-(_local7.x) * );
_local8.n22 = (-(_local7.y) * );
_local8.n32 = (-(_local7.z) * );
_local8.n13 = (_local5.x * );
_local8.n23 = (_local5.y * );
_local8.n33 = (_local5.z * );
this. = false;
this. = true;
} else {
_local9 = new XrayLog();
_local9.debug("lookAt Error");
};
}
public function set rotationX(_arg1:Number):void{
this.
= (Papervision3D.useDEGREES) ? (-(_arg1) * toRADIANS) : -(_arg1);
this. = true;
}
public function set rotationY(_arg1:Number):void{
this.
= (Papervision3D.useDEGREES) ? (-(_arg1) * toRADIANS) : -(_arg1);
this. = true;
}
public function set rotationZ(_arg1:Number):void{
this.
= (Papervision3D.useDEGREES) ? (-(_arg1) * toRADIANS) : -(_arg1);
this. = true;
}
public function
(_arg1:GeometryObject3D=null):void{
if (_arg1){
this.geometry = _arg1;
};
}
public function get sceneX():Number{
return (this.world.n14);
}
public function get scaleX():Number{
if (Papervision3D.usePERCENT){
return ((this. * 100));
};
return (this.);
}
public function get scaleY():Number{
if (Papervision3D.usePERCENT){
return ((this. * 100));
};
return (this.);
}
public function get scaleZ():Number{
if (Papervision3D.usePERCENT){
return ((this. * 100));
};
return (this.);
}
public function (_arg1:Number):void{
(_arg1, UP);
}
public function get sceneZ():Number{
return (this.world.n34);
}
public function (_arg1:DisplayObject3D):Number{
var _local2:Number;
var _local3:Number;
var _local4:Number;
_local2 = (this.x - _arg1.x);
_local3 = (this.y - _arg1.y);
_local4 = (this.z - _arg1.z);
return (Math.sqrt((((_local2 * _local2) + (_local3 * _local3)) + (_local4 * _local4))));
}
public function get scale():Number{
if ((((this. == this.)) && ((this. == this.)))){
if (Papervision3D.usePERCENT){
return ((this. * 100));
};
return (this.);
//unresolved jump
};
return (NaN);
}
public function get sceneY():Number{
return (this.world.n24);
}
public function (_arg1:DisplayObject3D, _arg2:Number=1):Boolean{
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
_local3 = (this.x - _arg1.x);
_local4 = (this.y - _arg1.y);
_local5 = (this.z - _arg1.z);
_local6 = (((_local3 * _local3) + (_local4 * _local4)) + (_local5 * _local5));
_local7 = (this.geometry) ? this.geometry.boundingSphere2 : 0;
_local8 = (_arg1.geometry) ? _arg1.geometry.boundingSphere2 : 0;
_local7 = (_local7 * _arg2);
return (((_local7 + _local8) > _local6));
}
public function
(_arg1:Number, _arg2:Number3D):void{
var _local3:Number3D;
_local3 = _arg2.clone();
if (this.){
();
};
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));
}
private function ():void{
var _local1:Number3D;
_local1 = Matrix3D.matrix2euler(this.transform);
this.
= (_local1.x * toRADIANS);
this.
= (_local1.y * toRADIANS);
this.
= (_local1.z * toRADIANS);
this. = false;
}
public function pitch(_arg1:Number):void{
var _local2:Number3D;
var _local3:Matrix3D;
_arg1 = (Papervision3D.useDEGREES) ? (_arg1 * toRADIANS) : _arg1;
_local2 = RIGHT.clone();
if (this.){
();
};
Matrix3D.rotateAxis(transform, _local2);
_local3 = Matrix3D.rotationMatrix(_local2.x, _local2.y, _local2.z, _arg1);
this.transform.calculateMultiply3x3(_local3, transform);
this. = true;
}
public function yaw(_arg1:Number):void{
var _local2:Number3D;
var _local3:Matrix3D;
_arg1 = (Papervision3D.useDEGREES) ? (_arg1 * toRADIANS) : _arg1;
_local2 = UP.clone();
if (this.){
();
};
Matrix3D.rotateAxis(transform, _local2);
_local3 = Matrix3D.rotationMatrix(_local2.x, _local2.y, _local2.z, _arg1);
this.transform.calculateMultiply3x3(_local3, transform);
this. = true;
}
public function (_arg1):void{
var _local2:Matrix3D;
var _local3:Matrix3D;
_local2 = this.transform;
_local3 = ((_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. = false;
this. = true;
}
public function get x():Number{
return (this.transform.n14);
}
public function get z():Number{
return (this.transform.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 (_arg1:Number):void{
var _local2:Number3D;
var _local3:Matrix3D;
_arg1 = (Papervision3D.useDEGREES) ? (_arg1 * toRADIANS) : _arg1;
_local2 = FORWARD.clone();
if (this.){
();
};
Matrix3D.rotateAxis(transform, _local2);
_local3 = Matrix3D.rotationMatrix(_local2.x, _local2.y, _local2.z, _arg1);
this.transform.calculateMultiply3x3(_local3, transform);
this. = true;
}
public function getMaterialByName(_arg1:String):MaterialObject3D{
var _local2:MaterialObject3D;
var _local3:DisplayObject3D;
_local2 = this.materials.getMaterialByName(_arg1);
if (_local2){
return (_local2);
};
for each (_local3 in this._childrenByName) {
_local2 = _local3.getMaterialByName(_arg1);
if (_local2){
return (_local2);
};
};
return (null);
}
public function (_arg1:Number):void{
(_arg1, LEFT);
}
public function get scene():SceneObject3D{
return ();
}
public function get y():Number{
return (this.transform.n24);
}
public function set scale(_arg1:Number):void{
if (Papervision3D.usePERCENT){
_arg1 = (_arg1 / 100);
};
this. = (this. = (this. = _arg1));
this. = true;
}
public function render(_arg1:SceneObject3D):void{
var _local2:Array;
var _local3:Sprite;
var _local4:Number;
var _local5:Face3DInstance;
var _local6:Number;
var _local7:int;
_local2 = this._sorted;
_local2.sortOn("screenZ", (Array.DESCENDING | Array.NUMERIC));
_local3 = ((this.container) || (_arg1.container));
_local4 = 0;
_local6 = _local2.length;
_local7 = 0;
while (_local7 < _local6) {
_local5 = _local2[_local7];
if (faceLevelMode){
if (!_local5.container){
_local5.container = new InteractiveSprite(this);
_arg1.container.addChild(_local5.container);
} else {
_local5.container.graphics.clear();
};
if (_local5.visible){
_local4 = (_local4 + _local5.face.render(_local5.instance, _local5.container));
};
} else {
if (_local5.visible){
_local4 = (_local4 + _local5.face.render(_local5.instance, _local3));
};
};
_local7++;
};
_arg1.stats.rendered = (_arg1.stats.rendered + _local4);
}
public function get rotationY():Number{
if (this.){
();
};
return ((Papervision3D.useDEGREES) ? (-(this.
) * toDEGREES) : -(this.
));
}
public function get rotationZ():Number{
if (this.){
();
};
return ((Papervision3D.useDEGREES) ? (-(this.
) * toDEGREES) : -(this.
));
}
public function set scaleY(_arg1:Number):void{
if (Papervision3D.usePERCENT){
this. = (_arg1 / 100);
} else {
this. = _arg1;
};
this. = true;
}
public function set scaleZ(_arg1:Number):void{
if (Papervision3D.usePERCENT){
this. = (_arg1 / 100);
} else {
this. = _arg1;
};
this. = true;
}
public function get rotationX():Number{
if (this.){
();
};
return ((Papervision3D.useDEGREES) ? (-(this.
) * toDEGREES) : -(this.
));
}
public function set scaleX(_arg1:Number):void{
if (Papervision3D.usePERCENT){
this. = (_arg1 / 100);
} else {
this. = _arg1;
};
this. = true;
}
protected function ():void{
var _local1:Object;
var _local2:Matrix3D;
var _local3:Matrix3D;
var _local4:Matrix3D;
_local1 = Matrix3D.euler2quaternion(-(this.
), -(this.
), this.
);
_local2 = Matrix3D.quaternion2matrix(_local1.x, _local1.y, _local1.z, _local1.w);
_local3 = this.transform;
_local2.n14 = _local3.n14;
_local2.n24 = _local3.n24;
_local2.n34 = _local3.n34;
_local3.copy(_local2);
_local4 = Matrix3D.IDENTITY;
_local4.n11 = this.;
_local4.n22 = this.;
_local4.n33 = this.;
this.transform.calculateMultiply(_local3, _local4);
this. = false;
}
public function
(_arg1:Number):void{
(_arg1, FORWARD);
}
public function (_arg1):void{
var _local2:Matrix3D;
var _local3:Matrix3D;
_local2 = this.transform;
_local3 = ((_arg1 is DisplayObject3D)) ? _arg1.transform : _arg1;
_local2.n14 = _local3.n14;
_local2.n24 = _local3.n24;
_local2.n34 = _local3.n34;
}
public function hitTestPoint(_arg1:Number, _arg2:Number, _arg3:Number):Boolean{
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
_local4 = (this.x - _arg1);
_local5 = (this.y - _arg2);
_local6 = (this.z - _arg3);
_local7 = (((_arg1 * _arg1) + (_arg2 * _arg2)) + (_arg3 * _arg3));
_local8 = (this.geometry) ? this.geometry.boundingSphere2 : 0;
return ((_local8 > _local7));
}
public function (_arg1:Number):void{
(_arg1, RIGHT);
}
public function (_arg1:Number):void{
(_arg1, BACKWARD);
}
public function ():String{
var _local1:String;
var _local2:String;
var _local3:DisplayObject3D;
_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 x(_arg1:Number):void{
this.transform.n14 = _arg1;
}
public function set y(_arg1:Number):void{
this.transform.n24 = _arg1;
}
public static function get ZERO():DisplayObject3D{
return (new (DisplayObject3D));
}
}
}//package org.papervision3d.objects
Section 92
//Plane (org.papervision3d.objects.Plane)
package org.papervision3d.objects {
import org.papervision3d.core.geom.*;
import org.papervision3d.core.proto.*;
import org.papervision3d.core.*;
public class Plane extends Mesh3D {
public var
:Number;
public var :Number;
public static var DEFAULT_SCALE:Number = 1;
public static var DEFAULT_SEGMENTS:Number = 1;
public static var DEFAULT_SIZE:Number = 500;
public function Plane(_arg1:MaterialObject3D=null, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0, _arg5:Number=0, _arg6:Object=null){
var _local7:Number;
super(_arg1, new Array(), new Array(), null, _arg6);
this. = ((_arg4) || (DEFAULT_SEGMENTS));
this.
= ((_arg5) || (this.));
_local7 = DEFAULT_SCALE;
if (!_arg3){
if (_arg2){
_local7 = _arg2;
};
if (((_arg1) && (_arg1.bitmap))){
_arg2 = (_arg1.bitmap.width * _local7);
_arg3 = (_arg1.bitmap.height * _local7);
} else {
_arg2 = (DEFAULT_SIZE * _local7);
_arg3 = (DEFAULT_SIZE * _local7);
};
};
(_arg2, _arg3);
}
private function (_arg1:Number, _arg2:Number):void{
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Array;
var _local8:Array;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:int;
var _local14:NumberUV;
var _local15:NumberUV;
var _local16:NumberUV;
var _local17:int;
var _local18:Number;
var _local19:Number;
var _local20:Vertex3D;
var _local21:Vertex3D;
var _local22:Vertex3D;
_local3 = this.;
_local4 = this.
;
_local5 = (_local3 + 1);
_local6 = (_local4 + 1);
_local7 = this.geometry.vertices;
_local8 = this.geometry.faces;
_local9 = (_arg1 / 2);
_local10 = (_arg2 / 2);
_local11 = (_arg1 / _local3);
_local12 = (_arg2 / _local4);
_local13 = 0;
while (_local13 < (_local3 + 1)) {
_local17 = 0;
while (_local17 < _local6) {
_local18 = ((_local13 * _local11) - _local9);
_local19 = ((_local17 * _local12) - _local10);
_local7.push(new Vertex3D(_local18, _local19, 0));
_local17++;
};
_local13++;
};
_local13 = 0;
while (_local13 < _local3) {
_local17 = 0;
while (_local17 < _local4) {
_local20 = _local7[((_local13 * _local6) + _local17)];
_local21 = _local7[((_local13 * _local6) + (_local17 + 1))];
_local22 = _local7[(((_local13 + 1) * _local6) + _local17)];
_local14 = new NumberUV((_local13 / _local3), (_local17 / _local4));
_local15 = new NumberUV((_local13 / _local3), ((_local17 + 1) / _local4));
_local16 = new NumberUV(((_local13 + 1) / _local3), (_local17 / _local4));
_local8.push(new Face3D([_local20, _local22, _local21], null, [_local14, _local16, _local15]));
_local20 = _local7[(((_local13 + 1) * _local6) + (_local17 + 1))];
_local21 = _local7[(((_local13 + 1) * _local6) + _local17)];
_local22 = _local7[((_local13 * _local6) + (_local17 + 1))];
_local14 = new NumberUV(((_local13 + 1) / _local3), ((_local17 + 1) / _local4));
_local15 = new NumberUV(((_local13 + 1) / _local3), (_local17 / _local4));
_local16 = new NumberUV((_local13 / _local3), ((_local17 + 1) / _local4));
_local8.push(new Face3D([_local20, _local22, _local21], null, [_local14, _local16, _local15]));
_local17++;
};
_local13++;
};
this.geometry.ready = true;
}
}
}//package org.papervision3d.objects
Section 93
//InteractiveScene3D (org.papervision3d.scenes.InteractiveScene3D)
package org.papervision3d.scenes {
import flash.display.*;
import org.papervision3d.core.proto.*;
import org.papervision3d.utils.*;
public class InteractiveScene3D extends MovieScene3D {
public var interactiveSceneManager:InteractiveSceneManager;
public function InteractiveScene3D(_arg1:Sprite){
super(_arg1);
interactiveSceneManager = new InteractiveSceneManager(this);
}
override public function renderCamera(_arg1:CameraObject3D):void{
interactiveSceneManager.resetFaces();
super.renderCamera(_arg1);
interactiveSceneManager.sortObjects();
}
}
}//package org.papervision3d.scenes
Section 94
//MovieScene3D (org.papervision3d.scenes.MovieScene3D)
package org.papervision3d.scenes {
import flash.display.*;
import org.papervision3d.objects.*;
import org.papervision3d.core.proto.*;
import flash.utils.*;
public class MovieScene3D extends Scene3D {
private var :Dictionary;
private var
:Array;
public function MovieScene3D(_arg1:Sprite){
super(_arg1);
this.
= new Array();
= new Dictionary();
}
override public function addChild(_arg1:DisplayObject3D, _arg2:String=null):DisplayObject3D{
_arg1 = super.addChild(_arg1, _arg2);
_arg1.container = new Sprite();
container.addChild(_arg1.container);
this.
.push(_arg1.container);
[_arg1] = _arg1.container;
return (_arg1);
}
public function (_arg1:DisplayObject3D):Sprite{
return ([_arg1]);
}
override protected function renderObjects(_arg1:Boolean):void{
var _local2:Number;
var _local3:Sprite;
var _local4:Array;
var _local5:Number;
var _local6:DisplayObject3D;
var _local7:Array;
var _local8:Object;
_local2 = this.objects.length;
_local4 = this.
;
_local5 = 0;
while ((_local3 = _local4[_local5++])) {
_local3.graphics.clear();
};
_local7 = this.objects;
_local5 = _local7.length;
if (_arg1){
while ((_local6 = _local7[--_local5])) {
if (_local6.visible){
container.addChild(_local6.container);
_local6.render(this);
};
};
} else {
while ((_local6 = _local7[--_local5])) {
if (_local6.visible){
_local6.render(this);
};
};
};
_local8 = this.stats;
_local8.performance = (getTimer() - _local8.performance);
}
override public function removeChild(_arg1:DisplayObject3D):DisplayObject3D{
var _local2:DisplayObject3D;
var _local3:int;
_local2 = super.removeChild(_arg1);
_local3 = 0;
while (_local3 <
.length) {
if (_local2.container ==
[_local3]){
this.
.splice(_local3, 1);
};
_local3++;
};
container.removeChild(_local2.container);
delete [_local2];
return (_local2);
}
}
}//package org.papervision3d.scenes
Section 95
//Scene3D (org.papervision3d.scenes.Scene3D)
package org.papervision3d.scenes {
import flash.display.*;
import org.papervision3d.objects.*;
import org.papervision3d.core.proto.*;
import flash.utils.*;
public class Scene3D extends SceneObject3D {
public function Scene3D(_arg1:Sprite){
super(_arg1);
}
override protected function renderObjects(_arg1:Boolean):void{
var _local2:DisplayObject3D;
var _local3:Array;
var _local4:Number;
var _local5:Object;
this.container.graphics.clear();
_local3 = this.objects;
_local4 = _local3.length;
while ((_local2 = _local3[--_local4])) {
if (_local2.visible){
_local2.render(this);
};
};
_local5 = this.stats;
_local5.performance = (getTimer() - _local5.performance);
}
}
}//package org.papervision3d.scenes
Section 96
//IVirtualMouseEvent (org.papervision3d.utils.virtualmouse.IVirtualMouseEvent)
package org.papervision3d.utils.virtualmouse {
public interface IVirtualMouseEvent {
}
}//package org.papervision3d.utils.virtualmouse
Section 97
//VirtualMouse (org.papervision3d.utils.virtualmouse.VirtualMouse)
package org.papervision3d.utils.virtualmouse {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import com.blitzagency.xray.logger.*;
import flash.utils.*;
public class VirtualMouse extends EventDispatcher {
private var
:Sprite;
private var :DisplayObject;
private var target:InteractiveObject;
private var
:Boolean;// = false
private var
:Class;
private var
:Event;
private var
:Class;
private var
:Point;
private var
:int;// = 0
private var :Object;
private var log:XrayLog;
private var :Dictionary;
private var :Boolean;// = false
private var :Boolean;// = true
private var :Point;
private var :Boolean;// = false
private var
:Boolean;// = false
private var altKey:Boolean;// = false
private var :Boolean;// = false
private var ctrlKey:Boolean;// = false
private var shiftKey:Boolean;// = false
private var :Stage;
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){
altKey = false;
ctrlKey = false;
shiftKey = false;
= 0;
= false;
= false;
= new Object();
= new Dictionary(true);
= false;
= false;
= true;
= false;
= VirtualMouseEvent;
= VirtualMouseMouseEvent;
log = new XrayLog();
super();
this.stage = _arg1;
this.container = _arg2;
= new Point(_arg3, _arg4);
=
.clone();
addEventListener(UPDATE,
);
update();
}
public function get mouseIsDown():Boolean{
return (_mouseIsDown);
}
public function get stage():Stage{
return ();
}
public function exitContainer():void{
var _local1:Point;
_local1 = target.globalToLocal(
);
if (![MouseEvent.MOUSE_OUT]){
= new
(MouseEvent.MOUSE_OUT, true, false, _local1.x, _local1.y, container, ctrlKey, altKey, shiftKey, _mouseIsDown,
);
container.dispatchEvent(
);
dispatchEvent(
);
};
if (![MouseEvent.ROLL_OUT]){
= new
(MouseEvent.ROLL_OUT, false, false, _local1.x, _local1.y, container, ctrlKey, altKey, shiftKey, _mouseIsDown,
);
container.dispatchEvent(
);
dispatchEvent(
);
};
if (target != container){
if (![MouseEvent.MOUSE_OUT]){
= new
(MouseEvent.MOUSE_OUT, true, false, _local1.x, _local1.y, container, ctrlKey, altKey, shiftKey, _mouseIsDown,
);
target.dispatchEvent(
);
dispatchEvent(
);
};
if (![MouseEvent.ROLL_OUT]){
= new
(MouseEvent.ROLL_OUT, false, false, _local1.x, _local1.y, container, ctrlKey, altKey, shiftKey, _mouseIsDown,
);
target.dispatchEvent(
);
dispatchEvent(
);
};
};
target = ;
}
public function release():void{
= true;
_mouseIsDown = false;
if (!){
update();
};
}
public function click():void{
press();
release();
}
public function get container():Sprite{
return (
);
}
public function set container(_arg1:Sprite):void{
= _arg1;
}
public function get y():Number{
return (
.y);
}
public function set x(_arg1:Number):void{
.x = _arg1;
if (!){
update();
};
}
public function
(_arg1:String):void{
[_arg1] = true;
}
public function get lastEvent():Event{
return (
);
}
private function
(_arg1:Event):void{
var _local2:Array;
var _local3:InteractiveObject;
var _local4:DisplayObject;
var _local5:int;
var _local6:Point;
var _local7:Point;
var _local8:Boolean;
if (!container){
return;
};
_local2 = container.getObjectsUnderPoint(
);
_local5 = _local2.length;
while (_local5--) {
_local4 = _local2[_local5];
while (_local4) {
if ([_local4]){
_local3 = null;
break;
};
if (((_local3) && ((_local4 is SimpleButton)))){
_local3 = null;
} else {
if (((_local3) && (!(DisplayObjectContainer(_local4).mouseChildren)))){
_local3 = null;
};
};
if (((((!(_local3)) && ((_local4 is InteractiveObject)))) && (InteractiveObject(_local4).mouseEnabled))){
_local3 = InteractiveObject(_local4);
};
_local4 = _local4.parent;
};
if (_local3){
break;
};
};
if (!_local3){
_local3 = ;
log.debug("no new target found, using stage");
};
_local6 = target.globalToLocal(
);
_local7 = _local3.globalToLocal(
);
if (((!((.x ==
.x))) || (!((.y ==
.y))))){
_local8 = false;
if (stage){
_local8 = (((((((
.x >= 0)) && ((
.y >= 0)))) && ((
.x <= stage.stageWidth)))) && ((
.y <= stage.stageHeight)));
};
if (((((!(_local8)) && ( ))) && (!([Event.MOUSE_LEAVE])))){
= new
(Event.MOUSE_LEAVE, false, false);
stage.dispatchEvent(
);
dispatchEvent(
);
};
if (((_local8) && (!([MouseEvent.MOUSE_MOVE])))){
= new
(MouseEvent.MOUSE_MOVE, true, false, _local7.x, _local7.y, _local3, ctrlKey, altKey, shiftKey, _mouseIsDown,
);
_local3.dispatchEvent(
);
dispatchEvent(
);
};
= _local8;
};
if (_local3 != target){
if (![MouseEvent.MOUSE_OUT]){
= new
(MouseEvent.MOUSE_OUT, true, false, _local6.x, _local6.y, _local3, ctrlKey, altKey, shiftKey, _mouseIsDown,
);
target.dispatchEvent(
);
dispatchEvent(
);
};
if (![MouseEvent.ROLL_OUT]){
= new
(MouseEvent.ROLL_OUT, false, false, _local6.x, _local6.y, _local3, ctrlKey, altKey, shiftKey, _mouseIsDown,
);
target.dispatchEvent(
);
dispatchEvent(
);
};
if (![MouseEvent.MOUSE_OVER]){
= new
(MouseEvent.MOUSE_OVER, true, false, _local7.x, _local7.y, target, ctrlKey, altKey, shiftKey, _mouseIsDown,
);
_local3.dispatchEvent(
);
dispatchEvent(
);
};
if (![MouseEvent.ROLL_OVER]){
= new
(MouseEvent.ROLL_OVER, false, false, _local7.x, _local7.y, target, ctrlKey, altKey, shiftKey, _mouseIsDown,
);
_local3.dispatchEvent(
);
dispatchEvent(
);
};
};
if (
){
if (_mouseIsDown){
if (![MouseEvent.MOUSE_DOWN]){
= new
(MouseEvent.MOUSE_DOWN, true, false, _local7.x, _local7.y, _local3, ctrlKey, altKey, shiftKey, _mouseIsDown,
);
_local3.dispatchEvent(
);
dispatchEvent(
);
};
= _local3;
= false;
} else {
if (![MouseEvent.MOUSE_UP]){
= new
(MouseEvent.MOUSE_UP, true, false, _local7.x, _local7.y, _local3, ctrlKey, altKey, shiftKey, _mouseIsDown,
);
_local3.dispatchEvent(
);
dispatchEvent(
);
};
if (((!([MouseEvent.CLICK])) && ((_local3 == )))){
= new
(MouseEvent.CLICK, true, false, _local7.x, _local7.y, _local3, ctrlKey, altKey, shiftKey, _mouseIsDown,
);
_local3.dispatchEvent(
);
dispatchEvent(
);
};
= null;
= false;
};
};
if ((((() && (!([MouseEvent.DOUBLE_CLICK])))) && (_local3.doubleClickEnabled))){
= new
(MouseEvent.DOUBLE_CLICK, true, false, _local7.x, _local7.y, _local3, ctrlKey, altKey, shiftKey, _mouseIsDown,
);
_local3.dispatchEvent(
);
dispatchEvent(
);
};
=
.clone();
= _mouseIsDown;
target = _local3;
}
public function
():Point{
return (
.clone());
}
public function get x():Number{
return (
.x);
}
public function
():void{
= true;
}
public function get useNativeEvents():Boolean{
return ();
}
public function setLocation(_arg1, _arg2=null):void{
var _local3:Point;
if ((_arg1 is Point)){
_local3 = Point(_arg1);
.x = _local3.x;
.y = _local3.y;
} else {
.x = Number(_arg1);
.y = Number(_arg2);
};
if (!){
update();
};
}
private function
(_arg1:KeyboardEvent):void{
altKey = _arg1.altKey;
ctrlKey = _arg1.ctrlKey;
shiftKey = _arg1.shiftKey;
}
public function
(_arg1:DisplayObject):void{
if ((_arg1 in )){
delete [_arg1];
};
}
public function ():void{
if (){
release();
} else {
click();
press();
= true;
release();
= false;
};
}
public function update():void{
dispatchEvent(new Event(UPDATE, false, false));
}
public function ignore(_arg1:DisplayObject):void{
[_arg1] = true;
}
public function ():void{
= false;
update();
}
public function (_arg1:String):void{
if ((_arg1 in )){
delete [_arg1];
};
}
public function press():void{
= true;
_mouseIsDown = true;
if (!){
update();
};
}
public function set useNativeEvents(_arg1:Boolean):void{
if (_arg1 == ){
return;
};
= _arg1;
if (){
= VirtualMouseEvent;
= VirtualMouseMouseEvent;
} else {
= Event;
= MouseEvent;
};
}
public function set y(_arg1:Number):void{
.y = _arg1;
if (!){
update();
};
}
public function set stage(_arg1:Stage):void{
var _local2:Boolean;
if (){
_local2 = true;
.removeEventListener(KeyboardEvent.KEY_DOWN,
);
.removeEventListener(KeyboardEvent.KEY_UP,
);
} else {
_local2 = false;
};
= _arg1;
if (){
.addEventListener(KeyboardEvent.KEY_DOWN,
);
.addEventListener(KeyboardEvent.KEY_UP,
);
target = ;
if (!_local2){
update();
};
};
}
}
}//package org.papervision3d.utils.virtualmouse
Section 98
//VirtualMouseEvent (org.papervision3d.utils.virtualmouse.VirtualMouseEvent)
package org.papervision3d.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.utils.virtualmouse
Section 99
//VirtualMouseMouseEvent (org.papervision3d.utils.virtualmouse.VirtualMouseMouseEvent)
package org.papervision3d.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.utils.virtualmouse
Section 100
//InteractiveContainerData (org.papervision3d.utils.InteractiveContainerData)
package org.papervision3d.utils {
import flash.events.*;
import org.papervision3d.objects.*;
import org.papervision3d.core.geom.*;
public class InteractiveContainerData extends EventDispatcher {
public var container:InteractiveSprite;
public var displayObject3D:DisplayObject3D;// = null
public var lineColor:Number;
public var lineAlpha:Number;
public var fillAlpha:Number;
public var sort:Boolean;// = false
public var isDrawn:Boolean;// = false
public var color:Number;
public var lineSize:Number;
public var face3d:Face3D;
public function InteractiveContainerData(_arg1, _arg2:Number=0, _arg3:IEventDispatcher=null){
displayObject3D = null;
isDrawn = false;
sort = false;
color = InteractiveSceneManager.DEFAULT_FILL_COLOR;
fillAlpha = InteractiveSceneManager.DEFAULT_FILL_ALPHA;
lineColor = InteractiveSceneManager.DEFAULT_LINE_COLOR;
lineSize = InteractiveSceneManager.DEFAULT_LINE_SIZE;
lineAlpha = InteractiveSceneManager.DEFAULT_LINE_ALPHA;
super(_arg3);
displayObject3D = (((_arg1 is DisplayObject3D) == true)) ? _arg1 : null;
face3d = (((_arg1 is Face3D) == true)) ? _arg1 : null;
if (displayObject3D != null){
this.container = new InteractiveSprite(_arg1);
};
if (face3d != null){
if (face3d.face3DInstance.container != null){
this.container = InteractiveSprite(face3d.face3DInstance.container);
} else {
this.container = new InteractiveSprite();
};
};
color = _arg2;
container.alpha = InteractiveSceneManager.DEFAULT_SPRITE_ALPHA;
container.interactiveContainerData = this;
}
public function get screenZ():Number{
return (((displayObject3D)!=null) ? displayObject3D.screenZ : face3d.screenZ);
}
}
}//package org.papervision3d.utils
Section 101
//InteractiveSceneManager (org.papervision3d.utils.InteractiveSceneManager)
package org.papervision3d.utils {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import org.papervision3d.objects.*;
import org.papervision3d.core.geom.*;
import org.papervision3d.core.proto.*;
import org.papervision3d.materials.*;
import com.blitzagency.xray.logger.*;
import flash.utils.*;
import org.papervision3d.utils.virtualmouse.*;
import org.papervision3d.events.*;
public class InteractiveSceneManager extends EventDispatcher {
public var container:Sprite;
public var scene:SceneObject3D;
protected var :Boolean;// = true
protected var log:XrayLog;
private var
:Boolean;// = false
public var :Dictionary;
public var :Mouse3D;
public var :VirtualMouse;
public var faceLevelMode:Boolean;// = false
public var debug:Boolean;// = false
protected var :Boolean;// = false
public var buttonMode:Boolean;// = false
public var :Dictionary;
public static var DEFAULT_FILL_ALPHA:Number = 1;
public static var DEFAULT_SPRITE_ALPHA:Number = 1;
public static var DEFAULT_FILL_COLOR:Number = 0xFFFFFF;
public static var DEFAULT_LINE_SIZE:Number = 1;
public static var DEFAULT_LINE_ALPHA:Number = 1;
public static var DEFAULT_LINE_COLOR:Number = -1;
public static var MOUSE_IS_DOWN:Boolean = false;
public static var SHOW_DRAWN_FACES:Boolean = false;
public function InteractiveSceneManager(_arg1:SceneObject3D):void{
buttonMode = false;
faceLevelMode = false;
= false;
= new Dictionary();
= new Dictionary();
container = new InteractiveSprite();
= new Mouse3D();
= new VirtualMouse();
debug = false;
= true;
= false;
log = new XrayLog();
super();
container.addEventListener(Event.ADDED_TO_STAGE, );
scene = _arg1;
scene.container.parent.addChild(container);
container.x = scene.container.x;
container.y = scene.container.y;
enableMouse = false;
}
protected function (_arg1:MouseEvent):void{
= true;
}
public function sortObjects():void{
var _local1:Array;
var _local2:InteractiveContainerData;
var _local3:uint;
var _local4:Number;
_local1 = [];
for each (_local2 in ) {
if (!_local2.sort){
} else {
_local4 = ((_local2.face3d == null)) ? _local2.screenZ : _local2.face3d.face3DInstance.screenZ;
_local1.push({container:_local2.container, distance:_local4});
};
};
_local1.sortOn("distance", (Array.DESCENDING | Array.NUMERIC));
_local3 = 0;
while (_local3 < _local1.length) {
container.addChild(_local1[_local3].container);
_local3++;
};
if (mouseInteractionMode){
= false;
};
}
public function ():void{
SHOW_DRAWN_FACES = false;
DEFAULT_SPRITE_ALPHA = 1;
DEFAULT_FILL_ALPHA = 1;
BitmapMaterial.AUTO_MIP_MAPPING = false;
DisplayObject3D.faceLevelMode = false;
buttonMode = true;
faceLevelMode = true;
mouseInteractionMode = false;
}
public function (_arg1:Object):void{
var _local2:InteractiveContainerData;
var _local3:InteractiveSprite;
if ([_arg1] == null){
_local2 = ([_arg1] = new InteractiveContainerData(_arg1));
[_local2.container] = _arg1;
_local3 = _local2.container;
_local3.addEventListener(MouseEvent.MOUSE_DOWN, );
_local3.addEventListener(MouseEvent.MOUSE_UP, );
_local3.addEventListener(MouseEvent.CLICK, );
_local3.addEventListener(MouseEvent.MOUSE_OVER, );
_local3.addEventListener(MouseEvent.MOUSE_OUT, );
_local3.addEventListener(MouseEvent.MOUSE_MOVE, );
_local3.buttonMode = buttonMode;
if (((!(SHOW_DRAWN_FACES)) && (!(DisplayObject3D.faceLevelMode)))){
_local3.blendMode = BlendMode.ERASE;
};
.ignore(_local3);
dispatchEvent(new InteractiveScene3DEvent(InteractiveScene3DEvent.OBJECT_ADDED, null, _local3));
if (debug){
log.debug("addDisplayObject id", _arg1.id, _arg1.name, DEFAULT_SPRITE_ALPHA);
};
};
}
public function resetFaces():void{
var _local1:InteractiveContainerData;
for each (_local1 in ) {
_local1.container.graphics.clear();
_local1.sort = _local1.isDrawn;
_local1.isDrawn = false;
};
();
}
public function ():void{
container.x = scene.container.x;
container.y = scene.container.y;
}
protected function (_arg1:MouseEvent):void{
(InteractiveScene3DEvent.OBJECT_CLICK, Sprite(_arg1.currentTarget));
}
protected function (_arg1:MouseEvent):void{
var face3d:Face3D;
var p:Object;
var mat:InteractiveMovieMaterial;
var rect:Rectangle;
var contains:Boolean;
var e = _arg1;
if (((VirtualMouse) && (((faceLevelMode) || (DisplayObject3D.faceLevelMode))))){
try {
face3d = [e.currentTarget];
p = InteractiveUtils.getMapCoordAtPoint(face3d, container.mouseX, container.mouseY);
mat = InteractiveMovieMaterial(face3d.face3DInstance.instance.material);
rect = new Rectangle(0, 0, mat.movie.width, mat.movie.height);
contains = rect.contains(p.x, p.y);
if (!contains){
.exitContainer();
};
} catch(err:Error) {
log.error("material type is not Interactive. If you're using a Collada object, you may have to reassign the material to the object after the collada scene is loaded", err.message);
};
};
(InteractiveScene3DEvent.OBJECT_OUT, Sprite(e.currentTarget));
}
public function drawFace(_arg1:DisplayObject3D, _arg2:Face3D, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number):void{
var _local9:Object;
var _local10:InteractiveContainerData;
var _local11:InteractiveSprite;
var _local12:Graphics;
_local9 = _arg1;
if (((faceLevelMode) || (DisplayObject3D.faceLevelMode))){
_local9 = _arg2;
};
if ([_local9] == null){
(_local9);
};
if ((() && (!(DisplayObject3D.faceLevelMode)))){
_local10 = [_local9];
_local11 = _local10.container;
_local12 = _local11.graphics;
_local11.x0 = _arg3;
_local11.x1 = _arg4;
_local11.x2 = _arg5;
_local11.y0 = _arg6;
_local11.y1 = _arg7;
_local11.y2 = _arg8;
_local12.beginFill(_local10.color, _local10.fillAlpha);
if (((!((_local10.lineColor == -1))) && (SHOW_DRAWN_FACES))){
_local12.lineStyle(_local10.lineSize, _local10.lineColor, _local10.lineAlpha);
};
_local12.moveTo(_arg3, _arg6);
_local12.lineTo(_arg4, _arg7);
_local12.lineTo(_arg5, _arg8);
_local12.endFill();
_local10.isDrawn = true;
};
}
public function set enableMouse(_arg1:Boolean):void{
Mouse3D.enabled = _arg1;
}
protected function (_arg1:String, _arg2:Sprite):void{
var _local3:Face3D;
var _local4:InteractiveContainerData;
if (debug){
log.debug(_arg1, DisplayObject3D([_arg2]).name);
};
if (([_arg2] is DisplayObject3D)){
[_arg2].dispatchEvent(new InteractiveScene3DEvent(_arg1, [_arg2], InteractiveSprite(_arg2)));
dispatchEvent(new InteractiveScene3DEvent(_arg1, [_arg2], InteractiveSprite(_arg2), null, null));
} else {
if (([_arg2] is Face3D)){
_local3 = [_arg2];
_local4 = [_local3];
dispatchEvent(new InteractiveScene3DEvent(_arg1, null, InteractiveSprite(_arg2), _local3, _local4));
};
};
}
protected function (_arg1:MouseEvent):void{
var point:Object;
var face3d:Face3D;
var mat:MovieMaterial;
var e = _arg1;
if (((VirtualMouse) && (((faceLevelMode) || (DisplayObject3D.faceLevelMode))))){
face3d = [e.currentTarget];
point = InteractiveUtils.getMapCoordAtPoint(face3d, container.mouseX, container.mouseY);
try {
mat = (face3d.face3DInstance.instance.material as MovieMaterial);
.container = (mat.movie as Sprite);
if (.container){
.setLocation(point.x, point.y);
};
} catch(err:Error) {
log.error("material type is not Inter active. If you're using a Collada object, you may have to reassign the material to the object after the collada scene is loaded", err.message);
};
};
(InteractiveScene3DEvent.OBJECT_MOVE, Sprite(e.currentTarget));
if (((Mouse3D.enabled) && (((faceLevelMode) || (DisplayObject3D.faceLevelMode))))){
.updatePosition(Face3D([e.currentTarget]), (e.currentTarget as Sprite));
};
}
protected function (_arg1:MouseEvent):void{
var _local2:String;
_local2 = (((!()) || (!(mouseInteractionMode)))) ? InteractiveScene3DEvent.OBJECT_OVER : InteractiveScene3DEvent.OBJECT_CLICK;
= false;
if ((() && ((_local2 == InteractiveScene3DEvent.OBJECT_CLICK)))){
.click();
};
(_local2, Sprite(_arg1.currentTarget));
}
public function set mouseInteractionMode(_arg1:Boolean):void{
= _arg1;
= !(_arg1);
if (_arg1){
container.stage.addEventListener(MouseEvent.MOUSE_MOVE, );
};
if (!_arg1){
container.stage.removeEventListener(MouseEvent.MOUSE_MOVE, );
};
}
public function get enableMouse():Boolean{
return (Mouse3D.enabled);
}
protected function (_arg1:MouseEvent):void{
MOUSE_IS_DOWN = true;
if (){
.press();
};
(InteractiveScene3DEvent.OBJECT_PRESS, Sprite(_arg1.currentTarget));
}
protected function (_arg1:MouseEvent):void{
if (debug){
log.debug("releaseOutside");
};
dispatchEvent(new InteractiveScene3DEvent(InteractiveScene3DEvent.OBJECT_RELEASE_OUTSIDE));
MOUSE_IS_DOWN = false;
= true;
= true;
}
public function get mouseInteractionMode():Boolean{
return (
);
}
protected function (_arg1:Event):void{
container.stage.addEventListener(Event.RESIZE,
);
container.stage.addEventListener(MouseEvent.MOUSE_UP, );
.stage = container.stage;
}
protected function (_arg1:MouseEvent):void{
MOUSE_IS_DOWN = false;
if (){
.release();
};
(InteractiveScene3DEvent.OBJECT_RELEASE, Sprite(_arg1.currentTarget));
}
protected function
(_arg1:Event):void{
();
}
}
}//package org.papervision3d.utils
Section 102
//InteractiveSprite (org.papervision3d.utils.InteractiveSprite)
package org.papervision3d.utils {
import flash.display.*;
import org.papervision3d.objects.*;
public class InteractiveSprite extends Sprite {
public var interactiveContainerData:InteractiveContainerData;// = null
public var x1:Number;
public var x2:Number;
public var x0:Number;
public var y0:Number;
public var y2:Number;
public var obj:DisplayObject3D;// = null
public var y1:Number;
public function InteractiveSprite(_arg1:DisplayObject3D=null):void{
obj = null;
interactiveContainerData = null;
super();
this.obj = _arg1;
}
}
}//package org.papervision3d.utils
Section 103
//InteractiveUtils (org.papervision3d.utils.InteractiveUtils)
package org.papervision3d.utils {
import flash.display.*;
import org.papervision3d.objects.*;
import org.papervision3d.core.geom.*;
import org.papervision3d.core.proto.*;
import org.papervision3d.materials.*;
public class InteractiveUtils {
public static function getMapCoordAtPointDO3D(_arg1:DisplayObject3D, _arg2:Number, _arg3:Number):Object{
var _local4:Face3D;
_local4 = _arg1.geometry.faces[0];
return (getMapCoordAtPoint(_local4, _arg2, _arg3));
}
public static function UVatPoint(_arg1:Face3D, _arg2:Number, _arg3:Number):Object{
var _local4:Vertex3D;
var _local5:Vertex3D;
var _local6:Vertex3D;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local19:Number;
var _local20:Number;
var _local21:Number;
var _local22:Number;
var _local23:Number;
var _local24:Number;
var _local25:Number;
var _local26:Number;
_local4 = _arg1.v0;
_local5 = _arg1.v1;
_local6 = _arg1.v2;
_local7 = _local4.vertex2DInstance.x;
_local8 = _local4.vertex2DInstance.y;
_local9 = _local5.vertex2DInstance.x;
_local10 = _local5.vertex2DInstance.y;
_local11 = _local6.vertex2DInstance.x;
_local12 = _local6.vertex2DInstance.y;
_local13 = (_local11 - _local7);
_local14 = (_local12 - _local8);
_local15 = (_local9 - _local7);
_local16 = (_local10 - _local8);
_local17 = (_arg2 - _local7);
_local18 = (_arg3 - _local8);
_local19 = ((_local13 * _local13) + (_local14 * _local14));
_local20 = ((_local13 * _local15) + (_local14 * _local16));
_local21 = ((_local13 * _local17) + (_local14 * _local18));
_local22 = ((_local15 * _local15) + (_local16 * _local16));
_local23 = ((_local15 * _local17) + (_local16 * _local18));
_local24 = (1 / ((_local19 * _local22) - (_local20 * _local20)));
_local25 = (((_local22 * _local21) - (_local20 * _local23)) * _local24);
_local26 = (((_local19 * _local23) - (_local20 * _local21)) * _local24);
return ({u:_local25, v:_local26});
}
public static function getMapCoordAtPoint(_arg1:Face3D, _arg2:Number, _arg3:Number):Object{
var _local4:Array;
var _local5:Object;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:MaterialObject3D;
var _local17:BitmapData;
var _local18:Number;
var _local19:Number;
_local4 = _arg1.uv;
_local5 = UVatPoint(_arg1, _arg2, _arg3);
_local6 = _local5.u;
_local7 = _local5.v;
_local8 = _local4[0].u;
_local9 = _local4[1].u;
_local10 = _local4[2].u;
_local11 = _local4[0].v;
_local12 = _local4[1].v;
_local13 = _local4[2].v;
_local14 = ((((_local9 - _local8) * _local7) + ((_local10 - _local8) * _local6)) + _local8);
_local15 = ((((_local12 - _local11) * _local7) + ((_local13 - _local11) * _local6)) + _local11);
_local16 = _arg1.face3DInstance.instance.material;
_local17 = _local16.bitmap;
_local18 = 1;
_local19 = 1;
if (_local17){
_local18 = (BitmapMaterial.AUTO_MIP_MAPPING) ? _local16.widthOffset : _local17.width;
_local19 = (BitmapMaterial.AUTO_MIP_MAPPING) ? _local16.heightOffset : _local17.height;
};
return ({x:(_local14 * _local18), y:(_local19 - (_local15 * _local19))});
}
public static function getCoordAtPoint(_arg1:Face3D, _arg2:Number, _arg3:Number):Vertex3D{
var _local4:Object;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
_local4 = UVatPoint(_arg1, _arg2, _arg3);
_local5 = _arg1.v0.x;
_local6 = _arg1.v0.y;
_local7 = _arg1.v0.z;
_local8 = _arg1.v1.x;
_local9 = _arg1.v1.y;
_local10 = _arg1.v1.z;
_local11 = _arg1.v2.x;
_local12 = _arg1.v2.y;
_local13 = _arg1.v2.z;
_local14 = _local4.u;
_local15 = _local4.v;
_local16 = ((_local5 + ((_local8 - _local5) * _local15)) + ((_local11 - _local5) * _local14));
_local17 = ((_local6 + ((_local9 - _local6) * _local15)) + ((_local12 - _local6) * _local14));
_local18 = ((_local7 + ((_local10 - _local7) * _local15)) + ((_local13 - _local7) * _local14));
return (new Vertex3D(_local16, _local17, _local18));
}
}
}//package org.papervision3d.utils
Section 104
//Mouse3D (org.papervision3d.utils.Mouse3D)
package org.papervision3d.utils {
import flash.display.*;
import org.papervision3d.objects.*;
import org.papervision3d.core.geom.*;
import org.papervision3d.core.*;
public class Mouse3D extends DisplayObject3D {
public static var enabled:Boolean = true;
private static var UP:Number3D = new Number3D(0, 1, 0);
public function Mouse3D(_arg1:Object=null):void{
}
public function updatePosition(_arg1:Face3D, _arg2:Sprite):void{
var _local3:Number3D;
var _local4:Number3D;
var _local5:Number3D;
var _local6:Matrix3D;
var _local7:Matrix3D;
var _local8:Number;
var _local9:Number;
var _local10:Number3D;
var _local11:Number3D;
var _local12:Matrix3D;
_local3 = new Number3D(0, 0, 0);
_local4 = new Number3D(_arg1.faceNormal.x, _arg1.faceNormal.y, _arg1.faceNormal.z);
_local5 = Number3D.sub(_local4, _local3);
_local5.normalize();
if (_local5.modulo > 0.1){
_local10 = Number3D.cross(_local5, UP);
_local10.normalize();
_local11 = Number3D.cross(_local5, _local10);
_local11.normalize();
_local12 = this.transform;
_local12.n11 = _local10.x;
_local12.n21 = _local10.y;
_local12.n31 = _local10.z;
_local12.n12 = -(_local11.x);
_local12.n22 = -(_local11.y);
_local12.n32 = -(_local11.z);
_local12.n13 = _local5.x;
_local12.n23 = _local5.y;
_local12.n33 = _local5.z;
};
_local6 = Matrix3D.IDENTITY;
this.transform = Matrix3D.multiply(_arg1.face3DInstance.instance.world, _local12);
_local7 = Matrix3D.IDENTITY;
_local8 = _arg2.mouseX;
_local9 = _arg2.mouseY;
_local7.n14 = InteractiveUtils.getCoordAtPoint(_arg1, _local8, _local9).x;
_local7.n24 = InteractiveUtils.getCoordAtPoint(_arg1, _local8, _local9).y;
_local7.n34 = InteractiveUtils.getCoordAtPoint(_arg1, _local8, _local9).z;
_local6.calculateMultiply(_arg1.face3DInstance.instance.world, _local7);
x = _local6.n14;
y = _local6.n24;
z = _local6.n34;
}
}
}//package org.papervision3d.utils
Section 105
//Papervision3D (org.papervision3d.Papervision3D)
package org.papervision3d {
public class Papervision3D {
public static var useDEGREES:Boolean = true;
public static var VERBOSE:Boolean = true;
public static var AUTHOR:String = "(c) 2006-2007 Copyright by Carlos Ulloa | papervision3d.org | carlos@papervision3d.org";
public static var DATE:String = "20.08.07";
public static var NAME:String = "Papervision3D";
public static var VERSION:String = "Beta 1.7";
public static var usePERCENT:Boolean = false;
public static function log(_arg1:String):void{
if (Papervision3D.VERBOSE){
trace(_arg1);
};
}
}
}//package org.papervision3d
Section 106
//asd (asd)
package {
import flash.display.*;
public dynamic class asd extends MovieClip {
}
}//package
Section 107
//bullet (bullet)
package {
import flash.display.*;
public dynamic class bullet extends MovieClip {
}
}//package
Section 108
//candystand_3d_stinger_example (candystand_3d_stinger_example)
package {
import flash.events.*;
import com.caurina.transitions.*;
import flash.display.*;
import flash.utils.*;
import com.event.*;
import flash.media.*;
import flash.text.*;
import flash.filters.*;
import flash.ui.*;
import com.candystand.Stinger.*;
import flash.net.*;
public dynamic class candystand_3d_stinger_example extends MovieClip {
public var b1:MovieClip;
public var b2:MovieClip;
public var b3:MovieClip;
public var b4:MovieClip;
public var b5:MovieClip;
public var b6:MovieClip;
public var bar:MovieClip;
public var b7:MovieClip;
public var point_out:TextField;
public var :uint;
public var ball_land:MovieClip;
public var shoot:Boolean;
public var aaa:MovieClip;
public var be:uint;
public var speed:MovieClip;
public var :int;
public var :int;
public var :BlurFilter;
public var :Array;
public var i:uint;
public var fans1:MovieClip;
public var fans3:MovieClip;
public var fans4:MovieClip;
public var u:uint;
public var a:uint;
public var screen:MovieClip;
public var :int;
public var sfxr:MovieClip;
public var :Boolean;
public var :Boolean;
public var :Boolean;
public var fans2:MovieClip;
public var ret:TextField;
public var turret_2:MovieClip;
public var clickie:SimpleButton;
public var turret_4:MovieClip;
public var turret_1:MovieClip;
public var turret_3:MovieClip;
public var :Array;
public var f_pause:MovieClip;
public var points;
public var :uint;
public var
:uint;
public var
:Array;
public var :Array;
public var :MovieClip;
public var :ContextMenu;
private var :SoundChannel;
public var enemy_1:MovieClip;
public var enemy_2:MovieClip;
public var enemy_3:MovieClip;
public var enemy_4:MovieClip;
public var enemy_5:MovieClip;
public var enemy_6:MovieClip;
public var enemy_8:MovieClip;
public var enemy_9:MovieClip;
public var sfxr2:MovieClip;
public var enemy_7:MovieClip;
public var stinger3D:Stinger3D;
public var rosa:MovieClip;
public var :Boolean;
public var :MovieClip;
public var :Boolean;
public var
:MovieClip;
public var :uint;
public var
:int;
public var n1:MovieClip;
public var n2:MovieClip;
public var n3:MovieClip;
public var n5:MovieClip;
public var n6:MovieClip;
public var n7:MovieClip;
public var lo:MovieClip;
public var :uint;
public var :Number;
public var :Array;
public var n4:MovieClip;
public var oi1:MovieClip;
public var oi2:MovieClip;
public var oi3:MovieClip;
public var oi5:MovieClip;
public var mm:MovieClip;
public var :Number;
public var :Boolean;
public var oi4:MovieClip;
public var :BitmapData;
public var :Number;
public var :uint;
public var :uint;
public var :uint;
public var ball:MovieClip;
public var
:ContextMenuItem;
public var :ContextMenuItem;
public var landing:MovieClip;
public var :Array;
public var :Array;
public var :Array;
public var enemy_10:MovieClip;
public var enemy_11:MovieClip;
public var enemy_15:MovieClip;
public var enemy_12:MovieClip;
public var enemy_16:MovieClip;
public var enemy_13:MovieClip;
public var :Number;
public var ballo:MovieClip;
public var enemy_14:MovieClip;
public var plans:MovieClip;
public var :Number;
public var :int;
public var ty:Number;
public var :Array;
public var :int;
public var :Boolean;
public var btn_no:SimpleButton;
public var sensitivity:Number;
public var :Number;
public var tx:Number;
public var :Number;
public var :Array;
public var
:Bitmap;
public var pu1:MovieClip;
public var name_ass:TextField;
public var pu3:MovieClip;
public var
:MovieClip;
public var pu2:MovieClip;
public var time_out:TextField;
public var
:String;
public var plat2:MovieClip;
public var plat3:MovieClip;
public var outs:TextField;
public var outm:TextField;
public var lll:MovieClip;
public var
:Number;
public var time:uint;
public var
:MovieClip;
public var fat:MovieClip;
public var ball_la1:MovieClip;
public var ball_la3:MovieClip;
public var ball_la2:MovieClip;
public var :uint;
public var plat:MovieClip;
public var hh1:MovieClip;
public var :uint;
public var hh2:MovieClip;
public var gaga:MovieClip;
public var :Array;
public var
:uint;
public var :MovieClip;
public var
:int;
public var :Boolean;
public var :MovieClip;
public var :Boolean;
public var btn_leap:SimpleButton;
public var menu_btn:SimpleButton;
public var :Array;
public var :int;
public var playButton:MovieClip;
public var :uint;
public var
:Array;
public var :Array;
public var
:Array;
public var :Array;
public var loader_img_d:MovieClip;
public var :uint;
public var
:Boolean;
public var flare:MovieClip;
public var ba1:MovieClip;
public var ba2:MovieClip;
public var ba3:MovieClip;
public var ba4:MovieClip;
public var
:Array;
public var
:Array;
public var
:Array;
private static var GAME_NAMES:Array = ["Vector TD2", "Headcase", "Insurgo", "Jetboost", "Linegolfer", "Good Ol' Poker", "Polarity", "Pow Pool", "Streetball Jam", "Slipstream", "GP Team Challenge", "Hockey Face-Off", "Candystand Baseball", "Flash Circle TD", "Gemworks", "Monster Trucks", "RC Rally Reloaded", "Roaring Waves", "Spherez", "Ultimate Raceway"];
private static var GAME_LINKS:Array = ["http://www.candystand.com/play.do?id=18281", "http://www.candystand.com/play.do?id=18252", "http://www.candystand.com/play.do?id=18303", "http://www.candystand.com/play.do?id=18189", "http://www.candystand.com/play.do?id=18253", "http://www.candystand.com/play.do?id=18316", "http://www.candystand.com/play.do?id=17986", "http://www.candystand.com/play.do?id=18201", "http://www.candystand.com/play.do?id=18309", "http://www.candystand.com/play.do?id=18290", "http://www.candystand.com/play.do?id=18049", "http://www.candystand.com/play.do?id=18209", "http://www.candystand.com/play.do?id=18210", "http://www.candystand.com/play.do?id=17995", "http://www.candystand.com/play.do?id=18317", "http://www.candystand.com/play.do?id=17974", "http://www.candystand.com/play.do?id=18193", "http://www.candystand.com/play.do?id=18286", "http://www.candystand.com/play.do?id=17994", "http://www.candystand.com/play.do?id=18254"];
private static var GAME_ID:Number = 18351;
public function candystand_3d_stinger_example():void{
addFrameScript(0, frame1, 1, , 2, , 4, , 5,
, 6, , 11, frame12, 13, , 29, , 30, , 31, frame32, 32,
, 33,
, 34, , 35,
, 36, frame37, 37, , 38, , 39, , 40, , 41, , 42,
, 43, , 44, , 45, , 46, , 47, , 48, , 49, , 50, , 51, , 97, );
this.stop();
this.playButton.tabEnabled = false;
this.loaderInfo.addEventListener(ProgressEvent.PROGRESS, this. , false, 0, true);
this.loaderInfo.addEventListener(Event.COMPLETE, this., false, 0, true);
this.playButton.visible = false;
this.playButton.gotoAndStop(1);
this.playButton.buttonText.text = "PLEASE WAIT...";
this.stinger3D.addEventListener(StartEvent.START, this., false, 0, true);
this.stinger3D.(GAME_NAMES, GAME_LINKS, GAME_ID);
this.stinger3D.addEventListener(Event.COMPLETE, this., false, 0, true);
}
public function (_arg1:Event):void{
if (
.close_this){
= false;
= false;
.removeEventListener(Event.ENTER_FRAME, );
.addEventListener(Event.ENTER_FRAME, );
removeChild(DisplayObject(
));
plat.play();
stage.focus = stage;
};
}
private function
(_arg1:MouseEvent):void{
Tweener.addTween(_arg1.target, {scaleX:1.45, scaleY:1.45, time:0.5, transition:"easeOutExpo"});
}
public function (_arg1:Event){
= ((stage.loaderInfo.bytesLoaded / stage.loaderInfo.bytesTotal) * 100);
ret.text = (int(
) + "%");
if (
> 99){
if ( >= 20){
_arg1.target.removeEventListener(Event.ENTER_FRAME, );
play();
} else {
++;
};
};
bar.scaleX = (
/ 100);
++;
if (int(
) != int()){
= (( / 70) * (100 -
));
= 0;
};
= ( + (( - ) / 70));
= int();
= int(( / 60));
if ( >= 10){
outm.text = ( + "");
} else {
if ( < 1){
outm.text = "00";
} else {
outm.text = (("0" + ) + "");
};
};
if (( - ( * 60)) >= 10){
outs.text = (( - ( * 60)) + "");
} else {
outs.text = (("0" + ( - ( * 60))) + "");
};
=
;
}
function (){
}
function frame1(){
MochiBot.track(this, "04b46192");
}
function (){
stop();
= new ContextMenu();
= new ContextMenuItem("Visit \"insaneangelstudio.com\".");
= new ContextMenuItem("More Free games Candystand");
.hideBuiltInItems();
.customItems.push(
);
.customItems.push();
this.contextMenu = ;
.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, );
.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, );
= 0;
= 0;
= 0;
= 0;
= 0;
= 0;
= new MovieClip();
.addEventListener(Event.ENTER_FRAME, );
}
function (){
sensitivity = 1;
}
function (){
sensitivity = 1;
= 16;
= 17;
points = 0;
}
public function
(_arg1:Array, _arg2:Boolean):void{
var _local3:uint;
_local3 = 0;
while (_local3 < _arg1.length) {
if (250 > Math.sqrt((Math.pow((_arg1[_local3].x - ball.x), 2) + Math.pow((_arg1[_local3].y - ball.y), 2)))){
_arg1[_local3].rotation = (Math.atan2((ball.y - _arg1[_local3].y), (ball.x - _arg1[_local3].x)) / (Math.PI / 180));
if (_arg2){
= new bullet();
.x = (_arg1[_local3].x + (Math.cos((_arg1[_local3].rotation * (Math.PI / 180))) * 14));
.y = (_arg1[_local3].y + (Math.sin((_arg1[_local3].rotation * (Math.PI / 180))) * 14));
.rotation = _arg1[_local3].rotation;
addChild(
);
++;
.push(
);
sfxr.gotoAndPlay("shoot");
};
};
_local3++;
};
}
public function ():void{
ball.colors.gotoAndStop(1);
if ( ){
trace("wts");
= false;
};
ball.visible = false;
= true;
= ball.x;
= ball.y;
ball.x = ball_land.x;
ball.y = ball_land.y;
tx = 0;
ty = 0;
(, false, true);
shoot = false;
}
function (){
MochiAd.showPreGameAd({clip:root, id:"cf3d6cbf459d8480", res:"550x400"});
}
function
(){
stage.quality = "MEDIUM";
sensitivity = 1;
}
function frame32(){
= new Array(b4, b3, b2, b1);
= ;
= new Array(plat);
time = 90;
();
}
private function (_arg1:Event=null):void{
var _local2:*;
var _local3:*;
_local2 = this.playButton.scaleX;
_local3 = this.playButton.scaleY;
this.playButton.scaleX = 0;
this.playButton.scaleY = 0;
Tweener.addTween(this.playButton, {scaleX:_local2, scaleY:_local3, time:1});
this.playButton.visible = true;
}
function
(){
= new Array(ba1, ba2, ba3, ba4);
= new Array(ba1, ba2, ba3, ba4);
= new Array(plat);
= new Array();
= new Array();
= new Array();
= new Array();
= new Array(ball_la1, ball_la2, ball_la3);
= true;
= 1;
time = 120;
();
}
function (){
= 30;
clickie.visible = false;
btn_no.visible = false;
btn_no.addEventListener(MouseEvent.CLICK, );
menu_btn.addEventListener(MouseEvent.CLICK, );
clickie.addEventListener(MouseEvent.CLICK,
);
= new Array(b1);
= new Array(b1);
= new Array(plat);
= new Array();
= new Array();
= new Array();
= new Array();
= new Array();
= new Array();
= new Array();
= new Array();
time = 60;
= false;
btn_leap.addEventListener(MouseEvent.CLICK, );
= false;
= true;
= new MovieClip();
.addEventListener(Event.ENTER_FRAME, );
tx = 0;
ty = 0;
= 0;
= 0;
= 0;
= new Array();
= new Array();
= new Array();
i = 0;
a = 0;
u = 0;
= new MovieClip();
= new MovieClip();
= ;
= 0;
= 0;
= 0;
shoot = true;
= 12;
= ( * Math.cos((45 * (Math.PI / 180))));
= new Array();
= 1;
time = 120;
= 0;
= 0;
be = 1;
= false;
= false;
= new MovieClip();
screen = new MovieClip();
= new BitmapData(550, 400, true);
= new BlurFilter(3, 3, 1);
= new Array();
= new MovieClip();
= new Array(0x0100);
= false;
= 0;
= new Array();
= 0;
= new MovieClip();
= false;
= false;
= setInterval(, 1000);
i = 0;
while (i < .length) {
[i] = false;
i++;
};
stage.addEventListener(KeyboardEvent.KEY_DOWN, );
stage.addEventListener(KeyboardEvent.KEY_UP, );
stop();
}
function (){
= new Array(b2, b1);
= ;
= new Array(plat);
time = 120;
();
trace( );
}
function (){
= new Array(hh1, hh2);
= new Array();
= ;
= new Array(plat);
= new Array();
= new Array();
= new Array();
= new Array();
= new Array();
= new Array(turret_1, turret_2, turret_3, turret_4);
= new Array(100, 100, 100, 100);
time = 120;
();
}
function frame37(){
= new Array(b1, b2, b3, b4, b5, b6, b7);
= new Array();
= ;
= new Array(plat);
= new Array();
= new Array();
= new Array();
= new Array();
= new Array();
time = 150;
();
}
function (){
= new Array(b1, b2);
= new Array();
= ;
= new Array(plat);
= new Array();
= new Array(fans1, fans2);
= new Array();
= new Array();
= new Array(ball_la1);
= new Array(turret_1);
= new Array(250);
= true;
= 2;
time = 150;
();
}
function
(){
= new Array(b2, b4);
= ;
= new Array(plat);
time = 100;
();
}
function
(){
= new Array(b1, b2, b3, b4, b5);
= new Array();
= ;
= new Array(plat);
= new Array();
= new Array();
= new Array();
= new Array();
= new Array();
= new Array();
= new Array();
time = 60;
();
}
function (){
= new Array(b1, b2, b3, b4, b5, b6);
= new Array();
= ;
= new Array(plat);
= new Array();
= new Array();
= new Array();
= new Array();
= new Array();
= new Array();
= new Array();
time = 150;
();
}
function
(){
= new Array(b2, b3, b1);
= ;
= new Array(plat);
time = 120;
();
= true;
= 6;
}
function (){
= new Array(b1, b2, b3, b4, b5);
= new Array();
= ;
= new Array(plat);
= new Array();
= new Array();
= new Array();
= new Array();
= new Array();
= new Array();
= new Array(enemy_1);
= true;
= 5;
time = 150;
();
}
function frame12(){
stop();
}
function (){
= new Array(pu1, pu2, pu3);
= new Array();
= ;
= new Array(plat);
= new Array();
= new Array();
= new Array();
= new Array();
= new Array();
= new Array();
= new Array(enemy_1, enemy_2, enemy_3);
time = 120;
();
}
function (){
= new Array(b1, b2, b3, b4, b5, b6);
= new Array();
= new Array(b1, b2, b3, b4, b5, b6);
= new Array(plat2);
= new Array();
= new Array();
= new Array();
= new Array();
= new Array();
= new Array();
time = 140;
();
}
function (){
= new Array(oi1, oi2, oi3, oi4, oi5);
= new Array();
= ;
= new Array(plat);
= new Array();
= new Array();
= new Array();
= new Array();
= new Array();
= new Array();
= new Array();
time = 180;
();
}
function (){
= new Array(b1, b2, b3, b4);
= new Array();
= ;
= new Array(plat, rosa);
= new Array();
= new Array();
= new Array();
= new Array();
= new Array();
= new Array(rosa);
= new Array(170);
= new Array();
= true;
= 3;
time = 150;
();
}
function (){
= new Array(b1, b2, b3, b4, b5);
= new Array();
= ;
= new Array(plat);
= new Array();
= new Array();
= new Array();
= new Array();
= new Array();
= new Array();
= new Array();
time = 180;
();
}
function (){
= new Array(n1, n2, n3, n4, n5, n6, n7);
= new Array();
= new Array(n1, n2, n3, n4, n5, n6, n7);
= new Array(plat3);
= new Array();
= new Array();
= new Array();
= new Array();
= new Array();
= new Array(ball_la1);
time = 150;
();
}
function (){
= new Array(b1, b5, b7);
= new Array();
= new Array(b1, b5, b7);
= new Array(plat);
= new Array();
= new Array();
= new Array();
= new Array();
= new Array();
= new Array();
= new Array(enemy_1, enemy_2, enemy_3, enemy_4, enemy_5, enemy_6, enemy_7, enemy_8, enemy_9, enemy_10, enemy_11, enemy_12, enemy_13, enemy_14, enemy_15, enemy_16);
time = 60;
();
}
function (){
= new Array(b1, b2);
= ;
= new Array(plat);
= new Array(fans2);
= new Array();
= new Array(fans1);
= new Array(fans3, fans4);
= true;
= 7;
time = 120;
();
}
function (){
= new Array(b1, b2, b3, b4);
= new Array();
= ;
= new Array(plat);
= new Array();
= new Array();
= new Array();
= new Array();
= new Array(ball_la1);
= new Array(rosa);
= new Array(700, 310, 170, 170);
= new Array(rosa);
= true;
= 4;
time = 310;
();
}
function (){
}
public function (_arg1:uint):void{
= true;
.removeEventListener(Event.ENTER_FRAME, );
.addEventListener(Event.ENTER_FRAME, );
= new mesage_output();
.x = 275;
.y = 200;
.mm.gotoAndStop(_arg1);
addChild(
);
lll.gotoAndStop(1);
plat.stop();
}
public function ():void{
if ((((currentFrame >= 30)) && ((currentFrame <= 55)))){
if ((((((mm.currentFrame == 1)) && (!()))) && (!()))){
time--;
= int((time / 60));
= (time - ( * 60));
if (time > 3000){
time_out.text = "0:0";
} else {
if ( < 10){
time_out.text = (( + ":0") + );
} else {
time_out.text = (( + ":") + );
};
};
};
};
}
function (){
mm.visible = false;
}
private function (_arg1:MouseEvent):void{
this.stinger3D.destroy();
this.init();
}
private function init():void{
this.gotoAndStop("main");
}
function (){
gotoAndStop(12);
}
public function (_arg1:ContextMenuEvent):void{
navigateToURL(new URLRequest("http://www.candystand.com/index.do?vgid=18351"), "_blank");
}
private function (_arg1:Event):void{
this.playButton.gotoAndStop(2);
this.playButton.buttonText.text = "PLAY OFF-BALANCE";
this.playButton.buttonText.mouseEnabled = false;
this.playButton.buttonMode = false;
this.playButton.buttonText.mouseEnabled = false;
this.playButton.buttonMode = true;
this.playButton.mouseEnabled = true;
this.playButton.addEventListener(MouseEvent.ROLL_OVER, , false, 0, true);
this.playButton.addEventListener(MouseEvent.ROLL_OUT,
, false, 0, true);
this.playButton.addEventListener(MouseEvent.CLICK, , false, 0, true);
}
public function (_arg1:ContextMenuEvent):void{
navigateToURL(new URLRequest("http://www.insaneangelstudio.com"), "_blank");
}
public function (_arg1:Array, _arg2:Array, _arg3:Number, _arg4:Number):void{
var _local5:uint;
var _local6:uint;
var _local7:uint;
_local5 = 0;
while (_local5 < _arg1.length) {
if (((((((((((((((_arg1[_local5].hitTestPoint((ball.x + ), (ball.y + ), true)) || (_arg1[_local5].hitTestPoint((ball.x - ), (ball.y - ), true)))) || (_arg1[_local5].hitTestPoint((ball.x + ), (ball.y - ), true)))) || (_arg1[_local5].hitTestPoint((ball.x - ), (ball.y + ), true)))) || (_arg1[_local5].hitTestPoint((ball.x - ), ball.y, true)))) || (_arg1[_local5].hitTestPoint((ball.x + ), ball.y, true)))) || (_arg1[_local5].hitTestPoint(ball.x, (ball.y - ), true)))) || (_arg1[_local5].hitTestPoint(ball.x, (ball.y + ), true)))){
_local6 = 0;
while (_local6 < 7) {
_local7 = 0;
while (_local7 < _arg2.length) {
if (_arg2[_local7].currentFrame == 2){
.splice(_local7, 1);
};
_local7++;
};
_local6++;
};
trace();
_arg3 = ball_land.x;
_arg4 = ball_land.y;
ball_land.x = _arg1[_local5].x;
ball_land.y = _arg1[_local5].y;
flare.gotoAndPlay("sq");
_arg1[_local5].x = _arg3;
_arg1[_local5].y = _arg4;
};
_local5++;
};
}
public function (_arg1:Event):void{
_arg1.target.alpha = (_arg1.target.alpha - 0.05);
_arg1.target.x = (_arg1.target.x - 4);
_arg1.target.width = (_arg1.target.width + 8);
_arg1.target.y = (_arg1.target.y + 4);
_arg1.target.height = (_arg1.target.height - 8);
if (
== 90){
= 0;
.visible = false;
removeEventListener(Event.ENTER_FRAME, );
= new MovieClip();
} else {
++;
};
}
public function ():void{
ball_land.x = landing.x;
ball_land.y = landing.y;
ball.x = ball_land.x;
ball.y = ball_land.y;
plans.prevFrame();
}
public function (_arg1:MouseEvent):void{
_arg1.target.removeEventListener(MouseEvent.CLICK, );
}
public function (_arg1:Array, _arg2:Boolean, _arg3:Boolean):void{
var _local4:uint;
_local4 = 0;
while (_local4 < _arg1.length) {
if (_arg2){
if (((((((((((((((_arg1[_local4].hitTestPoint((ball.x + ), (ball.y + ), true)) || (_arg1[_local4].hitTestPoint((ball.x - ), (ball.y - ), true)))) || (_arg1[_local4].hitTestPoint((ball.x + ), (ball.y - ), true)))) || (_arg1[_local4].hitTestPoint((ball.x - ), (ball.y + ), true)))) || (_arg1[_local4].hitTestPoint((ball.x - ), ball.y, true)))) || (_arg1[_local4].hitTestPoint((ball.x + ), ball.y, true)))) || (_arg1[_local4].hitTestPoint(ball.x, (ball.y - ), true)))) || (_arg1[_local4].hitTestPoint(ball.x, (ball.y + ), true)))){
if (_arg1[_local4].currentFrame != 2){
_arg1[_local4].gotoAndStop(2);
flare.gotoAndPlay("blue");
sfxr2.gotoAndPlay(("be" + be));
be++;
};
};
} else {
if (_arg1[_local4].currentFrame == 2){
_arg1[_local4].gotoAndStop(3);
if (_arg3){
be = 1;
a = 0;
while (a < 31) {
= new tracer();
.x = _arg1[_local4].x;
.y = _arg1[_local4].y;
.scaleY = ((Math.random() * 0.7) + 0.0001);
.scaleX = .scaleY;
.gotoAndPlay(int(((Math.random() * 50) + 1)));
.rotation = (Math.random() * 360);
.pok_x = ((Math.random() * 2) - 1);
.pok_y = ((Math.random() * 2) - 1);
.ll.gotoAndStop(2);
++;
addChild();
.push();
a++;
};
};
};
};
_local4++;
};
}
public function (_arg1:MouseEvent){
clickie.visible = true;
btn_no.visible = true;
menu_btn.visible = false;
}
private function (_arg1:ProgressEvent):void{
var _local2:int;
_local2 = Math.floor(((_arg1.bytesLoaded / _arg1.bytesTotal) * 100));
this.playButton.buttonText.text = (("LOADING " + _local2) + "%");
}
private function (_arg1:Event=null):void{
var _local2:Class;
var _local3:Sound;
_local2 = (getDefinitionByName("cs_audio") as Class);
_local3 = new (_local2);
this. = _local3.play(0);
}
public function ():void{
if (currentFrame == 51){
.removeEventListener(Event.ENTER_FRAME, );
clearInterval(
);
= new Array();
= new Array();
= new Array();
= new Array();
= new Array();
= new Array();
= new Array();
= new Array();
= new Array();
= new Array();
= new Array();
stage.removeEventListener(KeyboardEvent.KEY_DOWN, );
stage.removeEventListener(KeyboardEvent.KEY_UP, );
name_ass.text = "anon";
};
}
public function
(_arg1:MouseEvent):void{
points = 0;
= 0;
.addEventListener(Event.ENTER_FRAME, );
i = 0;
while (i < ) {
removeChild(DisplayObject(
[i]));
.splice(i, 1);
--;
i++;
};
i = 0;
while (i < ) {
removeChild(DisplayObject([i]));
.splice(i, 1);
--;
i++;
};
i = 0;
while (i <
) {
removeChild(DisplayObject([i]));
i++;
};
.removeEventListener(Event.ENTER_FRAME, );
stage.removeEventListener(KeyboardEvent.KEY_DOWN, );
stage.removeEventListener(KeyboardEvent.KEY_UP, );
clearInterval(
);
gotoAndStop(12);
clickie.removeEventListener(MouseEvent.CLICK,
);
}
private function (_arg1:MouseEvent):void{
Tweener.addTween(_arg1.target, {scaleX:1.75, scaleY:1.75, time:0.5, transition:"easeOutExpo"});
}
public function (_arg1:MouseEvent){
clickie.visible = false;
btn_no.visible = false;
menu_btn.visible = true;
}
public function (_arg1:Array):Boolean{
var _local2:Boolean;
var _local3:uint;
_local2 = false;
_local3 = 0;
while (_local3 < _arg1.length) {
if (((((((((((((((_arg1[_local3].hitTestPoint((ball.x + ), (ball.y + ), true)) || (_arg1[_local3].hitTestPoint((ball.x - ), (ball.y - ), true)))) || (_arg1[_local3].hitTestPoint((ball.x + ), (ball.y - ), true)))) || (_arg1[_local3].hitTestPoint((ball.x - ), (ball.y + ), true)))) || (_arg1[_local3].hitTestPoint((ball.x - ), ball.y, true)))) || (_arg1[_local3].hitTestPoint((ball.x + ), ball.y, true)))) || (_arg1[_local3].hitTestPoint(ball.x, (ball.y - ), true)))) || (_arg1[_local3].hitTestPoint(ball.x, (ball.y + ), true)))){
_local2 = true;
};
_local3++;
};
return (_local2);
}
public function (_arg1:KeyboardEvent):void{
if (((!([32])) && ((_arg1.keyCode == 32)))){
if (){
= false;
.addEventListener(Event.ENTER_FRAME, );
removeChild(DisplayObject(
));
[0].play();
} else {
if ((((mm.currentFrame == 1)) && (!()))){
.removeEventListener(Event.ENTER_FRAME, );
lll.gotoAndStop(1);
= new asd();
.x = 275;
.y = 200;
addChild(
);
= true;
[0].stop();
} else {
f_pause.play();
};
};
};
[_arg1.keyCode] = true;
}
public function (_arg1:KeyboardEvent):void{
[_arg1.keyCode] = false;
}
public function (_arg1:Event):void{
();
if (mm.currentFrame == 80){
if (){
= time;
points = (points +
);
f_pause.up.scoring.text = ("+ " +
);
f_pause.up.play();
trace(time);
} else {
f_pause.up.scoring.text = "+ 0";
f_pause.up.play();
};
point_out.text = String(points);
trace(("POINTS " + points));
ball.fat.gotoAndStop(1);
ball.fat.x = 0;
ball.fat.y = 0;
ball.fat.rotation = 0;
gotoAndStop((( - 1) + 30));
tx = 0;
ty = 0;
shoot = false;
mm.nextFrame();
mm.play();
};
if ([]){
if (plans.currentFrame != 4){
tx = 0;
ty = 0;
if (()){
tx = -0.5;
ty = 0;
ball.x = (ball.x - 0.3);
};
if ((
)){
tx = 0.5;
ty = 0;
ball.x = (ball.x + 0.3);
};
if (()){
ty = -0.5;
tx = 0;
ball.y = (ball.y - 0.3);
};
if ((
)){
ty = 0.5;
tx = 0;
ball.y = (ball.y + 0.3);
};
if (){
= false;
ball.fat.aaa.gotoAndStop(2);
};
} else {
if (){
= false;
ball.fat.aaa.gotoAndStop(3);
};
};
} else {
if (!){
= true;
plans.nextFrame();
ball.fat.aaa.gotoAndStop(1);
};
if (()){
tx = (tx - 0.1);
ty = (ty + ((0 - ty) / 42));
ball.x = (ball.x - 0.3);
};
if ((
)){
tx = (tx + 0.1);
ty = (ty + ((0 - ty) / 42));
ball.x = (ball.x + 0.3);
};
if (()){
ty = (ty - 0.1);
tx = (tx + ((0 - tx) / 42));
ball.y = (ball.y - 0.3);
};
if ((
)){
ty = (ty + 0.1);
tx = (tx + ((0 - tx) / 42));
ball.y = (ball.y + 0.3);
};
};
i = 0;
while (i < .length) {
if (![i].changed){
if ([i].sleep){
[i].y = ([i].y + (([i].ypos - [i].y) / 7));
[i].x = ([i].x + (([i].xpos - [i].x) / 7));
u = 0;
while (u < 3) {
[i].point_x = ([i].point_x + Math.cos(Math.atan2((ball.y - [i].point_y), (ball.x - [i].point_x))));
[i].point_y = ([i].point_y + Math.sin(Math.atan2((ball.y - [i].point_y), (ball.x - [i].point_x))));
a = 0;
while (a < .length) {
if ([a].hitTestPoint([i].point_x, [i].point_y, true)){
[i].point_x = [i].x;
[i].point_y = [i].y;
};
if (Math.sqrt((Math.pow((ball.y - [i].point_y), 2) + Math.pow((ball.x - [i].point_x), 2))) < 14){
if (((((((([i].y < ([i].ypos + 1))) && (([i].y > ([i].ypos - 1))))) && (([i].x > ([i].xpos - 1))))) && (([i].x < ([i].xpos + 1))))){
[i].sleep = false;
};
[i].face_mc.gotoAndStop(2);
};
a++;
};
u++;
};
} else {
[i].x = ([i].x + (Math.cos(Math.atan2((ball.y - [i].y), (ball.x - [i].x))) * 0.7));
[i].y = ([i].y + (Math.sin(Math.atan2((ball.y - [i].y), (ball.x - [i].x))) * 0.7));
a = 0;
while (a < .length) {
if ((((Math.sqrt((Math.pow(([a].y - [i].y), 2) + Math.pow(([a].x - [i].x), 2))) < 25)) && (!([a].sleep)))){
[i].x = ([i].x - (Math.cos(Math.atan2(([a].y - [i].y), ([a].x - [i].x))) * 0.2));
[i].y = ([i].y - (Math.sin(Math.atan2(([a].y - [i].y), ([a].x - [i].x))) * 0.2));
};
a++;
};
[i].face_mc.x = ((ball.x - [i].x) / 31);
[i].face_mc.y = ((ball.y - [i].y) / 31);
[i].face_mc.rotation = [i].face_mc.x;
if ((((Math.sqrt((Math.pow((ball.y - [i].y), 2) + Math.pow((ball.x - [i].x), 2))) < 25)) || (!(shoot)))){
if (((((!([i].sleep)) && (shoot))) && (ball.visible))){
();
};
[i].point_x = [i].x;
[i].point_y = [i].y;
[i].sleep = true;
[i].face_mc.gotoAndStop(1);
[i].face_mc.x = 0;
[i].face_mc.y = 0;
[i].face_mc.rotation = 0;
};
};
};
i++;
};
if (shoot){
if ( == 140){
= 0;
(, true);
} else {
++;
};
};
if (mm.currentFrame == 80){
if (){
= time;
points = (points +
);
f_pause.up.scoring.text = ("+ " +
);
f_pause.up.play();
trace(time);
} else {
f_pause.up.scoring.text = "+ 0";
f_pause.up.play();
};
point_out.text = String(points);
trace(("POINTS " + points));
ball.fat.gotoAndStop(1);
ball.fat.x = 0;
ball.fat.y = 0;
ball.fat.rotation = 0;
gotoAndStop((( - 1) + 30));
tx = 0;
ty = 0;
shoot = false;
mm.nextFrame();
mm.play();
};
if (
){
sfxr.gotoAndPlay(1);
= false;
flare.gotoAndPlay("white");
ball.fat.x = 0;
ball.fat.y = 0;
= new eyes();
.x = ;
.y = ;
++;
addChild();
.push();
a = 0;
while (a < 31) {
= new tracer();
.x = ;
.y = ;
.scaleY = ((Math.random() * 1.4) + 0.0001);
.scaleX = .scaleY;
.gotoAndPlay(int(((Math.random() * 50) + 1)));
.rotation = (Math.random() * 360);
.pok_x = (((Math.random() * 2) - 1) + ((ball_land.x - .x) / 170));
.pok_y = (((Math.random() * 2) - 1) + ((ball_land.y - .y) / 170));
.ll.gotoAndStop(1);
++;
addChild();
.push();
a++;
};
a = 0;
while (a < 17) {
= new rec();
.x = (((Math.random() * 700) - 350) + 275);
.y = (((Math.random() * 700) - 350) + 200);
.scaleY = ((Math.random() * 4) + 0.0001);
.scaleX = .scaleY;
.rotation = (Math.random() * 360);
++;
addChild();
.push();
a++;
};
= new kio();
.x = ball_land.x;
.y = ball_land.y;
++;
addChild();
.push();
= new eyes();
.x = ;
.y = ;
++;
addChild();
.push();
};
i = 0;
while (i < ) {
if (currentFrame < 55){
[i].x = (
[i].x + (
[i].pok_x * 1.5));
[i].y = (
[i].y + (
[i].pok_y * 1.5));
[i].scaleY = (
[i].scaleY + 0.001);
[i].scaleX = (
[i].scaleX + 0.001);
if (
[i].currentFrame > 50){
removeChild(DisplayObject(
[i]));
.splice(i, 1);
--;
};
};
i++;
};
i = 0;
while (i < ) {
[i].x = ([i].x + ((ball_land.x - [i].x) / 12));
[i].y = ([i].y + ((ball_land.y - [i].y) / 12));
if ([i].currentFrame >= 97){
removeChild(DisplayObject([i]));
.splice(i, 1);
--;
ball_land.gotoAndPlay(2);
};
i++;
};
i = 0;
while (i <
) {
if ([i].currentFrame >= 97){
removeChild(DisplayObject([i]));
.splice(i, 1);
--;
};
i++;
};
if (! ){
if ( != 0){
if (!shoot){
= true;
};
i = 0;
while (i < ) {
if (
[i].currentFrame == 1){
[i].y = (
[i].y + (2 * Math.sin((
[i].rotation * (Math.PI / 180)))));
[i].x = (
[i].x + (2 * Math.cos((
[i].rotation * (Math.PI / 180)))));
if (int(31) > Math.sqrt((Math.pow((
[i].x - ball.x), 2) + Math.pow((
[i].y - ball.y), 2)))){
removeChild(DisplayObject(
[i]));
.splice(i, 1);
--;
();
shoot = false;
} else {
a = 0;
while (a < .length) {
if ([a].hitTestPoint((
[i].x + (Math.cos((
[i].rotation * (Math.PI / 180))) * 4)), (
[i].y + (Math.sin((
[i].rotation * (Math.PI / 180))) * 4)), true)){
removeChild(DisplayObject(
[i]));
.splice(i, 1);
--;
sfxr2.gotoAndPlay("shooted");
};
a++;
};
};
};
i++;
};
};
} else {
if ( != 0){
i = 0;
while (i < ) {
removeChild(DisplayObject(
[i]));
i++;
};
= new Array();
= 0;
};
= false;
};
if (shoot){
= (Math.sqrt((Math.pow((mouseX - 275), 2) + Math.pow((mouseY - 200), 2))) / (1700 * 1.01));
tx = (tx + (Math.cos(((lo.rotation - 90) * (Math.PI / 180))) * ));
ty = (ty + (Math.sin(((lo.rotation - 90) * (Math.PI / 180))) * ));
if (! ){
if (tx > 1.2){
tx = 1.2;
};
if (tx < -1.2){
tx = -1.2;
};
if (ty > 1.2){
ty = 1.2;
};
if (ty < -1.2){
ty = -1.2;
};
} else {
if (){
= new reco();
.x = ball.x;
.y = ball.y;
.rotation = (Math.random() * 360);
.tetas.gotoAndStop(ball.colors.a.currentFrame);
++;
addChild();
.push();
= false;
} else {
= true;
};
};
speed.scaleY = (Math.sqrt((Math.pow(tx, 2) + Math.pow(ty, 2))) / 1.7);
if (speed.scaleY > 0.84){
if (lll.currentFrame != 2){
lll.gotoAndStop(2);
};
} else {
lll.gotoAndStop(1);
};
ball.x = (ball.x + tx);
ball.y = (ball.y + ty);
ball.fat.x = (tx * 4);
ball.fat.rotation = (tx * 14);
ball.fat.y = (ty * 4);
} else {
++;
if ( > 90){
if (){
= false;
();
};
= 0;
shoot = true;
= true;
ball.visible = true;
};
x = (x + ((0 - x) / 24));
y = (y + ((0 - y) / 24));
scaleX = (scaleX + ((1 - scaleX) / 24));
scaleY = (scaleY + ((1 - scaleY) / 24));
};
if (((()) && (shoot))){
ball.colors.gotoAndStop(1);
[] = false;
= false;
ball.visible = false;
= true;
= ball.x;
= ball.y;
ball.x = ball_land.x;
ball.y = ball_land.y;
tx = 0;
ty = 0;
(, false, true);
shoot = false;
};
if ([]){
if (plans.currentFrame != 4){
if (! ){
= true;
ball.colors.gotoAndStop(2);
tx = (Math.cos(((lo.rotation - 90) * (Math.PI / 180))) * 2);
ty = (Math.sin(((lo.rotation - 90) * (Math.PI / 180))) * 2);
plans.nextFrame();
};
};
} else {
if ( ){
ball.colors.gotoAndStop(1);
= false;
};
};
( , , 0, 0);
(, true, false);
lo.rotation = ((Math.atan2((mouseY - 200), (mouseX - 275)) / (Math.PI / 180)) + 90);
lo.gotoAndStop(int(Math.sqrt((Math.pow((mouseX - 275), 2) + Math.pow((mouseY - 200), 2)))));
();
}
public function (_arg1:MouseEvent):void{
= true;
}
public function
(_arg1:Array):void{
var _local2:uint;
var _local3:uint;
if (shoot){
if ((((time <= 0)) || ((time > 3000)))){
= false;
be = 1;
mm.thin.gotoAndStop();
= ;
mm.gotoAndPlay(2);
mm.point_out.text = String(( + 1));
shoot = false;
= -100;
ball.fat.gotoAndStop(3);
++;
= new Array();
= new Array();
= new Array();
= new Array();
= new Array();
= new Array();
= new Array();
(
, false, false);
= true;
};
if (){
= false;
= false;
be = 1;
mm.thin.gotoAndStop();
= ;
mm.gotoAndPlay(2);
mm.point_out.text = String(( + 1));
shoot = false;
= -100;
ball.fat.gotoAndStop(3);
++;
= new Array();
= new Array();
= new Array();
= new Array();
= new Array();
= new Array();
= new Array();
(
, false, false);
= true;
trace( );
};
_local2 = 0;
_local3 = 0;
while (_local3 < _arg1.length) {
if (_arg1[_local3].currentFrame == 2){
_local2++;
};
_local3++;
};
if (_local2 == _arg1.length){
_local3 = 0;
while (_local3 < .length) {
[_local3].play();
[_local3].changed = true;
_local3++;
};
= true;
be = 1;
mm.thin.gotoAndStop();
= ;
mm.gotoAndPlay(2);
mm.point_out.text = String(( + 1));
shoot = false;
= -100;
ball.fat.gotoAndStop(2);
++;
= new Array();
= new Array();
= new Array();
= new Array();
= new Array();
= new Array();
= new Array();
(
, false, false);
= true;
};
};
}
}
}//package
Section 109
//cs_audio (cs_audio)
package {
import flash.media.*;
public dynamic class cs_audio extends Sound {
}
}//package
Section 110
//CSSet1Image0 (CSSet1Image0)
package {
import flash.display.*;
public dynamic class CSSet1Image0 extends BitmapData {
public function CSSet1Image0(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 111
//CSSet1Image1 (CSSet1Image1)
package {
import flash.display.*;
public dynamic class CSSet1Image1 extends BitmapData {
public function CSSet1Image1(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 112
//CSSet1Image10 (CSSet1Image10)
package {
import flash.display.*;
public dynamic class CSSet1Image10 extends BitmapData {
public function CSSet1Image10(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 113
//CSSet1Image11 (CSSet1Image11)
package {
import flash.display.*;
public dynamic class CSSet1Image11 extends BitmapData {
public function CSSet1Image11(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 114
//CSSet1Image12 (CSSet1Image12)
package {
import flash.display.*;
public dynamic class CSSet1Image12 extends BitmapData {
public function CSSet1Image12(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 115
//CSSet1Image13 (CSSet1Image13)
package {
import flash.display.*;
public dynamic class CSSet1Image13 extends BitmapData {
public function CSSet1Image13(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 116
//CSSet1Image14 (CSSet1Image14)
package {
import flash.display.*;
public dynamic class CSSet1Image14 extends BitmapData {
public function CSSet1Image14(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 117
//CSSet1Image15 (CSSet1Image15)
package {
import flash.display.*;
public dynamic class CSSet1Image15 extends BitmapData {
public function CSSet1Image15(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 118
//CSSet1Image16 (CSSet1Image16)
package {
import flash.display.*;
public dynamic class CSSet1Image16 extends BitmapData {
public function CSSet1Image16(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 119
//CSSet1Image17 (CSSet1Image17)
package {
import flash.display.*;
public dynamic class CSSet1Image17 extends BitmapData {
public function CSSet1Image17(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 120
//CSSet1Image18 (CSSet1Image18)
package {
import flash.display.*;
public dynamic class CSSet1Image18 extends BitmapData {
public function CSSet1Image18(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 121
//CSSet1Image19 (CSSet1Image19)
package {
import flash.display.*;
public dynamic class CSSet1Image19 extends BitmapData {
public function CSSet1Image19(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 122
//CSSet1Image2 (CSSet1Image2)
package {
import flash.display.*;
public dynamic class CSSet1Image2 extends BitmapData {
public function CSSet1Image2(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 123
//CSSet1Image3 (CSSet1Image3)
package {
import flash.display.*;
public dynamic class CSSet1Image3 extends BitmapData {
public function CSSet1Image3(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 124
//CSSet1Image4 (CSSet1Image4)
package {
import flash.display.*;
public dynamic class CSSet1Image4 extends BitmapData {
public function CSSet1Image4(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 125
//CSSet1Image5 (CSSet1Image5)
package {
import flash.display.*;
public dynamic class CSSet1Image5 extends BitmapData {
public function CSSet1Image5(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 126
//CSSet1Image6 (CSSet1Image6)
package {
import flash.display.*;
public dynamic class CSSet1Image6 extends BitmapData {
public function CSSet1Image6(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 127
//CSSet1Image7 (CSSet1Image7)
package {
import flash.display.*;
public dynamic class CSSet1Image7 extends BitmapData {
public function CSSet1Image7(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 128
//CSSet1Image8 (CSSet1Image8)
package {
import flash.display.*;
public dynamic class CSSet1Image8 extends BitmapData {
public function CSSet1Image8(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 129
//CSSet1Image9 (CSSet1Image9)
package {
import flash.display.*;
public dynamic class CSSet1Image9 extends BitmapData {
public function CSSet1Image9(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 130
//eyes (eyes)
package {
import flash.display.*;
public dynamic class eyes extends MovieClip {
public function eyes(){
addFrameScript(154, );
}
function (){
stop();
}
}
}//package
Section 131
//kio (kio)
package {
import flash.display.*;
public dynamic class kio extends MovieClip {
public function kio(){
addFrameScript(155, );
}
function (){
stop();
}
}
}//package
Section 132
//mesage_output (mesage_output)
package {
import flash.events.*;
import flash.display.*;
public dynamic class mesage_output extends MovieClip {
public var ok_btn:SimpleButton;
public var close_this:Boolean;
public var mm:MovieClip;
public function mesage_output(){
addFrameScript(0, frame1, 17, );
}
function (){
close_this = true;
stop();
}
function frame1(){
close_this = false;
ok_btn.addEventListener(MouseEvent.CLICK,
);
stop();
}
public function
(_arg1:MouseEvent):void{
play();
}
}
}//package
Section 133
//MochiAd (MochiAd)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
public class MochiAd {
public static function getVersion():String{
return ("2.6");
}
public static function showClickAwayAd(_arg1:Object):void{
var DEFAULTS:Object;
var clip:Object;
var ad_timeout:Number;
var mc:MovieClip;
var wh:Array;
var w:Number;
var h:Number;
var chk:MovieClip;
var sendHostProgress:Boolean;
var options = _arg1;
DEFAULTS = {ad_timeout:2000, regpt:"o", method:"showClickAwayAd", res:"300x250", no_bg:true, ad_started:function ():void{
}, ad_finished:function ():void{
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function ():void{
}};
options = MochiAd._parseOptions(options, DEFAULTS);
clip = options.clip;
ad_timeout = options.ad_timeout;
delete options.ad_timeout;
if (!MochiAd.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
MochiAd._cleanup(mc);
options.ad_finished();
};
wh = MochiAd._getRes(options, clip);
w = wh[0];
h = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
mc.unloadAd = function ():void{
MochiAd.unload(clip);
};
mc.adLoaded = options.ad_loaded;
mc.adSkipped = options.ad_skipped;
mc.rpc = function (_arg1:Number, _arg2:Object):void{
MochiAd.rpc(clip, _arg1, _arg2);
};
sendHostProgress = false;
mc.regContLC = function (_arg1:String):void{
mc._containerLCName = _arg1;
};
chk["onEnterFrame"] = function ():void{
var _local1:Object;
var _local2:Number;
var _local3:Boolean;
var _local4:Number;
if (!this.parent){
delete this.onEnterFrame;
return;
};
_local1 = this.parent._mochiad_ctr;
_local2 = (getTimer() - this.started);
_local3 = false;
if (!chk.showing){
_local4 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local4 > 0){
chk.showing = true;
_local3 = true;
chk.started = getTimer();
} else {
if (_local2 > chk.ad_timeout){
options.ad_failed();
_local3 = true;
};
};
};
if (this.root == null){
_local3 = true;
};
if (_local3){
delete this.onEnterFrame;
};
};
doOnEnterFrame(chk);
}
public static function _isNetworkAvailable():Boolean{
return (!((Security.sandboxType == "localWithFile")));
}
public static function _allowDomains(_arg1:String):String{
var _local2:String;
_local2 = _arg1.split("/")[2].split(":")[0];
Security.allowDomain("*");
Security.allowDomain(_local2);
Security.allowInsecureDomain("*");
Security.allowInsecureDomain(_local2);
return (_local2);
}
public static function unload(_arg1:Object):Boolean{
if (((_arg1.clip) && (_arg1.clip._mochiad))){
_arg1 = _arg1.clip;
};
if (_arg1.origFrameRate != undefined){
_arg1.stage.frameRate = _arg1.origFrameRate;
};
if (!_arg1._mochiad){
return (false);
};
if (_arg1._mochiad._containerLCName != undefined){
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "notify", {id:"unload"});
};
if (_arg1._mochiad.onUnload){
_arg1._mochiad.onUnload();
};
delete _arg1._mochiad_loaded;
delete _arg1._mochiad;
return (true);
}
public static function showInterLevelAd(_arg1:Object):void{
var DEFAULTS:Object;
var clip:Object;
var ad_msec:Number;
var ad_timeout:Number;
var fadeout_time:Number;
var mc:MovieClip;
var wh:Array;
var w:Number;
var h:Number;
var chk:MovieClip;
var options = _arg1;
DEFAULTS = {ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function ():void{
if ((this.clip is MovieClip)){
this.clip.stop();
} else {
throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_finished:function ():void{
if ((this.clip is MovieClip)){
this.clip.play();
} else {
throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function ():void{
}};
options = MochiAd._parseOptions(options, DEFAULTS);
clip = options.clip;
ad_msec = 11000;
ad_timeout = options.ad_timeout;
delete options.ad_timeout;
fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
MochiAd._cleanup(mc);
options.ad_finished();
};
wh = MochiAd._getRes(options, clip);
w = wh[0];
h = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.ad_msec = ad_msec;
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function ():void{
var _local1:Number;
if (!this.parent){
delete this.onEnterFrame;
delete this.fadeFunction;
return;
};
_local1 = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (_local1 > 0){
this.parent.alpha = (_local1 * 0.01);
} else {
MochiAd.unload(clip);
delete this["onEnterFrame"];
};
};
mc.unloadAd = function ():void{
MochiAd.unload(clip);
};
mc.adLoaded = options.ad_loaded;
mc.adSkipped = options.ad_skipped;
mc.adjustProgress = function (_arg1:Number):void{
var _local2:Object;
_local2 = mc._mochiad_wait;
_local2.server_control = true;
_local2.showing = true;
_local2.started = getTimer();
_local2.ad_msec = (_arg1 - 250);
};
mc.rpc = function (_arg1:Number, _arg2:Object):void{
MochiAd.rpc(clip, _arg1, _arg2);
};
chk["onEnterFrame"] = function ():void{
var _local1:Object;
var _local2:Number;
var _local3:Boolean;
var _local4:Number;
if (!this.parent){
delete this.onEnterFrame;
delete this.fadeFunction;
return;
};
_local1 = this.parent._mochiad_ctr;
_local2 = (getTimer() - this.started);
_local3 = false;
if (!chk.showing){
_local4 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local4 > 0){
chk.showing = true;
chk.started = getTimer();
MochiAd.adShowing(clip);
} else {
if (_local2 > chk.ad_timeout){
options.ad_failed();
_local3 = true;
};
};
};
if (_local2 > chk.ad_msec){
_local3 = true;
};
if (_local3){
if (this.server_control){
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
};
};
};
doOnEnterFrame(chk);
}
public static function _parseOptions(_arg1:Object, _arg2:Object):Object{
var _local3:Object;
var _local4:String;
var _local5:Array;
var _local6:Number;
var _local7:Array;
_local3 = {};
for (_local4 in _arg2) {
_local3[_local4] = _arg2[_local4];
};
if (_arg1){
for (_local4 in _arg1) {
_local3[_local4] = _arg1[_local4];
};
};
if (_local3.clip == undefined){
throw (new Error("MochiAd is missing the 'clip' parameter. This should be a MovieClip, Sprite or an instance of a class that extends MovieClip or Sprite."));
};
_arg1 = _local3.clip.loaderInfo.parameters.mochiad_options;
if (_arg1){
_local5 = _arg1.split("&");
_local6 = 0;
while (_local6 < _local5.length) {
_local7 = _local5[_local6].split("=");
_local3[unescape(_local7[0])] = unescape(_local7[1]);
_local6++;
};
};
if (_local3.id == "test"){
trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!");
};
return (_local3);
}
public static function _cleanup(_arg1:Object):void{
var idx:Number;
var k:String;
var lc:LocalConnection;
var f:Function;
var mc = _arg1;
if (("lc" in mc)){
lc = mc.lc;
f = function ():void{
try {
lc.client = null;
lc.close();
} catch(e:Error) {
};
};
setTimeout(f, 0);
};
idx = DisplayObjectContainer(mc).numChildren;
while (idx > 0) {
idx = (idx - 1);
DisplayObjectContainer(mc).removeChildAt(idx);
};
for (k in mc) {
delete mc[k];
};
}
public static function load(_arg1:Object):MovieClip{
var DEFAULTS:Object;
var clip:Object;
var depth:Number;
var mc:MovieClip;
var wh:Array;
var lv:URLVariables;
var k:String;
var server:String;
var hostname:String;
var lc:LocalConnection;
var name:String;
var loader:Loader;
var g:Function;
var req:URLRequest;
var v:Object;
var options = _arg1;
DEFAULTS = {server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = MochiAd._parseOptions(options, DEFAULTS);
options.swfv = 9;
options.mav = MochiAd.getVersion();
clip = options.clip;
if (!MochiAd._isNetworkAvailable()){
return (null);
};
try {
if (clip._mochiad_loaded){
return (null);
};
} catch(e:Error) {
throw (new Error("MochiAd requires a clip that is an instance of a dynamic class. If your class extends Sprite or MovieClip, you must make it dynamic."));
};
depth = options.depth;
delete options.depth;
mc = createEmptyMovieClip(clip, "_mochiad", depth);
wh = MochiAd._getRes(options, clip);
options.res = ((wh[0] + "x") + wh[1]);
options.server = (options.server + options.id);
delete options.id;
clip._mochiad_loaded = true;
if (clip.loaderInfo.loaderURL.indexOf("http") == 0){
options.as3_swf = clip.loaderInfo.loaderURL;
};
lv = new URLVariables();
for (k in options) {
v = options[k];
if (!(v is Function)){
lv[k] = v;
};
};
server = lv.server;
delete lv.server;
hostname = _allowDomains(server);
lc = new LocalConnection();
lc.client = mc;
name = ["", Math.floor(new Date().getTime()), Math.floor((Math.random() * 999999))].join("_");
lc.allowDomain("*", "localhost");
lc.allowInsecureDomain("*", "localhost");
lc.connect(name);
mc.lc = lc;
mc.lcName = name;
lv.lc = name;
lv.st = getTimer();
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"));
req.contentType = "application/x-www-form-urlencoded";
req.method = URLRequestMethod.POST;
req.data = lv;
loader.load(req);
mc.addChild(loader);
mc._mochiad_ctr = loader;
return (mc);
}
public static function runMethod(_arg1:Object, _arg2:String, _arg3:Array):Object{
var _local4:Array;
var _local5:Number;
_local4 = _arg2.split(".");
_local5 = 0;
while (_local5 < (_local4.length - 1)) {
if ((((_arg1[_local4[_local5]] == undefined)) || ((_arg1[_local4[_local5]] == null)))){
return (undefined);
};
_arg1 = _arg1[_local4[_local5]];
_local5++;
};
if (typeof(_arg1[_local4[_local5]]) == "function"){
return (_arg1[_local4[_local5]].apply(_arg1, _arg3));
};
return (undefined);
}
public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number):MovieClip{
var _local4:MovieClip;
_local4 = new MovieClip();
if (((false) && (_arg3))){
_arg1.addChildAt(_local4, _arg3);
} else {
_arg1.addChild(_local4);
};
_arg1[_arg2] = _local4;
_local4["_name"] = _arg2;
return (_local4);
}
public static function _getRes(_arg1:Object, _arg2:Object):Array{
var _local3:Object;
var _local4:Number;
var _local5:Number;
var _local6:Array;
_local3 = _arg2.getBounds(_arg2.root);
_local4 = 0;
_local5 = 0;
if (typeof(_arg1.res) != "undefined"){
_local6 = _arg1.res.split("x");
_local4 = parseFloat(_local6[0]);
_local5 = parseFloat(_local6[1]);
} else {
_local4 = (_local3.xMax - _local3.xMin);
_local5 = (_local3.yMax - _local3.yMin);
};
if ((((_local4 == 0)) || ((_local5 == 0)))){
_local4 = _arg2.stage.stageWidth;
_local5 = _arg2.stage.stageHeight;
};
return ([_local4, _local5]);
}
public static function adShowing(_arg1:Object):void{
_arg1.origFrameRate = _arg1.stage.frameRate;
_arg1.stage.frameRate = 30;
}
public static function getValue(_arg1:Object, _arg2:String):Object{
var _local3:Array;
var _local4:Number;
_local3 = _arg2.split(".");
_local4 = 0;
while (_local4 < (_local3.length - 1)) {
if ((((_arg1[_local3[_local4]] == undefined)) || ((_arg1[_local3[_local4]] == null)))){
return (undefined);
};
_arg1 = _arg1[_local3[_local4]];
_local4++;
};
return (_arg1[_local3[_local4]]);
}
public static function rpc(_arg1:Object, _arg2:Number, _arg3:Object):void{
var _local4:Object;
var _local5:Object;
switch (_arg3.id){
case "setValue":
MochiAd.setValue(_arg1, _arg3.objectName, _arg3.value);
break;
case "getValue":
_local4 = MochiAd.getValue(_arg1, _arg3.objectName);
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "rpcResult", _arg2, _local4);
break;
case "runMethod":
_local5 = MochiAd.runMethod(_arg1, _arg3.method, _arg3.args);
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "rpcResult", _arg2, _local5);
break;
default:
trace(("[mochiads rpc] unknown rpc id: " + _arg3.id));
};
}
public static function setValue(_arg1:Object, _arg2:String, _arg3:Object):void{
var _local4:Array;
var _local5:Number;
_local4 = _arg2.split(".");
_local5 = 0;
while (_local5 < (_local4.length - 1)) {
if ((((_arg1[_local4[_local5]] == undefined)) || ((_arg1[_local4[_local5]] == null)))){
return;
};
_arg1 = _arg1[_local4[_local5]];
_local5++;
};
_arg1[_local4[_local5]] = _arg3;
}
public static function showPreGameAd(_arg1:Object):void{
var DEFAULTS:Object;
var clip:Object;
var ad_msec:Number;
var ad_timeout:Number;
var fadeout_time:Number;
var mc:MovieClip;
var wh:Array;
var w:Number;
var h:Number;
var chk:MovieClip;
var bar:MovieClip;
var bar_color:Number;
var bar_background:Number;
var bar_outline:Number;
var backing_mc:MovieClip;
var backing:Object;
var inside_mc:MovieClip;
var inside:Object;
var outline_mc:MovieClip;
var outline:Object;
var complete:Boolean;
var unloaded:Boolean;
var f:Function;
var sendHostProgress:Boolean;
var fn:Function;
var r:MovieClip;
var options = _arg1;
DEFAULTS = {ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:0xFF8A00, background:16777161, outline:13994812, no_progress_bar:false, ad_started:function ():void{
if ((this.clip is MovieClip)){
this.clip.stop();
} else {
throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_finished:function ():void{
if ((this.clip is MovieClip)){
this.clip.play();
} else {
throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function ():void{
}, ad_progress:function (_arg1:Number):void{
}};
options = MochiAd._parseOptions(options, DEFAULTS);
if ("c862232051e0a94e1c3609b3916ddb17".substr(0) == "dfeada81ac97cde83665f81c12da7def"){
options.ad_started();
fn = function ():void{
options.ad_finished();
};
setTimeout(fn, 100);
return;
};
clip = options.clip;
ad_msec = 11000;
ad_timeout = options.ad_timeout;
delete options.ad_timeout;
fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
var fn:Function;
MochiAd._cleanup(mc);
fn = function ():void{
options.ad_finished();
};
setTimeout(fn, 100);
};
wh = MochiAd._getRes(options, clip);
w = wh[0];
h = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.x = (w * -0.5);
chk.y = (h * -0.5);
bar = createEmptyMovieClip(chk, "_mochiad_bar", 4);
if (options.no_progress_bar){
bar.visible = false;
delete options.no_progress_bar;
} else {
bar.x = 10;
bar.y = (h - 20);
};
bar_color = options.color;
delete options.color;
bar_background = options.background;
delete options.background;
bar_outline = options.outline;
delete options.outline;
backing_mc = createEmptyMovieClip(bar, "_outline", 1);
backing = backing_mc.graphics;
backing.beginFill(bar_background);
backing.moveTo(0, 0);
backing.lineTo((w - 20), 0);
backing.lineTo((w - 20), 10);
backing.lineTo(0, 10);
backing.lineTo(0, 0);
backing.endFill();
inside_mc = createEmptyMovieClip(bar, "_inside", 2);
inside = inside_mc.graphics;
inside.beginFill(bar_color);
inside.moveTo(0, 0);
inside.lineTo((w - 20), 0);
inside.lineTo((w - 20), 10);
inside.lineTo(0, 10);
inside.lineTo(0, 0);
inside.endFill();
inside_mc.scaleX = 0;
outline_mc = createEmptyMovieClip(bar, "_outline", 3);
outline = outline_mc.graphics;
outline.lineStyle(0, bar_outline, 100);
outline.moveTo(0, 0);
outline.lineTo((w - 20), 0);
outline.lineTo((w - 20), 10);
outline.lineTo(0, 10);
outline.lineTo(0, 0);
chk.ad_msec = ad_msec;
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function ():void{
var _local1:Number;
_local1 = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (_local1 > 0){
this.parent.alpha = (_local1 * 0.01);
} else {
MochiAd.unload(clip);
delete this["onEnterFrame"];
};
};
complete = false;
unloaded = false;
f = function (_arg1:Event):void{
_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;
_local2 = mc._mochiad_wait;
_local2.server_control = true;
_local2.showing = true;
_local2.started = getTimer();
_local2.ad_msec = _arg1;
};
mc.rpc = function (_arg1:Number, _arg2:Object):void{
MochiAd.rpc(clip, _arg1, _arg2);
};
mc.rpcTestFn = function (_arg1:String):Object{
trace(("[MOCHIAD rpcTestFn] " + _arg1));
return (_arg1);
};
mc.regContLC = function (_arg1:String):void{
mc._containerLCName = _arg1;
};
sendHostProgress = false;
mc.sendHostLoadProgress = function (_arg1:String):void{
sendHostProgress = true;
};
chk["onEnterFrame"] = function ():void{
var _local1:Object;
var _local2:Object;
var _local3:Number;
var _local4:Boolean;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Object;
var _local10:Number;
var _local11:Number;
if (((!(this.parent)) || (!(this.parent.parent)))){
delete this["onEnterFrame"];
return;
};
_local1 = this.parent.parent.root;
_local2 = this.parent._mochiad_ctr;
_local3 = (getTimer() - this.started);
_local4 = false;
_local5 = _local1.loaderInfo.bytesTotal;
_local6 = _local1.loaderInfo.bytesLoaded;
if (complete){
_local6 = Math.max(1, _local6);
_local5 = _local6;
};
_local7 = ((100 * _local6) / _local5);
_local8 = ((100 * _local3) / chk.ad_msec);
_local9 = this._mochiad_bar._inside;
_local10 = Math.min(100, Math.min(((_local7) || (0)), _local8));
_local10 = Math.max(this.last_pcnt, _local10);
this.last_pcnt = _local10;
_local9.scaleX = (_local10 * 0.01);
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 f:Function;
var mc = _arg1;
f = function (_arg1:Object):void{
if (((("onEnterFrame" in mc)) && (mc.onEnterFrame))){
mc.onEnterFrame();
} else {
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
};
};
mc.addEventListener(Event.ENTER_FRAME, f);
}
}
}//package
Section 134
//MochiBot (MochiBot)
package {
import flash.display.*;
import flash.net.*;
import flash.system.*;
public dynamic class MochiBot extends Sprite {
public static function track(_arg1:Sprite, _arg2:String):MochiBot{
var _local3:MochiBot;
var _local4:String;
var _local5:URLVariables;
var _local6:String;
var _local7:URLRequest;
var _local8:Loader;
if (Security.sandboxType == "localWithFile"){
return (null);
};
_local3 = new (MochiBot);
_arg1.addChild(_local3);
Security.allowDomain("*");
Security.allowInsecureDomain("*");
_local4 = "http://core.mochibot.com/my/core.swf";
_local5 = new URLVariables();
_local5["sb"] = Security.sandboxType;
_local5["v"] = Capabilities.version;
_local5["swfid"] = _arg2;
_local5["mv"] = "8";
_local5["fv"] = "9";
_local6 = _local3.root.loaderInfo.loaderURL;
if (_local6.indexOf("http") == 0){
_local5["url"] = _local6;
} else {
_local5["url"] = "local";
};
_local7 = new URLRequest(_local4);
_local7.contentType = "application/x-www-form-urlencoded";
_local7.method = URLRequestMethod.POST;
_local7.data = _local5;
_local8 = new Loader();
_local3.addChild(_local8);
_local8.load(_local7);
return (_local3);
}
}
}//package
Section 135
//PlaneLabel (PlaneLabel)
package {
import flash.display.*;
import flash.text.*;
public dynamic class PlaneLabel extends MovieClip {
public var labelText:TextField;
}
}//package
Section 136
//rec (rec)
package {
import flash.display.*;
public dynamic class rec extends MovieClip {
public function rec(){
addFrameScript(161, );
}
function (){
stop();
}
}
}//package
Section 137
//reco (reco)
package {
import flash.display.*;
public dynamic class reco extends MovieClip {
public var tetas:MovieClip;
public function reco(){
addFrameScript(140, );
}
function (){
stop();
}
}
}//package
Section 138
//tracer (tracer)
package {
import flash.display.*;
public dynamic class tracer extends MovieClip {
public var pok_x:Number;
public var pok_y:Number;
public var ll:MovieClip;
public function tracer(){
addFrameScript(0, frame1, 70, );
}
function (){
stop();
}
function frame1(){
}
}
}//package