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.

Zephyr

Professional

  • "Zephyr" started this thread

Posts: 994

Location: Netherlands

Occupation: Web developer

  • Send private message

1

Wednesday, January 21st 2009, 9:32am

Direct linking to a specific panorama

Hi,

Is it possible to link directly to an panorama with perhaps a specified xml or fov/pan/tilt? So people can email a link to a friend.
example.com/?xml=pano/1.xml or something like that.

Thanks
3d childrens game using krpano Game
Minify your xml with my krpano XML Compressor
Krpano XML Parsing Error Checklist
Available for hire (krpano xml, javascript, actionscript, flash, php and ipad plugins).

Virtual Northland

Professional

Posts: 1,336

Location: Duluth MN

  • Send private message

2

Wednesday, January 21st 2009, 2:27pm

wouldnt you send them a link to the .html ? the html would then load the pano.

below is what i would email to someone to view this pano.

http://www.virtualnorthland.com/panos/canalwinter/pano.html

Zephyr

Professional

  • "Zephyr" started this thread

Posts: 994

Location: Netherlands

Occupation: Web developer

  • Send private message

3

Wednesday, January 21st 2009, 3:56pm

Well thats 1 image, if you have a tour, you'll have just 1 html, and the hotspots linking to several xml.
index.html ===loads==> global.xml ==loads==> location1.xml ==can load==> location2, location3, location 4.xml

But what if you just want to go to location3 instantly (and perhaps with a given vlookat / hlookat) instead of going to the whole tour or making a html for every location?
3d childrens game using krpano Game
Minify your xml with my krpano XML Compressor
Krpano XML Parsing Error Checklist
Available for hire (krpano xml, javascript, actionscript, flash, php and ipad plugins).

4

Wednesday, January 21st 2009, 8:56pm

RE: Direct linking to a specific panorama

Hi,

Is it possible to link directly to an panorama with perhaps a specified xml or fov/pan/tilt? So people can email a link to a friend.
example.com/?xml=pano/1.xml or something like that.

Thanks
Hi,

yes, this is possible,

you can either link direct to the krpano.swf and add parameters
or to a html file which passes the parameters to the flash file
(see the http://krpano.com/krpano.html for such)

I used this several times on my site,

e.g.

direct link to a html file with parameters:
(I recommend this way, because with html/javascript the flashplayer mousewheel bugs
can be fixed, and there is a flashplayer detection)

http://krpano.com/krpano.html?pano=panos…view.vlookat=81

sorry the forum cuts the url, here is full:
http://krpano.com/krpano.html?pano=panos/kirche/kirche.xml&view.stereographic=true&view.fisheye=1.0&view.fov=150&view.fovmax=150&view.hlookat=-7&view.vlookat=81

or a link direct to the swf file:

http://krpano.com/krpano.swf?pano=panos/…view.vlookat=81

full url:
http://krpano.com/krpano.swf?pano=panos/kirche/kirche.xml&view.stereographic=true&view.fisheye=1.0&view.fov=150&view.fovmax=150&view.hlookat=-7&view.vlookat=81

best regards,
Klaus

Zephyr

Professional

  • "Zephyr" started this thread

Posts: 994

Location: Netherlands

Occupation: Web developer

  • Send private message

5

Monday, January 26th 2009, 9:13am

Thanks Klaus this is what I needed :)
3d childrens game using krpano Game
Minify your xml with my krpano XML Compressor
Krpano XML Parsing Error Checklist
Available for hire (krpano xml, javascript, actionscript, flash, php and ipad plugins).

Mr.nOGot'

Beginner

Posts: 17

Location: Russian Federation>Krasnoyarsk

  • Send private message

6

Sunday, May 17th 2009, 6:26pm

Direct linking no working with internet explorer and opera? *blink*
In Firefox, Chrome and Safari it all work!
This example link: http://www.cult360.ru/example3/pano.swf?pano=tour/3.xml
Any ideas, at you works in internet explorer and opera?

Best regards!

7

Sunday, May 17th 2009, 9:25pm

direct link to a html file with parameters not working
I tried to do so ....tour.html?pano=7.xml
tour.html : .. so.addVariable("pano", "tour.xml"); ...
tour.xml : <krpano version="1.0.7" onstart="action(load1);" basedir="%FIRSTXML%" actionintervalbase="timer" logkey="true">

<action name="load1">
loadpano(2.xml,null,KEEPALL,BLEND(2));

</action>
...

Zephyr

