getNextHighestDepth for flash player 6?

How do I replace the getNextHighestDepth in createTextField so I can publish for flash player 6? I know there’s an alternative but just can’t work it out!

any help much appreciated