home *** CD-ROM | disk | FTP | other *** search
/ Champak 35 / jogo-disk-35.iso / Games / red_beard.swf / scripts / DefineSprite_111 / frame_1 / DoAction.as
Text File  |  2007-02-27  |  633b  |  18 lines

  1. if(getProperty("_root.BackgroundMC", _X) + _X > 0 and getProperty("_root.BackgroundMC", _X) + _X < 450 and getProperty("_root.BackgroundMC", _Y) + _Y > 0 and getProperty("_root.BackgroundMC", _Y) + _Y < 300)
  2. {
  3.    this;
  4.    if(hittest(_root.playerMC) and collected != "on")
  5.    {
  6.       set("_root.codeMC:redgems",eval("_root.codeMC:redgems") + 1);
  7.       _root.gem.start();
  8.       gemTweenMovie.gotoAndPlay("collected");
  9.       set("_root.codeMC:collected","red");
  10.       collected = "on";
  11.    }
  12. }
  13. if(eval("_root.codeMC:redgems") == 0 and collected == "on")
  14. {
  15.    gemTweenMovie.gotoAndPlay("appear");
  16.    collected = "off";
  17. }
  18.