What is being added and removed?
at first there are like 10 custom BorderContainers added to the HGroup. At this time the listeners are called correctly.
But then (when all the elements are in the HGroup), I tried to change one element's height and width. I have a mouseOver on the BorderContainers, but after I change the height and width, somehow the HGroup's ADDED/REMOVED listerers are also called.
so to make it clear:
1 HGroup with 2 listeners: ADDED and REMOVED
in the HGroup there are 10 custom BorderContainer components. These custom components have a mouseOver and mouseOut function, in which the particular element's width and height is changed.
When the mouseOver/Out functions are executed and the height/width are changed, the HGroup's ADDED/REMOVED listeners are also called.
If I comment the size changes in the mouseOver/Out, then the ADDED/REMOVED are not called.
The event.target should indicate what is being added and removed.
Depending on the contents, I suppose it is possible that the graphic elements have to be recalculated to new display objects and these are being removed and added.
exactly The event.target is a TextLine. I'll check for these types in the listeners.
Thanks much for your help!
Ah, yes. TextLines have to be recycled as text is re-flowed. So that would be expected behavior if you have word wrapping text in the Hgroup.