| Package | com.google.analytics.utils |
| Class | public class Environment |
| Property | Defined by | ||
|---|---|---|---|
| appName : String
Indicates the name of the application.
| Environment | ||
| appVersion : Version
Indicates the version of the application.
| Environment | ||
| documentTitle : String [read-only]
Indicates the title of the document.
| Environment | ||
| domainName : String [read-only]
Indicates the local domain name value.
| Environment | ||
| flashVersion : Version
[read-only]
Returns the flash version object representation of the application.
| Environment | ||
| language : String [read-only]
Returns the language string as a lowercase two-letter language code from ISO 639-1.
| Environment | ||
| languageEncoding : String [read-only]
Returns the internal character set used by the flash player
Logic : by default flash player use unicode internally so we return UTF-8. If the player use the system code page then we try to return the char set of the browser. | Environment | ||
| locationPath : String [read-only]
Indicates the locationPath value.
| Environment | ||
| locationSearch : String [read-only]
Indicates the locationSearch value.
| Environment | ||
| locationSWFPath : String [read-only]
Indicates the location of swf.
| Environment | ||
| operatingSystem : String [read-only]
Returns the operating system string.
| Environment | ||
| platform : String [read-only]
Returns the platform, can be "Windows", "Macintosh" or "Linux"
| Environment | ||
| playerType : String [read-only]
Returns the player type.
| Environment | ||
| protocol : Protocols
[read-only]
Indicates the Protocols object of this local info.
| Environment | ||
| referrer : String [read-only]
Indicates the referrer value.
| Environment | ||
| screenColorDepth : String [read-only]
In AIR we can use flash.display.Screen to directly get the colorDepth property
in flash player we can only access screenColor in flash.system.Capabilities.
| Environment | ||
| screenHeight : Number [read-only]
Indicates the height of the screen.
| Environment | ||
| screenWidth : Number [read-only]
Indicates the width of the screen.
| Environment | ||
| userAgent : UserAgent
Defines a custom user agent.
| Environment | ||
| Method | Defined by | ||
|---|---|---|---|
|
Environment(url:String = "", app:String = "", version:String = "", debug:DebugConfiguration = null, dom:HTMLDOM = null)
Creates a new Environment instance.
| Environment | ||
|
isAIR():Boolean
Indicates if the application is running in AIR.
| Environment | ||
|
isInHTML():Boolean
Indicates if the SWF is embeded in an HTML page.
| Environment | ||
| appName | property |
appName:String [read-write]Indicates the name of the application.
Implementation public function get appName():String
public function set appName(value:String):void
| appVersion | property |
appVersion:Version [read-write]Indicates the version of the application.
Implementation public function get appVersion():Version
public function set appVersion(value:Version):void
| documentTitle | property |
documentTitle:String [read-only]Indicates the title of the document.
Implementation public function get documentTitle():String
| domainName | property |
domainName:String [read-only]Indicates the local domain name value.
Implementation public function get domainName():String
| flashVersion | property |
flashVersion:Version [read-only]Returns the flash version object representation of the application.
This object contains the attributes major, minor, build and revision :
Example :
import com.google.analytics.utils.Environment ;
var info:Environment = new Environment( "http://www.domain.com" ) ;
var version:Object = info.flashVersion ;
trace( version.major ) ; // 9
trace( version.minor ) ; // 0
trace( version.build ) ; // 124
trace( version.revision ) ; // 0
Implementation
public function get flashVersion():Version
| language | property |
language:String [read-only]Returns the language string as a lowercase two-letter language code from ISO 639-1.
Implementation public function get language():String
See also
| languageEncoding | property |
languageEncoding:String [read-only]Returns the internal character set used by the flash player
Logic : by default flash player use unicode internally so we return UTF-8.
If the player use the system code page then we try to return the char set of the browser.
Implementation public function get languageEncoding():String
| locationPath | property |
locationPath:String [read-only]Indicates the locationPath value.
Implementation public function get locationPath():String
| locationSearch | property |
locationSearch:String [read-only]Indicates the locationSearch value.
Implementation public function get locationSearch():String
| locationSWFPath | property |
locationSWFPath:String [read-only]Indicates the location of swf.
Implementation public function get locationSWFPath():String
| operatingSystem | property |
operatingSystem:String [read-only]Returns the operating system string.
Note: The flash documentation indicate those strings
Other strings we can obtain ( not documented : "Mac OS 10.5.4" , "Windows Vista")
Implementation public function get operatingSystem():String
See also
| platform | property |
platform:String [read-only]Returns the platform, can be "Windows", "Macintosh" or "Linux"
Implementation public function get platform():String
See also
| playerType | property |
playerType:String [read-only]Returns the player type.
Note : The flash documentation indicate those strings.
public function get playerType():String
See also
| protocol | property |
protocol:Protocols [read-only]Indicates the Protocols object of this local info.
Implementation public function get protocol():Protocols
| referrer | property |
referrer:String [read-only]Indicates the referrer value.
Implementation public function get referrer():String
| screenColorDepth | property |
screenColorDepth:String [read-only]In AIR we can use flash.display.Screen to directly get the colorDepth property in flash player we can only access screenColor in flash.system.Capabilities.
Some ref : http://en.wikipedia.org/wiki/Color_depth
public function get screenColorDepth():String
| screenHeight | property |
screenHeight:Number [read-only]Indicates the height of the screen.
Implementation public function get screenHeight():Number
See also
| screenWidth | property |
screenWidth:Number [read-only]Indicates the width of the screen.
Implementation public function get screenWidth():Number
See also
| url | property |
url:String [write-only]Sets the stage reference value of the application.
Implementation ga_internal function set url(value:String):void
| userAgent | property |
userAgent:UserAgent [read-write]Defines a custom user agent.
For case where the user would want to define its own application name and version it is possible to change appName and appVersion which are in sync with applicationProduct and applicationVersion properties.
Implementation public function get userAgent():UserAgent
public function set userAgent(value:UserAgent):void
| Environment | () | constructor |
public function Environment(url:String = "", app:String = "", version:String = "", debug:DebugConfiguration = null, dom:HTMLDOM = null)Creates a new Environment instance.
Parametersurl:String (default = "") — The URL of the SWF.
|
|
app:String (default = "") — The application name
|
|
version:String (default = "") — The application version
|
|
debug:DebugConfiguration (default = null) — the HTMLDOM reference.
|
|
dom:HTMLDOM (default = null) |
| isAIR | () | method |
public function isAIR():BooleanIndicates if the application is running in AIR.
ReturnsBoolean |
| isInHTML | () | method |
public function isInHTML():BooleanIndicates if the SWF is embeded in an HTML page.
ReturnsBoolean — true if the SWF is embeded in an HTML page.
|