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.

Obel

Beginner

  • "Obel" started this thread

Posts: 18

Location: Denmark

Occupation: Engineering stuff ...

  • Send private message

1

Wednesday, December 30th 2015, 4:04pm

Layer enabled not working as expected

krpano 1.18.5

I have roughly this code:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
<!-- SPLASH -->
<layer name="skin_splash_window" type="container" keep="true" align="center" width="812" height="480" x="0" y="-15%">
	<layer name="splash_map" state="open" url="%SWFPATH%/skin/pansertaarn.png" visible="true" align="topleft" width="100%" height="100%" x="0" y="0">
		<layer name="skin_splash_border" type="container" keep="true" align="center" width="804" height="472" x="0" y="0" bgborder="4 0x000000 0.5" />
		<layer name="skin_close_window" type="container" keep="true" align="righttop" width="40" height="40" x="8" y="8" bgcolor="0x000000" bgalpha="0.25" bgroundedge="4" maskchildren="true">
			<layer name="skin_btn_thumbs" style="skin_base|skin_glow" crop="0|192|64|64"  align="righttop"  x="4"   y="4"   scale="0.5" ondown2="skin_showmap(false); skin_hidesplash();" />
		</layer>
		<layer name="skin_splash2_window" type="container" keep="true" align="leftbottom" width="804" height="157" x="4" y="4" bgcolor="0x000000" bgalpha="0.25">
			<layer name="splash1_title" url="%SWFPATH%/plugins/textfield.swf" html="Virtuel rundvisning" align="lefttop" edge="lefttop" width="95%" height="16" autoheight="true" x="5" y="13" zorder="4" enabled="false" background="false" border="false" css="text-align:left; color:#FFFFFF; font-family:Arial; font-weight:bold; font-size:30px;" textshadow="1" />
			<layer name="splash2_title" url="%SWFPATH%/plugins/textfield.swf" html="Garderhøjfortet" align="lefttop" edge="lefttop" width="95%" height="32" autoheight="true" x="5" y="40" zorder="4" enabled="false" background="false" border="false" css="text-align:left; color:#FFFFFF; font-family:Arial; font-weight:bold; font-size:60px;" textshadow="1" />
			<layer name="splash3_title" url="%SWFPATH%/plugins/textfield.swf" html="Gentofte - Danmark" align="lefttop" edge="lefttop" width="95%" height="16" autoheight="true" x="5" y="103" zorder="4" enabled="false" background="false" border="false" css="text-align:left; color:#FFFFFF; font-family:Arial; font-weight:bold; font-size:30px;" textshadow="1" />
		</layer>
	</layer>
</layer>


Now when I press a button I want to disable the outermost layer using .enabled="false" then fade it out:

Source code

1
2
3
4
5
<action name="skin_hidesplash">
	set(layer[skin_splash_window].enabled, false);
	tween(layer[skin_splash_window].alpha, 0);
	set(contextmenu.item[ss].visible,true);
</action>



After running the action, the layer is gone but still receiving mouse clicks and I though that was what .enabled="false" would prevent.


Then I changed the code to:


Source code

1
2
3
4
5
6
<action name="skin_hidesplash">
	set(layer[skin_splash_window].enabled, false);
	set(layer[splash_map].enabled, false);
	tween(layer[skin_splash_window].alpha, 0);
	set(contextmenu.item[ss].visible,true);
</action>



Now, it works as desired, but disabling a child layer after the parent has been disabled should be redundant.

What am I missing?

Kind regards

/Obel

This post has been edited 1 times, last edit by "Obel" (Dec 30th 2015, 4:18pm)


panomaster

Intermediate

Posts: 279

Location: Kobyłka, Poland

Occupation: Virtual Tours - Spherical Panoramas - Krpano developer

  • Send private message

2

Thursday, December 31st 2015, 10:25am

Add

Source code

1
autoalpha="true" 


to skin_splash_window layer and just fade it out

Source code

1
2
3
4
<action name="skin_hidesplash">
	tween(layer[skin_splash_window].alpha, 0);
	set(contextmenu.item[ss].visible,true);
</action>

3

Wednesday, March 2nd 2016, 3:25pm

Hi,

just as quick note - in the next release this problem is fixed.

Best regards,
Klaus