PackageGame
Classpublic class ControllerGame
InheritanceControllerGame Inheritance Controller Inheritance flash.display.Sprite
SubclassesControllerSandbox, ControllerTutorial



Public Properties
 PropertyDefined by
  actions : Array
ControllerGame
  adStarted : Boolean = false
[static]
ControllerGame
  allParts : Array
ControllerGame
  backToSaveWindow : Boolean = false
ControllerGame
  cameraMovements : Array
ControllerGame
  candidateJointParts : Array
ControllerGame
  candidateJointType : int
ControllerGame
  candidateJointX : Number
ControllerGame
  candidateJointY : Number
ControllerGame
  cannonballs : Array = null
[static]
ControllerGame
  canSaveReplay : Boolean = true
ControllerGame
  centerOnSelected : Boolean = false
[static]
ControllerGame
  channel : SoundChannel = null
[static]
ControllerGame
  clickedBox : Boolean = false
[static]
ControllerGame
  clickedReport : Boolean = false
ControllerGame
  clickedSave : Boolean = false
ControllerGame
  clickedSaveChallenge : Boolean = false
ControllerGame
  clickedSaveReplay : Boolean = false
ControllerGame
  clickedSubmitScore : Boolean = false
ControllerGame
  clipboardParts : Array
[static]
ControllerGame
  collisionGroup : int = 0x0001
[static]
ControllerGame
  copiedJoint : JointPart = null
ControllerGame
  copiedThrusters : Thrusters = null
ControllerGame
  curChallengeFeatured : Boolean = false
[static]
ControllerGame
  curChallengeID : String = ""
[static]
ControllerGame
  curChallengePublic : Boolean = false
[static]
ControllerGame
  curReplayFeatured : Boolean = false
[static]
ControllerGame
  curReplayID : String = ""
[static]
ControllerGame
  curReplayPublic : Boolean = false
[static]
ControllerGame
  curRobotEditable : Boolean = true
[static]
ControllerGame
  curRobotFeatured : Boolean = false
[static]
ControllerGame
  curRobotID : String = ""
[static]
ControllerGame
  curRobotPublic : Boolean = false
[static]
ControllerGame
  defaultB : Number = 42
[static]
ControllerGame
  defaultG : Number = 66
[static]
ControllerGame
  defaultO : Number = 255
[static]
ControllerGame
  defaultR : Number = 253
[static]
ControllerGame
  draggingPart : Part = null
ControllerGame
  draggingParts : Array = null
ControllerGame
  draw : Draw
ControllerGame
  failedChallenge : Boolean = false
[static]
ControllerGame
  frameCounter : int
ControllerGame
  ignoreAClick : Boolean = false
ControllerGame
  initX : Number = 1.7976931348623157E308
[static]
ControllerGame
  initY : Number = 1.7976931348623157E308
[static]
ControllerGame
  initZoom : Number = 1.7976931348623157E308
[static]
ControllerGame
  introVolume : Number = 0.5
[static]
ControllerGame
  jointPart : ShapePart = null
ControllerGame
  jointSound1 : Sound
[static]
ControllerGame
  jointSound2 : Sound
[static]
ControllerGame
  jointSound3 : Sound
[static]
ControllerGame
  jointSound4 : Sound
[static]
ControllerGame
  jointSound5 : Sound
[static]
ControllerGame
  justLoadedRobotWithChallenge : Boolean = false
[static]
ControllerGame
  keyPresses : Array
ControllerGame
  lastAction : int = -1
ControllerGame
  loadAndInsert : Boolean = false
[static]
ControllerGame
  loadedParts : Array = null
[static]
ControllerGame
  loseSound : Sound
[static]
ControllerGame
  maxDensity : Number = 30
[static]
ControllerGame
  maxRJSpeed : Number = 30
[static]
ControllerGame
  maxRJStrength : Number = 30
[static]
ControllerGame
  maxSJSpeed : Number = 30
[static]
ControllerGame
  maxSJStrength : Number = 30
[static]
ControllerGame
  maxThrusterStrength : Number = 30
[static]
ControllerGame
  m_badBuildAreas : Array
ControllerGame
  m_buildAreas : Array
ControllerGame
  m_canvas : Sprite
ControllerGame
  m_challengeWindow : ChooseChallengeWindow = null
ControllerGame
  m_chooserWindow : SaveLoadWindow = null
ControllerGame
  m_conditionsDialog : ConditionsWindow = null
ControllerGame
  m_exportDialog : ExportWindow = null
ControllerGame
  m_fader : Sprite
ControllerGame
  m_guiMenu : DropDownMenu
ControllerGame
  m_guiPanel : MainEditPanel
ControllerGame
  m_importDialog : ImportWindow = null
ControllerGame
  minDensity : Number = 1
[static]
ControllerGame
  m_iterations : int = 10
ControllerGame
  m_linkDialog : LinkWindow = null
ControllerGame
  m_loadWindow : LoadWindow = null
ControllerGame
  m_loginWindow : LoginWindow = null
ControllerGame
  m_mouseJoint : b2MouseJoint = null
ControllerGame
  m_newUserWindow : NewUserWindow = null
ControllerGame
  mouseXWorld : Number
[static]
ControllerGame
  mouseXWorldPhys : Number
[static]
ControllerGame
  mouseYWorld : Number
[static]
ControllerGame
  mouseYWorldPhys : Number
[static]
ControllerGame
  m_physScale : Number = 30
ControllerGame
  m_postReplayWindow : PostReplayWindow = null
ControllerGame
  m_progressDialog : DialogWindow = null
ControllerGame
  m_rateDialog : RateWindow = null
ControllerGame
  m_reportWindow : ReportWindow = null
ControllerGame
  m_restrictionsDialog : RestrictionsWindow = null
ControllerGame
  m_sandboxWindow : AdvancedSandboxWindow = null
ControllerGame
  m_scoreWindow : ScoreWindow = null
ControllerGame
  m_selectedBuildAreas : Array
ControllerGame
  m_sidePanel : PartEditWindow
ControllerGame
  m_timeStep : Number
ControllerGame
  m_tutorialDialog : TutorialWindow = null
ControllerGame
  musicChannel : SoundChannel = null
[static]
ControllerGame
  m_world : b2World = null
ControllerGame
  password : String = ""
[static]
ControllerGame
  paused : Boolean = true
ControllerGame
  playingReplay : Boolean = false
[static]
ControllerGame
  potentialChallengeEditable : Boolean = false
[static]
ControllerGame
  potentialChallengeFeatured : Boolean = false
[static]
ControllerGame
  potentialChallengeID : String = ""
[static]
ControllerGame
  potentialChallengePublic : Boolean = false
[static]
ControllerGame
  potentialJointPart1 : ShapePart = null
ControllerGame
  potentialJointPart2 : ShapePart = null
ControllerGame
  potentialReplayFeatured : Boolean = false
[static]
ControllerGame
  potentialReplayID : String = ""
[static]
ControllerGame
  potentialReplayPublic : Boolean = false
[static]
ControllerGame
  potentialRobotEditable : Boolean = false
[static]
ControllerGame
  potentialRobotFeatured : Boolean = false
[static]
ControllerGame
  potentialRobotID : String = ""
[static]
ControllerGame
  potentialRobotPublic : Boolean = false
[static]
ControllerGame
  prevMouseXWorld : Number
[static]
ControllerGame
  prevMouseYWorld : Number
[static]
ControllerGame
  ratedCurChallenge : Boolean = false
[static]
ControllerGame
  ratedCurReplay : Boolean = false
[static]
ControllerGame
  ratedCurRobot : Boolean = false
[static]
ControllerGame
  replay : Replay
[static]
ControllerGame
  replayDirectlyLinked : Boolean = false
[static]
ControllerGame
  replayParts : Array
[static]
ControllerGame
  rotatingPart : Object = null
ControllerGame
  rotatingParts : Array = null
ControllerGame
  saveAfterRestrictions : Boolean = false
ControllerGame
  selectedBuildArea : b2AABB
ControllerGame
  selectedParts : Array
ControllerGame
  sessionID : String = ""
[static]
ControllerGame
  shapeSound1 : Sound
[static]
ControllerGame
  shapeSound2 : Sound
[static]
ControllerGame
  shapeSound3 : Sound
[static]
ControllerGame
  shapeSound4 : Sound
[static]
ControllerGame
  shapeSound5 : Sound
[static]
ControllerGame
  showColours : Boolean = true
[static]
ControllerGame
  showGraphics : Boolean = true
[static]
ControllerGame
  showJoints : Boolean = true
[static]
ControllerGame
  showOutlines : Boolean = true
[static]
ControllerGame
  showTutorial : Boolean = true
