1 Reply Latest reply on Apr 4, 2007 7:11 AM by kglad

    How attach movie using varable

    CheapHardwarez
      I need to know how to attach a movie to a movie whos name is stored in a varable.

      First I dynamically attach a movie then I need to attach another movie inside that movie. The problem is I can not discover how to attach a movie whos name is store in a var into another movie.

      First I attach a movie to the root like this:
      var temp = "user"+[_root.users.length-1]; //name of movie to attach
      _root.attachMovie("User", temp, 2200+_root.users.length); //add user movie

      Now the question is how do I attach a movie to the dynamically created movie?
      _root.user???????.attachMovie("anotherClip,tempp,2300); ?????????????????????????????????

      Basically I have an array which every time a person connects their user name is pushed on the array.
      Then a movie is created. The name is user+the number that they are in the arry. So the the second user would have a movie created called user1. Then when I need to attach another movie to that users movie a function returns the number that they are inside the array. Then I need to attach a movie to that users movie clip so user+[number] is the name. I just cant get it to work.
      I last tried this:
      _root.user+[number].attachMovie("Smile0", "theSmiley", 2300);