The Track command defines a touch control region with a 2D rectangular shape at a depth position of zero (0.0) which tracks touch movements within the region. Relative or absolute touch movements are translated linearly to values within defined ranges that are appropriate for parameters to other commands. The first parameter for track commands is a name, which is mandatory. Track names are only required to be unique for the current page. Defined track names can then be referenced by other commands to control properties like position, size, color, scale and rotate for boxes, text, tickers and objects on the same page. Touch controls can only be used on the same page they are defined on unless they are defined on a global page, in which case they can be used on subsequent pages until the next global page. Track controls must be defined on the page prior to being used, unlike toggle controls. Track controls can not be used to define parameters for other Track or Toggle commands or the same control.
Example of an Object Rotated with Track Controls page: PageName time: 1, 10 box: Globe position: 50, 50 size: 40, 40 align: CenterCenter track: RotateX axis: X box: Globe range: 180, -180 relative: on track: RotateY axis: Y box: Globe range: 180, -180 relative: on object: Sphere rotate: RotateY, RotateX
Defines the name of an associated box from which many parameters will be inherited as defaults for the track control. This allows a preceding box on the same page to define the appearance of the track control, including time, position, size, image and/or color. Any of these can still be overridden with specific command options, but usually box images should be aligned with the touch control for a proper user interface. Track controls will function without an associated box, but will be invisible.
Defines the start and duration times for the track control in seconds. If not specified, the default start and duration times will be the same as for the page that this control is on. These can be specified as either floating-point values in seconds or integer (sexagesimal) clock time durations. Start times can be prefixed with a plus symbol (+) which means the new start time is the sum of the specified time and the start time from the previous track command on the same page. This allows track commands to be duplicated in the script without the need to manually add time values. Refer to the Page command for examples. This parameter is typically inherited from a box which defines the appearance of the track control, but this option allows that to be overridden.
Defines the width and height of the track control, respectively. These dimensions are specified in the same coordinate system used to position text, tickers and objects. Dimensions of 100, 100 would cover the entire page, for example, if the top left corner of the track control were positioned at the origin. This parameter is typically inherited from a box which defines the appearance of the track control, but this option allows that to be overridden. If a size is defined which differs from an associated box, the box image will be scaled to this size. If only one value is specified (the width), the height is computed automatically to make the track control square, regardless of the aspect ratio of the display.
Defines the vertical and horizontal alignment for the track control. This determines the position of the track control region on the display. This parameter is typically inherited from a box which defines the appearance of the track control, but this option allows that to be overridden.
Track Control Alignments
Names Short Uses TopLeft tl Left Justified Control TopCenter tc Centered Control TopRight tr Right Justified Control CenterLeft cl Left Justified Control CenterCenter cc Centered Control CenterRight cr Right Justified Control BottomLeft bl Left Justified Control BottomCenter bc Centered Control BottomRight br Right Justified Control
Defines the position for the track control on the display. The align option also affects this position. The default position for touch controls is 0.0, 0.0, 0.0, which is the top left corner of the display and at the front of the coordinate space depth. The depth coordinate is fixed for touch controls at zero (0.0) and can not be altered.
Position coordinates can be prefixed with a plus symbol (+) to define the new position as the sum of the specified coordinate and the same position coordinate from the previous track command on the same page. This allows track commands to be duplicated in the script file without the need to manually add position values. This parameter is typically inherited from a box command which defines the appearance of the track control, but this option allows that to be overridden.
Defines horizontal and vertical scaling factors for the track control. This can be used to stretch or reduce the track control’s region in either direction. The default scaling factors for track controls are 1.0, 1.0, which disables scaling. This parameter is typically inherited from a box command which defines the appearance of the track control, but this option allows that to be overridden.
Defines the direction, distance or angle touch movements will be tracked. This parameter can be x, y, pinch or angle. The default is x, which means horizontal tracking. y means vertical tracking. These directions are independent of whether the display has a landscape or portrait orientation.
Additionally, on multi-touch capable panels, pinch or angle can be specified for the axis option. These require two simultaneous touch contacts on the panel to function. Pinch is defined as the distance between the two touch points. Angle is defined as the angle from the first touch point to the second in degrees.
Defines the minimum and maximum floating-point values of the track control. Both parameters are required. The last touch position within the tracking control region is linearly translated to a value which will always be within this range. These parameters must be chosen carefully to match the requirements of how the track control will be used. For example, scale values usually have a range of 0.0 to 10.0 or higher. However, a rotation value might require a range of -180.0 to 180.0 (in degrees), and color values must have a range that does not exceed 0.0 to 1.0.
Defines the initial floating-point value of the track control. Track controls reset to their initial value whenever the page begins or whenever their reset time expires. The default value is the average of the two range values, as defined by the range option. Lightwing does not clip this parameter to the range.
Defines the polarity for which touch screen events will be recognized for the track control. This parameter can be specified as on, off or both. The default is both. A touch on event means a finger has made contact with the touch screen. A touch off event means a finger has broken contact with the touch screen. Touch both means that both on and off touch events are recognized. Touch events are only recognized when the page is active and not during page transitions.
Defines if the control will track relative touch movements or absolute touch position. For example, relative tracking is the way a mouse works, but drawing tablets typically use absolute tracking. This parameter must be either on or off. The default is off, which means absolute tracking.