marko-expert
asked on
Load pictures
Hi Experts,
I hope that You will respond me ASAP.
I have a script:
-------------------------- ---------- ---------- ----------
i=20;
while (i>0) {
_root.mcy.data.duplicateMo vieClip("D CP_" + i, i, {_x:10, _y:i*100+325});
i--;
loadMovie("DCP_"+(i+1)+".j pg", "_root.mcy.DCP_"+(i+1)+".p ic");
}
-------------------------- ---------- ---------- ----------
this script loads 20 diferent pictures into newly created movie clips.
I have 20 pictures maximum at the time but sometimes, I have just 5 or less.
I need a control which will stop the duplicating movie clip if there is no more pictures in the folder.
Thanks in advance
Marko
I hope that You will respond me ASAP.
I have a script:
--------------------------
i=20;
while (i>0) {
_root.mcy.data.duplicateMo
i--;
loadMovie("DCP_"+(i+1)+".j
}
--------------------------
this script loads 20 diferent pictures into newly created movie clips.
I have 20 pictures maximum at the time but sometimes, I have just 5 or less.
I need a control which will stop the duplicating movie clip if there is no more pictures in the folder.
Thanks in advance
Marko
Oh! In the first line of the php:
if ($handle = opendir('audio')) {
Change audio to the directory that your images are in.
Make sure permissions on the folder are set to 777
-Sam
if ($handle = opendir('audio')) {
Change audio to the directory that your images are in.
Make sure permissions on the folder are set to 777
-Sam
ASKER
I do not have PHP support...
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
If you have php available...
Change your html do name from whatever.html to whatever.php then put this at the very top of the page:
<?php
if ($handle = opendir('audio')) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != "..") $thefiles[] = $file;
}
closedir($handle);
}
$totalFiles = sizeof($theFiles);
?>
Then in the object coding that embeds your swf add this param:
<param name="FlashVars" value="total=<?php echo($totalFiles); ?>" />
and in the <embed section add:
FlashVars="total=<?php echo($totalFiles); ?>"
Then in your actionscript:
Change i = 20; to i = total;
-Sam