home *** CD-ROM | disk | FTP | other *** search
/ 404 Jogos / CLJG.iso / Aventura / MindScape.swf / scripts / DefineSprite_1053 / frame_1 / DoAction_2.as next >
Encoding:
Text File  |  2007-12-04  |  2.0 KB  |  104 lines

  1. var secrets = 0;
  2. if(!_root.secretsFound[0])
  3. {
  4.    s1._visible = false;
  5. }
  6. else
  7. {
  8.    secrets++;
  9. }
  10. if(!_root.secretsFound[1])
  11. {
  12.    s2._visible = false;
  13. }
  14. else
  15. {
  16.    secrets++;
  17. }
  18. if(!_root.secretsFound[2])
  19. {
  20.    s3._visible = false;
  21. }
  22. else
  23. {
  24.    secrets++;
  25. }
  26. if(!_root.secretsFound[3])
  27. {
  28.    s4._visible = false;
  29. }
  30. else
  31. {
  32.    secrets++;
  33. }
  34. if(!_root.secretsFound[4])
  35. {
  36.    s5._visible = false;
  37. }
  38. else
  39. {
  40.    secrets++;
  41. }
  42. if(!_root.secretsFound[5])
  43. {
  44.    s6._visible = false;
  45. }
  46. else
  47. {
  48.    secrets++;
  49. }
  50. if(secrets < 1)
  51. {
  52.    emo = ":(";
  53. }
  54. else if(secrets >= 1 && secrets < 2)
  55. {
  56.    emo = ":/";
  57. }
  58. else if(secrets >= 2 && secrets < 6)
  59. {
  60.    emo = ":)";
  61. }
  62. else
  63. {
  64.    emo = ":D";
  65. }
  66. if(secrets >= 6)
  67. {
  68.    _root.medalsEarned[3] = true;
  69.    _root.kongregateStats.submit("MindScapeOverlord",1);
  70. }
  71. txtStatistic.text = "You\'ve found " + secrets + " of 6 secret items! " + emo;
  72. onEnterFrame = function()
  73. {
  74.    var _loc1_ = _root;
  75.    if(s1.hitTest(_loc1_._xmouse,_loc1_._ymouse,true) && _loc1_.secretsFound[0])
  76.    {
  77.       txtDescr.text = "Why are you wearing that stupid boy suit?";
  78.    }
  79.    else if(s2.hitTest(_loc1_._xmouse,_loc1_._ymouse,true) && _loc1_.secretsFound[1])
  80.    {
  81.       txtDescr.text = "See no evil, hear no evil, say no evil...";
  82.    }
  83.    else if(s3.hitTest(_loc1_._xmouse,_loc1_._ymouse,true) && _loc1_.secretsFound[2])
  84.    {
  85.       txtDescr.text = "I was cured, all right.";
  86.    }
  87.    else if(s4.hitTest(_loc1_._xmouse,_loc1_._ymouse,true) && _loc1_.secretsFound[3])
  88.    {
  89.       txtDescr.text = "Lemme guess, the princess is in another castle...";
  90.    }
  91.    else if(s5.hitTest(_loc1_._xmouse,_loc1_._ymouse,true) && _loc1_.secretsFound[4])
  92.    {
  93.       txtDescr.text = "So you found the meaning of life. Now what?";
  94.    }
  95.    else if(s6.hitTest(_loc1_._xmouse,_loc1_._ymouse,true) && _loc1_.secretsFound[5])
  96.    {
  97.       txtDescr.text = "If you hate yourself you\'ll have to hug yourself.";
  98.    }
  99.    else
  100.    {
  101.       txtDescr.text = "";
  102.    }
  103. };
  104.