icebluedesigns
03-26-2003, 11:50 PM
I am trying to dynamically create a number of movie clips depending on the variable "wLength". I want to create the movies inside of another empty movie so that when the creation is complete then I can animate the whole "empty" clip after its "full". ;) THe only part of the following code that I am kinda of worried about because of the fact that the whole code isnt complete and I cant really test it is the attachMovie portion and the dynamically created MCs. If "i" equaled 1 then would the attachMovie function attach a movie clip called "letter1" to cClip_mc and call it "obj1"? I hope that I worded this right so everyone can follow what I am asking. Thanks for your help guys!
FontClass.prototype.creatMovies = function(){
_root.createEmptyMovieClip("cClip_mc",1);
setProperty(_root.cClip_mc, _visible, false);
for(i=0;i<myVars.wLength;i++){
duplicateMovieClip(letters_mc, "letter" add i, 1);
cClip_mc.attachMovie("letter" add i, "obj" add i, 1);
setProperty(cClip_mc.obj add i, _x, (myVars.startPos+(myVars.space*i)));
}
_root.animate();
};
FontClass.prototype.creatMovies = function(){
_root.createEmptyMovieClip("cClip_mc",1);
setProperty(_root.cClip_mc, _visible, false);
for(i=0;i<myVars.wLength;i++){
duplicateMovieClip(letters_mc, "letter" add i, 1);
cClip_mc.attachMovie("letter" add i, "obj" add i, 1);
setProperty(cClip_mc.obj add i, _x, (myVars.startPos+(myVars.space*i)));
}
_root.animate();
};