[static]
ControllerGame
  simStarted : Boolean = false
ControllerGame
  snapToCenter : Boolean = true
[static]
ControllerGame
  sSky : Sky
ControllerGame
  syncPoints : Array
ControllerGame
  userName : String = "_Public"
[static]
ControllerGame
  viewingUnsavedReplay : Boolean = false
[static]
ControllerGame
  wasMouseDown : Boolean = false
[static]
ControllerGame
  winSound : Sound
[static]
ControllerGame
  wonChallenge : Boolean = false
ControllerGame
Protected Properties
 PropertyDefined by
  autoPanning : Boolean = true
ControllerGame
  boxText : TextField
ControllerGame
  cameraPart : ShapePart = null
ControllerGame
  curAction : int = -1
ControllerGame
  hasPanned : Boolean = true
ControllerGame
  hasZoomed : Boolean = true
ControllerGame
  horizLineText : TextField
ControllerGame
  partsFit : Boolean = true
ControllerGame
  redrawBuildArea : Boolean = true
ControllerGame
  redrawRobot : Boolean = true
ControllerGame
  removedGraphics : Array
ControllerGame
  rotatingText : TextField
ControllerGame
  scalingText : TextField
ControllerGame
  shapeText : TextField
ControllerGame
  uneditableText : TextField
ControllerGame
  vertLineText : TextField
ControllerGame
Public Methods
 MethodDefined by
  
Initiates most visual members and instantiates variables.
ControllerGame
  
AddAction(a:Action):void
Adds an undo/redo action to the action list.
ControllerGame
  
AddSyncPoint():void
Adds a sync point during simulation for a replay of the simulation.
ControllerGame
  
alwaysVisibleBox(e:Event):void
Action taken after clicking the "Always visible" checkbox (For text boxes).
ControllerGame
  
autoBox1(e:MouseEvent):void
ControllerGame
  
autoBox2(e:MouseEvent):void
ControllerGame
  
backButton(e:MouseEvent):void
Action taken after clicking the "Move to Back" button.
ControllerGame
  
buildBoxButton(e:MouseEvent):void
Make a build box.
ControllerGame
  
If applicable (a tutorial or challenge), draws build area boxes.
ControllerGame
  
cameraBox(e:Event):void
Action taken after clicking the "Camera Focus" checkbox.
ControllerGame
  
cannonButton(e:MouseEvent):void
ControllerGame
  
cannonSlider(e:Event):void
ControllerGame
  
cannonText(e:Event):void
Update cannon strength property after cannon strength text field is changed.
ControllerGame
  
centerBox(e:MouseEvent):void
ControllerGame
  
ControllerGame
  
centerOnSelectedBox(e:MouseEvent):void
ControllerGame
  
circleButton(e:MouseEvent):void
ControllerGame
  
clearButton(e:MouseEvent):void
ControllerGame
  
CloseTutorialDialog(phraseNum:int):void
ControllerGame
  
collisionBox(e:Event):void
Action taken after clicking the "Collides" checkbox.
ControllerGame
  
colourBox(e:MouseEvent):void
ControllerGame
  
colourButton(red:int, green:int, blue:int, opacity:int, defaultColour:Boolean):void
ControllerGame
  
commentButton(e:MouseEvent, robotID:String = "", robotPublic:Boolean = false):void
Opens the comment window for the bot (non-working for open-source).
ControllerGame
  
commentChallengeButton(e:MouseEvent, challengeID:String = "", challengePublic:Boolean = false):void
ControllerGame
  
commentReplayButton(e:MouseEvent, replayID:String = "", replayPublic:Boolean = false):void
ControllerGame
  
conditionsButton(e:MouseEvent):void
Opens the Conditions window.
ControllerGame
  
ConfirmDeleteChallenge(e:MouseEvent):void
ControllerGame
  
ConfirmDeleteReplay(e:MouseEvent):void
ControllerGame
  
ConfirmDeleteRobot(e:MouseEvent):void
ControllerGame
  
ConfirmLogout(e:MouseEvent):void
ControllerGame
  
ConfirmNewRobot(e:MouseEvent):void
ControllerGame
  
ConfirmSaveChallenge(e:MouseEvent):void
ControllerGame
  
ConfirmSaveReplay(e:MouseEvent):void
ControllerGame
  
ConfirmSaveRobot(e:MouseEvent):void
ControllerGame
  
ContactAdded(point:b2ContactPoint):void
ControllerGame
  
controlKeyText1(e:KeyboardEvent):void
ControllerGame
  
controlKeyText2(e:KeyboardEvent):void
ControllerGame
  
copyButton(e:MouseEvent):void
ControllerGame
  
cutButton(e:MouseEvent):void
ControllerGame
  
deleteBuildBoxButton(e:MouseEvent):void
ControllerGame
  
deleteButton(e:MouseEvent):void
ControllerGame
  
DeletePart(part:Part, addAction:Boolean = true, clearFromSelected:Boolean = true):void
ControllerGame
  
densitySlider(e:Event):void
Update density property after density slider is moved.
ControllerGame
  
densityText(e:Event):void
Update density property after density text field is changed.
ControllerGame
  
DialogOK(e:Event):void
ControllerGame
  
editButton(e:MouseEvent, confirmed:Boolean = false):void
ControllerGame
  
embedButton(e:MouseEvent, robotID:String = "", robotPublic:Boolean = false):void
Show embed code for bot (non-working for open-source).
ControllerGame
  
embedChallengeButton(e:MouseEvent, challengeID:String = "", challengePublic:Boolean = false):void
ControllerGame
  
embedReplayButton(e:MouseEvent, replayID:String = "", replayPublic:Boolean = false):void
ControllerGame
  
featureButton(e:MouseEvent):void
Features current robot/replay/challenge (non-working for open-source).
ControllerGame
  
finishAddingUser(e:Event):void
ControllerGame
  
finishCommenting(e:Event):void
Action after commenting (non-working for open-source).
ControllerGame
  
finishDeleting(e:Event):void
ControllerGame
  
ControllerGame
  
finishDeletingReplay(e:Event):void
ControllerGame
  
finishExporting(exportStr:String, robotStr:String):void
ControllerGame
  
ControllerGame
  
ControllerGame
  
ControllerGame
  
ControllerGame
  
ControllerGame
  
ControllerGame
  
ControllerGame
  
finishGettingScoreData(e:Event):void
ControllerGame
  
finishLoading(e:Event):void
ControllerGame
  
finishLoadingChallenge(e:Event):void
ControllerGame
  
finishLoadingReplay(e:Event):void
ControllerGame
  
finishLoggingIn(e:Event):void
ControllerGame
  
finishRatingChallenge(e:Event):void
Action after rating challenge (non-working for open-source).
ControllerGame
  
finishRatingReplay(e:Event):void
Action after rating replay (non-working for open-source).
ControllerGame
  
finishRatingRobot(e:Event):void
Action after rating robot (non-working for open-source).
ControllerGame
  
finishReporting(e:Event):void
Action after report is sent (non-working for open-source).
ControllerGame
  
finishSaving(e:Event):void
ControllerGame
  
finishSavingChallenge(e:Event):void
ControllerGame
  
finishSavingReplay(e:Event):void
ControllerGame
  
fireKeyText(e:KeyboardEvent):void
ControllerGame
  
fixateBox(e:Event):void
Action taken after clicking the "Fixated" checkbox.
ControllerGame
  
fjButton(e:MouseEvent):void
ControllerGame
  
frontButton(e:MouseEvent):void
Action taken after clicking the "Move to Front" button.
ControllerGame
  
ControllerGame
  
ControllerGame
  
GetMaxX():Number
ControllerGame
  
GetMaxY():Number
ControllerGame
  
GetMinX():Number
ControllerGame
  
GetMinY():Number
ControllerGame
  
GetPhysScale():Number
ControllerGame
  
GetScore():int
Pure virtual function.
ControllerGame
  
ControllerGame
  
ControllerGame
  
globalOutlineBox(e:MouseEvent):void
ControllerGame
 Inherited
GuiCallback(index:int):void
Controller
  
HideConfirmDialog(e:Event):void
ControllerGame
  
HideDialog(e:Event):void
ControllerGame
  
HideExportDialog(e:Event):void
ControllerGame
  
HideImportDialog(e:Event):void
ControllerGame
  
HideLinkDialog(e:Event):void
ControllerGame
  
highScoresButton(e:MouseEvent):void
ControllerGame
  
Init(e:Event):void
Adds visual members.
ControllerGame
  
IsPaused():Boolean
ControllerGame
  
jointBox(e:MouseEvent):void
ControllerGame
  
