last update: 2010.09.15
requirements: actionscript 3 (fp 9+)
The scale 25 library gives developers and designers a more powerful way to skin assets without the hassles and limitations of Flash’s built in scale 9 features. By defining one rectangle more than the more traditional scale 9 technique, you can more easily design and develop for assets more complicated and thus requiring more finesse. Whether its a button with an icon, watermark on a background or an axis control, scale 25 dramatically increases your chances of easily and quickly putting together a solution with minimal code intervention.
- built on top of a proven scalebitmap9 technique
- works with vector and bitmap assets
- works with all display object types
- works with nested assets (treated as a flat asset)
- works with masked assets (treated as a flat asset)
- scale 25 & scale 9 have nearly identical implementations
- easily change sizes including dimensions smaller than the original asset
Many of the features listed above address issues described in the Flash’s Scale 9 Rules and Limitations article.
For a detailed explanation as to what the Scale 25 library can do and how to use it, you can check out the The Power of Scale 25 article. You can also read about a solution for a fairly cooperative way for designers and developers to implement scale 9 and scale 25 assets.
This library and all the included classes (e.g. ScaleBitmap25, ScaleBitmap9) are based on the ScaleBitmap class created by ByteArray’s Didier Brun.
You can download the source, complete with examples, below. And as always, please consider supporting this and other TheoryNine open-source projects by making a donation.