The QuickTime 4.1 URL Hot Spot Bug
and Recommended Workarounds

On Thursday, January 20, 2000, Apple Computer released QuickTime 4.1 with a serious bug that affected the way the QuickTime browser plugin handles URL hot spots. As of this writing (February 5th), Apple still has not offered a version of QuickTime 4.1 that corrects this bug, which means hundreds of thousands (if not millions) of users will be affected. There are some workarounds that web scripters can take that make their QTVR web media with URL hot spots work correctly, but it is not widely known. This page will describe these workarounds that not only avoid the problem caused by the bug, but preserves the effectiveness of URL hot spots for earlier versions of QuickTime as well.

The Nature of the Bug

A hot spot is a transparent region on a QTVR movie that allows different actions to take place when the cursor rolls over it or when someone clicks on it. URL hot spots are designed to load a new web page when they are clicked on. URL hot spots are given a hot spot ID number between 1 and 254. The ID numbers are specified by a HOTSPOT parameter in the <EMBED> tag where the web page to be launched by the mouse click is defined. For instance, if you wish to have the page Next.html launch when someone clicks on hot spot 5 in your QTVR movie named Atrium.mov, your EMBED tag might look like this:

<EMBED SRC="Movies/Atrium.mov" WIDTH=320 HEIGHT=240 HOTSPOT5="../Next.html"></EMBED>

The URL hot spot bug in QuickTime 4.1 is a "one off" programming error. It causes the QuickTime plugin to interpret the hot spot ID in the EMBED tag as being one number higher. If you have the buggy QuickTime 4.1 installed on your computer, clicking on the hot spot with ID 5 in Atrium.mov will cause the plugin to look for the HOTSPOT6 parameter. In this example, the HOTSPOT6 parameter isn't there, so nothing happens when you click on it. If there had been a hot spot with ID 6, clicking on it would launch Next.html.

Workaround Number 1

The first, obvious, solution is to simply double up on your HOTSPOT parameters, writing each HOTSPOT a second time in you EMBED tags, only using an ID number that is one higher. To make the example above QT 4.1 safe, the amended EMBED tag looks like this:

<EMBED SRC="Movies/Atrium.mov" WIDTH=320 HEIGHT=240
HOTSPOT5="../Next.html"
HOTSPOT6="../Next.html"
></EMBED>

Unfortunately, if you have two or more hot spots in your movie that are consecutive, then this particular workaround will not apply. VR Toolbox PanoWorx and ObjectWorx both generate consecutive hot spot IDs by default, so it is likely that this workaround won't apply to QTVR movies with more than one hot spots made with them. QuickTime VR Authoring Studio assigns hot spot IDs randomly, so this approach will be applicable to most QTVR movies made with it.

It is possible to change the hot spot IDs assigned by all of these applications, but you have to do it at the time the movies are created. You will need to remake old movies with consecutive hot spot IDs.

Plugin Helper EMBED Data

Using Apple's PlugInHelper freeware application or VRTool's ConVRter program, it is possible to put the HOTSPOT parameters into the QTVR movie data. (See Simulating QTVR Scenes on the Web Using PlugInHelper or ConVRter.) Unfortunately, the QT 4.1 URL hot spot affects such Plugin Helper parameters the same way it does in the HTML EMBED tag. The workaround number 1 method of doubling up on the HOTSPOT parameters will also work for such embeded movie data, but it requires making the amendments in PlugInHelper or ConVRter and re-exporting the movie after the amendments are made. If there are consecutive hot spot IDs in the movie, then it will have to be recreated with nonconsecutive IDs as well.

Workaround Number 2

If you know the URL of the page you wish to launch with a URL hot spot, you can assign it to the URL hot spot at the time you create it. This URL data will be part of the QTVR movie itself, so you don't have to address it with a HOTSPOT parameter in your HTML document. You can use absolute or relative addressing for the URL data given to a URL hot spot. For the example above, you could put ../Next.html in the URL data of your hot spot and use the following EMBED tag:

<EMBED SRC="Movies/Atrium.mov" WIDTH=320 HEIGHT=240>

The URL is read by the plugin directly from the movie hot spot. Because the HOTSPOT EMBED parameter is not used at all, the issue of being one off on the ID number is circumvented. Warning: A HOTSPOT parameter in the EMBED tag overrides the URL data in the movie.

Amending QTVR Movies in VR Toolbox

