masteroleary
06-13-2005, 09:57 PM
:confused:
I need help! I am trying to add the values of two MovieClip variables
The purpose of this function is to check if a section is loaded. If it isnt then it will load it, if it is then it will send it to the nextHighestDepth. The yesNo array object stores Boolean values which allow the function to determine if the section has been loaded previously. Var x stores the static path which needs to be combined to the variable mcTarg which is passed to the function.
The problem is that what I currently have loads the target file (fileTarg) into the root, replacing the movie mainframe.My only guess is that when adding the values of the two movie clip variables the dot (.) that seperates them is not being added intuitively.
var yesNo:Array = new Array();
yesNo["holdBio_mc"] = false;
function loadIt(mcTarg:MovieClip, fileTarg:String) {
var x:MovieClip = _root.holder_mc;
var localTarg:MovieClip = _root.holder_mc + '.' + mcTarg;
if (yesNo[mcTarg] == true) {
localTarg.swapDepths(_root.getNextHighestDepth());
} else {
_root.holder_mc.createEmptyMovieClip(mcTarg, this.getNextHighestDepth());
mcLoader.loadClip(fileTarg, localTarg);
yesNo["holdBio_mc"] = true;
trace(yesNo["holdBio_mc"]);
}
}
I need help! I am trying to add the values of two MovieClip variables
The purpose of this function is to check if a section is loaded. If it isnt then it will load it, if it is then it will send it to the nextHighestDepth. The yesNo array object stores Boolean values which allow the function to determine if the section has been loaded previously. Var x stores the static path which needs to be combined to the variable mcTarg which is passed to the function.
The problem is that what I currently have loads the target file (fileTarg) into the root, replacing the movie mainframe.My only guess is that when adding the values of the two movie clip variables the dot (.) that seperates them is not being added intuitively.
var yesNo:Array = new Array();
yesNo["holdBio_mc"] = false;
function loadIt(mcTarg:MovieClip, fileTarg:String) {
var x:MovieClip = _root.holder_mc;
var localTarg:MovieClip = _root.holder_mc + '.' + mcTarg;
if (yesNo[mcTarg] == true) {
localTarg.swapDepths(_root.getNextHighestDepth());
} else {
_root.holder_mc.createEmptyMovieClip(mcTarg, this.getNextHighestDepth());
mcLoader.loadClip(fileTarg, localTarg);
yesNo["holdBio_mc"] = true;
trace(yesNo["holdBio_mc"]);
}
}