Ver Mensaje Individual
  #245 (permalink)  
Antiguo 06/11/2006, 14:00
paulkees
 
Fecha de Ingreso: octubre-2004
Mensajes: 768
Antigüedad: 19 años, 6 meses
Puntos: 3
Rotador de Banners que acepta swf, gif y texto.

P: ¿Cómo puedo realizar un rotador de banners que acepte swf, gif y texto?
R: Aqui tienes un script que funciona perfectamente!!!
Creditos: Realizado por Fabian Muller y modificado por "djreficul" y una pequeña ayuda de "paulkees" para ForosdelWeb.com

Código HTML:
<html> <head> <title>Selección de Banners Aleatorios</title> </head> <body> <SCRIPT LANGUAGE="JavaScript"> // Realizado por: Fabian Muller y modificado por "djreficul" y una muy pequeña ayudita de "paulkees" de ForosdelWeb.com  // Comienzo var banners = 3; var ahora = new Date() var segundos = ahora.getSeconds() var ad = segundos % banners; ad +=1; if (ad==1) { flash="images/banners/240x74_anuncio.swf" width="295"; height="90"; } if (ad==2) { flash="images/bantrigoban.gif" width="289"; height="100"; url="http://www.rawk.com.ar"; txt="¡Conoce rawk.com.ar ahora!"; } if (ad==3) { flash="images/banners/foros_295x80.swf" width="295"; height="80"; } temp=flash.split("."); extension=temp[(temp.length-1)]; document.write('<center>'); if (extension=='swf') { document.write('<OBJECT CLASSID=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=' + width + ' height=' + height + ' CODEBASE=\"http://active.macromedia.com/flash4/cabs/swflash.cab#version=4,0,0,0\">'); document.write('<PARAM NAME=\"MOVIE\" VALUE=\"' + flash + '\">'); document.write('<PARAM NAME=\"PLAY\" VALUE=\"true\">'); document.write('<PARAM NAME=\"LOOP\" VALUE=\"true\">'); document.write('<PARAM NAME=\"QUALITY\" VALUE=\"high\">'); document.write('<EMBED SRC=' + flash + ' width=' + width + ' height=' + height + ' PLAY=\"true\" LOOP=\"true\" QUALITY=\"high\" PLUGINSPAGE=\"http://www.macromedia.com/shockwave/download/index.cgi? P1_Prod_Version=ShockwaveFlash\">'); document.write('</EMBED>'); document.write('</OBJECT>'); } else { document.write('<a href=\"' + url + '\" target=\"_blank\">'); document.write ('<img src="'+flash+'" width="'+width+'" height="'+height+'" border="0">'); document.write('<center><small>' + txt + '</small></center></a>'); } document.write('</center>'); // Fin </SCRIPT> </body> </html>