Within the InDesign CS4 designer, I can very easily make a TextArea transparent. I just right click on the TextArea within a document, select Effects-->Transparency, and within the “Effects” window that launches, I can set the “Opacity” to 0% on the Fill settings.
I am attempting to figure out a way to make a TextArea transparent via javascript. I initially thought that I could do this by applying an ObjectStyle via something similar to the code below:
//open document
var myDocument = app.open(new File(designFileName));
//grab the appropriate layer
var contentLayer = myDocument.layers.item("ContentLayer");
//create an objectstyle
var transparentObjStyle = myDocument.objectStyles.add({name:"TransparentObjStyle", opacity:0});
//apply that object style to the document
contentLayer.textFrames[0].applyObjectStyle(transparentObjStyle, true);
//close the document
It is close. It makes the TextArea transparent, but it leaves a black box around the border of the TextArea. Has anyone done anything like this and have any suggestions on how to proceed?