Scope trouble... unregister/ remove object / tween?

Hi,

I hope somebody can help with the following problem.
I’m trying to make a powerpoint kind of projector:

  • Main flash movie: works as a container to load different flash files.
    reacts on the left and right arrow buttons to go to the next or previous movie, which is loaded in a movieClip.

  • Several external swf files all exported from the same: slide.fla only adjusting xml node settings make the differences in text and pictures.
    This works, but after loading into the container I use to show the images the tween of my images gets messed up. (Not in the first loaded movie, but sure after around the third)

Please can anybody look at my code and tell me what could be the problem?
I’m sure it has to do with the scope after loading into the container.fla, and all the objects having the same name, for the submovies. (exported from the same .fla)
Do I have to unregister/ remove these objects after usage - I think this might be it, but don’t know how.

In the container.fla I already set:
clipLoader_mc._lockroot = true;
but this doesn’t solve the problem.


/// **************************** ///
/// START TWEEN METHODS FOR SCREENS ///
/// **************************** ///
var mcl_obj:Object = new Object();
mcl_obj.onLoadInit = function(target_mc:MovieClip):Void {
target_mc._width = 500;
target_mc._height = 395;
target_mc._x = 500;
var distance:Number = 5;
var angleInDegrees:Number = 45;
var color:Number = 0x000000;
var alpha:Number = 75;
var blurX:Number = 7;
var blurY:Number = 7;
var strength:Number = 1;
var quality:Number = 3;
var inner:Boolean = false;
var knockout:Boolean = false;
var hideObject:Boolean = false;
var filter:DropShadowFilter = new DropShadowFilter(distance, angleInDegrees, color, alpha, blurX, blurY, strength, quality, inner, knockout, hideObject);
var filterArray:Array = new Array();
filterArray.push(filter);
target_mc.filters = filterArray;
var tween_target:Object = new Tween(target_mc, "_y", Back.easeInOut, Stage.height, 300, 1, true);
tween_target.onMotionFinished = function() {
intervalClearScreenId = setInterval(ClearScreen, 8000, counter);
};
screenCounter++;
//initiated on top of the page. 
};
function ClearScreen():Void {
var tween_screen:Object = new Tween(mover_mc, "_x", Strong.easeInOut, mover_mc._x, 1250, 1, true);
tween_screen.onMotionFinished = function() {
if (screenCounter<screenMaxCount) {
ShowScreens();
} else {
screenCounter = 0;
ShowScreens();
}
clearInterval(intervalClearScreenId);
};
}
ShowScreens = function ():Void {
// Create a movie clip instance.
this.createEmptyMovieClip("mover_mc", getNextHighestDepth());
var img_mcl:MovieClipLoader = new MovieClipLoader();
img_mcl.addListener(mcl_obj);
// Load an image into the movie clip
img_mcl.loadClip(imageArray[screenCounter], mover_mc);
};
//load XML voor screens on the left:
function loadScreensXML(loaded) {
if (loaded) {
_rootNode = this.firstChild.childNodes[imageNodeNr].childNodes[0];
trace(_rootNode);
total = _rootNode.childNodes.length;
for (i=0; i<total; i++) {
//add images to imageArray:
imageArray* = _rootNode.childNodes*.firstChild.nodeValue;
}
screenMaxCount = imageArray.length;
//initiated on top of the page
//Show the screens:
ShowScreens();
} else {
content = "file not loaded!";
}
}
xmlScreens = new XML();
xmlScreens.ignoreWhite = true;
xmlScreens.onLoad = loadScreensXML;
xmlScreens.load(urlImagesXML);
/// **************************** ///
/// END TWEEN METHODS FOR SCREENS ///
/// **************************** ///

I’m trying all day already to solve this so please can anybody help?
Thanks in advance!