4 Replies Latest reply on Jan 22, 2013 2:27 PM by romanobstuder

    adding action to button

    romanobstuder

      Hi all

       

      I got a script that finds all images in a document and overlays a button.

      I would like add interactivity to the button, like go to page x or go to URL x

       

      How do I code this?

       

      Here is the part that works so far...

       

      var myButton = myFrame.parent.buttons.add(myLabelLayer2, undefined, undefined,{geometricBounds : myGreyBoxBounds});

      var myStates = myButton.states;

      myStates.add(State);

      myStates.add(State);

      var myStateA = myStates[0];

      var myStateB = myStates[1];

      var myStateC = myStates[2];

      var myTextFrameA = myStateA.textFrames.add({geometricBounds : myGreyBoxBounds, contents: "Normal"});

      var myTextFrameB = myStateB.textFrames.add({geometricBounds : myGreyBoxBounds, contents: "Rollover"});

      var myTextFrameC = myStateC.textFrames.add({geometricBounds : myGreyBoxBounds, contents: "Click"});

      myTextFrameA.fillColor  = "None";

      myTextFrameB.fillColor  = "tbgGrey";

      myTextFrameC.fillColor  = "None";

       

      any hints appreciated

       

      Romano