You are not logged in.

1

Wednesday, January 18th 2012, 2:23pm

Action If Attribute?

Hallo zusammen,

Wenn ich auf den Button "Map" klicke, wird am rechten Bildschirmrand die Google Map eingeblendet und der Button "Map" verändert sich. Drücke ich auf den veränderten Button "Map", so schließt sich die Google Map und der Button wird wieder so angezeigt wie zu beginn.

Wenn ich auf den Button "Info" klicke, wird an der selben Stelle ein Infofenster angezeigt und die komplette Navigation verschwindet. Drücke ich in das Infofenster, so schließt sich das Infofenster und die komplette Navigation wird wieder angezeigt.

Das klappt auch alles super!

Ich möchte aber gerne das folgendes passiert.

Drücke ich "Map" wird die Map angezeigt.
Drücke ich dann auf "Info" - soll die Map verschwinden, die komplette Navigation verschwinden und das Infofenster soll angezeigt werden.
Drücke ich dann in das Infofenster, soll die komplette Navigation angezeigt werden und der Map Button soll wieder wie zu beginn angezeigt werden (weil die Map ja durch den Info Button geschlossen worden ist).

Hoffe man versteh was ich meine?

Ich könnte mir vorstellen, dass ich irgendwas bei der Action "showinfo" und oder "hideinfo" eintragen muss. Ich versteh das mit den "if" nicht. Also wenn etwas so ist, dann sollte jenes passieren.

Liebe Grüße
Noob

Hier 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
<!-- navigation bar links -->				
	 <plugin name="slide" keep="true" zorder="-1"  url="grafik/slide_01.png" handcursor="false" alpha="0.3" jsborder="1px  solid #FFFFFF" effect="glow(0xFFFFFF,1.0,2,10000)" blendmode="normal"  smoothing="true" x="0" y="0" align="left" edge="left" width="200"  height="100%" />
<!-- zoom grafiken -->				
	 <plugin name="in"  devices="android" zorder="1" align="lefttop"  height="prop" keep="true" ondown="set(fov_moveforce,-1);"  onhover="tween(scale, 1.4);" onout="tween(scale, 1);"  onup="set(fov_moveforce,0);" url="icons/zoomin_01.png" width="45" x="20"  y="260" />
	
	<plugin name="out" devices="android"  zorder="1" align="lefttop" height="prop" keep="true"  ondown="set(fov_moveforce,+1);"  onhover="showtext(Einzoomen);tween(scale, 1.4);" onout="tween(scale,  1);" onup="set(fov_moveforce,0);" url="icons/zoomout_01.png" width="45"  x="120" y="260"/>
<!--autorotaion grafiken -->	
	 <plugin name="autorotationON"  zorder="1" align="lefttop"  blendmode="normal" customColor="true" height="prop" keep="true"  onclick="switch(autorotate.enabled);set(plugin[autorotationON].visible,false);  set(plugin[autorotationOFF].visible,true);" onhover="showtext(Rotation  aus..., infostyle);tween(scale, 1.4);" onout="tween(scale, 1);"  url="icons/rotateoff_01.png" visible="" width="35" x="140" y="20"/>
	
	 <plugin name="autorotationOFF"  zorder="1" align="lefttop"  blendmode="normal" customColor="true" height="prop" keep="true"  onclick="switch(autorotate.enabled);set(plugin[autorotationOFF].visible,false);  set(plugin[autorotationON].visible,true);" onhover="showtext(Rotation  an..., infostyle);tween(scale, 1.4);" onout="tween(scale, 1);"  url="icons/rotate_01.png" visible="false" width="35" x="140" y="20"/>
	
<!-- vollbild garfiken -->	
	 <plugin name="openfs"  zorder="1" align="lefttop" blendmode="normal"  customColor="true" height="prop" keep="true"  onclick="set(fullscreen,true);" onhover="showtext(Vollbild an...,  infostyle);tween(scale, 1.4);" onout="tween(scale, 1);"   url="icons/full_01.png" width="35" x="80" y="20"/>
	
	 <plugin name="closefs"  zorder="1" align="lefttop" blendmode="normal"  customColor="true" height="prop" keep="true"  onclick="set(fullscreen,false);" onhover="showtext(Vollbild aus...,  infostyle);tween(scale, 1.4);" onout="tween(scale, 1);"  url="icons/full_01.png" visible="false" width="35" x="80" y="20"/>