keyInput(key:int, up:Boolean):void
Invoked on key press during simulation and replay.
ControllerGame
  
keyPress(key:int, up:Boolean):void
Invoked on key press.
ControllerGame
  
linkButton(e:MouseEvent, robotID:String = "", robotPublic:Boolean = false):void
Show link for bot (non-working for open-source).
ControllerGame
  
linkChallengeButton(e:MouseEvent, challengeID:String = "", challengePublic:Boolean = false):void
ControllerGame
  
linkReplayButton(e:MouseEvent, replayID:String = "", replayPublic:Boolean = false):void
ControllerGame
  
loadAndInsertButton(e:MouseEvent):void
ControllerGame
  
loadButton(e:MouseEvent, makeThemRate:Boolean = true):void
ControllerGame
  
loadChallengeButton(e:MouseEvent, makeThemRate:Boolean = true):void
ControllerGame
  
LoadChallengeNow(challengeID:String):void
ControllerGame
  
loadReplayButton(e:MouseEvent, makeThemRate:Boolean = true):void
ControllerGame
  
LoadReplayNow(replayID:String):void
ControllerGame
  
loadRobotButton(e:MouseEvent, makeThemRate:Boolean = true):void
ControllerGame
  
LoadRobotNow(robotID:String):void
ControllerGame
  
loginButton(e:MouseEvent, displayMessage:Boolean = false, backToSave:Boolean = false, saveLoadWindowOpen:Boolean = false):void
ControllerGame
  
loginHidden(e:Event, success:Boolean):void
ControllerGame
  
logoutButton(e:MouseEvent):void
ControllerGame
  
maxLimitText(e:Event):void
ControllerGame
  
minLimitText(e:Event):void
ControllerGame
  
mirrorHorizontal(e:MouseEvent):void
ControllerGame
  
mirrorVertical(e:MouseEvent):void
ControllerGame
  
motorBox(e:MouseEvent):void
ControllerGame
  
mouseClick(up:Boolean):void
Handles and determines mouse click actions.
ControllerGame
  
MouseDrag():void
Handles and determines mouse drag actions.
ControllerGame
  
mouseMove(x:int, y:int):void
Updates mouse cursor position.
ControllerGame
  
MoveCameraForReplay(cameraMovement:Object):void
ControllerGame
  
multiDeleteButton(e:MouseEvent):void
ControllerGame
  
newButton(e:MouseEvent):void
ControllerGame
  
outlineBox(e:Event):void
Action taken after clicking the "Show Outlines" checkbox.
ControllerGame
  
pasteButton(e:MouseEvent):void
ControllerGame
  
pauseButton(e:MouseEvent):void
ControllerGame
  
pjButton(e:MouseEvent):void
ControllerGame
  
playButton(e:MouseEvent, maybeShowAd:Boolean = true):void
Starts simulation.
ControllerGame
  
ControllerGame
  
ControllerGame
  
ControllerGame
  
processLoadedReplay(replayAndRobot:Array):void
ControllerGame
  
ControllerGame
  
rateButton(e:MouseEvent):void
Rates current bot (non-working for open-source).
ControllerGame
  
rateChallengeButton(e:MouseEvent):void
ControllerGame
  
rateReplayButton(e:MouseEvent):void
ControllerGame
  
rateWindowClosed(rating:int, redirect:int):void
ControllerGame
  
rectButton(e:MouseEvent):void
ControllerGame
  
redoButton(e:MouseEvent):void
ControllerGame
  
Refreshes the side panel (Part properties panel).
ControllerGame
  
reportButton(e:MouseEvent):void
Reports current bot/replay/challenge (non-working for open-source).
ControllerGame
  
resetButton(e:MouseEvent, rateRobot:Boolean = true):void
Restarts simulation.
ControllerGame
  
restrictionsButton(e:MouseEvent):void
Opens the Restrictions window.
ControllerGame
  
rewindButton(e:MouseEvent, makeThemRate:Boolean = true):void
Similar to resetButton, except only for replays.
ControllerGame
  
rigidBox(e:MouseEvent):void
ControllerGame
  
rjButton(e:MouseEvent):void
ControllerGame
  
rotateButton(e:MouseEvent):void
Initiates the rotating of shapes and joints in build mode.
ControllerGame
  
sandboxSettingsButton(e:MouseEvent):void
Opens the sandbox settings window.
ControllerGame
  
saveButton(e:MouseEvent):void
ControllerGame
  
saveReplayButton(e:MouseEvent):void
ControllerGame
  
scaleButton(e:MouseEvent):void
Initiates scaling procedure.
ControllerGame
  
scaleWithZoomBox(e:Event):void
Action taken after clicking the "Scale with Zoom" checkbox (For text boxes).
ControllerGame
  
Screen2WorldX(x:Number):Number
Convert x position from screen pixel position to world physics canvas.
ControllerGame
  
Screen2WorldY(y:Number):Number
Convert y position from screen pixel position to world physics canvas.
ControllerGame
  
ShowConfirmDialog(msg:String, type:int):void
ControllerGame
  
ShowDialog(msg:String):void
ControllerGame
  
ShowDialog2(msg:String):void
ControllerGame
  
ShowDialog3(msg:String):void
ControllerGame
  
ControllerGame
  
ShowImportWindow(type:int):void
ControllerGame
  
ShowLinkDialog(msg1:String, msg2:String, isEmbedReplay:Boolean = false, id:String = "", isEmbedChallenge:Boolean = false):void
ControllerGame
  
ControllerGame
  
ShowTutorialWindow(phraseNum:int, x:int, y:int, moreButton:Boolean = false):void
ControllerGame
  
sizeText(e:Event):void
ControllerGame
  
speedSlider(e:Event):void
ControllerGame
  
speedText(e:Event):void
Update speed property after speed text field is changed.
ControllerGame
  
strengthSlider(e:Event):void
ControllerGame
  
strengthText(e:Event):void
Update strength property after strength text field is changed.
ControllerGame
  
submitButton(e:MouseEvent):void
ControllerGame
  
SyncReplay(syncPoint:Object):void
Simple synchronization of positions and angles.
ControllerGame
  
SyncReplay2(syncPoint1:Object, syncPoint2:Object):void
Complex synchronization of positions and angles using computed "fill in" frames between sync points.
ControllerGame
  
terrainBox(e:Event):void
Action taken after clicking the "Outlines behind" checkbox.
ControllerGame
  
textButton(e:MouseEvent):void
ControllerGame
  
textEntered(e:Event):void
Action taken after changing any text fields in the side panel.
ControllerGame
  
textKeyBox(e:KeyboardEvent):void
Action taken after changing the activate key for text boxes.
ControllerGame
  
textText(e:Event):void
ControllerGame
  
textTextFinish(e:Event):void
ControllerGame
  
textTextStart(e:Event):void
ControllerGame
  
thrustersButton(e:MouseEvent):void
ControllerGame
  
thrustKeyText(e:KeyboardEvent):void
ControllerGame
  
thrustSlider(e:Event):void
ControllerGame
  
thrustText(e:Event):void
Update thruster strength property after thruster strength text field is changed.
ControllerGame
  
triangleButton(e:MouseEvent):void
ControllerGame
  
tutorialButton(e:MouseEvent):void
Opens tutorial window.
ControllerGame
  
undoButton(e:MouseEvent):void
ControllerGame
  
undragableBox(e:Event):void
Action taken after clicking the "Undraggable" checkbox.
ControllerGame
  
Update():void
Called every frame from Main.update().
ControllerGame
  
viewReplayButton(e:MouseEvent):void
ControllerGame
  
World2ScreenX(x:Number):Number
Convert x position from world physics canvas to screen pixel position.
ControllerGame
  
World2ScreenY(y:Number):Number
Convert y position from world physics canvas to screen pixel position.
ControllerGame
  
zoomInButton(e:MouseEvent):void
ControllerGame
  
zoomOutButton(e:MouseEvent):void
ControllerGame
Protected Methods
 MethodDefined by
  
ControllerGame
  
ChallengeOver():Boolean
Pure virtual function.
ControllerGame
  
Check if every part is in the allowed build box(es).
ControllerGame
  
ControllerGame
  
GetBuildingArea():b2AABB
Pure virtual function.
ControllerGame
  
GetBuildingAreaNumber(i:int):b2AABB
ControllerGame
  
GetGravity():b2Vec2
ControllerGame
  
HandleCamera():void
Handles camera movement (follows Part with camera focus)
ControllerGame
  
HandleKey():void
Handles screen scrolling using arrow keys.
ControllerGame
  
IsPartOfRobot(p:Part, index:int, array:Array):Boolean
ControllerGame
  
LostChallenge():Boolean
ControllerGame
  
