views:

388

answers:

1

Hi,

This might be simple one, since it's a design question mode than development ( think drawing UI graphics not OOD :) ) I've realized I haven't used the Flash IDE for design in a while. I created a simple button that has rounded corners and is made of:

  1. a background clip
  2. a base color clip
  3. a text field
  4. a highlight

This is what I've forgotten: "Also remember that even if a scale9Grid property is set, all text and child movie clips scale normally, regardless of which regions of the scale9 grid they are located in." from Sephiroth's good old scale 9 tutorial.

I've set a scale 9 grid for all the movieclips and the button resizes nice now, almost. My text field is dynamic. If the font isn't embedded, the button scales as I'd expect, but if I embed the font (which I need to), the text scales regardless of the scale 9 grid.

Is there any way to make MovieClip that contains a dynamic TextField with an embedded font, scale properly using a scale 9 grid ?

+3  A: 

Not directly, no. However the easiest way around this is to just make the background it's own clip and place it and the textfield in separate layers in your MovieClip.

That sort of use of next clips is very common (for example, the built-in components use it all the time)

Branden Hall
+1 to this. Put everything that behaves nicely with scale9 in one inner clip, and put everything else on top, and handle them separately.
fenomas
That is how I have it how, each of the things listed above have they're named layer and symbols ( excluding the text field, which lives straight into the Button symbol ). Thanks Brandan and welcome to stackoverflow ! Careful it's quite addictive :) I haven't seen on the FOTB list this year. why ?thanks fenomas for the (even) short(er) version. ^_^
George Profenza
Well, I'm trying to come to FOTB, but I won't be speaking. John (the organizer) wants to cycle people in and out so that the conference never gets stale (which I perfectly understand!)
Branden Hall