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

<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">
</APPLET>

Javascript

<SCRIPT language="JavaScript1.1">
function mousehs(n) {
if( n== -1 )
document.cn.hsnum.value = "---" ;
else
document.cn.hsnum.value = n ;
}
function getview(p,t,f) {
document.cn.pan.value = p ;
document.cn.tilt.value = t ;
document.cn.fov.value = f ;
}
function NewPano( ) {
document.ptviewer.newPanoFromList(0);
}
</SCRIPT>

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="" >
</FORM>


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 <bernardk@unimelb.edu.au>
Department of Pathology
Last modified: February 24, 2003