ControllerGame
  
PartIsEditable(p:Part, index:int, array:Array):Boolean
ControllerGame
  
WonChallenge():Boolean
ControllerGame
Public Constants
 ConstantDefined by
  ADMIN_USERS : Array
[static]
ControllerGame
  BOX_SELECTING : int = 8
[static]
ControllerGame
  DRAWING_BOX : int = 14
[static]
ControllerGame
  DRAWING_BUILD_BOX : int = 18
[static]
ControllerGame
  DRAWING_HORIZONTAL_LINE : int = 15
[static]
ControllerGame
  DRAWING_VERTICAL_LINE : int = 16
[static]
ControllerGame
  FINALIZING_JOINT : int = 9
[static]
ControllerGame
  INIT_PHYS_SCALE : Number = 30
[static]
ControllerGame
  NEW_CANNON : int = 19
[static]
ControllerGame
  NEW_CIRCLE : int = 0
[static]
ControllerGame
  NEW_FIXED_JOINT : int = 3
[static]
ControllerGame
  NEW_PRISMATIC_JOINT : int = 5
[static]
ControllerGame
  NEW_RECT : int = 1
[static]
ControllerGame
  NEW_REVOLUTE_JOINT : int = 4
[static]
ControllerGame
  NEW_TEXT : int = 10
[static]
ControllerGame
  NEW_THRUSTERS : int = 13
[static]
ControllerGame
  NEW_TRIANGLE : int = 2
[static]
ControllerGame
  PASTE : int = 7
[static]
ControllerGame
  REPLAY_SYNC_FRAMES : int = 3
[static]
ControllerGame
  RESIZING_SHAPES : int = 12
[static]
ControllerGame
  RESIZING_TEXT : int = 11
[static]
ControllerGame
  ROTATE : int = 6
[static]
ControllerGame
  SELECTING_SHAPE : int = 17
[static]
ControllerGame
  ZOOM_FOCUS_X : Number = 400
[static]
ControllerGame
  ZOOM_FOCUS_Y : Number = 310
[static]
ControllerGame
Protected Constants
 ConstantDefined by
  MAX_ZOOM_VAL : Number = 75
[static]
ControllerGame
  MIN_ZOOM_VAL : Number = 12
[static]
ControllerGame
Property detail
actionsproperty
public var actions:Array
adStartedproperty 
public static var adStarted:Boolean = false
allPartsproperty 
public var allParts:Array
autoPanningproperty 
protected var autoPanning:Boolean = true
backToSaveWindowproperty 
public var backToSaveWindow:Boolean = false
boxTextproperty 
protected var boxText:TextField
cameraMovementsproperty 
public var cameraMovements:Array
cameraPartproperty 
protected var cameraPart:ShapePart = null
candidateJointPartsproperty 
public var candidateJointParts:Array
candidateJointTypeproperty 
public var candidateJointType:int
candidateJointXproperty 
public var candidateJointX:Number
candidateJointYproperty 
public var candidateJointY:Number
cannonballsproperty 
public static var cannonballs:Array = null
canSaveReplayproperty 
public var canSaveReplay:Boolean = true
centerOnSelectedproperty 
public static var centerOnSelected:Boolean = false
channelproperty 
public static var channel:SoundChannel = null
clickedBoxproperty 
public static var clickedBox:Boolean = false
clickedReportproperty 
public var clickedReport:Boolean = false
clickedSaveproperty 
public var clickedSave:Boolean = false
clickedSaveChallengeproperty 
public var clickedSaveChallenge:Boolean = false
clickedSaveReplayproperty 
public var clickedSaveReplay:Boolean = false
clickedSubmitScoreproperty 
public var clickedSubmitScore:Boolean = false
clipboardPartsproperty 
public static var clipboardParts:Array
collisionGroupproperty 
public static var collisionGroup:int = 0x0001
copiedJointproperty 
public var copiedJoint:JointPart = null
copiedThrustersproperty 
public var copiedThrusters:Thrusters = null
curActionproperty 
protected var curAction:int = -1
curChallengeFeaturedproperty 
public static var curChallengeFeatured:Boolean = false
curChallengeIDproperty 
public static var curChallengeID:String = ""
curChallengePublicproperty 
public static var curChallengePublic:Boolean = false
curReplayFeaturedproperty 
public static var curReplayFeatured:Boolean = false
curReplayIDproperty 
public static var curReplayID:String = ""
curReplayPublicproperty 
public static var curReplayPublic:Boolean = false
curRobotEditableproperty 
public static var curRobotEditable:Boolean = true
curRobotFeaturedproperty 
public static var curRobotFeatured:Boolean = false
curRobotIDproperty 
public static var curRobotID:String = ""
curRobotPublicproperty 
public static var curRobotPublic:Boolean = false
defaultBproperty 
public static var defaultB:Number = 42
defaultGproperty 
public static var defaultG:Number = 66
defaultOproperty 
public static var defaultO:Number = 255
defaultRproperty 
public static var defaultR:Number = 253
draggingPartproperty 
public var draggingPart:Part = null
draggingPartsproperty 
public var draggingParts:Array = null
drawproperty 
public var draw:Draw
failedChallengeproperty 
public static var failedChallenge:Boolean = false
frameCounterproperty 
public var frameCounter:int
hasPannedproperty 
protected var hasPanned:Boolean = true
hasZoomedproperty 
protected var hasZoomed:Boolean = true
horizLineTextproperty 
protected var horizLineText:TextField
ignoreAClickproperty 
public var ignoreAClick:Boolean = false
initXproperty 
public static var initX:Number = 1.7976931348623157E308
initYproperty 
public static var initY:Number = 1.7976931348623157E308
initZoomproperty 
public static var initZoom:Number = 1.7976931348623157E308
introVolumeproperty 
public static var introVolume:Number = 0.5
jointPartproperty 
public var jointPart:ShapePart = null
jointSound1property 
public static var jointSound1:Sound
jointSound2property 
public static var jointSound2:Sound
jointSound3property 
public static var jointSound3:Sound
jointSound4property 
public static var jointSound4:Sound
jointSound5property 
public static var jointSound5:Sound
justLoadedRobotWithChallengeproperty 
public static var justLoadedRobotWithChallenge:Boolean = false
keyPressesproperty 
public var keyPresses:Array
lastActionproperty 
public var lastAction:int = -1
loadAndInsertproperty 
public static var loadAndInsert:Boolean = false
loadedPartsproperty 
public static var loadedParts:Array = null
loseSoundproperty 
public static var loseSound:Sound
maxDensityproperty 
public static var maxDensity:Number = 30
maxRJSpeedproperty 
public static var maxRJSpeed:Number = 30
maxRJStrengthproperty 
public static var maxRJStrength:Number = 30
maxSJSpeedproperty 
public static var maxSJSpeed:Number = 30
maxSJStrengthproperty 
public static var maxSJStrength:Number = 30
maxThrusterStrengthproperty 
public static var maxThrusterStrength:Number = 30
m_badBuildAreasproperty 
public var m_badBuildAreas:Array
m_buildAreasproperty 
public var m_buildAreas:Array
m_canvasproperty 
public var m_canvas:Sprite
m_challengeWindowproperty 
public var m_challengeWindow:ChooseChallengeWindow = null
m_chooserWindowproperty 
public var m_chooserWindow:SaveLoadWindow = null
m_conditionsDialogproperty 
public var m_conditionsDialog:ConditionsWindow = null
m_exportDialogproperty 
public var m_exportDialog:ExportWindow = null
m_faderproperty 
public var m_fader:Sprite
m_guiMenuproperty 
public var m_guiMenu:DropDownMenu
m_guiPanelproperty 
public var m_guiPanel:MainEditPanel
m_importDialogproperty 
public var m_importDialog:ImportWindow = null
minDensityproperty 
public static var minDensity:Number = 1
m_iterationsproperty 
public var m_iterations:int = 10
m_linkDialogproperty 
public var m_linkDialog:LinkWindow = null
m_loadWindowproperty 
public var m_loadWindow:LoadWindow = null
m_loginWindowproperty 
public var m_loginWindow:LoginWindow = null
m_mouseJointproperty 
public var m_mouseJoint:b2MouseJoint = null
m_newUserWindowproperty 
public var m_newUserWindow:NewUserWindow = null
mouseXWorldproperty 
public static var mouseXWorld:Number
mouseXWorldPhysproperty 
public static var mouseXWorldPhys:Number
mouseYWorldproperty 
public static var mouseYWorld:Number
mouseYWorldPhysproperty 
public static var mouseYWorldPhys:Number
m_physScaleproperty 
public var m_physScale:Number = 30
m_postReplayWindowproperty 
public var m_postReplayWindow:PostReplayWindow = null
m_progressDialogproperty 
public var m_progressDialog:DialogWindow = null
m_rateDialogproperty 
public var m_rateDialog:RateWindow = null
m_reportWindowproperty 
public var m_reportWindow:ReportWindow = null
m_restrictionsDialogproperty 
public var m_restrictionsDialog:RestrictionsWindow = null
m_sandboxWindowproperty 
public var m_sandboxWindow:AdvancedSandboxWindow = null
m_scoreWindowproperty 
public var m_scoreWindow:ScoreWindow = null
m_selectedBuildAreasproperty 
public var m_selectedBuildAreas:Array
m_sidePanelproperty 
public var m_sidePanel:PartEditWindow
m_timeStepproperty 
public var m_timeStep:Number
m_tutorialDialogproperty 
public var m_tutorialDialog:TutorialWindow = null
musicChannelproperty 
public static var musicChannel:SoundChannel = null
m_worldproperty 
public var m_world:b2World = null
partsFitproperty 
protected var partsFit:Boolean = true
passwordproperty 
public static var password:String = ""
pausedproperty 
public var paused:Boolean = true
playingReplayproperty 
public static var playingReplay:Boolean = false
potentialChallengeEditableproperty 
public static var potentialChallengeEditable:Boolean = false
potentialChallengeFeaturedproperty 
public static var potentialChallengeFeatured:Boolean = false
potentialChallengeIDproperty 
public static var potentialChallengeID:String = ""
potentialChallengePublicproperty 
public static var potentialChallengePublic:Boolean = false
potentialJointPart1property 
public var potentialJointPart1:ShapePart = null
potentialJointPart2property 
public var potentialJointPart2:ShapePart = null
potentialReplayFeaturedproperty 
public static var potentialReplayFeatured:Boolean = false
potentialReplayIDproperty 
public static var potentialReplayID:String = ""
potentialReplayPublicproperty 
public static var potentialReplayPublic:Boolean = false
potentialRobotEditableproperty 
public static var potentialRobotEditable:Boolean = false
potentialRobotFeaturedproperty 
public static var potentialRobotFeatured:Boolean = false
potentialRobotIDproperty 
public static var potentialRobotID:String = ""
potentialRobotPublicproperty 
public static var potentialRobotPublic:Boolean = false
prevMouseXWorldproperty 
public static var prevMouseXWorld:Number
prevMouseYWorldproperty 
public static var prevMouseYWorld:Number
ratedCurChallengeproperty 
public static var ratedCurChallenge:Boolean = false
ratedCurReplayproperty 
public static var ratedCurReplay:Boolean = false
ratedCurRobotproperty 
public static var ratedCurRobot:Boolean = false
redrawBuildAreaproperty 
protected var redrawBuildArea:Boolean = true
redrawRobotproperty 
protected var redrawRobot:Boolean = true
removedGraphicsproperty 
protected var removedGraphics:Array
replayproperty 
public static var replay:Replay
replayDirectlyLinkedproperty 
public static var replayDirectlyLinked:Boolean = false
replayPartsproperty 
public static var replayParts:Array
rotatingPartproperty 
public var rotatingPart:Object = null
rotatingPartsproperty 
public var rotatingParts:Array = null
rotatingTextproperty 
protected var rotatingText:TextField
saveAfterRestrictionsproperty 
public var saveAfterRestrictions:Boolean = false
scalingTextproperty 
protected var scalingText:TextField
selectedBuildAreaproperty 
public var selectedBuildArea:b2AABB
selectedPartsproperty 
public var selectedParts:Array
sessionIDproperty 
public static var sessionID:String = ""
shapeSound1property 
public static var shapeSound1:Sound
shapeSound2property 
public static var shapeSound2:Sound
shapeSound3property 
public static var shapeSound3:Sound
shapeSound4property 
public static var shapeSound4:Sound
shapeSound5property 
public static var shapeSound5:Sound
shapeTextproperty 
protected var shapeText:TextField
showColoursproperty 
public static var showColours:Boolean = true
showGraphicsproperty 
public static var showGraphics:Boolean = true
showJointsproperty 
public static var showJoints:Boolean = true
showOutlinesproperty 
public static var showOutlines:Boolean = true
showTutorialproperty 
public static var showTutorial:Boolean = true
simStartedproperty 
public var simStarted:Boolean = false
snapToCenterproperty 
public static var snapToCenter:Boolean = true
sSkyproperty 
public var sSky:Sky
syncPointsproperty 
public var syncPoints:Array
uneditableTextproperty 
protected var uneditableText:TextField
userNameproperty 
public static var userName:String = "_Public"
vertLineTextproperty 
protected var vertLineText:TextField
viewingUnsavedReplayproperty 
public static var viewingUnsavedReplay:Boolean = false
wasMouseDownproperty 
public static var wasMouseDown:Boolean = false
winSoundproperty 
public static var winSound:Sound
wonChallengeproperty 
public var wonChallenge:Boolean = false
Constructor detail
ControllerGame()constructor
public function ControllerGame()

