home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Acao / kung_fu.swf / scripts / __Packages / mx / transitions / easing / Regular.as < prev    next >
Encoding:
Text File  |  2006-06-13  |  458 b   |  23 lines

  1. class mx.transitions.easing.Regular
  2. {
  3.    function Regular()
  4.    {
  5.    }
  6.    static function easeIn(t, b, c, d)
  7.    {
  8.       return c * (t /= d) * t + b;
  9.    }
  10.    static function easeOut(t, b, c, d)
  11.    {
  12.       return (- c) * (t /= d) * (t - 2) + b;
  13.    }
  14.    static function easeInOut(t, b, c, d)
  15.    {
  16.       if((t /= d / 2) < 1)
  17.       {
  18.          return c / 2 * t * t + b;
  19.       }
  20.       return (- c) / 2 * ((t = t - 1) * (t - 2) - 1) + b;
  21.    }
  22. }
  23.