How to create textfield

hi guys, i want to create a text field in a movie clip where the text field can get 5 different letters from an array. I mean that when the movie appears it will have an random letter on it each time, how do i get the letters from the array?


myArr = [“a”, “b”, “c”, “d”]
this.createTextField(“myText”, 1, 10, 10, 50, 20);
myText.text = myArr[random(myArr.length)];


erm… ashish how can i make all 4 of them appear but in random positions? i tried yours and i got duplicates. thx

help anyone?

see the attachment

letters = new Array("a", "b", "c", "d","e","f");
word = new Array(); //New Array to hold the shuffled values
randomNumber = Math.floor(Math.random()*letters.length); //generate a random value
for (i=letters.length; i>0; i--) {
 if (word[i-1] == null) {
  if (word[i-1] != randomNumber) {
   word[i-1] = letters[randomNumber];
   letters.splice(randomNumber, 1);
  randomNumber = Math.floor(Math.random()*letters.length);
_root.a.text = word[0];
_root.b.text = word[1];
_root.c.text = word[2];
_root.d.text = word[3];
_root.e.text = word[4];
_root.f.text = word[5];

thx alot nishanthe