1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Test</title>
<script type="text/javascript" src="ibox.js"></script>
<script type="text/javascript">//<![CDATA[
// Création d'un élément XHTML object
function createSWF(url,width,height){
var swfObj,Param,e;
try{
swfObj=document.createElement('object');
swfObj.setAttribute('type','application/x-shockwave-flash');
swfObj.setAttribute('data',url);
swfObj.setAttribute('width',width);
swfObj.setAttribute('height',height);
Param=document.createElement('param');
Param.setAttribute('name','movie');
Param.setAttribute('value',url);
swfObj.appendChild(Param);
return swfObj;
}catch(e){
try{
if(swfObj){
while(swfObj.hasChildNodes())swfObj.removeChild(swfObj.lastChild);
}
}catch(e){}
}
return false;
}
window.onload=function(){
var swf=createSWF('swf/flash-intro.swf',534,285);
// Ajoute l'object Flash dans l'arbre DOM à afficher dans la boite
iBox.show(
swf,
'Bienvenue sur ce site !',
{
width:534,
height:285
}
);
// Cacher la boite après 10 secondes
setTimeout(
function(){iBox.hide();}
,10000
);
};
//]]>
</script>
</head>
<body>
<p>Test de l'excellent script iBox ;)</p>
</body>
</html> |
Partager