# Help Please

**URL:** <https://forum.kirupa.com/t/help-please/113133>\
**Category:** Uncategorized\
**Created:** [June 15, 2004, 10:47am UTC](https://forum.kirupa.com/t/help-please/113133 "2004-06-15T10:47:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael21](https://avatars.discourse-cdn.com/v4/letter/m/b38774/32.png) [@Michael21](https://forum.kirupa.com/u/Michael21)\
**Post date:** [June 15, 2004, 10:47am UTC](https://forum.kirupa.com/t/help-please/113133/1 "2004-06-15T10:47:49Z")

</div>

helo my name is Michael and i have problem with flash arrays  
i need to place in the array letters from InputTextField  
to count every one of them.  
i need this fo Huffman algorithm i know that user put string like this  
wwwwwwwwwaaaaaaaaaaaaaweeeeeeeeerrrrrrrr

and i need broke this string a part nad place every letter in array  
but main problem is that when my\_array = new Array(w,w,w,w)  
i can’t take for dynamicTextField myDynamic\_txt.text=my\_array[0]  
i get #undefine. I know that letters need to be in ’ ’ but i don’t know how tu put them in ‘’ ???  
i know that trace(my\_array[0]) works why?

\_root.onEnterFrame=function()  
{

```
input_str=myInput_txt.text;
my_str = input_str.split(""); // to split string ","
//w,w,w,w,w,w,w,w,w,w,w,e,e,e,e,e,e,e it works

my_array = new Array(input_str.length);

my_array.push="'"+my_str+"'"; // it doesn't work ;(
	
for(i=0;i&lt;my_array.length;i++)
{
myDynamic_txt.text=my_array*; // it doesn't work too // ;(
}

```

}

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 15, 2004, 7:56pm UTC](https://forum.kirupa.com/t/help-please/113133/2 "2004-06-15T19:56:41Z")

</div>

> i need to place in the array letters from InputTextField to count every one of them.

why don’t you just count the letters like this?:

input\_str = myInput\_txt.text;  
numberOfLetters = input\_str.length;

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 15, 2004, 8:11pm UTC](https://forum.kirupa.com/t/help-please/113133/3 "2004-06-15T20:11:46Z")

</div>

maybe this will do what you are looking for:

```auto

input_str = "Hello there.";
my_array = new Array();
for (var i = 0; i<input_str.length; i++) {
	my_array.push("'"+input_str.substr(i, 1)+"'");
}
trace(input_str);
trace(my_array);
trace(my_array.length);

```

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 16, 2004, 10:16am UTC](https://forum.kirupa.com/t/help-please/113133/4 "2004-06-16T10:16:56Z")

</div>

Big Thanks it works 😉
