Bitmap.scale9Grid() doesn’t do what it says on the tin!

James Hill
James Hill
Published in
1 min readOct 24, 2008

Having only recently got discovered actionscript controlled 9-Slice scaling ( a late starter I know!), I was then completely bemused to discover that the Bitmap class does not inherit such capabilities.

It clearly states in the Actionscript 3 Language Reference that the Bitmap class inherits this from the DisplayObject class??? Am I missing something?

I used to achieve just that — or kind of anyway — by breaking bitmaps up and scaling/repositioning the parts of it’s sum. Having done a brief search, I — as yet — haven’t found a slick solution so decided to modify an old AS2 implementation and get a 9 Slice Scaling Bitmap class up and running for AS3.

And here it is!

http://blog.tiltlondon.com/wp-content/uploads/2008/10/scaleBitmap.swf

--

--