How to load panorama title on bottom left of viewer?

  • Hi,

    I'm trying to find an example in this forum to look at the code as I'm sure it's been done before.

    I've made a tour for a hotel. A combobox on the bottom right loads the choice of 8 separate room shots but what I would like to do is display the name of the room over on the bottom left of the viewer and keep it there until replaced by the next panorama. I'm not too sure how to do it.

    I'm guessing it could be some sort of hotspot/Plugin that is linked to a particular panorama and so only displays when that panorama is viewed? Or perhaps I could have a separate xml file that just contains text for each panorama and displays in a box on the left when it's panorama is loaded. That would be easier than having to make hotspots/Plugins all the time.

    Could anyone please point me in the right direction?

    Many thanks,

    Andrew

  • i just use a textfield.swf plugin for this. here is the plugin code, then when loading a new pano just change the html data. use the CSS field to change the size and font if needed.

    set(plugin[titletext].html, ([p]change this text[/p]));

    <plugin name="titletext"
    url="textfield.swf"
    keep="true" preload="false"
    visible="true" enabled="false" handcursor="false" capture="false" children="false"
    zorder="100"
    alpha="0.00" blendmode="normal"
    smoothing="true"
    align="topleft" edge="center"
    x="45%" y="2%" ox="" oy=""
    width="80%" height="5%"
    crop="" ondowncrop="" onovercrop=""
    scale="1" scale9grid="" scalechildren="true"
    rotate="0"
    parent="stage"
    mask=""
    onloaded=""
    onover=""
    onhover=""
    onout=""
    ondown=""
    onup=""
    onclick=""
    autosize=""
    background="false"
    backgroundalpha="1"
    backgroundcolor="0xffffff"
    blur="0"
    bordercolor="0x000000"
    borderwidth="3"
    css="p{color:#FFFFFF; font-family:comic sans ms; font-weight:bold; font-size:22; margin-left:5; margin-right:5; text-align:center; }"
    effect=""
    glow=""
    glowcolor="16777215"
    html="[p]Canal Park Aerial 360[/p]"
    roundedge=""
    selectable="false"
    shadow="0"
    textblur="0"
    textglow="0"
    textglowcolor="16777215"
    textheight="200"
    textshadow="0"
    usecontentsize="false"
    wordwrap="true"
    />

  • Thanks for the reply VN2009.

    Can I just ask a few questions about your code.

    i just use a textfield.swf plugin for this. here is the plugin code, then when loading a new pano just change the html data. use the CSS field to change the size and font if needed.

    Is that both of the code parts below? I can't work out which one displays the actual text I want to appear or why there would be two text entries?

    set(plugin[titletext].html, ([p]change this text[/p]));

    html="[p]Canal Park Aerial 360[/p]"


    The sample code you posted, is that added to each of the pano's xml file but obviously change the html data for each file? I want the text to stay in position for the full duration that it's panorama is being displayed then when a new panorama is loaded via the combobox the new xml file replaces the previous.

    Thanks,

    Andrew

  • just use the entire plugin code to display the text.

    <plugin name="titletext"
    url="textfield.swf"
    keep="true" preload="false"
    visible="true" enabled="false" handcursor="false" capture="false" children="false"
    zorder="100"
    alpha="0.00" blendmode="normal"
    smoothing="true"
    align="topleft" edge="center"
    x="45%" y="2%" ox="" oy=""
    width="80%" height="5%"
    crop="" ondowncrop="" onovercrop=""
    scale="1" scale9grid="" scalechildren="true"
    rotate="0"
    parent="stage"
    mask=""
    onloaded=""
    onover=""
    onhover=""
    onout=""
    ondown=""
    onup=""
    onclick=""
    autosize=""
    background="false"
    backgroundalpha="1"
    backgroundcolor="0xffffff"
    blur="0"
    bordercolor="0x000000"
    borderwidth="3"
    css="p{color:#FFFFFF; font-family:comic sans ms; font-weight:bold; font-size:22; margin-left:5; margin-right:5; text-align:center; }"
    effect=""
    glow=""
    glowcolor="16777215"
    html="[p]Canal Park Aerial 360[/p]"
    roundedge=""
    selectable="false"
    shadow="0"
    textblur="0"
    textglow="0"
    textglowcolor="16777215"
    textheight="200"
    textshadow="0"
    usecontentsize="false"

    just using that code it will always say "Canal Aerial Park 360" at the top. change the settings to move the displayed text to the bottem left if that is where you want it. then when loading a new scene use

    set(plugin[titletext].html, ([p]change this text[/p]));

    change the text inside the [p] [/p] to what you want the new title to be.

    for example:

    onclick="loadpano(scene2.xml,null,MERGE,blend 2,0); set(plugin[titletext].html, ([p]this is now scene 2[/p]));"

    that will load the new pano and change the title to "this is now scene 2"

Jetzt mitmachen!

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