home *** CD-ROM | disk | FTP | other *** search
/ Fraggle Rock Season 1 Bonus CD / Fraggle Rock Season 1 Bonus CD.iso / pc / Game / Game.swf / scripts / frame_1 / DoAction.as
Encoding:
Text File  |  2005-06-24  |  1.6 KB  |  75 lines

  1. function wipeArray(arr, val)
  2. {
  3.    var _loc1_ = 0;
  4.    while(_loc1_ < arr.length)
  5.    {
  6.       arr[_loc1_] = val;
  7.       _loc1_ = _loc1_ + 1;
  8.    }
  9. }
  10. function drawCircle(xpos, ypos, radius, lWidth, lColor, fColor, fAlpha)
  11. {
  12.    x = xpos;
  13.    y = ypos;
  14.    r = radius;
  15.    u = r * 0.4086;
  16.    v = r * 0.7071;
  17.    _root.lineStyle(lWidth,lColor,100);
  18.    _root.beginFill(fColor,fAlpha);
  19.    _root.moveTo(x - r,y);
  20.    _root.curveTo(x - r,y - u,x - v,y - v);
  21.    _root.curveTo(x - u,y - r,x,y - r);
  22.    _root.curveTo(x + u,y - r,x + v,y - v);
  23.    _root.curveTo(x + r,y - u,x + r,y);
  24.    _root.curveTo(x + r,y + u,x + v,y + v);
  25.    _root.curveTo(x + u,y + r,x,y + r);
  26.    _root.curveTo(x - u,y + r,x - v,y + v);
  27.    _root.curveTo(x - r,y + u,x - r,y);
  28.    _root.endFill();
  29. }
  30. function arrayRemove(arr, it)
  31. {
  32.    for(var _loc3_ in arr)
  33.    {
  34.       if(arr[_loc3_] == it)
  35.       {
  36.          return arr.splice(_loc3_,1);
  37.       }
  38.    }
  39.    return undefined;
  40. }
  41. function shuffle(a)
  42. {
  43.    var _loc1_ = 0;
  44.    while(_loc1_ < a.length)
  45.    {
  46.       var _loc3_ = Math.floor(Math.random() * (_loc1_ + 1));
  47.       var _loc4_ = a[_loc3_];
  48.       a[_loc3_] = a[_loc1_];
  49.       a[_loc1_] = _loc4_;
  50.       _loc1_ = _loc1_ + 1;
  51.    }
  52.    return a;
  53. }
  54. LUNCHTIME = 5000;
  55. SLOWESTCRANK = 4000;
  56. BINDI = 0.005681818181818182;
  57. MOVIE_W = _root._width;
  58. MOVIE_H = _root._height;
  59. RIGHTWALL = 685;
  60. LEFTWALL = 110;
  61. CEILING = 60;
  62. BOUNCERZONE = 420;
  63. P_NONE = 0;
  64. P_HI = 1;
  65. P_MULTIMUNCH = 2;
  66. P_ZIG = 3;
  67. gridw = 20;
  68. gridh = 20;
  69. GOODIES_HI = 1.5;
  70. GOODIES_MULTIMUNCH = 1.5;
  71. GOODIES_ZIG = 1;
  72. STARTROWS = 6;
  73. bricksize = 13;
  74. halfbrick = bricksize / 2;
  75.