6 Replies Latest reply: Jun 26, 2014 4:58 AM by IntaglioGraphics RSS

    Creating slider to control current layer opacity in HTML?

    IntaglioGraphics

      Hi! I wanted to create a slider in custom panel which changes the for eg opacity of the current layer.

       

      Here is what I used in HTML5

      <div>

      <input type="range" min="0" max="100" value="0" step="1" id="opacity" name="opacity" onChange="sliderChange(this.value)"/>

      </div>

       

      Here is the javascript function

       

      $._ext_OPACITY={

            run : function() {

             app.activeDocument.activeLayer.opacity = 50;

          },

      };

       

       

      Now can you please tell me how to link that HTML slider with this function so that user can change the opacity using the slider. Thanks alot.