# Nexthighestdepth() is too high!

**URL:** <https://forum.kirupa.com/t/nexthighestdepth-is-too-high/243192>\
**Category:** flash\
**Created:** [November 4, 2007, 2:00am UTC](https://forum.kirupa.com/t/nexthighestdepth-is-too-high/243192 "2007-11-04T02:00:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![chaztheman](https://avatars.discourse-cdn.com/v4/letter/c/eb9ed0/32.png) [@chaztheman](https://forum.kirupa.com/u/chaztheman)\
**Post date:** [November 4, 2007, 2:00am UTC](https://forum.kirupa.com/t/nexthighestdepth-is-too-high/243192/1 "2007-11-04T02:00:30Z")

</div>

I have created a mc that is randomly generated using this code:

```auto
 
this.createEmptyMovieClip("cloudholder_mc",this.getNextHighestDepth());
for(i=0;i<4;i++){
 var c:MovieClip = cloudholder_mc.attachMovie("cloudmidani","cloudmidani"+i,cloudholder_mc.getNextHighestDepth())
 c._y = Math.random()*900;
 c._x = Math.random()*550;
 c.gotoAndPlay(Math.ceil((Math.random()*8) +10));
 }

```

Unfortunately the [COLOR=red]getnexthighestdepth()[/COLOR] bit puts it on top of EVERTHING, does anyone know any code i can replace this with so that i can have some layers showing over the top.

Thanks
