home *** CD-ROM | disk | FTP | other *** search
- t = Number(t) + 0.1;
- oldx = x;
- oldy = y;
- x = getProperty("Nau", _X);
- y = getProperty("Nau", _Y);
- if(Key.isDown(Key.UP) and 0 < _root.fuel and _root.fi == 0)
- {
- x = Number(x) + Number(vx / 10);
- y = Number(y) + Number(vy / 10);
- if(Number(y) < Number(BallRadius))
- {
- y = BallRadius;
- vx *= elastic;
- vy = - vy * elastic;
- }
- if(Number(400 - BallRadius) < Number(y))
- {
- y = 400 - BallRadius;
- vx *= elastic;
- vy = - vy * elastic;
- }
- if(Number(x) < Number(BallRadius))
- {
- x = BallRadius;
- vx = - vx * elastic;
- vy *= elastic;
- }
- if(Number(600 - BallRadius) < Number(x))
- {
- x = 600 - BallRadius;
- vx = - vx * elastic;
- vy *= elastic;
- }
- setProperty("Nau", _X, x);
- setProperty("Nau", _Y, y);
- }
- else
- {
- vy = Number(vy) + Number(g / 10);
- x = Number(x) + Number(vx / 10);
- y = Number(y) + Number(vy / 10);
- if(Number(y) < Number(BallRadius))
- {
- y = BallRadius;
- vx *= elastic;
- vy = - vy * elastic;
- }
- if(Number(400 - BallRadius) < Number(y))
- {
- y = 400 - BallRadius;
- vx *= elastic;
- vy = - vy * elastic;
- }
- if(Number(x) < Number(BallRadius))
- {
- x = BallRadius;
- vx = - vx * elastic;
- vy *= elastic;
- }
- if(Number(600 - BallRadius) < Number(x))
- {
- x = 600 - BallRadius;
- vx = - vx * elastic;
- vy *= elastic;
- }
- setProperty("Nau", _X, x);
- setProperty("Nau", _Y, y);
- }
-