Funziona.
<script src="oggetto.js"></script> <script> function crea(){ for(var n=0;n<document.getElementsByTagName("img").length;n++) { var DivId=document.getElementsByTagName("img")[n].id; window[DivId] = new oggetto(DivId); } } function clic(e){ window[e.currentTarget.id].muovi(1,1,1,500,700); } function over(e){ window[e.currentTarget.id].inter(); } </script> <body onLoad="crea();"> <img id="ciccio" style="width:50px;height:50px;position:absolute;top:0px" src="pallone.gif" onClick="clic(event)" onMouseOver="over(event)"> <img id="pippo" style="width:50px;height:50px;position:absolute;top:100px" src="pallone.gif" onClick="clic(event)" onMouseOver="over(event)"> <img id="mimmo" style="width:50px;height:50px;position:absolute;top:200px" src="pallone.gif" onClick="clic(event)" onMouseOver="over(event)"> </body>
Nessun commento:
Posta un commento