home *** CD-ROM | disk | FTP | other *** search
- function newGame()
- {
- _root.gScore = 0;
- _root.gLevel = 1;
- a = 0;
- while(a < 20)
- {
- meteors[a] = 0;
- meteors_x[a] = 0;
- meteors_y[a] = 0;
- a++;
- }
- gotoAndStop("NextLevel");
- play();
- }
- function displayScore(countup)
- {
- if(countup == true)
- {
- scoregoal = scoregoal >= _root.gScore ? _root.gScore : scoregoal + 5;
- }
- else
- {
- scoregoal = _root.gScore;
- }
- tmpscore = "" add scoregoal;
- zeros = "";
- a = tmpscore.length;
- while(a < 10)
- {
- zeros = zeros add "0";
- a++;
- }
- score_display = zeros add scoregoal;
- collectedtext = collected >= 10 ? "" add collected : "0" add collected;
- maxmeteortext = maxmeteors >= 10 ? "" add maxmeteors : "0" add maxmeteors;
- statustext = collectedtext add " / " add maxmeteortext;
- }
- meteors = Array[20];
- meteors_speed = Array[20];
- player_x = 0;
- player_y = 0;
- spped = 0;
- altitude = 0;
- piecesize = 64;
- livesleft = 0;
- meteorsleft = 0;
- meteorcounter = 0;
- hits = 0;
- misses = 0;
-