Sie sind nicht angemeldet.

niconutsch

Fortgeschrittener

  • »niconutsch« ist der Autor dieses Themas

Beiträge: 128

Wohnort: hall in tirol

Beruf: fotograph

  • Nachricht senden

1

Dienstag, 10. November 2020, 17:32

set all hotspots visible, false except a more defined one

dear forum
dear klaus

with this action ....

<action name="hideallhotspots">
for( set(i, 0), i LT hotspot.count, inc(i),
set( hotspot[get(i)].visible, false););
</action>

.....we hide all hotspots, but is it possible to keep a defined (lets call it hotspot_sponsorlogo) visible,true

thanks for help
wbr
klaus

Beiträge: 1 117

Wohnort: Poland, Europe

Beruf: krpano developer : virtual tours : the cms4vr owner

  • Nachricht senden

2

Dienstag, 10. November 2020, 19:32

You can do it like this:


Quellcode

1
<hotspot ... tag="client_logo" />


Quellcode

1
2
3
for(set(i,0), i LT hotspot.count, inc(i), 
  if(hotspot[get(i)].tag != 'client_logo', set(hotspot[get(i)].visible, false))
);



Piotr
Your own professional, online cloud tool for creating virtual tours - www.cms4vr.com

facebook page :: youtube :: wiki.cms4vr.com

cms4vr team *thumbsup*

niconutsch

Fortgeschrittener

  • »niconutsch« ist der Autor dieses Themas

Beiträge: 128

Wohnort: hall in tirol

Beruf: fotograph

  • Nachricht senden

3

Dienstag, 10. November 2020, 20:35

dear spacerywirtualne
thanks for help

i have changed the code for setting alpha insteade visibility like this...

<action name="hideallhotspots">
for( set(i, 0), i LT hotspot.count, inc(i),
set( hotspot[get(i)].alpha, 0.1););
</action>

<action name="shoeallhotspots">
for( set(i, 0), i LT hotspot.count, inc(i),
if(hotspot[get(i)].tag != 'client_logo', tween( hotspot[get(i)].alpha,1,2,easyInOutQuint);););
</action>

and now something strange happens.
the code works for all hotspots, except for the hotspot immediately following the hotspot_"sponsorlogo hotspot". this one doesnot tween alpha to 1

<hotspot name="Stationensponsor" tag="client_logo"
title="Stationensponsor"
url="%HTMLPATH%/a.files/infos/logos/sta_la.jpg"
visible="false"
alpha="0"
ath="00" atv="-10"
distorted="true"
rx="-10.0" ry="0.0" rz="0.0"
width="310" height="prop"
scale="1"
zorder="9999"
onloaded="delayedcall(3,action_stationensponsor())"
onclick="tween(scale,1,1);tween(alpha,1,1);delayedcall(2,tween(scale,0.2,3,easeinoutquart);tween(alpha,0.3,1))"/>

<hotspot name="spot1" tag="sepp" alpha="1.0" style="skin_hotspotstyle" ath="6.9" atv="32.3" linkedscene="scene_002_1" />


<hotspot name="Die Georgskapelle" title="Die Georgskapelle"
style="skin_hotspotstyle_infoicon"
ath="11.244" atv="1.543"
keep="false"
bild="false"
url_bild=""
close="false"
weiter="false"
fotos="false"
movie="true"
onclickC=""
onclickW=""
onclickF=""
onclickM="if(webvr.isenabled, loadscene(scene_002_1, null, MERGE,BLEND(2)); removehotspot(get(hotspot_name)); removehotspot(sat_movie),
loadscene(scene_002_1, null, MERGE,BLEND(2)); tween(view.hlookat,0, 3.0, easeInOutQuint); tween(view.vlookat,0, 3.0, easeInOutQuint);tween(view.fov,123, 3.0, easeOutQuad);wait(3.0);)"
onclick= "action(infowindow_oncklick001)"/>

<hotspot name="Burg Hasegg" title="Burg Hasegg"
style="skin_hotspotstyle_target"
ath="180" atv="11"
scale="1"
keep="false"
visible="true"
alpha="1.0"
enabled="true"
onclick= "next_tour_burg()"/>


if i change the order of the hotspots, it is always the next hotspot to hotspot_sponsorlogo,
which does not appear??????

I tried to give it another tag designation , but without success.

Beiträge: 1 117

Wohnort: Poland, Europe

Beruf: krpano developer : virtual tours : the cms4vr owner

  • Nachricht senden

4

Dienstag, 10. November 2020, 22:04

The TWEEN action is not usable for such a use in the for loop.


Quellcode

1
if(hotspot[get(i)].tag != 'client_logo', callwith(hotspot[get(i)], tween(alpha,1,2,easyInOutQuint);););

or

Quellcode

1
2
3
4
5
6
...
if(hotspot[get(i)].tag != 'client_logo', cwh(get(i)));
...
<action name="cwh">
tween(hotspot[%1].alpha,1,2,easyInOutQuint);
</action>


Try, and try until you get there. *thumbup*


Piotr
Your own professional, online cloud tool for creating virtual tours - www.cms4vr.com

facebook page :: youtube :: wiki.cms4vr.com

cms4vr team *thumbsup*