PDA

View Full Version : Hotspots incorrectly positioned until pano dragged


ccmas
10-01-2007, 11:34 PM
This happens when the autorotator is IMMEDIATELY disabled on opening the pano. It occurs in IE6, IE7 and Firefox.

It happens ALMOST every time you try the following:
1. Select http://www.saunderson.com/FPtours/VRVistasFP/Gallery/SU/3nav21.html
2. IMMEDIATELY click the autorotator button to stop rotation.
3. Select the hotspot right arrow to enter building. Do not drag/move pano.
4. Select the hotspot right arrow to move to next area. Do not drag/move pano.
5. An incorrectly placed hotspot appears above the desk. Move or drag the pano and the hotspot instantly correctly relocates itself. You can select the hotspot at the incorrect location and it will work but then more hotspots appear at wrong locations until once again the pano is dragged.

I'd really appreciate it if someone could throw any light on this mystery.

My xml file contains:
<?xml version='1.0'?>
<panorama>
<parameters>

disableLoading = 1
loaderTextColor = #FFFFFF
loaderBackColor = #282828

panHome=-14
behaviour = 0

layer_3 = ../globalfiles/hotspots.swf
layer_4 = ../globalfiles/autorotator.swf
loaderText =
layer_6 = ../globalfiles/loadMeter.swf
/* layer_7 = ../globalfiles/editor.swf */

</parameters>

<autorotator>
speed = -0.07
interval = 30
pause = 2000
quality = low
</autorotator>

<hotspots>
<global onOver="scale=1.1,600,elastic;depth+=20" onOut="scale=1,300;depth-=20"

onStart = "loadPreview();"
loadPreview = "
loadPano(?panoName=lisfront/images/monolisfrontsun,300);
onTransitionEnd=loadMain();
pano.qualityStatic=low
"
loadMain = "
loadPano(?panoName=lisfront/images/lisfrontsun,600);
onTransitionEnd=
"
>

<box id="fr2issue" url="../globalimages/arrow_rt.png" pan="-4.00" tilt="-3.00" zoom="0.73" distance="1.35" rotationX="-2.00" depth="-120" scaleable="0"
linked="lisfront/images/lisfrontsun"
onClick="pano.leash=free;loadpano(?panoName=issuedesk/images/issue&panHome=-94&zoomHome=0.45)"
/>

<box id="iss2fr" url="../globalimages/arrow_lt.png" pan="124.00" tilt="6.00" zoom="0.8" distance="1.5" rotationX="-2.00" depth="-120" scaleable="0"
linked="issuedesk/images/issue"
onClick="pano.leash=free;loadpano(?panoName=lisfront/images/lisfrontsun&panHome=-19&zoomHome=0.84)"
/>

<box id="iss2info" url="../globalimages/arrow_rt.png" pan="-144.00" tilt="-8.00" zoom="0.8" distance="2.0" rotationX="-2.00" depth="-120" scaleable="0"
linked="issuedesk/images/issue"
onClick="pano.leash=free;loadpano(?panoName=infodesk/images/info&panHome=25&zoomHome=0.5)"
/>

<box id="in2iss" url="../globalimages/arrow_lt.png" pan="-134.00" tilt="-8.00" zoom="0.55" distance="1.4" rotationX="-2.00" depth="-120" scaleable="0"
linked="infodesk/images/info"
onClick="pano.leash=free;loadpano(?panoName=issuedesk/images/issue&panHome=-12&zoomHome=0.45)"
/>

<box id="in2cent" url="../globalimages/arrow_fwd.png" pan="57.00" tilt="-17.00" zoom="0.55" distance="1.5" rotationX="-2.00" depth="-120" scaleable="0"
linked="infodesk/images/info"
onClick="pano.leash=free;loadpano(?panoName=central/images/central&panHome=-12&zoomHome=0.45)"
/>

<box id="cent2info" url="../globalimages/arrow_fwd.png" pan="-171.00" tilt="-12.00" zoom="0.55" distance="1.5 " rotationX="-2.00" depth="-120" scaleable="0"
linked="central/images/central"
onClick="pano.leash=free;loadpano(?panoName=infodesk/images/info&panHome=-136&zoomHome=0.5)"
/>

<box useHandCursor="1" id="info" static="1" salign="BL" staticX="18" staticY="-18" url="../globalimages/blue_q.png"
onClick="helpscreen.visible+=1"
/>

<box id="zoomOut" static="1" salign="BL" staticX="60" staticY="-18" url="../globalimages/blue_m.png" blockMouse="1"
onPress="pano.zoomKey=-2,500" onRelease="pano.zoomKey=0"
/>

<box id="zoomIn" static="1" salign="BL" staticX="102" staticY="-18" url="../globalimages/blue_p.png" blockMouse="1"
onPress="pano.zoomKey=2,500"
onRelease="pano.zoomKey=0"
/>

<box id="auto" static="1" salign="BL" staticX="144" staticY="-18" url="../globalimages/blue_a.png" blockMouse="1"
onClick="external.autorotator.disabled+=1; pano.pan_v=0; pano.tilt_v=0; pano.zoom_v=0;"
/>

<box id="full" static="1" salign="BL" staticX="186" staticY="-18" url="../globalimages/blue_f.png"
onClick="fullscreen(-)"
/>

<box id="helpscreen" url="../globalimages/VRVhelp.png" static="1" salign="BL" staticX="108" staticY="-114" visible="0" onClick="visible=0" onOver="" onOut="" />
</global>
</hotspots>

</panorama>

Denis
10-02-2007, 03:12 AM
Yes, it's my bug. It is fixed in the next version (2.2).
Currently you can avoid it forcing the position refresh after the transition: onTransitionEnd="pano.pan+=0.01"

Sorry for this.

jez_p
12-06-2007, 10:34 PM
I just spent the whole evening trying to sort out this same problem and I found this thread after a bit of digging. Maybe it would be a good idea to have a sticky thread with known bugs and workarounds? It could save a bit of time and unnecessary frustration.