User Guide

1382 UIObject class
The following example calls the setSize() method to resize the my_button Button
component to 200 pixels wide by 100 pixels high:
var my_button:mx.controls.Button;
my_button.addEventListener("resize", doSize);
function doSize(evt_obj:Object):Void {
trace(evt_obj.target + " resized from {oldWidth:" + evt_obj.oldWidth + ",
oldHeight:" + evt_obj.oldHeight + "} to {width:" + evt_obj.target.width +
", height:" + evt_obj.target.height + "}");
}
my_button.setSize(200, 100);
UIObject.setSkin()
Availability
Flash Player 6 (6.0.79.0).
Edition
Flash MX 2004.
Usage
componentInstance.setSkin(id, linkageName)
Parameters
id A number indicating the depth of the skin within the component.
linkageName A string indicating an asset in the library.
Returns
A reference to the movie clip (skin) that was attached.
Description
Method; sets a skin in the component instance. Use this method in a components class file
when you are creating a component. For more information, see “About assigning skins” in
Using Components.
You cannot use this method to set a component’s skins at runtime (for example, the way you
set a component’s styles at runtime).