Flash Lite 1.x ActionScript Language Reference |
|
|
|
| Flash Lite Specific Language Elements > fscommand2() > GetDevice | |||
Sets a parameter that identifies the device on which Flash Lite is running. This identifier is typically the model name.
|
Command |
Parameters |
Value returned |
|---|---|---|
|
|
|
-1: Not supported. 0: Supported. |
Flash Lite 1.1.
The following code example assigns the device identifier to the statusdevice variable, and then updates a text field with the generic device name.
These are some sample results and the devices they signify:
D506i A Mitsubishi 506i phone.
DFOMA1 A Mitsubishi FOMA1 phone.
F506i A Fujitsu 506i phone.
FFOMA1 A Fujitsu FOMA1 phone.
N506i An NEC 506i phone.
NFOMA1 An NEC FOMA1 phone.
Nokia3650 A Nokia 3650 phone.
p506i A Panasonic 506i phone.
PFOMA1 A Panasonic FOMA1 phone.
SH506i A Sharp 506i phone.
SHFOMA1 A Sharp FOMA1 phone.
SO506i A Sony 506iphone.
statusdevice = fscommand2("GetDevice", "devicename");
switch(devicename) {
case "D506i":
/:myText += "device: Mitsubishi 506i" add newline;
break;
case "DFOMA1":
/:myText += "device: Mitsubishi FOMA1" add newline;
break;
case "F506i":
/:myText += "device: Fujitsu 506i" add newline;
break;
case "FFOMA1":
/:myText += "device: Fujitsu FOMA1" add newline;
break;
case "N506i":
/:myText += "device: NEC 506i" add newline;
break;
case "NFOMA1":
/:myText += "device: NEC FOMA1" add newline;
break;
case "Nokia 3650":
/:myText += "device: Nokia 3650" add newline;
break;
case "P506i":
/:myText += "device: Panasonic 506i" add newline;
break;
case "PFOMA1":
/:myText += "device: Panasonic FOMA1" add newline;
break;
case "SH506i":
/:myText += "device: Sharp 506i" add newline;
break;
case "SHFOMA1":
/:myText += "device: Sharp FOMA1" add newline;
break;
case "SO506i":
/:myText += "device: Sony 506i" add newline;
break;
}
|
|
|
|