Multiple sets of visual children have been specified for the component tag.
You have contents in the default property of a container but also defined in the custom component. Remove the contents of the component instance and if need be move it into the component mxml file.
<!-- Incorrect - notice the rectangle inside the component instance --> <local:CustomComponent x="135" y="9" width="457" height="340" > <s:Rect width="100%" height="100%"> <s:fill> <s:SolidColor color="#dddddd"/> </s:fill> </s:Rect> </local:CustomComponent> <!-- Correct - rectangle is defined in the component --> <local:CustomComponent x="135" y="9" width="457" height="340" />
Advertisements