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.

<!-- 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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s