_imageRotator.reload on multiple views

chris2112

New member
I have the Pro version now with 2 different views set up on the page.
I need a set of thumbnails to change (reload with a different .xml) the first view, and a separate set of thumbnails to change the second view.

I'm using the function "_imageRotator.reload('path-here')" on both sets of thumbnails, but they only changes the first viewer. How do I set up the second set of thumbs to change the second view and not the first?

Here's a link to the testing page:
[url removed]

The "laser" check box is supposed to change the first viewer and it does.
the "majestic package" and "Gracie King Package" are supposed to change the second viewer, but they're changing the first.
 

WebSupport

Active member
Hi Chris, thanks again for your support!

Here's how you should be able to do this in the version of the script you are using (sorry it's not documented yet and there's no template in SpotEditor, but all is coming shortly). Note that the plugin is initialized differently to give you access to each viewer object:

var ir1 = WR360.ImageRotator.Create("wr360PlayerId1");
ir1.settings.graphicsPath = "imagerotator/html/img/basic";
ir1.settings.configFileURL = "360_assets/regular-test/regular-test.xml";
ir1.licenseFileURL = "include/license.lic";
ir1.runImageRotator();

var ir2 = new WR360.ImageRotator.Create("wr360PlayerId2");
ir1.settings.graphicsPath = "imagerotator/html/img/basic";
ir2.settings.configFileURL = "your-other-xml-path";
ir2.licenseFileURL = "include/license.lic";
ir2.runImageRotator();

Then you can call ir1.reload or ir2.reload

Please let me know if this helps.
 
Top