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

Thursday, November 1st 2012, 6:20pm

Loading each scene via its own xml in tour generated by vtour droplet

Hi,

Is there a way to load a scene via its own xml file rather than relying on the default setup? The tour was generated by the Make VTour (Normal) droplet.

I need to do this because the tour itself will be large (around 800 scenes) and on average each scene will include 10 hotspots linking to other scenes, photos, audio or video.

Btw, I don't propose to have 800 scenes on one xml file - they'll be split into 20 or so initial xml files, one for each region of the tour (individual buildings, floors, exteriors etc) but I'll also need to load each one from within certain scenes on another files.

If I show you the existing site (not generated by the droplet) which I want to adapt and take further, it might illustrate what I'm attempting to do but with the new layout as provided by the tour droplet: www.pgs-archive.co.uk

As you'll see, my ambition far outstretches my knowledge!

Thanks.

2

Thursday, November 1st 2012, 6:25pm

Hi,

basically yes, just load the other panos/scene with the loadpano() action instead of the loadscecne() actions...
...but that might not work together with the default vtourskin, because this skin generates the thumbs based on the <scene> elements from the current xml...

Best regards,
Klaus

3

Thursday, November 1st 2012, 7:00pm

Wow! Quick response! Now that's what I call service!

At the risk of seeming stupid, where would I make these changes?

Would loadscene(get(linkedscene),null,MERGE,BLEND(1)); in the vtourskin would become loadpano(get(linkedscene),null,MERGE,BLEND(1));

Would the hotspot remain the same? Ie retain the linkedscene="scene_2FulfordMainentrance"?
<hotspot name="spot1" style="skin_hotspotstyle_up" ath="70" atv="6.0" linkedscene="scene_2FulfordMainentrance2"/>

And where would I make reference to the xml file I'd wish to use? For instance, the target pano currently has the following code (the xml file would be 2FulfordMainentrance.xml):

<scene name="scene_2FulfordMainentrance" title="Fulford, main entrance" onstart="" thumburl="panos/2FulfordMainentrance.tiles/thumb.jpg" lat="" lng="" heading="">

<view hlookat="0" vlookat="0" fovtype="MFOV" fov="120" maxpixelzoom="2.0" fovmin="70" fovmax="140" limitview="auto" />

<preview url="panos/2FulfordMainentrance.tiles/preview.jpg" />

<image>
<cube url="panos/2FulfordMainentrance.tiles/pano_%s.jpg" />
<mobile>
<cube url="panos/2FulfordMainentrance.tiles/mobile_%s.jpg" />
</mobile>
</image>

<!-- place your scene hotspots here -->

</scene>

Basic questions I know, but thanks again.

4

Thursday, November 1st 2012, 7:15pm

Hi,

Quoted

Would loadscene(get(linkedscene),null,MERGE,BLEND(1)); in the vtourskin would become loadpano(get(linkedscene),null,MERGE,BLEND(1));

Would the hotspot remain the same? Ie retain the linkedscene="scene_2FulfordMainentrance"?
<hotspot name="spot1" style="skin_hotspotstyle_up" ath="70" atv="6.0" linkedscene="scene_2FulfordMainentrance2"/>

And where would I make reference to the xml file I'd wish to use?
When you set the 'linkedscene' value to the name of the xml file, then this might work for hotspots.

But note - many of the vtourskin.xml features (thumbnails, maps, previous/next-buttons) might not work in this case!

Best regards,
Klaus

5

Thursday, November 1st 2012, 7:51pm

Okay, thanks. I'll give it try.

6

Friday, November 2nd 2012, 5:58am

Sorry to be a pain, but... I failed miserably. probably down to my incompetence and lack of coding experience.

I've changed my approach slightly but this is still along the same lines - different sections of the project will be new individual tours, eg, linking from an exterior tour to an interior one.

I've tried this and the link from the exterior to the interior results in a black screen although the new thumbnails are visible.
You can see the example here:
http://pgs-archive.co.uk/tour_test/vtour_exterior/tour.html
Incidentally, the thumbnails for the interior do work.

The hotspot is as follows:
<hotspot name="interiorStart" style="skin_hotspotstyle_upNewArea"
ath="70" atv="6.0"
handcursor="true"
onhover="tween(alpha,1);tween(scale,1);showtext(Interior Scene 1 - Day,buttonstyleHotspots);"
onout="tween(alpha,0.6);tween(scale,0.7)"
onclick="set(enabled,false);
set(view.maxpixelzoom,null);
set(view.fovmin,28);
tween(alpha,0);
tween(scale,0);
looktohotspot(interiorStart, 50, tween(easeOutQuad,1));
oninterrupt(break);
loadpano('../vtour_interior/tour.xml', startscene=scene_interior1, IGNOREKEEP, BLEND(1));"
>
</hotspot>

