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;
- }
- if(_root.globalDebris == false)
- {
- this.removeMovieClip();
- }
- _root.particles = _root.particles + 1;
- life = 1.5;
- youAcc = 4;
- youDec = 0.2;
- youSpeed = 0;
- youMaxSpeed = random(5) + 5;
- if(_root.cstatus == 0)
- {
- player._x = 0;
- player._y = 0;
- }
- else
- {
- player._x = _root._xmouse;
- player._y = _root._ymouse;
- }
- player._rotation = random(360);
- var my_color = new Color(this);
- my_color.setRGB(9186957);
- life *= 50;
- onEnterFrame = function()
- {
- life--;
- if(_root.nmbr <= _root.fpsThresh)
- {
- life -= _root.globalDrop;
- }
- if(life < 25)
- {
- player._alpha = life * 4;
- }
- if(life <= 0)
- {
- _root.particles = _root.particles - 1;
- this.removeMovieClip();
- }
- 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;
- };
-