You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Saturday, January 9th 2010, 8:28am

content of the xml after adding hotspot

Hello,

On the basis of this thread http://www.krpano.com/forum/wbb/index.ph…ad&threadID=998 , i could access the contents of the xml file as it exists at the time of page load. After adding a hotspot, xml.content is still showing the old xml; it doesn't show the code for the added hotspots.

Is there any other variable through which we can access the xml updated through the editor plugin. This access has to be programmatic through some variable or action or function, not through the "copy-to-clipboard" button (function) available in the editor plugin.

Thank you.

This post has been edited 1 times, last edit by "srisa" (Jan 9th 2010, 11:50am)


2

Monday, January 11th 2010, 10:48am

Hi,

the "xml.content" variable just contains the loaded xml content,
there is no current xml in krpano,

the editor plugin generates the xml manually by reading out all values and building a xml string from it,

e.g. here a short quote from the editor plugin source code,
this code generates the xml for the <autorotate> node:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
private function genxml_krpano_autorotate():String
{
  var autorotate:Object = krpano.get("autorotate");

  return "\t<autorotate enabled =\"" + autorotate.enabled  + "\"\n" +
         "\t            waittime=\"" + autorotate.waittime + "\"\n" +
         "\t            accel   =\"" + autorotate.accel    + "\"\n" +
         "\t            speed   =\"" + autorotate.speed    + "\"\n" +
         "\t            horizon =\"" + autorotate.horizon  + "\"\n" +
         "\t            tofov   =\"" + autorotate.tofov    + "\"\n" +
         "\t            />\n";
}


best regards,
Klaus

3

Monday, January 11th 2010, 3:32pm

Thanks Klaus.
I had to get information of the hotspots in the xml and i could get hold of the information using the js interface and api calls.

One more question: is it possible to display html elements on top of the embed tag containing the flash movie which holds the panorama?

This post has been edited 1 times, last edit by "srisa" (Jan 11th 2010, 4:38pm)


4

Tuesday, January 12th 2010, 5:14am

I was not clear enough in the above post. What i want to do is to display a html pop up on top of the panorama image. Any part of the pop up that overlaps the panorama is being hidden by the panorama. I tried to set very high value to the z-index of the pop-up, it didn't work. I tried to set the wmode to the embed tag to 'transparent' and 'opaque', it didn't work.
Is there anything else that i can try?

Thank you.

5

Tuesday, January 12th 2010, 2:22pm

Hi,
I had to get information of the hotspots in the xml and i could get hold of the information using the js interface and api calls.
yes, you could read out every informations via the js interface,

e.g.

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
function read_all_hotspot() 
{
  var krpano = document.getElementById("krpanoSWFObject");

  var count = krpano.get("hotspot.count");
	
  var i;

  for (i=0; i<count; i++)
  {
	var hsname = krpano.get("hotspot["+i+"].name");
	alert(hsname);
  }

}



I was not clear enough in the above post. What i want to do is to display a html pop up on top of the panorama image. Any part of the pop up that overlaps the panorama is being hidden by the panorama. I tried to set very high value to the z-index of the pop-up, it didn't work. I tried to set the wmode to the embed tag to 'transparent' and 'opaque', it didn't work.
Is there anything else that i can try?
it depends on the browser if it would work,

here is an example:
http://krpano.com/examples/javascript3/

best regards,
Klaus

Similar threads