Flash Action Script Error Repository

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

ArgumentError: newElement not of a type that this can be parent of

ArgumentError: NewElement not of a type that this can be parent of

Reason
TextFlow markup is malformed. It does not allow certain elements to contain other elements. For example, a paragraph cannot contain another paragraph. It also occurs when you have line breaks in your markup tags, "\n\t\t\t\t".

Incorrect:

XML:
  1. <s:RichEditableText x="93" y="22">
  2.         <s:content>
  3.             <s:TextFlow xmlns="http://ns.adobe.com/textLayout/2008">

Notice the line break after the content tag.

Correct:

XML:
  1. <s:RichEditableText x="93" y="22">
  2.         <s:content><s:TextFlow xmlns="http://ns.adobe.com/textLayout/2008">

Read more here...

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