Initiates most visual members and instantiates variables.

Method detail
AddAction()method
public function AddAction(a:Action):void

Adds an undo/redo action to the action list.

Parameters
a:Action
AddSyncPoint()method 
public function AddSyncPoint():void

Adds a sync point during simulation for a replay of the simulation.

alwaysVisibleBox()method 
public function alwaysVisibleBox(e:Event):void

Action taken after clicking the "Always visible" checkbox (For text boxes).

Parameters
e:Event
autoBox1()method 
public function autoBox1(e:MouseEvent):voidParameters
e:MouseEvent
autoBox2()method 
public function autoBox2(e:MouseEvent):voidParameters
e:MouseEvent
backButton()method 
public function backButton(e:MouseEvent):void

Action taken after clicking the "Move to Back" button.

Parameters
e:MouseEvent
buildBoxButton()method 
public function buildBoxButton(e:MouseEvent):void

Make a build box.

Parameters
e:MouseEvent
BuildBuildArea()method 
public function BuildBuildArea():void

If applicable (a tutorial or challenge), draws build area boxes.

cameraBox()method 
public function cameraBox(e:Event):void

Action taken after clicking the "Camera Focus" checkbox. If checked, it unchecks all other parts' Camera Focus property.

Parameters
e:Event
cannonButton()method 
public function cannonButton(e:MouseEvent):voidParameters
e:MouseEvent
cannonSlider()method 
public function cannonSlider(e:Event):voidParameters
e:Event
cannonText()method 
public function cannonText(e:Event):void

Update cannon strength property after cannon strength text field is changed.

Parameters
e:Event
centerBox()method 
public function centerBox(e:MouseEvent):voidParameters
e:MouseEvent
CenterOnLoadedRobot()method 
protected function CenterOnLoadedRobot():void
CenterOnSelected()method 
public function CenterOnSelected():void
centerOnSelectedBox()method 
public function centerOnSelectedBox(e:MouseEvent):voidParameters
e:MouseEvent
ChallengeOver()method 
protected function ChallengeOver():Boolean

Pure virtual function.

Returns
Boolean
CheckIfPartsFit()method 
protected function CheckIfPartsFit():void

Check if every part is in the allowed build box(es).

circleButton()method 
public function circleButton(e:MouseEvent):voidParameters
e:MouseEvent
clearButton()method 
public function clearButton(e:MouseEvent):voidParameters
e:MouseEvent
CloseTutorialDialog()method 
public function CloseTutorialDialog(phraseNum:int):voidParameters
phraseNum:int
collisionBox()method 
public function collisionBox(e:Event):void

Action taken after clicking the "Collides" checkbox.

Parameters
e:Event
colourBox()method 
public function colourBox(e:MouseEvent):voidParameters
e:MouseEvent
colourButton()method 
public function colourButton(red:int, green:int, blue:int, opacity:int, defaultColour:Boolean):voidParameters
red:int
 
green:int
 
blue:int
 
opacity:int
 
defaultColour:Boolean
commentButton()method 
public override function commentButton(e:MouseEvent, robotID:String = "", robotPublic:Boolean = false):void

Opens the comment window for the bot (non-working for open-source).

Parameters
e:MouseEvent
 
robotID:String (default = "")
 
robotPublic:Boolean (default = false)
commentChallengeButton()method 
public override function commentChallengeButton(e:MouseEvent, challengeID:String = "", challengePublic:Boolean = false):voidParameters
e:MouseEvent
 
challengeID:String (default = "")
 
challengePublic:Boolean (default = false)
commentReplayButton()method 
public override function commentReplayButton(e:MouseEvent, replayID:String = "", replayPublic:Boolean = false):voidParameters
e:MouseEvent
 
