PDA

View Full Version : Can't make work &xml_file=


le GROS jéjé
10-05-2009, 09:24 AM
Hi there,
I have a problem trying to load a new pano with a new xml file...
Reading the tutorials it seems to be very easy with the command:
onClick="loadPano(panoName=petit/vert&xml_file=vert.xml)"
but it just loads the new pano but it doesn't loads the new xml file ???

You can have a look here : http://www.360images.fr/360/Les_Sables/tour.html

In the first xml file (tour.xml) I have a spot wich on click should load the pano named vert with the xml file named vert.xml
<spot id="phare_vert"
url="icons/fleche.png"
linked="petit/tour|grand/tour"
alt="Vers le phare vert"
onOver="alpha=1,200"
onOut="alpha=0.5,200"
onClick="loadPano(panoName=petit/vert&xml_file=vert.xml)"
/>

The pano is loading ok but not the vert.xml file wich has a hotspot wich should load back the pano named tour with the xml named tour.xml
<spot id="tour"
url="icons/fleche.png"
linked="petit/vert|grand/vert"
alt="Vers la tour"
onOver="alpha=1,200"
onOut="alpha=0.5,200"
onClick="loadPano(panoName=petit/tour&xml_file=tour.xml)"
/>

Am I doing something wrong ???
I was wondering if it was because the first xml file was called by the html file :
<script type="text/javascript">
var so = new SWFObject("files/pano.swf", "pano", "100%", "100%", "10", "#ffffff");
so.addVariable("xml_file","tour.xml");
so.addParam("allowFullScreen","true");
so.addParam("allowScriptAccess","sameDomain");
so.write("flashcontent");
window.document["pano"].focus();
</script>
so the page couldn't load an other xml file ??

Thanx for your help !!!

myksa
10-05-2009, 12:33 PM
Hi,

try to use this code:
onClick="loadPano(xml_file=(your xml name))"

and add to each xml in parameters section:
panoName=(your panorama name)

So You will load specyfied XML file, and in this XML file You specify which panorama shoul load.

Hope it helps,

Myksa

le GROS jéjé
10-05-2009, 03:09 PM
Thanx for you reply, this should work but I can use panorama= in my xml file as I have a small preview and a fullsreen version, so I go this way : onstart: panorama;
...
Thanx !

phberlin
10-06-2009, 10:14 AM
Hello,

I think the problem here is that each XML path is to be relative to pano.swf. If I get it right, your folder structure is something like this:

[domain]/files/ <-- contains pano.swf
[domain]/vert/ <-- contains pano images
[domain]/ <-- contains XML

Therefore, I see two possibilities to solve this. Either put your XML in the same folder as the pano.swf, or make its call relative to it, like so:

onClick="loadPano(panoName=petit/vert&xml_file=./vert.xml)

Might also be "../" (two dots), I don't remember which one is suitable with FPP.

Good luck, Ph.