title: How to pass Object tag PARAM value into Flash?
body: <p>Hey everyone, today I'm trying to get a link to an XML file passed from the Object Embed code into my Flash movie. (Not using SWFobject). I have 1 swf file that should be able to connect to 3 different XML files.</p>
  
  <h2>Attempt 1</h2>
  
  <hr>
  
  <p><strong>Below is the HTML code (I'm trying to get theXML path):</strong></p>
  
  <pre><code>&lt;div class="left"&gt;
  &lt;h2&gt;300 x 353 Green Accent Color&lt;/h2&gt;
  
  &lt;script type="text/javascript"&gt;
          AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','300','height','353','src','TEN','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','TEN' ); //end AC code
  &lt;/script&gt;&lt;noscript&gt;
  
  &lt;object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="300" height="353"&gt;
    &lt;param name="movie" value="player.swf" /&gt;
    &lt;param name="quality" value="high" /&gt;
    &lt;param name="XML" value="client_user.xml" /&gt;
    &lt;embed src="T.swf" allowscriptaccess="always" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="300" height="353"&gt;&lt;/embed&gt;
  &lt;/object&gt;&lt;/noscript&gt;
  
  &lt;/div&gt;
  </code></pre>
  
  <p><br/></p>
  
  <p><strong>Document Class</strong></p>
  
  <pre><code>private var theXML:String = root.loaderInfo.parameters.xmlPath;
  
  
  public function TEN():void
  {
      if (stage) init();
      else addEventListener(Event.ADDED_TO_STAGE, init);
  }
  
  private function init(e:Event = null):void 
  {
      removeEventListener(Event.ADDED_TO_STAGE, init);
  
      xmlLoader.addEventListener(Event.COMPLETE, xmlCompleteHandler);
      xmlLoader.load(new URLRequest(root.loaderInfo.parameters.xmlPath));
  
      loader = new BulkLoader("bulky");
      loader.logLevel = BulkLoader.LOG_INFO;
      loader.addEventListener(BulkLoader.COMPLETE, onBulkLoadComplete);
      loader.addEventListener(BulkLoader.PROGRESS, onBulkLoadProgress);
      //loader.add("client.xml",{id:"xmldata"});              //&lt;- for TESTING
      //loader.add(theXML+".xml",{id:"xmldata"}); //&lt;- for LIVE
      loader.add(xmlPath+".xml",{id:"xmldata"}); //&lt;- for LIVE
      loader.start();
  }
  </code></pre>
  
  <p><br/><br/></p>
  
  <h2>Attempt 2</h2>
  
  <hr>
  
  <p><strong>HTML with different PARAM passing syntax:</strong></p>
  
  <pre><code>&lt;div class="right"&gt;
          &lt;h2&gt;520 x 477 Blue Accent Color&lt;/h2&gt;
          &lt;script type="text/javascript"&gt;
  AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','300','height','353','src','TEN','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','TEN' ); //end AC code
  &lt;/script&gt;&lt;noscript&gt;
  
  &lt;object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="300" height="353"&gt;
    &lt;param name="movie" value="T.swf?xmlPath=0" /&gt;
    &lt;param name="quality" value="high" /&gt;
    &lt;param name="xmlPath" value="520.xml" /&gt;
    &lt;embed src="T.swf" allowscriptaccess="always" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="300" height="353"&gt;&lt;/embed&gt;
  &lt;/object&gt;&lt;/noscript&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p><br/><br/></p>
  
  <h2>Attempt 3</h2>
  
  <hr>
  
  <p>Flash Code Updated:</p>
  
  <pre><code>private var theXML:String = "";
  
  private function init(e:Event = null):void 
  {
      removeEventListener(Event.ADDED_TO_STAGE, init);
  
      theXML = stage.loaderInfo.parameters.xmlPath;
  
      loader = new BulkLoader("bulky");
      loader.logLevel = BulkLoader.LOG_INFO;
      loader.addEventListener(BulkLoader.COMPLETE, onBulkLoadComplete);
      loader.addEventListener(BulkLoader.PROGRESS, onBulkLoadProgress);
      //loader.add("client_user.xml",{id:"xmldata"}); //&lt;- for TESTING
      loader.add(theXML,{id:"xmldata"}); //&lt;- for LIVE
      //loader.add(theXML+".xml",{id:"xmldata"}); //&lt;- for LIVE
      loader.start();
  }
  </code></pre>
  
  <p><strong>Updated HTML code:</strong></p>
  
  <pre><code>&lt;div class="right"&gt;
          &lt;h2&gt;520 x 477 Blue Accent Color&lt;/h2&gt;
          &lt;script type="text/javascript"&gt;
  AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','300','height','353','src','TEN','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','T' ); //end AC code
  &lt;/script&gt;&lt;noscript&gt;
  
  &lt;object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="300" height="353"&gt;
    &lt;param name="movie" value="T.swf?xmlPath=0.xml" /&gt;
    &lt;param name="quality" value="high" /&gt;
    &lt;param name="xmlPath" value="520.xml" /&gt;
    &lt;embed src="T.swf?xmlPath=520.xml" allowscriptaccess="always" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="300" height="353"&gt;&lt;/embed&gt;
  &lt;/object&gt;&lt;/noscript&gt;
      &lt;/div&gt;
  </code></pre>
  
  <h2>Right now it's not loading the XML file from the param :(</h2>