Hi.
I have a drop down that has two options Hardcover and Softcover. When Hardcover is selected I would like the OCG layer for Hard Cover to appear....and the same would happen for Softcover; the Soft Cover OCG layer will appear.
I'm not sure how to connect the drop down to the OCG layer. Can someone guide me in the right direction? Thanks in advance.
Acrobat 9 Pro, Mac
thanks much.
sara
I made two bookmarks one named "Show Front Cover" and the other "Show Back Cover". The layer names are "Page 1" and "Page 2".
I assigned the following scripts to a "Run a JavaScript" action in each bookmark instead of haveing the bookmarks go to a certain page/view.
//This is the script for the first bookmark.
function GetOCGByName(myLayerName)
{
var myOCGs = getOCGs(pageNum);
for(var i = 0; i < myOCGs.length; i++)
{
if(myOCGs[i].name == myLayerName)
return myOCGs[i];
}
return null;
}
var showPage1 = GetOCGByName("Page 1");
var showPage2 = GetOCGByName("Page 2");
showPage1.state = true;
showPage2.state = false;
//This is the script for the second bookmark.
function GetOCGByName(myLayerName)
{
var myOCGs = getOCGs(pageNum);
for(var i = 0; i < myOCGs.length; i++)
{
if(myOCGs[i].name == myLayerName)
return myOCGs[i];
}
return null;
}
var showPage1 = GetOCGByName("Page 1");
var showPage2 = GetOCGByName("Page 2");
showPage2.state = true;
showPage1.state = false;
StevenD