Hi,
I am trying to override or set some variables just before embedding the viewer, using the vars parameter of the parametersobject passed to embedpano(). This is for an embedded .swf created using the "singleswf" template (in linux with kmakemultires -config=templates/singleswf.config).
I would like to set the autorotate on, and adjust the zoom level. So, I am creating the vars parameter as an object containing the settings to match the xml settings. However I am getting "ERROR: parsing parameters failed - TypeError: Error #1034" thrown in the Flash overlay.
Am I using the settings in the right way? Is it possible to set these in the js object, or do I need to do this in the xml?
Here is my code:
vt = { parameters: { swf: '', target: 'krpano', xml: '', width: '940px', height: '637px', vars: { autorotate: { enabled: true} }, }, go: function() { // Parameters vt.parameters.swf = Drupal.settings.virtual_tour.swf; vt.parameters.xml = Drupal.settings.virtual_tour.xml; // Embed embedpano(vt.parameters); }}if (typeof window.jQuery != "undefined") { jQuery(vt.go);}
Any pointers?
Thanks, David
PS. Sorry - my code keeps getting collapsed inside the code tags