Wednesday, February 04, 2009

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.

Was this post helpful to you? If so, please consider making a small donation to keep this blog going.

2 Comments:

Blogger Tangent said...

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!

7:21 AM  
Anonymous Anonymous said...

花蓮|花蓮民宿|花蓮|花蓮民宿|花蓮旅遊|花蓮民宿|花蓮美食|花蓮旅遊|花蓮黃頁網路電話簿|花蓮入口網|花蓮民宿黃頁
花蓮旅遊|花蓮美食|花蓮飯店|花蓮住宿|花蓮民宿|花蓮民宿|花蓮|花蓮|
花蓮|花蓮民宿|花蓮旅遊|花蓮美食|花蓮住宿|花蓮飯店|花蓮旅館|花蓮|花蓮民宿|花蓮民宿推薦|花蓮民宿市區|花蓮民宿王|花蓮民宿網|花蓮民宿資訊網|花蓮民宿悠遊網|花蓮民宿交流網|花蓮海景民宿|花蓮海邊民宿|花蓮海岸民宿|花蓮旅遊民宿|花蓮|花蓮旅遊|花蓮廣告|花蓮民宿|花蓮房屋|花蓮汽車旅館|花蓮派報|花蓮飯店|花蓮派報|花蓮旅館|花蓮美食|花蓮餐廳|花蓮小吃|花蓮名產|花蓮工作|花蓮新聞|花蓮租車|花蓮入口網|花蓮旅遊|花蓮旅遊|花蓮旅遊景點|花蓮旅遊|花蓮旅遊景點|花蓮民宿|花蓮旅遊|花蓮房仲|花蓮旅遊景點|花蓮美食|花蓮餐廳|花蓮小吃|花蓮名產|花蓮縣長|花蓮租車旅遊網|花蓮行易旅遊資訊網|

2:01 AM  

Post a Comment

<< Home