Offtopic Any topics not related to the games we cover. Doesn't mean this is a Spam-fest. Profanity is allowed, enter at your own risk. |
 HTML / Image question |
|
|
Senior Member
Posts: 12,585
Join Date: Jan 2002
Location: Staten Island, NY, USA
|
HTML / Image question -
02-18-2003, 03:16 PM
I have an image (1024X768) and I want to use it as a hyperlink. Now, I don't want the whole image used as a hyperlink, just a certian peice. I know there is a way to "draw" a hyperlink around a certian part of an image, making the rest of it NOT linked. Anyone know how to do this?
|
|
|
 |
|
|
Senior Member
Posts: 2,345
Join Date: Apr 2002
Location: Detroit, MI
|

02-18-2003, 03:21 PM
Yep
|
|
|
 |
|
|
Administrator
Posts: 17,739
Join Date: Apr 2002
Location: Camp Crystal Lake
|

02-18-2003, 03:32 PM
You need to make the pic into an imagemap. Just do a web search for free image map programs...there should be lots of 'em.
Zone
|
|
|
 |
|
|
Senior Member
Posts: 12,585
Join Date: Jan 2002
Location: Staten Island, NY, USA
|

02-18-2003, 04:10 PM
Quote:
Originally Posted by Bleuachdu
Yep
|
Gee tnx. hake:
|
|
|
 |
 |
|
|
Senior Member
Posts: 2,345
Join Date: Apr 2002
Location: Detroit, MI
|

02-18-2003, 04:16 PM
You can straight up do it in HTML.
First you need to use the tag <MAP> and name it.
[code:bc76e] <MAP NAME="joe"> [/code:bc76e]
Next you need to figure out which shape, coordinates you want maped, and linked using the <AREA> tag. There are 3 variables you'll need in the <AREA> tag: SHAPE, COORDS, HREF.
[code:bc76e]<AREA SHAPE="" COORDS="," HREF="">[/code:bc76e]
The SHAPE tag also has 3 variables: RECT, CIRCLE, POLYGON. Using SHAPE=RECT will give you a rectangle, SHAPE=CIRCLE will give you a cirlce using a specified radius and location and the SHAPE=POLYGON will yield a multisided user-defined shape.
[code:bc76e]<AREA SHAPE="CIRCLE" COORDS=",," HREF="">[/code:bc76e]
The COORDS tag dictates where the chosen SHAPE will be drawn on the image in a standard X,Y fashion. Use photoshop or some other photo editing program to figure out which coordinates you will use. The RECT variable requires you place the Top Left Corner and Bottom Right hand corner coordinates in that order in the <AREA COORDS=> tag. The CIRCLE variable require you to place a center point and radius in that order in the <AREA COORDS=> tag. The POLYGON again requires you to put in the Top Left and Bottom right coordinates, but in this case you can put in multiple points in between.
[code:bc76e]
<AREA SHAPE="RECT" COORDS="50,50,30,30" HREF="">
<AREA SHAPE="CIRCLE" COORDS="100,100,15" HREF="">
<AREA SHAPE="POLYGON" COORDS="125,110,100,100,39,48,125,10" HREF="">
[/code:bc76e]
Finally, the HREF variable allows you to link the map to a certain area. use this just as you would use it in the Anchor <A> tag. You can use direct and indirect links.
[code:bc76e]
<AREA SHAPE="RECT" COORDS="50,50,30,30" HREF="http://www.teamaftermath.com">
<AREA SHAPE="CIRCLE" COORDS="100,100,15" HREF="http://www.alliedassault.com">
<AREA SHAPE="POLYGON" COORDS="125,110,100,100,39,48,125,10" HREF="#Forums">
[/code:bc76e]
Now that you've made an image map, you need to make it work with an image. The HTML you've created will do nothing unless you make it work with something else. To do this for an image, use the <IMG> tag as normal, and place the USEMAP="" variable inside the tag. A # should be placed in front of the map name.
[code:bc76e] [img]http://www.teamaftermath.com/images/insultpics/stfu.jpg[/img][/code:bc76e]
Now to put it all together....
[code:bc76e]
<MAP NAME="joe">
<AREA SHAPE="RECT" COORDS="50,50,30,30" HREF="http://www.teamaftermath.com">
<AREA SHAPE="CIRCLE" COORDS="100,100,15" HREF="http://www.alliedassault.com">
<AREA SHAPE="POLYGON" COORDS="125,110,100,100,39,48,125,10" HREF="#Forums">
</MAP>
[img]http://www.teamaftermath.com/images/insultpics/stfu.jpg[/img]
[/code:bc76e]
There ya go, that should do it. Note that I made up all of those coordinates, they probably aren't logical and won't work.
|
|
|
 |
|
|
Administrator
Posts: 17,739
Join Date: Apr 2002
Location: Camp Crystal Lake
|

02-18-2003, 04:17 PM
Ya, that would work, but an imagemapping app will automate all that for you and spit out the html.
Zone
|
|
|
 |
|
|
Senior Member
Posts: 12,585
Join Date: Jan 2002
Location: Staten Island, NY, USA
|

02-18-2003, 05:02 PM
Quote:
Originally Posted by Zoner91
Ya, that would work, but an imagemapping app will automate all that for you and spit out the html.
Zone
|
I guess either way will work. Bleu, appriciate it. I really wanted to know the tags! Zoner the proggie looks cool, I'll look into it sometime today. Thx guys!
|
|
|
 |
|
|
Senior Member
Posts: 11,144
Join Date: Mar 2002
|

02-18-2003, 06:48 PM
it is easier if you just crop out a part of the image in paint and then use that as the hyperlink.......
|
|
|
 |
|
|
Senior Member
Posts: 12,585
Join Date: Jan 2002
Location: Staten Island, NY, USA
|

02-21-2003, 08:01 PM
Bleu, your method worked perfectly, thank you! Those proggies are pretty buggy, they don't export the code properly. biggrin:
|
|
|
 |
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Powered by vBulletin® Version 3.8.12 by ScriptzBin Copyright ©2000 - 2025, vBulletin Solutions Inc.
vBulletin Skin developed by: vBStyles.com

© 1998 - 2007 by Rudedog Productions | All trademarks used are properties of their respective owners. All rights reserved.
|