| Newt99 2007-01-31, 6:15 am |
| Hello,
I had a strange problem where the CSS page would only half-load only on some
computers and only sometimes (all under IE6). When this problem occured,
everything after the Flash content (integrated in a container layer using SWF
object) would not load. The SWF is light (59 KB) but large in size (776 x 268
px). Another problem was that the CSS navbar could not display on top of the
Flash (even though I used the opaque then transparency wmode and set the
z-index, the DTD being XHTML transitional). I noticed that when the visibility
of the Flash container layer was set to hidden, the page would load without any
problem. So I decided to set the visibility to hidden at start and use
setInterval() in Javascript in order to set the visibility to visible after a
few seconds, and it worked ! We no longer have loading problems.
<%
// ASP browser detection
var sUserAgent = oUserAgent.Count() ? oUserAgent.Item(1) : "";
var ie6 = (sUserAgent.indexOf("MSIE 6.0")!=-1);
%>
<script language="javascript">
<!--
// Javascript browser detection
var IE6 = (navigator.userAgent.indexOf('MSIE 6.0') !=-1);
//-->
</script>
<div id="flashmap" <% if (ie6){ %>style="visibility:hidden;"<% } %>><!--
Insert your SWF Object here--></div>
<script language="javascript">
<!--
function MM_showHideLayers() { //v6.0
clearInterval(iIntervalID);
var i,p,v,obj,args=MM_showHideLayers.arguments;
for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null)
{ v=args[i+2];
if (obj.style) { obj=obj.style;
v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
obj.visibility=v; }
}
// In 3 seconds, display the flashmap layer
if (IE6) {
var iIntervalID = setInterval("MM_showHideLayers('flashmap','','show')",
3000);
}
//-->
</script>
NB: this problem did not occur in IE7, Firefox (Mac/PC), Safari nor Opera
Best regards,
Karl Sigiscar.
|