You are not logged in.

1

Friday, April 17th 2009, 4:54pm

Frage zur aktuellen krpano 1.0.8 beta 7 (build 2009-04-05)

hallo klaus,

ist es möglich wenn eine tour mit scenen erstellt wird, ich diese trotzdem extern einzeln aufrufen kann (z.b in einer html seite)?

beispiel

Source code

1
so.addVariable("xml", "scenes?loadscene(scene3).xml");


oder kann immer nur eine angesteuert werden?

http://krpano.com/examples/108b7/examples/scenes/scenes.html

danke

gruss ael

2

Monday, April 20th 2009, 9:59pm

Hi,

da gäbe es mehrere Möglichkeiten:

z.B. "onstart" in der HTML setzten und dort eine Scene laden:

Source code

1
2
so.addVariable("xml", "tour.xml");
so.addVariable("onstart", "loadscene(scene3);");



oder eine "eigene" Variable (hier "startscene") in der HTML definieren und diese in der XML dann abfragen:
HTML:

Source code

1
2
so.addVariable("xml", "tour.xml");
so.addVariable("startscene", "haus");

XML:

Source code

1
2
3
4
5
6
7
8
<krpano onstart="action(onstart);">
  <action name="onstart">
    if(startscene == haus,   loadscene(scene1.xml));
    if(startscene == garten, loadscene(scene2.xml));
    ...
  </action>
  ...
</krpano>


andere/ähnliche Varianten sind auch noch denkbar

Schöne Grüße,
Klaus

3

Thursday, April 23rd 2009, 11:21am

danke für die schnelle antwort. *smile*

4

Monday, April 27th 2009, 1:58pm

hallo klaus,

ich komme leider nicht weiter. *cry*
ich verwende SWFObject v2.1

html datei bild_0493.html:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
<head>
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript" src="swfkrpanomousewheel.js"></script>
<script type="text/javascript">
	swfobject.embedSWF("vr_tour.swf", "vr_tour", "800", "600", "9.0.28", "expressInstall.swf",
	{pano:"tour.xml"},
	{onstart:"loadscene(bild_0493);"},
	{allowfullscreen:true, bgcolor:"#f0e9dc"},
	{id:'vr_tour', name:'vr_tour'});
	swfkrpanomousewheel.registerObject("vr_tour");
</script>
</head>


in der xml datei starte ich mit bild_0403:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<krpano version="1.0.8" onstart="action(onstart);">
	<action name="onstart">
		loadscene(bild_0403,null,KEEPALL,BLEND(1));
		lookat(0,0,80);	
	</action>

..............

<scene name="bild_0403" onstart="">
	inhalt
</scene>

<scene name="bild_0493" onstart="">
	inhalt
</scene>


was mache ich falsch. es startet immer das bild_0403.

gruss ael

5

Monday, April 27th 2009, 2:33pm

Hi,

der SWFObject 2.1 Code ist etwas falsch,
die Variablen/Parameter kommen alle innerhalb des ersten {...} Blocks:

z.B. anstelle von:

Source code

1
2
3
{pano:"tour.xml"},
{onstart:"loadscene(bild_0493);"},
...


das:

Source code

1
{pano:"tour.xml", onstart:"loadscene(bild_0493);"}, ...


Schöne Grüße,
Klaus

6

Monday, April 27th 2009, 2:41pm

hallo klaus,
danke für die schnelle hilfe. es funktioniert. *thumbsup*

gruss ael

Similar threads