Hi
I have a small form that for which the fields are created dynmically. I can’t seem to get the focus to set on the first field.
Can someone please advise.
Many thanks
var form_fmt:TextFormat = new TextFormat();
form_fmt.size = 13;
form_ftm.multiline=true;
form_fmt.font = "Trebuchet MS";
var fieldNames:Array = new Array("fullName","phone","email","ask");
for (var i:Number=0;i<4;i++){
this.createTextField(fieldNames*,this.getNextHighestDepth(),100,10+i*30,200,22);
if (i==0){
setFocus("fullName");
}
if (i==3){//set up the text area
ask._x=15; ask._y=160; ask._width=350; ask._height=88;
ask.multiline=true;
}
eval(fieldNames*).type="input";
:
:
eval(fieldNames*).onSetFocus = function():Void{
this.backgroundColor=0xffffb3;//0xecf1f4;
this.textColor=0x3f5465;
}
eval(fieldNames*).onKillFocus = function():Void{
this.backgroundColor=0xffffff;
this.textColor=0x333333;
}
}