I'm new to AS3 and am trying to get the target name from a mouse click by using a simple getValue function but I am getting the error 1067: Implicit coercion of a value of type void to an unrelated type String. I'm not sure what I'm doing wrong.
var _userInput:String = new String();
_userInput = btn_0.addEventListener(MouseEvent.CLICK, getValue);
function getValue(e:MouseEvent):String{
return e.target.name;
}
This may be a simple error I'm making but I'm not seeing what it is. Thanks in advance.