I have a custom component written in ActionScript. It has constructor which is expecting some arguments.
I want to include that custom component in mxml like this,
Main.mxml
...
<custom:CustomActionScriptComponent/> // Error line ..
..
But, it shows me an error saying
Error 1136: Incorrect number of arguments. Expected 1.
How to pass parameter in MXML file, to that custom ActionScript component?
As tags, MXML does not support class constructors.
Per your ActionScript class, you could allow default initialization of the parameter:
Then implement a creation complete event handler in your MXML: