开发者

Flash object not loading in Safari

I've built a form, and next to my form element I've placed a flash object. When the page is loaded, the form is display: block, and the flash object is display: none.

The layout looks something like (the img is there so that if the user doesn't have flash, the gif animation will play instead):

<form id="form"></form>
<div id="upload-anim-div">
  <object type="application/x-shockwave-flash"
      data="<?= PAL_STATIC_HOST ?>/music/introducing/flash/upload_animation.swf"
      width="626"
      height="600">
    <param name="movie" value="<?= PAL_STATIC_HOST ?>/music/introducing/flash/upload_animation.swf"/>
    <img src="<?= PAL_STATIC_HOST ?>/music/introducing/img/Anim-placeholder.gif" alt="upload animation (gif)"/>
  </object>
</div>

When I submit my form, which is just to upload a file, I hide the form and display my animation div as follows in javascript:

$('#form').hide();
$('#upload-anim-div').show();

This works great in all browsers except Safari, where a big white space appears. Right clicking this white space simply gives me the following menu:

Flash movie not loaded... _not clickable_
About Adobe Flash Player 10.5.blah.开发者_StackOverflow中文版..

Why is the movie not loaded/loading?! If I simply display the movie when the document first loads (by removing the javascript line that initially hides it) it loads and displays fine! Any ideas would be greatly appreciated!

---EDIT---

I've now tried using swfobject, but get exactly the same problem. I used this kind of code in my javascript to embed my swf with javascript after displaying the upload-anim-div:

swfobject.embedSWF("myContent.swf", "upload-anim-div", "626", "600", "10");

Anyone have any further ideas?


Sounds like Safari tries to shave the page load time by not rendering Flash in a hidden div. How are you putting the Flash into the div, is it just an object tag, or are you using something like swfobject? If you're using swfobject you could write the Flash to the div when you reveal it.


I think you should try to embed your Flash content with swfobject:

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