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

Saturday, January 9th 2010, 4:56pm

Syntax for action triggering second action

Does anyone know the correct syntax for an action to activate another action ? (Or if this is even allowed?)

For example, I have a "close all" button with the following code:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
	<action name="closeaction">
		set(plugin[hide-show].state, closed);
		set(plugin[maps].visible,false);
		set(plugin[full-screen].visible,false);
		set(plugin[rotation].visible,false);
		set(plugin[audio].visible,false);
		set(plugin[left].visible,false);
		set(plugin[right].visible,false);
		set(plugin[up].visible,false);
		set(plugin[down].visible,false);
		set(plugin[zoom-in].visible,false);
		set(plugin[zoom-out].visible,false);
		set(plugin[border].visible,false);
		set(plugin[info].visible,false);
set(plugin[interactivemap].visible,false);
	</action>


To this I would simply like to also trigger the action "closemap", but I can't work out what style to write ...

As an alternative I could also add this action to the "close all" button. But not having much luck adding a second action there either.

thanks

michel

Professional

Posts: 1,153

Location: ANDORRA

Occupation: TV

  • Send private message

2

Saturday, January 9th 2010, 7:15pm

Hi Richard,

Add a call to your closemap action inside your closeaction.... like this:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<action name="closeaction">
		set(plugin[hide-show].state, closed);
		set(plugin[maps].visible,false);
		set(plugin[full-screen].visible,false);
		set(plugin[rotation].visible,false);
		set(plugin[audio].visible,false);
		set(plugin[left].visible,false);
		set(plugin[right].visible,false);
		set(plugin[up].visible,false);
		set(plugin[down].visible,false);
		set(plugin[zoom-in].visible,false);
		set(plugin[zoom-out].visible,false);
		set(plugin[border].visible,false);
		set(plugin[info].visible,false);
		set(plugin[interactivemap].visible,false);
		action(closemap);
</action>


SAlut.

3

Saturday, January 9th 2010, 11:24pm

Now I'm embarassed *unsure*

michel

Professional

Posts: 1,153

Location: ANDORRA

Occupation: TV

  • Send private message

4

Sunday, January 10th 2010, 1:48am

Hi Richard,

What do you mean? *confused* What are you looking for?

5

Sunday, January 10th 2010, 5:04am

*g* It's just that the solution was so simple I should have known . . .

6

Monday, January 11th 2010, 10:39am

Hi,

instead of:

Source code

1
action(closemap); 

you could also use just:

Source code

1
closemap();


best regards,
Klaus