10 Replies Latest reply on Nov 9, 2012 8:15 PM by sundar_r

    Moving text frame to separate layer

    rajnikids Level 1

      Hi,

       

      Can anyone help on this. While running script for moving text frame with blue fill color to blue layer,, the error is;

       

      mytext.parentTextFrames.everyItem is not a function.   please solve.

       

       

      var mydoc=app.documents.item(0);

      var mytexts=mydoc.stories.everyItem().paragraphs.everyItem().getElements( );

       

      for (i=0;i<mytexts.length;i++) {

          var mytext=mytexts[i];

       

          if (mytext.fillColor.name  == "blue") {

          mytext.parentTextFrames.everyItem().itemLayer=mydoc.layers.item("blue layer");

          }

      }

       

       

      thanks

      rajnikanth