1 Reply Latest reply on May 17, 2006 7:26 PM by Newsgroup_User

    Why can't it identify the target?

    gregmax17
      Here is the scrip I am usingt:


      player_1.onRelease = function() { player_id = '2'; };
      player_2.onRelease = function() { player_id = '2'; };

      if(player_id == (2 or 1)) {
      if(Key.isDown(Key.UP)) {
      player_[player_id]._y = player_['player_id]._y - 2;
      }
      }

      I want it so the user clicks on the player who he/she wishes to control/move. And when the user clicks on the player, it will to according to which they clicked on. I would like it like this so it's all dynamic. Any suggestions on why it doesn't move the player with the specific player_id?