replayID:String (default = "")
 
replayPublic:Boolean (default = false)
conditionsButton()method 
public function conditionsButton(e:MouseEvent):void

Opens the Conditions window.

Parameters
e:MouseEvent
ConfirmDeleteChallenge()method 
public override function ConfirmDeleteChallenge(e:MouseEvent):voidParameters
e:MouseEvent
ConfirmDeleteReplay()method 
public override function ConfirmDeleteReplay(e:MouseEvent):voidParameters
e:MouseEvent
ConfirmDeleteRobot()method 
public override function ConfirmDeleteRobot(e:MouseEvent):voidParameters
e:MouseEvent
ConfirmLogout()method 
public override function ConfirmLogout(e:MouseEvent):voidParameters
e:MouseEvent
ConfirmNewRobot()method 
public function ConfirmNewRobot(e:MouseEvent):voidParameters
e:MouseEvent
ConfirmSaveChallenge()method 
public function ConfirmSaveChallenge(e:MouseEvent):voidParameters
e:MouseEvent
ConfirmSaveReplay()method 
public function ConfirmSaveReplay(e:MouseEvent):voidParameters
e:MouseEvent
ConfirmSaveRobot()method 
public function ConfirmSaveRobot(e:MouseEvent):voidParameters
e:MouseEvent
ContactAdded()method 
public function ContactAdded(point:b2ContactPoint):voidParameters
point:b2ContactPoint
controlKeyText1()method 
public function controlKeyText1(e:KeyboardEvent):voidParameters
e:KeyboardEvent
controlKeyText2()method 
public function controlKeyText2(e:KeyboardEvent):voidParameters
e:KeyboardEvent
copyButton()method 
public function copyButton(e:MouseEvent):voidParameters
e:MouseEvent
cutButton()method 
public function cutButton(e:MouseEvent):voidParameters
e:MouseEvent
deleteBuildBoxButton()method 
public function deleteBuildBoxButton(e:MouseEvent):voidParameters
e:MouseEvent
deleteButton()method 
public function deleteButton(e:MouseEvent):voidParameters
e:MouseEvent
DeletePart()method 
public function DeletePart(part:Part, addAction:Boolean = true, clearFromSelected:Boolean = true):voidParameters
part:Part
 
addAction:Boolean (default = true)
 
clearFromSelected:Boolean (default = true)
densitySlider()method 
public function densitySlider(e:Event):void

Update density property after density slider is moved.

Parameters
e:Event
densityText()method 
public function densityText(e:Event):void

Update density property after density text field is changed.

Parameters
e:Event
DialogOK()method 
public override function DialogOK(e:Event):voidParameters
e:Event
editButton()method 
public function editButton(e:MouseEvent, confirmed:Boolean = false):voidParameters
e:MouseEvent
 
confirmed:Boolean (default = false)
embedButton()method 
public override function embedButton(e:MouseEvent, robotID:String = "", robotPublic:Boolean = false):void

Show embed code for bot (non-working for open-source).

Parameters
e:MouseEvent
 
robotID:String (default = "")
 
robotPublic:Boolean (default = false)
embedChallengeButton()method 
public override function embedChallengeButton(e:MouseEvent, challengeID:String = "", challengePublic:Boolean = false):voidParameters
e:MouseEvent
 
challengeID:String (default = "")
 
challengePublic:Boolean (default = false)
embedReplayButton()method 
public override function embedReplayButton(e:MouseEvent, replayID:String = "", replayPublic:Boolean = false):voidParameters
e:MouseEvent
 
replayID:String (default = "")
 
replayPublic:Boolean (default = false)
featureButton()method 
public function featureButton(e:MouseEvent):void

Features current robot/replay/challenge (non-working for open-source).

Parameters
e:MouseEvent
FindCenterOfRobot()method 
protected function FindCenterOfRobot():ShapePart

Returns
ShapePart
finishAddingUser()method 
public override function finishAddingUser(e:Event):voidParameters
e:Event
finishCommenting()method 
public function finishCommenting(e:Event):void

Action after commenting (non-working for open-source).

Parameters
e:Event
finishDeleting()method 
public override function finishDeleting(e:Event):voidParameters
e:Event
finishDeletingChallenge()method 
public override function finishDeletingChallenge(e:Event):voidParameters
e:Event
finishDeletingReplay()method 
public override function finishDeletingReplay(e:Event):voidParameters
e:Event
finishExporting()method 
public override function finishExporting(exportStr:String, robotStr:String):voidParameters
exportStr:String
 
robotStr:String
finishGettingLoadChallengeData()method 
public override function finishGettingLoadChallengeData(e:Event):voidParameters
e:Event
finishGettingLoadChallengeForScoreData()method 
public override function finishGettingLoadChallengeForScoreData(e:Event):voidParameters
e:Event
finishGettingLoadReplayData()method 
public override function finishGettingLoadReplayData(e:Event):voidParameters
e:Event
finishGettingLoadRobotData()method 
public override function finishGettingLoadRobotData(e:Event):voidParameters
e:Event
finishGettingSaveChallengeData()method 
public function finishGettingSaveChallengeData(e:Event):voidParameters
e:Event
finishGettingSaveReplayData()method 
public function finishGettingSaveReplayData(e:Event):voidParameters
e:Event
finishGettingSaveRobotData()method 
public function finishGettingSaveRobotData(e:Event):voidParameters
e:Event
finishGettingScoreData()method 
public override function finishGettingScoreData(e:Event):voidParameters
e:Event
finishLoading()method 
public override function finishLoading(e:Event):voidParameters
e:Event
finishLoadingChallenge()method 
public override function finishLoadingChallenge(e:Event):voidParameters
e:Event
finishLoadingReplay()method 
public override function finishLoadingReplay(e:Event):voidParameters
e:Event
finishLoggingIn()method 
public override function finishLoggingIn(e:Event):voidParameters
e:Event
finishRatingChallenge()method 
public function finishRatingChallenge(e:Event):void

Action after rating challenge (non-working for open-source).

Parameters
e:Event
finishRatingReplay()method 
public function finishRatingReplay(e:Event):void

Action after rating replay (non-working for open-source).

Parameters
e:Event
finishRatingRobot()method 
public function finishRatingRobot(e:Event):void

Action after rating robot (non-working for open-source).

Parameters
e:Event
finishReporting()method 
public function finishReporting(e:Event):void

Action after report is sent (non-working for open-source).

Parameters
e:Event
finishSaving()method 
public function finishSaving(e:Event):voidParameters
e:Event
finishSavingChallenge()method 
public function finishSavingChallenge(e:Event):voidParameters
e:Event
finishSavingReplay()method 
public function finishSavingReplay(e:Event):voidParameters
e:Event
fireKeyText()method 
public function fireKeyText(e:KeyboardEvent):voidParameters
e:KeyboardEvent
fixateBox()method 
public function fixateBox(e:Event):void

Action taken after clicking the "Fixated" checkbox.

Parameters
e:Event
fjButton()method 
public function fjButton(e:MouseEvent):voidParameters
e:MouseEvent
frontButton()method 
public function frontButton(e:MouseEvent):void

Action taken after clicking the "Move to Front" button.

Parameters
e:MouseEvent
GetBoxForConditions()method 
public function GetBoxForConditions():void
GetBuildingArea()method 
protected function GetBuildingArea():b2AABB

Pure virtual function.

Returns
b2AABB
GetBuildingAreaNumber()method 
protected function GetBuildingAreaNumber(i:int):b2AABBParameters
i:int

Returns
b2AABB
GetGravity()method 
protected function GetGravity():b2Vec2

Returns
b2Vec2
GetHorizontalLineForConditions()method 
public function GetHorizontalLineForConditions():void
GetMaxX()method 
public override function GetMaxX():Number

Returns
Number
GetMaxY()method 
public override function GetMaxY():Number

Returns
Number
GetMinX()method 
public override function GetMinX():Number

Returns
Number
GetMinY()method 
public override function GetMinY():Number

Returns
Number
GetPhysScale()method 
public override function GetPhysScale():Number

Returns
Number
GetScore()method 
public function GetScore():int

Pure virtual function.

Returns
int
GetShapeForConditions()method 
public function GetShapeForConditions():void
GetVerticalLineForConditions()method 
public function GetVerticalLineForConditions():void
globalOutlineBox()method 
public function globalOutlineBox(e:MouseEvent):voidParameters
e:MouseEvent
HandleCamera()method 
protected function HandleCamera():void

Handles camera movement (follows Part with camera focus)

HandleKey()method 
protected function HandleKey():void

Handles screen scrolling using arrow keys. Also handles updating of replays and parts.

