title: Fancybox swfobject "The requested content cannot be loaded. Please try again later."
body: <p>Ok I have installed FB 2.0.x and it's really nice. But, I have a page with 4 videos on it using the JW Player. Currently, when you click on a link it runs a function to open a fancybox instance. The fancybox is a set of HTML code. Inside the html code is a div with an id (unique for each div/video). Then, it adds the flashvars, params and attributes. The function is below:</p>
  
  <pre><code>function show_modelpopup(id,title,filepath,base_url) {
      var flashvars = { file: base_url+"uploads/videos/original/"+filepath, autostart:'true', skin: base_url+'js/skin.zip'};
  var params = { allowfullscreen:'true', allowscriptaccess:'always', wmode: 'transparent'  };
  var attributes = { id: id+'player', name: id+'player' };                             
  swfobject.embedSWF(base_url+'mediaplayer/player.swf','container'+id, 480, 385, '9.0.115', 'false', flashvars, params, attributes, flashloaded);
  }
  </code></pre>
  
  <p>And when the flashvars, params and attributes are done being setup, it runs swfobject.embedSWF and the last option is the function to run when it's done loading the video:</p>
  
  <pre><code>function flashloaded() {
      jQuery('#shadowbox_archives').fancybox({
          padding: 10,
          type: 'html',  
          height: 520,
          width: 600
      });
      jQuery.fancybox.open(jQuery('#shadowbox_archives'));
  }
  </code></pre>
  
  <p>And this all works GREAT. It loads the window and you see the flash player. But when you click the play button it gives "The requested content cannot be loaded. Please try again later.". I'm using firebug on Firefox to console log things and I verified the flv file path IS correct. In fact, I have the homepage set to display the very same video but not inside the fancybox. The output from the swfobject js are below:</p>
  
  <p>Fancybox Popup:</p>
  
  <pre><code>    &lt;object id="45player" width="480" height="385" type="application/x-shockwave-flash" name="45player" data="http://www.green-scene.com/mediaplayer/player.swf"&gt;
      &lt;param name="allowfullscreen" value="true"&gt;
      &lt;param name="allowscriptaccess" value="always"&gt;
      &lt;param name="wmode" value="transparent"&gt;
      &lt;param name="flashvars" value="file=http://www.green-scene.com/uploads/videos/original/video_45_1318559535.flv&amp;autostart=true&amp;skin=http://www.green-scene.com/js/skin.zip"&gt;
      &lt;/object&gt;
  </code></pre>
  
  <p>Home Page (non fancybox):</p>
  
  <pre><code>    &lt;object id="45player" width="480" height="385" type="application/x-shockwave-flash" name="45player" data="http://www.green-scene.com/mediaplayer/player.swf"&gt;
      &lt;param name="allowfullscreen" value="true"&gt;
      &lt;param name="allowscriptaccess" value="always"&gt;
      &lt;param name="wmode" value="transparent"&gt;
      &lt;param name="flashvars" value="file=http://www.green-scene.com/uploads/videos/original/video_45_1318559535.flv&amp;autostart=true&amp;skin=http://www.green-scene.com/js/skin.zip"&gt;
      &lt;/object&gt;
  </code></pre>
  
  <p>The home page has no issues. But the fancybox does. So what am I missing?</p>
  
  <p>I appreciate all your help!</p>
  
  <p><strong>UPDATE</strong> Interesting discovery just made. If I click the button in the player control bar to expand to full screen, it will go full screen and I can click play to actually play it. If I click the button to return to normal size (or hit esc) it continues to play in the fancybox. But then if I try to click pause it disappears and gives me the same error message.</p>
  
  <p><strong>UPDATE #2</strong> Turns out the Internet Explorer likes the above and it works just fine. But Firefox and Safari give me the same error above. It's mind boggling.</p>
  
  <p><strong>UPDATE #3</strong> I was able to get the video to autoplay when the shadowbox opens, but now you can't pause or go fullscreen in Firefox or Safari on Mac. But IE 8/9 still work just fine.</p>