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

  1. package
  2. {
  3.    import com.flex.steps.RegFormStep2;
  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_RegFormStep2WatcherSetupUtil extends Sprite implements IWatcherSetupUtil
  11.    {
  12.       public function _com_flex_steps_RegFormStep2WatcherSetupUtil()
  13.       {
  14.          super();
  15.       }
  16.       
  17.       public static function init(param1:IFlexModuleFactory) : void
  18.       {
  19.          RegFormStep2.watcherSetupUtil = new _com_flex_steps_RegFormStep2WatcherSetupUtil();
  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[10] = new PropertyWatcher("Years",{"propertyChange":true},[bindings[9]],propertyGetter);
  29.          watchers[3] = new PropertyWatcher("btn",{"propertyChange":true},[bindings[2]],propertyGetter);
  30.          watchers[9] = new PropertyWatcher("Months",{"propertyChange":true},[bindings[8]],propertyGetter);
  31.          watchers[6] = new PropertyWatcher("genders",{"propertyChange":true},[bindings[5]],propertyGetter);
  32.          watchers[0] = new PropertyWatcher("resourceManager",{"unused":true},[bindings[4],bindings[11],bindings[6],bindings[1],bindings[3],bindings[10],bindings[0]],propertyGetter);
  33.          watchers[2] = new FunctionReturnWatcher("getString",target,function():Array
  34.          {
  35.             return ["registration","CREATE_ACCOUNT"];
  36.          },{"change":true},[bindings[1]],null);
  37.          watchers[4] = new FunctionReturnWatcher("getString",target,function():Array
  38.          {
  39.             return ["registration","KID_NAME"];
  40.          },{"change":true},[bindings[3]],null);
  41.          watchers[11] = new FunctionReturnWatcher("getString",target,function():Array
  42.          {
  43.             return ["registration","REGISTER"];
  44.          },{"change":true},[bindings[10]],null);
  45.          watchers[1] = new FunctionReturnWatcher("getString",target,function():Array
  46.          {
  47.             return ["registration","KID_DETAILS"];
  48.          },{"change":true},[bindings[0]],null);
  49.          watchers[7] = new FunctionReturnWatcher("getString",target,function():Array
  50.          {
  51.             return ["registration","BIRTHDAY"];
  52.          },{"change":true},[bindings[6]],null);
  53.          watchers[12] = new FunctionReturnWatcher("getString",target,function():Array
  54.          {
  55.             return ["registration","BACK_TO_PARENT_DETAILS"];
  56.          },{"change":true},[bindings[11]],null);
  57.          watchers[5] = new FunctionReturnWatcher("getString",target,function():Array
  58.          {
  59.             return ["registration","GENDER"];
  60.          },{"change":true},[bindings[4]],null);
  61.          watchers[8] = new PropertyWatcher("Days",{"propertyChange":true},[bindings[7]],propertyGetter);
  62.          watchers[10].updateParent(target);
  63.          watchers[3].updateParent(target);
  64.          watchers[9].updateParent(target);
  65.          watchers[6].updateParent(target);
  66.          watchers[0].updateParent(target);
  67.          watchers[2].parentWatcher = watchers[0];
  68.          watchers[0].addChild(watchers[2]);
  69.          watchers[4].parentWatcher = watchers[0];
  70.          watchers[0].addChild(watchers[4]);
  71.          watchers[11].parentWatcher = watchers[0];
  72.          watchers[0].addChild(watchers[11]);
  73.          watchers[1].parentWatcher = watchers[0];
  74.          watchers[0].addChild(watchers[1]);
  75.          watchers[7].parentWatcher = watchers[0];
  76.          watchers[0].addChild(watchers[7]);
  77.          watchers[12].parentWatcher = watchers[0];
  78.          watchers[0].addChild(watchers[12]);
  79.          watchers[5].parentWatcher = watchers[0];
  80.          watchers[0].addChild(watchers[5]);
  81.          watchers[8].updateParent(target);
  82.       }
  83.    }
  84. }
  85.  
  86.