Sie sind nicht angemeldet.

1

Sonntag, 12. September 2010, 18:43

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

Sonntag, 12. September 2010, 19:31

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).

3

Sonntag, 12. September 2010, 20:32

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:

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
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

Sonntag, 12. September 2010, 20:42

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*

Ähnliche Themen