Dynamic component with setChangeHandler problem

Hello…

I am trying to dynamically create a radio button component and assign a change handler to that component.


attachMovie("FRadioButtonSymbol", "propno", 6);
propno.setData("test");
propno.setChangeHandler("clickproperty");

function clickproperty(component) {
   radio = component.getData();
   trace(radio); //returns:  "undefined"
  
   radioalt = propno.getData();
   trace(radioalt); //returns:  "test"
}

As noted in my comments, using the component argument I am unable to get the data value. If I hardcode the path to my component it works fine.

I have done the same thing with a ComboBox (dropdown component) and it is able to resolve the component argument without a problem.

It is definitely CALLING the clickproperty function, but it is unable to resolve the value of the component arg? I cant imagine this is a limitation of the radio button component?

If I manually create a radio button (drag the component onto the stage) I am able to resolve the component argument successfully as well. It only seems to “break” when I create the component dynamically :frowning: