You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Sunday, February 7th 2010, 2:28pm

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

Tuesday, February 9th 2010, 10:56am

Hi,

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

Source code

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

Wednesday, February 10th 2010, 9:59am

Thanks for the help !

4

Friday, February 12th 2010, 11:20pm

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

VN2009

Professional

Posts: 1,336

Location: Duluth MN

  • Send private message

5

Friday, February 12th 2010, 11:27pm

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

Friday, February 12th 2010, 11:33pm

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

Saturday, December 31st 2011, 2:10pm

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 has attached the following file:
  • tour.xml (24.46 kB - 109 times downloaded - latest: Sep 19th 2023, 12:41am)

Tuur

Sage

Posts: 3,822

Location: Netherlands

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

  • Send private message

8

Saturday, December 31st 2011, 2:45pm

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

*thumbsup*

9

Saturday, December 31st 2011, 4:24pm

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


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