I am using an input box (var name direction) to accept user input which I then want to store in an array called kidsEntry. This works fine but I then want to get the first input from the kidsArray.
This line-
trace(_parent.kidsEntry[0]);
I hoped would output the first position in the array, but I get the message ‘undefined’
Any idea what is going on? I have used the the following code which work ok but it is not what I want.
on (press) {
kidsEntry = [“boo”, “ghost”, “scary”, “ahhh”];
trace(kidsEntry[0]);
}
What is wrong with with the code below?
on (press) {
_parent.kidsEntry = direction;
trace(_parent.kidsEntry);
trace(_parent.kidsEntry[0]);
}
Cheers for looking
J