Flash Lite 1.x ActionScript Language Reference |
|
|
|
| Flash Lite Specific Language Elements > fscommand2() > GetPlatform | |||
Flash Lite 1.1.
Sets a parameter that identifies the current platform, which broadly describes the class of device. For devices with open operating systems, this identifier is typically the name and version of the operating system.
|
Command |
Parameters |
Value returned |
|---|---|---|
|
|
|
-1: Not supported. 0: Supported. |
The following code example assigns the platform identifier to the statusplatform variable, and then updates a text field with the generic platform name.
These are some sample results for myPlatform and the classes of device they signify:
506i A 506i phone.
FOMA1 A FOMA1 phone.
Symbian6.1_s60.1 A Symbian 6.1, Series 60 version 1 phone.
Symbian7.0 A Symbian 7.0 phone
statusplatform = fscommand2("GetPlatform", "platform");
switch(platform){
case "506i":
/:myText += "platform: 506i" add newline;
break;
case "FOMA1":
/:myText += "platform: FOMA1" add newline;
break;
case "Symbian6.1-Series60v1":
/:myText += "platform: Symbian6.1, Series 60 version 1 phone" add newline;
break;
case "Symbian7.0":
/:myText += "platform: Symbian 7.0" add newline;
break;
}
|
|
|
|