home *** CD-ROM | disk | FTP | other *** search
- stop();
- clearInterval(beatTimeout);
- Key.removeListener(keyListener);
- MovieClip.prototype.wrapPos = function()
- {
- if(this._x > xMax + this._width / 2)
- {
- if(this._name == "saucer_mc")
- {
- this.hideSaucer();
- }
- else
- {
- this._x -= xMax + this._width;
- }
- }
- if(this._y > yMax + this._height / 2)
- {
- this._y -= yMax + this._height;
- }
- if(this._x < (- this._width) / 2)
- {
- if(this._name == "saucer_mc")
- {
- this.hideSaucer();
- }
- else
- {
- this._x += xMax + this._width;
- }
- }
- if(this._y < (- this._height) / 2)
- {
- this._y += yMax + this._height;
- }
- };
- introMover = function()
- {
- this._x += this.vx;
- this._y += this.vy;
- this.wrapPos();
- };
- introAsteroids = function()
- {
- var i = 10;
- while(i--)
- {
- var angle = Math.random() * 6.283185307179586;
- var s = [100,50,25][i % 3];
- intro_mc.attachMovie("asteroid",i,i,{vx:Math.sin(angle) * 1.5,vy:Math.cos(angle) * 1.5,_x:Math.random() * xMax,_y:Math.random() * yMax,_xscale:s,_yscale:s,onEnterFrame:introMover}).gotoAndStop(i % 4 + 1);
- }
- };
- game_so = SharedObject.getLocal("neaveAsteroids");
- score = 0;
- xMax = 500;
- yMax = 375;
- introAsteroids();
- playGame_btn.onRelease = function()
- {
- play();
- };
- highScores_btn.onRelease = function()
- {
- getURL("http://www.neodelight.com/highscores?ref=asteroids&ref_loc=highscores&ref_ver=" + _root.version,"_blank");
- };
- moreGames_btn.onRelease = function()
- {
- getURL("http://www.neodelight.com?ref=asteroids&ref_loc=moregames&ref_ver=" + _root.version,"_blank");
- };
- neave_btn.onRelease = function()
- {
- getUrl("http://www.neave.com/games/", "_blank");
- };
-