<!-- hife grafiken -->	
	 <plugin name="help"  zorder="1" align="lefttop" customColor="true"  height="prop" keep="true" onclick="displayHelp();"  onhover="showtext(Hilfefenster..., infostyle);tween(scale, 1.4);"  onout="tween(scale, 1);" url="icons/help_01.png" width="35" x="20"  y="80"/>

<!-- navigation verstecken/anzeigen grafiken -->	
	 <plugin name="navigationClose"  zorder="1" align="lefttop"  customColor="true" height="prop" keep="true" onclick="action(hidemenu);"  onhover="showtext(Menü ausblenden..., infostyle);tween(scale, 1.4);"  onout="tween(scale, 1);" url="icons/arrow_left_01.png" width="35" x="20"  y="20"/>
	
	<plugin name="navigationOpen" zorder="1"  visible="false" align="leftcenter" customColor="true" height="prop"  keep="true" alpha="0.3" onclick="action(showmenu);"  onhover="tween(scale, 1.4);" onout="tween(scale, 1);"  url="grafik/menu_01.png" width="25" x="0" y="0"/>
	
<!-- musik grafiken -->	
	 <plugin name="musik_an"  zorder="1" align="lefttop"  blendmode="normal" customColor="true" height="prop" keep="true"  onclick="action(musik_an);" onhover="showtext(Musik einschalten...,  infostyle);tween(scale, 1.4);" onout="tween(scale, 1);"  url="icons/musik_an.png" visible="false" width="35" x="20" y="140"/>
	
	 <plugin name="musik_aus"  zorder="1" align="lefttop"  blendmode="normal" customColor="true" height="prop" keep="true"  onclick="action(musik_aus);"  onhover="showtext(Musik abschalten...,  infostyle);tween(scale, 1.4);" onout="tween(scale, 1);"  url="icons/musik_aus.png" visible="" width="35" x="20" y="140"/>
	
<!-- musik aktion -->	
	<action name="musik_aus">
			set(plugin[soundinterface].mute,true);
			set(plugin[musik_aus].visible,false);
			set(plugin[musik_aus].enable,false);
			set(plugin[musik_an].visible,true);
			set(plugin[musik].visible,false);
	</action>
	<action name="musik_an">
			set(plugin[soundinterface].mute,false);
			set(plugin[musik_aus].visible,true);
			set(plugin[musik_an].visible,false);
			set(plugin[musik_an].enable,false);
			set(plugin[musik].visible,true);
	</action>
			
<!-- thumb garfiken -->
	 <plugin name="tumb_01"  zorder="1" align="bottomleft"  customColor="true"  jsborder="1px solid #FFFFFF"  effect="glow(0xFFFFFF,1.0,2,10000)" keep="true" alpha="0.6"  onclick="loadscene(scene_panorama_01),null,MERGE,BLEND(1));set(events.onloadcomplete,null);"  onhover="showtext(Hotspot 1...,infostyle);tween(scale, 1.1);"  onout="tween(scale, 1);" url="grafik/thumb_01.jpg" width="60"  height="30" x="20" y="30"/>	
	
	<plugin  name="tumb_02"   zorder="1" align="bottomleft" customColor="true"   jsborder="1px solid #FFFFFF" effect="glow(0xFFFFFF,1.0,2,10000)"  keep="true" alpha="0.6"  onclick="loadscene(scene_panorama_02),null,MERGE,BLEND(1));set(events.onloadcomplete,null);"  onhover="showtext(Hotspot 2..., infostyle);tween(scale, 1.1);"  onout="tween(scale, 1);" url="grafik/thumb_02.jpg" width="60"  height="30" x="100" y="30"/>	
	
<!-- info grafiken -->
<plugin  name="info"   zorder="1" align="lefttop" customColor="true"   keep="true" onclick="action(showinfo);"  onhover="showtext(Informationen..., infostyle);tween(scale, 1.4);"  onout="tween(scale, 1);" url="icons/info_01.png"  width="35"  height="prop" x="80" y="80"/>
	
<plugin name="info_01"	 handcursor="false" align="centerright" customColor="true"   jsborder="1px solid #FFFFFF" effect="glow(0xFFFFFF,1.0,2,10000)"  keep="true" alpha="0.3" onclick="action(hideinfo);"  onhover="showtext(Schließen);" onout="tween(scale, 1);"  url="grafik/slide_02.png" 	x="-1000" y="0"/>

