3 Replies Latest reply on Jul 26, 2011 11:41 AM by iaestanolf

    9 Slice Scaling and Text


      It seems 9-slice scaling in Flash CS5 is a little half-baked. If you create a symbol containing text and vector graphics, only the vector graphics is scaled according to the 9-slice scaling contract. For example, consider the following symbol:













      This is what happens when you scale the instance on the stage:




      Sure, the vector graphics are scaled according to the 9-slice contract, but what are we supposed to do about text? And just in case you're thinking "convert the text to vectors/raster"... unfortunately no... I don't have the option of converting the text to a set of vectors or a raster because its content will have to be dynamic.


      Does anyone know how to construct a scalable symbol that doesn't distort the text?

        • 1. Re: 9 Slice Scaling and Text

          I don't kow how you define textfields but maybe try to define Textfield as dynamic and use autosize... YourTextField.autoSize = TextFieldAutoSize.LEFT;

          I hope this help.

          • 2. Re: 9 Slice Scaling and Text
            learn n leverage Level 3


            9 slice scale algorithm in Flash do not scale text & child movie clips based on their scaling region. The text and child movie clips scale normally, regardless of which regions of the scale9 grid they are located in.



            • 3. Re: 9 Slice Scaling and Text
              iaestanolf Level 1

              I had this very same problem and the answers on this forum message http://forums.adobe.com/message/3445705#3445705 were not satisfactory, as they didn't solved completely the text problem. Seeing that this same happens on Flash, it makes me believe that this behavior is by design, and not a flaw or a bug.


              Anyway, I am using this alternative solution, and I would like to share in hope that it might help other people.


              The effect that I was trying to do was the following one:



              Where you are able to scale the window, and the text remains untouched by that scaling.


              I simply made a 9 slice scaling symbol of my window graphic, as follows:


              As you can see text is not included on the symbol. I later added it outside of the symbol and grouped it (as a group not as another symbol, since you might not want changes to be global).


              This has as an advantage that you don't have to convert text into outlines, and as such it can be dynamic. Which is something I was searching for.


              To manipulate it in Illustrator, I use the Direct Selection Tool (A) to select my window symbol and change to Selection Tool (V) to scale it. In Flash it should be pretty much the same.


              So far, it has worked for us to speed up the workflow, but we recognize that this one is not as a complete solution as we would like it to be. Hope it helps you also.

              1 person found this helpful