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

Friday, February 20th 2015, 9:41am

set url.flash

I'm using the addhotspot command to create a hotspot but setting the flash URL using the Set() command doesn't seem to work with this variable.

set(hotspot[video].url.flash, %SWFPATH%/Engine/plugins/videoplayer.swf);

I imagine this is because there Is a dot in the middle of the name of the variable and the set() command only recognises what comes after the first dot.

As I'm creating a large number of video hotspots an action is necessary to create them. Does anyone know of a workaround for achieving this?

2

Friday, February 20th 2015, 11:37am

Hi,

that '.flash' is a special filter for the static xml parsing.

See here for details:
http://krpano.com/docu/xml/#devicechecksforattributes

That will be only parsed and resolved when parsing the xml attributes during loading. When the 'devices attribute' is matching the current device, then this xml attribute will be set and when not, it will be skipped.

When using dynamic actions code, it would be necessary to check the device manually, e.g. this way:

Source code

1
2
if(device.flash, set(hotspot[video].url, %SWFPATH%/Engine/plugins/videoplayer.swf));
if(device.html5, set(hotspot[video].url, %SWFPATH%/Engine/plugins/videoplayer.js));


Best regards,
Klaus

3

Friday, February 20th 2015, 1:29pm

Thanks Klaus,

That worked like a dream!