Scenename as Text over Thumbnail images

  • Is it possible to add an extra layer with text to each thumbnail image with the scene name (of the linked scene)?

    *confused*We need this for HTML5 and Flash.


    I have yet not seen any sample to this, the showtext function seems to be working only in Flash but not HTML5.

  • Hi,

    Maybe this can get you further.

    I added this layer to put text in the "strap" opening the thumbaray like in this panotour. http://www.swedenpicture.se/wp-content/vir…irtualtour.html
    My plan is to build another layer in the same way to add text below the thumbs and call for the the panoramaname or just add text manually but i am not sure it is the right way to do but it works fine on ipad to..
    However i needed to add - parent="strap" and use all the latest plugins and scripts. I also remover the arrow that is there as a standard: The files i am working on is rendered from Panotour Pro.

    REMOVED<!-- <plugin name="strapArrow" keep="true" parent="strap" zorder="0" url="virtualtourdata/graphics/arrow.png" align="center" edge="center" capture="false" enabled="false" rotate="0"/> -->

    <plugin name="strap" keep="true" zorder="0" url="virtualtourdata/graphics/strap.png" parent="thumbArray" alpha="0.9" align="top" edge="left" rotate="-90" handcursor="true" onover="slide_action_in"/>

    <layer name="text" url="plugin/textfield.swf" keep="true" parent="strap" rotate="90" zorder="0" edge="center" align="center" children="false" autoheight="false" enabled="false" vcenter="true" background="false" backgroundalpha="1.0" border="false" bordercolor="0x000000" borderalpha="1.0" borderwidth="1.0" roundedge="0" shadow="0.0" shadowrange="4.0" shadowangle="45" shadowcolor="0x000000" shadowalpha="1.0" alpha="0.9" textshadow="0.01" textshadowrange="4.0" textshadowangle="45" textshadowcolor="0x000000" textshadowalpha="0.6"
    html="Våra rum"
    css="text-align:center; color:#FFFFFF; font-family:Levenim MT;" />

    Maybe someone else have a better solution... i would also like to know:)


    Hope this helps

    Best regards - Stefan

  • Thanks for your answer Stefan and nice panorama by the way. The strap thing is great, though not what I need but maybe you are right and one can add a textfield to each thumb inside the thumb array ...

  • Thanks for the comments about the pano;) I am setting up a new interface to demo for a perhaps client with those images i took many years ago:) I am very new to krpano but i love it really:)
    Check this link ...https://krpano.com/news/ and scroll down to Improved Viewer (XML Interface / Layout)
    That should do it or maybe i understood wrong about what you trying to achieve. I will try this anyway to get text below the thumbs:)


    Btw the layer i have made works fine in both flash and html5 on iPad - have not tested on computer and html5 yet.. have you?

    Regards

    Best regards - Stefan

  • Hi,

    Is it possible to add an extra layer with text to each thumbnail image with the scene name (of the linked scene)?

    yes of course - pretty simple!

    e.g. first add a <style> for the texts anywhere in the vtourskin.xml:

    and then modify/extend the 'skin_addthumbs' action in the vtourskin.xml to create dynamically the texts,
    e.g. add this code add: (red = exsiting code, green = new code to add)
    ...
    if(skin_settings.tooltips_thumbs,

    set(layer[get(thumbname)].onhover, showtext(get(scene[get(linkedscene)].title),SKIN_TOOLTIPS); );
    );
    txtadd(thumbtext,'skin_thumbtext_',get(i));
    addlayer(get(thumbtext));
    layer[get(thumbtext)].loadstyle(skin_thumbtext_style);
    set(layer[get(thumbtext)].keep, true);
    set(layer[get(thumbtext)].parent, get(thumbname));
    set(layer[get(thumbtext)].html, get(scene[get(i)].title));
    );
    ...

    e.g. here an demo:
    https://krpano.com/tours/corfu/mod.html

    and here links to the modified xml files:
    https://krpano.com/tours/corfu/tour_mod.xml (mods: thumbs opend at start + automatic closing)
    https://krpano.com/tours/corfu/skin/vtourskin_mod.xml (mods: thumbs style + script for adding the texts)

    Best regards,
    Klaus

  • It has to do with the autoheight setting which seems to disable the text output on HTML5 completely (or sets the height to 0) - if I set the height manually, let's say to "20" it will work and look the same.

    Edited once, last by McTristan (November 22, 2012 at 11:25 AM).

  • Hi,

    thanks for the note!
    I noticed that in the meantime too... sometimes it works in HTML5 and sometimes not (in my first tests on iPad it was always working...) - it seems to be strange kind of timing problem - in the next krpano release it should be corrected.

    Best regards,
    Klaus

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!