home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Acao / 2Deep.swf / scripts / frame_94 / DoAction_4.as < prev    next >
Encoding:
Text File  |  2005-08-08  |  586 b   |  27 lines

  1. function callDelayed(r, f, d, oe)
  2. {
  3.    r.f2call = f;
  4.    r.delay = d;
  5.    r.oe = oe;
  6.    r.callStart = getTimer();
  7.    r.onEnterFrame = function()
  8.    {
  9.       if(getTimer() - this.callStart < this.delay)
  10.       {
  11.          return undefined;
  12.       }
  13.       var o = this.f2call[0];
  14.       o.t[o.f](o.a);
  15.       this.f2call.shift();
  16.       this.callStart = getTimer();
  17.       if(this.f2call.length == 0)
  18.       {
  19.          oe.t[oe.f]();
  20.          delete this.onEnterFrame;
  21.          delete this.delay;
  22.          delete this.callStart;
  23.          delete this.f2call;
  24.       }
  25.    };
  26. }
  27.