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

  • Hi,

    try using simple line-breaks via [br],

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

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

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

    Best regards,
    Klaus

Jetzt mitmachen!

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