home *** CD-ROM | disk | FTP | other *** search
/ Computer Active 2010 August / CA08.iso / Multimedija / shufflr.air / ShufflrClient.swf / scripts / mx / messaging / FlexClient.as < prev    next >
Encoding:
Text File  |  2010-06-23  |  1.8 KB  |  69 lines

  1. package mx.messaging
  2. {
  3.    import flash.events.EventDispatcher;
  4.    import mx.core.mx_internal;
  5.    import mx.events.PropertyChangeEvent;
  6.    
  7.    use namespace mx_internal;
  8.    
  9.    public class FlexClient extends EventDispatcher
  10.    {
  11.       private static var _instance:FlexClient;
  12.       
  13.       mx_internal static const NULL_FLEXCLIENT_ID:String = "nil";
  14.       
  15.       private var _waitForFlexClientId:Boolean = false;
  16.       
  17.       private var _id:String;
  18.       
  19.       public function FlexClient()
  20.       {
  21.          super();
  22.       }
  23.       
  24.       public static function getInstance() : FlexClient
  25.       {
  26.          if(_instance == null)
  27.          {
  28.             _instance = new FlexClient();
  29.          }
  30.          return _instance;
  31.       }
  32.       
  33.       [Bindable(event="propertyChange")]
  34.       public function get id() : String
  35.       {
  36.          return _id;
  37.       }
  38.       
  39.       [Bindable(event="propertyChange")]
  40.       mx_internal function get waitForFlexClientId() : Boolean
  41.       {
  42.          return _waitForFlexClientId;
  43.       }
  44.       
  45.       public function set id(param1:String) : void
  46.       {
  47.          var _loc2_:PropertyChangeEvent = null;
  48.          if(_id != param1)
  49.          {
  50.             _loc2_ = PropertyChangeEvent.createUpdateEvent(this,"id",_id,param1);
  51.             _id = param1;
  52.             dispatchEvent(_loc2_);
  53.          }
  54.       }
  55.       
  56.       mx_internal function set waitForFlexClientId(param1:Boolean) : void
  57.       {
  58.          var _loc2_:PropertyChangeEvent = null;
  59.          if(_waitForFlexClientId != param1)
  60.          {
  61.             _loc2_ = PropertyChangeEvent.createUpdateEvent(this,"waitForFlexClientId",_waitForFlexClientId,param1);
  62.             _waitForFlexClientId = param1;
  63.             dispatchEvent(_loc2_);
  64.          }
  65.       }
  66.    }
  67. }
  68.  
  69.