Adobe® Flex® 4 Language Reference
Hide Packages and Classes List |  Packages  |  Classes  |  Index  |  Appendixes
mx.messaging 
FlexClient 
Packagemx.messaging
Classpublic class FlexClient
InheritanceFlexClient Inheritance EventDispatcher Inheritance Object

Language Version: ActionScript 3.0
Product Versions: BlazeDS 4, LiveCycle Data Services 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
 PropertyDefined By
 Inheritedconstructor : Object
A reference to the class object or constructor function for a given object instance.
Object
  id : String
The global FlexClient Id for this Player instance.
FlexClient
 Inheritedprototype : Object
[static] A reference to the prototype object of a class or function object.
Object
Public Methods
 MethodDefined By
 Inherited
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registers an event listener object with an EventDispatcher object so that the listener receives notification of an event.
EventDispatcher
 Inherited
Dispatches an event into the event flow.
EventDispatcher
  
[static] Returns the sole instance of this singleton class, creating it if it does not already exist.
FlexClient
 Inherited
Checks whether the EventDispatcher object has any listeners registered for a specific type of event.
EventDispatcher
 Inherited
Indicates whether an object has a specified property defined.
Object
 Inherited
Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter.
Object
 Inherited
Indicates whether the specified property exists and is enumerable.
Object
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Removes a listener from the EventDispatcher object.
EventDispatcher
 Inherited
Sets the availability of a dynamic property for loop operations.
Object
 Inherited
Returns the string representation of this object, formatted according to locale-specific conventions.
Object
 Inherited
Returns the string representation of the specified object.
Object
 Inherited
Returns the primitive value of the specified object.
Object
 Inherited
Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type.
EventDispatcher
Events
 Event Summary Defined By
 Inherited[broadcast event] Dispatched when the Flash Player or AIR application gains operating system focus and becomes active.EventDispatcher
 Inherited[broadcast event] Dispatched when the Flash Player or AIR application operating loses system focus and is becoming inactive.EventDispatcher
  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, LiveCycle Data Services 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. When this property is modified, it dispatches the propertyChange event.



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, LiveCycle Data Services 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
property PropertyChangeEvent.type = mx.events.PropertyChangeEvent.PROPERTY_CHANGE

Language Version: ActionScript 3.0
Product Versions: BlazeDS 4, LiveCycle Data Services 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:

PropertyValue
bubblesDetermined by the constructor; defaults to false.
cancelableDetermined by the constructor; defaults to false.
kindThe kind of change; PropertyChangeEventKind.UPDATE or PropertyChangeEventKind.DELETE.
oldValueThe original property value.
newValueThe new property value, if any.
propertyThe property that changed.
sourceThe object that contains the property that changed.
currentTargetThe 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.
targetThe 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.