title: Getting window.location in embedded Flash
body: <p>I embed a .swf file in HTML and then embed this HTML itself in another HTML.</p>
  
  <p>In the .swf file I call </p>
  
  <pre><code>ExternalInterface.call(" function(){ return window.location.toString();}";
  </code></pre>
  
  <p>The problem is sometimes I seem to get window location of the embedded HTML and sometimes I get address of the main HTML (see picture).   </p>
  
  <p><img src="https://i.stack.imgur.com/wgull.jpg" alt="enter image description here"></p>
  
  <p>All I am after is reliability. I want to get the same address everytime. I haven't even been able to understand when it get which location. I wonder if it is some sort of browser related mystery!   </p>
  
  <p>Thanks for any help<br>
  Cheers! </p>
  
  <p>Ali </p>