home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Acao / batman_cobble.swf / scripts / frame_29 / DoAction.as < prev   
Encoding:
Text File  |  2006-06-13  |  3.1 KB  |  106 lines

  1. _root.game.onEnterFrame = _global.cameraLogic;
  2. _root.game.player.onEnterFrame = _global.playerLogic;
  3. _root.game.highway.onEnterFrame = _global.highwayLogic;
  4. _root.game.combo.onEnterFrame = _global.comboLogic;
  5. for(n in _root.game)
  6. {
  7.    if(n.substring(0,6) == "kabuki")
  8.    {
  9.       _root.game[n].onEnterFrame = _global.kabukiAI;
  10.       _root.game[n].speed = 11;
  11.       _root.game[n].dir = -1;
  12.       _root.game[n].state = "idle";
  13.       _root.game[n].jumping = false;
  14.       _root.game[n].dy = 24;
  15.       _root.game[n].ground = _root.game[n]._y;
  16.       _root.game[n].xMax = 800;
  17.       _root.game[n].xMin = 300;
  18.       _root.game[n].health = 300;
  19.       _root.game[n].strength = 12;
  20.       _root.game[n].range = 0;
  21.       _root.game[n].enemyHeight = 50;
  22.       _root.game[n].enemyWidth = 50;
  23.       _root.game[n].attackCount = 0;
  24.       _root.game[n].fallCount = 0;
  25.    }
  26.    if(n.substring(0,7) == "item_br")
  27.    {
  28.       _root.game[n].onEnterFrame = _global.itemLogic;
  29.    }
  30. }
  31. _root.game.kabuki2.onEnterFrame = function()
  32. {
  33.    this.gotoAndStop("idle");
  34.    _root.game.kabuki2._xscale = -100;
  35. };
  36. _root.game.tracker.onEnterFrame = function()
  37. {
  38.    if(_root.game.kabuki1.health < 150 && _root.game.kabuki2.state == "idle")
  39.    {
  40.       _root.game.kabuki2._xscale = 100;
  41.       _root.game.kabuki2.onEnterFrame = _global.kabukiAI;
  42.       _root.game.kabuki2.speed = 17;
  43.       _root.game.kabuki2.dir = -1;
  44.       _root.game.kabuki2.state = "idle";
  45.       _root.game.kabuki2.jumping = false;
  46.       _root.game.kabuki2.dy = 24;
  47.       _root.game.kabuki2.ground = _root.game.kabuki2._y;
  48.       _root.game.kabuki2.xMax = 800;
  49.       _root.game.kabuki2.xMin = 300;
  50.       _root.game.kabuki2.health = 300;
  51.       _root.game.kabuki2.strength = 12;
  52.       _root.game.kabuki2.range = 0;
  53.       _root.game.kabuki2.enemyHeight = 50;
  54.       _root.game.kabuki2.enemyWidth = 50;
  55.       _root.game.kabuki2.attackCount = 0;
  56.       _root.game.kabuki2.fallCount = 0;
  57.    }
  58.    if(_root.game.kabuki1.health < 1 && _root.game.kabuki2.health < 1 && !done)
  59.    {
  60.       done = true;
  61.       _root.gotoNext = "card:mansion";
  62.       _root.fadeout.play();
  63.    }
  64. };
  65. stop();
  66. _root.gravity = 5;
  67. _root.globalGravity = 5;
  68. _root.FPS = 0;
  69. _root.fpsSet = false;
  70. _root.frameCount = 0;
  71. _root.gotoLast = "level3b";
  72. _root.camDelay = 0;
  73. _root.camHeight = -10;
  74. _root.camJump = 3;
  75. _root.camMin = 340;
  76. _root.camMax = 600;
  77. _root.camZoom = 100;
  78. _root.camOffset = 0;
  79. _root.playerDx = 0;
  80. _root.playerDy = 3;
  81. _root.playerDir = 1;
  82. _root.playerSpeed = 19;
  83. _root.playerWalkSpeed = 8;
  84. _root.playerState = "fall";
  85. _root.playerJumping = true;
  86. _root.playerAttacking = false;
  87. _root.playerShooting = false;
  88. _root.playerSwinging = false;
  89. _root.playerLives = 3;
  90. _root.playerInvincible = false;
  91. _root.playerStrength = 10;
  92. _root.playerHeight = 75;
  93. _root.playerWidth = 50;
  94. if(_root.playerHealth == undefined || _root.playerHealth <= 0)
  95. {
  96.    _root.playerHealth = 100;
  97. }
  98. _root.weaponCount = 1000;
  99. _root.currentWeapon = "batarang";
  100. _root.comboMeter = false;
  101. _root.bgScroll = 6;
  102. _root.onPlatform = false;
  103. _root.key_z = false;
  104. _root.key_x = false;
  105. _root.key_c = false;
  106.