Foros del Web » Programación para mayores de 30 ;) » Java »

Mapa de imagen con rollover

Estas en el tema de Mapa de imagen con rollover en el foro de Java en Foros del Web. Buenos días, No sé programar en java, pero siempre me ha interesado este mundo. Sobretodo cuando las cosas me van saliendo... Hace un mes decidí ...
  #1 (permalink)  
Antiguo 19/05/2015, 01:34
 
Fecha de Ingreso: mayo-2015
Mensajes: 12
Antigüedad: 8 años, 11 meses
Puntos: 0
Mapa de imagen con rollover

Buenos días,

No sé programar en java, pero siempre me ha interesado este mundo. Sobretodo cuando las cosas me van saliendo...

Hace un mes decidí hacer una web y, mediante las plantillas asignadas he ido avanzando. También he buscado scripts extra y, modificándolos, he conseguido efectos que quería.

Pero lo que necesito ahora es algo para mi muy complicado, pero seguro que para vosotros muy fácil. He visto algunos posts abiertos con cosas muy similares, pero como soy muy inexperta, necesito que me lo den mascado!! Porque no me aclaro...

Voy al grano: tengo una imagen de fondo con un mapa de imágenes. Quisiera que, cada vez que el ratón pase por encima de una las zonas del mapa determinadas, la imagen cambie por otra. Sé que esto es un rollover o un mouseover mouseout, pero no sé cómo lo tengo que añadir.

Pongo aquí el mapa, tal y como lo tengo ahora mismo. Qué tengo que hacer para conseguir ese efecto??

<div style="position:relative; height:2500px; width:3000px; background:url(http://files.123inventatuweb.com/acens8631/image/doc050515-001.jpg) 0 0 no-repeat;">
<a style="position:absolute; top:427px; left:238px; width:332px; height:251px;" title="Sobrecampana" alt="" href="sobrecampanas" target="_self">
</a>
<a style="position:absolute; top:678px; left:394px; width:380px; height:725px;" title="Columna" alt="" href="columnas" target="_self">
</a>
<a style="position:absolute; top:342px; left:571px; width:203px; height:335px;" title="Columna" alt="" href="columnas" target="_self">
</a>
<a style="position:absolute; top:299px; left:767px; width:229px; height:401px;" title="" alt="" href="altos" target="_self">
</a>
<a style="position:absolute; top:258px; left:987px; width:209px; height:333px;" title="" alt="" href="ace" target="_self">
</a>
<a style="position:absolute; top:178px; left:1193px; width:195px; height:441px;" title="" alt="" href="arl" target="_self">
</a>
<a style="position:absolute; top:263px; left:1392px; width:270px; height:374px;" title="" alt="" href="plateros" target="_self">
</a>
<a style="position:absolute; top:328px; left:1674px; width:203px; height:368px;" title="" alt="" href="atp" target="_self">
</a>
<a style="position:absolute; top:1009px; left:773px; width:196px; height:347px;" title="" alt="" href="horno" target="_self">
</a>
<a style="position:absolute; top:965px; left:971px; width:196px; height:350px;" title="" alt="" href="bajos" target="_self">
</a>
<a style="position:absolute; top:851px; left:1173px; width:228px; height:422px;" title="" alt="" href="brl" target="_self">
</a>
<a style="position:absolute; top:964px; left:1409px; width:271px; height:378px;" title="" alt="" href="fregaderos" target="_self">
</a>
<a style="position:absolute; top:1031px; left:1688px; width:273px; height:317px;" title="" alt="" href="btp" target="_self">
</a>
Mil gracias por adelantado!
  #2 (permalink)  
Antiguo 19/05/2015, 02:14
Avatar de Xerelo  
Fecha de Ingreso: mayo-2009
Mensajes: 2.175
Antigüedad: 14 años, 11 meses
Puntos: 306
Respuesta: Mapa de imagen con rollover

Eso no es java, y es muy fácil encontrar información sobre ello

https://www.google.es/webhp?sourceid...llover%20image

http://helplogger.blogspot.com.es/20...ct-change.html
__________________
Cada vez que solucionas los problemas de alguien que no se esfuerza, piensa en que el día de mañana puede llegar a ser tu compañero de trabajo, o peor, tu jefe.
  #3 (permalink)  
Antiguo 19/05/2015, 02:28
 
Fecha de Ingreso: mayo-2015
Mensajes: 12
Antigüedad: 8 años, 11 meses
Puntos: 0
Respuesta: Mapa de imagen con rollover

Pues ya ves si tengo poca idea, que pensaba que era Java!! Entonces qué lenguaje es??

Tengo mil links donde pone cómo hacer un cambio de imagen en una única imagen, pero no sé cómo debo hacerlo para que funcione en el mapa...

