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

swfchan turned sixteen years old yesterday! (5may2024)

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

1432289803996-0.swf

This is the info page for
Flash #192392

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


ActionScript [AS3]
Section 1
//KongregateEvent (com.kongregate.as3.client.events.KongregateEvent) package com.kongregate.as3.client.events { import flash.events.*; public class KongregateEvent extends Event { public static const COMPLETE:String = "component_api_available"; public function KongregateEvent(_arg1:String){ super(_arg1); } } }//package com.kongregate.as3.client.events
Section 2
//AbstractShadowService (com.kongregate.as3.client.services.AbstractShadowService) package com.kongregate.as3.client.services { import flash.events.*; public class AbstractShadowService extends EventDispatcher { protected function alert(_arg1:String, _arg2:String, _arg3="", _arg4:String=""):void{ trace(((((((("Kongregate API: " + _arg1) + ".") + _arg2) + "(") + _arg3) + ") ") + _arg4)); } } }//package com.kongregate.as3.client.services
Section 3
//HighScoreServiceShadow (com.kongregate.as3.client.services.HighScoreServiceShadow) package com.kongregate.as3.client.services { public class HighScoreServiceShadow extends AbstractShadowService implements IHighScoreServices { private var mode:String; public function HighScoreServiceShadow(){ mode = ""; } public function submit(_arg1:Number, _arg2:String=null):void{ alert("IHighScoreServices", "submit", arguments); } public function connect():Boolean{ alert("IKongregateServices", "connect"); return (true); } public function requestList(_arg1:Function):void{ alert("IHighScoreServices", "requestList", "", (("[Mode: " + mode) + "]")); _arg1({success:false}); } public function setMode(_arg1:String):void{ alert("IHighScoreServices", "setMode", arguments); this.mode = _arg1; } } }//package com.kongregate.as3.client.services
Section 4
//IHighScoreServices (com.kongregate.as3.client.services.IHighScoreServices) package com.kongregate.as3.client.services { public interface IHighScoreServices { function setMode(_arg1:String):void; function submit(_arg1:Number, _arg2:String=null):void; function requestList(_arg1:Function):void; } }//package com.kongregate.as3.client.services
Section 5
//IKongregateServices (com.kongregate.as3.client.services.IKongregateServices) package com.kongregate.as3.client.services { import flash.events.*; public interface IKongregateServices extends IEventDispatcher { function getPlayerInfo(_arg1:Function):void; function connect(_arg1:Number=-1):Boolean; } }//package com.kongregate.as3.client.services
Section 6
//IStatServices (com.kongregate.as3.client.services.IStatServices) package com.kongregate.as3.client.services { public interface IStatServices { function submitArray(_arg1:Array):void; function submit(_arg1:String, _arg2:Number):void; } }//package com.kongregate.as3.client.services
Section 7
//IUserServices (com.kongregate.as3.client.services.IUserServices) package com.kongregate.as3.client.services { public interface IUserServices { function getName():String; function getPlayerInfo(_arg1:Function):void; } }//package com.kongregate.as3.client.services
Section 8
//KongregateServiceShadow (com.kongregate.as3.client.services.KongregateServiceShadow) package com.kongregate.as3.client.services { public class KongregateServiceShadow extends AbstractShadowService implements IKongregateServices { public function getName():String{ alert("IKongregateServices", "getName"); return ("Guest"); } public function connect(_arg1:Number=-1):Boolean{ alert("IKongregateServices", "connect", arguments); return (true); } public function getPlayerInfo(_arg1:Function):void{ alert("IKongregateServices", "getPlayerInfo"); _arg1(new Object()); } } }//package com.kongregate.as3.client.services
Section 9
//StatServiceShadow (com.kongregate.as3.client.services.StatServiceShadow) package com.kongregate.as3.client.services { public class StatServiceShadow extends AbstractShadowService implements IStatServices { public function submitArray(_arg1:Array):void{ alert("IStatServices", "submitArray", arguments); } public function submit(_arg1:String, _arg2:Number):void{ alert("IStatServices", "submitStat", arguments); } } }//package com.kongregate.as3.client.services
Section 10
//UserServiceShadow (com.kongregate.as3.client.services.UserServiceShadow) package com.kongregate.as3.client.services { public class UserServiceShadow extends AbstractShadowService implements IUserServices { public function getName():String{ alert("UserService", "getName"); return ("Guest"); } public function getPlayerInfo(_arg1:Function):void{ alert("UserService", "getPlayerInfo"); _arg1({isGuest:true, name:"Guest", points:0, level:0, isMode:false, isAdmin:false, isDeveloper:false, avatarPath:"", chatAvatarPath:""}); } } }//package com.kongregate.as3.client.services
Section 11
//IAPIBootstrap (com.kongregate.as3.client.IAPIBootstrap) package com.kongregate.as3.client { import flash.events.*; import flash.display.*; public interface IAPIBootstrap { function init(_arg1:Event=null, _arg2:Stage=null):void; function hideLog():void; function showLog(_arg1:int=0):void; } }//package com.kongregate.as3.client
Section 12
//KongregateAPI (com.kongregate.as3.client.KongregateAPI) package com.kongregate.as3.client { import flash.events.*; import flash.display.*; import com.kongregate.as3.client.services.*; import com.kongregate.as3.client.events.*; import flash.system.*; import flash.net.*; import flash.errors.*; import flash.utils.*; public class KongregateAPI extends Sprite { private const VERSION:Number = 1; private var loader:Loader; private var loadedDomain:ApplicationDomain; private static const CLASS_USER:String = "com.kongregate.as3.client.services.UserServices"; private static const CLASS_STATS:String = "com.kongregate.as3.client.services.StatServices"; private static const CLASS_SERVICES:String = "com.kongregate.as3.client.services.KongregateServices"; private static const CLASS_SCORES:String = "com.kongregate.as3.client.services.HighScoreServices"; private static const DEBUG_API_URL:String = "//Linuxpc/kongregate/public/flash/API_AS3.swf"; private static var _connected:Boolean; private static var kUser:IUserServices; private static var _loaded:Boolean; private static var kServices:IKongregateServices; private static var kScores:IHighScoreServices; private static var mInstance:KongregateAPI; private static var kStats:IStatServices; private static var kAPI:IAPIBootstrap; public function KongregateAPI(){ if (mInstance != null){ throw (new Error("Warning: KongregateAPI has been added to stage more than once or accessed improperly. Use getInstance() or a stage reference to access.")); }; mInstance = this; this.addEventListener(Event.ADDED_TO_STAGE, init, false, 0, true); } public function get loaded():Boolean{ return (_loaded); } public function get connected():Boolean{ return (_connected); } private function alertConnected(_arg1:TimerEvent=null):void{ var _local2:KongregateEvent; var _local3:Boolean; _local2 = new KongregateEvent(KongregateEvent.COMPLETE); _local3 = this.dispatchEvent(_local2); } private function init(_arg1:Event):void{ var _local2:Object; var _local3:String; var _local4:URLRequest; var _local5:LoaderContext; this.removeEventListener(Event.ADDED_TO_STAGE, init); _loaded = false; _connected = false; _local2 = LoaderInfo(root.loaderInfo).parameters; _local3 = _local2.api_path; if (_local3 == null){ trace("Alert: Kongregate API could not be loaded, due to local testing. API will load when the game is uploaded."); createShadowServices(); return; }; Security.allowDomain("*.kongregate.com"); Security.allowDomain("kongregatetrunk.com"); _local4 = new URLRequest(_local3); _local5 = new LoaderContext(false); _local5.applicationDomain = ApplicationDomain.currentDomain; _local5.securityDomain = SecurityDomain.currentDomain; loader = new Loader(); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadComplete); loader.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler); loader.load(_local4, _local5); } public function get api():IAPIBootstrap{ return (kAPI); } private function loadComplete(_arg1:Event):void{ getServices(); } public function get scores():IHighScoreServices{ return (kScores); } private function ioErrorHandler(_arg1:IOErrorEvent):void{ throw (new IOError(("API file not found. " + _arg1))); } public function get services():IKongregateServices{ return (kServices); } public function get stats():IStatServices{ return (kStats); } private function createShadowServices():void{ var _local1:Timer; trace(">>> Kongregate Shadow Services instantiated for local development.."); kServices = new KongregateServiceShadow(); kScores = new HighScoreServiceShadow(); kStats = new StatServiceShadow(); kUser = new UserServiceShadow(); _local1 = new Timer(200, 1); _local1.addEventListener(TimerEvent.TIMER_COMPLETE, alertConnected); _local1.start(); _connected = true; } public function get user():IUserServices{ return (kUser); } private function getServices():void{ var _local1:ApplicationDomain; var _local2:*; var _local3:*; var _local4:*; var _local5:*; _local1 = ApplicationDomain.currentDomain; kAPI = IAPIBootstrap(loader.getChildAt(0)); this.addChild(loader); _local2 = _local1.getDefinition(CLASS_SERVICES); trace(_local2); kServices = _local2.getInstance(); _local3 = _local1.getDefinition(CLASS_SCORES); kScores = _local3.getInstance(); _local4 = _local1.getDefinition(CLASS_STATS); kStats = _local4.getInstance(); _local5 = _local1.getDefinition(CLASS_USER); kUser = _local5.getInstance(); kServices.connect(VERSION); _loaded = true; _connected = true; alertConnected(); } public static function getInstance():KongregateAPI{ if (!mInstance){ throw (new IllegalOperationError("You must add the Kongregate API component to the stage before attempting to access it.")); }; return (mInstance); } } }//package com.kongregate.as3.client
Section 13
//arm_base (arm_base) package { import flash.display.*; public dynamic class arm_base extends MovieClip { } }//package
Section 14
//arm_middle (arm_middle) package { import flash.display.*; public dynamic class arm_middle extends MovieClip { } }//package
Section 15
//Atom (Atom) package { import flash.events.*; import flash.display.*; import flash.geom.*; public class Atom { public var y:int; public var drawX:Number; public var drawY:Number; private var i:int; public var atomType:int;// = 0 public var heldByList:Array; public var x:int; public var links:Array; public var rotation:Number;// = 0 public static const ATOM_SILVER = 11; public static const ATOM_SALT = 0; public static const ATOM_MERCURY = 1; public static const ATOM_COPPER = 10; public static const ATOM_WATER = 5; public static const ATOM_AIR = 6; public static const ATOM_LEAD = 7; public static const ATOM_GOLD = 12; public static const ATOM_TIN = 8; public static const ATOM_FIRE = 3; public static const ATOM_SULFUR = 2; public static const ATOM_IRON = 9; public static const ATOM_EARTH = 4; private static var zbmpSprites:Array = new Array(); private static var mutexArray:Array = new Array(); private static var bmpRotationIndicator:BitmapData = new atom_rotation_indicator(5, 5); private static var spritesLoaded:Boolean = false; public function Atom(){ atomType = ATOM_SALT; rotation = 0; heldByList = new Array(); links = new Array(); super(); if (spritesLoaded == false){ zbmpSprites.push(new atom_salt(23, 23)); zbmpSprites.push(new atom_mercury(23, 23)); zbmpSprites.push(new atom_sulfur(23, 23)); zbmpSprites.push(new atom_fire(23, 23)); zbmpSprites.push(new atom_earth(23, 23)); zbmpSprites.push(new atom_water(23, 23)); zbmpSprites.push(new atom_air(23, 23)); zbmpSprites.push(new atom_lead(23, 23)); zbmpSprites.push(new atom_tin(23, 23)); zbmpSprites.push(new atom_iron(23, 23)); zbmpSprites.push(new atom_copper(23, 23)); zbmpSprites.push(new atom_silver(23, 23)); zbmpSprites.push(new atom_gold(23, 23)); spritesLoaded = true; }; } public function _PropogateSnap(){ var _local1:*; if (!ArrayContains(mutexArray, this)){ mutexArray.push(this); x = int((((drawX + 14) - 178) / 29)); y = int((((drawY + 14) - 22) / 29)); rotation = SnapAngle(ClampAngle(rotation)); i = 0; while (i < links.length) { _local1 = links[i]; if (_local1.atom1 == this){ _local1.atom2._PropogateSnap(); }; if (_local1.atom2 == this){ _local1.atom1._PropogateSnap(); }; i++; }; }; } public function PropogateSnap(){ mutexArray = new Array(); _PropogateSnap(); } public function SnapAngle(_arg1:Number):Number{ if (_arg1 < -45){ return (270); }; if (_arg1 < 45){ return (0); }; if (_arg1 < 135){ return (90); }; if (_arg1 < 225){ return (180); }; if (_arg1 < 315){ return (270); }; return (0); } public function AddHeldBy(_arg1:Manipulator){ mutexArray = new Array(); _AddHeldBy(_arg1); } public function _AddHeldBy(_arg1:Manipulator){ var _local2:*; if (ArrayContains(mutexArray, this)){ return (null); }; mutexArray.push(this); if (!ArrayContains(heldByList, _arg1)){ heldByList.push(_arg1); }; i = 0; while (i < links.length) { _local2 = links[i]; if (_local2.atom1 == this){ _local2.atom2._AddHeldBy(_arg1); }; if (_local2.atom2 == this){ _local2.atom1._AddHeldBy(_arg1); }; i++; }; } public function ArrayContains(_arg1:Array, _arg2:Object):Boolean{ var _local3:int; _local3 = 0; while (_local3 < _arg1.length) { if (_arg1[_local3] == _arg2){ return (true); }; _local3++; }; return (false); } public function Blit(_arg1:BitmapData, _arg2:BitmapData, _arg3:int=0, _arg4:int=0){ _arg1.copyPixels(_arg2, new Rectangle(0, 0, _arg2.width, _arg2.height), new Point(_arg3, _arg4)); } public function MatchesSolutionAtom(_arg1:SolutionAtom):Boolean{ var _local2:*; var _local3:*; if (_arg1.atomType != atomType){ return (false); }; if (_arg1.linkAngle == -1){ return (true); }; i = 0; while (i < links.length) { _local2 = links[i]; _local3 = 0; if (_local2.atom1 == this){ _local3 = ClampAngle((rotation + _local2.linkAngle)); } else { _local3 = ClampAngle(((_local2.atom1.rotation + _local2.linkAngle) + 180)); }; if (SnapAngle(_local3) == _arg1.linkAngle){ return (true); }; i++; }; return (false); } public function _RemoveHeldBy(_arg1:Manipulator){ var _local2:*; if (ArrayContains(mutexArray, this)){ return (null); }; mutexArray.push(this); if (ArrayContains(heldByList, _arg1)){ ArrayRemove(heldByList, _arg1); }; i = 0; while (i < links.length) { _local2 = links[i]; if (_local2.atom1 == this){ _local2.atom2._RemoveHeldBy(_arg1); }; if (_local2.atom2 == this){ _local2.atom1._RemoveHeldBy(_arg1); }; i++; }; } public function Draw(_arg1:BitmapData){ Blit(_arg1, zbmpSprites[atomType], (drawX - 11), (drawY - 11)); } public function PropogatePlacement(){ var _local1:*; mutexArray = new Array(this); i = 0; while (i < links.length) { _local1 = links[i]; if (_local1.atom1 == this){ _local1.atom2._PropogatePlacement(drawX, drawY, rotation, _local1); }; if (_local1.atom2 == this){ _local1.atom1._PropogatePlacement(drawX, drawY, rotation, _local1); }; i++; }; } public function ArrayRemove(_arg1:Array, _arg2:Object){ if (ArrayContains(_arg1, _arg2)){ _arg1.splice(_arg1.indexOf(_arg2), 1); }; } public function _PropogatePlacement(_arg1:int, _arg2:int, _arg3:Number, _arg4:Link){ var _local5:*; var _local6:*; var _local7:*; if (!ArrayContains(mutexArray, this)){ mutexArray.push(this); if (_arg4.atom2 == this){ _local5 = _arg4.linkAngle; _local6 = _arg4.offsetAngle; } else { _local5 = ClampAngle(((_arg4.linkAngle + 180) - _arg4.offsetAngle)); _local6 = -(_arg4.offsetAngle); }; rotation = (_arg3 + _local6); drawX = (_arg1 + (29 * Math.cos(((ClampAngle((_local5 + _arg3)) * Math.PI) / 180)))); drawY = (_arg2 + (29 * Math.sin(((ClampAngle((_local5 + _arg3)) * Math.PI) / 180)))); i = 0; while (i < links.length) { _local7 = links[i]; if (_local7.atom1 == this){ _local7.atom2._PropogatePlacement(drawX, drawY, rotation, _local7); }; if (_local7.atom2 == this){ _local7.atom1._PropogatePlacement(drawX, drawY, rotation, _local7); }; i++; }; }; } public function MoveToLogicalPosition(_arg1:int, _arg2:int){ this.x = _arg1; this.y = _arg2; drawX = (178 + (_arg1 * 29)); drawY = (22 + (_arg2 * 29)); } public function RemoveHeldBy(_arg1:Manipulator){ mutexArray = new Array(); _RemoveHeldBy(_arg1); } public function ClampAngle(_arg1:Number):Number{ while (_arg1 < 0) { _arg1 = (_arg1 + 360); }; while (_arg1 >= 360) { _arg1 = (_arg1 - 360); }; return (_arg1); } } }//package
Section 16
//atom_air (atom_air) package { import flash.display.*; public dynamic class atom_air extends BitmapData { public function atom_air(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 17
//atom_alpha (atom_alpha) package { import flash.display.*; public dynamic class atom_alpha extends BitmapData { public function atom_alpha(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 18
//atom_backfill (atom_backfill) package { import flash.display.*; public dynamic class atom_backfill extends BitmapData { public function atom_backfill(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 19
//atom_copper (atom_copper) package { import flash.display.*; public dynamic class atom_copper extends BitmapData { public function atom_copper(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 20
//atom_earth (atom_earth) package { import flash.display.*; public dynamic class atom_earth extends BitmapData { public function atom_earth(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 21
//atom_fire (atom_fire) package { import flash.display.*; public dynamic class atom_fire extends BitmapData { public function atom_fire(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 22
//atom_gold (atom_gold) package { import flash.display.*; public dynamic class atom_gold extends BitmapData { public function atom_gold(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 23
//atom_indicator (atom_indicator) package { import flash.display.*; public dynamic class atom_indicator extends BitmapData { public function atom_indicator(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 24
//atom_iron (atom_iron) package { import flash.display.*; public dynamic class atom_iron extends BitmapData { public function atom_iron(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 25
//atom_lead (atom_lead) package { import flash.display.*; public dynamic class atom_lead extends BitmapData { public function atom_lead(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 26
//atom_mercury (atom_mercury) package { import flash.display.*; public dynamic class atom_mercury extends BitmapData { public function atom_mercury(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 27
//atom_rotation_indicator (atom_rotation_indicator) package { import flash.display.*; public dynamic class atom_rotation_indicator extends BitmapData { public function atom_rotation_indicator(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 28
//atom_salt (atom_salt) package { import flash.display.*; public dynamic class atom_salt extends BitmapData { public function atom_salt(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 29
//atom_silver (atom_silver) package { import flash.display.*; public dynamic class atom_silver extends BitmapData { public function atom_silver(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 30
//atom_sulfur (atom_sulfur) package { import flash.display.*; public dynamic class atom_sulfur extends BitmapData { public function atom_sulfur(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 31
//atom_tin (atom_tin) package { import flash.display.*; public dynamic class atom_tin extends BitmapData { public function atom_tin(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 32
//atom_water (atom_water) package { import flash.display.*; public dynamic class atom_water extends BitmapData { public function atom_water(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 33
//AtomListState (AtomListState) package { import flash.events.*; import flash.display.*; import flash.geom.*; public class AtomListState extends State { private var clickList:Array; private var bmpBackground:BitmapData; public function AtomListState(_arg1:StateMachine){ bmpBackground = new img_info2(640, 480); clickList = new Array(new ClickRegion(new Rectangle(30, 454, 41, 21), "back")); super(_arg1); } override public function OnMouseDown(_arg1:MouseEvent){ var _local2:*; _local2 = ClickRegion.HitTest(clickList, _arg1.stageX, _arg1.stageY); switch (_local2){ case "back": _SM.ChangeState("HelpState"); break; }; } override public function OnRenderAtEnter(_arg1:BitmapData){ _SM.Blit(_arg1, bmpBackground); } } }//package
Section 34
//buttons_design (buttons_design) package { import flash.display.*; public dynamic class buttons_design extends BitmapData { public function buttons_design(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 35
//buttons_simulation (buttons_simulation) package { import flash.display.*; public dynamic class buttons_simulation extends BitmapData { public function buttons_simulation(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 36
//ClickRegion (ClickRegion) package { import flash.events.*; import flash.display.*; import flash.geom.*; public class ClickRegion { public var rect:Rectangle; public var key:String; public function ClickRegion(_arg1:Rectangle, _arg2:String){ this.rect = _arg1; this.key = _arg2; } public static function HitTestDelta(_arg1:Array, _arg2:int, _arg3:int):Point{ var _local4:int; _local4 = 0; while (_local4 < _arg1.length) { if (_arg1[_local4].rect.contains(_arg2, _arg3)){ return (new Point((_arg2 - _arg1[_local4].rect.left), (_arg3 - _arg1[_local4].rect.top))); }; _local4++; }; return (null); } public static function HitTest(_arg1:Array, _arg2:int, _arg3:int):String{ var _local4:int; _local4 = 0; while (_local4 < _arg1.length) { if (_arg1[_local4].rect.contains(_arg2, _arg3)){ return (_arg1[_local4].key); }; _local4++; }; return (null); } } }//package
Section 37
//CollisionState (CollisionState) package { import flash.events.*; import flash.display.*; import flash.geom.*; public class CollisionState extends State { private var bmpIndicator:BitmapData; private var bmpPopup:BitmapData; public function CollisionState(_arg1:StateMachine){ bmpPopup = new popup_collision(640, 480); bmpIndicator = new atom_indicator(23, 23); super(_arg1); } override public function OnMouseDown(_arg1:MouseEvent){ if ((((((((_arg1.stageX > 36)) && ((_arg1.stageY > 315)))) && ((_arg1.stageX < 111)))) && ((_arg1.stageY < 329)))){ _SM.ChangeState("DesignState"); }; } override public function OnRenderAtEnter(_arg1:BitmapData){ var _local2:*; var _local3:*; _SM.Blit(_arg1, bmpPopup); _local2 = 0; while (_local2 < _SM.collisionPoints.length) { _local3 = _SM.collisionPoints[_local2]; _SM.Blit(_arg1, bmpIndicator, (_local3.x - 11), (_local3.y - 11)); _local2++; }; } } }//package
Section 38
//Component (Component) package { import flash.display.*; import flash.geom.*; public class Component { public var contextHelp:String;// = "" public var y:int;// = 0 public var drawX:int;// = 0 public var drawY:int;// = 0 public var length:Number;// = 0 public var x:int;// = 0 protected var _SM:StateMachine;// = null public var pickable:Boolean;// = true public var rotation:Number;// = 0 public function Component(_arg1:StateMachine){ drawX = 0; drawY = 0; x = 0; y = 0; rotation = 0; length = 0; pickable = true; _SM = null; contextHelp = ""; super(); _SM = _arg1; } public function Deconstructor(){ } public function SolidBoundingBox():Rectangle{ return (null); } public function DoEndAction(){ } public function DoAction(){ } public function Serialize():String{ return (""); } public function Blit(_arg1:BitmapData, _arg2:BitmapData, _arg3:int=0, _arg4:int=0){ _arg1.copyPixels(_arg2, new Rectangle(0, 0, _arg2.width, _arg2.height), new Point(_arg3, _arg4)); } public function ArrayRemove(_arg1:Array, _arg2:Object){ if (ArrayContains(_arg1, _arg2)){ _arg1.splice(_arg1.indexOf(_arg2), 1); }; } public function Draw(_arg1:BitmapData, _arg2:Boolean=false){ } public function HitTest(_arg1:int, _arg2:int):Boolean{ return (false); } public function Place(_arg1:int, _arg2:int):Boolean{ return (false); } public function Update(_arg1:Number){ } public function DoGrabAction(){ } public function Reset(){ } protected function _Place(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int=0, _arg6:int=0, _arg7:int=14, _arg8:int=14):Boolean{ var _local9:int; var _local10:int; _local9 = ((((_arg1 + _arg3) + 14) - 178) / 29); _local10 = ((((_arg2 + _arg4) + 14) - 22) / 29); if ((((((((_local9 >= _arg5)) && ((_local9 <= _arg7)))) && ((_local10 >= _arg6)))) && ((_local10 <= _arg8)))){ this.x = _local9; this.y = _local10; this.drawX = (((_local9 * 29) + 178) - _arg3); this.drawY = (((_local10 * 29) + 22) - _arg4); return (true); }; return (false); } public function ArrayContains(_arg1:Array, _arg2:Object):Boolean{ var _local3:int; _local3 = 0; while (_local3 < _arg1.length) { if (_arg1[_local3] == _arg2){ return (true); }; _local3++; }; return (false); } } }//package
Section 39
//DesignState (DesignState) package { import flash.events.*; import flash.display.*; import flash.geom.*; public class DesignState extends State { private var clkMenu:Array; private var clkMenuMoreComponents:Array; private var bmpBackground:BitmapData; private var mouseY:int; private var zbmpSymbols:Array; private var mouseX:int; private var clkMenuComponents:Array; private var dragString:String;// = null private var bmpMenuProgrammingArm:BitmapData; private var zbmpMenus:Array; private var i:int; private var clkSymbols:Array; private var bmpButtons:BitmapData; public function DesignState(_arg1:StateMachine){ zbmpMenus = new Array(new menu_components(640, 480), new menu_morecomponents(640, 480), new menu_programming(640, 480)); bmpMenuProgrammingArm = new menu_programming_selection(640, 480); bmpBackground = new img_background(640, 480); bmpButtons = new buttons_design(640, 480); zbmpSymbols = new Array(); dragString = null; clkMenu = new Array(new ClickRegion(new Rectangle(24, 5, 96, 10), "components"), new ClickRegion(new Rectangle(13, 16, 115, 11), "morecomponents"), new ClickRegion(new Rectangle(23, 28, 96, 12), "programming"), new ClickRegion(new Rectangle(6, 432, 43, 21), "save"), new ClickRegion(new Rectangle(52, 432, 38, 21), "load"), new ClickRegion(new Rectangle(92, 432, 46, 21), "run"), new ClickRegion(new Rectangle(72, 455, 43, 19), "quit"), new ClickRegion(new Rectangle(30, 455, 40, 19), "help")); clkMenuComponents = new Array(new ClickRegion(new Rectangle(14, 89, 118, 31), "manipulator"), new ClickRegion(new Rectangle(30, 179, 86, 60), "binding"), new ClickRegion(new Rectangle(44, 304, 62, 60), "transmutation")); clkMenuMoreComponents = new Array(new ClickRegion(new Rectangle(43, 68, 60, 58), "calcination"), new ClickRegion(new Rectangle(28, 168, 85, 86), "duplication"), new ClickRegion(new Rectangle(31, 294, 87, 91), "projection")); clkSymbols = new Array(new ClickRegion(new Rectangle(6, 159, 43, 15), "r"), new ClickRegion(new Rectangle(6, 177, 43, 15), "l"), new ClickRegion(new Rectangle(6, 195, 43, 15), "d"), new ClickRegion(new Rectangle(6, 212, 43, 15), "u"), new ClickRegion(new Rectangle(7, 229, 43, 15), "1"), new ClickRegion(new Rectangle(7, 246, 43, 15), "2"), new ClickRegion(new Rectangle(7, 263, 43, 15), "o"), new ClickRegion(new Rectangle(7, 280, 43, 15), "c"), new ClickRegion(new Rectangle(7, 297, 43, 15), "w"), new ClickRegion(new Rectangle(7, 314, 43, 15), "j")); super(_arg1); zbmpSymbols["w"] = new symbol_w(31, 16); zbmpSymbols["l"] = new symbol_l(31, 16); zbmpSymbols["r"] = new symbol_r(31, 16); zbmpSymbols["u"] = new symbol_u(31, 16); zbmpSymbols["d"] = new symbol_d(31, 16); zbmpSymbols["o"] = new symbol_o(31, 16); zbmpSymbols["c"] = new symbol_c(31, 16); zbmpSymbols["1"] = new symbol_1(31, 16); zbmpSymbols["2"] = new symbol_2(31, 16); zbmpSymbols["j"] = new symbol_j(31, 16); } override public function OnEnter(_arg1:String){ _SM.ResetComponents(); } override public function OnKeyUp(_arg1:KeyboardEvent){ } override public function OnMouseUp(_arg1:MouseEvent){ var _local2:*; var _local3:*; var _local4:Boolean; var _local5:*; if (dragString != null){ if ((((_arg1.stageX > 57)) && ((_arg1.stageX < 121)))){ _local2 = int(((_arg1.stageY - 63) / 17)); if ((((((_local2 >= 0)) && ((_local2 <= 18)))) && (!((_SM.selectedManipulator == null))))){ _local3 = _SM.selectedManipulator.symbolString; if (_local3.length < 18){ _local3 = ((_local3.substring(0, _local2) + dragString) + _local3.substring(_local2)); }; _SM.selectedManipulator.symbolString = _local3; }; }; dragString = null; }; if (_SM.dragComponent != null){ _local4 = false; if (_SM.dragComponent.Place((_arg1.stageX - _SM.dragDelta.x), (_arg1.stageY - _SM.dragDelta.y))){ _local4 = true; _local5 = _SM.dragComponent.SolidBoundingBox(); i = 0; while (i < _SM.glyphList.length) { if (_SM.glyphList[i].SolidBoundingBox().intersects(_local5)){ _local4 = false; }; i++; }; i = 0; while (i < _SM.manipulatorList.length) { if (_SM.manipulatorList[i].SolidBoundingBox().intersects(_local5)){ _local4 = false; }; i++; }; } else { _SM.oldLocation = null; }; if (((!(_local4)) && (!((_SM.oldLocation == null))))){ _local4 = true; _SM.dragComponent.Place(_SM.oldLocation.x, _SM.oldLocation.y); }; if (_local4){ if (_SM.dragManipulator){ _SM.manipulatorList.push(_SM.dragComponent); } else { _SM.glyphList.push(_SM.dragComponent); }; } else { if (_SM.dragComponent == _SM.selectedManipulator){ _SM.selectedManipulator = null; }; _SM.dragComponent.Deconstructor(); }; _SM.dragComponent = null; }; } override public function OnKeyDown(_arg1:KeyboardEvent){ if (_SM.dragComponent != null){ if (_arg1.keyCode == 17){ _SM.dragComponent.rotation = ((_SM.dragComponent.rotation + 90) % 360); }; if (_arg1.keyCode == 16){ _SM.dragComponent.length = (1 + (_SM.dragComponent.length % 3)); }; }; if (_arg1.keyCode == 32){ _SM.ChangeState("SimulationState"); }; } override public function OnMouseDown(_arg1:MouseEvent){ var _local2:*; var _local3:Point; var _local4:*; var _local5:*; _local2 = ClickRegion.HitTest(clkMenu, _arg1.stageX, _arg1.stageY); _local3 = null; switch (_local2){ case "components": _SM.menuState = _SM.MENUSTATE_COMPONENTS; break; case "morecomponents": _SM.menuState = _SM.MENUSTATE_MORECOMPONENTS; break; case "programming": _SM.menuState = _SM.MENUSTATE_PROGRAMMING; break; case "save": _SM.ChangeState("SaveState"); break; case "load": _SM.ChangeState("LoadState"); break; case "run": _SM.ChangeState("SimulationState"); break; case "help": _SM.ChangeState("HelpState"); break; case "quit": _SM.ChangeState("QuitState"); break; default: _local2 = null; break; }; if (_local2 != null){ return; }; if (_SM.dragComponent == null){ _local2 = null; _SM.dragManipulator = false; if (_SM.menuState == _SM.MENUSTATE_COMPONENTS){ _local2 = ClickRegion.HitTest(clkMenuComponents, _arg1.stageX, _arg1.stageY); _local3 = ClickRegion.HitTestDelta(clkMenuComponents, _arg1.stageX, _arg1.stageY); }; if (_SM.menuState == _SM.MENUSTATE_MORECOMPONENTS){ _local2 = ClickRegion.HitTest(clkMenuMoreComponents, _arg1.stageX, _arg1.stageY); _local3 = ClickRegion.HitTestDelta(clkMenuMoreComponents, _arg1.stageX, _arg1.stageY); }; switch (_local2){ case "manipulator": _SM.dragManipulator = true; _SM.dragComponent = new Manipulator(_SM); _SM.selectedManipulator = (_SM.dragComponent as Manipulator); _local3.x = (_local3.x - 15); _local3.y = (_local3.y - 15); break; case "binding": _SM.dragComponent = new GlyphBinding(_SM); break; case "transmutation": _SM.dragComponent = new GlyphTransmutation(_SM); break; case "calcination": _SM.dragComponent = new GlyphCalcination(_SM); break; case "duplication": _SM.dragComponent = new GlyphDuplication(_SM); break; case "projection": _SM.dragComponent = new GlyphProjection(_SM); break; }; if (_SM.dragComponent != null){ _SM.dragDelta = _local3; _SM.dragComponent.drawX = (_arg1.stageX - _local3.x); _SM.dragComponent.drawY = (_arg1.stageY - _local3.y); _SM.oldLocation = null; }; }; if (_SM.dragComponent == null){ i = 0; while (i < _SM.glyphList.length) { if (((_SM.glyphList[i].HitTest(_arg1.stageX, _arg1.stageY)) && (_SM.glyphList[i].pickable))){ if ((_SM.glyphList[i] is Note)){ _SM.noteText = (_SM.glyphList[i] as Note).noteText; _SM.ChangeState("NoteState"); return; }; _SM.dragComponent = _SM.glyphList[i]; _SM.dragDelta = new Point((_arg1.stageX - _SM.dragComponent.drawX), (_arg1.stageY - _SM.dragComponent.drawY)); _SM.dragManipulator = false; _SM.oldLocation = new Point(_SM.dragComponent.drawX, _SM.dragComponent.drawY); }; i++; }; if (_SM.dragComponent != null){ ArrayRemove(_SM.glyphList, _SM.dragComponent); }; }; if (_SM.dragComponent == null){ i = 0; while (i < _SM.manipulatorList.length) { if (_SM.manipulatorList[i].HitTest(_arg1.stageX, _arg1.stageY)){ _SM.dragComponent = _SM.manipulatorList[i]; _SM.dragDelta = new Point((_arg1.stageX - _SM.dragComponent.drawX), (_arg1.stageY - _SM.dragComponent.drawY)); _SM.dragManipulator = true; _SM.oldLocation = new Point(_SM.dragComponent.drawX, _SM.dragComponent.drawY); _SM.selectedManipulator = _SM.manipulatorList[i]; }; i++; }; if (_SM.dragComponent != null){ ArrayRemove(_SM.manipulatorList, _SM.dragComponent); } else { if (_arg1.stageX > 155){ _SM.selectedManipulator = null; }; }; }; if ((((((_SM.dragComponent == null)) && ((_SM.menuState == _SM.MENUSTATE_PROGRAMMING)))) && (!((_SM.selectedManipulator == null))))){ _local2 = ClickRegion.HitTest(clkSymbols, _arg1.stageX, _arg1.stageY); _local3 = ClickRegion.HitTestDelta(clkSymbols, _arg1.stageX, _arg1.stageY); if (_local2 != null){ dragString = _local2; _SM.dragDelta = _local3; }; if ((((_arg1.stageX > 72)) && ((_arg1.stageX < 107)))){ _local4 = int(((_arg1.stageY - 71) / 17)); if ((((((_local4 >= 0)) && ((_local4 < 18)))) && (!((_SM.selectedManipulator == null))))){ _local5 = _SM.selectedManipulator.symbolString; if (_local4 < _local5.length){ _SM.dragDelta = new Point(21, 8); dragString = _local5.charAt(_local4); _local5 = (_local5.substring(0, _local4) + _local5.substring((_local4 + 1))); }; _SM.selectedManipulator.symbolString = _local5; }; }; }; } override public function OnUpdate(_arg1:Number, _arg2:int, _arg3:int){ if (_SM.dragComponent != null){ _SM.dragComponent.drawX = (_arg2 - _SM.dragDelta.x); _SM.dragComponent.drawY = (_arg3 - _SM.dragDelta.y); }; this.mouseX = _arg2; this.mouseY = _arg3; UpdateContextHelp(); } override public function OnRenderAtUpdate(_arg1:BitmapData){ var _local2:*; _SM.Blit(_arg1, bmpBackground); _SM.Blit(_arg1, bmpButtons); _SM.Blit(_arg1, zbmpMenus[_SM.menuState]); if (((!((_SM.selectedManipulator == null))) && ((_SM.menuState == _SM.MENUSTATE_PROGRAMMING)))){ _SM.Blit(_arg1, bmpMenuProgrammingArm); i = 0; while (i < _SM.selectedManipulator.symbolString.length) { _local2 = _SM.selectedManipulator.symbolString.charAt(i); _SM.Blit(_arg1, zbmpSymbols[_local2], 68, (72 + (17 * i))); i++; }; }; _SM.DrawHelp(_arg1); i = 0; while (i < _SM.glyphList.length) { _SM.glyphList[i].Draw(_arg1); i++; }; i = 0; while (i < _SM.manipulatorList.length) { _SM.manipulatorList[i].Draw(_arg1, (_SM.manipulatorList[i] == _SM.selectedManipulator)); i++; }; if (_SM.dragComponent != null){ _SM.dragComponent.Draw(_arg1, (_SM.dragComponent == _SM.selectedManipulator)); }; if (dragString != null){ _SM.Blit(_arg1, zbmpSymbols[dragString], (mouseX - _SM.dragDelta.x), (mouseY - _SM.dragDelta.y)); }; } public function UpdateContextHelp(){ var _local1:*; var _local2:*; var _local3:Boolean; var _local4:*; var _local5:*; var _local6:*; if (_SM.dragComponent != null){ if ((_SM.dragComponent is Manipulator)){ _SM.contextHelp = "Press Control to set initial rotation and Shift to set initial length."; } else { _SM.contextHelp = "Drop this glyph into the area to the right to place it."; }; } else { if (dragString != null){ _SM.contextHelp = "Drop this symbol onto the bar to the right to add it, or drop it elsewhere to discard it."; } else { _local3 = false; i = 0; while (i < _SM.glyphList.length) { if (_SM.glyphList[i].HitTest(mouseX, mouseY)){ _local4 = _SM.glyphList[i]; _local3 = true; _SM.contextHelp = _local4.contextHelp; }; i++; }; i = 0; while (i < _SM.manipulatorList.length) { if (_SM.manipulatorList[i].HitTest(mouseX, mouseY)){ if (_SM.selectedManipulator == _SM.manipulatorList[i]){ _SM.contextHelp = "This manipulator is selected. Click outside of the manipulator to deselect it."; } else { _SM.contextHelp = "To program this manipulator, select it and click on the Programming tab."; }; _local3 = true; }; i++; }; if ((((_SM.menuState == _SM.MENUSTATE_PROGRAMMING)) && (!((_SM.selectedManipulator == null))))){ _local1 = ClickRegion.HitTest(clkSymbols, mouseX, mouseY); _local2 = ClickRegion.HitTestDelta(clkSymbols, mouseX, mouseY); if (_local1 != null){ _SM.contextHelp = _SM.symbolHelp[_local1]; _local3 = true; }; if ((((mouseX > 72)) && ((mouseX < 107)))){ _local5 = int(((mouseY - 71) / 17)); if ((((((_local5 >= 0)) && ((_local5 < 18)))) && (!((_SM.selectedManipulator == null))))){ _local6 = _SM.selectedManipulator.symbolString; if (_local5 < _local6.length){ _SM.contextHelp = _SM.symbolHelp[_local6.charAt(_local5)]; _local3 = true; }; }; }; }; if (_local3 == false){ _local1 = null; _local3 = true; if (_SM.menuState == _SM.MENUSTATE_COMPONENTS){ _local1 = ClickRegion.HitTest(clkMenuComponents, mouseX, mouseY); }; if (_SM.menuState == _SM.MENUSTATE_MORECOMPONENTS){ _local1 = ClickRegion.HitTest(clkMenuMoreComponents, mouseX, mouseY); }; switch (_local1){ case "manipulator": _SM.contextHelp = "Manipulators are programmable arms used to move and rotate atoms and compounds."; break; case "binding": _SM.contextHelp = _SM.HELP_GLYPH_BINDING; break; case "transmutation": _SM.contextHelp = _SM.HELP_GLYPH_TRANSMUTATION; break; case "calcination": _SM.contextHelp = _SM.HELP_GLYPH_CALCINATION; break; case "duplication": _SM.contextHelp = _SM.HELP_GLYPH_DUPLICATION; break; case "projection": _SM.contextHelp = _SM.HELP_GLYPH_PROJECTION; break; default: _local3 = false; break; }; }; if (_local3 == false){ if ((((((mouseX < 148)) && ((_SM.menuState == _SM.MENUSTATE_PROGRAMMING)))) && ((_SM.selectedManipulator == null)))){ _SM.contextHelp = "Select a manipulator to program it."; } else { _SM.contextHelp = ""; }; }; }; }; } override public function OnLeave(_arg1:String){ } } }//package
Section 40
//Georgia10 (Georgia10) package { import flash.text.*; public dynamic class Georgia10 extends Font { } }//package
Section 41
//Georgia12 (Georgia12) package { import flash.text.*; public dynamic class Georgia12 extends Font { } }//package
Section 42
//Georgia14 (Georgia14) package { import flash.text.*; public dynamic class Georgia14 extends Font { } }//package
Section 43
//Georgia16B (Georgia16B) package { import flash.text.*; public dynamic class Georgia16B extends Font { } }//package
Section 44
//Georgia20 (Georgia20) package { import flash.text.*; public dynamic class Georgia20 extends Font { } }//package
Section 45
//glyph_binding (glyph_binding) package { import flash.display.*; public dynamic class glyph_binding extends BitmapData { public function glyph_binding(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 46
//glyph_calcination (glyph_calcination) package { import flash.display.*; public dynamic class glyph_calcination extends BitmapData { public function glyph_calcination(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 47
//glyph_duplication (glyph_duplication) package { import flash.display.*; public dynamic class glyph_duplication extends BitmapData { public function glyph_duplication(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 48
//glyph_projection (glyph_projection) package { import flash.display.*; public dynamic class glyph_projection extends BitmapData { public function glyph_projection(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 49
//glyph_spawning (glyph_spawning) package { import flash.display.*; public dynamic class glyph_spawning extends BitmapData { public function glyph_spawning(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 50
//glyph_target (glyph_target) package { import flash.display.*; public dynamic class glyph_target extends BitmapData { public function glyph_target(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 51
//glyph_transmutation (glyph_transmutation) package { import flash.display.*; public dynamic class glyph_transmutation extends BitmapData { public function glyph_transmutation(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 52
//GlyphBinding (GlyphBinding) package { import flash.events.*; import flash.display.*; import flash.geom.*; public class GlyphBinding extends Component { private var bmpSprite; public function GlyphBinding(_arg1:StateMachine){ bmpSprite = new glyph_binding(86, 57); super(_arg1); contextHelp = _SM.HELP_GLYPH_BINDING; } override public function Serialize():String{ return ((((("b," + x) + ",") + y) + ";")); } override public function DoAction(){ var _local1:*; var _local2:*; var _local3:int; _local1 = _SM.GetAtomAt(x, y); _local2 = _SM.GetAtomAt((x + 1), y); if (((((!((_local1 == null))) && (!((_local2 == null))))) && (!(_SM.LinkExistsBetween(_local1, _local2))))){ _SM.LinkAtoms(_local1, _local2); _local3 = 0; while (_local3 < _local1.heldByList.length) { _local2.AddHeldBy(_local1.heldByList[_local3]); _local3++; }; _local3 = 0; while (_local3 < _local2.heldByList.length) { _local1.AddHeldBy(_local2.heldByList[_local3]); _local3++; }; }; } override public function Draw(_arg1:BitmapData, _arg2:Boolean=false){ Blit(_arg1, bmpSprite, drawX, drawY); } override public function HitTest(_arg1:int, _arg2:int):Boolean{ return (SolidBoundingBox().containsPoint(new Point(_arg1, _arg2))); } override public function Place(_arg1:int, _arg2:int):Boolean{ return (_Place(_arg1, _arg2, 28, 28, 1, 1, 12, 13)); } override public function SolidBoundingBox():Rectangle{ return (new Rectangle((drawX + 1), (drawY + 1), 84, 55)); } } }//package
Section 53
//GlyphCalcination (GlyphCalcination) package { import flash.events.*; import flash.display.*; import flash.geom.*; public class GlyphCalcination extends Component { private var bmpSprite; public function GlyphCalcination(_arg1:StateMachine){ bmpSprite = new glyph_calcination(59, 59); super(_arg1); contextHelp = _SM.HELP_GLYPH_CALCINATION; } override public function Serialize():String{ return ((((("c," + x) + ",") + y) + ";")); } override public function DoAction(){ var _local1:*; _local1 = _SM.GetAtomAt(x, y); if (_local1 != null){ switch (_local1.atomType){ case Atom.ATOM_EARTH: case Atom.ATOM_FIRE: case Atom.ATOM_WATER: case Atom.ATOM_AIR: _local1.atomType = Atom.ATOM_SALT; break; }; }; } override public function Draw(_arg1:BitmapData, _arg2:Boolean=false){ Blit(_arg1, bmpSprite, drawX, drawY); } override public function HitTest(_arg1:int, _arg2:int):Boolean{ return (SolidBoundingBox().containsPoint(new Point(_arg1, _arg2))); } override public function Place(_arg1:int, _arg2:int):Boolean{ return (_Place(_arg1, _arg2, 29, 29, 1, 1, 13, 13)); } override public function SolidBoundingBox():Rectangle{ return (new Rectangle((drawX + 1), (drawY + 1), 57, 57)); } } }//package
Section 54
//GlyphDuplication (GlyphDuplication) package { import flash.events.*; import flash.display.*; import flash.geom.*; public class GlyphDuplication extends Component { private var bmpSprite; public function GlyphDuplication(_arg1:StateMachine){ bmpSprite = new glyph_duplication(86, 87); super(_arg1); contextHelp = _SM.HELP_GLYPH_DUPLICATION; } override public function Serialize():String{ return ((((("d," + x) + ",") + y) + ";")); } override public function DoAction(){ var _local1:*; var _local2:*; _local1 = _SM.GetAtomAt(x, y); _local2 = _SM.GetAtomAt((x + 1), y); if (((!((_local1 == null))) && (!((_local2 == null))))){ if (_local2.atomType == Atom.ATOM_SALT){ if ((((((((_local1.atomType == Atom.ATOM_FIRE)) || ((_local1.atomType == Atom.ATOM_WATER)))) || ((_local1.atomType == Atom.ATOM_EARTH)))) || ((_local1.atomType == Atom.ATOM_AIR)))){ _local2.atomType = _local1.atomType; }; }; }; } override public function Draw(_arg1:BitmapData, _arg2:Boolean=false){ Blit(_arg1, bmpSprite, drawX, drawY); } override public function HitTest(_arg1:int, _arg2:int):Boolean{ return (SolidBoundingBox().containsPoint(new Point(_arg1, _arg2))); } override public function Place(_arg1:int, _arg2:int):Boolean{ return (_Place(_arg1, _arg2, 28, 43, 1, 1, 13, 13)); } override public function SolidBoundingBox():Rectangle{ return (new Rectangle((drawX + 1), (drawY + 1), 84, 85)); } } }//package
Section 55
//GlyphProjection (GlyphProjection) package { import flash.events.*; import flash.display.*; import flash.geom.*; public class GlyphProjection extends Component { private var bmpSprite; public function GlyphProjection(_arg1:StateMachine){ bmpSprite = new glyph_projection(86, 87); super(_arg1); contextHelp = _SM.HELP_GLYPH_PROJECTION; } override public function Serialize():String{ return ((((("p," + x) + ",") + y) + ";")); } override public function DoAction(){ var _local1:*; var _local2:*; _local1 = _SM.GetAtomAt(x, y); _local2 = _SM.GetAtomAt((x + 1), y); if (((!((_local1 == null))) && (!((_local2 == null))))){ if ((((((_local2.atomType == Atom.ATOM_MERCURY)) && ((_local2.heldByList.length == 0)))) && ((_local2.links.length == 0)))){ if ((((((((((_local1.atomType == Atom.ATOM_SILVER)) || ((_local1.atomType == Atom.ATOM_COPPER)))) || ((_local1.atomType == Atom.ATOM_IRON)))) || ((_local1.atomType == Atom.ATOM_TIN)))) || ((_local1.atomType == Atom.ATOM_LEAD)))){ _local1.atomType = (_local1.atomType + 1); ArrayRemove(_SM.atomList, _local2); }; }; }; } override public function Draw(_arg1:BitmapData, _arg2:Boolean=false){ Blit(_arg1, bmpSprite, drawX, drawY); } override public function HitTest(_arg1:int, _arg2:int):Boolean{ return (SolidBoundingBox().containsPoint(new Point(_arg1, _arg2))); } override public function Place(_arg1:int, _arg2:int):Boolean{ return (_Place(_arg1, _arg2, 28, 43, 1, 1, 13, 13)); } override public function SolidBoundingBox():Rectangle{ return (new Rectangle((drawX + 1), (drawY + 1), 84, 85)); } } }//package
Section 56
//GlyphSpawning (GlyphSpawning) package { import flash.display.*; import flash.geom.*; public class GlyphSpawning extends Component { private var bmpAlpha; public var atomType:int; private var bmpSprite; private static var zbmpSprites:Array = new Array(); private static var spritesLoaded:Boolean = false; public function GlyphSpawning(_arg1:StateMachine){ bmpAlpha = new atom_alpha(29, 29); bmpSprite = new glyph_spawning(45, 45); super(_arg1); pickable = false; contextHelp = _SM.HELP_GLYPH_SPAWNING; if (spritesLoaded == false){ zbmpSprites.push(new atom_salt(23, 23)); zbmpSprites.push(new atom_mercury(23, 23)); zbmpSprites.push(new atom_sulfur(23, 23)); zbmpSprites.push(new atom_fire(23, 23)); zbmpSprites.push(new atom_earth(23, 23)); zbmpSprites.push(new atom_water(23, 23)); zbmpSprites.push(new atom_air(23, 23)); zbmpSprites.push(new atom_lead(23, 23)); zbmpSprites.push(new atom_tin(23, 23)); zbmpSprites.push(new atom_iron(23, 23)); zbmpSprites.push(new atom_copper(23, 23)); zbmpSprites.push(new atom_silver(23, 23)); zbmpSprites.push(new atom_gold(23, 23)); spritesLoaded = true; }; } override public function DoAction(){ if (_SM.GetAtomAt(x, y) == null){ _SM.CreateAtom(atomType, x, y); }; } override public function Draw(_arg1:BitmapData, _arg2:Boolean=false){ Blit(_arg1, bmpSprite, drawX, drawY); _arg1.copyPixels(zbmpSprites[atomType], new Rectangle(0, 0, 29, 29), new Point((drawX + 11), (drawY + 11)), bmpAlpha); } override public function HitTest(_arg1:int, _arg2:int):Boolean{ return (SolidBoundingBox().containsPoint(new Point(_arg1, _arg2))); } override public function Place(_arg1:int, _arg2:int):Boolean{ return (_Place(_arg1, _arg2, 22, 22, 1, 1, 13, 13)); } override public function SolidBoundingBox():Rectangle{ return (new Rectangle((drawX + 1), (drawY + 1), 43, 43)); } } }//package
Section 57
//GlyphTarget (GlyphTarget) package { import flash.events.*; import flash.display.*; import flash.geom.*; import flash.text.*; public class GlyphTarget extends Component { private var solutionHeight:int;// = 0 private var largeFont:Font; public var text:String;// = "" private var bmpSprite; private var solutionWidth:int;// = 0 public var solutionArray:Array; private var smallFont:Font; private var targetCount;// = 5 public function GlyphTarget(_arg1:StateMachine){ bmpSprite = new glyph_target(144, 144); solutionWidth = 0; solutionHeight = 0; targetCount = 5; smallFont = new Georgia10(); largeFont = new Georgia20(); text = ""; solutionArray = new Array(); super(_arg1); pickable = false; contextHelp = _SM.HELP_GLYPH_TARGET; } override public function SolidBoundingBox():Rectangle{ return (new Rectangle((drawX + 1), (drawY + 1), 142, 142)); } public function DeleteSolutionAtLocation(_arg1:int, _arg2:int){ var _local3:int; var _local4:int; var _local5:*; var _local6:*; _local3 = 0; while (_local3 < solutionArray.length) { _local5 = solutionArray[_local3]; _local6 = _SM.GetAtomAt((_arg1 + _local5.x), (_arg2 + _local5.y)); ArrayRemove(_SM.atomList, _local6); _local3++; }; } public function AddSolutionAtom(_arg1:SolutionAtom){ solutionArray.push(_arg1); solutionWidth = Math.max(solutionWidth, (_arg1.x + 1)); solutionHeight = Math.max(solutionHeight, (_arg1.y + 1)); } override public function HitTest(_arg1:int, _arg2:int):Boolean{ return (SolidBoundingBox().containsPoint(new Point(_arg1, _arg2))); } override public function Reset(){ targetCount = 5; } override public function DoAction(){ var _local1:int; var _local2:int; var _local3:*; var _local4:*; _local3 = 0; _local1 = 0; while (_local1 < _SM.atomList.length) { _local4 = Math.sqrt((Math.pow((_SM.atomList[_local1].x - this.x), 2) + Math.pow((_SM.atomList[_local1].y - this.y), 2))); if (_local4 <= 2.4){ _local3 = (_local3 + 1); }; _local1++; }; if (_local3 != solutionArray.length){ return; }; _local1 = 0; while (_local1 < (6 - solutionWidth)) { _local2 = 0; while (_local2 < (6 - solutionHeight)) { if (IsSolutionAtLocation(((x + _local1) - 2), ((y + _local2) - 2))){ targetCount = Math.max(0, (targetCount - 1)); DeleteSolutionAtLocation(((x + _local1) - 2), ((y + _local2) - 2)); if (targetCount == 0){ _SM.ForceRedraw(); _SM.ChangeState("WinState"); }; }; _local2++; }; _local1++; }; } public function IsSolutionAtLocation(_arg1:int, _arg2:int):Boolean{ var _local3:int; var _local4:int; var _local5:*; var _local6:*; var _local7:*; _local3 = 0; while (_local3 < solutionArray.length) { _local5 = solutionArray[_local3]; _local6 = Math.sqrt((Math.pow(((_arg1 + _local5.x) - this.x), 2) + Math.pow(((_arg2 + _local5.y) - this.y), 2))); if (_local6 > 2.4){ return (false); }; _local7 = _SM.GetAtomAt((_arg1 + _local5.x), (_arg2 + _local5.y)); if (_local7 == null){ return (false); }; if (_local7.MatchesSolutionAtom(_local5) == false){ return (false); }; if (_local7.heldByList.length != 0){ return (false); }; _local3++; }; return (true); } override public function Draw(_arg1:BitmapData, _arg2:Boolean=false){ var _local3:int; var _local4:int; var _local5:*; var _local6:*; var _local7:*; Blit(_arg1, bmpSprite, drawX, drawY); _local3 = 0; while (_local3 < solutionArray.length) { _local5 = ((((drawX + 72) - ((solutionWidth * 29) / 2)) + 14) + (solutionArray[_local3].x * 29)); _local6 = ((((drawY + 72) - ((solutionHeight * 29) / 2)) + 14) + (solutionArray[_local3].y * 29)); _local7 = ((solutionArray[_local3].linkAngle * Math.PI) / 180); if (solutionArray[_local3].linkAngle != -1){ _SM.DrawLink(_arg1, _local5, _local6, (_local5 + (29 * Math.cos(_local7))), (_local6 + (29 * Math.sin(_local7))), true); }; _local3++; }; _local3 = 0; while (_local3 < solutionArray.length) { solutionArray[_local3].Draw(_arg1, ((drawX + 72) - ((solutionWidth * 29) / 2)), ((drawY + 72) - ((solutionHeight * 29) / 2))); _local3++; }; _SM.DrawText(_arg1, smallFont, 10, text, (drawX + 70), (drawY + 12), 4281018399); _SM.DrawText(_arg1, largeFont, 18, ("" + targetCount), (drawX + 70), (drawY + 110), 4281018399); } override public function Place(_arg1:int, _arg2:int):Boolean{ return (_Place(_arg1, _arg2, 72, 72, 1, 1, 13, 13)); } } }//package
Section 58
//GlyphTransmutation (GlyphTransmutation) package { import flash.events.*; import flash.display.*; import flash.geom.*; public class GlyphTransmutation extends Component { private var atomPresent:Atom;// = null private var timeGrabAction:Boolean;// = false private var bmpSprite; public function GlyphTransmutation(_arg1:StateMachine){ bmpSprite = new glyph_transmutation(59, 59); atomPresent = null; timeGrabAction = false; super(_arg1); contextHelp = _SM.HELP_GLYPH_TRANSMUTATION; } override public function Serialize():String{ return ((((("t," + x) + ",") + y) + ";")); } override public function DoAction(){ var _local1:*; _local1 = _SM.GetAtomAt(x, y); if (((!((atomPresent == null))) && (!((atomPresent == _local1))))){ atomPresent = null; }; if (((!((_local1 == null))) && ((atomPresent == null)))){ atomPresent = _local1; switch (_local1.atomType){ case Atom.ATOM_SALT: _local1.atomType = Atom.ATOM_MERCURY; break; case Atom.ATOM_MERCURY: _local1.atomType = Atom.ATOM_SULFUR; break; case Atom.ATOM_SULFUR: _local1.atomType = Atom.ATOM_SALT; break; }; }; } override public function Draw(_arg1:BitmapData, _arg2:Boolean=false){ Blit(_arg1, bmpSprite, drawX, drawY); } override public function HitTest(_arg1:int, _arg2:int):Boolean{ return (SolidBoundingBox().containsPoint(new Point(_arg1, _arg2))); } override public function Place(_arg1:int, _arg2:int):Boolean{ return (_Place(_arg1, _arg2, 29, 29, 1, 1, 13, 13)); } override public function SolidBoundingBox():Rectangle{ return (new Rectangle((drawX + 1), (drawY + 1), 57, 57)); } } }//package
Section 59
//HelpState (HelpState) package { import flash.events.*; import flash.display.*; import flash.geom.*; public class HelpState extends State { private var clickList:Array; private var bmpBackground:BitmapData; public function HelpState(_arg1:StateMachine){ bmpBackground = new img_info1(640, 480); clickList = new Array(new ClickRegion(new Rectangle(30, 454, 41, 21), "back"), new ClickRegion(new Rectangle(73, 454, 40, 21), "forward")); super(_arg1); } override public function OnMouseDown(_arg1:MouseEvent){ var _local2:*; _local2 = ClickRegion.HitTest(clickList, _arg1.stageX, _arg1.stageY); switch (_local2){ case "back": _SM.ChangeState("DesignState"); break; case "forward": _SM.ChangeState("AtomListState"); break; }; } override public function OnRenderAtEnter(_arg1:BitmapData){ _SM.Blit(_arg1, bmpBackground); } } }//package
Section 60
//icon_mute (icon_mute) package { import flash.display.*; public dynamic class icon_mute extends BitmapData { public function icon_mute(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 61
//icon_sound (icon_sound) package { import flash.display.*; public dynamic class icon_sound extends BitmapData { public function icon_sound(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 62
//img_background (img_background) package { import flash.display.*; public dynamic class img_background extends BitmapData { public function img_background(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 63
//img_info1 (img_info1) package { import flash.display.*; public dynamic class img_info1 extends BitmapData { public function img_info1(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 64
//img_info2 (img_info2) package { import flash.display.*; public dynamic class img_info2 extends BitmapData { public function img_info2(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 65
//img_levelselect (img_levelselect) package { import flash.display.*; public dynamic class img_levelselect extends BitmapData { public function img_levelselect(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 66
//img_load (img_load) package { import flash.display.*; public dynamic class img_load extends BitmapData { public function img_load(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 67
//img_loaded (img_loaded) package { import flash.display.*; public dynamic class img_loaded extends BitmapData { public function img_loaded(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 68
//img_save (img_save) package { import flash.display.*; public dynamic class img_save extends BitmapData { public function img_save(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 69
//JammedState (JammedState) package { import flash.events.*; import flash.display.*; import flash.geom.*; public class JammedState extends State { private var bmpIndicator:BitmapData; private var bmpPopup:BitmapData; public function JammedState(_arg1:StateMachine){ bmpPopup = new popup_jammed(640, 480); bmpIndicator = new atom_indicator(23, 23); super(_arg1); } override public function OnMouseDown(_arg1:MouseEvent){ if ((((((((_arg1.stageX > 36)) && ((_arg1.stageY > 315)))) && ((_arg1.stageX < 111)))) && ((_arg1.stageY < 329)))){ _SM.ChangeState("DesignState"); }; } override public function OnRenderAtEnter(_arg1:BitmapData){ var _local2:*; var _local3:*; _SM.Blit(_arg1, bmpPopup); _local2 = 0; while (_local2 < _SM.collisionPoints.length) { _local3 = _SM.collisionPoints[_local2]; _SM.Blit(_arg1, bmpIndicator, (_local3.x - 11), (_local3.y - 11)); _local2++; }; } } }//package
Section 70
//LevelSelectState (LevelSelectState) package { import flash.events.*; import flash.display.*; import flash.geom.*; import flash.text.*; import flash.net.*; public class LevelSelectState extends State { private const ITEMSTART:int = 100; private var bmpBackground:BitmapData; private var levelNames:Array; private var levelFont:Font; public function LevelSelectState(_arg1:StateMachine){ bmpBackground = new img_levelselect(640, 480); levelNames = new Array(); levelFont = new Georgia16B(); super(_arg1); levelNames.push("I. Aqua Vitae"); levelNames.push("II. Sal Ammoniac"); levelNames.push("III. Cinnabar"); levelNames.push("IV. Litharge"); levelNames.push("V. Oil of Vitriol"); levelNames.push("VI. Aqua Fortis"); levelNames.push("VII. Haematite"); levelNames.push("VIII. Brimstone"); levelNames.push("IX. Aqua Regia"); levelNames.push("X. Vertigris"); levelNames.push("XI. Black Powder"); levelNames.push("XII. Gold"); levelNames.push("XIII. Elixir of Life"); levelNames.push("XIV. Philosopher's Stone"); } override public function OnMouseDown(_arg1:MouseEvent){ var _local2:*; var _local3:*; if ((((((_arg1.stageX > 400)) && ((_arg1.stageY > 456)))) && ((_arg1.stageX < 606)))){ getURL("http://www.zachtronicsindustries.com", "_blank"); return; }; if ((((((_arg1.stageX < 226)) || ((_arg1.stageX > 526)))) || ((_arg1.stageY < ITEMSTART)))){ return; }; _local2 = int(((_arg1.stageY - ITEMSTART) / 21)); if ((((_local2 >= levelNames.length)) || ((_local2 > _SM.maxLevel)))){ return; }; _SM.ClearDesign(); _local3 = null; switch (_local2){ case 0: _SM.CreateNote("Welcome to the Codex of\nAlchemical Engineering!\n\nTo win, you must synthesize\nthe compound shown in the\nlarge circle and drop it there.\n\nProgram a manipulator\nto drop the Water atoms into\nthe large circle.", 1, 1); _SM.CreateGlyphSpawning(Atom.ATOM_WATER, 7, 12); _local3 = _SM.CreateGlyphTarget("Aqua Vitae", 7, 3); _local3.AddSolutionAtom(new SolutionAtom(Atom.ATOM_WATER, 0, 0, -1)); break; case 1: _SM.CreateNote("For this level, you must\nbind together two atoms to\ncreate the desired compound.\n\nAtoms bound by the Glyph of\nBinding will move together.\n\nTo be accepted, the compound\nmust be alone inside the target\nand oriented as shown.", 13, 1); _local3 = _SM.CreateGlyphTarget("Sal Ammoniac", 7, 3); _local3.AddSolutionAtom(new SolutionAtom(Atom.ATOM_FIRE, 0, 0, 0)); _local3.AddSolutionAtom(new SolutionAtom(Atom.ATOM_SALT, 1, 0, 180)); _SM.CreateGlyphSpawning(Atom.ATOM_FIRE, 4, 12); _SM.CreateGlyphSpawning(Atom.ATOM_SALT, 10, 12); break; case 2: _SM.CreateNote("To convert between the\nThree Primes, use a Glyph of\nTransmutation.\n\nNote that it will only\nactivate as an atom is\nmoved onto it.", 1, 1); _local3 = _SM.CreateGlyphTarget("Cinnabar", 7, 3); _local3.AddSolutionAtom(new SolutionAtom(Atom.ATOM_SULFUR, 0, 0, 0)); _local3.AddSolutionAtom(new SolutionAtom(Atom.ATOM_MERCURY, 1, 0, 180)); _SM.CreateGlyphSpawning(Atom.ATOM_MERCURY, 4, 13); _SM.CreateGlyphSpawning(Atom.ATOM_MERCURY, 10, 13); break; case 3: _local3 = _SM.CreateGlyphTarget("Litharge", 7, 2); _local3.AddSolutionAtom(new SolutionAtom(Atom.ATOM_LEAD, 0, 0, 0)); _local3.AddSolutionAtom(new SolutionAtom(Atom.ATOM_AIR, 1, 0, 180)); _local3.AddSolutionAtom(new SolutionAtom(Atom.ATOM_LEAD, 2, 0, 180)); _SM.CreateGlyphSpawning(Atom.ATOM_LEAD, 1, 13); _SM.CreateGlyphSpawning(Atom.ATOM_AIR, 7, 13); _SM.CreateGlyphSpawning(Atom.ATOM_LEAD, 13, 13); break; case 4: _SM.CreateNote("In need of one of the\nThree Primes?\n\nUse a Glyph of Calcination!", 13, 1); _local3 = _SM.CreateGlyphTarget("Oil of Vitriol", 7, 3); _local3.AddSolutionAtom(new SolutionAtom(Atom.ATOM_WATER, 0, 0, 0)); _local3.AddSolutionAtom(new SolutionAtom(Atom.ATOM_SULFUR, 1, 0, 180)); _SM.CreateGlyphSpawning(Atom.ATOM_WATER, 1, 13); _SM.CreateGlyphSpawning(Atom.ATOM_WATER, 13, 13); break; case 5: _local3 = _SM.CreateGlyphTarget("Aqua Fortis", 7, 2); _local3.AddSolutionAtom(new SolutionAtom(Atom.ATOM_SALT, 0, 0, 0)); _local3.AddSolutionAtom(new SolutionAtom(Atom.ATOM_WATER, 1, 0, 180)); _local3.AddSolutionAtom(new SolutionAtom(Atom.ATOM_SULFUR, 2, 0, 180)); _SM.CreateGlyphSpawning(Atom.ATOM_WATER, 1, 13); _SM.CreateGlyphSpawning(Atom.ATOM_WATER, 13, 13); break; case 6: _SM.CreateNote("Through the combination of\nMercury and a Glyph of\nProjection, you can convert\na Planetary Metal to the\none above it.\n\nThis will be necessary to\nconvert Tin into Iron.", 1, 1); _local3 = _SM.CreateGlyphTarget("Haematite", 7, 2); _local3.AddSolutionAtom(new SolutionAtom(Atom.ATOM_EARTH, 0, 0, 0)); _local3.AddSolutionAtom(new SolutionAtom(Atom.ATOM_IRON, 1, 0, 180)); _local3.AddSolutionAtom(new SolutionAtom(Atom.ATOM_IRON, 2, 0, 180)); _SM.CreateGlyphSpawning(Atom.ATOM_EARTH, 1, 13); _SM.CreateGlyphSpawning(Atom.ATOM_TIN, 7, 13); _SM.CreateGlyphSpawning(Atom.ATOM_MERCURY, 13, 13); break; case 7: _local3 = _SM.CreateGlyphTarget("Brimstone", 7, 2); _local3.AddSolutionAtom(new SolutionAtom(Atom.ATOM_SULFUR, 0, 0, 0)); _local3.AddSolutionAtom(new SolutionAtom(Atom.ATOM_EARTH, 1, 0, 180)); _local3.AddSolutionAtom(new SolutionAtom(Atom.ATOM_SULFUR, 2, 0, 180)); _SM.CreateGlyphSpawning(Atom.ATOM_EARTH, 3, 13); _SM.CreateGlyphSpawning(Atom.ATOM_EARTH, 11, 13); break; case 8: _local3 = _SM.CreateGlyphTarget("Aqua Regia", 7, 2); _local3.AddSolutionAtom(new SolutionAtom(Atom.ATOM_SALT, 0, 0, 0)); _local3.AddSolutionAtom(new SolutionAtom(Atom.ATOM_WATER, 1, 0, 180)); _local3.AddSolutionAtom(new SolutionAtom(Atom.ATOM_SULFUR, 2, 0, 180)); _local3.AddSolutionAtom(new SolutionAtom(Atom.ATOM_WATER, 2, 1, 270)); _SM.CreateGlyphSpawning(Atom.ATOM_WATER, 1, 13); _SM.CreateGlyphSpawning(Atom.ATOM_WATER, 13, 13); break; case 9: _local3 = _SM.CreateGlyphTarget("Vertigris", 7, 2); _local3.AddSolutionAtom(new SolutionAtom(Atom.ATOM_COPPER, 0, 0, 0)); _local3.AddSolutionAtom(new SolutionAtom(Atom.ATOM_SALT, 1, 0, 180)); _local3.AddSolutionAtom(new SolutionAtom(Atom.ATOM_COPPER, 2, 0, 180)); _local3.AddSolutionAtom(new SolutionAtom(Atom.ATOM_AIR, 1, 1, 270)); _SM.CreateGlyphSpawning(Atom.ATOM_AIR, 1, 13); _SM.CreateGlyphSpawning(Atom.ATOM_IRON, 7, 13); _SM.CreateGlyphSpawning(Atom.ATOM_MERCURY, 13, 13); break; case 10: _local3 = _SM.CreateGlyphTarget("Black Powder", 7, 2); _local3.AddSolutionAtom(new SolutionAtom(Atom.ATOM_SULFUR, 1, 0, 90)); _local3.AddSolutionAtom(new SolutionAtom(Atom.ATOM_SALT, 0, 1, 0)); _local3.AddSolutionAtom(new SolutionAtom(Atom.ATOM_FIRE, 1, 1, 180)); _local3.AddSolutionAtom(new SolutionAtom(Atom.ATOM_SALT, 2, 1, 180)); _local3.AddSolutionAtom(new SolutionAtom(Atom.ATOM_SULFUR, 1, 2, 270)); _SM.CreateGlyphSpawning(Atom.ATOM_FIRE, 1, 13); _SM.CreateGlyphSpawning(Atom.ATOM_SALT, 7, 13); _SM.CreateGlyphSpawning(Atom.ATOM_FIRE, 13, 13); break; case 11: _SM.CreateNote("\n\n\n\n\nAnd to think -\nthey said it\ncouldn't be done!", 1, 1); _local3 = _SM.CreateGlyphTarget("Gold", 7, 2); _local3.AddSolutionAtom(new SolutionAtom(Atom.ATOM_GOLD, 0, 0, -1)); _SM.CreateGlyphSpawning(Atom.ATOM_MERCURY, 1, 13); _SM.CreateGlyphSpawning(Atom.ATOM_LEAD, 7, 13); _SM.CreateGlyphSpawning(Atom.ATOM_MERCURY, 13, 13); break; case 12: _local3 = _SM.CreateGlyphTarget("Elixir of Life", 7, 2); _local3.AddSolutionAtom(new SolutionAtom(Atom.ATOM_WATER, 0, 0, 90)); _local3.AddSolutionAtom(new SolutionAtom(Atom.ATOM_WATER, 2, 0, 90)); _local3.AddSolutionAtom(new SolutionAtom(Atom.ATOM_SALT, 0, 1, 0)); _local3.AddSolutionAtom(new SolutionAtom(Atom.ATOM_WATER, 1, 1, -1)); _local3.AddSolutionAtom(new SolutionAtom(Atom.ATOM_SALT, 2, 1, 180)); _local3.AddSolutionAtom(new SolutionAtom(Atom.ATOM_WATER, 0, 2, 270)); _local3.AddSolutionAtom(new SolutionAtom(Atom.ATOM_WATER, 2, 2, 270)); _SM.CreateGlyphSpawning(Atom.ATOM_WATER, 1, 13); _SM.CreateGlyphSpawning(Atom.ATOM_WATER, 13, 13); _SM.CreateGlyphSpawning(Atom.ATOM_WATER, 1, 1); _SM.CreateGlyphSpawning(Atom.ATOM_WATER, 13, 1); break; case 13: _local3 = _SM.CreateGlyphTarget("Philosopher Stone", 7, 2); _local3.AddSolutionAtom(new SolutionAtom(Atom.ATOM_SALT, 0, 0, 90)); _local3.AddSolutionAtom(new SolutionAtom(Atom.ATOM_AIR, 1, 0, 180)); _local3.AddSolutionAtom(new SolutionAtom(Atom.ATOM_SALT, 2, 0, 180)); _local3.AddSolutionAtom(new SolutionAtom(Atom.ATOM_WATER, 0, 1, 90)); _local3.AddSolutionAtom(new SolutionAtom(Atom.ATOM_FIRE, 2, 1, 270)); _local3.AddSolutionAtom(new SolutionAtom(Atom.ATOM_SALT, 0, 2, 0)); _local3.AddSolutionAtom(new SolutionAtom(Atom.ATOM_EARTH, 1, 2, 0)); _local3.AddSolutionAtom(new SolutionAtom(Atom.ATOM_SALT, 2, 2, 270)); _SM.CreateGlyphSpawning(Atom.ATOM_WATER, 1, 13); _SM.CreateGlyphSpawning(Atom.ATOM_FIRE, 13, 13); _SM.CreateGlyphSpawning(Atom.ATOM_AIR, 1, 1); _SM.CreateGlyphSpawning(Atom.ATOM_EARTH, 13, 1); break; }; _SM.menuState = _SM.MENUSTATE_COMPONENTS; _SM.currentLevel = _local2; _SM.ChangeState("DesignState"); } override public function OnRenderAtEnter(_arg1:BitmapData){ var _local2:int; _SM.Blit(_arg1, bmpBackground); _local2 = 0; while (_local2 < levelNames.length) { if (_local2 > _SM.maxLevel){ _SM.DrawText(_arg1, levelFont, 15, levelNames[_local2], 380, (ITEMSTART + (_local2 * 21)), 4289964172); } else { _SM.DrawText(_arg1, levelFont, 15, levelNames[_local2], 380, (ITEMSTART + (_local2 * 21))); }; _local2++; }; } public static function getURL(_arg1:String, _arg2:String=null):void{ var req:URLRequest; var url = _arg1; var window = _arg2; req = new URLRequest(url); try { navigateToURL(req, window); } catch(e:Error) { }; } } }//package
Section 71
//Link (Link) package { public class Link { public var atom1:Atom; public var atom2:Atom; public var offsetAngle:Number; public var linkAngle:Number; public function Link(_arg1:Atom, _arg2:Atom, _arg3:Number, _arg4:Number){ this.atom1 = _arg1; this.atom2 = _arg2; this.linkAngle = _arg3; this.offsetAngle = _arg4; } } }//package
Section 72
//LoadState (LoadState) package { import flash.events.*; import flash.display.*; import flash.geom.*; import flash.text.*; public class LoadState extends State { private var clickList:Array; private var textField:TextField;// = null private var bmpBackground:BitmapData; private var loadFont:Font; public function LoadState(_arg1:StateMachine){ bmpBackground = new img_load(640, 480); clickList = new Array(new ClickRegion(new Rectangle(30, 454, 41, 21), "back"), new ClickRegion(new Rectangle(536, 450, 36, 16), "load")); textField = null; loadFont = new Georgia10(); super(_arg1); } override public function OnEnter(_arg1:String){ var _local2:*; _local2 = new TextFormat(); _local2.font = loadFont.fontName; _local2.size = 10; _local2.color = 4281018399; textField = new TextField(); textField.text = " "; textField.embedFonts = true; textField.autoSize = TextFieldAutoSize.NONE; textField.setTextFormat(_local2); textField.multiline = true; textField.wordWrap = true; textField.type = TextFieldType.INPUT; textField.border = true; textField.borderColor = 4281018399; textField.background = true; textField.backgroundColor = 4294964959; textField.x = 185; textField.y = 71; textField.width = (572 - 185); textField.height = 360; _SM.stage.addChild(textField); } public function LoadDesign(){ var _local1:*; var _local2:int; var _local3:int; var _local4:*; var _local5:*; var _local6:Component; var _local7:*; var _local8:*; var _local9:*; var _local10:*; var _local11:*; _local1 = textField.text.split(";"); _local3 = 0; while (_local3 < _local1.length) { _local4 = trim(_local1[_local3]); _local5 = _local4.split(","); _local6 = null; if (_local5.length >= 3){ switch (trim(_local5[0])){ case "b": _local6 = new GlyphBinding(_SM); _local8 = 28; _local9 = 28; break; case "c": _local6 = new GlyphCalcination(_SM); _local8 = 29; _local9 = 29; break; case "d": _local6 = new GlyphDuplication(_SM); _local8 = 28; _local9 = 43; break; case "p": _local6 = new GlyphProjection(_SM); _local8 = 28; _local9 = 43; break; case "t": _local6 = new GlyphTransmutation(_SM); _local8 = 29; _local9 = 29; break; case "m": _local6 = null; _local11 = new Manipulator(_SM); _local11.x = int(_local5[1]); _local11.y = int(_local5[2]); _local11.drawX = ((_local11.x * 29) + 178); _local11.drawY = ((_local11.y * 29) + 22); _local11.rotation = int(_local5[3]); _local11.length = int(_local5[4]); if (_local5[5].length <= 18){ _local11.symbolString = _local5[5]; }; _local7 = _local11.Place(_local11.drawX, _local11.drawY); if (_local7){ _local10 = _local11.SolidBoundingBox(); _local2 = 0; while (_local2 < _SM.glyphList.length) { if (_SM.glyphList[_local2].SolidBoundingBox().intersects(_local10)){ _local7 = false; }; _local2++; }; _local2 = 0; while (_local2 < _SM.manipulatorList.length) { if (_SM.manipulatorList[_local2].SolidBoundingBox().intersects(_local10)){ _local7 = false; }; _local2++; }; }; if (_local7){ _SM.manipulatorList.push(_local11); }; break; default: _local6 = null; }; if (_local6 != null){ _local6.x = int(_local5[1]); _local6.y = int(_local5[2]); _local6.drawX = (((_local6.x * 29) + 178) - _local8); _local6.drawY = (((_local6.y * 29) + 22) - _local9); _local7 = _local6.Place(_local6.drawX, _local6.drawY); if (_local7){ _local10 = _local6.SolidBoundingBox(); _local2 = 0; while (_local2 < _SM.glyphList.length) { if (_SM.glyphList[_local2].SolidBoundingBox().intersects(_local10)){ _local7 = false; }; _local2++; }; _local2 = 0; while (_local2 < _SM.manipulatorList.length) { if (_SM.manipulatorList[_local2].SolidBoundingBox().intersects(_local10)){ _local7 = false; }; _local2++; }; }; if (_local7){ _SM.glyphList.push(_local6); }; }; }; _local3++; }; } override public function OnMouseDown(_arg1:MouseEvent){ var _local2:*; _local2 = ClickRegion.HitTest(clickList, _arg1.stageX, _arg1.stageY); switch (_local2){ case "back": _SM.ChangeState("DesignState"); break; case "load": _SM.DeleteUserComponents(); LoadDesign(); _SM.ChangeState("DesignState"); break; }; } function trim(_arg1:String):String{ var _local2:*; var _local3:*; _local2 = 0; while (_arg1.charCodeAt(_local2) < 33) { _local2++; }; _local3 = (_arg1.length - 1); while (_arg1.charCodeAt(_local3) < 33) { _local3--; }; return (_arg1.substring(_local2, (_local3 + 1))); } override public function OnRenderAtEnter(_arg1:BitmapData){ _SM.Blit(_arg1, bmpBackground); } override public function OnLeave(_arg1:String){ _SM.stage.removeChild(textField); } } }//package
Section 73
//manipulator (manipulator) package { import flash.display.*; public dynamic class manipulator extends MovieClip { public var claw:MovieClip; public var middle:arm_middle; public var base:arm_base; } }//package
Section 74
//Manipulator (Manipulator) package { import flash.events.*; import flash.display.*; import flash.geom.*; public class Manipulator extends Component { public var symbolPointer:int;// = 0 private var started:Boolean;// = false private var movClaw:MovieClip;// = null private var logicalRotation:Number; private var heldAtom:Atom;// = null private var shadedForSelection:Boolean;// = false private var heldAtomRotation:Number;// = 0 private var oldRotation:Number; private var movMiddle:MovieClip;// = null private var timeGrabAction:Boolean;// = false public var symbolString:String;// = "" private var logicalLength:Number; private var opened:Boolean;// = true private var oldLength:Number; private var currentSymbol:String;// = null private var movManipulator:MovieClip; public function Manipulator(_arg1:StateMachine){ movManipulator = new manipulator(); movMiddle = null; movClaw = null; shadedForSelection = false; symbolString = ""; symbolPointer = 0; currentSymbol = null; opened = true; timeGrabAction = false; started = false; heldAtom = null; heldAtomRotation = 0; super(_arg1); length = 2; movManipulator.gotoAndStop(1); movClaw = (movManipulator.getChildByName("claw") as MovieClip); movMiddle = (movManipulator.getChildByName("middle") as MovieClip); } override public function SolidBoundingBox():Rectangle{ return (new Rectangle((drawX - 14), (drawY - 14), 29, 29)); } override public function DoEndAction(){ var _local1:*; if (symbolString.length > 0){ symbolPointer = (symbolPointer + 1); if (symbolPointer >= symbolString.length){ _local1 = symbolString.indexOf("j"); if (_local1 == -1){ symbolPointer = 0; } else { symbolPointer = (_local1 + 1); if (symbolPointer >= symbolString.length){ symbolPointer = 0; }; }; }; currentSymbol = symbolString.charAt(symbolPointer); } else { currentSymbol = null; }; SnapManipulator(); SnapHeldAtom(); } public function SnapAngle(_arg1:Number):Number{ if (_arg1 < -45){ return (270); }; if (_arg1 < 45){ return (0); }; if (_arg1 < 135){ return (90); }; if (_arg1 < 225){ return (180); }; if (_arg1 < 315){ return (270); }; return (0); } public function GetClawLocation():Point{ switch (logicalRotation){ case 0: return (new Point(((x + 1) + logicalLength), y)); case 90: return (new Point(x, ((y + 1) + logicalLength))); case 180: return (new Point(((x - 1) - logicalLength), y)); case 270: return (new Point(x, ((y - 1) - logicalLength))); }; return (null); } override public function HitTest(_arg1:int, _arg2:int):Boolean{ return ((movManipulator.getObjectsUnderPoint(new Point(_arg1, _arg2)).length > 0)); } override public function DoGrabAction(){ if (currentSymbol == "c"){ opened = false; GrabAtom(); }; if (currentSymbol == "o"){ opened = true; ReleaseAtom(); }; } override public function Reset(){ started = false; symbolPointer = 0; ReleaseAtom(); rotation = oldRotation; length = oldLength; opened = true; } public function SnapHeldAtom(){ var _local1:*; if (heldAtom != null){ _local1 = GetClawLocation(); heldAtom.MoveToLogicalPosition(_local1.x, _local1.y); heldAtom.rotation = SnapAngle(heldAtom.rotation); heldAtomRotation = heldAtom.rotation; heldAtom.PropogatePlacement(); heldAtom.PropogateSnap(); }; } public function ManipulatorPreDraw(){ var _local1:*; movManipulator.x = drawX; movManipulator.y = drawY; movManipulator.rotation = rotation; movMiddle.x = LinearTween(length, 1, 2, 20, 47); movClaw.x = (LinearTween(length, 1, 2, 58, 87) + LinearTween(length, 2, 3, 0, 29)); if (opened){ movClaw.gotoAndStop(2); } else { movClaw.gotoAndStop(1); }; if (heldAtom != null){ _local1 = GetClawPoint(); heldAtom.drawX = _local1.x; heldAtom.drawY = _local1.y; heldAtom.PropogatePlacement(); }; } public function SimulationStart(){ oldRotation = rotation; oldLength = length; logicalRotation = rotation; logicalLength = length; if (symbolString.length > 0){ currentSymbol = symbolString.charAt(0); } else { currentSymbol = null; }; } override public function Deconstructor(){ } public function LinearTween(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number):Number{ _arg1 = (Math.min(Math.max(_arg1, _arg2), _arg3) - _arg2); return ((((_arg1 * (_arg5 - _arg4)) / (_arg3 - _arg2)) + _arg4)); } override public function Serialize():String{ return ((((((((((("m," + x) + ",") + y) + ",") + rotation) + ",") + length) + ",") + symbolString) + ";")); } override public function DoAction(){ } public function ReleaseAtom(){ if (heldAtom != null){ SnapHeldAtom(); heldAtom.RemoveHeldBy(this); heldAtom = null; }; } public function GetClawPoint():Point{ return (movClaw.localToGlobal(new Point(0, 0))); } public function GrabAtom(){ var _local1:*; if (heldAtom == null){ _local1 = GetClawLocation(); heldAtom = _SM.GetAtomAt(_local1.x, _local1.y); if (heldAtom != null){ if (((!((heldAtom.x == int((((heldAtom.drawX + 14) - 178) / 29))))) || (!((heldAtom.y == int((((heldAtom.drawY + 14) - 22) / 29))))))){ heldAtom = null; }; }; if (heldAtom != null){ heldAtomRotation = heldAtom.rotation; heldAtom.AddHeldBy(this); }; }; } public function CheckForMechanismJam(){ if (((!((heldAtom == null))) && ((heldAtom.heldByList.length > 1)))){ ArrayRemove(heldAtom.heldByList, this); _SM.ForceRedraw(); _SM.collisionPoints = new Array(GetClawPoint(), heldAtom.heldByList[0].GetClawPoint()); _SM.ChangeState("JammedState"); }; } override public function Draw(_arg1:BitmapData, _arg2:Boolean=false){ var _local3:*; var _local4:*; ManipulatorPreDraw(); _local3 = new ColorTransform(); if (_arg2){ _local3.redMultiplier = 2; }; _local4 = new Matrix(); _local4.rotate(((rotation * Math.PI) / 180)); _local4.translate(drawX, drawY); _arg1.draw(movManipulator, _local4, _local3); } override public function Place(_arg1:int, _arg2:int):Boolean{ var _local3:int; var _local4:int; var _local5:int; var _local6:int; _local3 = 0; _local4 = 0; _local5 = 14; _local6 = 14; switch (rotation){ case 0: _local5 = (_local5 - (1 + length)); break; case 180: _local3 = (_local3 + (1 + length)); break; case 90: _local6 = (_local6 - (1 + length)); break; case 270: _local4 = (_local4 + (1 + length)); break; }; oldRotation = rotation; oldLength = length; logicalRotation = rotation; logicalLength = length; return (_Place(_arg1, _arg2, 0, 0, _local3, _local4, _local5, _local6)); } public function SnapManipulator(){ logicalRotation = SnapAngle(rotation); rotation = logicalRotation; if (length < 1.5){ logicalLength = 1; } else { if (length < 2.5){ logicalLength = 2; } else { logicalLength = 3; }; }; length = logicalLength; } override public function Update(_arg1:Number){ if (started == false){ started = true; SimulationStart(); }; if (_SM.timeCount > 0.33){ switch (currentSymbol){ case "l": rotation = (logicalRotation - ((Math.max(0, (_SM.timeCount - 0.33)) * 90) / 0.66)); if (heldAtom != null){ heldAtom.rotation = (heldAtomRotation - ((Math.max(0, (_SM.timeCount - 0.33)) * 90) / 0.66)); CheckForMechanismJam(); }; break; case "r": rotation = (logicalRotation + ((Math.max(0, (_SM.timeCount - 0.33)) * 90) / 0.66)); if (heldAtom != null){ heldAtom.rotation = (heldAtomRotation + ((Math.max(0, (_SM.timeCount - 0.33)) * 90) / 0.66)); CheckForMechanismJam(); }; break; case "u": if (logicalLength < 3){ length = (logicalLength + ((Math.max(0, (_SM.timeCount - 0.33)) * 1) / 0.66)); CheckForMechanismJam(); }; break; case "d": if (logicalLength > 1){ length = (logicalLength - ((Math.max(0, (_SM.timeCount - 0.33)) * 1) / 0.66)); CheckForMechanismJam(); }; break; case "2": if (heldAtom != null){ heldAtom.rotation = (heldAtomRotation - ((Math.max(0, (_SM.timeCount - 0.33)) * 90) / 0.66)); CheckForMechanismJam(); }; break; case "1": if (heldAtom != null){ heldAtom.rotation = (heldAtomRotation + ((Math.max(0, (_SM.timeCount - 0.33)) * 90) / 0.66)); CheckForMechanismJam(); }; break; }; } else { SnapHeldAtom(); }; } } }//package
Section 75
//menu_components (menu_components) package { import flash.display.*; public dynamic class menu_components extends BitmapData { public function menu_components(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 76
//menu_morecomponents (menu_morecomponents) package { import flash.display.*; public dynamic class menu_morecomponents extends BitmapData { public function menu_morecomponents(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 77
//menu_programming (menu_programming) package { import flash.display.*; public dynamic class menu_programming extends BitmapData { public function menu_programming(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 78
//menu_programming_selection (menu_programming_selection) package { import flash.display.*; public dynamic class menu_programming_selection extends BitmapData { public function menu_programming_selection(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 79
//MusicPlayer (MusicPlayer) package { import flash.media.*; import flash.net.*; public class MusicPlayer { public var musicTransform:SoundTransform; public var musicSound:Sound; public var musicChannel:SoundChannel; public function MusicPlayer(){ musicSound = new Sound(); musicChannel = null; musicTransform = new SoundTransform(1); } public function Stop(){ if (musicChannel != null){ musicChannel.stop(); musicChannel = null; }; } public function SetVolume(_arg1:Number){ if (musicChannel != null){ musicTransform.volume = _arg1; musicChannel.soundTransform = musicTransform; }; } public function Play(_arg1:String){ Stop(); if (_arg1 != null){ musicSound = new Sound(); musicSound.load(new URLRequest(_arg1)); musicChannel = musicSound.play(0, 999); musicChannel.soundTransform = musicTransform; }; } } }//package
Section 80
//Note (Note) package { import flash.display.*; import flash.geom.*; public class Note extends Component { public var noteText:String;// = "" private var bmpSprite; public function Note(_arg1:StateMachine){ bmpSprite = new note_icon(35, 39); noteText = ""; super(_arg1); pickable = true; contextHelp = _SM.HELP_NOTE; } override public function DoAction(){ } override public function Draw(_arg1:BitmapData, _arg2:Boolean=false){ Blit(_arg1, bmpSprite, drawX, drawY); } override public function HitTest(_arg1:int, _arg2:int):Boolean{ return (SolidBoundingBox().containsPoint(new Point(_arg1, _arg2))); } override public function Place(_arg1:int, _arg2:int):Boolean{ return (_Place(_arg1, _arg2, 22, 22, 1, 1, 13, 13)); } override public function SolidBoundingBox():Rectangle{ return (new Rectangle((drawX + 1), (drawY + 1), 33, 37)); } } }//package
Section 81
//note_icon (note_icon) package { import flash.display.*; public dynamic class note_icon extends BitmapData { public function note_icon(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 82
//note_large (note_large) package { import flash.display.*; public dynamic class note_large extends BitmapData { public function note_large(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 83
//NoteState (NoteState) package { import flash.events.*; import flash.display.*; import flash.geom.*; public class NoteState extends State { private var noteFont; private var bmpNote:BitmapData; public function NoteState(_arg1:StateMachine){ noteFont = new Georgia14(); bmpNote = new note_large(225, 176); super(_arg1); } override public function OnMouseDown(_arg1:MouseEvent){ _SM.ChangeState("DesignState"); } override public function OnRenderAtEnter(_arg1:BitmapData){ var _local2:int; var _local3:int; var _local4:*; _SM.Blit(_arg1, bmpNote, 278, 141); _local2 = 153; _local4 = _SM.noteText.split("\n"); _local3 = 0; while (_local3 < _local4.length) { _SM.DrawText(_arg1, noteFont, 14, _local4[_local3], 388, _local2); if (_local4[_local3] == ""){ _local2 = (_local2 + 8); } else { _local2 = (_local2 + 16); }; _local3++; }; } } }//package
Section 84
//popup_collision (popup_collision) package { import flash.display.*; public dynamic class popup_collision extends BitmapData { public function popup_collision(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 85
//popup_jammed (popup_jammed) package { import flash.display.*; public dynamic class popup_jammed extends BitmapData { public function popup_jammed(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 86
//popup_quit (popup_quit) package { import flash.display.*; public dynamic class popup_quit extends BitmapData { public function popup_quit(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 87
//popup_win (popup_win) package { import flash.display.*; public dynamic class popup_win extends BitmapData { public function popup_win(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 88
//QuitState (QuitState) package { import flash.events.*; import flash.display.*; public class QuitState extends State { private var bmpPopup:BitmapData; public function QuitState(_arg1:StateMachine){ bmpPopup = new popup_quit(640, 480); super(_arg1); } override public function OnMouseDown(_arg1:MouseEvent){ if ((((((((_arg1.stageX > 35)) && ((_arg1.stageY > 292)))) && ((_arg1.stageX < 110)))) && ((_arg1.stageY < 306)))){ _SM.ChangeState("LevelSelectState"); } else { _SM.ChangeState("DesignState"); }; } override public function OnRenderAtEnter(_arg1:BitmapData){ _SM.Blit(_arg1, bmpPopup); } } }//package
Section 89
//Raster (Raster) package { import flash.display.*; import flash.geom.*; public class Raster { public static function aaCircle(_arg1:BitmapData, _arg2:Number, _arg3:Number, _arg4:int, _arg5:Number):void{ var _local6:int; var _local7:int; var _local8:int; var _local9:Number; var _local10:Number; var _local11:Function; var _local12:Function; _local6 = _arg4; _local7 = 0; _local9 = 0; _local11 = Math.sqrt; _local12 = Math.ceil; _arg1.setPixel((_arg2 + _local6), (_arg3 + _local7), _arg5); _arg1.setPixel((_arg2 - _local6), (_arg3 + _local7), _arg5); _arg1.setPixel((_arg2 + _local7), (_arg3 + _local6), _arg5); _arg1.setPixel((_arg2 + _local7), (_arg3 - _local6), _arg5); while (_local6 > (_local7 + 1)) { _local7++; _local10 = (_local12(_local11(((_arg4 * _arg4) - (_local7 * _local7)))) - _local11(((_arg4 * _arg4) - (_local7 * _local7)))); if (_local10 < _local9){ _local6--; }; drawAlphaPixel(_arg1, (_arg2 + _local6), (_arg3 + _local7), (1 - _local10), _arg5); drawAlphaPixel(_arg1, ((_arg2 + _local6) - 1), (_arg3 + _local7), _local10, _arg5); drawAlphaPixel(_arg1, (_arg2 - _local6), (_arg3 + _local7), (1 - _local10), _arg5); drawAlphaPixel(_arg1, ((_arg2 - _local6) + 1), (_arg3 + _local7), _local10, _arg5); drawAlphaPixel(_arg1, (_arg2 + _local6), (_arg3 - _local7), (1 - _local10), _arg5); drawAlphaPixel(_arg1, ((_arg2 + _local6) - 1), (_arg3 - _local7), _local10, _arg5); drawAlphaPixel(_arg1, (_arg2 - _local6), (_arg3 - _local7), (1 - _local10), _arg5); drawAlphaPixel(_arg1, ((_arg2 - _local6) + 1), (_arg3 - _local7), _local10, _arg5); drawAlphaPixel(_arg1, (_arg2 + _local7), (_arg3 + _local6), (1 - _local10), _arg5); drawAlphaPixel(_arg1, (_arg2 + _local7), ((_arg3 + _local6) - 1), _local10, _arg5); drawAlphaPixel(_arg1, (_arg2 - _local7), (_arg3 + _local6), (1 - _local10), _arg5); drawAlphaPixel(_arg1, (_arg2 - _local7), ((_arg3 + _local6) - 1), _local10, _arg5); drawAlphaPixel(_arg1, (_arg2 + _local7), (_arg3 - _local6), (1 - _local10), _arg5); drawAlphaPixel(_arg1, (_arg2 + _local7), ((_arg3 - _local6) + 1), _local10, _arg5); drawAlphaPixel(_arg1, (_arg2 - _local7), (_arg3 - _local6), (1 - _local10), _arg5); drawAlphaPixel(_arg1, (_arg2 - _local7), ((_arg3 - _local6) + 1), _local10, _arg5); _local9 = _local10; }; } public static function cubicBezier(_arg1:BitmapData, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int, _arg8:int, _arg9:int, _arg10:Number, _arg11:int=5):void{ var _local12:Number; var _local13:Number; var _local14:int; var _local15:int; 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:int; var _local25:int; var _local26:int; var _local27:int; _local12 = _arg2; _local13 = _arg3; _local16 = 0; _local17 = (1 / _arg11); _local24 = 0; while (++_local24 <= _arg11) { _local18 = (_local17 * _local24); _local19 = ((_local17 * _local24) * _local18); _local20 = (_local19 * _local18); _local21 = (1 - _local18); _local22 = ((1 - _local18) * _local21); _local23 = (_local22 * _local21); _local14 = ((((_local23 * _arg2) + (((3 * _local18) * _local22) * _arg4)) + (((3 * _arg6) * _local19) * _local21)) + (_arg8 * _local20)); _local15 = ((((_local23 * _arg3) + (((3 * _local18) * _local22) * _arg5)) + (((3 * _arg7) * _local19) * _local21)) + (_arg9 * _local20)); _local16 = (_local16 + Math.sqrt((((_local14 - _local12) * (_local14 - _local12)) + ((_local15 - _local13) * (_local15 - _local13))))); _local12 = _local14; _local13 = _local15; }; _local25 = Math.floor(_local16); _local17 = (1 / _local25); _local26 = _arg2; _local27 = _arg3; _local24 = -1; while (++_local24 <= _local25) { _local18 = (_local17 * _local24); _local19 = ((_local17 * _local24) * _local18); _local20 = (_local19 * _local18); _local21 = (1 - _local18); _local22 = ((1 - _local18) * _local21); _local23 = (_local22 * _local21); _local14 = ((((_local23 * _arg2) + (((3 * _local18) * _local22) * _arg4)) + (((3 * _arg6) * _local19) * _local21)) + (_arg8 * _local20)); _local15 = ((((_local23 * _arg3) + (((3 * _local18) * _local22) * _arg5)) + (((3 * _arg7) * _local19) * _local21)) + (_arg9 * _local20)); line(_arg1, _local26, _local27, _local14, _local15, _arg10); _local26 = _local14; _local27 = _local15; }; } private static function checkLine(_arg1:Object, _arg2:int, _arg3:int, _arg4:BitmapData, _arg5:int, _arg6:Rectangle):void{ if (_arg1[_arg3]){ if (_arg1[_arg3] > _arg2){ _arg6.width = (_arg1[_arg3] - _arg2); _arg6.x = _arg2; _arg6.y = _arg3; _arg4.fillRect(_arg6, _arg5); } else { _arg6.width = (_arg2 - _arg1[_arg3]); _arg6.x = _arg1[_arg3]; _arg6.y = _arg3; _arg4.fillRect(_arg6, _arg5); }; } else { _arg1[_arg3] = _arg2; }; } public static function line(_arg1:BitmapData, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:Number):void{ var _local7:int; var _local8:int; var _local9:int; var _local10:int; var _local11:int; var _local12:int; var _local13:int; var _local14:int; _local13 = _arg2; _local14 = _arg3; _local7 = (_arg4 - _arg2); _local8 = (_arg5 - _arg3); _local10 = ((_local7)>0) ? 1 : -1; _local11 = ((_local8)>0) ? 1 : -1; _local7 = Math.abs(_local7); _local8 = Math.abs(_local8); _arg1.setPixel32(_local13, _local14, _arg6); if (_local7 > _local8){ _local12 = (_local7 / 2); _local9 = 1; while (_local9 <= _local7) { _local13 = (_local13 + _local10); _local12 = (_local12 + _local8); if (_local12 >= _local7){ _local12 = (_local12 - _local7); _local14 = (_local14 + _local11); }; _arg1.setPixel32(_local13, _local14, _arg6); _local9++; }; } else { _local12 = (_local8 / 2); _local9 = 1; while (_local9 <= _local8) { _local14 = (_local14 + _local11); _local12 = (_local12 + _local7); if (_local12 >= _local8){ _local12 = (_local12 - _local8); _local13 = (_local13 + _local10); }; _arg1.setPixel32(_local13, _local14, _arg6); _local9++; }; }; } public static function quadBezier(_arg1:BitmapData, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int, _arg8:Number, _arg9:int=3):void{ var _local10:Number; var _local11:Number; var _local12:int; var _local13:int; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:int; var _local21:int; var _local22:int; var _local23:int; _local10 = _arg2; _local11 = _arg3; _local14 = 0; _local15 = (1 / _arg9); _local20 = 0; while (++_local20 <= _arg9) { _local16 = (_local15 * _local20); _local17 = ((_local15 * _local20) * _local16); _local18 = (1 - _local16); _local19 = ((1 - _local16) * _local18); _local12 = (((_local19 * _arg2) + (((2 * _local16) * _local18) * _arg4)) + (_local17 * _arg6)); _local13 = (((_local19 * _arg3) + (((2 * _local16) * _local18) * _arg5)) + (_local17 * _arg7)); _local14 = (_local14 + Math.sqrt((((_local12 - _local10) * (_local12 - _local10)) + ((_local13 - _local11) * (_local13 - _local11))))); _local10 = _local12; _local11 = _local13; }; _local21 = Math.floor(_local14); _local15 = (1 / _local21); _local22 = _arg2; _local23 = _arg3; _local20 = -1; while (++_local20 <= _local21) { _local16 = (_local15 * _local20); _local17 = ((_local15 * _local20) * _local16); _local18 = (1 - _local16); _local19 = ((1 - _local16) * _local18); _local12 = (((_local19 * _arg2) + (((2 * _local16) * _local18) * _arg4)) + (_local17 * _arg6)); _local13 = (((_local19 * _arg3) + (((2 * _local16) * _local18) * _arg5)) + (_local17 * _arg7)); line(_arg1, _local22, _local23, _local12, _local13, _arg8); _local22 = _local12; _local23 = _local13; }; } public static function circle(_arg1:BitmapData, _arg2:int, _arg3:int, _arg4:int, _arg5:Number):void{ var _local6:int; var _local7:int; var _local8:int; _local6 = 0; _local7 = _arg4; _local8 = (1 - _arg4); _arg1.setPixel32((_arg2 + _local6), (_arg3 + _local7), _arg5); _arg1.setPixel32((_arg2 + _local6), (_arg3 - _local7), _arg5); _arg1.setPixel32((_arg2 - _local7), (_arg3 + _local6), _arg5); _arg1.setPixel32((_arg2 + _local7), (_arg3 + _local6), _arg5); while (_local7 > _local6) { if (_local8 < 0){ _local8 = (_local8 + ((2 * _local6) + 3)); } else { _local8 = (_local8 + ((2 * (_local6 - _local7)) + 5)); _local7--; }; _local6++; _arg1.setPixel32((_arg2 + _local6), (_arg3 + _local7), _arg5); _arg1.setPixel32((_arg2 - _local6), (_arg3 + _local7), _arg5); _arg1.setPixel32((_arg2 + _local6), (_arg3 - _local7), _arg5); _arg1.setPixel32((_arg2 - _local6), (_arg3 - _local7), _arg5); _arg1.setPixel32((_arg2 - _local7), (_arg3 + _local6), _arg5); _arg1.setPixel32((_arg2 - _local7), (_arg3 - _local6), _arg5); _arg1.setPixel32((_arg2 + _local7), (_arg3 - _local6), _arg5); _arg1.setPixel32((_arg2 + _local7), (_arg3 + _local6), _arg5); }; } public static function triangle(_arg1:BitmapData, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int, _arg8:Number):void{ line(_arg1, _arg2, _arg3, _arg4, _arg5, _arg8); line(_arg1, _arg4, _arg5, _arg6, _arg7, _arg8); line(_arg1, _arg6, _arg7, _arg2, _arg3, _arg8); } public static function filledTri(_arg1:BitmapData, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int, _arg8:Number):void{ var _local9:Object; _local9 = {}; lineTri(_local9, _arg1, _arg2, _arg3, _arg4, _arg5, _arg8); lineTri(_local9, _arg1, _arg4, _arg5, _arg6, _arg7, _arg8); lineTri(_local9, _arg1, _arg6, _arg7, _arg2, _arg3, _arg8); } public static function aaLine(_arg1:BitmapData, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:Number):void{ var _local7:Boolean; var _local8:int; var _local9:int; var _local10:int; var _local11:Number; var _local12:int; var _local13:Number; var _local14:Number; var _local15:int; var _local16:int; var _local17:Number; var _local18:Number; var _local19:int; var _local20:int; var _local21:int; _local7 = (Math.abs((_arg5 - _arg3)) > Math.abs((_arg4 - _arg2))); if (_local7){ _local8 = _arg2; _arg2 = _arg3; _arg3 = _local8; _local8 = _arg4; _arg4 = _arg5; _arg5 = _local8; }; if (_arg2 > _arg4){ _local8 = _arg2; _arg2 = _arg4; _arg4 = _local8; _local8 = _arg3; _arg3 = _arg5; _arg5 = _local8; }; _local9 = (_arg4 - _arg2); _local10 = (_arg5 - _arg3); _local11 = (_local10 / _local9); _local12 = _arg2; _local13 = (_arg3 + (_local11 * (_local12 - _arg2))); _local14 = (1 - ((_arg2 + 0.5) % 1)); _local15 = _local12; _local16 = Math.floor(_local13); _local17 = ((1 - (_local13 % 1)) * _local14); if (_local7){ }; _local17 = ((_local13 % 1) * _local14); if (_local7){ }; _local18 = (_local13 + _local11); _local12 = _arg4; _local13 = (_arg5 + (_local11 * (_local12 - _arg4))); _local14 = ((_arg4 + 0.5) % 1); _local19 = _local12; _local20 = Math.floor(_local13); _local17 = ((1 - (_local13 % 1)) * _local14); if (_local7){ drawAlphaPixel(_arg1, _local20, _local19, _local17, _arg6); } else { drawAlphaPixel(_arg1, _local19, _local20, _local17, _arg6); }; _local17 = ((_local13 % 1) * _local14); if (_local7){ drawAlphaPixel(_arg1, (_local20 + 1), _local19, _local17, _arg6); } else { drawAlphaPixel(_arg1, _local19, (_local20 + 1), _local17, _arg6); }; _local21 = _local15; while (_local21++ < _local19) { _local17 = (1 - (_local18 % 1)); if (_local7){ drawAlphaPixel(_arg1, _local18, _local21, _local17, _arg6); } else { drawAlphaPixel(_arg1, _local21, _local18, _local17, _arg6); }; _local17 = (_local18 % 1); if (_local7){ drawAlphaPixel(_arg1, (_local18 + 1), _local21, _local17, _arg6); } else { drawAlphaPixel(_arg1, _local21, (_local18 + 1), _local17, _arg6); }; _local18 = (_local18 + _local11); }; } private static function drawAlphaPixel(_arg1:BitmapData, _arg2:int, _arg3:int, _arg4:Number, _arg5:Number):void{ var _local6:uint; var _local7:uint; var _local8:uint; var _local9:uint; var _local10:uint; var _local11:uint; var _local12:uint; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:uint; _local6 = _arg1.getPixel32(_arg2, _arg3); _local7 = ((_local6 & 0xFF0000) >> 16); _local8 = ((_local6 & 0xFF00) >> 8); _local9 = (_local6 & 0xFF); _local10 = ((_arg5 & 0xFF0000) >> 16); _local11 = ((_arg5 & 0xFF00) >> 8); _local12 = (_arg5 & 0xFF); _local13 = 0xFF; _local14 = ((_local10 * _arg4) + (_local7 * (1 - _arg4))); _local15 = ((_local11 * _arg4) + (_local8 * (1 - _arg4))); _local16 = ((_local12 * _arg4) + (_local9 * (1 - _arg4))); _local17 = ((((_local13 << 24) + (_local14 << 16)) + (_local15 << 8)) + _local16); _arg1.setPixel32(_arg2, _arg3, _local17); } private static function lineTri(_arg1:Object, _arg2:BitmapData, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:Number):void{ var _local8:Boolean; var _local9:int; var _local10:int; var _local11:int; var _local12:int; var _local13:int; var _local14:int; var _local15:int; var _local16:int; var _local17:int; var _local18:int; var _local19:Rectangle; var _local20:int; _local8 = (((_arg6 - _arg4) * (_arg6 - _arg4)) > ((_arg5 - _arg3) * (_arg5 - _arg3))); if (_local8){ _local9 = _arg3; _arg3 = _arg4; _arg4 = _local9; _local9 = _arg5; _arg5 = _arg6; _arg6 = _local9; }; if (_arg3 > _arg5){ _arg3 = (_arg3 ^ _arg5); _arg5 = (_arg5 ^ _arg3); _arg3 = (_arg3 ^ _arg5); _arg4 = (_arg4 ^ _arg6); _arg6 = (_arg6 ^ _arg4); _arg4 = (_arg4 ^ _arg6); }; _local10 = (_arg5 - _arg3); _local11 = Math.abs((_arg6 - _arg4)); _local12 = 0; _local13 = _arg4; _local14 = ((_arg4 < _arg6)) ? 1 : -1; _local15 = _arg3; _local16 = (_arg5 - (_local10 >> 1)); _local17 = _arg5; _local18 = _arg6; _local19 = new Rectangle(); _local20 = 0; _local19.x = 0; _local19.y = 0; _local19.width = 0; _local19.height = 1; while (_local15++ <= _local16) { if (_local8){ checkLine(_arg1, _local13, _local15, _arg2, _arg7, _local19); if (((!((_local17 == _arg5))) && (!((_local17 == _local16))))){ checkLine(_arg1, _local18, (_local17 + 1), _arg2, _arg7, _local19); }; }; _local12 = (_local12 + _local11); if ((_local12 << 1) >= _local10){ if (!_local8){ checkLine(_arg1, ((_local15 - _local20) + 1), _local13, _arg2, _arg7, _local19); if (_local17 != _local16){ checkLine(_arg1, (_local17 + 1), _local18, _arg2, _arg7, _local19); }; }; _local20 = 0; _local13 = (_local13 + _local14); _local18 = (_local18 - _local14); _local12 = (_local12 - _local10); }; _local20++; _local17--; }; if (!_local8){ checkLine(_arg1, ((_local15 - _local20) + 1), _local13, _arg2, _arg7, _local19); }; } } }//package
Section 90
//SaveState (SaveState) package { import flash.events.*; import flash.display.*; import flash.geom.*; import flash.text.*; public class SaveState extends State { private var clickList:Array; private var textField:TextField;// = null private var bmpBackground:BitmapData; private var saveFont:Font; public function SaveState(_arg1:StateMachine){ bmpBackground = new img_save(640, 480); clickList = new Array(new ClickRegion(new Rectangle(30, 454, 41, 21), "back")); textField = null; saveFont = new Georgia10(); super(_arg1); } override public function OnEnter(_arg1:String){ var _local2:*; var _local3:int; var _local4:*; _local2 = ""; _local3 = 0; while (_local3 < _SM.glyphList.length) { _local2 = (_local2 + _SM.glyphList[_local3].Serialize()); _local3++; }; _local3 = 0; while (_local3 < _SM.manipulatorList.length) { _local2 = (_local2 + _SM.manipulatorList[_local3].Serialize()); _local3++; }; _local4 = new TextFormat(); _local4.font = saveFont.fontName; _local4.size = 10; _local4.color = 4281018399; textField = new TextField(); textField.text = _local2; textField.embedFonts = true; textField.autoSize = TextFieldAutoSize.LEFT; textField.setTextFormat(_local4); textField.multiline = true; textField.wordWrap = true; textField.x = 185; textField.y = 71; textField.width = (572 - 185); textField.height = (449 - 71); _SM.stage.addChild(textField); } override public function OnMouseDown(_arg1:MouseEvent){ var _local2:*; _local2 = ClickRegion.HitTest(clickList, _arg1.stageX, _arg1.stageY); switch (_local2){ case "back": _SM.ChangeState("DesignState"); break; }; } override public function OnRenderAtEnter(_arg1:BitmapData){ _SM.Blit(_arg1, bmpBackground); } override public function OnLeave(_arg1:String){ _SM.stage.removeChild(textField); } } }//package
Section 91
//SimulationState (SimulationState) package { import flash.events.*; import flash.display.*; import flash.geom.*; public class SimulationState extends State { private var timeCount:Number;// = 0 private var clkMenu:Array; private var j:int; private var zbmpSymbols:Array; private var bmpBackground:BitmapData; private var bmpSymbolActive:BitmapData; private var bmpMenuProgrammingArm:BitmapData; private var i:int; private var bmpMenuProgramming:BitmapData; private var bmpButtons:BitmapData; public function SimulationState(_arg1:StateMachine){ zbmpSymbols = new Array(); bmpMenuProgramming = new menu_programming(640, 480); bmpMenuProgrammingArm = new menu_programming_selection(640, 480); bmpBackground = new img_background(640, 480); bmpButtons = new buttons_simulation(640, 480); bmpSymbolActive = new symbol_active(31, 16); timeCount = 0; clkMenu = new Array(new ClickRegion(new Rectangle(92, 432, 46, 21), "stop")); super(_arg1); zbmpSymbols["w"] = new symbol_w(31, 16); zbmpSymbols["l"] = new symbol_l(31, 16); zbmpSymbols["r"] = new symbol_r(31, 16); zbmpSymbols["u"] = new symbol_u(31, 16); zbmpSymbols["d"] = new symbol_d(31, 16); zbmpSymbols["o"] = new symbol_o(31, 16); zbmpSymbols["c"] = new symbol_c(31, 16); zbmpSymbols["1"] = new symbol_1(31, 16); zbmpSymbols["2"] = new symbol_2(31, 16); zbmpSymbols["j"] = new symbol_j(31, 16); } override public function OnEnter(_arg1:String){ _SM.timeCount = 0; _SM.timeAction = false; _SM.timeGrabAction = false; } override public function OnKeyUp(_arg1:KeyboardEvent){ } override public function OnMouseUp(_arg1:MouseEvent){ } override public function OnKeyDown(_arg1:KeyboardEvent){ if (_arg1.keyCode == 32){ _SM.ChangeState("DesignState"); }; } override public function OnMouseDown(_arg1:MouseEvent){ var _local2:*; var _local3:Point; _local2 = ClickRegion.HitTest(clkMenu, _arg1.stageX, _arg1.stageY); _local3 = null; switch (_local2){ case "stop": _SM.ChangeState("DesignState"); break; default: _local2 = null; break; }; if (_local2 != null){ return; }; if (_arg1.stageX > 155){ _SM.selectedManipulator = null; }; i = 0; while (i < _SM.manipulatorList.length) { if (_SM.manipulatorList[i].HitTest(_arg1.stageX, _arg1.stageY)){ _SM.selectedManipulator = _SM.manipulatorList[i]; }; i++; }; } override public function OnUpdate(_arg1:Number, _arg2:int, _arg3:int){ var _local4:*; var _local5:*; var _local6:*; _SM.timeCount = (_SM.timeCount + _arg1); if ((((_SM.timeCount > 0.16)) && ((_SM.timeAction == false)))){ _SM.timeAction = true; i = 0; while (i < _SM.glyphList.length) { _SM.glyphList[i].DoAction(); i++; }; i = 0; while (i < _SM.manipulatorList.length) { _SM.manipulatorList[i].DoAction(); i++; }; }; if ((((_SM.timeCount > 0.66)) && ((_SM.timeGrabAction == false)))){ _SM.timeGrabAction = true; i = 0; while (i < _SM.glyphList.length) { _SM.glyphList[i].DoGrabAction(); i++; }; i = 0; while (i < _SM.manipulatorList.length) { _SM.manipulatorList[i].DoGrabAction(); i++; }; }; if (_SM.timeCount > 1){ _SM.timeCount = 0; _SM.timeAction = false; _SM.timeGrabAction = false; i = 0; while (i < _SM.glyphList.length) { _SM.glyphList[i].DoEndAction(); i++; }; i = 0; while (i < _SM.manipulatorList.length) { _SM.manipulatorList[i].DoEndAction(); i++; }; }; i = 0; while (i < _SM.glyphList.length) { _SM.glyphList[i].Update(_arg1); i++; }; i = 0; while (i < _SM.manipulatorList.length) { _SM.manipulatorList[i].Update(_arg1); i++; }; i = 0; while (i < _SM.atomList.length) { j = i; while (j < _SM.atomList.length) { if (i != j){ _local4 = _SM.atomList[i]; _local5 = _SM.atomList[j]; _local6 = Math.sqrt((Math.pow((_local4.drawX - _local5.drawX), 2) + Math.pow((_local4.drawY - _local5.drawY), 2))); if (_local6 < 23){ _SM.collisionPoints = new Array(new Point(_local4.drawX, _local4.drawY), new Point(_local5.drawX, _local5.drawY)); _SM.ChangeState("CollisionState"); return; }; }; j++; }; i++; }; } override public function OnRenderAtUpdate(_arg1:BitmapData){ var _local2:*; var _local3:*; _SM.Blit(_arg1, bmpBackground); _SM.Blit(_arg1, bmpButtons); _SM.Blit(_arg1, bmpMenuProgramming); _SM.DrawHelp(_arg1); if (_SM.selectedManipulator != null){ _SM.Blit(_arg1, bmpMenuProgrammingArm); i = 0; while (i < _SM.selectedManipulator.symbolString.length) { _local2 = _SM.selectedManipulator.symbolString.charAt(i); _SM.Blit(_arg1, zbmpSymbols[_local2], 68, (72 + (17 * i))); if (i == _SM.selectedManipulator.symbolPointer){ _SM.Blit(_arg1, bmpSymbolActive, 68, (72 + (17 * i))); }; i++; }; }; i = 0; while (i < _SM.glyphList.length) { _SM.glyphList[i].Draw(_arg1); i++; }; i = 0; while (i < _SM.manipulatorList.length) { _SM.manipulatorList[i].ManipulatorPreDraw(); i++; }; i = 0; while (i < _SM.atomList.length) { j = 0; while (j < _SM.atomList[i].links.length) { _local3 = _SM.atomList[i].links[j]; _SM.DrawLink(_arg1, _local3.atom1.drawX, _local3.atom1.drawY, _local3.atom2.drawX, _local3.atom2.drawY); j++; }; i++; }; i = 0; while (i < _SM.atomList.length) { _SM.atomList[i].Draw(_arg1); i++; }; i = 0; while (i < _SM.manipulatorList.length) { _SM.manipulatorList[i].Draw(_arg1, (_SM.manipulatorList[i] == _SM.selectedManipulator)); i++; }; } override public function OnLeave(_arg1:String){ } } }//package
Section 92
//SolutionAtom (SolutionAtom) package { import flash.display.*; import flash.geom.*; public class SolutionAtom { public var linkAngle:Number; public var atomType:int; public var x:int; public var y:int; public static const ATOM_SALT = 0; public static const ATOM_MERCURY = 1; public static const ATOM_COPPER = 10; public static const ATOM_WATER = 5; public static const ATOM_EARTH = 4; public static const ATOM_LEAD = 7; public static const ATOM_TIN = 8; public static const ATOM_GOLD = 12; public static const ATOM_FIRE = 3; public static const ATOM_SULFUR = 2; public static const ATOM_IRON = 9; public static const ATOM_SILVER = 11; public static const ATOM_AIR = 6; private static var zbmpSprites:Array = new Array(); private static var bmpBackfill = new atom_backfill(29, 29); private static var bmpAlpha = new atom_alpha(29, 29); private static var spritesLoaded:Boolean = false; public function SolutionAtom(_arg1:int, _arg2:int, _arg3:int, _arg4:Number){ if (spritesLoaded == false){ zbmpSprites.push(new atom_salt(23, 23)); zbmpSprites.push(new atom_mercury(23, 23)); zbmpSprites.push(new atom_sulfur(23, 23)); zbmpSprites.push(new atom_fire(23, 23)); zbmpSprites.push(new atom_earth(23, 23)); zbmpSprites.push(new atom_water(23, 23)); zbmpSprites.push(new atom_air(23, 23)); zbmpSprites.push(new atom_lead(23, 23)); zbmpSprites.push(new atom_tin(23, 23)); zbmpSprites.push(new atom_iron(23, 23)); zbmpSprites.push(new atom_copper(23, 23)); zbmpSprites.push(new atom_silver(23, 23)); zbmpSprites.push(new atom_gold(23, 23)); spritesLoaded = true; }; this.atomType = _arg1; this.x = _arg2; this.y = _arg3; this.linkAngle = _arg4; } public function Draw(_arg1:BitmapData, _arg2:int, _arg3:int){ _arg1.copyPixels(bmpBackfill, new Rectangle(0, 0, 29, 29), new Point(((_arg2 + (x * 29)) + 3), ((_arg3 + (y * 29)) + 3))); _arg1.copyPixels(zbmpSprites[atomType], new Rectangle(0, 0, 29, 29), new Point(((_arg2 + (x * 29)) + 3), ((_arg3 + (y * 29)) + 3)), bmpAlpha); } } }//package
Section 93
//State (State) package { import flash.events.*; import flash.display.*; public class State { public var _SM:StateMachine; public function State(_arg1:StateMachine){ _SM = _arg1; } public function OnEnter(_arg1:String){ } public function OnKeyDown(_arg1:KeyboardEvent){ } public function OnMouseUp(_arg1:MouseEvent){ } public function OnMouseDown(_arg1:MouseEvent){ } public function OnUpdate(_arg1:Number, _arg2:int, _arg3:int){ } public function OnRenderAtEnter(_arg1:BitmapData){ } public function OnRenderAtUpdate(_arg1:BitmapData){ } public function OnLeave(_arg1:String){ } public function OnKeyUp(_arg1:KeyboardEvent){ } public function ArrayRemove(_arg1:Array, _arg2:Object){ if (ArrayContains(_arg1, _arg2)){ _arg1.splice(_arg1.indexOf(_arg2), 1); }; } public function ArrayContains(_arg1:Array, _arg2:Object):Boolean{ var _local3:int; _local3 = 0; while (_local3 < _arg1.length) { if (_arg1[_local3] == _arg2){ return (true); }; _local3++; }; return (false); } } }//package
Section 94
//StateMachine (StateMachine) package { import flash.events.*; import flash.display.*; import flash.geom.*; import com.kongregate.as3.client.*; import flash.text.*; import flash.net.*; import flash.utils.*; public class StateMachine extends MovieClip { public const HELP_NOTE = "This is a note. Click it to read it."; public const HELP_GLYPH_TARGET = "To be accepted, the compound must be moved inside this glyph and oriented as shown."; public const MENUSTATE_PROGRAMMING = 2; public const HELP_GLYPH_PROJECTION = "This glyph will take a Planetary Metals and, with Mercury, raise it to the next Metal."; public const HELP_GLYPH_CALCINATION = "Moving one of the Four Elements onto a Glyph of Calcination will turn it to salt."; public const HELP_GLYPH_DUPLICATION = "This glyph will copy an Element, placed on the left, using salt, placed on the right."; public const MENUSTATE_COMPONENTS = 0; public const HELP_GLYPH_SPAWNING = "This glyph creates atoms of the type shown."; public const HELP_GLYPH_TRANSMUTATION = "Moving one of the Three Primes onto this glyph will transmute it to another."; public const MENUSTATE_MORECOMPONENTS = 1; public const HELP_GLYPH_BINDING = "The Glyph of Binding creates a bond between two atoms, causing them to move together."; public var sharedObject; public var selectedManipulator:Manipulator;// = null public var dragComponent:Component;// = null public var noteText:String;// = "" public var musicMuted:Boolean;// = false public var timeCount:Number;// = 0 private var bmpScreen:BitmapData; public var timeGrabAction:Boolean;// = false private var i:int; private var j:int; private var lastTimer:int;// = 0 public var maxLevel:int;// = 0 public var menuState:int;// = 0 public var collisionPoints:Array;// = null private var keysDown:Array; public var levelHelp:String;// = "" public var bmpMuted; public var dragDelta:Point;// = null public var symbolHelp:Array; public var oldLocation:Point;// = null public var helpFont:Font; public var timeAction:Boolean;// = false public var musicPlayer; public var manipulatorList:Array;// = null private var screenContainer:Bitmap; public var currentLevel:int;// = 0 public var atomList:Array;// = null public var contextHelp:String;// = "" private var gameStateType:String;// = "" public var bmpMusic; private var gameState:State;// = null public var dragManipulator:Boolean;// = false public var kongregate:KongregateAPI;// = null public var glyphList:Array;// = null public function StateMachine(){ menuState = MENUSTATE_COMPONENTS; selectedManipulator = null; dragComponent = null; dragDelta = null; dragManipulator = false; oldLocation = null; glyphList = null; manipulatorList = null; atomList = null; contextHelp = ""; levelHelp = ""; helpFont = new Georgia10(); symbolHelp = new Array(); noteText = ""; maxLevel = 0; currentLevel = 0; sharedObject = SharedObject.getLocal("__codexSaveData"); musicPlayer = new MusicPlayer(); musicMuted = false; bmpMusic = new icon_sound(11, 11); bmpMuted = new icon_mute(11, 11); collisionPoints = null; timeCount = 0; timeAction = false; timeGrabAction = false; kongregate = null; gameState = null; gameStateType = ""; lastTimer = 0; keysDown = new Array(); super(); addEventListener(Event.ENTER_FRAME, OnTick); addEventListener(Event.ADDED_TO_STAGE, OnAddedToStage); } public function LinkExistsBetween(_arg1:Atom, _arg2:Atom):Boolean{ var _local3:*; i = 0; while (i < atomList.length) { j = 0; while (j < atomList[i].links.length) { _local3 = atomList[i].links[j]; if ((((_local3.atom1 == _arg1)) && ((_local3.atom2 == _arg2)))){ return (true); }; if ((((_local3.atom2 == _arg1)) && ((_local3.atom1 == _arg2)))){ return (true); }; j++; }; i++; }; return (false); } public function CreateGlyphSpawning(_arg1:int, _arg2:int, _arg3:int):GlyphSpawning{ var _local4:*; _local4 = new GlyphSpawning(this); _local4.x = _arg2; _local4.y = _arg3; _local4.drawX = ((178 + (29 * _arg2)) - 22); _local4.drawY = ((22 + (29 * _arg3)) - 22); _local4.atomType = _arg1; glyphList.push(_local4); return (_local4); } public function InitStateType(_arg1:State){ } public function ArrayRemove(_arg1:Array, _arg2:Object){ if (ArrayContains(_arg1, _arg2)){ _arg1.splice(_arg1.indexOf(_arg2), 1); }; } private function OnTick(_arg1:Event){ var _local2:*; var _local3:*; _local2 = getTimer(); _local3 = ((_local2 - lastTimer) / 1000); lastTimer = _local2; gameState.OnUpdate(_local3, mouseX, mouseY); gameState.OnRenderAtUpdate(bmpScreen); DrawSoundIcon(); } public function ClearDesign(){ selectedManipulator = null; dragComponent = null; dragDelta = null; dragManipulator = false; oldLocation = null; glyphList = new Array(); manipulatorList = new Array(); atomList = new Array(); } public function CreateAtom(_arg1:int, _arg2:int, _arg3:int):Atom{ var _local4:*; _local4 = new Atom(); _local4.atomType = _arg1; _local4.MoveToLogicalPosition(_arg2, _arg3); atomList.push(_local4); return (_local4); } private function OnKeyUp(_arg1:KeyboardEvent){ ArrayRemove(keysDown, _arg1.keyCode); gameState.OnKeyUp(_arg1); } public function GetAtomAt(_arg1:int, _arg2:int):Atom{ i = 0; while (i < atomList.length) { if ((((atomList[i].x == _arg1)) && ((atomList[i].y == _arg2)))){ return (atomList[i]); }; i++; }; return (null); } public function ChangeState(_arg1:String){ var _local2:Class; if (gameState != null){ gameState.OnLeave(_arg1); }; _local2 = (getDefinitionByName(_arg1) as Class); gameState = (new _local2(this) as State); gameState.OnEnter(gameStateType); gameState.OnRenderAtEnter(bmpScreen); gameStateType = _arg1; DrawSoundIcon(); } public function DrawText(_arg1:BitmapData, _arg2:Font, _arg3:int, _arg4:String, _arg5:int, _arg6:int, _arg7:uint=4281018399){ var _local8:*; var _local9:*; var _local10:*; _local8 = new TextFormat(); _local8.font = _arg2.fontName; _local8.size = _arg3; _local8.color = _arg7; _local9 = new TextField(); _local9.text = _arg4; _local9.embedFonts = true; _local9.autoSize = TextFieldAutoSize.LEFT; _local9.setTextFormat(_local8); _local10 = new Matrix(); _local10.translate((_arg5 - (_local9.textWidth / 2)), _arg6); _arg1.draw(_local9, _local10); } public function ForceRedraw(){ gameState.OnRenderAtUpdate(bmpScreen); DrawSoundIcon(); } public function DrawHelp(_arg1){ DrawText(_arg1, helpFont, 10, contextHelp, 380, 457); } private function OnKeyDown(_arg1:KeyboardEvent){ if (!ArrayContains(keysDown, _arg1.keyCode)){ gameState.OnKeyDown(_arg1); keysDown.push(_arg1.keyCode); }; } public function ClampAngle(_arg1:Number):Number{ while (_arg1 < 0) { _arg1 = (_arg1 + 360); }; while (_arg1 >= 360) { _arg1 = (_arg1 - 360); }; return (_arg1); } public function Blit(_arg1:BitmapData, _arg2:BitmapData, _arg3:int=0, _arg4:int=0){ _arg1.copyPixels(_arg2, new Rectangle(0, 0, _arg2.width, _arg2.height), new Point(_arg3, _arg4)); } public function DrawSoundIcon(){ if (gameStateType != "TitleState"){ if (musicMuted){ Blit(bmpScreen, bmpMuted, 16, 459); } else { Blit(bmpScreen, bmpMusic, 16, 459); }; }; } public function CreateNote(_arg1:String, _arg2:int, _arg3:int):Note{ var _local4:*; _local4 = new Note(this); _local4.x = _arg2; _local4.y = _arg3; _local4.drawX = ((178 + (29 * _arg2)) - 18); _local4.drawY = ((22 + (29 * _arg3)) - 20); _local4.noteText = _arg1; glyphList.push(_local4); return (_local4); } public function CreateGlyphTarget(_arg1:String, _arg2:int, _arg3:int):GlyphTarget{ var _local4:*; _local4 = new GlyphTarget(this); _local4.x = _arg2; _local4.y = _arg3; _local4.drawX = ((178 + (29 * _arg2)) - 72); _local4.drawY = ((22 + (29 * _arg3)) - 72); _local4.text = _arg1; glyphList.push(_local4); return (_local4); } private function OnMouseUp(_arg1:MouseEvent){ gameState.OnMouseUp(_arg1); } public function LinkAtoms(_arg1:Atom, _arg2:Atom){ var _local3:Number; var _local4:*; _local3 = -1; if ((((_arg2.x == (_arg1.x + 1))) && ((_arg2.y == _arg1.y)))){ _local3 = 0; } else { if ((((_arg2.x == (_arg1.x - 1))) && ((_arg2.y == _arg1.y)))){ _local3 = 180; } else { if ((((_arg2.y == (_arg1.y + 1))) && ((_arg2.x == _arg1.x)))){ _local3 = 90; } else { if ((((_arg2.y == (_arg1.y - 1))) && ((_arg2.x == _arg1.x)))){ _local3 = 270; }; }; }; }; if (_local3 != -1){ _local4 = new Link(_arg1, _arg2, ClampAngle((_local3 - _arg1.rotation)), ClampAngle((_arg2.rotation - _arg1.rotation))); _arg1.links.push(_local4); _arg2.links.push(_local4); }; } public function ArrayContains(_arg1:Array, _arg2:Object):Boolean{ var _local3:int; _local3 = 0; while (_local3 < _arg1.length) { if (_arg1[_local3] == _arg2){ return (true); }; _local3++; }; return (false); } public function DrawLink(_arg1:BitmapData, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:Boolean=false){ var _local7:Number; _local7 = 1; if (_arg6){ _local7 = 0.5; }; Raster.line(_arg1, (_arg2 + 1), (_arg3 + 1), (_arg4 + 1), (_arg5 + 1), (_local7 * 4281018399)); Raster.line(_arg1, (_arg2 + 1), (_arg3 - 1), (_arg4 + 1), (_arg5 - 1), (_local7 * 4281018399)); Raster.line(_arg1, (_arg2 - 1), (_arg3 + 1), (_arg4 - 1), (_arg5 + 1), (_local7 * 4281018399)); Raster.line(_arg1, (_arg2 - 1), (_arg3 - 1), (_arg4 - 1), (_arg5 - 1), (_local7 * 4281018399)); Raster.line(_arg1, _arg2, _arg3, _arg4, _arg5, (_local7 * 4284701767)); } private function OnMouseDown(_arg1:MouseEvent){ if (((((((((!((gameStateType == "TitleState"))) && ((_arg1.stageX >= 17)))) && ((_arg1.stageY >= 460)))) && ((_arg1.stageX <= 25)))) && ((_arg1.stageY <= 469)))){ musicMuted = !(musicMuted); if (musicMuted){ musicPlayer.SetVolume(0); } else { musicPlayer.SetVolume(1); }; return; }; gameState.OnMouseDown(_arg1); } public function ResetComponents(){ i = 0; while (i < glyphList.length) { glyphList[i].Reset(); i++; }; i = 0; while (i < manipulatorList.length) { manipulatorList[i].Reset(); i++; }; atomList = new Array(); } public function Initialize(){ InitStateType(new TitleState(null)); InitStateType(new DesignState(null)); InitStateType(new HelpState(null)); InitStateType(new AtomListState(null)); InitStateType(new SimulationState(null)); InitStateType(new NoteState(null)); InitStateType(new CollisionState(null)); InitStateType(new JammedState(null)); InitStateType(new WinState(null)); InitStateType(new QuitState(null)); InitStateType(new LevelSelectState(null)); InitStateType(new SaveState(null)); InitStateType(new LoadState(null)); if (sharedObject.data.maxLevel == null){ sharedObject.data.maxLevel = 0; } else { maxLevel = sharedObject.data.maxLevel; }; ClearDesign(); ChangeState("TitleState"); musicPlayer.Play("alchemy.mp3"); symbolHelp["w"] = "This symbol will make the manipulator wait for one cycle."; symbolHelp["l"] = "This symbol will make the manipulator rotate counter-clockwise."; symbolHelp["r"] = "This symbol will make the manipulator rotate clockwise."; symbolHelp["u"] = "This symbol will make the manipulator extend."; symbolHelp["d"] = "This symbol will make the manipulator retract."; symbolHelp["o"] = "This symbol will make the manipulator open its claw."; symbolHelp["c"] = "This symbol will make the manipulator close its claw."; symbolHelp["1"] = "This symbol will make the manipulator rotate what it is holding clockwise."; symbolHelp["2"] = "This symbol will make the manipulator rotate what it is holding counter-clockwise."; symbolHelp["j"] = "When this script repeats, it will start after this symbol instead of at the beginning."; } private function OnAddedToStage(_arg1:Event){ bmpScreen = new BitmapData(stage.stageWidth, stage.stageHeight, false, 0); screenContainer = new Bitmap(bmpScreen); addChild(screenContainer); stage.addEventListener(MouseEvent.MOUSE_DOWN, OnMouseDown); stage.addEventListener(MouseEvent.MOUSE_UP, OnMouseUp); stage.addEventListener(KeyboardEvent.KEY_DOWN, OnKeyDown); stage.addEventListener(KeyboardEvent.KEY_UP, OnKeyUp); kongregate = new KongregateAPI(); addChild(kongregate); Initialize(); } public function DeleteUserComponents(){ var _local1:*; var _local2:*; selectedManipulator = null; dragComponent = null; dragDelta = null; dragManipulator = false; oldLocation = null; atomList = new Array(); manipulatorList = new Array(); _local1 = new Array(); i = 0; while (i < glyphList.length) { _local2 = glyphList[i]; if (!(((((_local2 is Note)) || ((_local2 is GlyphSpawning)))) || ((_local2 is GlyphTarget)))){ _local1.push(_local2); }; i++; }; i = 0; while (i < _local1.length) { ArrayRemove(glyphList, _local1[i]); i++; }; } } }//package
Section 95
//symbol_1 (symbol_1) package { import flash.display.*; public dynamic class symbol_1 extends BitmapData { public function symbol_1(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 96
//symbol_2 (symbol_2) package { import flash.display.*; public dynamic class symbol_2 extends BitmapData { public function symbol_2(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 97
//symbol_active (symbol_active) package { import flash.display.*; public dynamic class symbol_active extends BitmapData { public function symbol_active(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 98
//symbol_c (symbol_c) package { import flash.display.*; public dynamic class symbol_c extends BitmapData { public function symbol_c(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 99
//symbol_d (symbol_d) package { import flash.display.*; public dynamic class symbol_d extends BitmapData { public function symbol_d(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 100
//symbol_j (symbol_j) package { import flash.display.*; public dynamic class symbol_j extends BitmapData { public function symbol_j(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 101
//symbol_l (symbol_l) package { import flash.display.*; public dynamic class symbol_l extends BitmapData { public function symbol_l(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 102
//symbol_o (symbol_o) package { import flash.display.*; public dynamic class symbol_o extends BitmapData { public function symbol_o(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 103
//symbol_r (symbol_r) package { import flash.display.*; public dynamic class symbol_r extends BitmapData { public function symbol_r(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 104
//symbol_u (symbol_u) package { import flash.display.*; public dynamic class symbol_u extends BitmapData { public function symbol_u(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 105
//symbol_w (symbol_w) package { import flash.display.*; public dynamic class symbol_w extends BitmapData { public function symbol_w(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 106
//TitleState (TitleState) package { import flash.events.*; import flash.display.*; public class TitleState extends State { private var bmpTitleScreen:BitmapData; public function TitleState(_arg1:StateMachine){ bmpTitleScreen = new img_loaded(640, 480); super(_arg1); } override public function OnMouseDown(_arg1:MouseEvent){ _SM.ChangeState("LevelSelectState"); } override public function OnRenderAtEnter(_arg1:BitmapData){ _SM.Blit(_arg1, bmpTitleScreen); } } }//package
Section 107
//WinState (WinState) package { import flash.events.*; import flash.display.*; import flash.geom.*; public class WinState extends State { private var bmpPopup:BitmapData; public function WinState(_arg1:StateMachine){ bmpPopup = new popup_win(640, 480); super(_arg1); } override public function OnMouseDown(_arg1:MouseEvent){ if ((((((((_arg1.stageX > 36)) && ((_arg1.stageY > 315)))) && ((_arg1.stageX < 111)))) && ((_arg1.stageY < 329)))){ _SM.ChangeState("DesignState"); }; } override public function OnRenderAtEnter(_arg1:BitmapData){ _SM.Blit(_arg1, bmpPopup); } override public function OnEnter(_arg1:String){ _SM.maxLevel = Math.max(_SM.maxLevel, (_SM.currentLevel + 1)); _SM.sharedObject.data.maxLevel = _SM.maxLevel; _SM.kongregate.stats.submit("LevelComplete", (_SM.currentLevel + 1)); } } }//package

