MovieClipLoader and duplicateMovieClip() conspiring to drive me insane

I’m trying something that should be fairly simple. I want to:

  • load a jpg into a container clip
  • when that image is loaded, then duplicate it and move it to a different position
  • then do a whole bunch of other stuff

I’m doing all that using MovieClipLoader.onLoadInit(), and when tracing the duplicated movieClip, without fail, it returns undefined.


var detailImg:MovieClip;

// create a loader to handle loading the full image
var fullImgListener:Object = new Object();

fullImgListener.onLoadInit = function(target:MovieClip):Void {

        // load the detail image
        loadDetailImage(artNum, imgOrient);
}

function loadDetailImage (aNum:Number, imgOrient:String) {

    // create a clip in the zoomcontainer to hold the detail image
    detailImg = zoomContainer.fullImg.duplicateMovieClip("detailImg", zoomContainer.getNextHighestDepth());
    trace (detailImg);
     
}

No matter where I define my detailImg variable, or where I issue that duplicateMovieClip class, the trace statement always returns undefined.

I’m sure it has to do with scope or something, but I can’t figure it out and I’m stumped. Any help would be greatly appreciated.

My .fla is too monstrous to post, but you can see the app, and what it’s kind of supposed to do here:
http://clients.simonabrams.com/kumaDigital/max

click enter, then click artwork, pick a category of art, then when on the artwork screen, click the zoom button.