# Use LoadVars to get array into Flash

**URL:** <https://forum.kirupa.com/t/use-loadvars-to-get-array-into-flash/45262>\
**Category:** Uncategorized\
**Created:** [March 12, 2004, 3:30pm UTC](https://forum.kirupa.com/t/use-loadvars-to-get-array-into-flash/45262 "2004-03-12T15:30:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Flashmatazz](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/flashmatazz/32/140_2.png) [@Flashmatazz](https://forum.kirupa.com/u/Flashmatazz)\
**Post date:** [March 12, 2004, 3:30pm UTC](https://forum.kirupa.com/t/use-loadvars-to-get-array-into-flash/45262/1 "2004-03-12T15:30:45Z")

</div>

I’m trying to use a LoadVars object to load in an array from a php script that reads the filenames of all jpg files in a certain directory.

Would this be possible, or would I have to pass all filenames as one string and split it within Flash afterwards?

---

<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:** [March 12, 2004, 7:10pm UTC](https://forum.kirupa.com/t/use-loadvars-to-get-array-into-flash/45262/2 "2004-03-12T19:10:46Z")

</div>

:thumb: Thanks! I got it to work now.

One small question though:

Instead of writing

```auto

sendVars.sendAndLoad("http://localhost/imageCounter.php?num="+random(99), receiveVars, GET);

```

could I also do something like

```auto

sendVars.sendAndLoad("http://www.someOtherDomain.com/imageCounter.php?num="+random(99), receiveVars, GET);

```

if my swf is located in ‘[yetAnotherDomain.com](http://yetAnotherDomain.com)’ ??
