3 Replies Latest reply on Aug 8, 2006 11:58 AM by sam luke

    xml compilation problem

    sam luke Level 1
      Please can somebody help. I have copied the example out of the programming action script 3 .pdf (page 324) and I cant get it to compile. The error is 'Access of undefined property myXML.'. I have listed the code below. Can someone help

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute">

      <mx:Script>
      <![CDATA[
      var myXML:XML =
      <order>
      <item id='1' quantity='2'>
      <menuName>burger</menuName>
      <price>3.95</price>
      </item>
      </order>;

      trace(myXML.item[0].menuName);
      ]]>
      </mx:Script>

      </mx:Application>