home *** CD-ROM | disk | FTP | other *** search
- space = 10;
- div = 1.01;
- divmax = 1.4;
- s.gotoAndStop("run");
- r.hit = 0;
- r.jump = 0;
- r.oldy = s._y;
- delete onmouseup;
- onenterframe = function()
- {
- nx = r._xmouse;
- ny = r._ymouse;
- ceklimits();
- dx = nx - s._x;
- if(dx < - space)
- {
- r.hd = 1;
- }
- else if(dx > space)
- {
- r.hd = 2;
- }
- else
- {
- r.hd = 0;
- }
- if(div < divmax)
- {
- div += 0.01;
- }
- r.oldx = s._x;
- r.oldy = s._y;
- s._x = nx + (s._x - nx) / div;
- s._y = ny + (s._y - ny) / div;
- r.sx1 = s._x - 40;
- r.sx2 = s._x + 20;
- if(r.hit > 0)
- {
- if(!r.inv)
- {
- gotoAndPlay(12);
- }
- else
- {
- r.hit = 0;
- }
- }
- if(r.jump and !r.inv)
- {
- gotoAndPlay(5);
- }
- if(r.finish)
- {
- gotoAndPlay(17);
- }
- };
- onmousedown = function()
- {
- r.autofire = 1;
- r.noshot = 0;
- };
- onmouseup = function()
- {
- r.autofire = 0;
- r.noshot = 1;
- };
- stop();
-