Mi idea es hacer un banner aleatorio con 3 archivos .swf, es decir, que se cambie cuando se actualice la página con http://(......).swf y que cada .swf redireccionen a un link externo.
Usando el buscador encontré este código:
Código:
El problema es que este código me muestra los .swf pero no puedo ponerles el link externo. He probado con diferentes cosas, pero no me sale. También decir que soy bastante novata. <SCRIPT LANGUAGE="JavaScript"> // Realizado por: Fabian Muller modificado por KarlanKas // WebExperto.com - Ayuda al webmaster en español // Comienzo width="300"; //Anchura del banner height="250"; //Altura del banner banners= new Array(); banners[0]="http://archivo.swf"; banners[1]="http://archivo.swf"; banners[2]="http://archivo.swf"; totalbanners = banners.length; var ahora = new Date() var segundos = ahora.getSeconds() var ad = segundos % totalbanners; seleccionado=banners[ad]; localizador=seleccionado.lastIndexOf('.'); localizador2=localizador+4 extension=seleccionado.substring(localizador+1,localizador2); archivo=seleccionado.substring(0,localizador); document.write("<center>"); if (extension=="swf"){ flash=seleccionado; 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('<img src='+seleccionado+' width='+width+' height='+height+'>'); document.write('</center>');} // Fin </SCRIPT>
Me gustaría modificar el código para que se muestren los .swf pero que al clicar encima me redireccione a un link en una página nueva.
Gracias :)