Ok it sounds like you want to add a click listener to a display object inside the loaded swf that when clicked will remove the loaded swf from the stage.
So here's what I would do:
function goToURL(e:MouseEvent):void {
for (var i:int = 0; i < itemArray.length; i++) {
if (e.currentTarget == itemArray[i]) {
my_loader.contentLoaderInfo.addEventListener( Event.COMPLETE. onLoaderComplete );
my_loader.load(new URLRequest(fileNames[i]));
trace(fileNames[i]);
trace(my_loader);
//addChild(my_loader); //do not add the loader to this display object
itemArray[i].mouseEnabled = false;
itemArray[i].alpha = 0.5;
} else {
itemArray[i].mouseEnabled = true;
itemArray[i].alpha = 1;
}
}
}
function onLoaderComplete( e:Event ):void {
//set a variable called _loadedSwf as type MovieClip at the top
_loadedSwf = e.target.content;
_loadedSwf.close_btn.addEventListener( MouseEvent.CLICK, removeLoadedSwf );
addChild( _loadedSwf );
}
function removeLoadedSwf( e:MouseEvent ):void {
removeChild( _loadedSwf );
}
I haven't tested this but I believe that is what you are looking for? Either way hope this helps you out!