TypeError: Bad element of type flashx.textLayout.elements::LinkElement passed to mxmlChildren

TypeError: Bad element of type flashx.textLayout.elements::LinkElement passed to mxmlChildren
at flashx.textLayout.elements::SpanElement/set mxmlChildren()[C:Vellumbranchesv11.0devoutputopenSourcetextLayoutsrcflashxtextLayoutelementsSpanElement.as:209]
at Test/_Test_SpanElement1_c()[/Users/monkeypunch/Documents/test/src/Test.mxml:5]

Incorrect:

	<s:RichText x="20" y="100" color="#2b4381" fontFamily="Myriad Pro" fontSize="17" tabStops="S0 S50 S100 S150 S200 S250 S300 S350 S400 S450 S500" width="494" height="55" whiteSpaceCollapse="preserve">
		<s:content><s:p><s:span color="#f77d0e"><s:a href="http://google.com">{data.username}</s:a></s:span><s:span> </s:span><s:span color="#ffffff">posted 18 photos to</s:span><s:span> </s:span><s:span color="#0693ab">Web 2.0 Silicon Valley Design Team</s:span></s:p></s:content>
	</s:RichText>

Correct: LinkElements cannot be children of span tags. Move the span inside of the link element or copy the attributes from the span to the link.

	<s:RichEditableText x="20" y="100" color="#2b4381" editable="false" fontFamily="Myriad Pro" fontSize="17" width="494" height="55" whiteSpaceCollapse="preserve">
		<s:textFlow>
			<s:TextFlow>
				<s:p><s:a href="http://google.com"><s:span color="#f77d0e" textDecoration="none">{data.username}</s:span></s:a><s:span color="#ffffff"> posted 18 photos to</s:span><s:span> </s:span><s:span color="#0693ab">Web 2.0 Silicon Valley Design Team</s:span></s:p>
			</s:TextFlow>
		</s:textFlow>
	</s:RichEditableText>

 

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