Big Ben's Panorama Tutorials

PTViewer Examples


Scripted Panorama 1

This sample uses javascript to read various parameters from PTViewer. It's handy for getting values for programming applets.


The Mouse is currently over Hotspot No: 
Pan Angle (Degrees)
Tilt Angle (Degrees)
Field of View (Degrees)


<APPLET name="ptviewer" archive=ptviewer.jar code=ptviewer.class 
    width=320 height=200 mayscript=true>
<PARAM name=file value="pano.jpg">
<PARAM name=mousehs value="mousehs">
<PARAM name=getview value="getview">


<SCRIPT language="JavaScript1.1">
function mousehs(n) {
if( n== -1 ) = "---" ;
else = n ;
function getview(p,t,f) { = p ; = t ; = f ;
function NewPano( ) {

Form fields

<FORM name="cn">
The Mouse is currently over Hotspot No: 
<INPUT TYPE="text" size=5 name="hsnum" value="" >
Pan Angle (Degrees)     
<INPUT TYPE="text" size=9 name="pan" value="" >
Tilt Angle (Degrees)    
<INPUT TYPE="text" size=9 name="tilt" value="" >
Field of View (Degrees) 
<INPUT TYPE="text" size=9 name="fov" value="" >

Previous ] Next ]

This page, its contents and style, are the responsibility of the author and do not represent the views, policies or opinions of The University of Melbourne. All photographs Ben Kreunen 2000

Ben Kreunen <>
Department of Pathology
Last modified: February 24, 2003