Sie sind nicht angemeldet.

1

Freitag, 16. November 2012, 10:36

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.

Stefan.L

Schüler

Beiträge: 102

Wohnort: Sweden

Beruf: Photography/ webdesign

  • Nachricht senden

2

Freitag, 16. November 2012, 17:11

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/v…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

3

Freitag, 16. November 2012, 20:00

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 ...

Stefan.L

Schüler

Beiträge: 102

Wohnort: Sweden

Beruf: Photography/ webdesign

  • Nachricht senden

4

Freitag, 16. November 2012, 21:14

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 ...http://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

Stefan.L

Schüler

Beiträge: 102

Wohnort: Sweden

Beruf: Photography/ webdesign

  • Nachricht senden

5

Samstag, 17. November 2012, 13:30

Here are further info about layers. Maybe interesting.

http://www.krpano.com/examples/10815/exa…containers.html

Regards, Stefan
Best regards - Stefan

6

Mittwoch, 21. November 2012, 18:04

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:

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
<style name="skin_thumbtext_style"
       url="%SWFPATH%/plugins/textfield.swf"
       align="bottom"
       width="100%"
       autoheight="true"
       y="5"
       enabled="false"
       background="false"
       border="false"
       css="text-align:center; color:#FFFFFF; font-family:Arial; font-weight:bold; font-size:10px;"
       textshadow="1"
       />


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:
http://krpano.com/tours/corfu/mod.html

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

Best regards,
Klaus

7

Mittwoch, 21. November 2012, 19:01

Thank you Klaus for your excellent advice - will try this tomorrow!

8

Donnerstag, 22. November 2012, 10:25

After playing around with it, this approach seems to work in Flash just fine, but nothing is shown on an iPad :( - it isn't working for your corfu link either :(

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »McTristan« (22. November 2012, 11:03)


9

Donnerstag, 22. November 2012, 11:14

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.

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »McTristan« (22. November 2012, 11:25)


10

Donnerstag, 22. November 2012, 13:06

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