You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

vasin

Trainee

  • "vasin" started this thread

Posts: 92

Location: bangkok

Occupation: photographer

  • Send private message

1

Wednesday, December 18th 2013, 10:59am

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

Intermediate

Posts: 279

Location: Kobyłka, Poland

Occupation: Virtual Tours - Spherical Panoramas - Krpano developer

  • Send private message

2

Wednesday, December 18th 2013, 12:20pm

Add textfields as childs of hotspots.

vasin

Trainee

  • "vasin" started this thread

Posts: 92

Location: bangkok

Occupation: photographer

  • Send private message

3

Wednesday, December 18th 2013, 1:13pm

Hello

Thanks panomaster

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



Thank you!

This post has been edited 1 times, last edit by "vasin" (Dec 18th 2013, 2:54pm)


vasin

Trainee

  • "vasin" started this thread

Posts: 92

Location: bangkok

Occupation: photographer

  • Send private message

4

Wednesday, December 18th 2013, 1:19pm

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?

This post has been edited 2 times, last edit by "vasin" (Dec 19th 2013, 4:34am)


vasin

Trainee

  • "vasin" started this thread

Posts: 92

Location: bangkok

Occupation: photographer

  • Send private message

5

Friday, December 20th 2013, 8:32am

Any input please?
Thank you

jeromebg

Professional

Posts: 810

Location: Angers - France

Occupation: Photographer

  • Send private message

6

Friday, December 20th 2013, 10:18am

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

vasin

Trainee

  • "vasin" started this thread

Posts: 92

Location: bangkok

Occupation: photographer

  • Send private message

7

Monday, December 23rd 2013, 10:22am


</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

Monday, December 23rd 2013, 10:47am

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:

Source code

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

Trainee

  • "vasin" started this thread

Posts: 92

Location: bangkok

Occupation: photographer

  • Send private message

9

Tuesday, December 24th 2013, 5:14am

Hello Klaus

That was great Thank you!

10

Tuesday, December 31st 2013, 7:16pm

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

Thursday, January 2nd 2014, 12:55pm

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

12

Monday, July 11th 2016, 8:42pm

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 :

Source code

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?

Alexey Tkachenko

Professional

Posts: 760

Location: Sevastopol, Crimea, Russian Federation

Occupation: Interpreting, Building virtual tours

  • Send private message

13

Thursday, July 14th 2016, 10:05am

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

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

Alexey

14

Thursday, July 14th 2016, 6:35pm

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.

Source code

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:

Source code

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>

Alexey Tkachenko

Professional

Posts: 760

Location: Sevastopol, Crimea, Russian Federation

Occupation: Interpreting, Building virtual tours

  • Send private message

15

Friday, July 15th 2016, 9:15am

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

Alexey

16

Wednesday, August 17th 2016, 8:21am

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

Wednesday, August 17th 2016, 6:26pm

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

18

Friday, August 19th 2016, 1:03pm

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

Friday, August 19th 2016, 4:12pm

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

Saturday, August 20th 2016, 11:34am

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"