The Menu0360 applet should be placed in the same directory as the PTViewer applet. Make sure you have the ptviewer.class file on the server separately from the ptviewer.jar archive. Do not use the ptviewer.jar archive in the applet, but simply use ptviewer.class. Example:
<applet code="ptviewer.class" width="320" height="265" name="viewer"> (note archive is missing)
...
</applet>
<applet code="menu0360.class" width="320" height="25">
...
</applet>
attachwith - (required) Tells menu0360 which PTViewer applet to control, in case you have more than one PTViewer applet running on the same page. Value = name assigned to PTViewer applet. Will search through the applets on the page to find the one with the same name. (HINT: You must put a name="viewername" in the applet tag for PTViewer.) Here is a syntax example:
<param name="attachwith" value="viewername">
viewerinit - Tells PTViewer which commands to execute after loading. Refer to PTViewer docs for available commands. Here is a syntax example:
<param name="viewerinit" value="newPano({file=tours/kitchen_0360.jpg}{pan=0}{fov=95})">
HINT: If you use this parameter to tell PTViewer which image to display first, do not put a file name in the PTViewer 'file' parameter. In PTViewer, use <param name=file> only.
menufont - The Menu's text-font used. Options: "Dialog", "DialogInput", "Monospaced", "Serif", "SansSerif".
This is an optional parameter. Default is "Dialog". Here is a syntax example:
<param name="menufont" value="Serif">
menufontstyle - Style of the Menu's Font. Options: "0" (Plain), "1" (Bold), "2" (Italic), "3" (Bold-Italic).
This is an optional parameter. Default is "0". Here is a syntax example:
<param name="menufontstyle" value="3">
menufontsize - Size of the Menu's Font. Options: Any valid number font size value.
This is an optional parameter. Default is "12". Here is a syntax example:
<param name="menufontsize" value="14">
menufgcolor - Foreground color used in Menu. Options: "black", "blue", "cyan", "darkGray", "gray", "green", "lightGray", "magenta", "orange", "pink", "red", "white", "yellow". Will also accept RGB color values from 0 to 255, separated by commas. (Example: "128,0,255" will be a purple).
This is an optional parameter. Default is "blue". Here is a syntax example:
<param name="menufgcolor" value="cyan">, or
<param name="menufgcolor" value="128,128,255">
menubgcolor - Background color used in Menu. Options: "black", "blue", "cyan", "darkGray", "gray", "green", "lightGray", "magenta", "orange", "pink", "red", "white", "yellow". Will also accept RGB color values from 0 to 255, separated by commas. (Example: "128,0,55" will be a purple).
This is an optional parameter. Default is "white". (HINT: If you set menufgcolor and menubgcolor to the same value, you will not be able to see the options.) Here is a syntax example:
<param name="menubgcolor" value="white">, or
<param name="menubgcolor" value="255,255,255">
menubackground - filename indicating background image of the menu. Image must be in .gif or .jpg format. Here is a syntax example:
<param name="menubackground" value="bgname.gif">
menuitem0-menuitemN - Single item of the Menu. 'N' can take any value from '0' upwards.Here is a syntax example:
<param name="menuitem0" value="Kitchen|newPano({file=tours/kitchen_0360.jpg} {pan=-45} {fov=95}); startAutoPan(0.4,0,1)">
Points to note:
- There is NO limit on the number of items. You can add as many as you want.
- The series of 'N' is important. The series must start from 0, and be in sequential order. All
the items should have the 'N' value in order.
The following order is valid:
menuitem0
menuitem1
menuitem2
menuitem3
The following order is INVALID (Skips value 2 for 'N'):
menuitem0
menuitem1
menuitem3
The following order is INVALID (Does not start with '0'):
menuitem1
menuitem2
menuitem3
- The name of the menuitem and the PTViewer commands to be executed
must be separated by a vertical-bar character '|' (Example: value="Zoom In|ZoomIn()")
- Multiple commands can be attached with one menu-item, in which case they should be separated by semi-colons ';' (Example: value="Pan and Zoom|panLeft(); ZoomIn()" ).
menusound0-menusoundN - Readies the sounds files to be played, loading them into cache. Here is a syntax example:
<param name="menusound0" value="intro.au">
Hint: Java sounds files should be in the .au format to insure compatibility on most platforms. Your Quicktime Player is a good resource for converting your sound files to .au format. Open the sound file in Quicktime. Then choose "Export" from the file menu. Then Export: "Sound to μLaw", with the options 8.000 khz and mono. 'N' can take any value from '0' upwards.
Points to note:
- There is NO limit on the number of items. You can add as many as you want.
- The series of 'N' is important. The series must start from 0, and be in sequential order. All
the items should have the 'N' value in order.
The following order is valid:
menuitem0
menuitem1
menuitem2
menuitem3
The following order is INVALID (Skips value 2 for 'N'):
menuitem0
menuitem1
menuitem3
The following order is INVALID (Does not start with '0'):
menuitem1
menuitem2
menuitem3
viewerinitsound - Plays one of the sounds when viewer first loads. Here is a syntax example:
<param name="viewerinitsound" value="0">, will play menusound0 at startup.
menuitemNsound - Plays a sound file when menu Item N is selected. Here is a syntax example:
<param name="menuitem1sound" value="0">, will play menusound0 at when Menu Item 1 is selected.
displaytextarea - Required to display the Text Area below the menu. Here is a syntax example:
<param name="displaytextarea" value="Yes">
defaulttext - Displays the given text in the Text Area at initial view. Use the vertical bar "|" as a line break. Here is a syntax example:
<param name="defaulttext" value="Line 1 | Line 2 | Line 3">, will display:
Line 1
Line 2
Line 3
when Menu Item 0 is selected.
menuitemNtext - Displays the given text in the Text Area when menu Item N is selected. Use the vertical bar "|" as a line break. Here is a syntax example:
<param name="menuitem0text" value="Line 1 | Line 2 | Line 3">, will display:
Line 1
Line 2
Line 3
when Menu Item 0 is selected.
textareafgcolor - Foreground color used in Text Area. Options: "black", "blue", "cyan", "darkGray", "gray", "green", "lightGray", "magenta", "orange", "pink", "red", "white", "yellow". Will also accept RGB color values from 0 to 255, separated by commas. (Example: "128,0,255" will be a purple).
This is an optional parameter. Default is "black". Here is a syntax example:
<param name="textareafgcolor" value="cyan">, or
<param name="textareafgcolor" value="128,128,255">
textareabgcolor - Background color used in Text Area. Options: "black", "blue", "cyan", "darkGray", "gray", "green", "lightGray", "magenta", "orange", "pink", "red", "white", "yellow". Will also accept RGB color values from 0 to 255, separated by commas. (Example: "128,0,255" will be a purple).
This is an optional parameter. Default is "white". Here is a syntax example:
<param name="textareabgcolor" value="cyan">, or
<param name="textareabgcolor" value="128,128,255">
NOTE: Make sure the fg color and bg color are different. Else, you will not be able to see the text.
textareafont, textareafontstyle, textareafontsize - Same controls as menufont, etc. above, except for Text Area
textarearows - Specifies the maximum number of lines of text to be displayed in the Text Area. Determines the height of the text box. Here is a syntax example:
<param name="textarearows" value="3">
textareacolumns - Specifies the maximum number of letters of text per line to be displayed in the Text Area. Determines the width of the text box. Here is a syntax example:
<param name="textareacolumns" value="40">
textareascroll - Specifies whether to show scrollbars for the text area. Here is a syntax example:
<param name="textareascroll" value="0">
Here are the options:
For both scrollbars: 0 (Default)
For only vertical scrollbar: 1
For only horizontal scrollbar: 2
For no scrollbars: 3
These parameters can be placed in the menu's PARAM tags, or a default configuration file. A default configuration file, 0360Default.html, can be set up to store any of the above parameters that will be used for all of the tours in the directory. This saves from having to type the same parameters in every tour.
NOTES:
- The menu tries to find the configuration file 0360Default.html in the current directory or in current jar.
- If the same parameter is specified in the 0360Default file and in the parameters, the values defined in the parameters will take precedence.
- The format to specify a parameter in configuration file is: [name=value] (That is: first a square opening bracket, then name of the parameter, then equal sign, then value of the parameter, and finally closing square bracket.
The file 0360Default.html is a simple text file, with only the parameters listed. It does NOT contain and other tags, like <html><body>, etc. Here is a sample 0360Default.html file:
[menufont=Serif] [menufontstyle=3] [menufontsize=14] [menubackground=control_bkgd.gif]
Questions? Email us at sales@0-360.com