As much as I try, I’m just not understanding the DisplayList. Specifically how it relates to objects that are added dynamically. Hoping someone can help.
What I have is a navigational button. On click, it adds a MovieClip that contains a SWF. This SWF is a third party news reader/blog. My problem is that when I click on another Navigational button, I can’t remove the added SWF (whether I use removeChild() or unload()). The container MC that was added to hold the SWF is removed but the newsreader stays. I assume this is because, that while the newsreader itself works great, it has too many unremoved event handlers, connections.
My main problem is that I can’t figure out how to call that added swf by it’s name and where on the displaylist it resides. Because I really want to use this newsreader, I’ve come to accept that I can’t remove it. **What I’m doing instead is trying to set up a conditional that looks to see if this SWF is already on stage, if so, do nothing but make it visible again(don’t re-add the SWF). **
This is what I have so far, but it’s not working (or at least not working without error)
var blogNewsMC:BlogNewsMC = new BlogNewsMC();
function loadBlog(url:String) {
addChild(blogNewsMC);
blogNewsMC.x = 228;
blogNewsMC.y = 85;
var mc1 = blogNewsMC.getChildByName(""); // <-----Looking for the swf, don't know what to call it???
var nc = blogNewsMC.numChildren;
trace(blogNewsMC.numChildren);//run this trace to check how many children BlogNews has
if (nc>4) { // 4 is how many children traced above. need to change this number if you add children to blogNewsMC in the future
var removeSWF = mc1.getChildAt("????"); // this was an attempt to remove Blog SWF
mc1.removeChild(removeSWF);
removeSWF = null;
trace("test works");}
var req = new URLRequest(url);
var blogLoader = new Loader();
blogLoader.load(req); // start loading img/swf
blogNewsMC.addChild(blogLoader);
fadeInTween = new Tween(blogNewsMC, "alpha", None.easeNone, 0, 1, 2, true);
//blogLoader.contentLoaderInfo.addEventListener("complete", this.finished_loading);
}
loadBlog("blogNews.swf");
I guess the real help I need is how to get through the blogNewsMC and call the added Blog SWF by name.
It’d be great if I could remove the SWF and then re-add it, along with the container MC, when called. I’m not getting any help from the news readers authors - FlashTuning - as far as removing event listeners and such. Tho I purchased, they say garbage collection isn’t their problem. Jeesh 
Thanks in advance to anyone that can see a solution.