• Hello,

    Since my update to the latest krpano version I'm updating my projects.

    As from now on I want to set all projects html5="prefer", I'm looking for a way to keep using my tooltips.
    Looks like my actual settings don't work with html5...

    An example

    hotspot

    Code
    <style name="skin_hotspotstyle" 
    		url="%SWFPATH%/hotspots/hs_01.png"
    		alpha="0.5"
    		onover="tween(alpha, 1)"
    		onout="tween(alpha, 0.5)"
    		keep="false"
    		onclick="looktohotspot(get(name)); change_location(get(linkedscene))"
                    devices="all"
    		onhover="show_tooltip(get(panoramas.pano[get(linkedscene)].tooltip))"
    	/>

    show_tooltip

    Code
    <action name="show_tooltip">
    		showtext("%1", tooltip_style);
    	</action>

    tooltip_style

    Code
    <textstyle name="tooltip_style" font="Arial" fontsize="12.0" bold="false" italic="false" background="true" backgroundcolor="0xbd2a33" border="true" bordercolor="0xbd2a33" textcolor="0xFFFFFF" alpha="0.7" blendmode="normal" effect="" origin="cursor" edge="leftbottom" textalign="none" xoffset="0" yoffset="-3" showtime="0.1" fadetime="0.0" fadeintime="0.0" noclip="true"/>

    I thought there was simple trick to make it work for html5 as well.. but can't find it..

    Can someone help ?

    Thanks a ton !
    S.

  • Hello,

    I finally had the time to look further into the html5 tooltip.
    For simple plugins it works fine and fast.

    But when I want to automate stuff it's a bit more complicated.. *blink*

    example.

    When I add hotspots with the editor vtoureditor plugin I want the tooltip to work automatically.
    Can I tell the 'tooltip' where to find the text ?

    A code example to be more clear.

    This used to be my codes

    in this piece the tooltip can be find

    Code
    <panoramas current="scene_livingroom">
    		<pano name="scene_livingroom" tooltip="living room - le salon" title="living room" floor="f0" />
    		<pano name="scene_kitchen" tooltip="the kitchen - la cuisine" title="kitchen" floor="f0" />
    	</panoramas>

    this the hotspot in my scene (tour.xml)

    Code
    <hotspot name="spot1" style="skin_hotspotstyle" ath="72.159" atv="12.089" linkedscene="scene_kitchen/>

    this is my hotspotsyle

    Code
    <style name="skin_hotspotstyle" 
    		url="%SWFPATH%/hotspots/hs_01.png"
    		alpha="0.5"
    		onover="tween(alpha, 1)"
    		onout="tween(alpha, 0.5)"
    		keep="false"
    		onclick="looktohotspot(get(name)); change_location(get(linkedscene))"
                    devices="all"
    		onhover="show_tooltip(get(panoramas.pano[get(linkedscene)].tooltip))"
    	/>

    Now, if I change onhover="show_tooltip(get(panoramas.pano[get(linkedscene)].tooltip))" into tooltip="", what should I put ?

    Thanks for any help !

    Servaas

  • I'm afraid I don't really know where to start as I ain't a code expert... *sad*

    should I create a new tooltip style and play with this code ?

    Code
    <style name="tooltip"
    	       onover="copy(layer[tooltip].html, tooltip);
    	               set(layer[tooltip].visible, true);
    	               tween(layer[tooltip].alpha, 1.0, 0.5);
    	               asyncloop(hovering, copy(layer[tooltip].x,mouse.stagex); copy(layer[tooltip].y,mouse.stagey); );"
    	       onout="tween(layer[tooltip].alpha, 0.0, 0.25, default, set(layer[tooltip].visible,false), copy(layer[tooltip].x,mouse.stagex); copy(layer[tooltip].y,mouse.stagey); );"
    	       />


    or

    Can I make it work with my existing code by just changing 'onhover' into 'tooltip' .. ?

    Code
    <style name="skin_hotspotstyle" 
    		url="%SWFPATH%/hotspots/hs_01.png"
    		alpha="0.5"
    		onover="tween(alpha, 1)"
    		onout="tween(alpha, 0.5)"
    		keep="false"
    		onclick="looktohotspot(get(name)); change_location(get(linkedscene))"
                    devices="all"
    		tooltip="???????????"
    	/>

    I also noticed that my alpha doesn't tween anymore as well *cry*

  • Try manually merging them:

    - move/add the onover/onout code from the tooltips style to your hotspot style
    - instead of the 'copy(layer[tooltip].html, tooltip);' code, use other custom code to get right the text for the tooltip
    - then there is no need for a custom tooltip attribute

  • oh boy.. *cry* I'm afraid I get stuck again...
    Don't have a clue how I can get the right text..

    I played with a 'get' a 'set', a 'copy', showtext... but I don't get to the point where I can tell the hotspot_style to use the 'tooltip' text of the scene to which my hotspots aiming...

    Code
    <hotspot name="spot1" style="skin_hotspotstyle" ath="174.637" atv="17.291" linkedscene="scene_keuken"/>

    *unsure*

  • Here:

  • aloha,

    So far so good.
    The tooltip works fine in html5 and flash..

    Problem is that the the tooltip on 'thumbnails' and 'floormap' don't work in html5 as I don't know which setting I should change.. *rolleyes*

    This are the codes :

    THUMBNAILS I guess it's on line 40

    And this is the code for the spots on the floor plan I guess it's on line 20 ..

  • hi. i made a plugin that puts the hotspot's-name under every hotspot as a textfield automatically.
    like the tooltip is visible always an clickable if you want to.
    textfield can be edited of course.
    simple integration.
    works also in VR and smartphone, or touch devices.
    DEMO_TOUR_EXAMPLE
    would that help you? or do you need something else?

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!