0 Replies Latest reply on Mar 3, 2008 10:49 AM by Xero000

    duplicate Movie Clip to create buttons

    Xero000 Level 1
      I don't see why i can't quite get my head around this but i'm trying to use a loop to create buttons via duplicate movie clip... yet can't seem to find a way to make the duplicated movie clips function as buttons as i'd like. here's what i've got. i know i'm skipping something but cant track it down. any suggestions would be great. thanks! here:

      for (j=0; j<subNum ; ++j) {

      this.lev1_mc["lev1_bttn"+i].lev2_mc.lev2_bttn.duplicateMovieClip("lev2_bttn"+j, j);
      this.lev1_mc["lev1_bttn"+i].lev2_mc["lev2_bttn"+j]._y = bttnHeight+bttnHeight*j;
      this.lev1_mc["lev1_bttn"+i].lev2_mc["lev2_bttn"+j].bttnName = xmlNode.childNodes
      .childNodes[j].attributes.Name; level2Btn = "lev2_bttn" + j;

      this.lev1_mc["lev1_bttn"+i].lev2_mc["lev2_bttn"+j].onPress = function (){
      _root.catagory.text = this.lev1_mc["lev1_bttn"+i].lev2_mc["lev2_bttn"+j].bttnName;
      }

      }

      }