# MovieClipLoader and duplicateMovieClip() conspiring to drive me insane

**URL:** <https://forum.kirupa.com/t/moviecliploader-and-duplicatemovieclip-conspiring-to-drive-me-insane/213785>\
**Category:** flash\
**Created:** [January 23, 2007, 6:54am UTC](https://forum.kirupa.com/t/moviecliploader-and-duplicatemovieclip-conspiring-to-drive-me-insane/213785 "2007-01-23T06:54:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![flysi](https://avatars.discourse-cdn.com/v4/letter/f/e9bcb4/32.png) [@flysi](https://forum.kirupa.com/u/flysi)\
**Post date:** [January 23, 2007, 6:54am UTC](https://forum.kirupa.com/t/moviecliploader-and-duplicatemovieclip-conspiring-to-drive-me-insane/213785/1 "2007-01-23T06:54:20Z")

</div>

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_.

```auto

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](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.
