_lockroot, anyone?

Hello All,

I’ve got a rather large swf that I’m loading into a SCORM player. For some reason the whole huge library of bitmaps (screenshots for a demo and simulation) is publishing up front, and the whole assembly (2 mb as a swf) is taking 12 seconds to load in the SCORM player. All of my visual elements are movie clips in the library. The first is a loading bar and percent movie clip. Unfortunately, it only appears about a split second before the actual content screens. Which means 12 seconds of waiting with a blank screen, a blip of loading bar reading 100%, and then the content.

My solution, or what I would like to be my solution, is to create a swf which will load that large swf, and track loading progress.

This is the code in my loader movie:

stop();
the_stage = this;
//this._lockroot = true;
// LOAD MOVIE CLIP
the_stage.createEmptyMovieClip("mc_loader",this.getNextHighestDepth());
//mc_loader._lockroot = true;
var mc_listener:Object = new Object();
mc_listener.onLoadProgress = function(mc_loader,loadedBytes:Number, totalBytes:Number) {
    trace('loading started');
    var perc:Number = (loadedBytes/totalBytes);
    txt.text = Math.floor(perc*100);
    trace(txt.text)
};
mc_listener.onLoadComplete = function(){
    trace('loading of movie is complete');
    mc_loader._lockroot = true;
}
var my_mcloader:MovieClipLoader = new MovieClipLoader();
my_mcloader.addListener(mc_listener);
my_mcloader.loadClip("add_members.swf",mc_loader);

You can see where I’ve placed and commented out successive _lockroot settings. I’m not sure where lockroot should be placed and where it should not.

I am not currently setting _lockroot in the loaded movie clip. When I test the loader movie, trace statements tell me that it has successfully loaded. But none of the movie clips in the library are placed on the stage.

My trace for the fade in function for the first screen (a player skin around the content) looks like this:

fade_in function called for _level0.mc_loader.skin

The skin in “add_members.swf” never loads.

When I test add_members.swf on its own, the same trace reads as follows:

fade_in function called for _level0.skin

Now, I’ve read the Flash documentation for _lockroot, for loadClip, etc. but I’m still not clear on what is what once the new swf is loaded. Is mc_loader now what I add_members.swf? Are the two still separate? Where should I be setting _lockroot, and where not?

Many thanks for any assistance,
MB