home *** CD-ROM | disk | FTP | other *** search
- function moveMe()
- {
- youSpeed = Math.min(youMaxSpeed,youSpeed + youAcc);
- player._rotation += (Key.isDown(39) - Key.isDown(37)) * 7;
- xC = Math.cos(player._rotation * 3.141592653589793 / 180) * youSpeed;
- yC = Math.sin(player._rotation * 3.141592653589793 / 180) * youSpeed;
- player._x += xC;
- player._y += yC;
- oldX = player._x;
- oldY = player._y;
- }
- youAcc = 4;
- youDec = 0.2;
- youSpeed = 0;
- youMaxSpeed = random(5) + 5;
- player._x = _root._xmouse;
- player._y = _root._ymouse;
- player._rotation = random(360);
- tap = 16777215;
- var my_color = new Color(this);
- my_color.setRGB(tap);
- life *= 50;
- onEnterFrame = function()
- {
- moveMe();
- if(player._rotation >= 360)
- {
- player._rotation -= 360;
- }
- if(player._rotation < 0)
- {
- player._rotation += 360;
- }
- if(player._x >= 575)
- {
- if(player._rotation >= 0 && player._rotation < 90)
- {
- player._rotation = 180 - player._rotation;
- moveMe();
- }
- if(player._rotation < 0 && player._rotation > -90)
- {
- player._rotation = 180 - player._rotation;
- moveMe();
- }
- }
- if(player._x <= 25)
- {
- if(player._rotation <= 180 && player._rotation > 90)
- {
- player._rotation = 180 - player._rotation;
- moveMe();
- }
- if(player._rotation > -180 && player._rotation < -90)
- {
- player._rotation = 180 - player._rotation;
- moveMe();
- }
- }
- if(player._y <= 25)
- {
- if(player._rotation >= -180 && player._rotation <= -90)
- {
- player._rotation = - player._rotation;
- moveMe();
- }
- if(player._rotation >= -90 && player._rotation <= 0)
- {
- player._rotation = - player._rotation;
- moveMe();
- }
- }
- if(player._y >= 575)
- {
- if(player._rotation >= 90 && player._rotation <= 180)
- {
- player._rotation = - player._rotation;
- moveMe();
- }
- if(player._rotation <= 90 && player._rotation >= 0)
- {
- player._rotation = - player._rotation;
- moveMe();
- }
- }
- tracer = player._rotation;
- if(player.hitTest(_root.base))
- {
- _root.base.play();
- _root.life = _root.life - 1;
- }
- if(_root.life <= 0)
- {
- i = 0;
- while(i < 4)
- {
- e = _root.attachMovie("lineline12","l" + _root.k,_root.k++);
- e._x = player._x;
- e._y = player._y;
- i++;
- }
- this.removeMovieClip();
- }
- };
- onMouseDown = function()
- {
- if(player.hitTest(_root._xmouse,_root._ymouse))
- {
- _root.score += 525;
- _root.kill = _root.kill + 1;
- _root.hitted.start();
- i = 0;
- while(i < 10)
- {
- f = _root.attachMovie("lineline12","l" + _root.k,_root.k++);
- tap = Math.round(Math.random() * 16777215);
- var _loc3_ = new Color(f);
- _loc3_.setRGB(tap);
- i++;
- }
- this.removeMovieClip();
- }
- };
-