Sie sind nicht angemeldet.

Tourvista

Fortgeschrittener

  • »Tourvista« ist der Autor dieses Themas

Beiträge: 260

Wohnort: Leicester UK

  • Nachricht senden

1

Freitag, 29. Januar 2010, 13:05

loadpano & loadscene

Hi all!

Thanks in advance for helping.

I have following folder structure:

- A folder called 'panos' contains files 'pano01.xml', 'pano02.xml', 'pano03,xml', etc..
- Each file looks like this:

Quellcode

1
2
3
4
5
6
7
8
9
<krpano version="1.0.8" onstart="action(set_hotspots);">
<include url="../global.xml"/>
<include url="../plugins.xml"/>
<view/>
<preview/>
<image></image>
<action name="set_hotspots"></action>

</krpano> 


- global.xml contains diplay, autorotate, progress and control settings.
- plugin.xml contains plugins, actions, etc..

- What I would like to achieve to have all the 'set_hotspots' actions in a single file called brilliantly 'hotspots.xml'

I've tried using the following in 'pano01.xml'

Quellcode

1
2
3
4
5
6
7
8
<krpano version="1.0.8" onxmlcomplete="loadscene(scene01,null,MERGE,BLEND(1));">
<include url="../global.xml"/>
<include url="../plugins.xml"/>
<include url="../hotspots.xml"/>
<view/>
<preview/>
<image></image>
</krpano>


And this is 'hotspots.xml'

Quellcode

1
2
3
4
5
6
7
<scene name="scene01" onstart=" action(set_hotspots);">

<action name="set_hotspots">
action(one_line, up, pano02, Entrance, -82, 9, -87, -6);
</action>

</scene


This doesn't work.
It ignores view parameters and it loads only the preview, not the tiles.
I've also tried with onstart instead of onxmlcompleted. And both, onxmlcomplete="loadscene(scene01); and onstart="loadscene(scene01);

The hotspos action works properly so far.

What am I missing?


Thanks!!!

Tourvista

Fortgeschrittener

  • »Tourvista« ist der Autor dieses Themas

Beiträge: 260

Wohnort: Leicester UK

  • Nachricht senden

2

Samstag, 30. Januar 2010, 12:21

Solved! *smile*

EXAMPLE

pano.xml
pano01.xml
scenes.xml

First, I load 'pano.xml', which includes 'scenes.xml' and loads a scene.
In the scenes, I have included 'pano01.xml' and other setings such view, data, and my action to create hotspots.

Now, I have to find out the way to load a random scene. I remember I read something about a 'random command' in the documentation...

Now the bad news: the coordinates finder doesn't work. Specifically the double click feature.

According to Firebug 'numclick is not defined'. This error only happens when I use this scene structure. I am not sure how to solve this. I will send a message to Michel, he is the genius behind that code!



Cheers

3

Sonntag, 31. Januar 2010, 10:33

I am trying to do the same thing. Not really trying coz of a big lack of time by now...

But here is the answer of Klaus for the random function :


when you use the krpano.swf from the 1.0.8 beta 9 tools package - there is already a global "random" variable,
it returns a random value between 0.0 and 1.0,

e.g. to get a random value between 0 and 10 use the 'mul' action and then the 'roundval' action to remove any decimal places:


Source code
  1. mul(randomvalue, random, 10);
  2. roundval(randomvalue,0);
  3. trace('randomvalue=', randomvalue);


best regards,
Klaus



I hope it could be helpfull for you.
I would be pleased to see it working.

David
Istanbul virtual tour creation : www.vizyon360.com

4

Montag, 1. Februar 2010, 15:29

Hi Rafael,
Now the bad news: the coordinates finder doesn't work. Specifically the double click feature.
Did you solved the problem? Looking at your link above, I am not able to see it... seems to work correctly...

SAlut.

Tourvista

Fortgeschrittener

  • »Tourvista« ist der Autor dieses Themas

Beiträge: 260

Wohnort: Leicester UK

  • Nachricht senden

5

Dienstag, 2. Februar 2010, 01:01

Hi Michel,

Thanks for asking. The double click feature works. It's Firebug that doesn't look very happy with numclick not defined. So I turned it off *rolleyes*
If you are really intrigued about what's going on, you can see the warning yourself installing the Firebug extension for Firefox.
But if you have better things to do, don't spend your time and talent investigating furthermore ;-)

Cheers

Rafa

Ähnliche Themen