Here is the code in the PHP file:
<?
$handle=opendir("\images");
$counter = 0;
while ($file = readdir($handle)) {
$the_type = strrchr($file, ".");
$is_picture = eregi("jpg",$the_type);
if ($file != "." and $file != ".." and $is_picture) {
$pics[$counter] = $file;
$counter++;
}
}
closedir($handle);
for ($i = 0; $i < count($pics); $i++){
$PicsList .= $mypics[$i] . "|";
}
$PicsList = substr ($PicsList, 0, -1);
echo ("&PicsList=$PicsList&");
?>
Here is what I have on a frame in flash:
varPics = new Array();
varReceiver = new LoadVars();
varReceiver.load("\\findpics.php");
varReceiver.onLoad = function(){
tmp = this.PicsList;
varPics = tmp.split("|");
PicTitle.text = varPics[0];
};
This is whats happeneing:
In the variable 'PicTitle.text', the varaible name from PHP is showing up: $PicsList, instead of the value in it
what am i doing wrong?