Here's how to amend URL hot spots using VR Toolbox software:

  1. After creating a hot spot in the hot spot editor (see Making Hot Spots Using Nodester or VR PanoWorx), double-click on the hot spot.
  2. A "Hot Spot Properties" dialogue box appears. Select "URL" in the Kind: field.
  3. Change the hot spot ID to one that is nonconsecutive to previous hot spots by inputting it into the ID: field. Suggestion: use only odd numbered hot spots, so you know you have the next highest number (even) available for workaround number 1.
  4. If you want to use workaround number 2, put the URL or relative address in the URL: field.

Here's how to amend URL hot spots in QTVRAS:

Here is how the QTVRAS Scene Maker looks after creating four URL hot spots, which are represented by the four world icons with single-headed arrows drawn to them from a panorama icon. Double-clicking on one of the URL hot spot icons brings up a dialogue box in which you type the absolute or relative address of the page you wish to launch when the hot spot gets clicked. This will prepare a QTVR movie for the workaround number 2.

Highlighting a panorama or object movie icon and selecting "Edit Hot Spots..." from the "Scene" menu (Cmd-H) will bring up the Hot Spot Editor. Notice in this case that because of the random assignment of hot spot IDs, no changes of hot spot IDs is required. Only the EMBED tag will need to be changed to make use of workaround number 1.

Had there been any consecutive IDs, you could click on the colored box next to the ID number and select a new ID from the grid of ID colors that pops up. In QTVRAS, hot spot IDs are associated with the same numbered color in the Macintosh system palette.

Targeting Frames and the QT 4.1 Hot Spot Bug

You can use URL hot spots to launch new web pages in HTML frames (see Using Web Frames with QTVR Movies with Hot Spots). However, the TARGET parameter cannot be added to URL hot spot data, which means that you will not be able to use workaround number 2 for QTVR movies which use hot spots with frames. You will have to use workaround number 1 and amend your QTVR movies if they have consecutive hot spot numbers.

 

Workaround Number 3: Javascript

Some people who have consecutive hot spot IDs in their QTVR media may require an alternative to recreating their movies with new hot spots. Javascript is a fairly stable and consistently implemented scripting language supported by most browsers. It is not Java. Javascript has the ability to detect plugins and plugin versions. The following script was submitted to the QTVR mail list by Gord Lacy and is provided here with his permission.

The script first determines if the browser is using the QuickTime 4.1 plugin. If it is it will generate one of two versions of an embed tag. If the browser is using a different version of the Quicktime plugin (lower or higher than QT 4.1) the second version of the embed tag is used. It is up to the scripter to provide the appropriate versions of the embed tag.

<HTML>
<HEAD>
<TITLE>
</TITLE>
<script><!--
var qt41 = false;

for (i = 0; i < navigator.plugins.length; i++) {
	if (navigator.plugins[i].name.indexOf("QuickTime") > -1) {
		qt41 = (navigator.plugins[i].name.indexOf("4.1") > -1);
		break;
	}
}

// --></script>
</HEAD>

<BODY>

<script><!--
if (qt41)
	document.write("<Quicktime 4.1 compatible tag goes here>");
else
	document.write("<Quicktime 4.0 or less or Quicktime 4.2 or
more compatible tag goes here>");
// --></script>

</BODY>
</HTML>

Caveats for Using Javascript

Care must be taken when adding your embed tag to these Javascript document.write() statements. Quotes have a special purpose here, and using them within your EMBED tag will cause the Javascript to fail. Many scripters habitually use quotes around some or most values in their HTML to help browsers parse values correctly. If you want to use quotes in the Javascripted EMBED tag, you must use precede each quote with a backslash like this: \"

Another caveat is the use of whitespace within Javascripted EMBED tags. You can't use line returns or it will cause the Javascript to fail. Put the document.write() statement on one line.

Javascript Example

Here is a Javascript example. The portion of the script that appears in the body of the HTML follows. The document.write() statements are on one line, but shown here with line returns so they fit on the page.

  <script><!--
if (qt41)
	document.write("<EMBED SRC=\"Movies/UTSoMall.mov\" HEIGHT=256 WIDTH=320 
CONTROLLER=true HOTSPOT2=\"../Washington2.htm\" HOTSPOT4=\"../Tower2.htm\" 
HOTSPOT6=\"../Littlefield2.htm\" HOTSPOT8=\"../Capitol2.htm\">");
else
	document.write("<EMBED SRC=\"Movies/UTSoMall.mov\" HEIGHT=256 WIDTH=320 
CONTROLLER=true HOTSPOT1=\"../Washington2.htm\" HOTSPOT3=\"../Tower2.htm\" 
HOTSPOT5=\"../Littlefield2.htm\" HOTSPOT7=\"../Capitol2.htm\">");
// --></script>

Back to Table of Contents | Top