Multiple sets of visual children have been specified for the component tag
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.
XML:
-
<!-- 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" />
Please post your comments to help future visitors.
No comments yet. Be the first.
Leave a reply
Wrap MXML and ActionScript in [xml] [/xml] and [as] [/as] tags respectively