PDA

View Full Version : Hotspot


Cummins
08-04-2006, 04:48 AM
Hi all

I placed a hotspot on a large image. The size of the hotspot is quite small, 85x16. When the mouse is placed on the hotspot, I want it to load an image of the same size and disload when mouse leaves it. The problem is that it loads the image at the same size of the large image, which is much bigger than than it should be.

On Enter
Image.Load("Large Image", "AutoPlay\\Images\\Products.jpg");

On Leave
Image.Load("Large Image", "AutoPlay\\Images\\Large Image.jpg");

Is there any way of dealing with this issue or this is the way it is?

Roboblue
08-04-2006, 08:30 AM
Here is an idea
Don't have a hotspot and don't do image load actions at all.
Put both the Large Image.jpg and Products.jpg on the page in the positions you need them. Set the Large Image properties to visible, set the Products image properties to not visible.
On the Large Image-On Enter event, put
Image.SetVisible("Large Image", false);
Image.SetVisible("Products", true);
On the Products-On Leave event, put
Image.SetVisible("Large Image", true);
Image.SetVisible("Products", false);

Cummins
08-04-2006, 09:20 AM
Roboblue

Thanks for your help. However, your idea is not applicable in my project as things are quite different than what I wrote above. Large Image is a vertical rectangle serving as a menu bar with a few labels in it. They are all named with page names. Because I want all this stuff to fade in and out when doing page jump (in normal circumstances we cannot do it you know) I used a software with screen capture utility and captured this plugin with the labels in it and saved as Jpeg. Now it is a useless image. The only way I can bring some parts (label parts) of this large image to life is to place a few hotspots on some dead spots. In my case, the small image I wanted to load (products) was actually a cropped label image but in another colour. So when you place your mouse on a hotspot it will not only jump to another page but also change the colour of this particular dead spot. Now I hope you get the picture.

In the light of this lecture any suggestions? :)

holtgrewe
08-04-2006, 11:04 AM
If I understand the problem correctly:
(highlighting different areas of a large image)

You will need to create the smaller 'cropped image' directly over the large image where it will to be displayed - make it non-visible after aligning.

The hot spot will be located directly over the smaller image.

On mouse-over make the smaller image visible.
On mouse-leave make the smaller image non-visible.

I hope this helps and I'm not way off target from what your trying to solve.

Cummins
08-05-2006, 03:26 AM
I tried what you suggested before. The problem is that I dont want to display any cropped image on the large one as it causes some undesired effects in fading in/out. There will be nothing on the large image but only few hotspots acting as buttons. I think I will have to omit the rollover colours and let the hotspots do page jumps only.