JohnZ
10-17-2003, 06:13 PM
I'm trying to use attachMovie to assign movie clips to clips I'm making with duplicateMovieClip.
-"ani" is a movie clip which contains a clip called "letters." In the script, ani is incremented by the variable "i".
-"myLetter" is a variable which holds a letter from the variable "text".
-I'm trying to use the variable "myLetter"+i to reference a movie clip of the same letter. For instance, if "myLetter"+i contains the letter "a," I want to use attachMovie to attach movie clip "a" to "ani/letters." (The reason I'm using individual clips for every letter is that the text looks better when its broken apart)
-"letters" is a simple graphic, designated as a movie clip, which is intended to be a placeholder for the attached movie clip.
-"letterInst"+i doesn't exist as a library member; I think it doesn't need to because its an instance name.
_root.ani.duplicateMovieClip("ani"+i, i);
_root["myLetter"+i] = substring(text, i, 1);
ClipID= _root["myLetter"+i];
ContainerID = "_root/ani"+i+"/letters";
ContainerID.attachMovie(ClipID,"letterInst"+i,10);
//When I trace Clip ID I get: a (the letter I'm looking for)
//When I trace ContainerID I get: _root/ani2/letters (incremented correctly)
Is my logic correct here? Right now, the clips I'm creating don't show the movies I'm trying to attach. Please help if you can.
thank you SO MUCH for any help,
JohnZ
-"ani" is a movie clip which contains a clip called "letters." In the script, ani is incremented by the variable "i".
-"myLetter" is a variable which holds a letter from the variable "text".
-I'm trying to use the variable "myLetter"+i to reference a movie clip of the same letter. For instance, if "myLetter"+i contains the letter "a," I want to use attachMovie to attach movie clip "a" to "ani/letters." (The reason I'm using individual clips for every letter is that the text looks better when its broken apart)
-"letters" is a simple graphic, designated as a movie clip, which is intended to be a placeholder for the attached movie clip.
-"letterInst"+i doesn't exist as a library member; I think it doesn't need to because its an instance name.
_root.ani.duplicateMovieClip("ani"+i, i);
_root["myLetter"+i] = substring(text, i, 1);
ClipID= _root["myLetter"+i];
ContainerID = "_root/ani"+i+"/letters";
ContainerID.attachMovie(ClipID,"letterInst"+i,10);
//When I trace Clip ID I get: a (the letter I'm looking for)
//When I trace ContainerID I get: _root/ani2/letters (incremented correctly)
Is my logic correct here? Right now, the clips I'm creating don't show the movies I'm trying to attach. Please help if you can.
thank you SO MUCH for any help,
JohnZ