Packagenet.user1.reactor
Classpublic class AttributeEvent
InheritanceAttributeEvent Inheritance flash.events.Event

Since : Reactor 1.0.0

AttributeEvent is a simple data class used to pass information from an object to registered event-listeners when an attribute event occurs. The AttributeEvent class also defines constants representing the available attribute events. To register for an attribute event, use the Client, UserAccount, or Room class's addEventListener() method. The following code demonstrates:
   // The event-registration code
   someClient.addEventListener(AttributeEvent.UPDATE,
                               attributeUpdateListener);
   // The event-listener code
   protected function attributeUpdateListener (e:AttributeEvent):void {
     if (e.getChangedAttr().name == "ICON") {
       // Display the new user icon (displayUserIcon() function 
       // definition not shown)
       displayUserIcon(e.getChangedAttr().value);
     }
   }

See also

Client.setAttribute()
UserAccount.setAttribute()
Room.setAttribute()


Public Methods
 MethodDefined By
  
AttributeEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, changedAttr:Attribute = null, status:String = null)
Constructor
AttributeEvent
  
clone():Event
[override]
AttributeEvent
  
Returns an Attribute object pertaining to this client event.
AttributeEvent
  
getStatus():String
Returns the status of the operation to which this event pertains.
AttributeEvent
  
toString():String
[override]
AttributeEvent
Public Constants
 ConstantDefined By
  DELETE : String = DELETE
[static] Dispatched when an attribute is deleted.
AttributeEvent
  DELETE_RESULT : String = DELETE_RESULT
[static] Dispatched when the result of an attempt to delete an attribute is received.
AttributeEvent
  SET_RESULT : String = SET_RESULT
[static] Dispatched when the result of an attempt to set an attribute is received.
AttributeEvent
  UPDATE : String = UPDATE
[static] Dispatched when an attribute changes or is set for the first time.
AttributeEvent
Constructor Description
AttributeEvent()Constructor
public function AttributeEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, changedAttr:Attribute = null, status:String = null)

Constructor

Parameters
type:String
 
bubbles:Boolean (default = false)
 
cancelable:Boolean (default = false)
 
changedAttr:Attribute (default = null)
 
status:String (default = null)
Method Descriptions
clone()method
override public function clone():Event

Returns
Event
getChangedAttr()method 
public function getChangedAttr():Attribute

Since : Reactor 1.0.0

Returns an Attribute object pertaining to this client event. The Attribute object contains information about a changed attribute.

Returns
Attribute
getStatus()method 
public function getStatus():String

Since : Reactor 1.0.0

Returns the status of the operation to which this event pertains. The getStatus() method's return value is always one of the Status class's constants. For a list of specific status values that can be returned during a particular event, see the documentation for that event.

Returns
String
toString()method 
override public function toString():String

Returns
String
Constant Descriptions
DELETEConstant
public static const DELETE:String = DELETE

Since : Reactor 1.0.0

Dispatched when an attribute is deleted.

See also

DELETE_RESULTConstant 
public static const DELETE_RESULT:String = DELETE_RESULT

Since : Reactor 1.0.0

Dispatched when the result of an attempt to delete an attribute is received. To determine the result of the attempt, use getStatus(), which has the following possible return values:

See also

SET_RESULTConstant 
public static const SET_RESULT:String = SET_RESULT

Since : Reactor 1.0.0

Dispatched when the result of an attempt to set an attribute is received. To determine the result of the attempt, use getStatus(), which has the following possible return values:

See also

UPDATEConstant 
public static const UPDATE:String = UPDATE

Since : Reactor 1.0.0

Dispatched when an attribute changes or is set for the first time.

See also