Hi,
first you need to know that the Flashplayer and Javascript are two different 'worlds' - they are not directly compatible, they communicate via internal/hidden/automatic interfaces.
When passing Number or Strings from Flash to Javascript or from Javascript to Flash, then these interfaces are automatically do the conversion in behind.
Passing Objects is possible too, but there the interface is not passing the Object itself, instead it creates a new Object and tries to copy and convert all properties. And here the problem begins - some Flashplayer Objects/properties can't be converted, e.g. when an Object contains a Flashplayer native 'Sprite' Object, then it is not possible to convert that to Javascript - an error will be thrown in that case.
That means as long as you are only setting/getting the normal krpano settings/properties, then there is no problem, but when trying to get a whole Objects, it will fail.
Btw - this code here is wrong:
krpano.set('layer[layerName].style, map_marker_active');
correct would be - two parameters - the property and its value:
krpano.set("layer[layerName].style", "map_marker_active");
Best regards,
Klaus