Packagewidgetfactory.events
Classpublic class WidgetRoomEvent
InheritanceWidgetRoomEvent Inheritance flash.events.Event

The WidgetRoomEvent class contains events that concern Widget Rooms. All the events are dispatched from the WidgetRoom class.

This is important: Because of the way Captivate works, every widget is loaded into its own application domain. What that means is that one widget can not share a class with another widget (unless its native to Flash). Seeing as you can never tell which instance of the widget created the room in the first place, this makes listening to WidgetRoomEvent events awkward, because the event handler function will get passed the event object, and trying to cast that parameter as a WidgetRoomEvent may cause an error. So in the case of WidgetRoomEvents, it is always best to cast that parameter as an Object instead.

To put it simply. Do this:

     
     private function onWidgetRoomEvent(event:Object):void
     {
     
     }
     
     

Not this:

     
     private function onWidgetRoomEvent(event:WidgetRoomEvent):void
     {
     
     }
     
     

See also

widgetfactory.communication.BaseRoom


Public Properties
 PropertyDefined By
  member : Object
[read-only] The member object around which the event is focusing on.
WidgetRoomEvent
  memberName : String
[read-only] The name of the member that the event is focusing on.
WidgetRoomEvent
  memberRole : String
[read-only] The role of the member around which the event is focusing on.
WidgetRoomEvent
  oldMember : Object
[read-only] The name of the member that is being replaced in the REPLACE_DUPLICATE_MEMBER event.
WidgetRoomEvent
Public Methods
 MethodDefined By
  
WidgetRoomEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, memberName:String, member:Object = null, role:String, oldMember:Object = null)
Creates an Event object to pass as a parameter to event listeners.
WidgetRoomEvent
  
clone():Event
[override] Creates a copy of the WidgetRoomEvent object and sets the value of each property to match that of the original.
WidgetRoomEvent
  
toString():String
[override] Makes a nice friendly string of something...
WidgetRoomEvent
Public Constants
 ConstantDefined By
  MEMBER_JOINING : String = newMember
[static] Dispatched when a new member joins the room.
WidgetRoomEvent
  MEMBER_QUITING : String = memberQuiting
[static] Dispatched when a member leaves the room.
WidgetRoomEvent
  REPLACE_DUPLICATE_MEMBER : String = replaceDuplicateMember
[static] Dispatched in the case where a member is added to the room which has the same name as another member.
WidgetRoomEvent
  ROOM_DELETED : String = roomDeleted
[static] Dispatched when the room is about to be deleted.
WidgetRoomEvent
Property Detail
memberproperty
member:Object  [read-only]

The member object around which the event is focusing on.


Implementation
    public function get member():Object

See also

memberNameproperty 
memberName:String  [read-only]

The name of the member that the event is focusing on.


Implementation
    public function get memberName():String

See also

memberRoleproperty 
memberRole:String  [read-only]

The role of the member around which the event is focusing on.


Implementation
    public function get memberRole():String

See also

oldMemberproperty 
oldMember:Object  [read-only]

The name of the member that is being replaced in the REPLACE_DUPLICATE_MEMBER event.


Implementation
    public function get oldMember():Object

See also

Constructor Detail
WidgetRoomEvent()Constructor
public function WidgetRoomEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, memberName:String, member:Object = null, role:String, oldMember:Object = null)

Creates an Event object to pass as a parameter to event listeners.

Parameters
type:String — The type of the event.
 
bubbles:Boolean (default = false) — Determines whether the Event object participates in the bubbling stage of the event flow (or something). The default value is false.
 
cancelable:Boolean (default = false) — Determines whether the Event object can be canceled. The default values is false.
 
memberName:String — The name of the member that is the focus of the event.
 
member:Object (default = null) — The member object that is the focus of the event.
 
role:String — The role over the member that is the focus of the event.
 
oldMember:Object (default = null) — The member object that is being replaced by the new member.
Method Detail
clone()method
override public function clone():Event

Creates a copy of the WidgetRoomEvent object and sets the value of each property to match that of the original.

Returns
Event — A new WidgetRoomEvent object that is identical to the original.
toString()method 
override public function toString():String

Makes a nice friendly string of something... Useful for tracing I believe, but don't take my word for it.

Returns
String — A friendly string
Constant Detail
MEMBER_JOININGConstant
public static const MEMBER_JOINING:String = newMember

Dispatched when a new member joins the room.

See also

MEMBER_QUITINGConstant 
public static const MEMBER_QUITING:String = memberQuiting

Dispatched when a member leaves the room.

See also

REPLACE_DUPLICATE_MEMBERConstant 
public static const REPLACE_DUPLICATE_MEMBER:String = replaceDuplicateMember

Dispatched in the case where a member is added to the room which has the same name as another member. In this case, the old member will be deregistered, and the new member put in its place.

ROOM_DELETEDConstant 
public static const ROOM_DELETED:String = roomDeleted

Dispatched when the room is about to be deleted.

See also