[flexcoders] Re: depth problems, some help needed please

2007-12-07 Thread Mark
I can't seem to get this to work, can someone tell me what I'm doing wrong? if (hboxHolder.getChildIndex(radarCanvas) hboxHolder.getChildIndex (rightLabel)) { hboxHolder.setChildIndex(radarCanvas, 2); hboxHolder.setChildIndex(rightLabel, 1); } This swaps the positions, which I don't want.

Re: [flexcoders] Re: depth problems, some help needed please

2007-11-19 Thread Aaron Miller
Sorry, just a clarification. I forgot that 'parent' is an actual public property. I just meant the parent of 'topControl', which would most likely be 'this' when called inside the updateDisplayList function (unless of course it's inside a nested component). Best Regards, ...aaron On 11/18/07,

Re: [flexcoders] Re: depth problems, some help needed please

2007-11-19 Thread Aaron Miller
Whenever I want something to always be on top (or any specific position) that may not always be, I override the updateDisplayList function to add a check for: if( parent.getChildInex( topControl ) parent.numChildren - 1 ) { parent.setChildIndex( topControl, parent.numChildren-1 ) } This

[flexcoders] Re: depth problems, some help needed please

2007-11-18 Thread Mark
Thanks... I tried that and it worked but it also swapped position as well. Now it didn't swap position until you resize the window, but it did it. So it went from Label, Flash, Label to Label, Label, Flash. Any thoughts as to why that would happen? Thanks --- In

[flexcoders] Re: depth problems, some help needed please

2007-11-17 Thread Tim Hoff
Hi Mark, To change the depth, you can use the swapChildren() method: public function swapChildren(child1:DisplayObject http://127.0.0.1:60064/help/topic/com.adobe.flexbuilder.help/langref/fl\ ash/display/DisplayObject.html , child2:DisplayObject