# Problems loading in external data

**URL:** <https://forum.kirupa.com/t/problems-loading-in-external-data/109936>\
**Category:** Uncategorized\
**Created:** [May 10, 2004, 10:56pm UTC](https://forum.kirupa.com/t/problems-loading-in-external-data/109936 "2004-05-10T22:56:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mitt](https://avatars.discourse-cdn.com/v4/letter/m/b782af/32.png) [@mitt](https://forum.kirupa.com/u/mitt)\
**Post date:** [May 10, 2004, 10:56pm UTC](https://forum.kirupa.com/t/problems-loading-in-external-data/109936/1 "2004-05-10T22:56:47Z")

</div>

I am trying to create a dynamic slideshow using Mysql, PHP and Flash. I have all the filenames of the images stored in the DB and then query the DB with PHP (slideshow.php) and then place the names in a variable that is comma seperated using implode in PHP so my variable shows like this when done:

```auto
files=image1.jpg,image2.jpg,image3.jpg,image4.jpg 

```

Along with the files to be loaded I am passing the number of files and the starting index value.

```auto

//nop is the number of pictures
files=image1.jpg,image2.jpg,image3.jpg,image4.jpg&nop=4&index=0 

```

Below is the flash code used to get that information.

```auto
  
onClipEvent (load) 
{
 var images_array = new Array();
 var images_lv = new LoadVars();
 images_lv.onLoad = function() 
 {
  images_array = this.files.split(",");
 };
 images_lv.load("slideshow.php");
 loadVariables("slideshow.php", this);
 play();
}

```

Why do I have to use both these methods of load and loadVariables to get all the variables? I can only get the filenames with load and the other variables with loadVariables. The rest of the movie there is a MC named Slideshow and inside Slideshow there is another MC called image\_slide

```auto

image.createEmptyMovieClip("slide", 0);
loadMovie("pictures/"+images_array[index], image.slide);
if (index == nop-1) 
{
 index = 0;
} 
else 
{
 index++;
}

```

Sorry for such a lengthy post. I could really use some help here.  
Thanks
