I have a box in one state, I remove the box and then add another box. I do this so when the box is complete, I have something to trigger getting data from an xml file. (That doesn't seem right, is there a better way to trigger a function on entering a State ? )
I'm testing the data in 2 ways, 1 works and the other doesn't. the HTTPservice: <mx:HTTPService id="bookData" url="../media/books.xml" resultFormat="e4x" result="xmlObj = XML(bookData.lastResult)" /> When I send the service: bookData.send(); the data is sent to this textArea <mx:TextArea text="{xmlObj.toString()}"/> So far so good, however, if I put this other test immediately after the service call, I'm getting the dreaded NULL reference error. trace(xmlObj.stock.(@id == "1").name); Does this mean I need to check for load completion, like an event listener on an UrlLoader ? (if so, How? ) The documentation seems to indicate it shouldn't be neccesary, so I'm not even sure that's the problem What's wrong ? The xml is below <?xml version="1.0" encoding="iso-8859-1"?> <books> <stock id="1"> <name>The Picasso Code</name> <author>Dan Blue</author> <category>Fiction</category> <description>Cubist paintings reveal a secret society of people who really look like that</description> </stock> </books>