
January 5th, 2007, 08:48 AM
|
|
Contributing User
|
|
Join Date: Feb 2005
Location: In everybody's mind
Posts: 74

Time spent in forums: 1 Day 7 h 48 m 45 sec
Reputation Power: 4
|
|
Flash 8 UI Components ERROR!
Hi,
Code:
import mx.UIcontrols.*
var Pos:Object = new Object;
Pos.x = 18;
Pos.y = 18;
this.createObject("TextInput","ctiInput1",this.getNextHighestDepth());
this.createObject("TextInput","ctiInput2",this.getNextHighestDepth());
this.createObject("TextInput","ctiInput3",this.getNextHighestDepth());
this.createObject("Button","cbtResult",this.getNextHighestDepth());
ctiInput1.move(Pos.x,Pos.y);
ctiInput2.move(Pos.x,Pos.y+22);
ctiInput3.move(Pos.x,Pos.y+44);
cbtResult.move(Pos.x,Pos.y+66);
var oListener:Object = new Object;
cbtResult.addEventListener("click", oListener);
oListener.click = function (oEvent:Object):Void {
trace("Clicked"+this.ctiInput1.text+" || "+this.ctiInput2.text);
this.ctiInput3.text = this.ctiInput1.text + this.ctiInput2.text;
}
as a result of above code i get a display with 3 TextInputs and a Button. But the problem is when i click on the button i get the component text input's '.text' value as "undefined" pls help ..
ah i forgot i am using a "Form" to build this.
Regards
Anand
|