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, September 12th 2010, 6:43pm

How do I hide all plugins but one?

I need to hide all the superfluous crap in order to allow the user to take a screenshot if he wants to, but the copyright plugin must always remain visible, so I can't use plugin.visible... How can I do this?

2

Sunday, September 12th 2010, 7:31pm

Nevermind... It just occured to me that HOTSPOTS are what's unlimited/untrackable in my visit, not plugins *rolleyes* I can simply hide all the plugins I want to hide individually and then use hotspot.visible to hide all the hotspots, achieving the desired result. Still, an alwaysvisible="true" attribute in a hotspot/plugin would be useful to make it "immune" to plugin.visible=false or hotspot.visible=false (in practice, such an attribute would just create the plugin/hotspot in a different parent movieclip).

michel

Professional

Posts: 1,153

Location: ANDORRA

Occupation: TV

  • Send private message

3

Sunday, September 12th 2010, 8:32pm

Hi Protected,

Playing on your request *smile* , I get the following code that hides/shows all plugins/hotspots less the ones with an alwaysvisible="true" attribute:

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
36
37
38
	<!-- usage:                          	-->
	<!-- hide_param_less(plugin)         	-->
	<!-- hide_param_less(hotspot)        	-->
	<!-- show_param_that_wasvisible(plugin)  -->
	<!-- show_param_that_wasvisible(hotspot) -->
	
	<action name="hide_param_less">
		set(i,0);
		do_hide_param_less(%1);
	</action>
	
	<action name="do_hide_param_less">
		if(i LT %1.count,
			ifnot(%1[get(i)].alwaysvisible, 
				if(%1[get(i)].visible ,
					set(%1[get(i)].wasvisible,true);
					);
				set(%1[get(i)].visible,false);
				);
			inc(i);
			do_hide_param_less(%1);
			);
	</action>
	
	<action name="show_param_that_wasvisible">
		set(i,0);
		do_show_param_that_wasvisible(%1);
	</action>
	
	<action name="do_show_param_that_wasvisible">
		if(i LT %1.count,
			if(%1[get(i)].wasvisible ,
				set(%1[get(i)].visible,true);
				);
			inc(i);
			do_show_param_that_wasvisible(%1);
			);
	</action>


Hope this can be useful ;-) ...

SAlut.

4

Sunday, September 12th 2010, 8:42pm

Wow, that's very cool, michel, thanks!

I've been noticing you seem to be one of the people who understands krpano scripting the best; I hope to see you among those helping with the wiki *g*

Similar threads