When dealing with Android devices, touch and gestures are the main mechanisms with which the user interacts with the device. If we want to use some of the predefined gestures in Flash Player and AIR, we can do so in the following manner.
To discover which specific gestures are supported on a device, perform the following actions:
1. First, import the following classes into your project:
import flash.display.StageScaleMode; import flash.display.StageAlign; import flash.display.Stage; import flash.display.Sprite; import flash.text.TextField; import flash.text.TextFormat; import flash.ui.Multitouch; import flash.ui.MultitouchInputMode;
2. Declare a
TextField
andTextFormat
object to allow visible output upon the device:private var traceField:TextField; private var traceFormat:TextFormat;
3. We will now set up our
TextField
, apply aTextFormat
, and add it to theDisplayList
. Here, we create a method to perform all of these...