Sie sind nicht angemeldet.

vasin

Schüler

  • »vasin« ist der Autor dieses Themas

Beiträge: 93

Wohnort: bangkok

Beruf: photographer

  • Nachricht senden

1

Mittwoch, 18. Dezember 2013, 10:59

tooltips hotspots to display text all time

Hello

Is there a way to display text on the hotspot all the time without mouse over?

Any input would be very well appreciated.
Thank you

Vasin
at-bangkok.com

panomaster

Fortgeschrittener

Beiträge: 297

Wohnort: Kobyłka, Poland

Beruf: Virtual Tours - Spherical Panoramas - Krpano developer

  • Nachricht senden

2

Mittwoch, 18. Dezember 2013, 12:20

Add textfields as childs of hotspots.

vasin

Schüler

  • »vasin« ist der Autor dieses Themas

Beiträge: 93

Wohnort: bangkok

Beruf: photographer

  • Nachricht senden

3

Mittwoch, 18. Dezember 2013, 13:13

Hello

Thanks panomaster

I'm not very familiar with xml. Can you maybe provide an example.



Thank you!

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »vasin« (18. Dezember 2013, 14:54)


vasin

Schüler

  • »vasin« ist der Autor dieses Themas

Beiträge: 93

Wohnort: bangkok

Beruf: photographer

  • Nachricht senden

4

Mittwoch, 18. Dezember 2013, 13:19

This is the part of the xml code from the make virtual tour droplet.

<skin_settings bingmaps="false"
bingmaps_key=""
bingmaps_zoombuttons="false"
gyro="true"
thumbs_width="120" thumbs_height="80" thumbs_padding="10" thumbs_crop="0|40|240|160"
thumbs_opened="false"
thumbs_text="true"
thumbs_dragging="true"
thumbs_onhoverscrolling="false"
thumbs_scrollbuttons="false"
thumbs_scrollindicator="false"
tooltips_thumbs="true"
tooltips_hotspots="true"
tooltips_mapspots="false"
controlbar_offset="20"
/>

The line tooltips_hotspots="true" enables text to display when mouse is over the hotspot. Can we put a line of code so the text display all the time?

Dieser Beitrag wurde bereits 2 mal editiert, zuletzt von »vasin« (19. Dezember 2013, 04:34)


vasin

Schüler

  • »vasin« ist der Autor dieses Themas

Beiträge: 93

Wohnort: bangkok

Beruf: photographer

  • Nachricht senden

5

Freitag, 20. Dezember 2013, 08:32

Any input please?
Thank you

Beiträge: 1 120

Wohnort: Angers - France

Beruf: 360 experiences creator

  • Nachricht senden

6

Freitag, 20. Dezember 2013, 10:18

<hotspot name="hs1" ath="" atv="" url="" .../>
<plugin name="mytext" url="texfield.swf" parent="hs1" html="Text to display" width="" height="".../>

vasin

Schüler

  • »vasin« ist der Autor dieses Themas

Beiträge: 93

Wohnort: bangkok

Beruf: photographer

  • Nachricht senden

7

Montag, 23. Dezember 2013, 10:22


</plugin>
Thank you Jerombg!

Is it possible to do it all at once so it could be changed globally?



This is the part of the xml code from the make virtual tour droplet. I'm guessing adding a line at the tooltips_hotspots.??


<skin_settings bingmaps="false"
bingmaps_key=""
bingmaps_zoombuttons="false"
gyro="true"
thumbs_width="120" thumbs_height="80" thumbs_padding="10" thumbs_crop="0|40|240|160"
thumbs_opened="false"
thumbs_text="true"
thumbs_dragging="true"
thumbs_onhoverscrolling="false"
thumbs_scrollbuttons="false"
thumbs_scrollindicator="false"
tooltips_thumbs="true"
tooltips_hotspots="true"
tooltips_mapspots="false"
controlbar_offset="20"
/>

