Flash’s Scale 9 Rules and Limitations
Why, Flash? Why? Why is your scale 9 implementation so amazingly crappy? As a young flash developer, I spent way too many nights trying to figure out what I was doing wrong. Was I just being that stupid or were the scale 9 tools and API Flash provided us that incredibly limiting.
Long story short, it turns out that it’s just really that bad. And what’s worse yet, it’s a pain in the ass trying to find how to properly use the scale 9 feature.
So, here it is, the incredibly unofficial rules and limitations to using scale 9 in Flash.
1) If you want to use a bitmap…good luck. Yes, it is possible, as explained here, but the process is a royal pain and don’t even think about tweaking the slices or updating the graphic as you’ll have to go through the process all over again. Grant Skinner also has a JSFL script that you can download to make the process more manageable (CS4 & CS5).
2) Nested display objects are problematic. Typically, they result in scale 9 breaking. So, if you can avoid having MovieClips inside another scale 9 MovieClip (or any other DisplayObject), it might be in your best interest to do so.
3) Scale 9 requires Flash 8 Player or greater. Is anyone really developing for anything older?
4) Each vector “segment” in the scale 9 grid needs to have either 2 anchor points inside the ‘slice’, or each scale-9 guide needs to intersect an anchor. I haven’t verified this yet.
5) Using a mask, once again, is risky business. Though it is possible, as explained by senocular here, many developers have wasted countless hours and ultimately failed in attempting to conquer this beast.
6) 9-slice scaling cannot be applied to Graphic or Button symbols as documented here.
7) Any combination of the above issues that you have to deal with at a given time is sure to compound the problem and make your life a living hell.
With all these limitations in mind, and surely more that were missed or are unknown, its no wonder a growing number of developers have created their own programmatic solution or adopted someone else’s in a desperate attempt to avoid Flash’s built in attempts to make our lives easier. In fact, add us to the list of those who have developed their own solution – in addition to adding our new scale 25 feature.
My hope is to grow this list as time goes on, so if you know of any other noteworthy rules, limitations, or considerations, please make a comment below.