How to show this html text field?

  • I have placed this code in a scene to have a Title (Lighthouse) show up.

    Code
    <layer name="infotext" url="%SWFPATH%/plugins/textfield.swf" background="false" css="color:#FFFFFF;font-weight:bold;font-size:14px;" textshadow="1.0" enabled="false" align="topleft" y="1%" x="1%" html="Lighthouse" />

    If I already named the scene title as "Lighthouse" at the start of the scene code, could it be possible to have the html line show the scene title automatically instead of having to include the "Lighthouse" text ? e.g html="%scenetitle% or an action like:

    scene[get(xml.scene)].title ); )

    (I dont know coding; just trying to pass the idea)

  • Hi, try to do so

    Code
    <layer name="infotext" ... onloaded="copy(html, scene[get(xml.scene)].title)" ...


    or

    Code
    <layer name="infotext" ... onstart="copy(html, scene[get(xml.scene)].title)" ...


    or

    Code
    <layer name="infotext" ... html="get:scene[get(xml.scene)].title" ...
  • Hi Taurus,

    to extend the application of this function a little further, how would it be possible to include this line of code in the vtourskin.xml in order to apply the appearance of this text across all the scenes?

  • Hi,
    I do not know, because I do not use vtourskin

    layer "infotext" you need to move out of the scene and to make common to all scenes - and you get what you want

    and you need to add this code

    Code
    <events name="infotext" keep="true"
    onnewscene="copy(layer[infotext].html, scene[get(xml.scene)].title)"
    />

Jetzt mitmachen!

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