SWF Scale-Nine Skin Sizing Issue

I beat my brains out over this one for 3 hours the other day. I was skinning a Flex component with a SWF library asset (a MovieClip) that used nine slice scaling. There was a visual gap between the right and bottom sides of the skinned component and its parent. For a while, I thought that this was due to some padding or something being applied to the parent.

To resolve this issue, I did two things in Flash:

1) I converted my border from lines to fills, by going to Modify > Shape > Convert Lines to Fills
2) I made sure to register the upper-left corner of the shape at 0,0.

Easy, but yet so difficult.

One Response to “SWF Scale-Nine Skin Sizing Issue”

  1. Tangent says:

    Scale-Nine could be tricky from time to time. Also be aware of the fact that Flex’s skins are mostly inheriting from Sprite which is not a DisplayObjectContainer. So if the skin you make in Flash contains references other MovieClip/Sprite, Flash would not be able to flatten it to only one layer, some funky stuff would start to happen with the skin. It took me hours pulling hair to find this out!