0

currently we have a zoom viewer from scene7 on our website .now we are looking into replacing it with dhtml flyout viewer from adobe scene7. I was able to incorporate the new viewer on our page using the code below. Is there any way I can change the asset using JavaScript? Can you please direct me to correct documentation or example?

For example: we have apparels with different colors, when a user clicks on the swatch, I need to change the asset.

      <div id="flyout" style="position:relative;z-   index:10000000,width:360px;height:580px;"></div>
    <script type="text/JavaScript">
         var flyout = new s7js.flyout.AdvancedFlyout();
         flyout.setTargetId('flyout');
         flyout.setParameter('serverUrl', 'http://s7d1.scene7.com/is/image/');
         flyout.setParameter('asset', ‘xyz/ASC1578-TIRY');
         flyout.setParameter("zoomFactor", "2");
         flyout.init();
   </script>

Please help me find the solution.

TIA

James A Mohler
  • 11,060
  • 15
  • 46
  • 72
user1633800
  • 339
  • 1
  • 7
  • 14

1 Answers1

0

In the onclick method for the swatch you can have:

onclick="flyout.setParam('asset', 'xyz/someAsset'); flyout.init();"
Paul Hoke
  • 115
  • 2
  • 7