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

  1. package
  2. {
  3.    import com.flex.steps.RegApproval;
  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_steps_RegApprovalWatcherSetupUtil extends Sprite implements IWatcherSetupUtil
  11.    {
  12.       public function _com_flex_steps_RegApprovalWatcherSetupUtil()
  13.       {
  14.          super();
  15.       }
  16.       
  17.       public static function init(param1:IFlexModuleFactory) : void
  18.       {
  19.          RegApproval.watcherSetupUtil = new _com_flex_steps_RegApprovalWatcherSetupUtil();
  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[2] = new FunctionReturnWatcher("getString",target,function():Array
  30.          {
  31.             return ["approvals","START_KIDOZ"];
  32.          },{"change":true},[bindings[1]],null);
  33.          watchers[1] = new FunctionReturnWatcher("getString",target,function():Array
  34.          {
  35.             return ["approvals","REGISTRATION_APPROVAL"];
  36.          },{"change":true},[bindings[0]],null);
  37.          watchers[0].updateParent(target);
  38.          watchers[2].parentWatcher = watchers[0];
  39.          watchers[0].addChild(watchers[2]);
  40.          watchers[1].parentWatcher = watchers[0];
  41.          watchers[0].addChild(watchers[1]);
  42.       }
  43.    }
  44. }
  45.  
  46.