2 Replies Latest reply on May 15, 2012 11:33 AM by VanithaAllwin

    Multistate Object count limit

    VanithaAllwin

      Hi All,

       

      I tried to convert few textframes in a page to multi-state object. It converts less number of textframes to multi-state object than expected.For example, if there are 14 textframes to be converted into multi-state object, it converts only 7 textframes. Is there any limitation on number of multi-state objects per page? Here is the script which i used:

       

      for(myCounter = 0; myCounter < app.activeDocument.pages.length; myCounter++){

                  for(counter2=0;counter2<app.activeDocument.pages[myCounter].textFrames.length;counter2++) {

                      if(app.activeDocument.pages[myCounter].textFrames[counter2].itemLayer.name=="Réponse"){

                        theAnswer = app.activeDocument.pages[myCounter].textFrames[counter2];

                         thePageRef=app.activeDocument.spreads[myCounter];

                           var theMSO = thePageRef.multiStateObjects.add({name:"multiState", geometricBounds: theAnswer.geometricBounds});

                          theMSO.states.item(0).name = "withoutAnswer";

                          theMSO.states.item(1).name = "withAnswer";

                          theMSO.states.item(0).textFrames.add({contents:"", geometricBounds:theMSO.geometricBounds});

                            var myTextFrame = theMSO.states.item(1).addItemsToState(theAnswer) ;

           }

      }

       

      Please help.