divillysausages.com

AS3 Game Object Editor Features

Aside from the ability to magically edit objects in real time, the game object editor has a number of other smaller features. In no particular order:

Minimising

The entire Editor can be minimised by clicking on the minimise button in the top left hand corner of the window.

Dragging & Snapping

The Editor window can be dragged around at your convenience. If it's dragged close to or beyond the Stage bounds, then it'll snap to that edge.

Logging

Ever felt the need to access log messages during a release build? The Editor has a log() function to print messages to the log screen. If you're running as debug, it'll also trace the message. If you're running a kick-ass IDE like FlashDevelop, it'll also colour code the trace depending on it's level.

Click to select the current object

When this option is selected (it's turned on by default), you can click on objects that have been registered (DisplayObjects only) to select them as the current object to edit. Easier than searching through the dropdown.

Highlight the current object

When this option is selected (it's turned off by default), the Editor will draw a rectangle around the current object to let you easily see which object you're editing. Useful when there's a lot of editable objects on the Stage.

Retrieving the current object

Sometimes you need to easily access the current object that you're editing so you can change objects through code. Simply call currentObject on the Editor class and work your magic.

Easily removed

After you've edited your classes and you're ready to release your game, you obviously don't want to include the ability to edit your objects at random. Part of the beauty of the game object editor is that it's so easy to remove. Simply clear all register() calls (see How To), and remove the line:


-keep-as3-metadata+=Editable

from your project settings. Voila! No further changes needed.

For easier removing, I'd suggest setting up the Editor in one place so you don't need to search different calls. Even if you were lazy and left all the register() calls in, removing the -keep-as3-metadata line removes the ability to edit your objects.

Comments

Submit a comment

* indicates required