1 Reply Latest reply on Mar 22, 2011 9:17 PM by George_Johnson

    Import Icon on Custom Tool Button

    Jo_2005 Level 1

      Hello,

       

      I have a script to add an icon to a custom tool button.

       

      When the script is run from the console in Adobe Professional 9, the tool button with the icon is added to the toolbar.

       

      The tool button needs to be installed on user's computers with Adobe Reader X.

       

      The script was placed as folder level javascript on a user's computer as well as the jpg file for the icon.

       

      When Adobe Reader X was opened the following error was thrown:

       

      TypeError: this.importIcon is not a function

      1:Folder-Level:App:Button.js

       

      Can any one please provide assistance on how to get the tool button with the icon to show in Adobe Reader X?

       

      This is the folder level javascript:

       

      this.importIcon("myIcon", "/C/temp/myIcon.jpg", 0);
      var oIcon = util.iconStreamFromIcon(this.getIcon("myIcon"));
      app.addToolButton({
      cName: "myButton",
      oIcon: oIcon,
      cExec: "console.println('My Button!');",
      nPos: 0
      });

      Thank you very much.