title: Parameter url must be non-null
body: <p>i am getting the <code>Parameter url must be non-null</code> error while trying to pass the path of an XML file to an Shockwave flash object.</p>
  
  <p>The javascript code is as follows </p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      var so = new SWFObject("preview.swf", "", "100%", "100%", "9", "#ffffff");
      so.addParam("allowFullScreen", "true");
      so.addParam("scale", "noscale");
      so.addParam("menu", "false");
      so.addVariable("xmlPath", "xml/exampleData.xml");
      so.write("flashcontent");
  &lt;/script&gt;
  </code></pre>
  
  <p>As you can see the XML file i am trying to load within the SWF file is the <code>exampleData.xml</code></p>
  
  <p>Within the ActionScript i declared the variable xmlPath as follows...</p>
  
  <pre><code> public var xmlPath:String
  </code></pre>
  
  <p>and in the load event i made the appropriate changes</p>
  
  <pre><code>private function loadComp(data:String):void
          {
              xmlModel.xml = new XML(data);
              new LoadXml(xmlPath, picHandler);
          }
  </code></pre>
  
  <p>And here comes the question.</p>
  
  <p>What am i doing wrong here?
  Why do i get the <code>Parameter url must be non-null</code> error?</p>
  
  <p><strong>P.S.</strong> If i hard-code the path, within the actionscript file, everything works great!</p>
  
  <pre><code>private function loadComp(data:String):void
          {
              xmlModel.xml = new XML(data);
              new LoadXml('xml/exampleData', picHandler);
          }
  </code></pre>