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!

  • 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

  • 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); ));"

  • 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:

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


    and add tooltip on scene definition:

    Code
    <scene name="Room_No_1" . . . . . . tooltip="Tooltip from scene 1" />
  • 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

  • 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."

    Code
    <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!

  • 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,); );"
    />

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


    Code
    <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?

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!