home *** CD-ROM | disk | FTP | other *** search
/ Computer Active 2010 August / CA08.iso / Darbas / kidoz_v1.air / kidoz.swf / scripts / _com_flex_TopLeftWatcherSetupUtil.as < prev    next >
Encoding:
Text File  |  2009-05-06  |  2.1 KB  |  54 lines

  1. package
  2. {
  3.    import com.flex.TopLeft;
  4.    import flash.display.Sprite;
  5.    import mx.binding.FunctionReturnWatcher;
  6.    import mx.binding.IWatcherSetupUtil;
  7.    import mx.binding.PropertyWatcher;
  8.    import mx.core.IFlexModuleFactory;
  9.    
  10.    public class _com_flex_TopLeftWatcherSetupUtil extends Sprite implements IWatcherSetupUtil
  11.    {
  12.       public function _com_flex_TopLeftWatcherSetupUtil()
  13.       {
  14.          super();
  15.       }
  16.       
  17.       public static function init(param1:IFlexModuleFactory) : void
  18.       {
  19.          TopLeft.watcherSetupUtil = new _com_flex_TopLeftWatcherSetupUtil();
  20.       }
  21.       
  22.       public function setup(param1:Object, param2:Function, param3:Array, param4:Array) : void
  23.       {
  24.          var target:Object = param1;
  25.          var propertyGetter:Function = param2;
  26.          var bindings:Array = param3;
  27.          var watchers:Array = param4;
  28.          watchers[0] = new PropertyWatcher("resourceManager",{"unused":true},[bindings[1],bindings[0]],propertyGetter);
  29.          watchers[6] = new FunctionReturnWatcher("getString",target,function():Array
  30.          {
  31.             return ["topBar","PARENTAL_CONTROL"];
  32.          },{"change":true},[bindings[1]],null);
  33.          watchers[1] = new FunctionReturnWatcher("getString",target,function():Array
  34.          {
  35.             return ["topBar","HELLO"];
  36.          },{"change":true},[bindings[0]],null);
  37.          watchers[2] = new PropertyWatcher("parentDocument",{"initialize":true},[bindings[0]],propertyGetter);
  38.          watchers[3] = new PropertyWatcher("userInfoXML",null,[bindings[0]],null);
  39.          watchers[4] = new PropertyWatcher("USERINFO",null,[bindings[0]],null);
  40.          watchers[5] = new PropertyWatcher("kidname",null,[bindings[0]],null);
  41.          watchers[0].updateParent(target);
  42.          watchers[6].parentWatcher = watchers[0];
  43.          watchers[0].addChild(watchers[6]);
  44.          watchers[1].parentWatcher = watchers[0];
  45.          watchers[0].addChild(watchers[1]);
  46.          watchers[2].updateParent(target);
  47.          watchers[2].addChild(watchers[3]);
  48.          watchers[3].addChild(watchers[4]);
  49.          watchers[4].addChild(watchers[5]);
  50.       }
  51.    }
  52. }
  53.  
  54.