Ver Mensaje Individual
  #16 (permalink)  
Antiguo 17/07/2008, 00:47
Avatar de KarlanKas
KarlanKas
Moderador extraterrestre
 
Fecha de Ingreso: diciembre-2001
Ubicación: Madrid
Mensajes: 6.987
Antigüedad: 22 años, 5 meses
Puntos: 61
Respuesta: galeria en jpg

Vamos a ver:

Aunque no lo creas (y aunque esté mal el que yo lo diga), soy una persona paciente y educada. Simplemente mostré mi malestar por el bombardeo de comunicaciones al cual me sometiste. Me dió la impresión de que tenía que contestarte sí o sí, como si tuviera que esta a tu servicio. Pero no quiero echar más leña al fuego.

Sé que para tí tu problema es importante, pero date cuenta de que uno contesta cuando puede y no cuando se le impone. No te voy a llamar. Creo que será más fácil hacerlo por aquí. A todos los que he ayudado (dos o tres) lo he hecho por aquí y hasta me lo han agradecido.

Y lo que más rabia me da es que tú obtendrás un beneficio de lo que preguntes y de tí sólo estoy obteniendo insultos.

La utilización del script es bien sencilla y parece que tú no lo has terminado de entender. Mira:

Código:
<html>
<head>
<script>

// Noticiero rotante para Foros del Web
// Hecho por KarlanKas

var noticiero=new Array();
var imagenDefecto="http://www.karlankas.net/chufa2.jpg"; //Imagen que aparecerá en caso de que la imagen indicada no exista.
var pepe;
var espera=5 //Segundos de espera
var b=0;

// Pon las noticias de la siguiente forma: noticia(ruta de imagen,titulo,texto,enlace a la noticia)
//AQUÍ DEBES HACER EL BUCLE CON LOS DATOS QUE SACAS DE LA BASE DE DATOS
<?
while($row=mysql_fetch_array($consulta)){ //Aquí depende de como hagas el bucle
?>
noticia("<?=$row['imagen'];?>","<?=$row['titulo'];?>","<?=$row['texto'];?>","<?=$row['enlace'];?>");
<?
}?>

function noticia(imagen,titulo,texto,enlace){
	noticiero.push({
					imagen:imagen,
					texto:texto,
					titulo:titulo,
					enlace:enlace
	});
}

function obj(x){
return document.getElementById(x);
}

function mostrar(a){
obj('cuadro').style.visibility='hidden';
obj("imagen_noticia").src=noticiero[a].imagen;
obj("titulo_noticia").innerHTML=noticiero[a].titulo;
obj("texto_noticia").innerHTML=noticiero[a].texto;
obj("enlace").href=noticiero[a].enlace
}


function cambiar(incr){
b=(noticiero.length>b+incr)?b+incr:0;
if(b==-1){b=noticiero.length-1;}
mostrar(b);
}


function inicio(){
pepe=setInterval("cambiar(1)",espera*1000);
}

</script>
<style>
#imagen_noticia{
float:left;
}
#cuadro{
visibility:hidden;
}
</style>
<title>Noticiero</title>
</head>

<body onload="inicio();mostrar(0);">
<div id="cuadro">
<table width="340" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="top" class="blanco_menu" id="titulo_noticia"> </td>
</tr>
<tr>
<td height="10" align="center" valign="top">&nbsp;</td>
</tr>
<tr>
<td align="center" valign="top"><div align="center"><img src="" id="imagen_noticia" width="164" height="178" /></div></td>
</tr>
<tr>
<td align="center" valign="top"> <div align="justify" class="blanco_menu" id="texto_noticia"> </div></td>
</tr>
<tr>
<td align="center" valign="top" class="blanco_menu"><a href="#" id="enlace">leer noticia</a> </td>
</tr>
<tr>
<td align="center" valign="top" class="blanco_menu"><a href="#" onclick="clearInterval(pepe);cambiar(-1);inicio()">Anterior</a> | <a href="#" onclick="clearInterval(pepe)">Pausa</a> | <a href="#" onclick="clearInterval(pepe);cambiar(1);inicio()">Siguiente</a></td>
</tr>
</table>
</body>
</html>
Y ya está. No necesitas más. Espero que te sirva y te calmes un poquito.
__________________
Cómo escribir

No hay pregunta tonta, sino tonto que quiere seguir en la ignorancia.