I have a bunch of custom components all on their own files I want to add on the fly, right now i already included them into my mxml file but set their visibile to false. I don't want that.
I want to be able to add them on the fly say if i click a button one of my custom component shows up?
you can do this example you have a component with some name "myComponent.mxml" you can call its constructer when you want it to appear in your application like for this component you can do
var myComp:myComponent=new myComponent()
then you can simply call your containers addChild method to add it to the displayList of your container and removeChild method when you dont need it anymore.
if you want to add Components when the application has completed its loading then you should probbably save your component as separate module in order to load it in your application when you need it.
thanks guys wonderfully i went with instantiating the components and adding them on runtime.