Hi,
I am trying to create with actionscript a centred input text field, and a static field above it. My first problem is that both work fine individually but when i try and do them both the second one overwrites the first one, causing it not to display. Can you only have one text field in a movieclip?!
Secondly, when i delete the content of the input field it loses it’s align and shoots to the left.
Here is the code:
this.createEmptyMovieClip("welcome_mc",this.getNextHighestDepth());
with(welcome_mc){
createTextField("welcome",this.getNextHighestDepth(),(Stage.width/2)-250,30,500,100);
var my_fmt:TextFormat = new TextFormat();my_fmt.align="center";my_fmt.font="Arial";my_fmt.size=16;
with(welcome){
multiline=true;
wordWrap=true;
selectable=false;
html = true;
htmlText ="Welcome to the Stratus eLearning Builder. <br>Please enter how many screenshots you have.";
}
welcome.setTextFormat(my_fmt);
var box_ar:Array = [Stage.width/2-150,Stage.width/2+150,80,110];
// INPUT BOX FILL
beginFill(0xddddff,100);
moveTo(box_ar[0],box_ar[2]);lineTo(box_ar[1],box_ar[2]);lineTo(box_ar[1],box_ar[3]);lineTo(box_ar[0],box_ar[3]);lineTo(box_ar[0],box_ar[2]);
endFill();
// ====================
createTextField("num_images",this.getNextHighestDepth(),(Stage.width/2)-250,85,500,100);
with(num_images){
type = "input";
html = false;
text="How many images?";
setTextFormat(my_fmt);
}
}
Any help would be appreciated, as I’m sure these are simple problems when you know whats going on