I have a base directory called "fullClimb." Inside of fullClimb, I have a directory called html which contains a file "demo.html" which contains the snipped I quoted above.
I have another directory called "hi-res" which has folders for all my tile images ("1-1_Panorama.tiles", "2-1_Panorama.tiles", etc.) and a folder called "xml" with all of my xml files.
So the relative path from demo.html to 1-1_Panorama.xml is "../hi-res/xml/1-1_Panorama.xml" and the absolute path is "/fullClimb/hi-res/xml/1-1_Panorama.xml"
What is strange to me is that embedpano seems to be inserting stuff into the middle of the path I have specified, looking at "/fullClimb/hi-res/xml/../../xml/1-1_Panorama.xml" rather than "/fullClimb/hi-res/xml/1-1_Panorama.xml" as I specified.
Thanks for the tip on only specifying .swf. I will omit the xml path and keep trying.
I've tested it for you. Actually it's really simple:
|
Source code
|
1
2
|
<script src="../pano.js"></script>
<div id="pano" style="width:100%;height:100%;"> <noscript><table style="width:100%;height:100%;"><tr style="vertical-align:middle;"><td><div style="text-align:center;">ERROR:<br/><br/>Javascript not activated<br/><br/></div></td></tr></table></noscript> <script> embedpano({swf:"../pano.swf", xml:"../xml/pano.xml", target:"pano", html5:"only", passQueryParameters:true}); </script></div>
|
Note that you also need to add ../ to pano.js if the js file is located in the root folder.
Furthermore, for your tiles you also need to add something like this (don't pay attention to the file names, those are for my case) :
|
Source code
|
1
2
|
<scene name="pano"> <preview url="../hi-res/pano.tiles/preview.jpg" />
<image> <cube url="%SWFPATH%/../hi-res/pano.tiles/pano_%s.jpg" /> <mobile> <cube url="%SWFPATH%/../hi-res/pano.tiles/mobile_%s.jpg" /> </mobile> </image> </scene>
|
Or use the %SWFPATH% placeholders in the xml.
See:
http://www.krpano.com/docu/xml/#url-notes
I don't know if this works in the html, I don't think so. In case of the images in the xml, you would have the following path:
|
Source code
|
1
2
|
<scene name="pano"> <preview url="%SWFPATH%/../hi-res/pano.tiles/preview.jpg" />
<image> <cube url="../hi-res/pano.tiles/pano_%s.jpg" /> <mobile> <cube url="../hi-res/pano.tiles/mobile_%s.jpg" /> </mobile> </image> </scene>
|
It's important to understand that the paths are "relative to the html file" as I stated earlier.
Hope it helps.