Sie sind nicht angemeldet.

1

Sonntag, 7. Februar 2010, 14:28

custom buttons

Hi
How do i adapt the 'informations' button from this
http://krpano.com/examples/sharpen/ page, so I could use this as fullscreen on/off or autorotation on/off in my panoramas.

2

Dienstag, 9. Februar 2010, 10:56

Hi,

the buttons there were made with the textfield plugin,
here an example code for a fullscreen and an autorotate button:

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<style name="button"
       url="plugins/textfield.swf"
       keep="true"
       children="false"
       height="22"
       onloaded="set(alpha,0); set(textblur,15); set(blur,15); tween(alpha,1.0,0.3); tween(textblur,0,0.3); tween(blur,0,0.3);"
       onover="tween(alpha,0.7,distance(0.3,0.2));"
       onout="tween(alpha,1.0,distance(0.3,0.2));"
       autosize="none"
       css="p{color:#FFFFFF; font-family:Arial; font-size:14; margin-left:5; margin-right:5; text-align:center; }"
       background="true" backgroundcolor="0x000000"
       bordercolor="0" borderwidth="0"
       blur="0"
       glow="4"
       glowcolor="16777215"
       roundedge="5"
       shadow="1"
       textblur="0" textglow="0" textglowcolor="16777215" textshadow="0"
       />

<plugin name="fullscreen_button" 
        style="button"
        align="leftbottom" x="30" y="30" width="120"
        html="[p]Fullscreen[/p]"
        onclick="switch(fullscreen); if(fullscreen, set(html,[p]Exit Fullscreen[/p]), set(html,[p]Fullscreen[/p]));"
        />

<plugin name="autorotation_button" 
        style="button"
        align="rightbottom" x="30" y="30" width="120"
        html="[p]Autorotate[/p]"
        onclick="switch(autorotate.enabled); if(autorotate.enabled, set(html,[p]Autorotate OFF[/p]), set(html,[p]Autorotate[/p]));"
        />


best regards,
Klaus

3

Mittwoch, 10. Februar 2010, 09:59

Thanks for the help !

4

Freitag, 12. Februar 2010, 23:20

could you please write me the code for sound on/off action ?

5

Freitag, 12. Februar 2010, 23:27

there are numerous examples in the forums and the documentation. without being rude i would like to ask that you do a search before asking Klaus to provide simple code. He is very busy and WE ALL need him to focus on 1.0.9.

here is a search with the words (sound on off)
http://www.krpano.com/forum/wbb/index.ph…ht=sound+on+off

6

Freitag, 12. Februar 2010, 23:33

I know the source code for sound on/off function, but I don't know how to adapt/associate it with the buttons. (example from first post)

7

Samstag, 31. Dezember 2011, 14:10

Hi Klaus

Used your code to implement fullscreen and autorotate, but I get error 1090. Please help me fix the problem.

Thanks in advance
»yoshiharra« hat folgende Datei angehängt:
  • tour.xml (24,46 kB - 112 mal heruntergeladen - zuletzt: Heute, 05:41)

Tuur

Erleuchteter

Beiträge: 3 839

Wohnort: Netherlands

Beruf: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Nachricht senden

8

Samstag, 31. Dezember 2011, 14:45

Did you check the path to the textfield plugin?
Tip: dig a bit further as vn2012 said

*thumbsup*

9

Samstag, 31. Dezember 2011, 16:24

If you view your xml in firefox, it will call out where the errors are.

Here are the three that I found for you.



from this
<-- textfield fullscreen button -->

to
<!-- textfield fullscreen button -->


-----------------------------------------------------------
remove the duplicate


usecontentsize="false"

in hs1 AND hs2


-------------------------------------------------