and the only thing I've changed in the exterior skin xml is the addition of the following:

<textstyle name="buttonstyleHotspots"
font="Arial"
fontsize="14"
border="false"
background="false"
textcolor="0xFFFFFF"
xoffset="10"
yoffset="-10"
fadeintime="0.2"
effect="glow(0x000000,1,4,2);dropshadow(2,45,0x000000,3,1);" />

<style name="skin_hotspotstyle_upNewArea" url="icon_arrow_up.png" scale="0.8" alpha="0.6" edge="top" oy="0" />

Everything else is as was constructed by the droplet with the exception of the main folder names (ie vtour to vtour_exterior and vtour_interior). The xml file for the exterior can be found here:
http://pgs-archive.co.uk/tour_test/vtour_exterior/tour.xml
and
http://pgs-archive.co.uk/tour_test/vtour…n/vtourskin.xml

What have I done wrong?

Thanks again for your patience and help.

7

Friday, November 2nd 2012, 11:16am

Hi,

the xml itself looks okay, but there is small problem with the action executions order... (but I need to analyze this first for more details and if this behavior can be fixed).

It works in that order:
- first the onclick event of the hotspot with the loadpano() action will be called
- and then the onout event with the tweens() actions

but the loadpano() action itself works that way:
- when there are actions AFTER the loadpano() call, then the 'onstart' action of the next xml will be skipped - and this is the problem here!

As alternative solution - this code could be used to load the new xml and the scene:

Quoted

onclick="...; loadpano('../vtour_interior/tour.xml', null, IGNOREKEEP, BLEND(1)); wait(0); loadscene(scene_interior1,null,MERGE);"

Best regards,
Klaus

8

Friday, November 2nd 2012, 2:35pm

Your solution works perfectly (of course!).

And thanks for the explanation, too - that helps clarify a few things for me.

Thanks very much.

9

Monday, February 4th 2013, 7:24pm

HTML5 problems...

Just when I thought Id cracked it…

This works fine in Flash but I've just noticed that when viewed on an iPad that clicking the hotspot gives the following message:

ERROR: loadscene() - "scene_exterior" not found

"scene_exterior" is the first scene that loads by default.

This is the case on iPad (ios5), Safari 5.1.7 (using Develop > iPad/iPhone etc options) and Firefox 18.0.1 (all Apple Mac)

With the setting as html5="always" Google Chrome 24.0.1312.57 doesn't show this error but does display black lines at the cube edges.

Again, I've not changed any of the code other than stated in my previous post and the links are the same, ie

ath="70" atv="6.0"
handcursor="true"
onhover="tween(alpha,1);tween(scale,1);showtext(Interior Scene 1 - Day,buttonstyleHotspots);"
onout="tween(alpha,0.6);tween(scale,0.7)"
onclick="set(enabled,false);
set(view.maxpixelzoom,null);
set(view.fovmin,28);
tween(alpha,0);
tween(scale,0);
looktohotspot(interiorStart, 50, tween(easeOutQuad,1));
oninterrupt(break);
loadpano('../vtour_interior/tour.xml', null, IGNOREKEEP, BLEND(1)); wait(0); loadscene(scene_interior1,null,MERGE);"
>
</hotspot>

The above is an example at it simplest. The main tour is here:

http://pgs-archive.co.uk/tour_v2/tour.html

However, if I load (for instance)
[url]http://pgs-archive.co.uk/tour_v2/tour.html?startscene=fulfordMainEntranceNight
as the URL, as similar message appears when trying to access the new xml, ie

ERROR: loadscene() - "fulfordMainEntranceNight" not found

(In this tour the arrow with the green border links to a new xml file.)

So whatever the startscene is, whether specified or not, when going to the new xml it appear that the view is trying to find the original startscene whether it was specified or not.

Any ideas?

Thanks.

This post has been edited 1 times, last edit by "sg63" (Feb 4th 2013, 11:57pm)


10

Tuesday, February 5th 2013, 5:40pm

Hi,

add a:

Source code

1
delete(startscene);


to remove the already set startscene variable,
e.g. directly in the 'startup' action after using it or directly before the loadpano() call,

best regards,
Klaus

11

Wednesday, February 6th 2013, 12:57am

Thanks, Klaus. Works perfectly.

Apologies for effectively posting this twice (also in the html5 viewer section) but because this thread was so old I wasn't sure it'd be seen and people needed to see this soon!