You are not logged in.

esys

Intermediate

  • "esys" started this thread

Posts: 267

Location: Balazé France

Occupation: photographer

  • Send private message

1

Saturday, March 12th 2011, 4:53pm

problem with fullscreen back !

Hi,

I've made a test with two fullscreen button (full and back) and the "buttons-jpg-includes" code of krpano. I'd like to switch one to another, visible or not, depends fullscreen or not.
It works but the "bton-full-back" still visible when you get back from fullscreen, while i put a code to set it, visible=false and to set bton-full, visible=true !?
When you click a second time, then the bton-full appears !?

I put the code straightly in the plugins, because in the events, it's worst, the full button still invisible even when clicking several times!

Here the code :

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
34
35
	<plugin name="bton_full"	
			url="plugins/Bton_Full.png"
			align="centerbottom"
			alpha="0.0"
			visible="true"
			keep="true"
			zorder="58"
			x="82" y="11"
			scale="0.22"
	                crop="0|0|200|200"
	                onovercrop="0|210|200|200"
	                ondowncrop="0|425|200|200"
			effect="dropshadow(2,45,0x000000,3,1);"	        			
			onloaded="tween(plugin[bton_full].alpha, 1.0, 2);"
	onclick="set(fullscreen,true); set(plugin[bton_full].visible,false); set(plugin[bton_full_back].visible,true);"
			selectable="true"
	        />	
	        
	<plugin name="bton_full_back"	
			url="plugins/Bton_Full_back.png"
			align="centerbottom"
			alpha="0.0"
			visible="false"
			keep="true"
			zorder="58"
			x="82" y="11"
			scale="0.22"
	               crop="0|0|200|200"
	               onovercrop="0|210|200|200"
	                ondowncrop="0|425|200|200"
			effect="dropshadow(2,45,0x000000,3,1);"	        			
			onloaded="tween(plugin[bton_full_back].alpha, 1.0, 2);"
  onclick="set(fullscreen,false); set(plugin[bton_full].visible,true); set(plugin[bton_full_back].visible,false);"
			selectable="true"
	        />		        	        

http://www.humanfoto.fr/C/tour.html

Any suggestions ?

Thanks. *smile*
Steph.
Steph

Tuur

Sage

Posts: 3,839

Location: Netherlands

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

  • Send private message

2

Saturday, March 12th 2011, 6:10pm

I think it goes wrong with the onloaded in the bton_full_back button

take that out and try again.

Tuur *thumbsup*

also some major stich errors!

VN2011

Professional

Posts: 1,336

Location: Duluth MN

  • Send private message

3

Saturday, March 12th 2011, 6:15pm

in your xml you are still using the below code also remove it, the exitfullscreen event is undoing your button actions. notice they both say bton_full = false. remove both of them or fix the code.

onenterfullscreen="set(plugin[bton_full].visible,false); set(plugin[bton_full_back].visible,true);" onexitfullscreen="set(plugin[bton_full_back].visible,true); set(plugin[bton_full].visible,false);" />

esys

Intermediate

  • "esys" started this thread

Posts: 267

Location: Balazé France

Occupation: photographer

  • Send private message

4

Sunday, March 13th 2011, 12:55am

Hi,

Thanks Tuur. My pano is a test. I've seen the stitch defaults. A strong wind that day ! *smile* I'll fix them later

I don't see why my onloaded event could upset the actions. Anyway i've tried without(on both plugins), it didn't work neither.

VN, my code seems to be right. (copied from my last post, bton-full-back)

Source code

1
onclick="set(fullscreen,false); set(plugin[bton_full].visible,true); set(plugin[bton_full_back].visible,false);"

Anyway it works. I just don't understand why do I need to click two times on the exit full button? (one to exit, one to see the enter full button).
Yours, VN, turns the button back visible on exitfullscreen (it's a copy of your enterfullscreen) ?!!

Thanks for your time. ;-)

Steph
Steph

VN2011

Professional

Posts: 1,336

Location: Duluth MN

  • Send private message

5

Sunday, March 13th 2011, 3:02am

onenterfullscreen="set(plugin[bton_full].visible,false); set(plugin[bton_full_back].visible,true);"

onexitfullscreen="set(plugin[bton_full_back].visible,true); set(plugin[bton_full].visible,false);" />

they are still wrong even if you copied them from me. they say exactly the same thing that is why you have to press it twice before the url chamges. it should read:

onenterfullscreen="set(plugin[bton_full].visible,false); set(plugin[bton_full_back].visible,true);"

onexitfullscreen="set(plugin[bton_full_back].visible,false); set(plugin[bton_full].visible,true);" />

then it will be doing the same thing as the actions. and stay in sync.

esys

Intermediate

  • "esys" started this thread

Posts: 267

Location: Balazé France

Occupation: photographer

  • Send private message

6

Sunday, March 13th 2011, 2:40pm

Hi,

Thanks VN, solved. *smile*
Steph