PDA

View Full Version : hotspots of second pano not loaded: why?


phberlin
09-27-2007, 12:08 AM
Hello everyone,

I'm making my first steps with hotspots, and so far everything is fine -- as long as it is in a single pano :( I know this has been discussed several times before here, but unfortunately I could not find a solution for my problem in the posts...

I have several panos on my server, and every one is in its own subdirectory. Like:

../panorama/bridge/brigde.swf
../panorama/house/house.swf
../panorama/something_else/something_else.swf

and so on...

I want to connect some of the panos with each other via hotspots, and there is my problem:

Each pano has its own XML-file which is necessary since it's not a single "tour" -- each one can be started individually by thumbnail (see http://pano.philippkoch.com). I want to keep them separately (each one with its own subfolder and own XML-file), but nevertheless connect them.

A typical connection would for example be like this:

<box id="fernsehturm_hs" linked="museum" url="hotspot.png" pan="118.00" tilt="13.00" distance="1.0" orientation="sphere" alignX="-0.50" alignY="-0.96" depth="0" blendMode="alpha"

and

onClick="pano.leash=free;loadPano(?panoName=../fernsehturm/fernsehturm&xml_file='../fernsehturm/fernsehturm.xml'&panHome=5&tiltHome=36&zoomHome=0.67,800);"

where the actual pano is "museum" and the pano to be loaded via hotspot is "fernsehturm". The problem is that the XML-file of the second pano doesn't seem to be loaded -- there are no hotspots in it; but if you open it directly via thumbnail, the hotspots are visible...

I tried to change the "xml_file="-part without success. For example it also doesn't work using just the pano name without path (xml_file="fernsehturm.xml"). And if I do not put the apostophs (') at the beginning and the end of the xml_file-path, the hotspot is displayed, but without function (e.g. the second pano doesn't get loaded then).

Can anyone please give me a hint what might be wrong here? I would be very grateful for that :-)

Thanks in advance,
Philipp

PS. I don't have the hotspots online, I'm just testing on my localhost, because I want it to be working first. So don't seek them on my site :)

jaaaab
09-27-2007, 08:44 AM
Hi,

My advise would be to say: keep it simple! write all your spots on a single xml file, then link them with the "linked" param.

Beware! if you pano path is ../../mypanos/panoname, then the linked param has to be linked="../../mypanos/panoname".

++

phberlin
09-27-2007, 12:20 PM
Hello Jaaaab,

thanks for your response!

Well, I definitely don't want a single XML-file since the panos are independent from each other. So for example each one has an individual preloaded low resolution preview. As each one is to be accessible independently via the thumbnails on my site and not every pano is connected to all the others (e.g. some do not relate to other panos), I want to avoid that single XML-file solution. For me, keeping it simple means having an own XML-file for every pano, so it doesn't get so messy the more the number of panos grows...

Is there really no possibility to connect panos in different paths with different XML-files, so that the individual hotspots still work? I can't believe this...

Ph.

PS. I'm still unsure if my "xml_file" parameter is syntactically correct? Since I use relative paths and every pano is in its own subfolder, is it corect to write:
onClick="pano.leash=free;loadPano(?panoName=../fernsehturm/fernsehturm&xml_file='../fernsehturm/fernsehturm.xml'&panHome=5&tiltHome=36&zoomHome=0.67,800);"?

Scott Witte
09-27-2007, 05:43 PM
Is there really no possibility to connect panos in different paths with different XML-files, so that the individual hotspots still work? I can't believe this...


As long as you don't have to run your panos in true full screen, if having them on an html page is OK, then I believe you can. Just have the hotspot execute an openUrl. eg. openUrl(http://yourNewPano.com, _self)

Each pano requires its own html page which will load the pano and an entirely new XML file. You can use javascript full screen techniques to minimize the amount web page showing or not as you wish.

phberlin
09-27-2007, 11:52 PM
Scott Witte wrote:

Just have the hotspot execute an openUrl. eg. openUrl(http://yourNewPano.com, _self)

Thanks for your suggestion, Scott. Interesting approach -- but if I get that right, there won't be a possibility to have transitions between panoramas, and also I guess it would be impossible to define a given starting pan, tilt and zoom this way? And to make things even more complicated, the fact that I have my panos inside a lightbox clone (greybox) doesn't make the whole thing easier.

Well, it seems (or at least that's how I understand the hotspots documentation) definitely possible to create hotspots that load a pano AND ALSO its XML-file... So I guess I must be simply doing something wrong with my syntax, since every parameter (like the new pano name itself, the initial pan/tilt/zoom, the transition time...) is passed just fine EXCEPT the XML-file.

Could someone please clarify if it is basically possible to load a panorama via hotspot TOGETHER WITH ITS OWN XML? Since the "old" hotspots (belonging to the first panorama) stay active (even though I am using "linked") unless I set "visible=0" before the transition, it's clear that the new XML with the new hotspots simply is not loaded.

Thanks, Ph.

phberlin
09-28-2007, 12:47 AM
Scott, can I marry you? You were absolutely right with your suggestion and after some thinking I managed to solve this problem:

Indeed I take Scott's suggestion and use "loadUrl" instead of "loadPano". The URL is loaded as "_self", so it's displayed within the same greybox. And -- of course it is possible to pass intial pan, tilt and zoom and so on: I simply write an extra index_spot.html (additional to the normal index.html) for every pano which passes these parameters through "addVariable" (SWFobject.js). The only thing I can not have this way is a transition, but I think I can live with that.

Thanks again!
Ph.

PS. Hhm, the only thing is: I'll have to find a way to change Greybox' caption from within the new index_spot.html -- otherwise, the caption of the first pano is also displayed when showing the next panos. Does anyone happen to know how to do this via JavaScript? :)

Scott Witte
09-28-2007, 04:00 AM
Scott, can I marry you?
Ummm....... Let's just say I'm glad it worked out. :rolleyes:

I'll have to find a way to change Greybox' caption from within the new index_spot.html -- otherwise, the caption of the first pano is also displayed when showing the next panos.
Not quite following what exactly you mean by "greybox". But if it is outside the flash pano proper it should be an (easy?) html issue.

phberlin
09-28-2007, 04:19 PM
The Greybox (http://orangoo.com/labs/GreyBox/) is (yet another) lightbox (http://www.huddletogether.com/projects/lightbox2/) clone. I use it to show my panos in sort of a "pop-up-window" over my normal site (just have a look at my pano-site (http://pano.philippkoch.com), then you'll know what I mean) . It is a modal window that has a caption in the top bar. This caption is being passed by the link that references the greybox' content. Since the whole thing is a Javascript, there must be a way to change the caption of an active greybox via a Javascript command 'on the fly' from within the active Greybox...

Regards, Ph.

Scott Witte
09-28-2007, 06:01 PM
Ph,

Thanks for the info on Greybox. I expect you are right about passing a parameter back to it to display a new caption.

If that doesn't work you might consider putting your caption info into a static spot at the top (render an image with the text as a png) You could also do this with a close button, I believe, although I'm not sure about the code.

phberlin
09-29-2007, 12:29 AM
I've searched the Greybox forum and apparently changing an open Greybox' caption is an unsolved issue, e.g. there are some people asking how to do it and nobody ever knew a solution :( So I made yet another thread about it (the other threads about that are all rather out-dated), maybe someone knows the solution now. If not, I'll have to live without the Captions and take a standard one, maybe explaining how to navigate in the pano or something similar.

If I find a solution, I can post it here in case someone else runs across the same problem someday.

Regards, Philipp