How to check if an swf file is loaded
(I don't want to check ProgressEvent.PROGRESS while loading, but, after it's loaded, to check if it's loaded so it won't be reloaded)
In my preloader I'm loading a file, called 'settings.swf' with this code:
Code:
// this code is in preloader
var request:URLRequest=new URLRequest("settings.swf");
var _loader:Loader = new Loader();
_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoaded);
_loader.load(request);
function onLoaded(e:Event):void {
var movie:* =LoaderInfo(e.currentTarget).content;
Container3.addChild(movie); // Container3 is a MovieClip on MainTimeLine
}
The movie is added with a name like 'instance138' or something like this.
But I can't check if it's loaded with a name like this, randomly created.
I tried to change it's name with 'movie.name="settings" ' but it gave me an error:
"Error: Error #2078: The name property of a Timeline-placed object cannot be modified."
So, how could I check if a movieclip is loaded? (I suppose changing it's name is impossible)