tags:

views:

25

answers:

0

Hi,

I have several skin parts defined in a custom component and I want to execute some code after all parts have been added.

Currently, my only idea is to use if statement in overrided partAdded method to test if all parts have been added. Something like this:

override protected function partAdded(partName:String, instance:Object):void
{
    super.partAdded(partName, instance);

    if (part1 && part2 && part3 && part4) {
                 some code...
    }
}

But, I wonder is there some more elegant solution, some specific method that I could override, or event that I could use for this?

Thanks,