Hi I think you should use ObjectStyle! create an Object Style and set some transparency settings, and apply this to objects
var my_obj_style;
try {
my_obj_style = myDoc.objectStyles.add({name:"inner glow setting"});
}
catch(e){
my_obj_style = myDoc.objectStyles.item("inner glow setting");
}
with (my_obj_style.transparencySettings.innerGlowSettings){
applied = true;
blendMode = 1852797549/*BlendMode.NORMAL*/;
opacity = 100;
noise = 0;
effectColor = "Paper";
technique = 2020618338/*GlowTechnique.PRECISE*/;
spread = 79;
size = '0.125in';
source = 2020618594 /*InnerGlowSource.EDGE_SOURCED*/;
}
//Create the ovals and specify their size and location...
var myLeftOval = myPage.ovals.add({geometricBounds:[2, -3, 2.75, -.75], fillColor:myDoc.colors.item("25% Black"),strokeColor:myDoc.swatches.item("None"), itemLayer:myDoc.layers.item("New Layer"),appliedObjectStyle:my_obj_style});
var myCenterOval = myPage.ovals.add({geometricBounds:[3, -3, 3.75, -.75], fillColor:myDoc.colors.item("25% Black"),strokeColor:myDoc.swatches.item("None"), itemLayer:myDoc.layers.item("New Layer")});
var myRightOval = myPage.ovals.add({geometricBounds:[4, -3, 4.75, -.75], fillColor:myDoc.colors.item("25% Black"),strokeColor:myDoc.swatches.item("None"), itemLayer:myDoc.layers.item("New Layer"),appliedObjectStyle:my_obj_style});
I didn't apply object style to center oval, on purpose. Thankyou mg.
... View more