home *** CD-ROM | disk | FTP | other *** search
/ 404 Jogos / CLJG.iso / Diversos / mug.swf / scripts / DefineSprite_108 / frame_1 / DoAction.as
Encoding:
Text File  |  2005-11-18  |  2.2 KB  |  154 lines

  1. x = this._x;
  2. y = this._y;
  3. fall = eval("/:fall");
  4. if(Number(x) < 0)
  5. {
  6.    fall = 0;
  7. }
  8. y += fall;
  9. if(this.hitTest(_root.ring1))
  10. {
  11.    go = random(2) + 1;
  12.    if(Number(go) == 1)
  13.    {
  14.       x += 15;
  15.    }
  16.    if(Number(go) == 2)
  17.    {
  18.       x -= 15;
  19.    }
  20.    _root.ring1.play();
  21. }
  22. if(this.hitTest(_root.ring2))
  23. {
  24.    go = random(2) + 1;
  25.    if(Number(go) == 1)
  26.    {
  27.       x += 15;
  28.    }
  29.    if(Number(go) == 2)
  30.    {
  31.       x -= 15;
  32.    }
  33.    _root.ring2.play();
  34. }
  35. if(this.hitTest(_root.ring3))
  36. {
  37.    go = random(2) + 1;
  38.    if(Number(go) == 1)
  39.    {
  40.       x += 15;
  41.    }
  42.    if(Number(go) == 2)
  43.    {
  44.       x -= 15;
  45.    }
  46.    _root.ring3.play();
  47. }
  48. if(this.hitTest(_root.ring4))
  49. {
  50.    go = random(2) + 1;
  51.    if(Number(go) == 1)
  52.    {
  53.       x += 15;
  54.    }
  55.    if(Number(go) == 2)
  56.    {
  57.       x -= 15;
  58.    }
  59.    _root.ring4.play();
  60. }
  61. if(this.hitTest(_root.ring5))
  62. {
  63.    go = random(2) + 1;
  64.    if(Number(go) == 1)
  65.    {
  66.       x += 15;
  67.    }
  68.    if(Number(go) == 2)
  69.    {
  70.       x -= 15;
  71.    }
  72.    _root.ring5.play();
  73. }
  74. if(this.hitTest(_root.ring6))
  75. {
  76.    go = random(2) + 1;
  77.    if(Number(go) == 1)
  78.    {
  79.       x += 15;
  80.    }
  81.    if(Number(go) == 2)
  82.    {
  83.       x -= 15;
  84.    }
  85.    _root.ring6.play();
  86. }
  87. if(this.hitTest(_root.ring7))
  88. {
  89.    go = random(2) + 1;
  90.    if(Number(go) == 1)
  91.    {
  92.       x += 15;
  93.    }
  94.    if(Number(go) == 2)
  95.    {
  96.       x -= 15;
  97.    }
  98.    _root.ring7.play();
  99. }
  100. if(this.hitTest(_root.ring8))
  101. {
  102.    go = random(2) + 1;
  103.    if(Number(go) == 1)
  104.    {
  105.       x += 15;
  106.    }
  107.    if(Number(go) == 2)
  108.    {
  109.       x -= 15;
  110.    }
  111.    _root.ring8.play();
  112. }
  113. if(this.hitTest(_root.ring9))
  114. {
  115.    go = random(2) + 1;
  116.    if(Number(go) == 1)
  117.    {
  118.       x += 15;
  119.    }
  120.    if(Number(go) == 2)
  121.    {
  122.       x -= 15;
  123.    }
  124.    _root.ring9.play();
  125. }
  126. if(this.hitTest(_root.ring10))
  127. {
  128.    go = random(2) + 1;
  129.    if(Number(go) == 1)
  130.    {
  131.       x += 15;
  132.    }
  133.    if(Number(go) == 2)
  134.    {
  135.       x -= 15;
  136.    }
  137.    _root.ring10.play();
  138. }
  139. this._x = x;
  140. this._y = y;
  141. if(Number(y) > 370)
  142. {
  143.    tellTarget("/life")
  144.    {
  145.       play();
  146.    }
  147.    ┬º/:life┬º++;
  148.    gotoAndPlay(3);
  149. }
  150. if(this.act1.hitTest(_root.cup.act))
  151. {
  152.    gotoAndPlay(10);
  153. }
  154.