Flash Action Script Error Repository

A library of solutions to Actionscript, Flash, Flex and AIR

TypeError: Bad element of type int passed to mxmlChildren at flashx.textLayout.elements::FlowGroupElement/set mxmlChildren

TypeError: Bad element of type int passed to mxmlChildren
at flashx.textLayout.elements::FlowGroupElement/set mxmlChildren()[C:\Vellum\branches\v1\1.0\dev\output\openSource\textLayout\src\flashx\textLayout\elements\FlowGroupElement.as:203]

I using data binding and I passed a integer inside a span tag as shown below. To fix it I had to cast it or convert it to a string.

XML:
  1. <s:RichEditableText x="20" y="100" color="#2b4381" editable="false" fontFamily="Myriad Pro" fontSize="17" width="494" height="55" whiteSpaceCollapse="preserve">
  2.         <s:textFlow>
  3.             <s:TextFlow>
  4.                 <s:p>
  5.                 <s:a href="http://google.com" color="#ffffff" textDecoration="none">   {data.contentCount} </s:a></s:p>
  6.             </s:TextFlow>
  7.         </s:textFlow>
  8.     </s:RichEditableText>

Correct:

XML:
  1. <s:RichEditableText x="20" y="100" color="#2b4381" editable="false" fontFamily="Myriad Pro" fontSize="17" width="494" height="55" whiteSpaceCollapse="preserve">
  2.         <s:textFlow>
  3.             <s:TextFlow>
  4.                 <s:p>
  5.                 <s:a href="http://google.com" color="#ffffff" textDecoration="none">   {String(data.contentCount)} </s:a></s:p>
  6.             </s:TextFlow>
  7.         </s:textFlow>
  8.     </s:RichEditableText>

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