actionscript-book-IntrovertIM_HTML-com-example-programmingas3-introvertIM-IMStatus.ax [swf] flex
package { public final class @ax-actionscript-book-IntrovertIM_HTML-com-example-programmingas3-introvertIM-IMStatus { // ------- "Enum" members ------- public static var NeedAFriend:@ax-actionscript-book-IntrovertIM_HTML-com-example-programmingas3-introvertIM-IMStatus = new @ax-actionscript-book-IntrovertIM_HTML-com-example-programmingas3-introvertIM-IMStatus(1, "Please talk to me!"); public static var ImHere:@ax-actionscript-book-IntrovertIM_HTML-com-example-programmingas3-introvertIM-IMStatus = new @ax-actionscript-book-IntrovertIM_HTML-com-example-programmingas3-introvertIM-IMStatus(2, "I'm here"); public static var NotTooBusy:@ax-actionscript-book-IntrovertIM_HTML-com-example-programmingas3-introvertIM-IMStatus = new @ax-actionscript-book-IntrovertIM_HTML-com-example-programmingas3-introvertIM-IMStatus(3, "Not too busy for you"); public static var EmergenciesOnly:@ax-actionscript-book-IntrovertIM_HTML-com-example-programmingas3-introvertIM-IMStatus = new @ax-actionscript-book-IntrovertIM_HTML-com-example-programmingas3-introvertIM-IMStatus(4, "Emergencies Only"); public static var GoAway:@ax-actionscript-book-IntrovertIM_HTML-com-example-programmingas3-introvertIM-IMStatus = new @ax-actionscript-book-IntrovertIM_HTML-com-example-programmingas3-introvertIM-IMStatus(5, "Go Away!");
An array containing all the available statuses, for populating the list of statuses.
public static const allStatuses:Array = [ NeedAFriend, ImHere, NotTooBusy, EmergenciesOnly, GoAway ]; // ------- Private vars ------- private var _uid:uint; private var _displayText:String; // ------- Constructor ------- public function @ax-actionscript-book-IntrovertIM_HTML-com-example-programmingas3-introvertIM-IMStatus(uid:uint, displayText:String) { _uid = uid; _displayText = displayText; } // ------- Public Accessors -------
Provides a String representation of the current @ax-actionscript-book-IntrovertIM_HTML-com-example-programmingas3-introvertIM-IMStatus object. This property is provided to satisfy the Flash components, which require a "label" field on data items.
public function get label():String { return this.toString(); } public function get icon():String { return null; } // ------- Public Methods -------
Provides a String representation of the current @ax-actionscript-book-IntrovertIM_HTML-com-example-programmingas3-introvertIM-IMStatus object.
returns: The appropriate String
public function toString():String { return (_displayText != null && _displayText.length > 0) ? _displayText : "[Object @ax-actionscript-book-IntrovertIM_HTML-com-example-programmingas3-introvertIM-IMStatus uid:" + _uid.toString() + "]"; } } }
(C) Æliens 27/08/2009
You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.