4 Replies Latest reply on Apr 30, 2008 10:43 AM by Michael Borbor

    I made a HTTP request using a <mx:HTTPService> tag and I want to use a XML variable to store the result, however, the sy

      In my application I want to use an array to navigate a part of a XML file from an external XML file on web. I first use a <mx:HTTPService> to link to the .xml file, and then create a XML object to hold the "lastResult" in the <mx:Script> tag. It doesn't show an error in the Flex builder, however, when I execute the application, the system show an error message as below:

      TypeError: Error #1009: Cannot access a property or method of a null object reference.

      Here are the code I used:

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


      public function creationCompleteHandler():void {

      var MyXML:XML = new XML(feedRequest.lastResult);

      <mx:HTTPService id="feedRequest" url=" http://sweb.cityu.edu.hk/50685791/Adv_trialPosts.xml" useProxy="false" />

      <mx:Repeater id="PostRepeator" dataProvider="{MyXML.channel.item}">
      <custom:PostPanel id="PostHolder" width="{sizeWidth}" height="{sizeHeight}" title="{PostRepeator.currentItem.title}" >
      <mx:TextArea width="100%" height="100%" text="{PostRepeator.currentItem.title}" />


      Did I missed something or got some misconceptions??

      Thx a lot!