Help with Hot Spot

T

Todd

I'm using FP 2000 on Win XP. I want to add multiple
hotspots to an image, but I want them to grow/shrink with
the picture (in different screen resolutions). Is there
anyway I can accomplish this? Any help would be greatly
appreciated!
 
J

Jim Buyens

-----Original Message-----
I'm using FP 2000 on Win XP. I want to add multiple
hotspots to an image, but I want them to grow/shrink
with the picture (in different screen resolutions). Is
there anyway I can accomplish this? Any help would be
greatly appreciated!

How are you going to grow or shrink the picture in
response to different screen resolutions?

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
 
S

Stefan B Rusynko

No
- since hotspots use absolute positioning

--




| I'm using FP 2000 on Win XP. I want to add multiple
| hotspots to an image, but I want them to grow/shrink with
| the picture (in different screen resolutions). Is there
| anyway I can accomplish this? Any help would be greatly
| appreciated!
|
 
S

Stefan B Rusynko

100% of image sizing means 100% of the original image size

--




| I have the picture set to 100% inserted in a cell.
|
| >-----Original Message-----
| >>-----Original Message-----
| >>I'm using FP 2000 on Win XP. I want to add multiple
| >>hotspots to an image, but I want them to grow/shrink
| >>with the picture (in different screen resolutions). Is
| >>there anyway I can accomplish this? Any help would be
| >>greatly appreciated!
| >
| >How are you going to grow or shrink the picture in
| >response to different screen resolutions?
| >
| >Jim Buyens
| >Microsoft FrontPage MVP
| >http://www.interlacken.com
| >Author of:
| >*----------------------------------------------------
| >|\---------------------------------------------------
| >|| Microsoft Office FrontPage 2003 Inside Out
| >||---------------------------------------------------
| >|| Web Database Development Step by Step .NET Edition
| >|| Microsoft FrontPage Version 2002 Inside Out
| >|| Faster Smarter Beginning Programming
| >|| (All from Microsoft Press)
| >|/---------------------------------------------------
| >*----------------------------------------------------
| >
| >.
| >
 
J

Jim Buyens

Todd said:
I have the picture set to 100% inserted in a cell.

Curious, but it does seem to work.

I think you would have to add an onclick= attribute to your picture
and make it call a JavaScript function that tested the event.clientX
event.clientY properties. These will give you the X and Y coordinates
of the mouse click measured from the top left corner of the picture.

The first trick, of course, it to figure out whether the browser
measures
these coordinates within the original image coordinates, or within the
stretched coordinates.

Then, if event.clientX and event.clientY return stretched
measurements,
you have to reduce them by the current magnification factor. To get
this factor, you'd have to get, say, the picture's current screen
width, and divide it by the original width. (CSS has properties tht
return these values at run time.)

Then, you'd have to test whether these coordinates fell within an area
you choose to consider a hotspot. This wouldn't be too bad for
rectangular hotspots: you just determine whether the x coordinate and
the y coordinate of the click both fall within some range. But to test
whether the mouse click fell within a circular and polygonal area,
you'd need to drag out your old trigonometry textbook.

Hopefully, this is enough information to either (1) give you a start
or (2) make you give up.

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top