I am creating a website in Flash, and I wanted to include a certain number of dynamic buttons that are created based on the pictures in a directory...
I was directed that I would need to use PHP to accomplish this.
I found some code...not sure how to utilize it/test it.
When I double clicked on it, it opened with Dreamweaver....the most of the syntax makes sense.
But I am not sure how to test it out...and then, if it does work, how to attch it to Flash....
Thanks in advance for any help:
<?
$handle=opendir("/images");
$counter = 0;
while ($file = readdir($handle)) {
$the_type = strrchr($file, ".");
$is_picture = eregi("jpg|gif|bmp|png",$the_type);
if ($file != "." and $file != ".." and $is_picture) {
$mypics[$counter] = $file;
$counter++;
}
}
closedir($handle);
?>