Apache Flex 4.16.1 API Reference | All Packages | All Classes | Index | Frames No Frames |
FlexClient

Package | mx.messaging
Class | public class FlexClient
Inheritance | FlexClient flash.events.EventDispatcher

Language Version : | ActionScript 3.0

Product Versions : | BlazeDS 4, LCDS 3

Runtime Versions : | Flash Player 9, AIR 1.1

Singleton class that stores the global Id for this Player instance that is server assigned when the client makes its initial connection to the server.

Public Properties

| Property | Defined By
--- | --- | ---
|  | id : String The global FlexClient Id for this Player instance. | FlexClient

Public Methods

| Method | Defined By
--- | --- | ---
|  | getInstance():FlexClient [static] Returns the sole instance of this singleton class, creating it if it does not already exist. | FlexClient

Events

| Event | Summary | Defined By
--- | --- | --- | ---
|  | propertyChange | Dispatched when a property of the FlexClient singleton changes. | FlexClient

Property Detail

id | property

`id:String`

Language Version : | ActionScript 3.0

Product Versions : | BlazeDS 4, LCDS 3

Runtime Versions : | Flash Player 9, AIR 1.1

The global FlexClient Id for this Player instance. This value is server assigned and is set as part of the Channel connect process. Once set, it will not change for the duration of the Player instance's lifespan. If no Channel has connected to a server this value is null.

This property can be used as the source for data binding.

Implementation
`public function get id():String`
`public function set id(value:String):void`
Method Detail

getInstance | () | method

`public static function getInstance():FlexClient`

Language Version : | ActionScript 3.0

Product Versions : | BlazeDS 4, LCDS 3

Runtime Versions : | Flash Player 9, AIR 1.1

Returns the sole instance of this singleton class, creating it if it does not already exist.

Returns

| `FlexClient` — Returns the sole instance of this singleton class, creating it if it does not already exist.

Event Detail

propertyChange | Event

Event Object Type: `mx.events.PropertyChangeEvent`
PropertyChangeEvent.type property = `mx.events.PropertyChangeEvent.PROPERTY_CHANGE`

Language Version : | ActionScript 3.0

Product Versions : | BlazeDS 4, LCDS 3

Runtime Versions : | Flash Player 9, AIR 1.1

Dispatched when a property of the FlexClient singleton changes. Listeners must be added via FlexClient.getInstance().addEventListener(...).

The `PropertyChangeEvent.PROPERTY_CHANGE` constant defines the value of the `type` property of the event object for a `PropertyChange` event.

The properties of the event object have the following values:

Property | Value
--- | ---
`bubbles` | Determined by the constructor; defaults to false.
`cancelable` | Determined by the constructor; defaults to false.
`kind` | The kind of change; PropertyChangeEventKind.UPDATE or PropertyChangeEventKind.DELETE.
`oldValue` | The original property value.
`newValue` | The new property value, if any.
`property` | The property that changed.
`source` | The object that contains the property that changed.
`currentTarget` | The Object that defines the event listener that handles the event. For example, if you use `myButton.addEventListener()` to register an event listener, myButton is the value of the `currentTarget`.
`target` | The Object that dispatched the event; it is not always the Object listening for the event. Use the `currentTarget` property to always access the Object listening for the event.

Wed Nov 15 2017, 09:50 AM +01:00