1. About
  2. Quickstart
  3. Alcon Console
    1. Menu
    2. App Monitor
    3. Keyboard Shortcuts
  4. Debug API
    1. API Installation
    2. API Documentation
  5. External Links
    1. Alcon Website
    2. Alcon Support Forum

 


 

1. About

Alcon is a Debugging Tool for ActionScript developers that provides several straightforward and quickly accessible methods to debug and monitor any ActionScript 2 or ActionScript 3 application. It consists of two parts: the Alcon Console which is used as an output receiver and the Debugging API which is being imported into any debugable code and sends debug data to the Alcon Console.

At it's most basic use Alcon provides a trace method similar to ActionScript's own trace method with that any output can be sent to Alcon's trace logger but it also offers other features like an Object Inspector to list the propertties of any object, an App Monitor to monitor frame rate and memory usage and File Loggers to constantly monitor log files. Alcon can be used with the Flex compiler, the Flash IDE or MTASC.

 


 

2. Quickstart

First follow the API Installation Steps. Once that's done, using Alcon it is straightforward! The static Debug API can be used in any ActionScript 2 and 3 class by simply importing the Debug class with:

import com.hexagonstar.util.debug.Debug;

... and then using any of the Debug class methods anywhere in your class, most commonly trace:

Debug.trace("Never trust a computer you can't throw out a window.");

Please check the API Documentation for a full list of supported methods and their details.

 


 

3.1 Menu

 


 

3.2 App Monitor

Alcon's App Monitor can be used to monitor an application's framerate, frame render time and memory consumption. When monitoring any application the top area of the App Monitor is displaying the following information:

The App Monitor Graph displays the framerate in white, the Frame Render time in blue and the memory consumption in yellow. The upper limit for the memory meter can be changed in the Options in the App Monitor page.

To use the App monitor use the Debug.monitor() method. The monitor method requires the application's stage object as an argument (for ActionScript 2 this should be _root and also the top framerate is required as an argument). optionally a poll interval can be specified with that the App Monitor will update. The default is 500 milliseconds.

import com.hexagonstar.util.debug.Debug;

public class Test extends Sprite { public function Test() { /* Update App Monitor once a second */ Debug.monitor(stage, 1000); } }

The mark() method can be used to place a vertical marker line in the App Monitor's graph at any time. Optionally a color for the marker can be specified:

/* Place a red marker */
Debug.mark(0xFF0000);

It is recommended to use the monitor() calll early in the monitored application, for example in the first occuring constructor. For more information about the monitor API see the API Documentation.

 


 

3.3 Keyboard Shortcuts

<P>            Pause/Unpause Trace & File Loggers
<DEL>          Clear the currently displayed panel
<CTRL + DEL>   Clear all panels
<R>            Reset
<CURSOR RIGHT> Switch to next panel
<CURSOR LEFT>  Switch to previous panel
<CTRL + H>     Open Help panel
<CTRL + O>     Open Options dialog
<HOME>         Scroll to top
<END>          Scroll to bottom

 



4.1. API Installation

Before Alcon can be used, the Debug classes (or the alcon.swc for AS3) need to be copied to your classpath folder. After Alcon has been installed you can find these files for ActionScript 2 and 3 in the following location ...

On Windows (32bit): C:\Program Files\Hexagon Star Softworks\Alcon\debug
On Windows (64bit): C:\Program Files (x86)\Hexagon Star Softworks\Alcon\debug

On Mac OSX: Right-click on the Alcon icon and choose 'Show Package Contents', then in the appearing folder open Contents/Resources/debug

To use the Debug classes follow these steps ...

For ActionScript 3:
Copy the file alcon.swc from the path described above to your preferred path that you are using for your ActionScript 3 thirdparty classes and SWCs (on Windows you can also add this folder directly to your classpath).
When using the Flex mxmlc compiler the alcon.swc can be added to the library path with the library-path argument.
For use with the Flash IDE add the .../debug/as3 folder to the class pathes used by the Flash IDE so that Flash can access the Debug class in the com.hexagonstar.util.debug package. This can be done in the Flash IDE under Preferences/ActionScript/ActionScript 3.0 Settings.

For ActionScript 2:
Copy the as2 folder from the path described above to the classpath that you are using for your ActionScript 2 thirdparty classes. The package structure com.hexagonstar.util.debug must remain the same.
When using MTASC the Debug class can be added to MTASC's class path with the -cp argument.
For use with the Flash IDE add the .../debug/as2 folder to the class pathes used by the Flash IDE so that Flash can access the Debug class in the com.hexagonstar.util.debug package. This can be done in the Flash IDE under Preferences/ActionScript/ActionScript 2.0 Settings.