Note, crucially, there is no "- 1" on the second
getNextHighestDepth(). If I keep it, the program hangs. But if I
always increment the depth, then *eventually* the window I click on
makes it to the top, even if it has to loop a couple of times.
Unfortunately, it messes up the order of other windows on the
This seems to me to be a clear, strong bug in Flash. I'm
using CS3 and AS 2.0.
Has anybody encountered this? Any advice or solid
workarounds? I'm using depth levels from 1 upwards, and they're all
MovieClips created at runtime. And I'm not using the timeline or
Kgald's right. If your using getNextHighestDepth(), you must
not have to worry about replacing anything at other depths above
your starting point, therefore why don't you use a simple counter
and increament to the next depth. on the main timeline delcare a
variable, then in each 'button' on handler increament the depth
when pressed to bring the window's focus to the top.