Hello,
I have this current php script:
<?php
if ($dir = opendir("architecture")) {
while (($file = readdir($dir)) !== false) {
$cont++;
if ($file == "." || $file == "..") { } else {
$string.= ("architecture/".$file);
$string.= "&";
}
}
closedir($dir);
}
print($string);
?>
when tested with html it yields exactly what I need for my array:
architecture/architecture1.jpg&architecture/architecture2.jpg&architecture/architecture3.jpg&architecture/architecture4.jpg&architecture/architecture5.jpg&architecture/architecture6.jpg&architecture/architecture7.jpg&architecture/architecture8.jpg&
I put this actionscript into flash to attempt to get these filenames(including the dir name) into an array:
slides = new Array(images);
var lv = new LoadVars();
lv.load("arch5.php");
lv.onLoad = function(){
images = this.$string.split("&");
}
function changeSlide(number){
if (number >= 0 && number < slides.length){
currentSlide = number;
loadMovie (slides[number][0], "_root.placeholder");
}
}
changeSlide(0);
Shouldn’t that put the split string into the new array? It sure doesn’t work. I’ve searched other topics but they are all specialized for email scripts or more complex arrays. I am simply aiming to get the dir and file in the array so the function currentSlide can do its business.
If this doesn’t make sense to anyone, please tell me, I’ll fix it. Thanks a TON in advance if anyone has the answer!! Until then, I’ll still be bashin my brain.