perchè la tendina del mio menù in javascript resta in secondo piano quando si sovrappone a un'animazione in flash??
![]()
perchè la tendina del mio menù in javascript resta in secondo piano quando si sovrappone a un'animazione in flash??
![]()
Il codice è questo:
<script language="JavaScript">
<!--
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function mmLoadMenus() {
if (window.mm_menu_0123112945_0) return;
window.mm_menu_0123112945_0 = new Menu("root",70,20,"Georgia, Times New Roman, Times, serif",12,"#ffffff","#ffffff","#2c9c51","#2c9c51", "center","middle",3,1,1000,-5,7,true,true,true,0,false,false);
mm_menu_0123112945_0.addMenuItem("A caldo","location='acaldo.htm'");
mm_menu_0123112945_0.addMenuItem("A freddo","location='afreddo.htm'");
mm_menu_0123112945_0.bgImageUp="img/mmmenu2_70x20_up.gif";
mm_menu_0123112945_0.bgImageOver="img/mmmenu2_70x20_over.gif";
mm_menu_0123112945_0.fontWeight="bold";
mm_menu_0123112945_0.hideOnMouseOut=true;
mm_menu_0123112945_0.bgColor='#cccccc';
window.mm_menu_0224102119_1 = new Menu("root",127,20,"Georgia, Times New Roman, Times, serif",12,"#ffffff","#ffffff","#2c9c51","#2c9c51", "center","middle",0,1,1000,-5,7,true,true,true,0,false,false);
mm_menu_0224102119_1.addMenuItem("Restauro facciate","location='restauro.htm'");
mm_menu_0224102119_1.addMenuItem("Canali e pluviali","location='canali.htm'");
mm_menu_0224102119_1.addMenuItem("Manti di copertura","location='manti.htm'");
mm_menu_0224102119_1.addMenuItem("Potature piante","location='potature.htm'");
mm_menu_0224102119_1.bgImageUp="img/mmmenu1_127x20_up.gif";
mm_menu_0224102119_1.bgImageOver="img/mmmenu1_127x20_over.gif";
mm_menu_0224102119_1.fontWeight="bold";
mm_menu_0224102119_1.hideOnMouseOut=true;
mm_menu_0224102119_1.bgColor='#cccccc';
mm_menu_0224102119_1.writeMenus();
} // mmLoadMenus()
function MM_controlSound(x, _sndObj, sndFile) { //v3.0
var i, method = "", sndObj = eval(_sndObj);
if (sndObj != null) {
if (navigator.appName == 'Netscape') method = "play";
else {
if (window.MM_WMP == null) {
window.MM_WMP = false;
for(i in sndObj) if (i == "ActiveMovie") {
window.MM_WMP = true; break;
} }
if (window.MM_WMP) method = "play";
else if (sndObj.FileName) method = "run";
} }
if (method) eval(_sndObj+"."+method+"()");
else window.location = sndFile;
}
//-->
</script>
<script language="JavaScript1.2" src="mm_menu.js"></script>
</head>
<body bgcolor="#ffffff" onLoad="MM_preloadImages('img/bottoni_r2_c2_f2.gif','img/bottoni_r4_c2_f2.gif','img/bottoni_r6_c2_f2.gif','img/bottoni_r8_c2_f2.gif','img/bottoni_r10_c2_f2.gif','img/bottoni_r12_c2_f2.gif','img/bottoni_r14_c2_f2.gif','img/bottoni_r16_c2_f2.gif');">
<script language="JavaScript1.2">
mmLoadMenus();
</script>
<table border="0" cellpadding="0" cellspacing="0" width="102">
<tr>
<td>[img]img/spacer.gif[/img]</td>
<td>[img]img/spacer.gif[/img]</td>
<td>[img]img/spacer.gif[/img]</td>
<td>[img]img/spacer.gif[/img]</td>
</tr>
<tr>
<td colspan="3">[img]img/bottoni_r1_c1.gif[/img]</td>
<td>[img]img/spacer.gif[/img]</td>
</tr>
<tr>
<td rowspan="16">[img]img/bottoni_r2_c1.gif[/img]</td>
<td>[img]img/bottoni_r2_c2.gif[/img]</td>
<td rowspan="16">[img]img/bottoni_r2_c3.gif[/img]</td>
<td>[img]img/spacer.gif[/img]</td>
</tr>
<tr>
<td>[img]img/bottoni_r3_c2.gif[/img]</td>
<td>[img]img/spacer.gif[/img]</td>
</tr>
<tr>
<td>[img]img/bottoni_r4_c2.gif[/img]</td>
<td>[img]img/spacer.gif[/img]</td>
</tr>
<tr>
<td>[img]img/bottoni_r5_c2.gif[/img]</td>
<td>[img]img/spacer.gif[/img]</td>
</tr>
<tr>
<td>[img]img/bottoni_r6_c2.gif[/img]</td>
<td>[img]img/spacer.gif[/img]</td>
</tr>
<tr>
<td>[img]img/bottoni_r7_c2.gif[/img]</td>
<td>[img]img/spacer.gif[/img]</td>
</tr>
<tr>
<td>[img]img/bottoni_r8_c2.gif[/img]</td>
<td>[img]img/spacer.gif[/img]</td>
</tr>
<tr>
<td>[img]img/bottoni_r9_c2.gif[/img]</td>
<td>[img]img/spacer.gif[/img]</td>
</tr>
<tr>
<td>[img]img/bottoni_r10_c2.gif[/img]</td>
<td>[img]img/spacer.gif[/img]</td>
</tr>
<tr>
<td>[img]img/bottoni_r11_c2.gif[/img]</td>
<td>[img]img/spacer.gif[/img]</td>
</tr>
<tr>
<td>[img]img/bottoni_r12_c2.gif[/img]</td>
<td>[img]img/spacer.gif[/img]</td>
</tr>
<tr>
<td>[img]img/bottoni_r13_c2.gif[/img]</td>
<td>[img]img/spacer.gif[/img]</td>
</tr>
<tr>
<td>[img]img/bottoni_r14_c2.gif[/img]</td>
<td>[img]img/spacer.gif[/img]</td>
</tr>
<tr>
<td>[img]img/bottoni_r15_c2.gif[/img]</td>
<td>[img]img/spacer.gif[/img]</td>
</tr>
<tr>
<td>[img]img/bottoni_r16_c2.gif[/img]</td>
<td>[img]img/spacer.gif[/img]</td>
</tr>
<tr>
<td>[img]img/bottoni_r17_c2.gif[/img]</td>
<td>[img]img/spacer.gif[/img]</td>
</tr>
</table>
<EMBED NAME='CS1077885590220' SRC='altro/click.wav' LOOP=false
AUTOSTART=false MASTERSOUND HIDDEN=true WIDTH=0 HEIGHT=0>
</EMBED>
</body>
![]()
Il codice è abbastanza caotico... e non capisco cosa dovrebbe fare... potresti postare uno screenshot con il risultato?
Edit: magari non è la sezione giusta, credo che dovrebbe venir spostato in scripting...
i menu a tendina
function mmLoadMenus() {
if (window.mm_menu_0123112945_0) return;
window.mm_menu_0123112945_0 = new Menu("root",70,20,"Georgia, Times New Roman, Times, serif",12,"#ffffff","#ffffff","#2c9c51","#2c9c51", "center","middle",3,1,1000,-5,7,true,true,true,0,false,false);
mm_menu_0123112945_0.addMenuItem("Acaldo","locatio n='acaldo.htm'");
mm_menu_0123112945_0.addMenuItem("Afreddo","locati on='afreddo.htm'");
mm_menu_0123112945_0.bgImageUp="img/mmmenu2_70x20_up.gif";
mm_menu_0123112945_0.bgImageOver="img/mmmenu2_70x20_over.gif";
mm_menu_0123112945_0.fontWeight="bold";
mm_menu_0123112945_0.hideOnMouseOut=true;
mm_menu_0123112945_0.bgColor='#cccccc';
window.mm_menu_0224102119_1 = new Menu("root",127,20,"Georgia, Times New Roman, Times, serif",12,"#ffffff","#ffffff","#2c9c51","#2c9c51", "center","middle",0,1,1000,-5,7,true,true,true,0,false,false);
mm_menu_0224102119_1.addMenuItem("Restaurofacciate ","location='restauro.htm'");
mm_menu_0224102119_1.addMenuItem("Canaliepluviali" ,"location='canali.htm'");
mm_menu_0224102119_1.addMenuItem("Mantidicopertura ","location='manti.htm'");
mm_menu_0224102119_1.addMenuItem("Potaturepiante", "location='potature.htm'");
mm_menu_0224102119_1.bgImageUp="img/mmmenu1_127x20_up.gif";
mm_menu_0224102119_1.bgImageOver="img/mmmenu1_127x20_over.gif";
mm_menu_0224102119_1.fontWeight="bold";
mm_menu_0224102119_1.hideOnMouseOut=true;
mm_menu_0224102119_1.bgColor='#cccccc';
mm_menu_0224102119_1.writeMenus();
} // mmLoadMenus()
vanno a finere sotto le animazioni
Puoi vedere il menù a questo link:
www.magionepiattaforme.com/bottoni.htm
perchè flash viene messo in un altro "object" prendila così...
prova a mettere il tutto in due div e settare la proprietà z-index.
...I'm insane in the brain...
Ok, ma a me funziona alla perfezione... non ho nessun inconveniente...
uso FireFox 1.5
Funziona tutto tranne quando la tendina si sovrappone con un'animazione flash...quest'ultima passa in primo piano!
(ora on line non c'è questo caso sulle mie pagine perchè mi si vede male)
Per IGUANE: per quanto riguarda il fatto di mettere tutto su 2 livelli, ci ho provato con dreamweaver, ma non funziona bene perchè la "tendina" si apre ma + in basso nella pagina, appena finito lo spazio dove si trova l'animazione.
ok allora fai così:
<table border="0" cellpadding="0" cellspacing="0" width="102">
<tr>
<td>[img]img/spacer.gif[/img]</td>
<td>[img]img/spacer.gif[/img]</td>
<td>[img]img/spacer.gif[/img]</td>
<td>[img]img/spacer.gif[/img]</td>
</tr>
a qursto pezzo di tabella è la prima in alto assegna uno z-index
<table style="z-index;2">
....
</table>
a questo aggiungi
<EMBED style="z-index:1" NAME='CS1077885590220' SRC='altro/click.wav' LOOP=false
AUTOSTART=false MASTERSOUND HIDDEN=true WIDTH=0 HEIGHT=0>
</EMBED>
prova e fammi sapere
...I'm insane in the brain...