home *** CD-ROM | disk | FTP | other *** search
/ 404 Jogos / CLJG.iso / Esportes / CrossingCup.swf / scripts / __Packages / com / bourre / commands / Delegate.as < prev   
Text File  |  2007-12-11  |  2KB  |  69 lines

  1. class com.bourre.commands.Delegate implements com.bourre.transitions.IFrameListener, com.bourre.commands.Command
  2. {
  3.    function Delegate(o, f)
  4.    {
  5.       this._o = o;
  6.       this._f = f;
  7.       this._a = arguments.splice(2);
  8.       this._fProxy = Function(com.bourre.commands.Delegate.create.apply(this,[this._o].concat([this._f],this._a)));
  9.    }
  10.    function handleEvent(e)
  11.    {
  12.       return this._f.apply(this._o,[e].concat(this._a));
  13.    }
  14.    static function create(o, f)
  15.    {
  16.       var _loc2_ = function()
  17.       {
  18.          var _loc3_ = arguments.callee.t;
  19.          var _loc2_ = arguments.callee.f;
  20.          var _loc4_ = arguments.concat(arguments.callee.a);
  21.          return _loc2_.apply(_loc3_,_loc4_);
  22.       };
  23.       _loc2_.t = o;
  24.       _loc2_.f = f;
  25.       _loc2_.a = arguments.splice(2);
  26.       return _loc2_;
  27.    }
  28.    function getScope()
  29.    {
  30.       return this._o;
  31.    }
  32.    function getFunction()
  33.    {
  34.       return this._fProxy;
  35.    }
  36.    function callFunction()
  37.    {
  38.       return this._fProxy();
  39.    }
  40.    function execute(e)
  41.    {
  42.       this._fProxy();
  43.    }
  44.    function setArguments()
  45.    {
  46.       if(arguments.length > 0)
  47.       {
  48.          this._a = arguments;
  49.          this._fProxy.a = this._a;
  50.       }
  51.    }
  52.    function addArguments()
  53.    {
  54.       if(arguments.length > 0)
  55.       {
  56.          this._a = this._a.concat(arguments);
  57.          this._fProxy.a = this._a;
  58.       }
  59.    }
  60.    function toString()
  61.    {
  62.       return com.bourre.log.PixlibStringifier.stringify(this);
  63.    }
  64.    function onEnterFrame()
  65.    {
  66.       this._fProxy();
  67.    }
  68. }
  69.