package { public final class actionscript_book_IntrovertIM_HTML_com_example_programmingas3_introvertIM_IMStatus { // ------- "Enum" members ------- public static var NeedAFriend:actionscript_book_IntrovertIM_HTML_com_example_programmingas3_introvertIM_IMStatus = new actionscript_book_IntrovertIM_HTML_com_example_programmingas3_introvertIM_IMStatus(1, "Please talk to me!"); public static var ImHere:actionscript_book_IntrovertIM_HTML_com_example_programmingas3_introvertIM_IMStatus = new actionscript_book_IntrovertIM_HTML_com_example_programmingas3_introvertIM_IMStatus(2, "I'm here"); public static var NotTooBusy:actionscript_book_IntrovertIM_HTML_com_example_programmingas3_introvertIM_IMStatus = new actionscript_book_IntrovertIM_HTML_com_example_programmingas3_introvertIM_IMStatus(3, "Not too busy for you"); public static var EmergenciesOnly:actionscript_book_IntrovertIM_HTML_com_example_programmingas3_introvertIM_IMStatus = new actionscript_book_IntrovertIM_HTML_com_example_programmingas3_introvertIM_IMStatus(4, "Emergencies Only"); public static var GoAway:actionscript_book_IntrovertIM_HTML_com_example_programmingas3_introvertIM_IMStatus = new 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 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 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 actionscript_book_IntrovertIM_HTML_com_example_programmingas3_introvertIM_IMStatus object. * @return The appropriate String */ public function toString():String { return (_displayText != null && _displayText.length > 0) ? _displayText : "[Object actionscript_book_IntrovertIM_HTML_com_example_programmingas3_introvertIM_IMStatus uid:" + _uid.toString() + "]"; } } }