Need help with AS woes

Hi all …

Ok let’s make it simple …I have a code that I can multiple load external *.gif image from external to container call ‘main’ on root …by pressing the button…the filename of image I read from array.But in real situation I get the filename value from php…but in this cases I just simply it by putting the filename in array like


tArray = ["bear0","bear1"];

so everything is okay…I can load the imgae as many as I want…the problem is I really no have idea how to get the filename being loaded into ‘main’ because actually this is for the save function purposing…because just now…when i trace like…


for (var i in main) {
       trace(main*._name);
   }

the output will be boxholder2, boxholder1, boxholder0 …and I know very well this is because of this portion code;


var holderMC = main.attachMovie("boxholder","boxholder"+j,400+j);

So what I really want to know is how to set up the code so that when I trace like


for (var i in main) {
       trace(main*._name+"*"+main*._x+"*"+main*._y);

   }

The output will list all the loaded image into ‘‘main’’ in this format
//output with real filename
bear0.gif100200

So I really need help on how to go about it …or at least any suggestion…from u guys…at least I’m not asking the code or askign someone to code for me…just need some shed on light…

here’s the full code


stop();
var j:Number = 0;
tArray = ["bear0","bear1"];
for (var i = 0; i<tArray.length; i++) {
		mythumb = attachMovie("box","box"+i,99+i);
		mythumb._x = 30+mythumb._width*i;
		mythumb._y = 400;
		var mymc = mythumb.createEmptyMovieClip("holder"+i,200+i);
		mymc.ivar = i;
		mymc.createEmptyMovieClip(0,0).loadMovie(tArray*+".gif",300+i);						
		mymc.onPress = loadStuff;
}

//createEmptyMovieClip("paper", 1);
function loadStuff(){
	//var holderMC = paper.attachMovie("boxholder","boxholder"+j,400+j);
	var holderMC = main.attachMovie("boxholder","boxholder"+j,400+j);
	holderMC._x = random(400);
	holderMC._y = random(300);
	var myHolderr = holderMC.createEmptyMovieClip("holder",this.getNextHighestDepth());
    myHolderr.createEmptyMovieClip(0,0).loadMovie("bear"+this.ivar+".gif",this.getNextHighestDepth());
	j++;
}

btn.onPress = function(){

 for (var i in main) {
         trace(main*._name+"*"+main*._x+"*"+main*._y);
   }

}


tq in advanced…