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.

1

Friday, June 26th 2015, 12:43pm

Defining a custom tooltip text per hotspot, different than the title of the linked scene ?

Hi,

Using the droplet, I created a tour with many arrow navigation hotspots, but I want the tooltip text of the arrows to be different than the tooltip text of the corresponding thumbs ... something like "Explore now!" for all hotspots, but "Room No. 1, 2, 3, etc." for the thumbs. Right now both hotspots and thumbs have the same text, the title of the pano.

tooltips_thumbs and tooltips_hotspots are both set to "true" in tour.xml.


Shouldn't adding a tooltip="Explore now!" for each hotspot, in tour.xml, override the default title text ? Something like:

<hotspot name="spot1" style="skin_hotspotstyle" ath="-126.995" atv="12.097" tooltip="Explore now!" linkedscene="Room_No_1" />


Any help appreciated. Thanks!

Umalo

Professional

Posts: 1,047

Location: Osijek, Croatia, EU

  • Send private message

2

Saturday, June 27th 2015, 11:31am

You also need to update code that is actually reading text and displaying it. It is defined in skin_hotspotstyle style.
Not to read scene(linkedscene).title but your hotspot tooltip e.g. hotspot[get(name)].tooltip and this will work

3

Sunday, June 28th 2015, 1:00pm

Not to read scene(linkedscene).title but your hotspot tooltip e.g. hotspot[get(name)].tooltip and this will work
Hi Umalo,

Thank you for your help!


I assume the relevant part in skin_hotspotstyle is this:

onloaded="if(skin_settings.tooltips_hotspots, if(linkedscene, copy(tooltip,scene[get(linkedscene)].title); loadstyle(skin_tooltips); ));"


I'm probably doing something wrong, because using this doesn't seem to work:

onloaded="if(skin_settings.tooltips_hotspots, if(linkedscene, copy(tooltip,hotspot[get(name)].tooltip); loadstyle(skin_tooltips); ));"

Umalo

Professional

Posts: 1,047

Location: Osijek, Croatia, EU

  • Send private message

4

Sunday, June 28th 2015, 4:08pm

Two potential reasons:
1. skin_settings tooltips_hotspots set to false -> should be true (take care if you have settings also in tour.xml than settings in vtourskin are overwritten)
2. In skin_hotspotstyle style you could have tooltip="" which is cleaning your tooltip attribute from hotspot.

I would propose to use tooltip on scene level. That way you don't have to define tooltip for every hotspot but on scene level.
Than you have to use:

Source code

1
onloaded="if(skin_settings.tooltips_hotspots, if(linkedscene, copy(tooltip,scene[get(linkedscene)].tooltip); loadstyle(skin_tooltips); ));"

and add tooltip on scene definition:

Source code

1
<scene name="Room_No_1" . . . . . . tooltip="Tooltip from scene 1" /> 

5

Sunday, June 28th 2015, 8:10pm

2. In skin_hotspotstyle style you could have tooltip="" which is cleaning your tooltip attribute from hotspot.
Yes, that was it !

Thank you for your time ;)

Reggie

Trainee

Posts: 91

Location: Seymour, TN US

Occupation: Virtual Tour Photographer

  • Send private message

6

Monday, February 15th 2016, 7:44pm

Replace 'linkedscene=" with "onclick=openurl....

Umalo,

I want to use a hotspot to open a url showing the entire tour that is previewed by a particular scene (instead of linking to another scene.) When I replace linkedscene= with onclick=openurl....the hotspot opens the new url, but I can't figure out how to impose a custom tooltip like "view this project" on the hotspot. Any advice would be appreciated.

Best regards, Reggie

Umalo

Professional

Posts: 1,047

Location: Osijek, Croatia, EU

  • Send private message

7

Monday, February 15th 2016, 8:41pm

Not clear what you want. You want text to be displayed on onover, onclick or you want image (e.g. thumb) of linked scene to be previewed?

Reggie

Trainee

