Alliedassault           
FAQ Calendar
Go Back   Alliedassault > Lounge > Offtopic
Reload this Page HTML / Image question
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.

Reply
 
Thread Tools Display Modes
HTML / Image question
Old
  (#1)
Bazooka_Joe is Offline
Senior Member
 
Posts: 12,585
Join Date: Jan 2002
Location: Staten Island, NY, USA
 Send a message via ICQ to Bazooka_Joe Send a message via AIM to Bazooka_Joe Send a message via MSN to Bazooka_Joe Send a message via Yahoo to Bazooka_Joe  
Default 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?
  
Reply With Quote
Old
  (#2)
Bleuachdu is Offline
Senior Member
 
Posts: 2,345
Join Date: Apr 2002
Location: Detroit, MI
  Send a message via AIM to Bleuachdu  
Default 02-18-2003, 03:21 PM

Yep
  
Reply With Quote
Old
  (#3)
Zoner is Offline
Administrator
 
Zoner's Avatar
 
Posts: 17,739
Join Date: Apr 2002
Location: Camp Crystal Lake
   
Default 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


http://www.fpsgameforums.com/forums/image.php?type=sigpic&userid=5399&dateline=1213387  247
  
Reply With Quote
Old
  (#4)
Bazooka_Joe is Offline
Senior Member
 
Posts: 12,585
Join Date: Jan 2002
Location: Staten Island, NY, USA
 Send a message via ICQ to Bazooka_Joe Send a message via AIM to Bazooka_Joe Send a message via MSN to Bazooka_Joe Send a message via Yahoo to Bazooka_Joe  
Default 02-18-2003, 04:10 PM

Quote:
Originally Posted by Bleuachdu
Yep
Gee tnx. hake:
  
Reply With Quote
Old
  (#5)
Bleuachdu is Offline
Senior Member
 
Posts: 2,345
Join Date: Apr 2002
Location: Detroit, MI
  Send a message via AIM to Bleuachdu  
Default 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.
  
Reply With Quote
Old
  (#6)
Zoner is Offline
Administrator
 
Zoner's Avatar
 
Posts: 17,739
Join Date: Apr 2002
Location: Camp Crystal Lake
   
Default 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


http://www.fpsgameforums.com/forums/image.php?type=sigpic&userid=5399&dateline=1213387  247
  
Reply With Quote
Old
  (#7)
Bazooka_Joe is Offline
Senior Member
 
Posts: 12,585
Join Date: Jan 2002
Location: Staten Island, NY, USA
 Send a message via ICQ to Bazooka_Joe Send a message via AIM to Bazooka_Joe Send a message via MSN to Bazooka_Joe Send a message via Yahoo to Bazooka_Joe  
Default 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!
  
Reply With Quote
Old
  (#8)
Old Reliable is Offline
Senior Member
 
Posts: 11,144
Join Date: Mar 2002
   
Default 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.......
  
Reply With Quote
Old
  (#9)
--{MTE}--Mjr.Bob is Offline
Member
 
Posts: 66
Join Date: Oct 2002
Location: none
  Send a message via AIM to --{MTE}--Mjr.Bob Send a message via MSN to --{MTE}--Mjr.Bob Send a message via Yahoo to --{MTE}--Mjr.Bob  
Default 02-19-2003, 08:10 AM

I use Imagemapic, its free and you can download it from here: http://www.snowblind.net/download.asp?q=imagemapic
  
Reply With Quote
Old
  (#10)
Bazooka_Joe is Offline
Senior Member
 
Posts: 12,585
Join Date: Jan 2002
Location: Staten Island, NY, USA
 Send a message via ICQ to Bazooka_Joe Send a message via AIM to Bazooka_Joe Send a message via MSN to Bazooka_Joe Send a message via Yahoo to Bazooka_Joe  
Default 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:
  
Reply With Quote
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



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.