The line tooltips_hotspots="true" enables text to display when mouse is over the hotspot. Can we put a line of code so the text display all the time?

8

Montag, 23. Dezember 2013, 10:47

Hi,

here a way to add such tooltips automatically - replace the current 'skin_hotspotstyle' code in the vtourskin.xml with this one:

Here the onloaded event was replaced and an action added which creates and adds new textfields for each hotspot:

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
<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="add_all_the_time_tooltip();"
       />

<action name="add_all_the_time_tooltip">
    txtadd(tooltipname, 'tooltip_', get(name));
    addplugin(get(tooltipname));
    txtadd(plugin[get(tooltipname)].parent, 'hotspot[', get(name), ']');
    set(plugin[get(tooltipname)].url,'%SWFPATH%/plugins/textfield.swf');
    set(plugin[get(tooltipname)].align,top);
    set(plugin[get(tooltipname)].edge,bottom);
    set(plugin[get(tooltipname)].x,0);
    set(plugin[get(tooltipname)].y,0);
    set(plugin[get(tooltipname)].width,200);
    set(plugin[get(tooltipname)].autoheight,true);
    set(plugin[get(tooltipname)].background,false);
    set(plugin[get(tooltipname)].border,false);
    set(plugin[get(tooltipname)].css,'text-align:center; color:#FFFFFF; font-family:Arial; font-weight:bold; font-size:16px;');
    set(plugin[get(tooltipname)].textshadow,1);
    set(plugin[get(tooltipname)].textshadowrange,6.0);
    set(plugin[get(tooltipname)].textshadowangle,90);
    copy(plugin[get(tooltipname)].html,scene[get(linkedscene)].title);
    set(plugin[get(tooltipname)].enabled,false);
</action>


Best regards,
Klaus

vasin

Schüler

  • »vasin« ist der Autor dieses Themas

Beiträge: 93

Wohnort: bangkok

Beruf: photographer

  • Nachricht senden

9

Dienstag, 24. Dezember 2013, 05:14

Hello Klaus

That was great Thank you!

10

Dienstag, 31. Dezember 2013, 19:16

I did this awhile back but found that for non-flash tours the text wouldn't show. Does the text now appear across all platforms?

11

Donnerstag, 2. Januar 2014, 12:55

The example from above will work the same in Flash and HTML5.

12

Montag, 11. Juli 2016, 20:42

I can't use it with animation action script. If I use it without animation works well but with animation, not working.

Animation A. script :

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
  <action name="do_crop_animation">
    registerattribute(xframes, calc((imagewidth / %1) BOR 0));
    registerattribute(yframes, calc((imageheight / %2) BOR 0));
    registerattribute(frames, calc(xframes * yframes));
    registerattribute(frame, 0);
    set(crop, '0|0|%1|%2');
    setinterval(calc('crop_anim_' + name), calc(1.0 / %3),
		if(loaded,
			inc(frame);
			if(frame GE frames, if(onlastframe !== null, onlastframe() ); set(frame,0); );
			mod(xpos, frame, xframes);
			div(ypos, frame, xframes);
			Math.floor(ypos);
			mul(xpos, %1);
			mul(ypos, %2);
			calc(crop, xpos + '|' + ypos + '|%1|%2');
			,
			clearinterval(calc('crop_anim_' + name));
		);
    );
  </action>



Where should I focus on for fixing this issue?

Beiträge: 770

Wohnort: Russian Federation

Beruf: Interpreting, Building virtual tours

  • Nachricht senden

13

Donnerstag, 14. Juli 2016, 10:05

Probably you use distorted hotspots and distorted hotspots can't have children elements.

http://krpano.com/docu/xml/#hotspot.distorted
Regards,

Alexey

14

Donnerstag, 14. Juli 2016, 18:35

Hi, thank you for your reply.

I didn't use distorted hotspot. I am just adding new hotspot and loading its animated style. I found all these code in krpano examples. Basically my code is like that.

