You are not logged in.

J.J.

Beginner

  • "J.J." started this thread

Posts: 35

Location: Eisenstadt

Occupation: Systemadministrator

  • Send private message

1

Friday, July 3rd 2015, 9:45am

Beim ein- und ausfliegen eines Bildes wird rx, ry und rz nicht übernommen.

Hallo Leute,

ich habe ein kleines Problem mit der Anzeige von Bildern. Ich möchte wie in der demotour-weingut mehrere Bilder anzeigen lassen. Der einzige Unterschied ist, dass ich die Bilder als Hotspot in das Panorama einbaue und nicht als poligonal-Hotspot habe. Ich habe den Code von der demotour-weingut übernommen und etwas angepasst. Soweit funktioniert dieser auch. Das einzige Problem das ich noch habe ist, dass beim ein- und ausfliegen der Bilder die Werte rx, ry und rz nicht übernommen werden.

Hier mal der Code:

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
65
66
67
68
69
70
71
72
73
74
75
76
77
		<style name="pichotspot"
			   capture="false"
			   zorder="1"
			   onclick="showpic();"
			   zoom="true"
			   scale="0.3"
			   />

	<hotspot name="spot_blick"
			 style="pichotspot"
			 url="../graphics/blick.jpg"
			 pic="blick"
			 distorted="true"
			 ath="73.00"
			 atv="-55.50"
			 rx="-50" ry="-29" rz="8"
			 scale="0.3"
			 onhover="showtext(Blick von oben,tooltip);"
			 />

	<hotspot name="spot_bad"
			 style="pichotspot"
			 url="../graphics/bad.jpg"
			 pic="bad"
			 distorted="true"
			 ath="13.50"
			 atv="-59.00"
			 rx="-50" ry="20" rz="-5"
			 scale="0.3"
			 onhover="showtext(Badezimmer oben,tooltip);"
			 />

	<action name="showpic">
		if(hotspot[get(pic)] === null,
			txtadd(picfilename,'%CURRENTXML%/../graphics/',get(pic),'.jpg');
			addhotspot(get(pic));
			getcenter(hsath,hsatv);
			copy(hotspot[get(pic)].ath, hsath);
			copy(hotspot[get(pic)].atv, hsatv);
			set(hotspot[get(pic)].visible,false);
			set(hotspot[get(pic)].distorted,true);
			set(hotspot[get(pic)].zorder,2);
			set(hotspot[get(pic)].scale,0.1);
			set(hotspot[get(pic)].alpha,0.0);
			set(hotspot[get(pic)].onloaded, flyin(get(name)) );
			set(hotspot[get(pic)].onclick, flyout(get(name)) );
			copy(hotspot[get(pic)].url,picfilename);
		,
			flyin(get(pic));
		);
	</action>

	<action name="flyin">
		if(hotspot[%1].flying == 0.0, hotspot[%1].resetsize(); calc_flyout_size(%1); );
		if(hotspot[%1].oldscale === null, copy(hotspot[%1].oldscale, hotspot[%1].scale) );
		if(hotspot[%1].oldrx === null, copy(hotspot[%1].oldrx, hotspot[%1].rx) );
		if(hotspot[%1].oldry === null, copy(hotspot[%1].oldry, hotspot[%1].ry) );
		if(hotspot[%1].oldrz === null, copy(hotspot[%1].oldrz, hotspot[%1].rz) );
		set(hotspot[%1].enabled,true);
		set(hotspot[%1].visible,true);
		tween(hotspot[%1].alpha,  1.0);
		tween(hotspot[%1].flying, 1.0);
		tween(hotspot[%1].scale,  1.0);
		tween(hotspot[%1].rx, 0.0);
		tween(hotspot[%1].ry, 0.0);
		tween(hotspot[%1].rz, 0.0);
	</action>

	<action name="flyout">
		set(hotspot[%1].enabled,false);
		tween(hotspot[%1].alpha,  0.0, 0.5, default, set(hotspot[%1].visible,false); );
		tween(hotspot[%1].flying, 0.0);
		tween(hotspot[%1].scale,  get(hotspot[%1].oldscale));
		tween(hotspot[%1].rx,  get(hotspot[%1].oldrx));
		tween(hotspot[%1].ry,  get(hotspot[%1].oldry));
		tween(hotspot[%1].rz,  get(hotspot[%1].oldrz));
	</action>


Sollten diese Werte in der action "flyin" nicht übernommen werden?

Source code

1
2
3
4
	if(hotspot[%1].oldrx === null, copy(hotspot[%1].oldrx, hotspot[%1].rx) );
		if(hotspot[%1].oldry === null, copy(hotspot[%1].oldry, hotspot[%1].ry) );
		if(hotspot[%1].oldrz === null, copy(hotspot[%1].oldrz, hotspot[%1].rz) );
		


Vielleicht kann mir ja jemand einen Tipp geben wo das Problem liegt.

Danke schon mal im Voraus

LG Alex