home *** CD-ROM | disk | FTP | other *** search
- function Rand()
- {
- cor = random(4) + 1;
- var xxx = 0;
- while(xxx < 21)
- {
- this.ball.in_ball.gotoAndStop(cor);
- this["mball" + xxx].in_ball.gotoAndStop(cor);
- this["sball" + xxx].in_ball.gotoAndStop(cor);
- this["ssball" + xxx].in_ball.gotoAndStop(cor);
- this["sssball" + xxx].in_ball.gotoAndStop(cor);
- xxx++;
- }
- }
- function TimeScore2()
- {
- var tSco_a = Math.floor(this.Score / 1000000) + 1;
- var tSco_a_c = this.Score % 1000000;
- var tSco_b = Math.floor(tSco_a_c / 100000) + 1;
- var tSco_b_c = tSco_a_c % 100000;
- var tSco_c = Math.floor(tSco_b_c / 10000) + 1;
- var tSco_c_c = tSco_b_c % 10000;
- var tSco_d = Math.floor(tSco_c_c / 1000) + 1;
- var tSco_d_c = tSco_c_c % 1000;
- var tSco_e = Math.floor(tSco_d_c / 100) + 1;
- var tSco_e_c = tSco_d_c % 100;
- var tSco_f = Math.floor(tSco_e_c / 10) + 1;
- this.Score2_mc.mc6.gotoAndStop(tSco_a);
- this.Score2_mc.mc5.gotoAndStop(tSco_b);
- this.Score2_mc.mc4.gotoAndStop(tSco_c);
- this.Score2_mc.mc3.gotoAndStop(tSco_d);
- this.Score2_mc.mc2.gotoAndStop(tSco_e);
- this.Score2_mc.mc1.gotoAndStop(tSco_f);
- if(Math.floor(this.Score / 1000000) > 0)
- {
- this.Score2_mc.mc6._visible = true;
- }
- if(Math.floor(this.Score / 100000) > 0)
- {
- this.Score2_mc.mc5._visible = true;
- }
- if(Math.floor(this.Score / 10000) > 0)
- {
- this.Score2_mc.mc4._visible = true;
- }
- if(Math.floor(this.Score / 1000) > 0)
- {
- this.Score2_mc.mc3._visible = true;
- }
- if(Math.floor(this.Score / 100) > 0)
- {
- this.Score2_mc.mc2._visible = true;
- }
- if(Math.floor(this.Score / 10) > 0)
- {
- this.Score2_mc.mc1._visible = true;
- }
- }
- function TimeScore()
- {
- var tSco_a = Math.floor(this.Score / 1000000) + 1;
- var tSco_a_c = this.Score % 1000000;
- var tSco_b = Math.floor(tSco_a_c / 100000) + 1;
- var tSco_b_c = tSco_a_c % 100000;
- var tSco_c = Math.floor(tSco_b_c / 10000) + 1;
- var tSco_c_c = tSco_b_c % 10000;
- var tSco_d = Math.floor(tSco_c_c / 1000) + 1;
- var tSco_d_c = tSco_c_c % 1000;
- var tSco_e = Math.floor(tSco_d_c / 100) + 1;
- var tSco_e_c = tSco_d_c % 100;
- var tSco_f = Math.floor(tSco_e_c / 10) + 1;
- this.Score_mc.mc6.gotoAndStop(tSco_a);
- this.Score_mc.mc5.gotoAndStop(tSco_b);
- this.Score_mc.mc4.gotoAndStop(tSco_c);
- this.Score_mc.mc3.gotoAndStop(tSco_d);
- this.Score_mc.mc2.gotoAndStop(tSco_e);
- this.Score_mc.mc1.gotoAndStop(tSco_f);
- if(Math.floor(this.Score / 1000000) > 0)
- {
- this.Score_mc.mc6._visible = true;
- }
- if(Math.floor(this.Score / 100000) > 0)
- {
- this.Score_mc.mc5._visible = true;
- }
- if(Math.floor(this.Score / 10000) > 0)
- {
- this.Score_mc.mc4._visible = true;
- }
- if(Math.floor(this.Score / 1000) > 0)
- {
- this.Score_mc.mc3._visible = true;
- }
- if(Math.floor(this.Score / 100) > 0)
- {
- this.Score_mc.mc2._visible = true;
- }
- if(Math.floor(this.Score / 10) > 0)
- {
- this.Score_mc.mc1._visible = true;
- }
- }
- GGG = 5;
- jump = 150;
- MMM_Time = 20;
- last_game = false;
- SoundObj = new Sound(this);
- SoundObj.attachSound("bg_m");
- SoundObj2 = new Sound(this);
- SoundObj2.attachSound("cl_m");
- stop();
- _root.big1 = 3;
- _root.big2 = 4;
- _root.big3 = 5;
- _root.big4 = 6;
- _root.big5 = 7;
- tans = 80;
- all_obj_remove = false;
- volume_controler.gotoAndStop(soundFrame);
- gun = 1;
- minX = 37;
- minY = 25;
- maxX = 620;
- maxY = 380;
- hero.speed = 9;
- this.onEnterFrame = function()
- {
- rt_txt = rt;
- TimeScore();
- if(this.vol == 1)
- {
- soundOn();
- this.vol = 2;
- }
- if(this.vol == 0)
- {
- soundOff();
- this.vol = 2;
- }
- if(canPlay)
- {
- this.time._width = w;
- if(cnt == 16)
- {
- SoundObj.stop();
- SoundObj2.start();
- hero.gotoAndStop(1);
- time_bar_start.stop();
- w -= 2;
- ii = 0;
- Score += 10;
- if(time._width == 0 || time._width == 1)
- {
- SoundObj2.stop();
- cnt = 0;
- level_up_font.play();
- }
- player_move = false;
- hero.gotoAndStop(1);
- GGG = 6;
- }
- if(gun == 3)
- {
- hero.player.Att_go.gotoAndStop(3);
- hero.player.gun_box.gotoAndStop(2);
- }
- if(gun == 2)
- {
- hero.player.Att_go.gotoAndStop(2);
- hero.player.gun_box.gotoAndStop(1);
- }
- if(gun == 1)
- {
- hero.player.Att_go.gotoAndStop(1);
- hero.player.gun_box.gotoAndStop(1);
- }
- if(gun == 7)
- {
- hero.player.Att_go.gotoAndStop(1);
- hero.player.gun_box.gotoAndStop(1);
- }
- if(player_move)
- {
- if(Key.isDown(39))
- {
- if(player_move == false)
- {
- hero.gotoAndStop(1);
- }
- if(hero._x < this.maxX)
- {
- hero.speed = 9;
- hero.gotoAndStop("right");
- hero._x += hero.speed;
- }
- }
- else if(Key.isDown(37))
- {
- if(player_move == false)
- {
- hero.gotoAndStop(1);
- }
- if(hero._x > this.minX)
- {
- hero.speed = 9;
- hero.gotoAndStop("left");
- hero._x -= hero.speed;
- }
- }
- else
- {
- hero.gotoAndStop("stop");
- }
- if(Key.isDown(32))
- {
- if(gun == 1)
- {
- if(A1)
- {
- arrow_1._x = hero._x - 4;
- arrow_1.gotoAndPlay(2);
- hero.gotoAndStop("shoot");
- player_move = false;
- }
- }
- if(gun == 2)
- {
- if(A2)
- {
- arrow_2._x = hero._x - 4;
- arrow_2.gotoAndPlay(2);
- hero.gotoAndStop("shoot");
- player_move = false;
- }
- }
- if(gun == 7)
- {
- if(A7)
- {
- arrow_7._x = hero._x - 4;
- arrow_7.play();
- hero.gotoAndStop("shoot");
- player_move = false;
- }
- if(A8)
- {
- arrow_8.play();
- arrow_8._x = hero._x - 4;
- hero.gotoAndStop("shoot");
- player_move = false;
- }
- }
- if(gun == 3)
- {
- if(A3)
- {
- arrow_3._x = hero._x - 4;
- arrow_3._y = hero._y - 5;
- arrow_3.play();
- hero.gotoAndStop("shoot");
- player_move = false;
- }
- if(A4)
- {
- arrow_4.play();
- arrow_4._x = hero._x - 4;
- arrow_4._y = hero._y - 5;
- hero.gotoAndStop("shoot");
- player_move = false;
- }
- if(A5)
- {
- arrow_5.play();
- arrow_5._x = hero._x - 4;
- arrow_5._y = hero._y - 5;
- hero.gotoAndStop("shoot");
- player_move = false;
- }
- }
- }
- }
- }
- };
- this.nextFrame();
-