Loading an external array

hi every one,

i’m trying to load an external array generated by php, but it doens’t seems to work.

i’ve changed:

[COLOR=Red]this.pArray = [“1.jpg”, “2.jpg”, “3.jpg”, “4.jpg”, “5.jpg”, “6.jpg”];[/COLOR]

into

[COLOR=Red]loadVariables(‘http://www.koenvandamme.be/data/php/archive.php?category=exteriors’);

this.pArray = items.split(’,’);
[/COLOR]

but no images are appearing …
what am i doing wrong?

http://www.koenvandamme.be/beta.php

regards,
stijn

you cant load external array like that.
Make the PHP generate text like:
1.jpg##2.jpg##3.jpg
then load that string of text into flash and split into an array using myphpstring.split("##")

That’s what he’s doing, iloveitaly :slight_smile:

I think that your problem is that you’re trying to split items before it has been loaded. Check the tutorials about LoadVars, they will definitely help. And if this doesn’t solve your problem, please post a bigger piece of your code.

not excatly, he is splitting this:
[“1.jpg”, “2.jpg”, “3.jpg”, “4.jpg”, “5.jpg”, “6.jpg”];
into this:
[“1.jpg”
“2.jpg”
ect…
thats not going to load a pic if you use that string of text through loadMovie() or similiar. you need it to just be:
1.jpg

or…Maybe i am misunderstanding his problem :pleased: