Back to Graphic Object
Up to Table of Contents
Ahead to List Box Object

Hotspot Object

The Hotspot object lets you set up a transparent, interactive area on a page. In effect, it functions as a transparent Push Button. Use the Hotspot button to draw Hotspot objects. The button appears as follows:

Hotspot Appearance

Although Hotspot objects are not visible at runtime, they appear as horizontally lined rectangles within the Page Layout Editor.

Also, you can use the object's Feedback property to provide visual information that indicates the object's size and position. For example, setting the Feedback property to Outline causes an outline to appear around the border of the object when the user moves the cursor over it.

Hotspot Object Interactivity

A user can interact with a Hotspot object in several ways.

For more information on available events, see the section entitled "Hotspots Object Methods, Properties and Events."

The Hotspot Object's Visible Property

Although the Hotspot object is never visible at run time, like many other objects, the Hotspot object has a Visible property. Remember that for Button objects, not only does the Visible property remove an object from view, but it also makes it so the user cannot click on it. The Visible property for the Hotspot object is best thought of as controlling whether or not the Hotspot is visible to the mouse. If it's not visible to the mouse, then the user can't click on it.

Lesson: Hotspot Object

This lesson uses a Graphic object, two Text objects and two Hotspots. The Graphic object displays a graphic of Africa with two horizontal lines through it (one represents the Equator and one represents the Tropic of Cancer). Each horizontal line has a Hotspot over it. When the user places the cursor on Hotspot1, which is over the Equator, a Text object (previously not visible) displays the text "Equator." When the user moves the cursor off of Hotspot1, the Text object becomes invisible again. Similarly, when the user places the cursor on the other Hotspot, a Text object displays the text "Tropic of Cancer."

Note: A completed version of this lesson, called lesn_12, is located in the \Jamba\lessons directory.

Use the Properties tab to set the file you want to display.

Next, you'll draw a Hotspot object over the topmost dotted line in the graphic.

Now draw the Text object that will display the label for the Tropic of Cancer.

The Text Properties dialog box appears.

The Text object appears similar to the following:

Now you'll set Text1's Visible property to False so that initially, the object is not seen.

Note that the object is still visible in the Page Layout Editor so that you can manipulate it if necessary. Because Text2 will be very similar to Text1, you will now create Text2 by making a copy of Text1.

This copies Text1 to the Clipboard.

A new Text object called Text2 is pasted directly on top of Text1.

Note that Text2's Visible property is already set to False because this setting was copied from Text1. Next, you'll finish setting up Hotspot1 so that it shows and hides Text1 as planned.

First you will set up the object's To Do List so that as soon an Enter event occurs (that is, as soon as the user moves the cursor over the Hotspot), Text1's Visible property is reset to True.

Whenever an Enter event occurs on the Hotspot, Text1 will appear. Now you'll set up the Leave event so that Text1 disappears again when the cursor moves off of Hotspot1.

Whenever a Leave event occurs on the Hotspot, Text1 will disappear. Hotspot1 is complete so you'll make a copy of it called Hotspot2.

A new Hotspot object called Hotspot2 is pasted directly on top of Hotspot1.

Right now, the Enter and Leave events are set up so that Hotspot2 (like Hotspot1) shows and hides Text1. You'll make two minor changes so that Hotspot2 changes Text2 instead.

The Enter event To Do List contains an item identical to the To Do List for Hotspot1. It sets Text1 to be visible. You need to change this so that Hotspot2 sets Text2 to be visible instead.

Now do the same for the Leave event for Hotspot2.

The application is complete.