4 Replies Latest reply on Apr 28, 2016 6:59 AM by hamdifem

    giving orders nested objects and numbers

    hamdifem Level 1

      There are ferrous objects in my writing frame (myObj). and there are some sub divisions under this frame. I just want to give numbers to this all divisions differently. however inside this flow there are some other ferrous objects (myObj) . and these con not be numbered sequentlly. what should i do to give numbers to these kind of divisions and subdivions. these all objects are ferrous objects. on the this screeshot the numbers skips on the yellow box. how can i solve this problem


      var myparent = app.selection[0].parentStory;

      var ancbox = myparent.textFrames.everyItem().getElements();

      var sno = 1;

      for(var n = 0; n < ancbox.length; n++){

      if(ancbox[n].appliedObjectStyle == "myObj"){  

      ancbox[n].texts[0].contents = String(sno);      

      sno = sno + 1;