Load Dynamic Array into MovieClips? (Flash CS4)

I have a flash file with about 32 empy MovieClips on the stage.

Basically what I need to do is take an array of images and load them into these empty MovieClips. Hope this makes sense so far.

This array will be dynamic and will come from a PHP file.

The problem is I’m not sure how to do this? I don’t know to take an array in flash and allocate the images to individual MovieClips.

I’m fairly new with Flash. So I would really appreciate any help or tips or advice on my problem. I would be so grateful.

Thanks. :):):slight_smile:

Are there 32 entries in the xml file ? You can add a touch up and create movieclips at runtime so that you have as many movieclips as there are entries in the xml file, so that you can add or remove any of the nodes in the xml file to control your photo gallery.

You can loop through the array and use its values to assign data to a loader function to each clip if they are numerically sequential.
e.g

for(var i in myarray)
{
  var imagetoload:String = myarray[i];
  var mc:MovieClip = root["mcname"+i];
  // some code next that uses mc and imagetoload to load the image into the relevant clip
}