# Flash 6 and getNextHighestDepth

**URL:** <https://forum.kirupa.com/t/flash-6-and-getnexthighestdepth/196541>\
**Category:** flash\
**Created:** [August 9, 2006, 9:35am UTC](https://forum.kirupa.com/t/flash-6-and-getnexthighestdepth/196541 "2006-08-09T09:35:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ChromeDemon](https://avatars.discourse-cdn.com/v4/letter/c/258eb7/32.png) [@ChromeDemon](https://forum.kirupa.com/u/ChromeDemon)\
**Post date:** [August 9, 2006, 9:35am UTC](https://forum.kirupa.com/t/flash-6-and-getnexthighestdepth/196541/1 "2006-08-09T09:35:40Z")

</div>

for (i = 0; i \< 3; i++) {  
drawClip(i);  
}

function drawClip(n:Number):Void {  
this.createEmptyMovieClip(“triangle” + n,this.getNextHighestDepth());  
var mc:MovieClip = eval(“triangle” + n);  
mc.beginFill(0x00aaFF, 100);  
mc.lineStyle(4, 0xFF0000, 100);  
mc.moveTo(0, 0);  
mc.lineTo(100, 100);  
mc.lineTo(0, 100);  
mc.lineTo(0, 0);  
mc.\_x = n \* 30;  
mc.\_y = n \* 50  
mc.createTextField(“label”, this.getNextHighestDepth(), 20, 50, 200, 200)  
mc.label.text = mc.getDepth();  
}

How can i do this in flash 6 … getNextHighestDepth is not working … ☹

any hint?

thanx in advance

ChromeD
