home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Aventura / paranormality.swf / scripts / frame_213 / DoAction_4.as < prev    next >
Encoding:
Text File  |  2005-09-29  |  1.7 KB  |  66 lines

  1. function earth(mc)
  2. {
  3.    if(_level0.dweeb._x >= mc._x - mc._width / 2 && mc._x + mc._width / 2 >= _level0.dweeb._x)
  4.    {
  5.       if(mc == _level0.groundSet[0] && mc._x >= _level0.bg._x)
  6.       {
  7.          _level0.stopLeft = true;
  8.       }
  9.       else
  10.       {
  11.          _level0.stopLeft = false;
  12.       }
  13.       if(mc == _level0.groundSet[9] && _level0.bg._x >= mc._x && _level0.dweeb._x >= _level0.dweeb.startx)
  14.       {
  15.          _level0.stopRight = true;
  16.       }
  17.       else
  18.       {
  19.          _level0.stopRight = false;
  20.       }
  21.    }
  22. }
  23. function wallstuff(mc)
  24. {
  25.    if(mc.left.hitTest(_level0.dweeb.hitblock))
  26.    {
  27.       _level0.wallleftstop = true;
  28.    }
  29.    else if(mc.right.hitTest(_level0.dweeb.hitblock))
  30.    {
  31.       _level0.wallrightstop = false;
  32.    }
  33.    else
  34.    {
  35.       _level0.wallrightstop = false;
  36.       _level0.wallleftstop = false;
  37.    }
  38. }
  39. function backgroundscroll(mcp)
  40. {
  41.    if(_level0.bg._width >= mcp._x + mcp._width / 2 && mcp.attached == false && _level0.hillSet.length < 10)
  42.    {
  43.       mcp.attached = true;
  44.       mcp.hillCount = 0;
  45.       for(i in "_level0:hillSet")
  46.       {
  47.          if(_level0.hillSet[i]._x != _level0.bg._width + mcp._width / 2)
  48.          {
  49.             mcp.hillCount = mcp.hillCount + 1;
  50.          }
  51.       }
  52.       if(mcp.hillCount == _level0.hillSet.length)
  53.       {
  54.          _level0.hilldepth += 1;
  55.          _level0.attachMovie("hills","hills" + _level0.hilldepth,_level0.hilldepth);
  56.          _level0["hills" + _level0.hilldepth]._y = mcp._y;
  57.          _level0["hills" + _level0.hilldepth]._x = mcp._x + (mcp._width - 0.1);
  58.          _level0.hillSet.push(_level0["hills" + _level0.hilldepth]);
  59.       }
  60.    }
  61. }
  62. groundSet = new Array();
  63. hillSet = new Array();
  64. platformSet = new Array();
  65. ladderSet = new Array();
  66.