So I have a button in a Flex 3 project, that calls an AS function of mine when clicked. I want to pass the button's label as the parameter name to the function, but it doesn't seem to be working. Here is the example:
i think you can access the buttons label by casting the
event target property to Button. then you should be able to access
your buttonlabel inside the callback.
Code:
private function myCallback(e:MouseEvent):void {
var button:Button = Button(e.target);
if (button) {
button.label;
}
}