Quellcode

1
2
3
4
 krObject.call("addhotspot(hotspot);");
            krObject.call("hotspot[hotspot].loadstyle(animated_hotspot);");
            krObject.set("hotspot[hotspot].ath", item.posX);
            krObject.set("hotspot[hotspot].atv", item.posY);




Animated_hotspot style has onload-animation code:

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<style name="animated_hotspot" url="up.png" ath="0" atv="0" scale="0.5" webvr="true" onloaded="do_crop_animation(128, 128, 30);add_all_the_time_tooltip();" />

  <action name="do_crop_animation">
    registerattribute(xframes, calc((imagewidth / %1) BOR 0));
    registerattribute(yframes, calc((imageheight / %2) BOR 0));
    registerattribute(frames, calc(xframes * yframes));
    registerattribute(frame, 0);
    set(crop, '0|0|%1|%2');
    setinterval(calc('crop_anim_' + name), calc(1.0 / %3),
    if(loaded,
    inc(frame);
    if(frame GE frames, if(onlastframe !== null, onlastframe() ); set(frame,0); );
    mod(xpos, frame, xframes);
    div(ypos, frame, xframes);
    Math.floor(ypos);
    mul(xpos, %1);
    mul(ypos, %2);
    calc(crop, xpos + '|' + ypos + '|%1|%2');
    ,
    clearinterval(calc('crop_anim_' + name));
    );
    );
  </action>

Beiträge: 770

Wohnort: Russian Federation

Beruf: Interpreting, Building virtual tours

  • Nachricht senden

15

Freitag, 15. Juli 2016, 09:15

Hmmm... In such situations I usually use trace(); inside the problematic action to find which part of it went wrong.
Regards,

Alexey

16

Mittwoch, 17. August 2016, 08:21

nead help about text on a hotspots

Hi guys, i'm new here, and i'm very bad in programming, have 0 knowledge. this is a test tour i did, and i need to write room names on a hotpots on a doors.
http://www.nk-3d.de/360/vtour1/ can anybody help me with step by step instructions how to do this?


thank you very much in advance
Nodar

17

Mittwoch, 17. August 2016, 18:26

enable tooltips in your skin_settings (vtourskin.xml) and set the titles in in your scenes (tour.xml)
and... make the doors white ;)

18

Freitag, 19. August 2016, 13:03

thank

enable tooltips in your skin_settings (vtourskin.xml) and set the titles in in your scenes (tour.xml)
and... make the doors white ;)
Hi. thanks for reply. As i say i'm not good in this. could you please one more time show me what to do here.
here is some part of text from vtourskin.xml :
and text from tour.xml:




<!-- skin settings (can be overridden in the tour.xml) -->
<skin_settings maps="false"
maps_type="google"
maps_bing_api_key=""
maps_google_api_key=""
maps_zoombuttons="false"
gyro="true"
webvr="true"
webvr_gyro_keeplookingdirection="false"
littleplanetintro="false"
title="true"
thumbs="true"
thumbs_width="120" thumbs_height="80" thumbs_padding="10" thumbs_crop="0|40|240|160"
thumbs_opened="false"
thumbs_text="false"
thumbs_dragging="true"
thumbs_onhoverscrolling="false"
thumbs_scrollbuttons="false"
thumbs_scrollindicator="false"
thumbs_loop="false"
tooltips_buttons="false"
tooltips_thumbs="false"
tooltips_hotspots="false"
tooltips_mapspots="false"
deeplinking="false"
loadscene_flags="MERGE"
loadscene_blend="OPENBLEND(0.5, 0.0, 0.75, 0.05, linear)"
loadscene_blend_prev="SLIDEBLEND(0.5, 180, 0.75, linear)"
loadscene_blend_next="SLIDEBLEND(0.5, 0, 0.75, linear)"
loadingtext="loading..."
layout_width="100%"
layout_maxwidth="814"
controlbar_width="-24"
controlbar_height="40"
controlbar_offset="20"
controlbar_offset_closed="-40"
controlbar_overlap.no-fractionalscaling="10"
controlbar_overlap.fractionalscaling="0"
design_skin_images="vtourskin.png"
design_bgcolor="0x2D3E50"
design_bgalpha="0.8"
design_bgborder="0"
design_bgroundedge="1"
design_bgshadow="0 4 10 0x000000 0.3"
design_thumbborder_bgborder="3 0xFFFFFF 1.0"
design_thumbborder_padding="2"
design_thumbborder_bgroundedge="0"
design_text_css="color:#FFFFFF; font-family:Arial;"
design_text_shadow="1"
/>

