Hi Everybody,
I have the code below inside movie A. The code is to duplicate a movieclip. I am loading this movie A into my main movie B. I am trying to substitute the _root targeting in the code so it affects the duplicated movieclips in my movie A, but so far when I substitute the _root by THIS, the code does not work.
Does anyone know a good way to solve this?
Thank you very much for your help.
function makeGrid() {
_root.button_mc._visible = false;
clearInterval(grid_id);
var name:String = "holder" + k + "_mc";
button_mc.duplicateMovieClip("holder" + k + "_mc", k);
_root[name]._x = xStart + (k % 3) * distance;
_root[name]._y = yStart + Math.floor(k / 3) * distance;
//SCRIPT for the functionality of the button mc
_root[name].ID = k;
_root[name].selected_b = false;
_root[name].onRollOver = function() {
this.gotoAndStop("Over");
};
_root[name].onRollOut = function() {
if (this.selected_b == false) {
this.gotoAndStop("Up");
} else {
this.gotoAndStop("Selected");
}
};
_root[name].onPress = function() {
_parent.projectName2_txt.text = title[this.ID];
_parent.imagePlace_mc.imageHolder_mc.loadMovie(image[this.ID]);
_parent.imagePlace_mc.imageHolder_mc._alpha = 0;
description_lv.load(description[this.ID]);
_parent.projectDescription2_txt.scroll = 1;
this.gotoAndStop("Selected");
this.selected_b = true;
};
}