问题
I have an .swf movie embedded in fancybox on this site: http://www.courtyarddental.co.uk
This works as expected in all browsers except IE, where I just get the greyed-out screen but no pop-up box.
Any help much appreciated!
回答1:
That was an old issue and we never knew exactly what was the reason. Basically fancybox v1.3.x won't display "object" elements with "data" attribute (IE6/7/8) like in your code
<object type="application/x-shockwave-flash" data="the_courtyard.swf" width="640" height="360">
you can see the old thread here back in January 2010
additionally, linking inline content has other issues; see here
I would recommend you to link the video directly like
<a href="http://www.courtyarddental.co.uk/the_courtyard.swf" id="movie"><img width="207" height="117" border="0" title="Play the video" alt="Play the video" src="http://www.courtyarddental.co.uk/images/video-btn.png"></a>
and use this script
$(document).ready(function() {
$('#movie').fancybox({
'padding': 0, //optional
'width': 640,
'height': 360,
'type': 'swf',
'autoScale': false
});
});
that works fine for most browsers including IE7+
a demo here
回答2:
SWF loads and plays fine for me under IE 9.0.8112.18641, Flash player 11.0.1.152. (Does not auto-start, I need to click the swf play button to start the movie.)
Possible caching issue?
Also, your box doesn't appear to be large enough; I am seeing both horizontal and vertical scrollbars for the div containing the SWF.
来源:https://stackoverflow.com/questions/8345855/fancybox-1-3-4-not-working-in-ie