____________________________________________________________________________________________________________________


<scene name="scene_0" title="0" onstart="" thumburl="panos/0.tiles/thumb.jpg" lat="" lng="" heading="">

<view hlookat="8.270" vlookat="3.618" fovtype="MFOV" fov="120.000" maxpixelzoom="2.0" fovmin="70" fovmax="140" limitview="auto" />

<preview url="panos/0.tiles/preview.jpg" />

<image>
<cube url="panos/0.tiles/pano_%s.jpg" />

<cube url="panos/0.tiles/mobile/pano_%s.jpg" devices="mobile" />
</image>

<!-- place your scene hotspots here -->
<hotspot name="spot1" style="skin_hotspotstyle" ath="-22.538" atv="2.753" linkedscene="scene_1" />
<hotspot name="spot2" style="skin_hotspotstyle" ath="30.613" atv="0.958" linkedscene="scene_6" />
<hotspot name="spot3" style="skin_hotspotstyle" ath="103.796" atv="-33.544" linkedscene="scene_11" />

</scene>

<scene name="scene_1" title="1" onstart="" thumburl="panos/1.tiles/thumb.jpg" lat="" lng="" heading="">

<view hlookat="62.225" vlookat="0.998" fovtype="MFOV" fov="129.017" maxpixelzoom="2.0" fovmin="70" fovmax="140" limitview="auto" />

<preview url="panos/1.tiles/preview.jpg" />

<image>
<cube url="panos/1.tiles/pano_%s.jpg" />

<cube url="panos/1.tiles/mobile/pano_%s.jpg" devices="mobile" />
</image>

<!-- place your scene hotspots here -->
<hotspot name="spot1" style="skin_hotspotstyle" ath="-10.708" atv="4.594" linkedscene="scene_5" />
<hotspot name="spot2" style="skin_hotspotstyle" ath="33.515" atv="6.777" linkedscene="scene_3" />
<hotspot name="spot3" style="skin_hotspotstyle" ath="69.130" atv="13.172" linkedscene="scene_2" />
<hotspot name="spot4" style="skin_hotspotstyle" ath="130.584" atv="16.465" linkedscene="scene_4" />
<hotspot name="spot5" style="skin_hotspotstyle" ath="-83.369" atv="10.722" linkedscene="scene_0" />

19

Freitag, 19. August 2016, 16:12

tooltips_buttons="false"
tooltips_thumbs="false"
tooltips_hotspots="false"
tooltips_mapspots="false"

--> set some or all to true

<scene name="scene_1" title="1" onstart="" thumburl="panos/1.tiles/thumb.jpg" lat="" lng="" heading="">

---> title="my tooltip for scene 1"

20

Samstag, 20. August 2016, 11:34

thanks

Hi, thank you but it didn't work for me.
It would be really great if i may send you a folder, and you change texts there and then i see it how it work?
I'll make test with 3 pictures, so not much to search in text. Would it be possible? If yes could you please give me your email in private message?
tooltips_buttons="false"
tooltips_thumbs="false"
tooltips_hotspots="false"
tooltips_mapspots="false"

--> set some or all to true



---> title="my tooltip for scene 1"