# It's a mystery

**URL:** <https://forum.kirupa.com/t/its-a-mystery/163644>\
**Category:** Uncategorized\
**Created:** [September 24, 2005, 10:13am UTC](https://forum.kirupa.com/t/its-a-mystery/163644 "2005-09-24T10:13:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![blixt](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/blixt/32/1689_2.png) [@blixt](https://forum.kirupa.com/u/blixt)\
**Post date:** [September 24, 2005, 10:13am UTC](https://forum.kirupa.com/t/its-a-mystery/163644/1 "2005-09-24T10:13:11Z")

</div>

I’m getting a bit aggrevated with a little problem I have.  
Nothing complicated, and it just should work, but I just can’t figure out what I can be doing wrong.

I have a function where I pass a reference to a clip and try to duplicate it.  
All very standard stuff that I done 1000’s of times, but this time it just will not work.  
This is the code:

```auto

function showModifiers(clip:MovieClip):Void{
var cp:MovieClip=clip.duplicateMovieClip("clip_copy",_level0.getNextHighestDepth());
trace("clip:"+clip);
trace("depth:"+_level0.getNextHighestDepth());
trace("ref:"+cp);
trace("clip:"+_level0.clip_copy);
}

```

Trace outputs the following:

> clip:\_level0.C3  
> depth:100001  
> ref:undefined  
> clip:undefined

I know the code is correct and setting up a new blank fla it works.  
The function is part of an external class and I tested to just stick it on the root timeline in the .fla with the same trace result.  
So I really wonder what could possibly go wrong?  
Since the clip variable and depth is there I can’t think of any scope issues that could cause it.  
Anyone experienced similar problems and found a cause?
