I had to use the scale9Grid for the first time today to maintain some rounded borders. I really did not put much thought into it... thinking I already understood the concept from design work. Ouch, I should have read the help file a little more thoroughly before I just started coding.
I am going to assume you understand the basic concept of scale9Grid and focus on the main pitfall I stumbled into today. If you do not understand the basic concept, please check the Flash help file first.
Each time I tried to call scale9Grid I received an ArgumentError. At first I thought I may have been passing in a bad rectangle or that I could not use the scale9Grid on my custom movie class. Turns out, my rectangle was fine but it did not fall within the movie I was trying to scale. I had part of it either outside of or right on the border of the movieClip. If this happens, the ArgumentError will be thrown. So make sure that your x, y, width, and height of the rectangle all fall within the target MovieClip.
Other thoughts that may help:
I found it best to set the scaleX and scaleY to 1 before trying to create the rectangle. Otherwise the item may still be scaled from the previous scale9Grid call and the rectangle could get out of whack.
I also found it helpful to place the origin/reference point of the movieclip to 0,0.
Hope that helps.