I am doing what I believe to be a very simple operation, but am running into difficulties. I have two swfs, each contain 4 TextInputs and a submit button. I am loading the text entered on swf1 into an array, and then loading swf2 into an empty movie clip. I ultimately want to be able do something like this when the second swf is loaded: swf2.TextInput.text = swf1.array[0].text; Seems simple enough, but I cannot access the paths of the instance names in swf2, I just get undefined everytime. I have tried so many traces I am going crazy. Any assistance is much appreciated. My code is as follows:
var aComic:Array = new Array();
function loadarray(){
for(i=0;i<4;i++){
aComic.push(this[“cdata”+i]);
}
}
function apiclipload(){
trace(“this in mx.Delegate is :”+this); //Outputs _level0
trace("this.container is: "+this.container); //Outputs _level0.container
trace("this.container.e_title._target is: "+this.container.e_title._target); //undefined???
}
function loadAPImc(){
var listener:Object = new Object();
var mcLoader:MovieClipLoader = new MovieClipLoader();
var container:MovieClip = createEmptyMovieClip(“container”,this);
trace("
Container after createmove clip is: "+this.container); //Outputs _level0.container
trace(“this in mcLoader function is :”+this); //Outputs _level0
mcLoader.addListener(listener);
mcLoader.loadClip(“form2.swf”, container);
listener.onLoadComplete = mx.utils.Delegate.create(this,apiclipload);
}
submit.onRelease = function(){
loadarray();
for(i=0;i<aComic.length;i++){
trace("
aComic* is: “+aComic*); //Outputs cdata1 … cdata4 as it should.
trace(”
aComic*.text is: "+aComic*.text); //Outputs text entered into Inputs
}
loadAPImc();
}