Posts: 91

Location: Seymour, TN US

Occupation: Virtual Tour Photographer

  • Send private message

8

Tuesday, February 16th 2016, 12:18pm

onover tooltip

Spot2 below will display 'bimg_0064 as the tooltip. In spot1, I have replaced "linkedscene=" with "onclick=openurl" and no tooltip displays. I would like the onover for spot1 to have a tooltip that says "view this project."

Source code

1
2
<hotspot name="spot1" style="skin_hotspotstyle" ath="54.397" atv="0.000" onclick="openurl('http://www.photographyoptions.net/images/cctech/tour.html',_blank)" />
		<hotspot name="spot2" style="skin_hotspotstyle" ath="-123.995" atv="0.000" linkedscene="scene_bimg_0064" />


Thank you in advance for your help!

Umalo

Professional

Posts: 1,047

Location: Osijek, Croatia, EU

  • Send private message

9

Tuesday, February 16th 2016, 1:03pm

add this to your hotspot if you are using ¸vtourskin.xml already you can reuse their tooltip setup:

<hotspot name="spot1" style="skin_hotspotstyle" ath="54.397" atv="0.000" onclick="openurl('http://www.photographyoptions.net/images/cctech/tour.html',_blank)"
onover.mouse="copy(layer[skin_tooltip].html, 'Your text goes here');set(layer[skin_tooltip].visible, true);tween(layer[skin_tooltip].alpha, 1.0, 0.1);asyncloop(hovering, copy(layer[skin_tooltip].x,mouse.stagex); copy(layer[skin_tooltip].y,mouse.stagey); );"
onout.mouse="tween(layer[skin_tooltip].alpha, 0.0, 0.1, default, set(layer[skin_tooltip].visible,false), copy(layer[skin_tooltip].x,mouse.stagex); copy(layer[skin_tooltip].y,mouse.stagey); set(layer[skin_tooltip].html,); );"
/>

Reggie

Trainee

Posts: 91

Location: Seymour, TN US

Occupation: Virtual Tour Photographer

  • Send private message

10

Tuesday, February 16th 2016, 2:29pm

Custom Tooltip

Thank you for the advice! I tried it exactly as you stated it doesn't seem to be working:


Source code

1
	<hotspot name="spot1" style="skin_hotspotstyle" ath="54.397" atv="0.000" onclick="openurl('http://www.photographyoptions.net/images/cctech/tour.html',_blank)" 		onover.mouse="copy(layer[skin_tooltip].html, 'Visit the CCTech Tour'); set(layer[skin_tooltip].visible, true);tween(layer[skin_tooltip].alpha, 1.0, 0.1);asyncloop(hovering, copy(layer[skin_tooltip].x,mouse.stagex); copy(layer[skin_tooltip].y,mouse.stagey); );"    onout.mouse="tween(layer[skin_tooltip].alpha, 0.0, 0.1, default, set(layer[skin_tooltip].visible,false), copy(layer[skin_tooltip].x,mouse.stagex); copy(layer[skin_tooltip].y,mouse.stagey); set(layer[skin_tooltip].html,); );"/>



I took spot2 out of the scene, but before I did, the tooltip for spot2 would also briefly appear during onover of spot1. Is there a character error that can be identified in the code above?

Umalo

Professional

Posts: 1,047

Location: Osijek, Croatia, EU

  • Send private message

11

Tuesday, February 16th 2016, 3:17pm

instead of

Source code

1
copy(layer[skin_tooltip].html, 'Visit the CCTech Tour');  

put

Source code

1
set(layer[skin_tooltip].html, 'Visit the CCTech Tour'); 

If you are using latest krpano that use textfield based tooltips this will work.

Reggie

Trainee

Posts: 91

Location: Seymour, TN US

Occupation: Virtual Tour Photographer

  • Send private message

12

Wednesday, February 17th 2016, 9:56am

Umalo, Thank you!!

Thank you sir! This works perfectly. *smile*

Similar threads