currently i am making textFields in actionscript 2.0 by dynamically creating the name of them and then using _root.creatTextField. my code works perfectly so long as i run the clip form _root or _level0 but i want to be able to load this swf into a empty movieclip among other pages through out my site. but this won’t work so long as i am using _root. i also select and modify my text fields in the same manner as creating them as seen below. is there an alternative that i can use so that it doesn’t mess up when the movie is not the _root movie?
function getContent() {
var fieldCounter:Number = 0;
for(var i:Number = 0; i < phpReceiver.n; i++){
var tempArray_arr:Array;
tempStr_str = phpReceiver[“date”+i.toString()]+ “~” + phpReceiver[“msg”+i.toString()];
tempArray_arr = tempStr_str.split("~");
totalLines += tempArray_arr.length;
for(var j = fieldCounter; j < (tempArray_arr.length+fieldCounter); j++){
var tempName:String = “field”+j+"_txt";
_root.createTextField(tempName, _root.getNextHighestDepth(), 5, (100 + 20 * j), 350, 20);
//_root[tempName].html = true;
_root[tempName].text = tempArray_arr[j - fieldCounter];
_root[tempName].embedFonts = true;
if(j==fieldCounter){
_root[tempName].setTextFormat(dateFormat_fmt);
}else{
_root[tempName].setTextFormat(txtFormat_fmt);
}
_root[tempName].type = “dynamic”;
_root[tempName]._xscale = 100 - (jscaleDifference);
_root[tempName]._yscale = 100 - (jscaleDifference);
}
fieldCounter = totalLines;
}
}