User Guide
Incorporating existing components within your component 177
[Event("click")]
class LogIn extends UIComponent
{
/* Components must declare these member variables to be proper
components in the components framework. */
static var symbolName:String = "LogIn";
static var symbolOwner:Object = LogIn;
var className:String = "LogIn";
// The component's graphical representation.
private var name_label:MovieClip;
private var password_label:MovieClip;
private var name_ti:MovieClip;
private var password_ti:MovieClip;
private var login_btn:MovieClip;
private var boundingBox_mc:MovieClip;
private var startDepth:Number = 10;
/* Private member variables available publicly through getter/setters.
These represent the name and password InputText string values. */
private var __name:String;
private var __password:String;
/* Constructor:
While required for all classes, v2 components require
the contstructor to be empty with zero arguments.
All initialization takes place in a required init
method after the class instance has been constructed. */
function LogIn() {
}
/* Initialization code:
The init method is required for v2 components. It must also
in turn call its parent class init() method with super.init().
The init method is required for components extending UIComponent. */
function init():Void {
super.init();
boundingBox_mc._visible = false;
boundingBox_mc._width = 0;
boundingBox_mc._height = 0;
}
/* Create child objects needed at start up:
The createChildren method is required for components
extending UIComponent. */
public function createChildren():Void {
name_label = createObject("Label", "name_label", this.startDepth++);
name_label.text = "Name:";
name_label._width = 200;
name_label._x = 20;