[SOLVED] How to show Text upon a hotspot using the parent attribute?

  • Dear krpano-Community,
    I'm new to this Forum so I will introduce myself first: My name is Felix and I'm a student from Vienna learning to make good Virtual Tours using krpano.

    I want to put a hotspot description below the hotspot and tried to do this using the parent attribute in the Textfield.swf Plugin. I do not want to make a second hotspot just for the textfield.
    Using this code in tour.xml I do not even get a textfield shown:

    Code
    <hotspot name="spot1" url="button.png" ath="179.172" atv="13.304" children="false" distorted="false" />
    		<plugin name="text_entrance" url="plugins/textfield.swf"  parent="hotspot[spot1]" align="center" html="[p]Entrance[/p]" ox="10" oy="50" css="p{color:#FFFFFF;font-size:20}" keep="true" background="false" width="100" autosize="center" />


    Windows 7 Enterprise x64, Firefox ESR 45.4.0 - using the "edit tour.xml" function in the "tour_editor.html"

    Have tested various possible ways to solve this, but I was not able to get a code that works the way.
    Please help me find a solution for this! I appreciate any help! *smile* (Yes, I already used the search function and have tested the given answers to similar topics)

    Edited 2 times, last by Felix (May 1, 2017 at 11:29 AM).

  • Felix,

    I tested your code and I got the message "xml parsing failed". And when I methodically replaced all parameters, I still got the error. Then I spotted an invisible character before the url="plugins/textfield.swf" parameter, and after removing that character, it all worked!

    Tommy

  • Felix,

    I tested your code and I got the message "xml parsing failed". And when I methodically replaced all parameters, I still got the error. Then I spotted an invisible character before the url="plugins/textfield.swf" parameter, and after removing that character, it all worked!

    Tommy

    Thanks for your help Tommy!!
    This was the solution and I was already desperate...

  • Hi,
    I am using a similar method to attach text to a hotspot.
    In case there are many hotspots in different scenes using this same method, could there be a way to set a common textstyle ( for example for the css, bgcolor, positioning etc... (except for the html text which is unique to each individual child text/hotspot)?

    The Textstyle is defined like so:

    Code
    <textstyle name="childtext" ox="0" oy="40" css="color:#FFFFFF;font-size:50;font-family:Arial;text-align:center;" keep="false" background="true" bgcolor="0x000000" bgalpha="0.5" width="85" autosize="center"

    The Hotspot and Child Text element is so:

    Code
    <hotspot name="spot1" style="skin_hotspotstyle" ath="-28.820" atv="4.052" children="true" distorted="false" linkedscene="scene2"/>
    
    
    <plugin name="hotspot=text1" url="plugins/textfield.swf"  parent="hotspot[spot1]" align="center" html="[p][b]1st Floor[/b][/p]" />

    How can the Textstyle element be included in the plugin element code?

    Edited once, last by Islander (May 17, 2017 at 6:30 PM).

Participate now!

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