0 Replies Latest reply on Aug 5, 2007 1:14 PM by nnmmooppqq

    XMLonLoad not firing

    nnmmooppqq Level 1
      I can't seem to get XML to load. The XML file (book.xml) is very simple:

      <?xml version="1.0" encoding="utf-8"?>
      <book>
      <title>ASC</title>
      <authors>
      <author name="Geoff" />
      </authors>
      </book>

      The actionscript is also simple (first frame of movie):

      stop();
      // Create a new XML object.
      var flooring:XML = new XML();
      // Set the ignoreWhite property to true (default value is false).
      flooring.ignoreWhite = true;
      // After loading is complete, trace the XML object.
      flooring.onLoad = function(success) {
      trace(flooring);
      };
      // Load the XML into the flooring object.
      flooring.load("book.xml");

      Publish settings: Flash Player 6, AS1 (but I've tried many combinations up to FP9/AS3). HTML, SWF and .XML files are all in same folder of site.

      In the logs, there is no call to book.xml.

      I know I'm doing something trivally wrong, but I can't spot it. Any help?

      Thanks.