Professional

  • "Zephyr" started this thread

Posts: 994

Location: Netherlands

Occupation: Web developer

  • Send private message

8

Sunday, May 17th 2009, 9:26pm

add a & behind it. Explorer reads the extension like a xml file :( http://www.cult360.ru/example3/pano.swf?pano=tour/3.xml&
3d childrens game using krpano Game
Minify your xml with my krpano XML Compressor
Krpano XML Parsing Error Checklist
Available for hire (krpano xml, javascript, actionscript, flash, php and ipad plugins).

9

Sunday, May 17th 2009, 10:12pm

add a & behind it. Explorer reads the extension like a xml file :( http://www.cult360.ru/example3/pano.swf?pano=tour/3.xml&

I have no problems withpano.swf?pano=...
I have problem only with tour.html?pano=....

10

Tuesday, May 19th 2009, 1:41pm

Hi,

when you add parameters to a HTML file (like tour.html?pano=...)
then you need to redirect these parameters manually to the flash (via Javascript)

have a look at the source code of this html file for an example:
http://krpano.com/krpano.html

here the interesting part:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
// pass all external parameters
var q = document.location.search || document.location.hash;
if(q)
{
  var params = q.substring(1).split("&");
  for(var i=0; i<params.length; i++)
  {
    var param = params[i];
    var istgl = param.indexOf("=");
    var pname = param.substring(0,istgl);
    var pval = param.substring(istgl+1);
    so.addVariable(pname, pval);
  }
}



best regards,
Klaus

11

Tuesday, May 19th 2009, 3:04pm

Oh, now everything works perfectly
but if I use "kprotect", it will not work?

12

Tuesday, May 19th 2009, 4:00pm

Hi, when you use kprotect, then you need to allow the "External Parameters" to get it working

viewinz

Intermediate

Posts: 145

Location: Wellington, New Zealand

Occupation: Trying to build an entire walkthrough of NZ for tourists

  • Send private message

13

Tuesday, November 3rd 2009, 2:35am

How does this work when you are using scenes?

i.e. ..pano.html?pano=path/doc.xml&scene=exterior doesn't work.

michel

Professional

Posts: 1,153

Location: ANDORRA

Occupation: TV

  • Send private message

14

Tuesday, November 3rd 2009, 4:30pm

Hi viewinz,

I have played a little with your request using the scene example that comes with the Krpano_1.0.8 downloaded files... So, all the following refers to that scene example.
I have modified the scene.html file adding the above code from Klaus... The html code becomes like this:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<html>
<head>
	<title>krpano.com example</title>
</head>
<style>
body{ font-family:Arial, Helvetica, sans-serif; font-size:10px; color:#FFFFFF; background-color:#000000; margin:0; padding:0; }
* html, * html body{ overflow: hidden; }
a{ color:#555555; text-decoration:underline; }
a:hover{ color:#AAAAAA; text-decoration:underline; }
</style>
<body>

<div id="krpano">
	<noscript><table width="100%" height="100%"><tr valign="middle"><td><center>ERROR:<br><br>Javascript not activated<br><br></center></td></tr></table></noscript>
</div>

<script type="text/javascript" src="../../swfobject/swfobject.js"></script>
<script type="text/javascript" src="../../swfobject/swfkrpanomousewheel.js"></script>

<script type="text/javascript">
// <![CDATA[
	if (typeof(deconcept) !== 'undefined' && deconcept.SWFObjectUtil.getPlayerVersion().major >= 6)
	{
		var so = new SWFObject("../../krpano.swf", "krpanoSWFObject", "100%", "100%", "9.0.28","#000000");
		so.addParam("allowFullScreen","true");
		so.addParam("allowScriptAccess","sameDomain");
		
		//so.addVariable("pano", getQueryParamValue("pano"));
		
		// pass all external parameters
		var q = document.location.search || document.location.hash;
		if(q)
		{
			var params = q.substring(1).split("&");
			for(var i=0; i<params.length; i++)
			{
				var param = params[i];
				var istgl = param.indexOf("=");
				var pname = param.substring(0,istgl);
				var pval  = param.substring(istgl+1);
				
				if (pname == "krpanologo")
				{
					// shortcut to hide the logo 
					pname = "plugin[krpanologo].visible";
				}
				
				so.addVariable(pname, pval);
			}
		}
		
		so.useExpressInstall('./swfobject/expressinstall.swf');
		so.setAttribute('xiRedirectUrl', window.location);
		if ( so.write("krpano") ) { var mousewheelfixes = new SWFkrpanoMouseWheel(so); }
	}
	else
	{
		document.getElementById("krpano").innerHTML = '<table width="100%" height="100%"><tr valign="middle"><td><center>ERROR:<br><br>Adobe Flash Player 9 needed<br><br><br><a href="http://www.adobe.com/go/getflashplayer/"  target="_blank"><IMG SRC="http://www.macromedia.com/images/shared/download_buttons/get_flash_player.gif" BORDER="1"></a><br>...click here to download...<br><br><br><br></center></td></tr></table>';
	}
// ]]>
</script>

</body>
</html>

and, as you said, it seems that using http://.../scenes.html?pano=scenes.xml&scene=exterior doesn't work.
In fact, doing this way there is no loaded scene... and the krpano debuger says:

Source code

1
2
3
INFO: krpano 1.0.8 beta 9 DEV (build 2009-10-29)
INFO: Flashplayer WIN 10,0,32,18 PlugIn
ERROR: loadscene() - scene "scene1" not found

the action onstart() tries to load the scene1:

Source code

1
2
3
<action name="onstart">
loadscene(scene1, null, MERGE);
</action>

But fails... I think this is because using the scene=exterior has the effect to redefine the scene tag with the given value... and then, the action onstart() does not work because the scene1 is no more defined...

So, I have tried with an other approach... Redefining the content of the onstart() action ... Doing this way, we can specify the scene we want to be loaded by the onstart() action.
Like this: http://.../scenes.html?pano=scenes.xml&action[onstart].content=loadscene(scene3, null, MERGE);

Source code

1
http://.../scenes.html?pano=scenes.xml&action[onstart].content=loadscene(scene3, null, MERGE);

Doing this way, it works...

Hope this can help.

SAlut.

viewinz

Intermediate

Posts: 145

Location: Wellington, New Zealand

Occupation: Trying to build an entire walkthrough of NZ for tourists

  • Send private message

15

Wednesday, November 4th 2009, 11:44pm

Michel, thanks a lot for that.

It didn't work exactly how I wanted but got me thinking and I put variables in the URL and picked them up afterwards and it it worked great.

I.e. like this:
http://viewinz.com/view.html?x=daysbay_s…ine_parade&l=en

boxx1

Beginner

Posts: 16

Location: Estonia

  • Send private message

16

Monday, April 5th 2010, 8:59pm

Dear Michel.

I am trying to get a direct link for a specific scene in my virtual tour as you suggested. I rewrote the HTML file as you suggested, and got a particularly positive result.
The viewer skips to a specified scene, but the problem is that it gets stuck for some 10-15 seconds on loading and then shows a black screen and an error:

Source code

1
2
WARNING: unknown action command: plugin[box].selectiditem
ERROR: XML parsing failed - Error: Error #1023


In my XML file I use a plugin:

Source code

1
2
3
4
5
<!-- combobox plugin -->
	<plugin name="box" url="../../plugins/combobox.swf" preload="false"
	keep="true"
	align="righttop" x="4" y="17" width="188" 
	blendmode="normal" />


In normal mode, when I had a normal link with my scene.xml file written in the HTML everuthing was right with the plugin, but when I am trying to set an external link it seems to have a problem.

Otherwise the tour jumps directly to the specific scene. Although the screen is black i can figure out the correct position by the built in interactive map.

Could you suggest a solution, please?

17

Thursday, April 8th 2010, 8:42am

Hi,

that sounds like an corrupted xml file or download...

which krpano and flashplayer version and what browser are you using?
and do you have a link where that can be seen?

best regards,
Klaus

18

Wednesday, May 12th 2010, 4:00pm

Is it also possible to load an xml unless it's set in the url? So default load home.xml and if I specified bathroom.xml in the url, it's loading the bathroom?

19

Wednesday, May 12th 2010, 5:06pm

Hi,

yes, when you use the current swfkrpano.js what would be pretty easy:

Source code

1
2
3
4
5
6
7
8
<script type="text/javascript">

	var swf = createswf("krpano.swf");
	swf.addVariable("xml","bathroom.xml");
	swf.passQueryParameters();
	swf.embed("krpanoDIV");

</script>


first the xml is set to "bathroom.xml" and then the html query parameters are parsed and set, and if a xml parameter will be set, it overwrite the first setting,

best regards,
Klaus

20

Wednesday, May 12th 2010, 6:29pm

Ok, very easy, thank you!