Hey all,
I want to be able to add a listener to a button (symbol) as opposed to a button component–so I can check to see which radio button is marked true. The following is what I have so far:
myLabel.setStyle(“color”,0xFFFFFF);
radioBTN1.setStyle(“color”,0xFFFFFF);
radioBTN2.setStyle(“color”,0xFFFFFF);
radioBTN3.setStyle(“color”,0xFFFFFF);
myForm = this;
var submitBtnListener:Object = new Object();
submitBtnListener.onPress = function() {
var selectedRadioBtn = myContact.selection;
var selectedRadioBtnLabel = selectedRadioBtn.label;
//I am using this as opposed to trace for confirmation of the script working
statusMessage.text = "You can be contacted best by " + selectedRadioButtonLabel;
}
_parent.submitBtn.addListener(submitBtnListener);
Thanks,
Franky B.