Cacher un calque et qu'un autre prenne sa place
Bonjour j'ai un caroussel et suivant où le caroussel est placé je voulais faire apparaitre un calque par image correspondante
Voici mon code
Code:
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 60
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>carrousel</title>
<style type="text/css">
<!--
#apDiv1 {
position:absolute;
left:19px;
top:403px;
width:843px;
height:177px;
z-index:1;
}
#apDiv2 {
position:absolute;
left:14px;
top:434px;
width:850px;
height:132px;
z-index:2;
}
-->
</style>
</head>
<body bgcolor="#ffffff">
<div id="apDiv1" style="display:none">calque 1 </div>
<div id="apDiv2" style="display:none">calque 2</div>
<script language="JavaScript">
<!--
var isInternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
// Gérer tous les messages FSCommand d'une animation Flash.
function carrousel_DoFSCommand(command, args) {
var carrouselObj = isInternetExplorer ? document.all.carrousel : document.carrousel;
//
if (command =="messagebox") document.getElementById(args).style.display = 'block';//alert(args);
//else document.getElementById(args).style.display = 'none';
//
}
// Hook pour Internet Explorer
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
document.write('<script language=\"VBScript\"\>\n');
document.write('On Error Resume Next\n');
document.write('Sub carrousel_FSCommand(ByVal command, ByVal args)\n');
document.write(' Call carrousel_DoFSCommand(command, args)\n');
document.write('End Sub\n');
document.write('</script\>\n');
}
//-->
</script>
<!--URL utilisées dans l'animation-->
<!--texte utilisé dans l'animation-->
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" id="carrousel" width="842" height="372" align="middle">
<param name="allowScriptAccess" value="always" />
<param name="movie" value="carrousel.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed src="carrousel.swf" quality="high" bgcolor="#ffffff" width="842" height="372" swLiveConnect=true id="carrousel" name="carrousel" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</body>
</html> |
mon args je vais le chercher dans un document xml à part.
Mon problème c'est que le calque 1 s'affiche au bon endroit mon calque 2 aussi mais je voudrais que le calque remplace le précédent et je ne sais pas comment faire si quelqu'un pouvait m'aider merci.