<plugin  name="info_02"	handcursor="false" align="centerright"  customColor="true"  keep="true" onclick="action(hideinfo);"  onout="tween(scale, 1);" url="grafik/slide_03.png"	x="-1000"  y="0"/>
	
<!-- google map grafiken -->	
	<plugin name="panotourmapsthumbon"	
			keep="true" 
			width="35" height="prop"
			align="lefttop" x="140" y="80" 
			url="icons/map.png"  
			onclick="openpanotourmaps());" 
			devices="flash"  
			onhover="showtext(Karte anzeigen..., infostyle);tween(scale, 1.4);" onout="tween(scale, 1);"
			/>
			
	<plugin name="panotourmapsthumboff"	
			keep="true" 
			width="35" height="prop"
			align="lefttop" x="140" y="80" 
			url="icons/mapoff.png" 
			onclick="closepanotourmaps();" 
			devices="flash"  
			onhover="showtext(Karte verbergen..., infostyle);tween(scale, 1.4);" onout="tween(scale, 1);"
			visible="false"
			/>
			
	<plugin name="mapthumb" 
			url="grafik/slide_04.png"
			keep="true" 
			align="centerright" 
			height="53%" 
			width="36%" 
			x="-800" y="0"  
			jsborder="1px solid #FFFFFF" effect="glow(0xFFFFFF,1.0,2,10000)" 
			alpha="0.3" 
			handcursor="false"
			/>
	
<!-- hide info-->		
		<action name="hideinfo">
				tween(plugin[info].x,80,0.5);
				tween(plugin[info_01].x,-1000,0.5);
				tween(plugin[info_02].x,-1000,0.5);
				tween(plugin[panotourmapsthumbon].x,140,0.5);
				tween(plugin[panotourmapsthumboff].x,140,0.5);
				tween(plugin[musik_aus].x,20,0.5);
				tween(plugin[musik_an].x,20,0.5);
				tween(plugin[autorotationON].x,140,0.5);
				tween(plugin[autorotationOFF].x,140,0.5);
				tween(plugin[in].x,20,0.5);
				tween(plugin[out].x,120,0.5);
				tween(plugin[slide].x,0,0.5);
				tween(plugin[tumb_01].x,10,0.5);
				tween(plugin[tumb_02].x,100,0.5);
				tween(plugin[help].x,20,0.5);
				tween(plugin[openfs].x,80,0.5);
				tween(plugin[closefs].x,80,0.5);
				tween(plugin[navigationClose].x,20,0.5);
				set(plugin[navigationOpen].visible,false);
				set(plugin[navigationOpen].enable,false);
		</action>
		<action name="showinfo">
			tween(plugin[info].x,-100,0.5);
			tween(plugin[info_01].x,0,1.5);
			tween(plugin[info_02].x,-5,1.5);
			tween(plugin[panotourmapsthumbon].x,-100,0.5);
			tween(plugin[panotourmapsthumboff].x,-100,0.5);
			tween(plugin[musik_aus].x,-100,0.5);
			tween(plugin[musik_an].x,-100,0.5);
			tween(plugin[autorotationON].x,-100,0.5);
			tween(plugin[autorotationOFF].x,-100,0.5);
			tween(plugin[in].x,-80,0.5);
			tween(plugin[out].x,-80,0.5);
			tween(plugin[slide].x,-200,0.5);
			tween(plugin[tumb_01].x,-100,0.5);
			tween(plugin[tumb_02].x,-100,0.5);
			tween(plugin[help].x,-100,0.5);
			tween(plugin[openfs].x,-100,0.5);
			tween(plugin[closefs].x,-100,0.5);
			tween(plugin[navigationClose].x,-100,0.5);
			set(plugin[navigationOpen].visible,true);
		</action>

