Message sender...how to know who send the message

I want to know wich of my game object send message…
i want to put the message sender as a target variable? can any one help me!!

Use a more complex datastructure in your params.

sender script

// create a array with yours gameobject and a command
var parmas = [ gameObject, "attack" ];
// send to "target" gameobject
target.SendMessage("OnDoSomethingForMe", params);

target script

// event handler
function OnDoSomehtingForMe(params : Object[]) {
  // take its parametrs back
  var sender = params[0] as GameObject;
  var action = parmas[1] as String;
  // send back a message
  sender.SendMessage("Rejected", action);
}

In params you could pass a Hashtable or your on message class, like:

class Message {
  var sender : GameObject;
  var action : String;
  function Message(sender : GameObject, action : String) {
    this.sender = sender;
    this.action = action
  }
}

target.SendMessage("OnDoSomethingForMe", new Message(gameObject, "attack"));