Sie sind nicht angemeldet.

1

Donnerstag, 31. Oktober 2013, 15:24

Textfield - help with easy way to display 2 lines of text?

Hi all

I am using the textfield plugin to display room names in a virtual tour as follows:

<!-- script for displaying scene name in corner -->

<plugin name="titletext"
url="../plugins/textfield.swf"
keep="true"
align="bottomleft"
x="10" y="15"
autosize="left"
wordwrap="true"
background="false"
zorder="-1"
children="true"
html="TEST"
css="p{color:#FFFFFF; font-family:arial; font-style: regular; font-size:20;text-align:left; }"
effect="dropshadow(4,45,0x000000,4,1);"
/>



<action name="showname">
txtadd(plugin[titletext].html,[p],get(scene[get(xml.scene)].title),[p]);
</action>


Then at the start of each pano I have:

<!-- ** pano6 - great-hall ********************************************************************* -->

<scene name="great-hall" title="Great Hall" onstart="showname()">

So I get the name in the bottom left corner, which works fine.

What is an easy way to have the option of displaying two lines of text, so for example the text instead of just saying

Great Hall

could say:

Great Hall

another line of text

Note 'another line of text' would be stored in a variable, so could be called by something like:

txtadd(plugin[titletext].html,[p],get(scene[get(xml.scene)].title),[p];get(second-text-line)].);

Thanks in advance for help/ideas.

Best regards

Tim

2

Montag, 4. November 2013, 07:55

Hi,

try using simple line-breaks via [br],

e.g. first - define the css without p{}:

Quellcode

1
2
3
4
5
<plugin name="titletext"
...
css="color:#FFFFFF; font-family:arial; font-style: regular; font-size:20;text-align:left;"
...
/>


then use '[br]' for a line break:

Quellcode

1
txtadd(plugin[titletext].html, get(scene[get(xml.scene)].title), '[br]', get(second-text-line));


Best regards,
Klaus

3

Donnerstag, 14. November 2013, 16:17

Thanks Klaus



I will try this out.



cheers

Tim