| Main Menu |
|---|
| Games |
|---|
| Current Projects |
|---|
| Articles & Tutorials |
|---|
| Other works |
|---|
| AS3 - Detecting the current runtime environment |
|
|
|
| Sunday, 19 June 2011 14:38 |
|
Knowing on which type of player (runtime environment) our game is running can lead to interesting features, sometimes. To check that, we can use the static playerType property of the Capabilities class. It gives a String, with one of the following values:
For example, let's put a dynamic TextField on your stage and call it "playerCheck_txt", without quotes. Then, create your document class, name it MyMain and write this piece of code:
And, as a result, you will get this one:
|


