# Convert String to Array

**URL:** <https://forum.kirupa.com/t/convert-string-to-array/50200>\
**Category:** flash\
**Created:** [April 30, 2004, 5:06am UTC](https://forum.kirupa.com/t/convert-string-to-array/50200 "2004-04-30T05:06:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Danneman](https://avatars.discourse-cdn.com/v4/letter/d/b19c9b/32.png) [@Danneman](https://forum.kirupa.com/u/Danneman)\
**Post date:** [April 30, 2004, 5:06am UTC](https://forum.kirupa.com/t/convert-string-to-array/50200/1 "2004-04-30T05:06:39Z")

</div>

Is there a nifty function that will convert a String to an Array in AS(1 or 2)?

Something like:

myString = “1, 2, 4, 3”;  
myArray = myString;

…and then myArray ends up like:

myArray = [1, 2, 4, 3];

Im trying to add the content of a loaded textfile into an array, thats why. Maby there is some other workaround?
