Hi all,

I am trying to make a very small hangman game (written primarily in AS) using an array of words. I have been successful at: retrieving a random word from the array, dynamically creating little lines for each letter in the array (so user can see how many letters in that particular word), dynamically creating little textboxes - one for each letter in the word (though I am having trouble getting them to line up with the lines), and with the help of a layer51 prototype finding the position in the array that a particular letter is at (e.g. in the word mississippi the letter 'i' appears at the 1, 4, 7, and 10 spots in the array).

But here I am stuck. I can't figure out:
1) if the letter input by the user matches a letter in the word then have that letter appear in the appropriate text box (should be able to use array returned by prototype to target appropriate text box right?)
2) how do you write an if statement for an empty array? if array returned by prototype is empty then the user guessed a letter that isn't in the word. I need to store those in a count variable so I can advance the hangman drawing frame by frame.
3) Create a new word when the 'play again' button is pressed.

I know I am asking a lot here so if anyone can help me out on ANY of these or point me in the right direction I'd be ever so grateful!

I will try to attach the fla (if I can figure it out) in case anyone wants to see what I have done so far.

If you think I am going the wrong way about all this then say that too! Especially if you have suggestions for alternative functions.

Peace -
TS (aka minime!)