Sie sind nicht angemeldet.

1

Samstag, 29. April 2017, 18:10

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

Quellcode

1
2
3
		<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)

Dieser Beitrag wurde bereits 2 mal editiert, zuletzt von »Felix« (1. Mai 2017, 11:29)


2

Sonntag, 30. April 2017, 13:10

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

3

Montag, 1. Mai 2017, 11:28

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

4

Mittwoch, 17. Mai 2017, 04:43

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:

Quellcode

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

Quellcode

1
2
3
<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?

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »Islander« (17. Mai 2017, 18:30)