HideConfirmDialog()method 
public override function HideConfirmDialog(e:Event):voidParameters
e:Event
HideDialog()method 
public override function HideDialog(e:Event):voidParameters
e:Event
HideExportDialog()method 
public override function HideExportDialog(e:Event):voidParameters
e:Event
HideImportDialog()method 
public override function HideImportDialog(e:Event):voidParameters
e:Event
HideLinkDialog()method 
public override function HideLinkDialog(e:Event):voidParameters
e:Event
highScoresButton()method 
public function highScoresButton(e:MouseEvent):voidParameters
e:MouseEvent
Init()method 
public function Init(e:Event):void

Adds visual members. Also determines if playing replay directly, loading a challenge, or loading a bot.

Parameters
e:Event
IsPartOfRobot()method 
protected function IsPartOfRobot(p:Part, index:int, array:Array):BooleanParameters
p:Part
 
index:int
 
array:Array

Returns
Boolean
IsPaused()method 
public override function IsPaused():Boolean

Returns
Boolean
jointBox()method 
public function jointBox(e:MouseEvent):voidParameters
e:MouseEvent
keyInput()method 
public override function keyInput(key:int, up:Boolean):void

Invoked on key press during simulation and replay. Handles any keyboard-activated action and records key press for replays.

Parameters
key:int
 
up:Boolean
keyPress()method 
public function keyPress(key:int, up:Boolean):void

Invoked on key press. Handles key press during simulation and keyboard shortcuts.

Parameters
key:int
 
up:Boolean
linkButton()method 
public override function linkButton(e:MouseEvent, robotID:String = "", robotPublic:Boolean = false):void

Show link for bot (non-working for open-source).

Parameters
e:MouseEvent
 
robotID:String (default = "")
 
robotPublic:Boolean (default = false)
linkChallengeButton()method 
public override function linkChallengeButton(e:MouseEvent, challengeID:String = "", challengePublic:Boolean = false):voidParameters
e:MouseEvent
 
challengeID:String (default = "")
 
challengePublic:Boolean (default = false)
linkReplayButton()method 
public override function linkReplayButton(e:MouseEvent, replayID:String = "", replayPublic:Boolean = false):voidParameters
e:MouseEvent
 
replayID:String (default = "")
 
replayPublic:Boolean (default = false)
loadAndInsertButton()method 
public function loadAndInsertButton(e:MouseEvent):voidParameters
e:MouseEvent
loadButton()method 
public function loadButton(e:MouseEvent, makeThemRate:Boolean = true):voidParameters
e:MouseEvent
 
makeThemRate:Boolean (default = true)
loadChallengeButton()method 
public function loadChallengeButton(e:MouseEvent, makeThemRate:Boolean = true):voidParameters
e:MouseEvent
 
makeThemRate:Boolean (default = true)
LoadChallengeNow()method 
public function LoadChallengeNow(challengeID:String):voidParameters
challengeID:String
loadReplayButton()method 
public function loadReplayButton(e:MouseEvent, makeThemRate:Boolean = true):voidParameters
e:MouseEvent
 
makeThemRate:Boolean (default = true)
LoadReplayNow()method 
public function LoadReplayNow(replayID:String):voidParameters
replayID:String
loadRobotButton()method 
public function loadRobotButton(e:MouseEvent, makeThemRate:Boolean = true):voidParameters
e:MouseEvent
 
makeThemRate:Boolean (default = true)
LoadRobotNow()method 
public function LoadRobotNow(robotID:String):voidParameters
robotID:String
loginButton()method 
public override function loginButton(e:MouseEvent, displayMessage:Boolean = false, backToSave:Boolean = false, saveLoadWindowOpen:Boolean = false):voidParameters
e:MouseEvent
 
displayMessage:Boolean (default = false)
 
backToSave:Boolean (default = false)
 
saveLoadWindowOpen:Boolean (default = false)
loginHidden()method 
public function loginHidden(e:Event, success:Boolean):voidParameters
e:Event
 
success:Boolean
logoutButton()method 
public function logoutButton(e:MouseEvent):voidParameters
e:MouseEvent
LostChallenge()method 
protected function LostChallenge():Boolean

Returns
Boolean
maxLimitText()method 
public function maxLimitText(e:Event):voidParameters
e:Event
minLimitText()method 
public function minLimitText(e:Event):voidParameters
e:Event
mirrorHorizontal()method 
public function mirrorHorizontal(e:MouseEvent):voidParameters
e:MouseEvent
mirrorVertical()method 
public function mirrorVertical(e:MouseEvent):voidParameters
e:MouseEvent
motorBox()method 
public function motorBox(e:MouseEvent):voidParameters
e:MouseEvent
mouseClick()method 
public function mouseClick(up:Boolean):void

Handles and determines mouse click actions.

Parameters
up:Boolean
MouseDrag()method 
public function MouseDrag():void

Handles and determines mouse drag actions.

mouseMove()method 
public function mouseMove(x:int, y:int):void

Updates mouse cursor position.

Parameters
x:int
 
y:int
MoveCameraForReplay()method 
public override function MoveCameraForReplay(cameraMovement:Object):voidParameters
cameraMovement:Object
multiDeleteButton()method 
public function multiDeleteButton(e:MouseEvent):voidParameters
e:MouseEvent
newButton()method 
public function newButton(e:MouseEvent):voidParameters
e:MouseEvent
NumBuildingAreas()method 
protected function NumBuildingAreas():int

Returns
int
outlineBox()method 
public function outlineBox(e:Event):void

Action taken after clicking the "Show Outlines" checkbox.

Parameters
e:Event
PartIsEditable()method 
protected function PartIsEditable(p:Part, index:int, array:Array):BooleanParameters
p:Part
 
index:int
 
array:Array

Returns
Boolean
pasteButton()method 
public function pasteButton(e:MouseEvent):voidParameters
e:MouseEvent
pauseButton()method 
public function pauseButton(e:MouseEvent):voidParameters
e:MouseEvent
pjButton()method 
public function pjButton(e:MouseEvent):voidParameters
e:MouseEvent
playButton()method 
public function playButton(e:MouseEvent, maybeShowAd:Boolean = true):void

Starts simulation. Checks if it is allowed to start simulation. If it is allowed, it initiates everything required for the simulation.

Parameters
e:MouseEvent
 
maybeShowAd:Boolean (default = true)
PlayJointSound()method 
public function PlayJointSound():void
PlayShapeSound()method 
public function PlayShapeSound():void
processLoadedChallenge()method 
public override function processLoadedChallenge(challenge:Challenge):voidParameters
challenge:Challenge
processLoadedReplay()method 
public override function processLoadedReplay(replayAndRobot:Array):voidParameters
replayAndRobot:Array
processLoadedRobot()method 
public override function processLoadedRobot(robot:Robot):voidParameters
robot:Robot
rateButton()method 
public function rateButton(e:MouseEvent):void

Rates current bot (non-working for open-source).

Parameters
e:MouseEvent
rateChallengeButton()method 
public function rateChallengeButton(e:MouseEvent):voidParameters
e:MouseEvent
rateReplayButton()method 
public function rateReplayButton(e:MouseEvent):voidParameters
e:MouseEvent
rateWindowClosed()method 
public function rateWindowClosed(rating:int, redirect:int):voidParameters
rating:int
 
redirect:int
rectButton()method 
public function rectButton(e:MouseEvent):voidParameters
e:MouseEvent
redoButton()method 
public function redoButton(e:MouseEvent):voidParameters
e:MouseEvent
RefreshSidePanel()method 
public function RefreshSidePanel():void

Refreshes the side panel (Part properties panel). Shows appropriate panel according to current selected parts, or hides side panel if there are no selected parts.

reportButton()method 
public function reportButton(e:MouseEvent):void

Reports current bot/replay/challenge (non-working for open-source).

Parameters
e:MouseEvent
resetButton()method 
public function resetButton(e:MouseEvent, rateRobot:Boolean = true):void

Restarts simulation. Uninitializes everything, reset certain variables, then calls playButton.

Parameters
e:MouseEvent
 
rateRobot:Boolean (default = true)
restrictionsButton()method 
public function restrictionsButton(e:MouseEvent):void

Opens the Restrictions window.

Parameters
e:MouseEvent
rewindButton()method 
public function rewindButton(e:MouseEvent, makeThemRate:Boolean = true):void

Similar to resetButton, except only for replays.

Parameters
e:MouseEvent
 
makeThemRate:Boolean (default = true)

See also

resetButton
rigidBox()method 
public function rigidBox(e:MouseEvent):voidParameters
e:MouseEvent
rjButton()method 
public function rjButton(e:MouseEvent):voidParameters
e:MouseEvent
rotateButton()method 
public function rotateButton(e:MouseEvent):void

