home *** CD-ROM | disk | FTP | other *** search
- function earth(mc)
- {
- if(_level0.dweeb._x >= mc._x - mc._width / 2 && mc._x + mc._width / 2 >= _level0.dweeb._x)
- {
- if(mc == _level0.groundSet[0] && mc._x >= _level0.bg._x)
- {
- _level0.stopLeft = true;
- }
- else
- {
- _level0.stopLeft = false;
- }
- if(mc == _level0.groundSet[9] && _level0.bg._x >= mc._x && _level0.dweeb._x >= _level0.dweeb.startx)
- {
- _level0.stopRight = true;
- }
- else
- {
- _level0.stopRight = false;
- }
- }
- }
- function wallstuff(mc)
- {
- if(mc.left.hitTest(_level0.dweeb.hitblock))
- {
- _level0.wallleftstop = true;
- }
- else if(mc.right.hitTest(_level0.dweeb.hitblock))
- {
- _level0.wallrightstop = false;
- }
- else
- {
- _level0.wallrightstop = false;
- _level0.wallleftstop = false;
- }
- }
- function backgroundscroll(mcp)
- {
- if(_level0.bg._width >= mcp._x + mcp._width / 2 && mcp.attached == false && _level0.hillSet.length < 10)
- {
- mcp.attached = true;
- mcp.hillCount = 0;
- for(i in "_level0:hillSet")
- {
- if(_level0.hillSet[i]._x != _level0.bg._width + mcp._width / 2)
- {
- mcp.hillCount = mcp.hillCount + 1;
- }
- }
- if(mcp.hillCount == _level0.hillSet.length)
- {
- _level0.hilldepth += 1;
- _level0.attachMovie("hills","hills" + _level0.hilldepth,_level0.hilldepth);
- _level0["hills" + _level0.hilldepth]._y = mcp._y;
- _level0["hills" + _level0.hilldepth]._x = mcp._x + (mcp._width - 0.1);
- _level0.hillSet.push(_level0["hills" + _level0.hilldepth]);
- }
- }
- }
- groundSet = new Array();
- hillSet = new Array();
- platformSet = new Array();
- ladderSet = new Array();
-