Sie sind nicht angemeldet.

Lieber Besucher, herzlich willkommen bei: krpano.com Forum. Falls dies Ihr erster Besuch auf dieser Seite ist, lesen Sie sich bitte die Hilfe durch. Dort wird Ihnen die Bedienung dieser Seite näher erläutert. Darüber hinaus sollten Sie sich registrieren, um alle Funktionen dieser Seite nutzen zu können. Benutzen Sie das Registrierungsformular, um sich zu registrieren oder informieren Sie sich ausführlich über den Registrierungsvorgang. Falls Sie sich bereits zu einem früheren Zeitpunkt registriert haben, können Sie sich hier anmelden.

1

Montag, 2. März 2015, 12:32

How to hide a Groupe of Hotspots with a TAG

Hi,

I'm trying to hide and unhide a groupe a Hotspot with a Tag.

Here is my code :

I creat the Action

Quellcode

1
2
3
4
5
6
7
<action name="hideHotSpotsNiveau1">
  for(set(i,0), i LT hotspot.count, inc(i), 
	if(hotspot[get(i)].tag == hs, 
    	set(hotspot[get(i)].visible,false); 
  	); 
   );
</action>

I creat a button that will hide and unhide the Groupe of Hostpot

Quellcode

1
<layer name="Hotspotsniveau1" url="images/user_male.png" align="leftttop" x="5" y="150" scale="0.5"  keep="true" zorder="-1" onclick="switch(hideHotSpotsNiveau1)"/>

I creat a hotspot with the Tag

Quellcode

1
<hotspot name="spot4" style="skin_hotspotstyle" ath="5.307" atv="19.451" linkedscene="scene_villa-suar1" tag="hs" visible=""/>


Thanks a lot for your help and feedback. :)

Tuur

Erleuchteter

Beiträge: 3 839

Wohnort: Netherlands

Beruf: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Nachricht senden

3

Montag, 2. März 2015, 13:40

Hi Tuur,

Thanks for the link but I don't understand what's wrong in my code ?

Can you help me ? I'm lost. *blink*

Thanks.

5

Montag, 2. März 2015, 16:14

I have another problem :

I have several Scene, When I click to activate the Hotspot with the Tag "niveau1" it works with One Scene.

Now If I go to the second scene and go back to the First Scene all the Hotspot with the tag "niveau1" are not visible.

How can I solve this ?

Here is my code :

This Layer Show and Hide the Hotspots with the Tag "HS"

Quellcode

1
2
<layer name="Hotspotsniveau1" url="images/user_male.png" align="leftttop" onhover="showtext(Administrateur,info-bulle)"  x="5" y="150" scale="0.5"
keep="true" zorder="-1" onclick="for(set(i,0), i LT hotspot.count, inc(i),if(hotspot[get(i)].tag == niveau1, switch(hotspot[get(i)].visible,false,true)););"/>


Here is the code to the Hotspot

Quellcode

1
<hotspot name="spot6" style="skin_hotspotstyle" ath="68.087" atv="-8.345" linkedscene="salon-prive" tag="niveau1" visible="false" />


Thanks for your help. ;-)

6

Dienstag, 3. März 2015, 10:55

Does your style skin_hotspotstyle have keep="true" IF not than this is normal that they are hidden as they are created when new scene is loaded and you see you have visible set to false.

7

Dienstag, 3. März 2015, 14:04

Hi Umalo,

Thanks for your feedback but I don't understand what you mean. *confused*

8

Dienstag, 3. März 2015, 17:50

Can you share link to this code to see how your style is defined?

9

Mittwoch, 4. März 2015, 09:12

Here is the code :

Quellcode

1
2
3
4
5
<style name="skin_hotspotstyle" url="vtourskin_hotspot.png" scale="0.5" edge="top" oy="0" distorted="false"
	   	tooltip=""
	   	onclick="if(linkedscene, skin_hidetooltips(); tween(scale,0.25,0.5); tween(oy,-20,0.5); tween(alpha,0,0.5); looktohotspot(); loadscene(get(linkedscene),null,MERGE,BLEND(1)); skin_updatescroll(); );"
	   	onloaded="if(skin_settings.tooltips_hotspots, if(linkedscene, copy(tooltip,scene[get(linkedscene)].title); loadstyle(skin_tooltips); ));"
	   	/>

10

Mittwoch, 4. März 2015, 10:36

Aha. Your style is pretty much the Krpano's style for arrows with no keep="true" attrbute set. That mean when next scene is loaded all this hotspots are removed from memory as most problably you don't want to see arrows from previous room in e.g bathroom. This what you want is little bit more complex. You would need to set keep="true" and introduce hotspots visibility handler which will trigger on e.g. event onnewpano. There you will need additional attribute to keep current visibility status to know should one hotpost be currently visible or not. This is influenced by current scene loaded and based on previous action like you use to hide/show based on tagging. Go in this direction and let us know about your progress.