Making a Dynamic txtfield into array
Hi guys, im fresh on the forum so sorry if Im breaking any rules.
Anyhow, i have a question regarding arrays. What i want to do, is that i have a dynamic text field in which users can input text, and i wish that this text is splitted into letters, and then add each letter into a array-table of it own.
So far, i've only come to thinking about how to get the whole word into an array, but it doesent seem to work. This is the code that i've been trying to use:
(guessword is the array, sporsmol.text is the dynamic textbox in which the user enters the word he / or she wishes.)
var guessword:Array = new Array(); guessword[0] = sporsmol.text;
When i use this, i get the following error;
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at skoleprosjekt_fla::MainTimeline/click()
So - I was wondering if anyone could help me out and sort out the code for making the array take the word from the dynamic textbox, and adding it to the array after splitting the word in to letters.
So, for an instance, if the word "cheese" is entered, i should have an array with "colums" "C,H,E,E,S,E".
In advance i would like to say thank you for all the help.
- Scott.