Help With loadClip function(im stumped)

SOLVED(but this might help for future referance)
Solutions:
[LIST]
[]had to use myListener.onLoadInit to read when the entire movie was loaded
[
]had to use duplicateClip instead of attachMovie because for some reason attachMovie could not find the movie clip i wanted to attach
[*]Had to change my array to a Number() because when i added +1 instead of rewriting the new value as 2 it wrote it as 11[/LIST]Working Script:

function buildMap (myMap) {
 var mapWidth          = myMap["base"][0].length;
 var mapHeight         = myMap["base"].length;
 var myListener        = new Object();
 var myMovieClipLoader = new MovieClipLoader();
 
 _root.attachMovie("empty","gameContainer",++curDepth);
 _root.gameContainer.attachMovie("empty","map",++curDepth);
 _root.gameContainer.map.attachMovie("empty","baseLayer",++curDepth);
 
 myListener.onLoadInit = function(target) {
  for (var i = 0; i<mapHeight; ++i) {
   for (var j = 0; j<mapWidth; ++j) {
    var newName = "t_"+i+"_"+j;
    _root.gameContainer.map.baseLayer.tiles.duplicateMovieClip("t_"+i+"_"+j, ++curDepth);
    _root.gameContainer.map.baseLayer["t_"+i+"_"+j]._x = (j*tileW);
    _root.gameContainer.map.baseLayer["t_"+i+"_"+j]._y = (i*tileH);
    _root.gameContainer.map.baseLayer["t_"+i+"_"+j].gotoAndStop(Number(myMap["base"]*[j][0])+1);
   } 
  }
 }
 
 myMovieClipLoader.addListener(myListener);
 myMovieClipLoader.loadClip("Resources/rec001.swf","_root.gameContainer.map.baseLayer");
}

Problem:
hey guys currently im making a flahs mmorpg and i want the game to run really smooth. My theory behind everythign is to carry and execute as little information inside flash as possible(to hopefully increase gameplay and smoothness of how the game runs). anyways to accomplish this i’m planning to load everything from external flash and php files and also to run Ajax and other javascript codes(for example for the player inventory which will be loaded on the HTML page insteado o f in flash). my problem is when im trying to load my mapResources(which contains all of the tiles for that map) im not able to call attach any movie clip that cmoes with it. here the funciton that im running:


function buildMap (myMap) {
var mapWidth = myMap["base"][0].length;
var mapHeight = myMap["base"].length;
var myListener = new Object();
var myMovieClipLoader = new MovieClipLoader();
 
_root.attachMovie("empty","gameContainer",++curDepth);
_root.attachMovie("empty","resourceData",++curDepth);
_root.gameContainer.attachMovie("empty","map",++curDepth);
_root.gameContainer.map.attachMovie("empty","baseLayer",++curDepth);
 
myListener.onLoadInit = function(target) {
for (var i = 0; i<mapHeight; ++i) {
for (var j = 0; j<mapWidth; ++j) {
var newName = "t_"+i+"_"+j;
_root.gameContainer.map.baseLayer.attachMovie("_level0.resourceData.tiles", newName, ++curDepth); //I've attempt to load "tiles" here and that didnt work either
_root.gameContainer.map.baseLayer[newName]._x = (j*tileW);
_root.gameContainer.map.baseLayer[newName]._y = (i*tileH);
_root.gameContainer.map.baseLayer[newName].gotoAndStop(myMap["base"]*[j][0]);
} 
}
}
 
myMovieClipLoader.addListener(myListener);
myMovieClipLoader.loadClip("Resources/rec001.swf","_root.resourceData");
} 

Alright so this function pretty much loads an Array(myMap) and first find the width and height fo the map. then afte doing so it loads a couple fo containers for the gamenot really relavent to the issue) after this it sets a listener object thats ays when my resource(the tiles for the game map file has loaded to run a function. in this function it reattachs a movieclip and then stops on a frame according to the Array(myMap) that we loaded. on each of the newly attach Movie clip’s frame is a diffrent piece of map… so when all is said and done the function should output a beautiful looking healthy map. but this is not so

anyways i ran this script in debug mode and everything work sfine when i use a movie clip that is in the same move as this , but once i try to call the movieclip from the loadClip funciton i have it doesn’t work.

anybody have any ideas at how to fix this or any other solutions to my problem that might work better? Im thining abotu trying to use duplicateMovieClip or somehting, anyhelp would be really great!