| Pacchetto | flash.system |
| Classe | public final class TouchscreenType |
| Ereditarietà | TouchscreenType Object |
| Versione linguaggio: | ActionScript 3.0 |
| Versioni runtime: | Flash Player 10.1, AIR 2 |
Utilizzate i valori definiti dalla classe TouchscreenType con la proprietà Capabilities.touchscreenType.
Elementi API correlati
Proprietà pubbliche
Metodi pubblici
Costanti pubbliche
| Costante | Definito da | ||
|---|---|---|---|
| FINGER : String = "finger" [statico]
Un touch screen progettato per rispondere al tocco delle dita. | TouchscreenType | ||
| NONE : String = "none" [statico]
Il computer o il dispositivo non dispone di un touch screen supportato. | TouchscreenType | ||
| STYLUS : String = "stylus" [statico]
Un touch screen progettato per essere utilizzato con uno stilo. | TouchscreenType | ||
Descrizione delle costanti
FINGER | Costante |
public static const FINGER:String = "finger"| Versione linguaggio: | ActionScript 3.0 |
| Versioni runtime: | Flash Player 10.1, AIR 2 |
Un touch screen progettato per rispondere al tocco delle dita.
NONE | Costante |
public static const NONE:String = "none"| Versione linguaggio: | ActionScript 3.0 |
| Versioni runtime: | Flash Player 10.1, AIR 2 |
Il computer o il dispositivo non dispone di un touch screen supportato.
STYLUS | Costante |
public static const STYLUS:String = "stylus"| Versione linguaggio: | ActionScript 3.0 |
| Versioni runtime: | Flash Player 10.1, AIR 2 |
Un touch screen progettato per essere utilizzato con uno stilo.
KeyboardType.as
L'esempio seguente è un semplice test che indica lo stato corrente dei tasti "Bloc Num" e "Blocco maiuscole" nonché il tipo di tastiera e di touch screen nell'ambiente operativo. Quando provate questo esempio, fate clic sul campo di testo per vedere i valori delle proprietà:
import flash.events.*;
import flash.display.*;
import flash.ui.Keyboard;
import flash.system.Capabilities;
import flash.text.TextField;
var keyboardInfoTxt:TextField = new TextField();
keyboardInfoTxt.x = 30;
keyboardInfoTxt.y = 50;
keyboardInfoTxt.width = 300;
keyboardInfoTxt.height = 100;
keyboardInfoTxt.border = true;
addChild(keyboardInfoTxt);
addEventListener (MouseEvent.CLICK, getScreenKeyboardType);
function getScreenKeyboardType(e:MouseEvent):void{
keyboardInfoTxt.text= "Caps Lock is : " + String(flash.ui.Keyboard.capsLock)+ "\n" +
"Num Lock is : " + String(flash.ui.Keyboard.numLock) +"\n" +
"Has Virtual Keyboard : " + String(flash.ui.Keyboard.hasVirtualKeyboard) + "\n" +
"Physical Keyboard Type : " + flash.ui.Keyboard.physicalKeyboardType + "\n" +
"flash.system.Capabilities.touchscreenType is : " + flash.system.Capabilities.touchscreenType;
}
Tue Jun 12 2018, 02:44 PM Z
Nascondi proprietà pubbliche ereditate
Mostra proprietà pubbliche ereditate