Hi,
z.B. so:
erstmal zwei Actions zum ein-/ausblenden eines
Hotspots,
als Parameter muss jeweils der Name oder Index des Hotpots angegeben werden:
|
Quellcode
|
1
2
3
4
5
6
7
8
|
<action name="hidehotspot">
tween(hotspot[%1].alpha, 0, 0.5, default, set(hotspot[%1].visible,false) );
</action>
<action name="showhotspot">
set(hotspot[%1].visible, true);
tween(hotspot[%1].alpha, 1.0);
</action>
|
dann hier eine Action um alle
Hotspots auszublenden:
|
Quellcode
|
1
2
3
4
5
6
7
8
|
<action name="hideallhotspots">
if(%1 != NEXT, set(i,0) );
hidehotspot( get(hotspot[%i].name) );
inc(i);
if(i LT hotspot.count, hideallhotspots(NEXT) );
</action>
|
um jetzt weiter nur bestimmte
Hotspots einblenden zu können,
müssen diese irgendein Unterscheidungsmerkmal haben,
der "url" Parameter kann hier nicht verwendet werden, da dieser
beim Laden unter Umständen verändert/angepasst wurde,
also z.B. jedem (gewünschtem)
Hotspots die Variable "kategorie" mit einem
bestimmten Wert hinzufügen (z.B. "Kunst"):
|
Quellcode
|
1
|
<hotspot ... kategorie="Kunst" ... />
|
dann können mit dieser Action nur die
Hotspots mit dieser Kategorie angezeigt werden:
|
Quellcode
|
1
2
3
4
5
6
7
8
|
<action name="showhotspots">
if(%1 != NEXT, set(i,0) );
if(hotspot[%i].kategorie == "Kunst", showhotspot( get(hotspot[%i].name) ) );
inc(i);
if(i LT hotspot.count, showhotspots(NEXT) );
</action>
|
Schöne Grüße,
Klaus