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

  1. _root.game.onEnterFrame = _global.cameraLogic2;
  2. _root.game.player.onEnterFrame = _global.playerLogic;
  3. _root.game.combo.onEnterFrame = _global.comboLogic;
  4. _root.game.halo.onEnterFrame = _global.followPlayer;
  5. for(n in _root.game)
  6. {
  7.    if(n.substring(0,4) == "goon")
  8.    {
  9.       _root.game[n].onEnterFrame = _global.goonAI;
  10.       _root.game[n].state = "idle";
  11.       _root.game[n].health = 70;
  12.       _root.game[n].strength = 10;
  13.       _root.game[n].speed = 6;
  14.       _root.game[n].dir = 1;
  15.       _root.game[n].attackCount = 0;
  16.       _root.game[n].fallCount = 0;
  17.    }
  18.    if(n.substring(0,4) == "door")
  19.    {
  20.       _root.game[n].onEnterFrame = _global.doorOpen;
  21.       _root.game[n].doorOpen = false;
  22.    }
  23.    if(n.substring(0,7) == "item_br")
  24.    {
  25.       _root.game[n].onEnterFrame = _global.itemLogic;
  26.    }
  27.    if(n.substring(0,8) == "elevator")
  28.    {
  29.       _root.game[n].onEnterFrame = _global.elevatorLogic;
  30.       _root.game[n].dy = 0;
  31.       _root.game[n].limit = int(n.substring(12));
  32.    }
  33.    if(n.substring(0,5) == "barrel")
  34.    {
  35.       _root.game[n].onEnterFrame = _global.bgHit;
  36.    }
  37.    if(n.substring(0,5) == "eagle_BAK")
  38.    {
  39.       _root.game[n].onEnterFrame = _global.birdAI;
  40.       _root.game[n].state = "fly";
  41.       _root.game[n].health = 30;
  42.       _root.game[n].speed = 5;
  43.       _root.game[n].dir = -1;
  44.       _root.game[n].turnBack = true;
  45.       _root.game[n].flyCount = 0;
  46.       _root.game[n].attackCount = 0;
  47.    }
  48.    if(n.substring(0,6) == "health")
  49.    {
  50.       _root.game[n].onEnterFrame = _global.lifeLogic;
  51.    }
  52. }
  53. stop();
  54. _root.gravity = 5;
  55. _root.globalGravity = 5;
  56. _root.FPS = 0;
  57. _root.fpsSet = false;
  58. _root.frameCount = 0;
  59. _root.gotoLast = "level2a";
  60. _root.camDelay = 0;
  61. _root.camHeight = 275;
  62. _root.camJump = 3;
  63. _root.camMin = 200;
  64. _root.camMax = 55252;
  65. _root.camZoom = 100;
  66. _root.camOffset = 0;
  67. _root.playerDx = 0;
  68. _root.playerDy = 3;
  69. _root.playerDir = -1;
  70. _root.playerSpeed = 19;
  71. _root.playerWalkSpeed = 6;
  72. _root.playerState = "fall";
  73. _root.playerJumping = true;
  74. _root.playerAttacking = false;
  75. _root.playerShooting = false;
  76. _root.playerSwinging = false;
  77. _root.playerLives = 3;
  78. _root.playerInvincible = false;
  79. _root.playerStrength = 10;
  80. _root.playerHeight = 75;
  81. _root.playerWidth = 50;
  82. if(_root.playerHealth == undefined || _root.playerHealth <= 0)
  83. {
  84.    _root.playerHealth = 100;
  85. }
  86. _root.weaponCount = 1000;
  87. _root.currentWeapon = "batarang";
  88. _root.comboMeter = false;
  89. _root.bgScroll = 6;
  90. _root.onPlatform = false;
  91. _root.key_z = false;
  92. _root.key_x = false;
  93. _root.key_c = false;
  94.