Copy link to clipboard
Copied
I have an architectural floor plan that I would like to add buttons to that open/close different elevations (pics) throughout the project. I want each button to open/close its own corresponding picture.
Copy link to clipboard
Copied
Im currently using Acrobat XI
Copy link to clipboard
Copied
You can use image field to add image and then use script in button to show/hide that field.
As Mouse UP event of button add this and replace picture field name to your field name:
if(this.getField("Picture_af_image").display == display.visible)
this.getField("Picture_af_image").display = display.hidden;
else this.getField("Picture_af_image").display = display.visible;
Copy link to clipboard
Copied
Thanks for your response. However, Im am brand new to scripting and unfamiliar with this process.
Copy link to clipboard
Copied
You have everything you need above. You just need to change the field name, between the quotes.
To make it a bit more compact, and so that you only have to enter the field name once, use this version of that code:
// Change "Picture_af_image" below to the name of your actual field
var imageFieldName = "Picture_af_image";
var f = this.getField(imageFieldName);
if(f.display == display.visible)
f.display = display.hidden;
else f.display = display.visible;