Package | starling.utils |
Class | public class SystemUtil |
Inheritance | SystemUtil Object |
Property | Defined By | ||
---|---|---|---|
isAIR : Boolean [static] [read-only] Indicates if the code is executed in an Adobe AIR runtime (true)
or Flash plugin/projector (false). | SystemUtil | ||
isApplicationActive : Boolean [static] [read-only] Indicates if the application is currently active. | SystemUtil | ||
isDesktop : Boolean [static] [read-only] Indicates if the code is executed on a Desktop computer with Windows, OS X or Linux
operating system. | SystemUtil | ||
platform : String [static] [read-only] Returns the three-letter platform string of the current system. | SystemUtil | ||
supportsDepthAndStencil : Boolean [static] [read-only] Returns the value of the 'initialWindow.depthAndStencil' node of the application
descriptor, if this in an AIR app; otherwise always true. | SystemUtil | ||
supportsVideoTexture : Boolean [static] [read-only] Indicates if Context3D supports video textures. | SystemUtil | ||
version : String [static] [read-only] Returns the Flash Player/AIR version string. | SystemUtil |
Method | Defined By | ||
---|---|---|---|
executeWhenApplicationIsActive(call:Function, ... args):void [static] Executes the given function with its arguments the next time the application is active. | SystemUtil | ||
initialize():void [static] Initializes the ACTIVATE/DEACTIVATE event handlers on the native
application. | SystemUtil | ||
isEmbeddedFont(fontName:String, bold:Boolean = false, italic:Boolean = false, fontType:String = embedded):Boolean [static] Figures out if an embedded font with the specified style is available. | SystemUtil | ||
updateEmbeddedFonts():void [static] Updates the list of embedded fonts. | SystemUtil |
isAIR | property |
isAIR:Boolean
[read-only] Indicates if the code is executed in an Adobe AIR runtime (true) or Flash plugin/projector (false).
public static function get isAIR():Boolean
isApplicationActive | property |
isApplicationActive:Boolean
[read-only] Indicates if the application is currently active. On Desktop, this means that it has the focus; on mobile, that it is in the foreground. In the Flash Plugin, always returns true.
public static function get isApplicationActive():Boolean
isDesktop | property |
isDesktop:Boolean
[read-only] Indicates if the code is executed on a Desktop computer with Windows, OS X or Linux operating system. If the method returns 'false', it's probably a mobile device or a Smart TV.
public static function get isDesktop():Boolean
platform | property |
platform:String
[read-only] Returns the three-letter platform string of the current system. These are
the most common platforms: WIN, MAC, LNX, IOS, AND, QNX
. Except for the
last one, which indicates "Blackberry", all should be self-explanatory.
public static function get platform():String
supportsDepthAndStencil | property |
supportsDepthAndStencil:Boolean
[read-only] Returns the value of the 'initialWindow.depthAndStencil' node of the application
descriptor, if this in an AIR app; otherwise always true
.
public static function get supportsDepthAndStencil():Boolean
supportsVideoTexture | property |
supportsVideoTexture:Boolean
[read-only] Indicates if Context3D supports video textures. At the time of this writing, video textures are only supported on Windows, OS X and iOS, and only in AIR applications (not the Flash Player).
public static function get supportsVideoTexture():Boolean
version | property |
version:String
[read-only] Returns the Flash Player/AIR version string. The format of the version number is: majorVersion,minorVersion,buildNumber,internalBuildNumber.
public static function get version():String
executeWhenApplicationIsActive | () | method |
public static function executeWhenApplicationIsActive(call:Function, ... args):void
Executes the given function with its arguments the next time the application is active. (If it is active already, the call will be executed right away.)
Parameters
call:Function | |
... args |
initialize | () | method |
public static function initialize():void
Initializes the ACTIVATE/DEACTIVATE
event handlers on the native
application. This method is automatically called by the Starling constructor.
isEmbeddedFont | () | method |
public static function isEmbeddedFont(fontName:String, bold:Boolean = false, italic:Boolean = false, fontType:String = embedded):Boolean
Figures out if an embedded font with the specified style is available. The fonts are enumerated only once; if you load a font at runtime, be sure to call 'updateEmbeddedFonts' before calling this method.
Parameters
fontName:String — the name of the font
| |
bold:Boolean (default = false ) — indicates if the font has a bold style
| |
italic:Boolean (default = false ) — indicates if the font has an italic style
| |
fontType:String (default = embedded ) — the type of the font (one of the constants defined in the FontType class)
|
Boolean |
updateEmbeddedFonts | () | method |
public static function updateEmbeddedFonts():void
Updates the list of embedded fonts. To be called when a font is loaded at runtime.