You are not logged in.

1

Thursday, March 22nd 2012, 10:34pm

HTML5, load specific scene in Virtual Tour.

Hello community,

I'm trying to load a specific scene for Virtual Tour, i have a virtual tour that contain 8 panoramas, i wanna let the user can select which scene he wanna see, i've used the following in the tour.html

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
function gup( name ){
 name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]"); 
 var regexS = "[\\?&]"+name+"=([^&#]*)"; 
 var regex = new RegExp( regexS ); 
 var results = regex.exec( window.location.href ); 
 if( results == null )
 return ""; 
 else
 return results[1];
 }
 
 var param = gup('vars');
 
 embedpano({swf:"tour.swf", id:"krpanoSWFObject",xml:"tour.xml", target:"pano"});
 
 function krpano() 
 {
 return document.getElementById("krpanoSWFObject");
 }
 
 krpano().call("loadscene(" + param + ", null, MERGE, BLEND(0.5));");



and when i'm calling it in the browser:

Source code

1
www.company.com/vtour/tour.html?vars=scene_H1b
(note: this link is for example how i call the tour.html, the link is not online and "scene_H1b" is a scene name).

this works in iPad/iPhone, but in the browser is not working.

Any help will be appreciated.
thx in advance

2

Monday, March 26th 2012, 9:39pm

any help people. please.

3

Tuesday, March 27th 2012, 4:00pm

Hi,

it takes some time until the viewer is loaded and ready, so trying to get it directly after embedding will not work,

I would recommend passing the start scene as variable already during embedded and then load the right scene in the xml,
or pass a onstart event which loads the scene.

e.g. here some examples:
per URL auf Szenen zugreifen
Loading specific scene within a single XML file from HTML page + Plus want to protect

best regards,
Klaus