Initiates the rotating of shapes and joints in build mode. Calculates and computes to make necessary rotation and position updates.

Parameters
e:MouseEvent
sandboxSettingsButton()method 
public function sandboxSettingsButton(e:MouseEvent):void

Opens the sandbox settings window.

Parameters
e:MouseEvent
saveButton()method 
public function saveButton(e:MouseEvent):voidParameters
e:MouseEvent
saveReplayButton()method 
public function saveReplayButton(e:MouseEvent):voidParameters
e:MouseEvent
scaleButton()method 
public function scaleButton(e:MouseEvent):void

Initiates scaling procedure. Calculates and computes to make necessary size and position updates.

Parameters
e:MouseEvent
scaleWithZoomBox()method 
public function scaleWithZoomBox(e:Event):void

Action taken after clicking the "Scale with Zoom" checkbox (For text boxes).

Parameters
e:Event
Screen2WorldX()method 
public function Screen2WorldX(x:Number):Number

Convert x position from screen pixel position to world physics canvas.

Parameters
x:Number

Returns
Number
Screen2WorldY()method 
public function Screen2WorldY(y:Number):Number

Convert y position from screen pixel position to world physics canvas.

Parameters
y:Number

Returns
Number
ShowConfirmDialog()method 
public override function ShowConfirmDialog(msg:String, type:int):voidParameters
msg:String
 
type:int
ShowDialog()method 
public override function ShowDialog(msg:String):voidParameters
msg:String
ShowDialog2()method 
public override function ShowDialog2(msg:String):voidParameters
msg:String
ShowDialog3()method 
public override function ShowDialog3(msg:String):voidParameters
msg:String
ShowDisabledDialog()method 
public function ShowDisabledDialog():void
ShowImportWindow()method 
public override function ShowImportWindow(type:int):voidParameters
type:int
ShowLinkDialog()method 
public override function ShowLinkDialog(msg1:String, msg2:String, isEmbedReplay:Boolean = false, id:String = "", isEmbedChallenge:Boolean = false):voidParameters
msg1:String
 
msg2:String
 
isEmbedReplay:Boolean (default = false)
 
id:String (default = "")
 
isEmbedChallenge:Boolean (default = false)
ShowPostReplayWindow()method 
public function ShowPostReplayWindow():void
ShowTutorialWindow()method 
public function ShowTutorialWindow(phraseNum:int, x:int, y:int, moreButton:Boolean = false):voidParameters
phraseNum:int
 
x:int
 
y:int
 
moreButton:Boolean (default = false)
sizeText()method 
public function sizeText(e:Event):voidParameters
e:Event
speedSlider()method 
public function speedSlider(e:Event):voidParameters
e:Event
speedText()method 
public function speedText(e:Event):void

Update speed property after speed text field is changed.

Parameters
e:Event
strengthSlider()method 
public function strengthSlider(e:Event):voidParameters
e:Event
strengthText()method 
public function strengthText(e:Event):void

Update strength property after strength text field is changed.

Parameters
e:Event
submitButton()method 
public function submitButton(e:MouseEvent):voidParameters
e:MouseEvent
SyncReplay()method 
public override function SyncReplay(syncPoint:Object):void

Simple synchronization of positions and angles.

Parameters
syncPoint:Object — An Object containing sync point data.
SyncReplay2()method 
public override function SyncReplay2(syncPoint1:Object, syncPoint2:Object):void

Complex synchronization of positions and angles using computed "fill in" frames between sync points.

Parameters
syncPoint1:Object — An Object containing sync point data.
 
syncPoint2:Object — An Object containing sync point data after syncPoint1.
terrainBox()method 
public function terrainBox(e:Event):void

Action taken after clicking the "Outlines behind" checkbox.

Parameters
e:Event
textButton()method 
public function textButton(e:MouseEvent):voidParameters
e:MouseEvent
textEntered()method 
public function textEntered(e:Event):void

Action taken after changing any text fields in the side panel.

Parameters
e:Event
textKeyBox()method 
public function textKeyBox(e:KeyboardEvent):void

Action taken after changing the activate key for text boxes.

Parameters
e:KeyboardEvent
textText()method 
public function textText(e:Event):voidParameters
e:Event
textTextFinish()method 
public function textTextFinish(e:Event):voidParameters
e:Event
textTextStart()method 
public function textTextStart(e:Event):voidParameters
e:Event
thrustersButton()method 
public function thrustersButton(e:MouseEvent):voidParameters
e:MouseEvent
thrustKeyText()method 
public function thrustKeyText(e:KeyboardEvent):voidParameters
e:KeyboardEvent
thrustSlider()method 
public function thrustSlider(e:Event):voidParameters
e:Event
thrustText()method 
public function thrustText(e:Event):void

Update thruster strength property after thruster strength text field is changed.

Parameters
e:Event
triangleButton()method 
public function triangleButton(e:MouseEvent):voidParameters
e:MouseEvent
tutorialButton()method 
public function tutorialButton(e:MouseEvent):void

Opens tutorial window.

Parameters
e:MouseEvent
undoButton()method 
public function undoButton(e:MouseEvent):voidParameters
e:MouseEvent
undragableBox()method 
public function undragableBox(e:Event):void

Action taken after clicking the "Undraggable" checkbox.

Parameters
e:Event
Update()method 
public override function Update():void

Called every frame from Main.update().

viewReplayButton()method 
public function viewReplayButton(e:MouseEvent):voidParameters
e:MouseEvent
WonChallenge()method 
protected function WonChallenge():Boolean

Returns
Boolean
World2ScreenX()method 
public override function World2ScreenX(x:Number):Number

Convert x position from world physics canvas to screen pixel position.

Parameters
x:Number

Returns
Number
World2ScreenY()method 
public override function World2ScreenY(y:Number):Number

Convert y position from world physics canvas to screen pixel position.

Parameters
y:Number

Returns
Number
zoomInButton()method 
public function zoomInButton(e:MouseEvent):voidParameters
e:MouseEvent
zoomOutButton()method 
public function zoomOutButton(e:MouseEvent):voidParameters
e:MouseEvent
Constant detail
ADMIN_USERSconstant
public static const ADMIN_USERS:Array
BOX_SELECTINGconstant 
public static const BOX_SELECTING:int = 8
DRAWING_BOXconstant 
public static const DRAWING_BOX:int = 14
DRAWING_BUILD_BOXconstant 
public static const DRAWING_BUILD_BOX:int = 18
DRAWING_HORIZONTAL_LINEconstant 
public static const DRAWING_HORIZONTAL_LINE:int = 15
DRAWING_VERTICAL_LINEconstant 
public static const DRAWING_VERTICAL_LINE:int = 16
FINALIZING_JOINTconstant 
public static const FINALIZING_JOINT:int = 9
INIT_PHYS_SCALEconstant 
public static const INIT_PHYS_SCALE:Number = 30
MAX_ZOOM_VALconstant 
protected static const MAX_ZOOM_VAL:Number = 75
MIN_ZOOM_VALconstant 
protected static const MIN_ZOOM_VAL:Number = 12
NEW_CANNONconstant 
public static const NEW_CANNON:int = 19
NEW_CIRCLEconstant 
public static const NEW_CIRCLE:int = 0
NEW_FIXED_JOINTconstant 
public static const NEW_FIXED_JOINT:int = 3
NEW_PRISMATIC_JOINTconstant 
public static const NEW_PRISMATIC_JOINT:int = 5
NEW_RECTconstant 
public static const NEW_RECT:int = 1
NEW_REVOLUTE_JOINTconstant 
public static const NEW_REVOLUTE_JOINT:int = 4
NEW_TEXTconstant 
public static const NEW_TEXT:int = 10
NEW_THRUSTERSconstant 
public static const NEW_THRUSTERS:int = 13
NEW_TRIANGLEconstant 
public static const NEW_TRIANGLE:int = 2
PASTEconstant 
public static const PASTE:int = 7
REPLAY_SYNC_FRAMESconstant 
public static const REPLAY_SYNC_FRAMES:int = 3
RESIZING_SHAPESconstant 
public static const RESIZING_SHAPES:int = 12
RESIZING_TEXTconstant 
public static const RESIZING_TEXT:int = 11
ROTATEconstant 
public static const ROTATE:int = 6
SELECTING_SHAPEconstant 
public static const SELECTING_SHAPE:int = 17
ZOOM_FOCUS_Xconstant 
public static const ZOOM_FOCUS_X:Number = 400
ZOOM_FOCUS_Yconstant 
public static const ZOOM_FOCUS_Y:Number = 310