Swfobject - alternative contents loads before flash
I have a Flash map on my page. My problem is that when the page loads for a while I can see the alternative content and then the map.
HTML:
<div class="flash-wrapper">
<div id="flash-map" class="flash">
<div id="noflash">
<p>
<span>Aby poprawnie wyświetlić tę stronę prosimy o zainstalowanie<br />programu Adobe Flash Player.</span>
<a class="FlashAltButton" href="http://www.adobe.com/go/getflashplayer" title="Pobierz Adobe 开发者_JAVA百科Flash Player"><img src="/pl/img/get_flash_logo.png" alt="Pobierz Adobe Flash Player" width="158" height="39" /></a>
</p>
</div>
</div>
</div>
SWFOBJECT:
swfobject.embedSWF("http://site/flash/contest/map.swf",
"flash-map",
"410",
"365",
"9.0.0",
"http://site/flash/contest/expressInstall.swf",
flashvars,
params
);
var params = {
quality: 'high',
bgcolor: '#ffffff',
play: "true",
loop: "true",
wmode: "transparent",
scale: "showall",
menu: "true",
devicefont: "false",
salign: "",
allowFullScreen: "true",
allowScriptAccess: "sameDomain"
};
I believe that what you are seeing is an annoying FOUC (Flash of Unstyled Content). If the SWF you are loading is too heavy (or the connection too slow), sometimes happens as the pages displays before the content is totally loaded (it's quite common with CSS stylesheets too nowadays).
The only solution I can think of right now is set the alternative content to "visibility:hidden", and then if there is no Flash, make it visible by Javascript. The only problem is that if the client has no Flash and no Javascript he'll end up with no content... so I'd love to hear different solutions for this!
精彩评论