3 Replies Latest reply on Oct 13, 2006 3:32 PM by Rothrock

    xml.onLoad not firing

    gnolan
      Hello...

      It appears that the onLoad function does not fire at all if an xml file does not exist on the server (works fine if the file is there). Is this typical? If so, how can I trap the "file not found" error?

      thanks for any assistance
        • 1. Re: xml.onLoad not firing
          Level 7
          I think you want to have a look at the onHTTPStatus method of the XML
          object.


          --
          Dave -
          Adobe Community Expert
          www.blurredistinction.com
          http://www.adobe.com/communities/experts/


          • 2. Re: xml.onLoad not firing
            gnolan Level 1
            Dave...

            Thanks. I will check it. It looks like there are some options using onData and onHTTPStatus methods. I assumed that onLoad would return false in all cases - the docs are a little muddy on this.

            Gary
            • 3. Re: xml.onLoad not firing
              Rothrock Level 5
              I'm finding this strange. My understanding was that the onLoad would fire and return a false if the file was not found. I just tried it in the testing environment and that is what happened. Are you seeing different behaviour between the testing environment and actual deployment?

              I've done some smallish projects where I use onLoad of an XML to either show or hide some controls based upon the result. And they work just fine.

              What version of Flash are your using?

              The only thing I remember seeing here is that if the file exists, but is empty, you will never get the onLoad event. Is this some kind of dynamically generated XML file and perhaps the server sends some kind of data?