<!-- hide navigation-->	
	<action name="hidemenu">
			tween(plugin[info].x,-100,0.5);
			tween(plugin[panotourmapsthumbon].x,-100,0.5);
			tween(plugin[panotourmapsthumboff].x,-100,0.5);
			tween(plugin[musik_aus].x,-100,0.5);
			tween(plugin[musik_an].x,-100,0.5);
			tween(plugin[autorotationON].x,-100,0.5);
			tween(plugin[autorotationOFF].x,-100,0.5);
			tween(plugin[in].x,-80,0.5);
			tween(plugin[out].x,-80,0.5);
			tween(plugin[slide].x,-200,0.5);
			tween(plugin[tumb_01].x,-100,0.5);
			tween(plugin[tumb_02].x,-100,0.5);
			tween(plugin[help].x,-100,0.5);
			tween(plugin[openfs].x,-100,0.5);
			tween(plugin[closefs].x,-100,0.5);
			tween(plugin[navigationClose].x,-100,0.5);
			set(plugin[navigationOpen].visible,true);
	</action>
	<action name="showmenu">
			tween(plugin[info].x,80,0.5);
			tween(plugin[info_01].x,-1000,0.5);
			tween(plugin[info_02].x,-1000,0.5);
			tween(plugin[panotourmapsthumbon].x,140,0.5);
			tween(plugin[panotourmapsthumboff].x,140,0.5);
			tween(plugin[musik_aus].x,20,0.5);
			tween(plugin[musik_an].x,20,0.5);
			tween(plugin[autorotationON].x,140,0.5);
			tween(plugin[autorotationOFF].x,140,0.5);
			tween(plugin[in].x,20,0.5);
			tween(plugin[out].x,120,0.5);
			tween(plugin[slide].x,0,0.5);
			tween(plugin[tumb_01].x,10,0.5);
			tween(plugin[tumb_02].x,100,0.5);
			tween(plugin[help].x,20,0.5);
			tween(plugin[openfs].x,80,0.5);
			tween(plugin[closefs].x,80,0.5);
			tween(plugin[navigationClose].x,20,0.5);
			set(plugin[navigationOpen].visible,false);
			set(plugin[navigationOpen].enable,false);
	</action>
<!-- google map -->
	<plugin name="panotourmaps" 
			parent="STAGE" 
			keep="true" 
			devices="flash" 
			url="../plugins/panotourmaps.swf"  
			zoom="14" 
			maptype="NORMAL" 
			lat="47.064645346982196" lng="12.827637791633606" 
			align="centerright" 
			y="0" x="-800"
			height="50%" width="35%" 
			key="ABQIAAAAEDDIdvtiD4nlNnp2_YqMaRRB0BJ3DSeN3kY4zseb1l5MvfcxIRQUmpCoJLGiziGmq6QQGvGPD8w61w"
			viewmode="3D" pitch="45.0" roll="0.0" yaw="-90.0"
			>
		<navigationcontrol  visible="true" />
    	<maptypecontrol 	visible="true" buttonalign="V" />
				
    	<spot name="panotourmapsspot1" 
			onclick="loadscene(scene_panorama_01, null, MERGE, BLEND(1);"
			url="../hotspots/spot1.png" onhover="showtext(Hotspot 1, buttonstyle);" 
			lat="47.06350525701756" lng="12.830480933189392" 
			heading="0" 
			width="45" height="45"
			/>
		<spot name="panotourmapsspot2" 
			onclick="loadscene(scene_panorama_02,null,MERGE,BLEND(1));" 
			url="../hotspots/spot1.png" 
			onhover="showtext(Hotspot 2, buttonstyle);" 
			lat="47.06492305751135" lng="12.826243042945862" 
			heading="0" 
			width="45" height="45"
			/>			
	</plugin>
	
	
	<action name="openpanotourmaps">
		if (isflash,
		set(plugin[panotourmapsthumbon].mapsopened,'true');
		set(plugin[panotourmapsthumboff].visible,true);
		set(plugin[panotourmapsthumbon].visible,false);
		tween(plugin[panotourmaps].x,0);
		tween(plugin[mapthumb].x,0);
		if (mapready,
		plugin[panotourmaps].showControls();
		,);
		,);
	</action>
	<action name="closepanotourmaps">
		if (isflash,
		set(plugin[panotourmapsthumboff].mapsopened,'false');
		set(plugin[panotourmapsthumbon].visible,true);
		set(plugin[panotourmapsthumboff].visible,false);
		tween(plugin[panotourmaps].x,-35%);
		tween(plugin[mapthumb].x,-37%);
		if (mapready,
		plugin[panotourmaps].hideControls();
		,);
		,);
	</action>

Similar threads