Library Items

Symbol 1 Font {Georgia16B}
Symbol 2 Font {Georgia14}
Symbol 3 Font {Georgia10}
Symbol 4 Font {Georgia20}
Symbol 5 Font {Georgia12}
Symbol 6 Bitmap {symbol_w}
Symbol 7 Bitmap {symbol_u}
Symbol 8 Bitmap {symbol_r}
Symbol 9 Bitmap {symbol_o}
Symbol 10 Bitmap {symbol_l}
Symbol 11 Bitmap {symbol_j}
Symbol 12 Bitmap {symbol_d}
Symbol 13 Bitmap {symbol_c}
Symbol 14 Bitmap {symbol_active}
Symbol 15 Bitmap {symbol_2}
Symbol 16 Bitmap {symbol_1}
Symbol 17 Bitmap {popup_win}
Symbol 18 Bitmap {popup_quit}
Symbol 19 Bitmap {popup_jammed}
Symbol 20 Bitmap {popup_collision}
Symbol 21 Bitmap {note_large}
Symbol 22 Bitmap {note_icon}
Symbol 23 Bitmap {menu_programming_selection}
Symbol 24 Bitmap {menu_programming}
Symbol 25 Bitmap {menu_morecomponents}
Symbol 26 Bitmap {menu_components}
Symbol 27 Bitmap {img_save}
Symbol 28 Bitmap {img_loaded}
Symbol 29 Bitmap {img_load}
Symbol 30 Bitmap {img_levelselect}
Symbol 31 Bitmap {img_info2}
Symbol 32 Bitmap {img_info1}
Symbol 33 Bitmap {img_background}
Symbol 34 Bitmap {icon_sound}
Symbol 35 Bitmap {icon_mute}
Symbol 36 Bitmap {glyph_transmutation}
Symbol 37 Bitmap {glyph_target}
Symbol 38 Bitmap {glyph_spawning}
Symbol 39 Bitmap {glyph_projection}
Symbol 40 Bitmap {glyph_duplication}
Symbol 41 Bitmap {glyph_calcination}
Symbol 42 Bitmap {glyph_binding}
Symbol 43 Bitmap {buttons_simulation}
Symbol 44 Bitmap {buttons_design}
Symbol 45 Bitmap {atom_water}
Symbol 46 Bitmap {atom_tin}
Symbol 47 Bitmap {atom_sulfur}
Symbol 48 Bitmap {atom_silver}
Symbol 49 Bitmap {atom_salt}
Symbol 50 Bitmap {atom_rotation_indicator}
Symbol 51 Bitmap {atom_mercury}
Symbol 52 Bitmap {atom_lead}
Symbol 53 Bitmap {atom_iron}
Symbol 54 Bitmap {atom_indicator}
Symbol 55 Bitmap {atom_gold}
Symbol 56 Bitmap {atom_fire}
Symbol 57 Bitmap {atom_earth}
Symbol 58 Bitmap {atom_copper}
Symbol 59 Bitmap {atom_backfill}
Symbol 60 Bitmap {atom_alpha}
Symbol 61 Bitmap {atom_air}
Symbol 62 GraphicUsed by:64
Symbol 63 GraphicUsed by:64
Symbol 64 MovieClipUses:62 63Used by:69
Symbol 65 GraphicUsed by:66
Symbol 66 MovieClip {arm_middle}Uses:65Used by:69
Symbol 67 GraphicUsed by:68
Symbol 68 MovieClip {arm_base}Uses:67Used by:69
Symbol 69 MovieClip {manipulator}Uses:64 66 68
Symbol 70 MovieClip {com.kongregate.as3.client.KongregateAPI}

Instance Names

"claw"Symbol 69 MovieClip {manipulator} Frame 1Symbol 64 MovieClip
"middle"Symbol 69 MovieClip {manipulator} Frame 1Symbol 66 MovieClip {arm_middle}
"base"Symbol 69 MovieClip {manipulator} Frame 1Symbol 68 MovieClip {arm_base}

Special Tags

FileAttributes (69)Timeline Frame 1Access local files only, Metadata not present, AS3.
Protect (24)Timeline Frame 131 bytes "..$1$jH$CtB6h.i7T3eof04HiCkQy/."




http://swfchan.com/39/192392/info.shtml
Created: 14/10 -2018 20:09:14 Last modified: 14/10 -2018 20:09:14 Server time: 06/05 -2024 11:22:21