PDA

View Full Version : how use loadpano with xml files


louloule
08-29-2007, 09:47 AM
hello i have a problem :
i make a virtual tour and when i have a hotspots,i click on and i have a translation to the other pano (pano1 to pano2)

but the pano2 loaded with the xml rules of pano1 .
examples:
first pano is pano1 with pano1.xml
2nd pano is pano2 with pano2.xml

how do i do for the 2nd pano (pano2)loaded with the rules of pano2.xml.

louloule
08-29-2007, 11:08 AM
<?xml version='1.0'?>
<panorama>

<parameters>
loaderTextColor = #FFFFFF
loaderBackColor = #282828
loaderText =
panHome = -46
sensitivity=60
keySensitivity=30
friction=0.88
zoomMax=1.5
segments=30
zoomHome = 0.58
layer_1 = plugins/borders.swf
layer_3 = plugins/hotspots.swf
layer_4 = plugins/autorotator.swf
layer_5 = plugins/glassMeter.swf
layer_6 = plugins/editor.swf
</parameters>

<autorotator>
speed = -0.4
interval = 30
pause = 2000
quality = hight
</autorotator>

<hotspots>
<global onTransitionStart="pano_2.blur=128;pano.blur=128,500" onTransitionEnd="pano_2.blur=0,500" onStart="external.autorotator.disabled=0" onOver="scale=1.3,600,elastic;depth+=20" onOut="scale=1,300;depth-=20"
restoreQuality="pano.qualityStatic=medium"

>

<spot id="video" url="video.swf" static="1" staticX="-450.00" staticY="-550.00" align="RB" salign="RB" depth="9" smoothing="0"
onOver="change:-,alpha,1,200;"
onOut="change:-,alpha,0.7,1000;"
/>
<spot id="plan" url="plan.swf" static="1" staticX="-313.00" staticY="-519.00" align="RB" salign="RB" depth="8" smoothing="0"
onOver="change:-,alpha,1,200;"
onOut="change:-,alpha,0.7,1000;"
/>


<spot id="left" url="black_l.png" static="1" staticX="-240.00" staticY="-25.00" align="CB" salign="CB" depth="9" alpha="0.7" smoothing="0" blockMouse="1"
onPress="changeRel:-,staticX,1; changeRel:-,staticY,2; change:0,panKey,-1.5,100"
onRelease="changeRel:-,staticX,-1; changeRel:-,staticY,-2; change:0,panKey,0"

/>


<spot id="right" url="black_r.png" static="1" staticX="-160.00" staticY="-25.00" align="CB" salign="CB" depth="9" alpha="0.7" smoothing="0" blockMouse="1"
onPress="changeRel:-,staticX,1; changeRel:-,staticY,2; change:0,panKey,1.5,100"
onRelease="changeRel:-,staticX,-1; changeRel:-,staticY,-2; change:0,panKey,0"

/>


<spot id="down" url="black_d.png" static="1" staticX="-80.00" staticY="-25.00" align="CB" salign="CB" depth="9" alpha="0.7" smoothing="0" blockMouse="1"
onPress="changeRel:-,staticX,1; changeRel:-,staticY,2; change:0,tiltKey,-1.5,100"
onRelease="changeRel:-,staticX,-1; changeRel:-,staticY,-2; change:0,tiltKey,0"

/>


<spot id="up" url="black_u.png" static="1" staticX="0" staticY="-25.00" align="CB" salign="CB" depth="9" alpha="0.7" smoothing="0" blockMouse="1"
onPress="changeRel:-,staticX,1; changeRel:-,staticY,2; change:0,tiltKey,1.5,100"
onRelease="changeRel:-,staticX,-1; changeRel:-,staticY,-2; change:0,tiltKey,0"

/>


<spot id="zoomOut" url="black_m.png" static="1" staticX="80" staticY="-25.00" align="CB" salign="CB" depth="9" alpha="0.7" smoothing="0" blockMouse="1"
onPress="changeRel:-,staticX,1; changeRel:-,staticY,2; change:0,zoomKey,-0.5,500"
onRelease="changeRel:-,staticX,-1; changeRel:-,staticY,-2; change:0,zoomKey,0"

/>


<spot id="zoomin" url="black_p.png" static="1" staticX="160.00" staticY="-25.00" align="CB" salign="CB" depth="9" alpha="0.7" smoothing="0" blockMouse="1"
onPress="changeRel:-,staticX,1; changeRel:-,staticY,2; change:0,zoomKey,0.5,500"
onRelease="changeRel:-,staticX,-1; changeRel:-,staticY,-2; change:0,zoomKey,0"

/>


<spot id="auto" url="black_a.png" static="1" staticX="240.00" staticY="-25.00" align="CB" salign="CB" depth="9" alpha="0.7" smoothing="0" blockMouse="1"
onClick="external.autorotator.disabled+=1; pano.pan_v=0; pano.tilt_v=0; pano.zoom_v=0;"
/>



<spot id="hotspots_1" url="hotspot_1.png" pan="92.00" tilt="-2.00" depth="-210" alpha="0.29" scale="0.3"
onOver="scale=0.9,500,elastic,alpha,1,300;"
onOut="scale=0.3,500;depth-=20;alpha,1,100;"
onClick="loadPano(pano_2.swf?xml_file=pano_2.xml)"
/>

</global>

</hotspots>

</panorama>

Scott Witte
09-12-2007, 01:16 AM
but the pano2 loaded with the xml rules of pano1...

...onClick="loadPano(pano_2.swf?xml_file=pano_2.xml)"


Louloule,

I believe you are already using the correct code to load the XML file for Pano2 so I'll bet the "rules" you are talking about are the hotspots and I see you aren't already using the "linked" parameter. From the tutorial:

This action applies new panorama parameters from XML file, new borders parameters (if your file contains <borders></borders> section), new autorotation parameter (<autorotator></autorotator>); but section <hotspots></hotspots> will be ignored, Hotspots plugin can't reload parameters runtime, use linked parameter or script commands to change set of hotspots for every panorama image.

I know, with a large tour with many hotspots and complex actions the XML file soon becomes huge. Can't say I like that. At the same time you save the load time of another XML file for each pano, for what thats worth.

Hope that helps.


Denis,

(If you are listening) Could you consider making the hotspots plugin load parameters runtime????