Ver Mensaje Individual
  #9 (permalink)  
Antiguo 15/09/2005, 10:14
furoya
(Desactivado)
 
Fecha de Ingreso: noviembre-2002
Ubicación: Ciudad Autónoma de Buenos Aires
Mensajes: 2.367
Antigüedad: 21 años, 6 meses
Puntos: 317
Hola crazyandmaniac :

Veamos un poco.

La línea que dice
Código:
 
if (navigator.appVersion.indexOf("Win")>=0 && parseFloat(navigator.appVersion.substr(navigator.a ppVersion.indexOf("MSIE ")+5))>=5)
es para que solamente funcione en IE

La que dice

Código:
 
else{
document.write('<a target="_blank" href="' + clickThrough + '"><img border="0" src="' + imgPath + '" width="468" height="60" alt="' + altText + '"></a>');
}
es lo que va a aparecer en los otros navegadores. Es decir, solamente una imagen como enlace.

Si la imagen no aparece es porque las variables

Código:
            var adMousedOver_0 = 0;
            var move_pixel_0 = 5;
            var move_interval_0 = 10;
            var expanded_height_0 = 560;
            var roll_down_0;
            var roll_up_0;
            var clipped_0 = 60;
            var oImg_0;
            var altText;
            var clickThrough;
            var imgPath;
deberían ser globales (para las dos opciones : IE y los demás), pero estan dentro de la condición que es solamente para IE, y la otra "no las ve". Lo mismo ocurre cuando le asignas la ruta de la imagen el texto alternativo ...

El código debería ser más o menos así

Código:
 

<html>
<head>

<SCRIPT language=javascript>
            var adMousedOver_0 = 0;
            var move_pixel_0 = 5;
            var move_interval_0 = 10;
            var expanded_height_0 = 560;
            var roll_down_0;
            var roll_up_0;
            var clipped_0 = 60;
            var oImg_0;
            var altText;
            var clickThrough;
            var imgPath;

if (navigator.appVersion.indexOf("Win")>=0 && parseFloat(navigator.appVersion.substr(navigator.appVersion.indexOf("MSIE ")+5))>=5)
{

            altText = "TEXTO ALTERNATIVO------------------->";
            clickThrough = "http://www.INTERALIA.NET";
            imgPath = "http://www.metal-extreme.com/images/bands/cradle.jpg";
            //imgPath = "space.gif";
            function adDoDrop_0(obj){
                        adtechhideElement_0();
                        oImg_0 = obj;
                        if(roll_up_0!=null){window.clearInterval(roll_up_0  );}
                        roll_down_0 = window.setInterval("adRollDown_0()", move_interval_0);
            }
            function adRollDown_0(){
                        clipped_0 += move_pixel_0;
                        if(clipped_0 < expanded_height_0){
                                    oImg_0.style.clip='rect(auto, auto, ' + clipped_0 + ', auto)';
                        }else{
                                    oImg_0.style.clip='rect(auto)';
                                    window.clearInterval(roll_down_0);
                                    clipped_0 = expanded_height_0;
                        }
            }
            function adUnDoDrop_0(obj) {
                        adtechshowElement_0();
                        oImg_0 = obj;
                        if(roll_down_0!=null){window.clearInterval(roll_down_0);}
                        roll_up_0 = window.setInterval("adRollUp_0()", move_interval_0);
            }
             function adRollUp_0(){
                        if (clipped_0 > move_pixel_0){
                                    clipped_0 -= move_pixel_0;
                        }
                        if(clipped_0 > 60){
                                    oImg_0.style.clip='rect(auto, auto, ' + clipped_0 + ', auto)';
                        }else{
                                    oImg_0.style.clip='rect(auto, auto, 60, auto)';
                                    window.clearInterval(roll_up_0);
                                    clipped_0 = 60;
                        }
            }
   document.write('<div id="1" style="position:absolute; height:60; width:464;"><table border="0" bgcolor="#FFFFFF" cellpadding="0" cellspacing="0" style="position:absolute; clip:rect(auto, auto, 60, auto);z-index:200;" onmouseover="adDoDrop_0(this);" onmouseout="adUnDoDrop_0(this);"><tr><td><a target="_blank" href="' + clickThrough + '">');

   //<--//object
    document.write('<div id="2" style="position: absolute; height:100%; width:100%;"');
   document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'");
   document.write("id='flashhome' width='597' height='215' align='' title='has flash'>");
   document.write("<param name='movie' value='banner.swf'><param name='play' value='true'>");
   document.write("<param name='loop' value='false'><param name='quality' value='high'>");
   document.write("<param name='menu' value='true'><param name='bgcolor' value='#333333'>");
   document.write("<embed src='banner.swf' play='true' loop='false' quality='high' menu='true' bgcolor='#333333'");
   document.write(" swLiveConnect='false' width='597' height='215' name='flashhome' align=''");
   document.write(" type='application/x-shockwave-flash'>");
   document.write("</embed></object>");
   //document.write( '<img border="0" width="468" src="' + imgPath + '" alt="' + altText+'height="1" width="1">');
   //object-->
   document.write('<onmouseover="document.cktrackingimg_0.src=\'http://\'" /></a></td></tr></table></div>');



   }else{
            altText = "TEXTO ALTERNATIVO------------------->";
            clickThrough = "http://www.INTERALIA.NET";
            imgPath = "http://www.metal-extreme.com/images/bands/cradle.jpg";

document.write('<a target="_blank" href="' + clickThrough + '"><img border="0" src="' + imgPath + '" width="468" height="60" alt="' + altText + '" /></a>');
}
//document.close();
function adtechhideElement_0() {
for (i = 0; i < document.getElementsByTagName("SELECT").length; i++){obj = document.getElementsByTagName("SELECT")[i]; if (! obj || ! obj.offsetParent) continue; obj.style.visibility = "hidden";}
for (i = 0; i < document.all.tags('OBJECT').length; i++){obj = document.all.tags('OBJECT')[i]; if (! obj || ! obj.offsetParent) continue; obj.style.visibility = "hidden";}
for (i = 0; i < document.all.tags('APPLET').length; i++){obj = document.all.tags('APPLET')[i]; if (! obj || ! obj.offsetParent) continue; obj.style.visibility = "hidden";}
}
function adtechshowElement_0() {
for (i = 0; i < document.getElementsByTagName("SELECT").length; i++){obj = document.getElementsByTagName("SELECT")[i]; if (! obj || ! obj.offsetParent) continue; obj.style.visibility = "";}
for (i = 0; i < document.all.tags('OBJECT').length; i++){obj = document.all.tags('OBJECT')[i]; if (! obj || ! obj.offsetParent) continue; obj.style.visibility = "";}
for (i = 0; i < document.all.tags('APPLET').length; i++){obj = document.all.tags('APPLET')[i]; if (! obj || ! obj.offsetParent) continue; obj.style.visibility = "";}
}
</SCRIPT> 
</head>
<body>

</body>
</html>
Ajustando el tamaño, ruta, y otros de las imágenes que uses.

saludos

furoya

NOTA: no olvides corregir esos 'doble espacio' que pone el editor del foro en el código.