not sure if this is the right class to do this. but i am loading different swf using SWFLoader(). the problem is that each swf load on top of the previous one. so i am looking to unload the previous one before uploading the next one.
Any ideas?
function loadSWF(path:String):void {
setChildIndex(preloader_mc,numChildren - 1);
var filename:String = path;
// Find the location of the period.
var extensionIndex:Number = filename.lastIndexOf( '.' );
// The extension-less filename ("mydocument") is everything before the period.
var extensionless:String = filename.substr( 0, extensionIndex );
trace( "The filename is " + extensionless );
loader = new SWFLoader("./"+path, {name:extensionless, container:container_mc, x:50, y:87, onInit:initHandler, onProgress:progressHandler, onComplete:completeHandler, onError:errorHandler, onOpen:onOpenHandler, estimatedBytes:9500});
//begin loading
loader.load();
previousMc=extensionless;
}