Sizing components

Use the Free Transform tool or the setSize() method to resize component instances.

Resize the Menu component with the Free Transform tool

Resizing the Menu component on the Stage with the Free Transform tool


You can call the setSize() method from any component instance (see UIObject.setSize() in ActionScript 2.0 Components Language Reference) to resize it. The following code resizes the TextArea component to 200 pixels wide and 300 pixels high:

myTextArea.setSize(200, 300);

NOTE

If you use the ActionScript _width and _height properties to adjust the width and height of a component, the component is resized but the layout of the content in the component remains the same. This might cause the component to be distorted in movie playback.

A component does not resize automatically to fit its label. If a component instance that has been added to a document is not large enough to display its label, the label text is clipped. You must resize the component to fit its label.

A clipped label for the CheckBox component

A clipped label for the CheckBox component


For more information about sizing components, see their individual entries in the ActionScript 2.0 Components Language Reference.