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, Aaron Miller <[EMAIL PROTECTED]> wrote: > > 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 will always keep it on top whenever the display list is updated (such > as on resize). You can call the invalidateDisplayList() function to force > this check if you need to. > > Best Regards, > ...aaron > > On 11/18/07, Mark <[EMAIL PROTECTED]> wrote: > > > > 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@yahoogroups.com <flexcoders%40yahoogroups.com>, "Tim > > Hoff" <[EMAIL PROTECTED]> wrote: > > > > > > > > > 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\ > > > > <http://127.0.0.1:60064/help/topic/com.adobe.flexbuilder.help/langref/fl>> > > ash/display/DisplayObject.html> , child2:DisplayObject > > > <http://127.0.0.1:60064/help/topic/com.adobe.flexbuilder.help/langref/fl\ > > > > <http://127.0.0.1:60064/help/topic/com.adobe.flexbuilder.help/langref/fl>> > > ash/display/DisplayObject.html> ):void > > > <http://127.0.0.1:60064/help/topic/com.adobe.flexbuilder.help/langref/sp\ > > > > <http://127.0.0.1:60064/help/topic/com.adobe.flexbuilder.help/langref/sp>> > > ecialTypes.html#void> > > > > > > -TH > > > __________________________________ > > > > > > Tim Hoff > > > Cynergy Systems | Technical Lead > > > 3603 5th Ave. Suite A, San Diego, CA 92103 > > > http://www.cynergysystems.com < http://www.cynergysystems.com> > > > > > > --- In flexcoders@yahoogroups.com <flexcoders%40yahoogroups.com>, > > "Mark" <pusateri02@> wrote: > > > > > > > > I have a Flash CS3 component that pops up a small text box on roll- > > > > overs. Those Flash text pop-ups come up behind Flex Labels. Is there > > > > a way to control the depth of each component? The layout of these > > > > components are: > > > > > > > > HBox > > > > Label Left -- Flash Comp. -- Label Right > > > > > > > > Any ideas? Can I control this in Flash or Flex? > > > > > > > > Thanks, > > > > Mark > > > > > > > > > > > > > > > > > -- > Aaron Miller > Chief Technology Officer > Splash Labs, LLC. > [EMAIL PROTECTED] | 206-328-5485 > http://www.splashlabs.com -- Aaron Miller Chief Technology Officer Splash Labs, LLC. [EMAIL PROTECTED] | 206-328-5485 http://www.splashlabs.com