Sie sind nicht angemeldet.

1

Mittwoch, 29. Juli 2015, 19:51

[Solved] make hotspot invisible in little planet works with Flash , not HTML5

Hi,

little problem again,
when i add dynamically hotspots with addhotspot,
and i want them invisible for little planet view,
the following code not works in html5 but works in flash

Quellcode

1
set(hotspot.visible, false);


with normal hotspots (not by addhotspot)
code works in flash and html5
krp.119.pr2

why ?

thanks

z

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »zadda« (6. September 2015, 13:19)


2

Dienstag, 4. August 2015, 17:08

Hi,

the hotspot.visible, hotspot.alpha settings are currently Flash-only - see here:
http://krpano.com/docu/html5/#supportedfunctionality

In the Flash version all the hotspots are with an internal layer and these settings are controlling the visibility of that layer. The HTML5 used internally a different organization (due technical reasons) and therefore this is not directly supported there.

Best regards,
Klaus

3

Dienstag, 4. August 2015, 23:08

Ah ok,

But when i enterVR in html5 my hotspots disappear.. *confused*

Thanks for the answer :-)

Z

4

Mittwoch, 5. August 2015, 00:22

Quellcode

1
set(hotspot[hotspotname].distorted,true);

5

Mittwoch, 5. August 2015, 20:56

@tmhok
This make only hotspot smaller in little planet..

6

Mittwoch, 12. August 2015, 07:49

Hi,

here an action for hiding or showing all hotspots:

Quellcode

1
2
3
<action name="set_all_hotspot_visible">
  for(set(i,0), i LT hotspot.count, inc(i), set(hotspot[get(i)].visible, %1) );
</action>


To hide all hotspots call:

Quellcode

1
set_all_hotspot_visible(false);


and for showing them:

Quellcode

1
set_all_hotspot_visible(true);


Best regards,
Klaus

7

Mittwoch, 12. August 2015, 16:08

Thanks Klaus for replying

but that not works *cry*

not only my hotspot remain visible when entering little planet but the webVR hotspot target become visible when exiting ...
and invisible when re-entering little planet, it mean your code is correct *thumbup* but it doesn't works on my hotspots.... *sad*

my hotspots are added with addhotspot in an action like this :

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<style name="hotspots_style" onloaded="" 
		 url="%FIRSTXML%/gfx/skin/hotspot.png" type="image" devices="all" distorted="false"
		 keep="false" zoom="false" width="143" height="143" scale="0.5" altscale="0.5" scalechildren="false" rotate="0" rx="0" ry="0" rz="0" 
		 edge="center" handcursor="true" visible="true" enabled="true" capture="true" children="false" zorder="0" alpha="0.8" blendmode="normal" smoothing="true" refreshrate="auto" details="8"
		 flying="0" inverserotation="true" usecontentsize="false" 
		 onover="tween(hotspot[get(name)].alpha,1);" onout="tween(hotspot[get(name)].alpha,0.8);" 
		 onup="tween(plugin[on_over].alpha, 0, 0.3);"
		/>

	<action name="extra_stuff_pano_06_set_01">	
<!--  hotspot loading pano 07 set 01 -->	
	addhotspot(hotspot_to_pano_07_set_01);
	hotspot[hotspot_to_pano_07_set_01].loadstyle(hotspots_style); <!-- -->
	set(hotspot[hotspot_to_pano_07_set_01].ath, -0.21021293084334658);
	set(hotspot[hotspot_to_pano_07_set_01].atv, 14.4284036031504539661);
	set(hotspot[hotspot_to_pano_07_set_01].ondown, set(plugin[on_over].parent, hotspot[hotspot_to_pano_07_set_01]);tween(plugin[on_over].alpha, 1, 0.3););
	set(hotspot[hotspot_to_pano_07_set_01].onclick, set(hotspot_clicked, true);
		lookto(get(hotspot[hotspot_to_pano_07_set_01].ath), 0, 80, smooth(100,50,100));
		action(setup_pano_07_set_01);set(hlookat_custom, 0);set(vlookat_custom, 0);action(load_pano);action(extra_stuff_pano_07_set_01););
		</action>


is there something to add ? *confused*

Thanks

z

8

Dienstag, 18. August 2015, 20:44

Hi,

please show your full example - e.g. when do you add your hotspots? only once at startup?

And about showing and hiding only specific hotspots - you could add a custom attribute to them and then check in the for loop for that.

Best regards,
Klaus

9

Sonntag, 6. September 2015, 13:22

alright,
fixed now :-)
there was another action with same name overriding the previous one...

i've added a specific attributes too to avoid make visible webVR hotspot and play only with arrow hotspot.


Thanks