Forum de discussion
Forum « Flash et Shockwave » (archives)
Re: mise a jour correctice I.E. et twPasseFlash
Envoyé: 15 juin 2006, 19h12 par lulukawa
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>kawabounga kchalot</title>
<meta name="Description" content="groupe de musique angevin kawabounga">
<meta name="Keyworks" content="HTML, kchalot, kawabounga, concert">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script src="index2.js" type="text/javascript"></script>
</head>
<body onload="AxRep();">
<BODY BGCOLOR="#0099CC">
<div id="Layer1" style="position:absolute; width:100%; height:100%; z-index:1">
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="100%" height="100%" id="etzetera" align="top">
<param name="allowScriptAccess" value="sameDomain" >
<param name="movie" value="index.swf" >
<param name="menu" value="false" >
<param name="bgcolor" value="#0099cc" >
<embed src="index.swf" menu="false" quality="high" bgcolor="#0099cc" width="100%" height="100%" name="etzetera" align="top" allowscriptaccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" >
</object>
</div>
</body>
</html>
et le index2.js :
function AxRep(){
if (!document.all || !window.print || window.opera) return;
if (document.getElementsByTagName) {
//object
var theObjects = document.getElementsByTagName("object");
for (var i = 0; i < theObjects.length; i++) {
//ajout d'un div autour de object
div = theObjects[i].parentNode.insertBefore(document.createElement("div"), theObjects[i]);
div.style.display="none";
div.appendChild(theObjects[i]);
if(div.firstChild.data){
// Fix for Flash Satay style objects
div.firstChild.removeAttribute('data');
}
//Recuperation des flashvars
var theParams = div.getElementsByTagName("param");
for (var j = 0; j < theParams.length; j++) {
if(theParams[j].name.toLowerCase() == 'flashvars'){
var theFlashVars = theParams[j].value;
break;
}
}
//changement des flashvars
var theInnnerHTML = div.innerHTML;
var re = theInnnerHTML = theInnnerHTML.replace(re, "<param name='FlashVars' value='" + theFlashVars + "'>");
div.outerHTML = theInnnerHTML;
}
//embed
var embs = document.getElementsByTagName("embed");
for (i=0; i<embs.length; i++) {
embs[i].outerHTML = embs[i].outerHTML;
}
}
}
voilà et en fait ca marche nikel et au moins ta page html est nikel et tu le fait pour toute. c'est genial!!
lucas+++++
Réponses
|