Hello all,
I have been jumping around and searching for the answers and this is as far as I have gotten. For some odd reason I try to search and I recieve a fatal error from kirupa every time. Luckily, I found some good posts on my own to get me this far but now I need help.
I have a PHP script thatreads all the files in a folder then makes a string that can be easily separated in flash by using split(). The php file (called arch.php) is located inside the directory with the pictures (architecture). The php code is as follows:
<?php
if ($dir = opendir("./")) {
while (($file = readdir($dir)) !== false) {
$cont++;
if ($file == "." || $file == "..") { } else {
$string.="file$cont=$file&";
}
}
closedir($dir);
}
$string.="status=OK";
print($string);
?>
The actionscript is then like this:
valuesArray = new Array();
lv = new LoadVars();
lv.load("architecture/arch.php");
lv.onLoad = function(){
valuesArray = this.filenames.split("&");
}
slides = valuesArray;
function changeSlide(number){
if (number >= 0 && number < slides.length){
currentSlide = number;
loadMovie (slides[number][0], "_root.placeholder");
}
}
changeSlide(0);
I am having trouble mainly because I am a noob to php and how it works. I attempted to search how to check if it works but wasn’t able to. Fatal errors woohoo. I uploaded it onto my web server here on campus and didn’t get a response. I guess the words to shout out here is help how do I test it and is it done correctly?
Thanks in advance!!!