Open Exhibits Tutorials

Tutorials

  
  

Activating the GAD, Part 2

  

Activating The Gesture Analytics Display, Part 2

Tutorial Series: Showing The Complete Debug Views, Using CML

Tutorial 2: Activating touch point “drawing” and the “point_shapes” debug layer with CML

Introduction

In this tutorial we are going to use the CML document to activate the “drawing” of touch points on stage and also activate the “point_shapes” debug layer.

This tutorial requires Adobe Flash CS5+ and Open Exhibits 2 (download the sdk).

Getting Started

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:


1
<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:


1
2
3
<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:


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

The “alpha” or transparency can be set as follows:


1
<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:


1
<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.