Flex 2 / Flash CS3 Error #1085

TypeError: Error #1085: The element type “name” must be terminated by the matching end-tag “</key>”.

Description:
Here is another easy AS3 error. This Flash Error means that your XML is not valid because the end tag either does not match the opening tag or that the tag is simply missing. When it says “The element type” it is talking about the XML element. In my case this would be <name>. *Note: This AS3 error is similar to ActionScript Error #1100

Solution:
Check your spelling and make sure that you have properly nested tags.

Bad Code 1

var dogXML:XML = new XML();
dogXML =
<dog>
<name>Fido</namer>
</dog>

Bad Code 2

var dogXML:XML = new XML();
dogXML =
<dog>
<name>Fido
</dog>
</name>

Good Code

var dogXML:XML = new XML();
dogXML =
<dog>
<name>Fido</name>
</dog>

I hope this helps you solve ActionScript Error #1085

As Always Happy Flashing

2 thoughts on “Flex 2 / Flash CS3 Error #1085

  1. Pingback: curtismorley.com » Search Engine Optimization Example

  2. Pingback: curtismorley.com » Flex 2 / Flash CS3 Error #1100

Comments are closed.