Skip navigation
VanithaAllwin
Currently Being Moderated

Convert image to button

May 15, 2012 11:40 AM

Hi All,

 

Is it possible to convert an image into button and add behaviour script to it? or Is it possible to create a button with icon and events to it? Please suggest.

 

Thanks,

Vanitha Allwin

 
Replies
  • Currently Being Moderated
    May 16, 2012 12:40 PM   in reply to VanithaAllwin

    http://www.kahrel.plus.com/indesign/scriptui.html

     

    This has been very valuable. This will help you with almost everything you need. Also try ScriptUISprites by Marc Autret.

     

    Also you will need this to make your png.

     

    var f1 = new File( "/Applications/Adobe InDesign CS4/File Name.png" );

    var f2 = new File( "/Users/Desktop/_MAC.txt" );

    //var f ="/Applications/Adobe InDesign CS4/Scripts/Scripts Panel/New UI/GreenButton2.png";

    if ( f1.exists ) {

    f1.encoding = "BINARY";

    f1.open( "r" );

    var buf = f1.read();

    f2.open( "w" );

    f2.write( buf.toSource() );

    f2.close();

    f1.close();

    }

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 18, 2012 5:33 AM   in reply to VanithaAllwin

    I'm sorry my post was about UI. To answer your question. I think yes. Although I have never tried it should just be a matter of formatting the image with qualities that you want. My first question usaully when I am scripting is can I create it in the program. If I can then it is likely that I can script it.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points