Resizing textfield in UI

Hi all,

I just cannot figure this out :frowning:

I would like different textfields to be of the same size (height and width) Preferably making the layout on screen, not in code. However, here’s my problem:

If I enter the values I want into the properties window:

The font is stretched :frowning:

I allready tried locking the aspect ratio, no luck.

What is the trick to make textfields the same size in the IDE ?

Thanks !

I think you click inside the text, so that it is marked for edit, and then you should be able to drag the textfield size on the black/blue handles. It works that way in Animate CC and I think it was the same in older versions? (Not 100% sure)

Yes, doubleclicking textfield for edit and dragging handles does resize, but…
dragging does nót give an exáct value, I want all different textfields exactly 150,0 for example

Snap to guide? Snap to grid?

Edit: I think you could export textfields from illustrator to flash?

Set width (W) and height (H) in the properties panel, don’t transform the text field with the transform tool or the transform panel. The values in the properties panel will let you specify the exact size you want.

As linusj said, the way to resize without transforming on the screen is through the pre-existing control points in the fields (i.e. not the transform tool controls). It feels like an oversight that these controls do not conform to guides/grids/snapping. You’ll have to make up for that by manually typing in some numbers… though I bet it wouldn’t be hard to make (or maybe even find) an extension that untransforms a text field while keeping its position and size.

Oh man, I feel a bit stupid now :smiley:

However:
Case 1 - If the textfield is only selected (blue border after one click) :
resizing via properties DOES NOT warp text
Case 2 - if the textfield is selected for editing (black borders after double click) :
resizing via properties DOES warp text

Also, if you have multiple textfields selected (case 1) and you resize using properties, the text IS warped

Under file/new, create a new "Flash JavaScript File"

paste this code:

fl.getDocumentDOM().setTextRectangle({left:0, top:0, right:350, bottom:200})

/*
var numItems= fl.getDocumentDOM().selection.length;
fl.trace(numItems);

for(var i=0;i<numItems;i++)
{
	var lmn = fl.getDocumentDOM().selection[i];
	lmn.setTextAttr("size", 20);
	lmn.setTextString("Hello"); 
}*/

You don’t need to save the javascript to make it run and function, select the text/texts you want to change on the stage and hit the little black arrow in the scriptbar.
right:350 is the textwidth.

See image:

It works :slight_smile: Thanks

But it might be overkill for me at this time though. I saved the example for later use.