The PHP Script which follows reads the directory above it and returns all the files ending in .html as uppercase without the file extention in the format Flash wants to read.
The comments (// just like ActionScript) explain what is happening. There are plenty of good sites about PHP, to look up some of the functions used here go to PHP.net http://www.php.net/docs.php

<?php
$fileCount=0;// counter
// $myNum array is name in name=value pair
$myNum= array("one","two","three","four","five","six","seven","eight","nine","ten");
if ($dir = @opendir("../")) {// open directory
        while (false !== ($file = readdir($dir))) { // loop through files
               
                if ($file != "." && $file != "..") { // ignore . & ..directories
                        if(strstr($file,".html")){// only read files that end in .html
                               
                                // build name=value pairs for flash from linkable files for menu
                                $valuesForFlash .="&".$myNum[$fileCount]."=".strtoupper(substr($file, 0, strpos($file, ".")));
                               
                                $fileCount++;
                        }
                       
                }
        }
        closedir($dir);
}
// Output for Flash
$valuesForFlash.="&num=".$fileCount."&";

print $valuesForFlash;
?>