Forums  

Go Back   Forums > Talk > General FPP Discussion

Reply
 
Thread Tools Display Modes
  #1  
Old 10-05-2009, 09:24 AM
le GROS jéjé le GROS jéjé is offline
Member
 
Join Date: Sep 2008
Posts: 36
Downloads: 0
Uploads: 0
Default Can't make work &xml_file=

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:
Code:
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
Code:
<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
Code:
<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 :
Code:
<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 !!!
Reply With Quote
  #2  
Old 10-05-2009, 12:33 PM
myksa myksa is offline
Member
 
Join Date: Sep 2008
Location: Poland
Posts: 78
Downloads: 2
Uploads: 0
Default

Hi,

try to use this code:
Code:
onClick="loadPano(xml_file=(your xml name))"
and add to each xml in parameters section:
Code:
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
Reply With Quote
  #3  
Old 10-05-2009, 03:09 PM
le GROS jéjé le GROS jéjé is offline
Member
 
Join Date: Sep 2008
Posts: 36
Downloads: 0
Uploads: 0
Default

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 !
Reply With Quote
  #4  
Old 10-06-2009, 10:14 AM
phberlin's Avatar
phberlin phberlin is offline
Senior Member
 
Join Date: Aug 2007
Location: Berlin, Germany
Posts: 299
Downloads: 0
Uploads: 0
Default

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:

Code:
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.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 08:29 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.