Hallo,
mir raucht der Kopf und nun weiß ich nicht weiter.
Ich möchte über ein und dasselbe Icon eine Map ein- und ausblenden.
Das Einblenden klappt, aber ich möchte durch erneuten Klick auf das Icon die Map auch wieder ausblenden.
Der Code sieht bei mir so aus:
|
Quellcode
|
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
|
<plugin name="mapicon"
url="skin/map_icon.png"
align="topleft" width="30" height="30" x="117" y="13"
keep="true"
zorder="99999999"
handcursor="true"
alpha="1"
visible="true"
onclick="action(showmap)"
/>
<layer name="map" url="skin/map.png"
keep="true"
align="center"
alpha="1"
handcursor="true"
scalechildren="true"
width="520"
height="520"
onhover=""
onclick="action(hidemap);"
visible="false" />
<action name="hidemap">
tween(layer[map].alpha,0,,,set(layer[map].visible,false));
</action>
<action name="showmap">
set(layer[map].visible,true); tween(plugin[map].alpha,1);
</action>
|
Kann mir jemand sagen, wie ich das umsetzen kann?
Danke im voraus.