He intentado añadir este código:

<a href="URL ADDRESS"><img src="URL OF THE FIRST IMAGE GOES HERE" onmouseover="this.src='URL OF THE SECOND IMAGE GOES HERE'" onmouseout="this.src='URL OF THE FIRST IMAGE GOES HERE'" /></a>

que es el que pone en el link que me has proporcionado, Xerelo, pero claro, lo he hecho así:

<a style="position:absolute; top:678px; left:394px; width:380px; height:725px;" title="Columna" alt="" href="columnas" target="_self"href="URL ADDRESS"><img src="URL OF THE FIRST IMAGE GOES HERE" onmouseover="this.src='URL OF THE SECOND IMAGE GOES HERE'" onmouseout="this.src='URL OF THE FIRST IMAGE GOES HERE'" />
</a>

Y no funciona... Supongo que me dejo muchas cosas por el camino, tan fácil no debe de ser...

Alguien más podría ayudarme, please??

Gracias!!
  #4 (permalink)  
Antiguo 19/05/2015, 02:42
Avatar de Profesor_Falken  
Fecha de Ingreso: agosto-2014
Ubicación: Mountain View
Mensajes: 1.323
Antigüedad: 9 años, 8 meses
Puntos: 182
Respuesta: Mapa de imagen con rollover

Buenas,

El lenguaje es Javascript. Existe un foro en forosdelweb especifico para ese lenguaje y quizas ahi te puedan ayudar mejor.
http://www.forosdelweb.com/f13/

El ejemplo que has cogido deberia funcionar. Eso si, donde pone URL OF THE FIRST IMAGE GOES HERE y URL OF THE SECOND IMAGE GOES HERE tienes que poner las URLs de las imagenes, claro esta.

Un saludo
__________________
If to err is human, then programmers are the most human of us
  #5 (permalink)  
Antiguo 19/05/2015, 02:54
 
Fecha de Ingreso: mayo-2015
Mensajes: 12
Antigüedad: 8 años, 11 meses
Puntos: 0
Respuesta: Mapa de imagen con rollover

Copio lo que he puesto, a ver qué he hecho mal...

<div style="position:relative; height:2500px; width:3000px; background:url(http://files.123inventatuweb.com/acens8631/image/doc050515-001.jpg) 0 0 no-repeat;">
<a style="position:absolute; top:427px; left:238px; width:332px; height:251px;" title="Sobrecampana" alt="" href="sobrecampanas" target="_self"
<img src="
http://files.123inventatuweb.com/acens8631/image/doc050515-001.jpg
" onmouseover="this.src='
http://files.123inventatuweb.com/acens8631/image/catalogoicon.jpg
'" onmouseout="this.src='
http://files.123inventatuweb.com/acens8631/image/doc050515-001.jpg
'" />

>
</a>
<a style="position:absolute; top:678px; left:394px; width:380px; height:725px;" title="Columna" alt="" href="columnas" target="_self">
</a>
<a style="position:absolute; top:342px; left:571px; width:203px; height:335px;" title="Columna" alt="" href="columnas" target="_self">
</a>
<a style="position:absolute; top:299px; left:767px; width:229px; height:401px;" title="" alt="" href="altos" target="_self">
</a>
<a style="position:absolute; top:258px; left:987px; width:209px; height:333px;" title="" alt="" href="ace" target="_self">
</a>
<a style="position:absolute; top:178px; left:1193px; width:195px; height:441px;" title="" alt="" href="arl" target="_self">
</a>
<a style="position:absolute; top:263px; left:1392px; width:270px; height:374px;" title="" alt="" href="plateros" target="_self">
</a>
<a style="position:absolute; top:328px; left:1674px; width:203px; height:368px;" title="" alt="" href="atp" target="_self">
</a>
<a style="position:absolute; top:1009px; left:773px; width:196px; height:347px;" title="" alt="" href="horno" target="_self">
</a>
<a style="position:absolute; top:965px; left:971px; width:196px; height:350px;" title="" alt="" href="bajos" target="_self">
</a>
<a style="position:absolute; top:851px; left:1173px; width:228px; height:422px;" title="" alt="" href="brl" target="_self">
</a>
<a style="position:absolute; top:964px; left:1409px; width:271px; height:378px;" title="" alt="" href="fregaderos" target="_self">
</a>
<a style="position:absolute; top:1031px; left:1688px; width:273px; height:317px;" title="" alt="" href="btp" target="_self">
</a>

Sólo lo he hecho con una referencia del mapa y con una imagen que no tiene nada que ver, pero era para probar...

Gracias de todas formas!!

Etiquetas: mapa, programa, rollover
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 11:42.