8 Replies Latest reply on Mar 22, 2013 2:18 AM by Trevorׅ

    Help, pls, fill an array... [js]

    Beliakov Level 1

      I chek all graphics (num in order, type, page) in doc and try to get into array. How to whrite it in array?

      i'm lost in this:

       

      var mColl = [[],[3]]; //declare 2d-array

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

      var myGraphic = aD.allGraphics[i];

              if (myGraphic.parentPage !=null) { //if graph not in desktop

           $.writeln ( i );

              $.writeln (myGraphic.imageTypeName);

              $.writeln ("on page " + myGraphic.parent.parentPage.name + "\n");

      // and here i'd like to collect all this data in array       

              mColl[i, 0] = mColl.push(i);

              mColl[i, 1] = mColl.push(myGraphic.imageTypeName);

              mColl[i, 2] = mColl.push(myGraphic.parent.parentPage.name);

              }

      }

      alert (mColl); // so far i have in this big mess