# .split() not working!

**URL:** <https://forum.kirupa.com/t/split-not-working/112813>\
**Category:** Uncategorized\
**Created:** [June 11, 2004, 4:17pm UTC](https://forum.kirupa.com/t/split-not-working/112813 "2004-06-11T16:17:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![th3Phallex](https://avatars.discourse-cdn.com/v4/letter/t/9fc29f/32.png) [@th3Phallex](https://forum.kirupa.com/u/th3Phallex)\
**Post date:** [June 11, 2004, 4:17pm UTC](https://forum.kirupa.com/t/split-not-working/112813/1 "2004-06-11T16:17:41Z")

</div>

I am trying to load text into a Flash movie, and have that be an array.

the actions for my movie go somethin’ like this:

**FRAME 1:**

```auto
loadVariablesNum("arrayText.txt", 0);

```

**FRAME 2:**

```auto
stop();
MyArray = MyArray.split(",");
trace(MyArray);

```

That .txt file, “ **arrayText.txt** ” looks like this:

```auto

&MyArray=a,b,c,d&
&done=ok

```

When I test the movie, I can see the “MyArray” variable in a text box, but the output window gives me “ **undefined** ”…

Anyone know why this happens and/or how I can get around this??

Thanks!

---

<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 11, 2004, 5:27pm UTC](https://forum.kirupa.com/t/split-not-working/112813/2 "2004-06-11T17:27:18Z")

</div>

Thanks!

That works.
