| Package | fl.events |
| Class | public class InteractionInputType |
| Inheritance | InteractionInputType Object |
| Language Version : | ActionScript 3.0 |
| Runtime Versions : | AIR 1.0, Flash Player 9.0.28.0 |
triggerEvent property of the SliderEvent object. These constants define strings
to identify the sources of input that can trigger an event: the mouse and the keyboard.
See also
| Constant | Defined By | ||
|---|---|---|---|
| KEYBOARD : String = "keyboard" [static]
The InteractionInputType.KEYBOARD constant defines the value of
the type property of a keyboard event object. | InteractionInputType | ||
| MOUSE : String = "mouse" [static]
The InteractionInputType.MOUSE constant defines the value of
the type property of a mouse event object. | InteractionInputType | ||
| KEYBOARD | Constant |
public static const KEYBOARD:String = "keyboard"| Language Version : | ActionScript 3.0 |
| Runtime Versions : | AIR 1.0, Flash Player 9.0.28.0 |
The InteractionInputType.KEYBOARD constant defines the value of
the type property of a keyboard event object.
| MOUSE | Constant |
public static const MOUSE:String = "mouse"| Language Version : | ActionScript 3.0 |
| Runtime Versions : | AIR 1.0, Flash Player 9.0.28.0 |
The InteractionInputType.MOUSE constant defines the value of
the type property of a mouse event object.
To run the example, follow these steps:
slider.sliderLabel.
package
{
import fl.events.InteractionInputType;
import fl.events.SliderEvent;
import flash.display.Sprite;
import flash.text.TextFieldAutoSize;
public class InteractionInputTypeExample extends Sprite
{
public function InteractionInputTypeExample() {
slider.addEventListener(SliderEvent.CHANGE, analyzeSliderInput);
slider.addEventListener(SliderEvent.THUMB_DRAG, analyzeSliderInput);
sliderLabel.autoSize = TextFieldAutoSize.LEFT;
sliderLabel.text = "Select and move slider with keyboard or mouse";
myLabel.autoSize = TextFieldAutoSize.LEFT;
myLabel.text = "Lorem ipsum lorem ipsum lorem ipsum.";
}
private function analyzeSliderInput(e:SliderEvent):void {
switch(e.triggerEvent) {
case InteractionInputType.MOUSE:
sliderLabel.text = "Slider has been moved with mouse";
break;
case InteractionInputType.KEYBOARD:
sliderLabel.text = "Slider has been moved with keyboard";
break;
default:
break;
}
}
}
}
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/fl/events/InteractionInputType.html