home *** CD-ROM | disk | FTP | other *** search
- function create_new_string(curr_lev, curr_rnd, xc, yc, sx, sy, nsx, nsy)
- {
- var depth = 0;
- var j = 0;
- while(j < nsx)
- {
- var k = 0;
- while(k < nsy)
- {
- this.enemy.duplicateMovieClip("enemy" + depth,depth);
- this["enemy" + depth].x = xc - nsx * sx / 2 + (j + 0.5) * sx;
- this["enemy" + depth].y = yc - dimy / 2 + (nsy - 1) * sy + (k + 1) * sy;
- this["enemy" + depth].velx = 2 + 2 * curr_lev;
- this["enemy" + depth].vely = 5;
- this["enemy" + depth].num_frames_x = 15 - curr_lev;
- this["enemy" + depth].num_frames_y = 35;
- this["enemy" + depth].gotoAndStop(curr_lev);
- depth++;
- k++;
- }
- j++;
- }
- this.num_enemy_ships = this.num_ships_x * this.num_ships_y;
- }
- function create_boss(curr_lev, xc, yc)
- {
- this.boss._visible = true;
- this.boss.x = this.boss.start_x = xc;
- this.boss.y = this.boss.start_y = yc - this.area_dimy / 2 - 20;
- this.boss.left = this.boss.start_x - this.area_dimx + 15;
- this.boss.right = this.boss.start_x + this.area_dimx - 15;
- this.boss.bottom = this.boss.start_y + this.area_dimy + 30;
- this.boss.frame = 0;
- this.boss.health = 100;
- this.boss.velx = 2 + 2 * curr_lev;
- this.boss.vely = 5;
- this.boss.num_frames_x = 15 - curr_lev;
- this.boss.num_frames_y = 50;
- this.boss.gotoAndStop(curr_lev);
- this.boss.status = "alive";
- }
- stop();
- fscommand("allowscale",false);
- Array.prototype.take_away = function(e)
- {
- var j = e;
- while(j < this.length)
- {
- this[j] = this[j + 1];
- j++;
- }
- this.pop();
- };
- dimx = 750;
- dimy = 525;
- start_x = 52;
- xctr = _root.play_area._x;
- yctr = _root.play_area._y;
- area_dimx = 200;
- area_dimy = 160;
- space_x = this.enemy._width + 30;
- space_y = this.enemy._height + 5;
- num_ships_x = 5;
- num_ships_y = 3;
- num_lives = 5;
- num_levels = 5;
- current_level = 1;
- rounds = 3;
- current_round = 1;
- num_enemy_ships = num_ships_x * num_ships_y;
- create_new_string(current_level,current_round,xctr,yctr,space_x,space_y,num_ships_x,num_ships_y);
- score = 0;
-