Hello. I need help on coding for reading images from a folder using PHP and linking it to FLEX 3 to display it in a imageTileList. Urgent.
currently my PHP file coding is like this:
<?
$imglist='';
//$img_folder is the variable that holds the path to the banner images. Mine is images/tutorials/
// see that you don't forget about the "/" at the end
$img_folder = "C:\xampp\htdocs\images";
mt_srand((double)microtime()*1000);
//use the directory class
$imgs = dir("C:\xampp\htdocs\images");
//read all files from the directory, checks if are images and ads them to a list (see below how to display flash banners)
while ($file = $imgs->read() )
{
if (eregi("gif", $file) || eregi("jpg", $file) || eregi("png", $file))
$imglist = "$file";
} closedir($imgs->handle);
//put all images into an array
$imglist = explode(" ", $imglist);
$no = sizeof($imglist)-2;
//generate a random number between 0 and the number of images
$random = mt_rand(0, $no);
$image = $imglist[$random];
hello!
i want to make a program in adobe flex which 1st reads the file and then display the imeages. the imeage id is assigned in the xml file which will be loded at complie time and then display imeage of specific id.
the file must be loded int form of tree.
its means that menu will be loded xml file in the form of a specific ID and the display imeage against its id.
regard
Edit by admin: no contact info permitted on the forum, thank you
hey abdulrehman. I dun really understand what u say. My php file now is able to read images from folder. But im unable to display it in tilelist in Adobe FLEX 3.
Bookmarks