OK, maybe I'm not understanding what you are trying to achieve but, to me, the easiest way would be to create a public variable in your component (I'd make it of type array).
Now, when you create a new instance of your component, set the public variable to an array of objects that describe what needs to be added. The code in the class can then add the display objects as required. I have done something like this already for dynamically created forms. Each form is retrieved from a database and created on the fly. Managers have a tool to create new forms whenever they need to and it populates the database. Let me know if I am completely off base here. Best Regards Steve --- In [email protected], "astronaute75" <astronaute....@...> wrote: > > Hello fellows :) > > The situation: > Actually I extend an AS component CompA into many other MXML components > CompA1, CompA2... CompA500 and so on. They all share same skin CompASkin, > because it is convenient and maintainable. > > Now, there is a requirement: small sub part of the skin have to be different > for each extended component. That change is always in same zone of the skin, > 99% of the skin will never change. Let's call that zone the ChangeZone. For > some of components a new TextInput will be added to ChangeZone, for others it > will be a Label, or a Button, or some other component or combination of few > of them, nothing too complicated. > > What is the best practice to solve this problem? > For example, do I have to make 500+ small custom components representing that > ChangeZone implementing an interface IChangeZone ? Am I be able to set it in > the skin separately for each extended component? > > I hope you understand that having 500+ skins that are almost identical except > for this small zone is not an option as it will be a real nightmare to apply > change to all of them each time... well, something changes. > > I know there is a solution without code duplication as Flex 4 is meant to be > extensible, but I just can't find it. I hope you can give me some help on > this one :) > > Thank you in advance for your help, > Adnan >

