Hi,
I will try to explain too
Could you please explain the "global variable" a little more?
sorry, that 'global variable' is a term from programming, here it only means an variable that is globally available/accessible,
e.g. see here - these are the predefined global variables in krpano:
http://krpano.com/docu/actions/#globalvarsreference
defining a custom global variable is possible either by defining it at the <krpano> xml level (which is the 'global scope')...
e.g. either at the root <krpano> node:
|
Source code
|
1
2
3
|
<krpano ... my_global_var="123">
...
</krpano>
|
or anywhere in the xml inside the <krpano> by defining an additionally <krpano> element, e.g.
|
Source code
|
1
2
3
4
5
|
<krpano ...>
...
<krpano my_global_var="123" />
...
</krpano>
|
... or by defining/creating it dynamically by 'setting' it,
e.g. in an action:
|
Source code
|
1
|
set(my_global_var, 123);
|
on the other side - 'non-global-variables' or 'local variables' in krpano are the variables from an specific object/element, e.g. the attributes from an <plugin> element, e.g. the "name", "width", "height" ... variables from <plugin> element are variables from the given plugin object,
to access an plugin local variable, the 'full path' to it, e.g. "plugin[name].width" need to be used - with only one exception - when the action code is called from an plugin event - then the local variables from this plugin object are directly accessible also without path, e.g. when doing: <plugin ... onclick="tween(width,100);" /> the local "width" variable of the current plugin element will be changed,
best regards,
Klaus