Ver Mensaje Individual
  #1 (permalink)  
Antiguo 02/04/2008, 13:32
peckerq
 
Fecha de Ingreso: septiembre-2007
Mensajes: 14
Antigüedad: 17 años, 7 meses
Puntos: 1
Ayuda código para rotar banners sin recargar página

Buenas tardes, estoy utilizando el siguiente código que funciona perfectamente para rotar banners swf, pero necesito ayuda para que en lugar de que roté cada vez que se refresque la página, cambie de banners automaticamente cada cierto tiempo.

<SCRIPT LANGUAGE="JavaScript">
// Realizado por: Fabian Muller
// WebExperto.com - Ayuda al webmaster en español

// Comienzo
var banners = 2;
var ahora = new Date()
var segundos = ahora.getSeconds()
var ad = segundos % banners;
ad +=1;
if (ad==1) {
flash="banners/ganar.swf"
width="230";
height="315";
}
if (ad==2) {
flash="banners/mms.swf"
width="230";
height="314";
}
document.write('<center>');
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>');
document.write('</center>');
// Fin
</SCRIPT>

Agradezco su ayuda de antemano.