October 11, 2008


Filed under: SourceCode — Tags: , — iBen @ 6:39 pm

What is the point of scale9 if it is only good for vector drawings? Recently I threw this together to make my life easier with having the ability to now apply scale9 to bitmaps without having any distortion.

This current version is as2, and the interface is through a movie Clip. I would have rather made it a class but the use that I had for it was specifically used to interface with a movieclip.

The use is to attach the movieClip to the stage and pass a reference to your bitmap that you wish to apply scale9_plus, give it a proper rectangle as you would with regular scale9, and lastly give it the new width and new height and you will have scale9_plus applied automatically.

For those that don’t know how to create the scale9 rectangle but know how to do it via a movieClip with the hash lines, you can do this to a movieClip and then supply that movie clip’s scale9Grid property as the rectangle to use with your scale9_plus.

4 bitmaps with scale9_plus applied

4 bitmaps with scale9_plus applied

Download Scale9_Plus Source

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress