# Loading arrays

**URL:** https://forum.kirupa.com/t/loading-arrays/7488
**Category:** Uncategorized
**Created:** [November 1, 2002, 2:52am UTC](https://forum.kirupa.com/t/loading-arrays/7488 "2002-11-01T02:52:47Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![gary\_bydesign](https://avatars.discourse-cdn.com/v4/letter/g/b782af/32.png) [@gary\_bydesign](https://forum.kirupa.com/u/gary_bydesign)
#### Post date: [November 1, 2002, 2:52am UTC](https://forum.kirupa.com/t/loading-arrays/7488/1 "2002-11-01T02:52:47Z")

</div>

hi guys,

i have an array called picdata[x]

it contains 3 rows of data

each row contains 5 pieces of information.

is it possible for me to load this data from an external text file?

(i eventually want lots of rows containing about 10 items each and the text file seems the easiest way to edit it0

thanx in advance

Gary

---

<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: [November 1, 2002, 7:09am UTC](https://forum.kirupa.com/t/loading-arrays/7488/2 "2002-11-01T07:09:12Z")

</div>

PLZ NEVER CROSSPOST, members will be annoyed if they saw a duplicated thread!!!

---

<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: [November 1, 2002, 7:14am UTC](https://forum.kirupa.com/t/loading-arrays/7488/3 "2002-11-01T07:14:47Z")

</div>

what about having ur code outside the movie using “#include”.

yours,

---

<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: [November 1, 2002, 7:27am UTC](https://forum.kirupa.com/t/loading-arrays/7488/4 "2002-11-01T07:27:45Z")

</div>

hey h88, you didn’t know it but you knocked my senses in the right direction and helped me a lot with that.

I was building a menu thing that I was hoping to easily update, and I can’t seem to parse the XML right since I don’t know too much about it.

I was using loadVars to do it, and it was coming along semi-good, but you just reminded me of the #include and it gave me a whole new idea. #include flew right over my head, I know what it is and how to use it, just never thought of it… 'doh!

Thank You 🙂

---

<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: [November 1, 2002, 7:29am UTC](https://forum.kirupa.com/t/loading-arrays/7488/5 "2002-11-01T07:29:21Z")

</div>

hehe, cool!

---

<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: [November 1, 2002, 7:30am UTC](https://forum.kirupa.com/t/loading-arrays/7488/6 "2002-11-01T07:30:08Z")

</div>

It is very cool, it is already making my task easier 🙂

---

<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: [November 1, 2002, 8:45am UTC](https://forum.kirupa.com/t/loading-arrays/7488/7 "2002-11-01T08:45:23Z")

</div>

sorry bout the xpost guys, but i had really fixed the problems i had in the other post. so thought it would be ok to start a new one.

(wifey has spanked my bottom on your behalf. sent me to lookk at html sites for 30 mins too!!! how cruel can women be eh!!)

thanx for the #include thing (not that i have any idea what it is or what it does but hey off i go on the learning roller coaster for another spin)

cheers guys

Gary

---

<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: [November 1, 2002, 8:47am UTC](https://forum.kirupa.com/t/loading-arrays/7488/8 "2002-11-01T08:47:25Z")

</div>

if u want to edit ur array directlly from the textfile, just put up this code!

```php
#include "arrayactionscript.as"

```

and then create a text file with .as extention.

very simple!

yours,

---

<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: [November 1, 2002, 9:23am UTC](https://forum.kirupa.com/t/loading-arrays/7488/9 "2002-11-01T09:23:49Z")

</div>

lmao

in the time since my last post i went off to “learn”

well that was difficult then, learned, tested, perfection

thank you ever so much guys, cant believe it was that simple to accomplish

again thank you, thank you, thank you, thank you, thank you, thank you, thank you, thank you, thank you, thank you, thank you, thank you, thank you, thank you, thank you, thank you

(oh but i ignored the .as extension and just left .txt seems to work fine)

(just a note to the kirupa…not a single response to the same question on flashkit…does that mean evry1 is smarter here? lol)

Gary\_happily loading arrays from a text file like a madman\_bydesign

---

<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: [November 1, 2002, 9:26am UTC](https://forum.kirupa.com/t/loading-arrays/7488/10 "2002-11-01T09:26:33Z")

</div>

hehe, r u satisfied now?

glad to be!

yours,

h88

---

<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: [November 1, 2002, 9:41am UTC](https://forum.kirupa.com/t/loading-arrays/7488/11 "2002-11-01T09:41:41Z")

</div>

btw, .as is the recommended file extension.

---

<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: [November 1, 2002, 8:50pm UTC](https://forum.kirupa.com/t/loading-arrays/7488/12 "2002-11-01T20:50:40Z")

</div>

just in from work,

thanx for the info it will be .as from now on then

and no i am not satisfied (but you show me a flash user who is totally satisfied with their work!!)

lol thanx soooooooooooooooooooooooooooooooooooooooo

much for your help, it really is greatly appreciated.

Gary\_most humbly\_bydesign

---

<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: [November 1, 2002, 8:52pm UTC](https://forum.kirupa.com/t/loading-arrays/7488/13 "2002-11-01T20:52:10Z")

</div>

y arent u satisfied:cowboy:

---

<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: [November 1, 2002, 10:27pm UTC](https://forum.kirupa.com/t/loading-arrays/7488/14 "2002-11-01T22:27:30Z")

</div>

no no i am satisfied with the point of this post and like i said i am most grateful,

the comment was on “flashing” in general…lol

now i can load this stuff (did i say thanx enough yet…grin) i gotta work out how i can search it and display the results.

another night another mountain to climb, some days i feel like the woman in the sound of music (oops showing my age there lolol)

(see, us 5 week flash newbies have a real steep learning curve)

gary\_very happy to close this thread as i got all that i needed \_bydesign

---

<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: [November 1, 2002, 11:18pm UTC](https://forum.kirupa.com/t/loading-arrays/7488/15 "2002-11-01T23:18:59Z")

</div>

Can u plz post your fla and maybe the .as file ? Just to check out your way of work. I’m trying to do the same but i’m having some little problems

Thankz

---

<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: [November 1, 2002, 11:41pm UTC](https://forum.kirupa.com/t/loading-arrays/7488/16 "2002-11-01T23:41:03Z")

</div>

Can u plz post your fla and maybe the .as file ? Just to check out your way of work. I’m trying to do the same but i’m having some little problems

Thankz

---

<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: [November 2, 2002, 12:26am UTC](https://forum.kirupa.com/t/loading-arrays/7488/17 "2002-11-02T00:26:33Z")

</div>

you will, need some images too either named the same as mine or edit the text file with your own picture names.

one other point i am using 2 variables for my next and prev buttons, make sure you change the values, ie number of lines in your text file or the buttons wont work correctly.

there is one other variable to change, but i cant remember where…lol in the main acrionscript some place. just be sure to change x,y, and z.

any probs mail me direct at

[gaziz40@ntlworld.com](mailto:gaziz40@ntlworld.com)

(and dont get too “involved” b4 asking for help. i made this page from 3 different tutorials, i will point you to them if you need them.

the text file is still .txt, it should be .as (i am told) so change it if you like (dont forget to change the a/s '#include statement if you do

Gary

---

<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: [November 5, 2002, 12:11pm UTC](https://forum.kirupa.com/t/loading-arrays/7488/18 "2002-11-05T12:11:01Z")

</div>

sorry guys, #include is not dynamic, if u changed the txtfile command in the textfile, the swf file wont be updated, unless u recreate the swf from the main fla :(!!

am experimenting the solution for u gary\_bydesign, so dun worry, ull get wut u need, just hang on a sec.

yours,

h88

---

<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: [November 5, 2002, 12:24pm UTC](https://forum.kirupa.com/t/loading-arrays/7488/19 "2002-11-05T12:24:53Z")

</div>

okay, solution:

textfilecontent = &picDataTemp=pic1,pic2,pic3&  
then load that in and then add:  
picdata = picDataTemp.split(",");  
and picdata is an array with 3 elements! 🙂

yours,

h88

---

<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: [November 5, 2002, 1:18pm UTC](https://forum.kirupa.com/t/loading-arrays/7488/20 "2002-11-05T13:18:26Z")

</div>

@lostinbeta : want me to help u about ur dynamic menu, post some description :)!

yours,

h88

[Next page](https://forum.kirupa.com/t/loading-arrays/7488.md?page=2)
