5 Replies Latest reply on Feb 25, 2007 9:05 AM by kglad

    dynamically create rows and columns using attachmovie?

    ineedanswers
      yes i was wondering how i could attach movie clips dynamically using attachmove in a table format.

      I know how to do it in php using for loop and by defining the columns and using a variable for number of rows .

      The action script code below attaches them on the y axis just up and down. Id like it so i can define number of columns then have it increment a variable to determine how many rows.

      _root.myDataset.first();

      addMovieClips(0);


      function addMovieClips(i) {

      while (_root.myDataset.hasNext()) {

      attachMovie("targetClip", "site"+i, getNextHighestDepth(), _root.myDataset.currentItem);
      _root["site"+i]._y = _root["site"+i]._y+(i*100);
      i++;
      _root.myDataset.next();
      trace("addMovieClips");
      }

      _parent._parent.MyScrollPane.vScrollPolicy = "on"
      }
      stop();