SEARCH
Newsletter
Subscribe to get design
tips, latest trends, free
stuff and more.
It doesn't look like an e-mail address

hosting

  Tutorials Flash & Swish Flash Tutorials Showing The Complete Debug Views, Using CML: Activating The Gesture Analytics Display, Part 2

Showing The Complete Debug Views, Using CML: Activating The Gesture Analytics Display, Part 2

Showing The Complete Debug Views, Using CML:
Activating The Gesture Analytics Display, Part 2

Every touch object rendered on stage has the "built-in" ability to independently display the touch point clusters it possesses as well as detailed informatics on cluster geometry and motion. To turn on the GAD display, in the "my_application.cml" document set the attribute "displayOn" equal to true. For example:

<DebugKit displayOn="true" displayAlwaysOn="false">

This will globally activate the debug display of all touch objects rendered on stage. When the GAD is activated it is always rendered on the topmost layer of the application display hierarchy. This is done to ensure that, when in debug mode, touch points and touch/gesture data is always visible and not obscured by media or menus.

First, we need to activate the "drawing" of touch points on stage and also activate the "point_shapes" debug layer. For example:

<DebugKit displayOn="true" displayAlwaysOn="false">
<DebugLayer type = "point_shapes" displayOn="true"/>
</DebugKit>

The color of the touch points can be set by assigning a "Hex" color code. For Example:

<DebugLayer type = "point_shapes" displayOn="true" stroke_color="0xFF00FF"/>

The "alpha" or transparency can be set as follows:

<DebugLayer type = "point_shapes" displayOn="true" stroke_alpha="0.9"/>

In addition the radius and stroke thickness can be customized by setting the "radius" and "stroke_thickness" attributes. For Example:

<DebugLayer type = "point_shapes" displayOn="true" radius = "12" stroke_thickness = "6"/>

This single debug display layer is recommended when there is a need to deploy a multitouch application with an "always on" touch data mode.

   
subscribe to newsletter