I want it so that when you chose one of the options in the
comboBox, it will call the function SubChooseField in the
main.mxml. But when I compile this, no matter what i try, i get the
Error: Call to a possibly undefined method SubChooseField
through a reference with static type my_custom_opponent.
OR if i change the codeand remove the 'parent' to say:
close="SubChooseField(event)"> i get error:
Error: Call to a possibly undefined method SubChooseField.
Rather than trying to use parent, using events might help
here. In your main mxml file, just listen for the change event that
is dispatched from your custom component. Since it is a ComboBox
component, it automatically dispatches this event. If your
component was more complex, you would need to dispatch a custom
If your custom component was named CustomCombo, then the mxml
in your main file would look something like this: