| Package | widgetfactory.events |
| Class | public class WidgetRoomEvent |
| Inheritance | WidgetRoomEvent flash.events.Event |
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
| Property | Defined 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 | ||
| Method | Defined 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 | ||
| Constant | Defined 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 | ||
| member | property |
member:Object [read-only] The member object around which the event is focusing on.
public function get member():ObjectSee also
| memberName | property |
memberName:String [read-only] The name of the member that the event is focusing on.
public function get memberName():StringSee also
| memberRole | property |
memberRole:String [read-only] The role of the member around which the event is focusing on.
public function get memberRole():StringSee also
| oldMember | property |
oldMember:Object [read-only]
The name of the member that is being replaced in the REPLACE_DUPLICATE_MEMBER event.
public function get oldMember():ObjectSee also
| 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.
Parameterstype: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.
|
| 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.
Event — A new WidgetRoomEvent object that is identical to the original.
|
| toString | () | method |
override public function toString():StringMakes a nice friendly string of something... Useful for tracing I believe, but don't take my word for it.
ReturnsString — A friendly string
|
| MEMBER_JOINING | Constant |
public static const MEMBER_JOINING:String = newMemberDispatched when a new member joins the room.
See also
| MEMBER_QUITING | Constant |
public static const MEMBER_QUITING:String = memberQuitingDispatched when a member leaves the room.
See also
| REPLACE_DUPLICATE_MEMBER | Constant |
public static const REPLACE_DUPLICATE_MEMBER:String = replaceDuplicateMemberDispatched 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_DELETED | Constant |
public static const ROOM_DELETED:String = roomDeletedDispatched when the room is about to be deleted.
See also