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

  1. package
  2. {
  3.    import com.flex.steps.LoginForm;
  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_LoginFormWatcherSetupUtil extends Sprite implements IWatcherSetupUtil
  11.    {
  12.       public function _com_flex_steps_LoginFormWatcherSetupUtil()
  13.       {
  14.          super();
  15.       }
  16.       
  17.       public static function init(param1:IFlexModuleFactory) : void
  18.       {
  19.          LoginForm.watcherSetupUtil = new _com_flex_steps_LoginFormWatcherSetupUtil();
  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[3] = new PropertyWatcher("btn",{"propertyChange":true},[bindings[2]],propertyGetter);
  29.          watchers[0] = new PropertyWatcher("resourceManager",{"unused":true},[bindings[4],bindings[6],bindings[1],bindings[3],bindings[7],bindings[5],bindings[0]],propertyGetter);
  30.          watchers[2] = new FunctionReturnWatcher("getString",target,function():Array
  31.          {
  32.             return ["login","TEXT"];
  33.          },{"change":true},[bindings[1]],null);
  34.          watchers[4] = new FunctionReturnWatcher("getString",target,function():Array
  35.          {
  36.             return ["login","PARENT_EMAIL"];
  37.          },{"change":true},[bindings[3]],null);
  38.          watchers[8] = new FunctionReturnWatcher("getString",target,function():Array
  39.          {
  40.             return ["login","GO_REGISTRATION"];
  41.          },{"change":true},[bindings[7]],null);
  42.          watchers[6] = new FunctionReturnWatcher("getString",target,function():Array
  43.          {
  44.             return ["login","FORGOT_PASSWORD"];
  45.          },{"change":true},[bindings[5]],null);
  46.          watchers[1] = new FunctionReturnWatcher("getString",target,function():Array
  47.          {
  48.             return ["login","LOGIN"];
  49.          },{"change":true},[bindings[0]],null);
  50.          watchers[7] = new FunctionReturnWatcher("getString",target,function():Array
  51.          {
  52.             return ["login","LOGIN"];
  53.          },{"change":true},[bindings[6]],null);
  54.          watchers[5] = new FunctionReturnWatcher("getString",target,function():Array
  55.          {
  56.             return ["login","PARENT_PASSWORD"];
  57.          },{"change":true},[bindings[4]],null);
  58.          watchers[3].updateParent(target);
  59.          watchers[0].updateParent(target);
  60.          watchers[2].parentWatcher = watchers[0];
  61.          watchers[0].addChild(watchers[2]);
  62.          watchers[4].parentWatcher = watchers[0];
  63.          watchers[0].addChild(watchers[4]);
  64.          watchers[8].parentWatcher = watchers[0];
  65.          watchers[0].addChild(watchers[8]);
  66.          watchers[6].parentWatcher = watchers[0];
  67.          watchers[0].addChild(watchers[6]);
  68.          watchers[1].parentWatcher = watchers[0];
  69.          watchers[0].addChild(watchers[1]);
  70.          watchers[7].parentWatcher = watchers[0];
  71.          watchers[0].addChild(watchers[7]);
  72.          watchers[5].parentWatcher = watchers[0];
  73.          watchers[0].addChild(watchers[5]);
  74.       }
  75.    }
  76. }
  77.  
  78.