home *** CD-ROM | disk | FTP | other *** search
- fast = 10;
- xmin = 50;
- xmax = 300;
- ymin = 50;
- ymax = 350;
- space = 10;
- div = 1.01;
- s.gotoAndStop("fly");
- delete onmouseup;
- onenterframe = function()
- {
- nx = r._xmouse;
- ny = r._ymouse;
- if(nx < xmin)
- {
- nx = xmin;
- }
- if(nx > xmax)
- {
- nx = xmax;
- }
- if(ny < ymin)
- {
- ny = ymin;
- }
- if(ny > ymax)
- {
- ny = ymax;
- }
- dx = nx - s._x;
- if(dx < - space)
- {
- r.hd = 1;
- }
- else if(dx > space)
- {
- r.hd = 2;
- }
- else
- {
- r.hd = 0;
- }
- if(!r.noshot)
- {
- s.gotoAndStop("fly" + r.hd);
- }
- oldx = s._x;
- oldy = s._y;
- div *= 1.05;
- if(div > 1.2)
- {
- div = 1.2;
- }
- s._x = nx + (s._x - nx) / div;
- s._y = ny + (s._y - ny) / div;
- r.bg1._y = -0.2 * s._y;
- r.bg2._y = -0.15 * s._y;
- r.clouds._y = -0.1 * s._y;
- if(r.hit)
- {
- gotoAndPlay(5);
- }
- };
- onmousedown = function()
- {
- r.autofire = 1;
- r.noshot = 0;
- };
- onmouseup = function()
- {
- r.autofire = 0;
- r.noshot = 1;
- };
- stop();
-