Skip to Content »

FlashApe » BorderSkin on top of children

 BorderSkin on top of children

  • March 27th, 2008
  • 1:39 pm

Sheesh...I just wasted half a day trying to figure out how to get a borderSkin to appear on top of all the children in a custom component I was building. It was a subclass of Canvas, so it was really easy...now that I know, it seems so obvious I want to kick myself. Anyway, you just need to do:

Actionscript:
  1. override protected function layoutChrome(unscaledWidth:Number,unscaledHeight:Number):void{
  2.     super.layoutChrome(unscaledWidth, unscaledHeight);
  3.    
  4.     //move the border in front of the children
  5.     rawChildren.setChildIndex(rawChildren.getChildByName('border'), rawChildren.numChildren - 1);         
  6.  
  7. }

1 Person had this to say...

Gravatar
  • Evan Gifford
  • April 17th, 2008
  • 12:18 pm

Thanks for the tip! :^)

Want your say?

* Required fields. Your e-mail address will not be published on this site


You can use the following XHTML tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>