You are not logged in.

> The forum rules have been updated. Please take a moment to read them.


#1 2010-08-26 00:11:47

badders
Member
From: East Kilbride
Registered: 2009-04-17
Posts: 11
Website

Relative Paths

I understand how relative paths work and have studied the KRPano forum but I'm stuck on a problem I hope someone can help with?

I can't see how to put the APT generated HTML <embed></embed> code in a page that is not in the same DIR as the SWF. For example:

"www.mydomain.com/1/2/tour.html"
"www.mydomain.com/3/4/tour.swf"

I changed the APT generated <embed src="tour.swf" width="640" height="480"></embed> to <embed src="../../tour.swf" width="640" height="480"></embed>

With the XML files also exported I checked the activity window and I see:

"www.mydomain.com/1/2/tour.html" FOUND
"www.mydomain.com/1/2/tour.xml" NOT FOUND
"www.mydomain.com/3/4/tour.swf" FOUND

I then see a "tour.XML loading error (IO error)" message

I can see the <embed> command is calling the tour.xml BEFORE it moves to the correct (.swf + .xml) directory. My guess is the default directory for the first XML file is set within swfkrpano.js and therefore included within the exported SWF?

If so, is it possible to modify the inbuilt APT swfkrpano.js so it uses %SWFPATH% as a variable to set the correct relative path to the first XML? Or am I completely off the plot? I read on the KRPano documentation there is a default path for the XML directory location which is what I think I need to change?

Last edited by badders (2010-08-26 00:40:21)


Andrew Baddeley
Online Shop: http://www.360tacticalvr.com
eBAY Store: http://stores.ebay.co.uk/360tacticalvr
Pano Kit: Nodal Ninja 5 R-D16 + Pentax K5 + Samyang 8mm f/3.5 + Samyang 14mm f/2.8 + Pentax 300mm f/4 + GigaPan Epic Pro

Offline

 

#2 2010-08-26 00:32:57

mediavets
Moderator
From: Isleham, Cambridgeshire, UK.
Registered: 2007-11-14
Posts: 9728
Website

Re: Relative Paths

Is it impossible for you to have the all the files for a tour in the same directory?


Andrew Stephens
Nikon D40, Nikkor 10.5mm fisheye, Sigma 8mm f3.5 fisheye, Nikkor 18-55/50/35mm lenses, Nodal Ninja 5 Lite, Nodal Ninja 4 with R-D16, Agno's MrotatorTCS short.
Nikon P5100, CP5000, CP995, FC-E8, WC-E63,WC-E68, TC-E2, Kaidan Kiwi 995, Bophoto pano bracket, Agno's MrotatorA.
Merlin/Orion robotic pano head + Papywizard on Nokia 770/N800/N810 and Windows 8/XP/2K.

Offline

 

#3 2010-08-26 00:36:53

badders
Member
From: East Kilbride
Registered: 2009-04-17
Posts: 11
Website

Re: Relative Paths

mediavets wrote:

Is it impossible for you to have the all the files for a tour in the same directory?

Not for me, but it is for the client....wink


Andrew Baddeley
Online Shop: http://www.360tacticalvr.com
eBAY Store: http://stores.ebay.co.uk/360tacticalvr
Pano Kit: Nodal Ninja 5 R-D16 + Pentax K5 + Samyang 8mm f/3.5 + Samyang 14mm f/2.8 + Pentax 300mm f/4 + GigaPan Epic Pro

Offline

 

#4 2010-08-26 14:50:59

Adrien F
Moderator
Registered: 2009-07-03
Posts: 267

Re: Relative Paths

Hello,

you should try the simple javascript HTML template AND restrict view to a domain (Licence domains). Then uncomment and edit the

Code:

swf.addVariable("xml", "pano1.xml");

, replacing pano1.xml by "../../pano1.xml" or whatever.

Offline

 

#5 2010-08-26 22:56:26

badders
Member
From: East Kilbride
Registered: 2009-04-17
Posts: 11
Website

Re: Relative Paths

Yes! that has worked! Thanks.


Andrew Baddeley
Online Shop: http://www.360tacticalvr.com
eBAY Store: http://stores.ebay.co.uk/360tacticalvr
Pano Kit: Nodal Ninja 5 R-D16 + Pentax K5 + Samyang 8mm f/3.5 + Samyang 14mm f/2.8 + Pentax 300mm f/4 + GigaPan Epic Pro

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson