Hi,
No, you will need to know the names of the image files to import them into flash at runtime. This can be achieved with a bit of PHP that returns the file names to an XML object in Flash....
Actionscript
Code:
var folderData = new XML();
folderData.ignoreWhite = true;
folderData.onLoad = function(success) {
if (success) {
for (i in this.childNodes) {
trace(this.childNodes[i].childNodes[0]);
}
} else {
trace("failed to read dir");
}
}
The PHP code for reading directory contents...
Code:
<?php
if ($handle = opendir('.')) {
$s = '';
while (false !== ($file = readdir($handle))) $s.= "<entry>$file</entry>";
closedir($handle);
echo $s;
}
?>
hope it helps
Regards
NTD
Bookmarks