Toggle Text Field on and Off / Associate Text Field with Specific Scene

  • I am a beginner and am hoping for some advice on how to associate a text field only with a specific scene and also, am looking for a way to toggle the textfield on and off. Thank you in advance! Reggie

    <plugin name="textfield"
    url="plugins/textfield.swf"
    keep="true"
    align="lefttop"
    html="Gregory Hosler has figured out[br] how to make a text box[br]and also how to do a line[br] break like this[br] Bold Text"
    css="font-family Ariel; text-align:center; font-size:24px; color:#0xBBBBBB;"
    autoheight="auto"
    vcenter="true"
    padding="9"
    wordwrap="true"
    selectable="true"
    onclick="removeplugin (textfield)"
    embeddedfonts="false"
    background="true"
    backgroundcolor="0xB1B1B1"
    backgroundalpha=".8"
    border="true"
    bordercolor="0xFFFFFF"
    borderalpha="1.0"
    borderwidth="5.0"
    roundedge="40"
    shadow="0"
    shadowrange="4.0"
    shadowangle="45"
    shadowcolor="0x000000"
    shadowalpha="1.0"
    textshadow="0"
    textshadowrange="4.0"
    textshadowangle="45"
    textshadowcolor="0xFFFFFF"
    textshadowalpha="1.0"
    onautosized=""
    />"

  • Sacha, Thank you for this. It is a step forward. I'm still a bit confused though about where to place these variables. In this link: http://www.photographyoptions.net/images/map/tour.html The first scene has no text variable. Scenes 2 and 3 each have different text. I tried inserting the on - off variable into each specific scene, but it didn't work. I have inserted an "onclick" (visible false) variable into the code for the textfield plugin. It causes the text fields to close when clicked upon....but it closes all of them. What must I do to apply the on-off variable only to the scene that is currently displayed? Thank you in advance, Reggie.

    <!-- set optional skin logo url -->
    <layer name="skin_logo" url="" scale="0.25" opened_onclick="openurl('...',_blank);" />

    <action name="startup">
    if(startscene === null, copy(startscene,scene[0].name));
    loadscene(get(startscene), null, MERGE);
    </action>

    <scene name="scene_Bike_Trail" title="Bike Trail" onstart="" thumburl="panos/Bike_Trail.tiles/thumb.jpg" lat="" lng="" heading="">
    <plugin name="textfield"
    url="plugins/textfield.swf"
    keep="true"
    align="center"
    html=""
    css="font-family Ariel; text-align:center; font-size:24px; color:#0xBBBBBB;"
    autoheight="auto"
    vcenter="true"
    padding="9"
    wordwrap="true"
    selectable="true"
    onclick="set(layer[textfield].visible,false); "
    embeddedfonts="false"
    background="true"
    backgroundcolor="0xB1B1B1"
    backgroundalpha=".8"
    border="true"
    bordercolor="0xFFFFFF"
    borderalpha="1.0"
    borderwidth="5.0"
    roundedge="40"
    shadow="0"
    shadowrange="4.0"
    shadowangle="45"
    shadowcolor="0x000000"
    shadowalpha="1.0"
    textshadow="0"
    textshadowrange="4.0"
    textshadowangle="45"
    textshadowcolor="0xFFFFFF"
    textshadowalpha="1.0"
    onautosized=""
    />"
    />
    <view hlookat="0" vlookat="0" fovtype="MFOV" fov="120" maxpixelzoom="2.0" fovmin="70" fovmax="140" limitview="auto" />
    <preview url="panos/Bike_Trail.tiles/preview.jpg" />

    <image hfov="1.00" vfov="0.938000" voffset="0.00">
    <cylinder url="panos/Bike_Trail.tiles/pano.jpg" />
    </image>

    <!-- place your scene hotspots here -->

    </scene>

    <scene name="scene_Dam_West_Map" title="Dam West Map" onstart="set(layer[textfield].html,'This is a test of [br] line breaks in a text area[br]');" thumburl="panos/Dam_West_Map.tiles/thumb.jpg" lat="" lng="" heading="">

    <view hlookat="0" vlookat="0" fovtype="MFOV" fov="120" maxpixelzoom="2.0" fovmin="70" fovmax="140" limitview="auto" />

    <preview url="panos/Dam_West_Map.tiles/preview.jpg" />

    <image hfov="1.00" vfov="0.990000" voffset="0.00">
    <cylinder url="panos/Dam_West_Map.tiles/pano.jpg" />
    </image>

    <!-- place your scene hotspots here -->

    </scene>

    <scene name="scene_Fitzgerrall" title="Fitzgerrall" onstart="set(layer[textfield].html,'This is a test of on -off [br] functionality[br]');" thumburl="panos/Fitzgerrall.tiles/thumb.jpg" lat="" lng="" heading="">

    <view hlookat="0" vlookat="0" fovtype="MFOV" fov="120" maxpixelzoom="2.0" fovmin="70" fovmax="140" limitview="auto" />

    <preview url="panos/Fitzgerrall.tiles/preview.jpg" />

    <image hfov="1.00" vfov="1.020000" voffset="0.00">
    <cylinder url="panos/Fitzgerrall.tiles/pano.jpg" />
    </image>

  • You must reset the variable for each scene

    Code
    <scene name="scene_Fitzgerrall" title="Fitzgerrall" onstart="set(layer[textfield].visible,true);set(layer[textfield].html,'This is a test of on -off [br] functionality[br]');" thumburl="panos/Fitzgerrall.tiles/thumb.jpg" lat="" lng="" heading="">

Jetzt mitmachen!

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