-
Image detection in folder script?
_root.createEmptyMovieClip("container", 1);
rand = random(9);
container.loadMovie("fimages/image"+rand+".jpg");
container._x = container._y=0;
container._alpha = 0;
In our fla we have this on frame one which proceeds to load an image by fading it in from a folder. Is there any possible script that can detect the amount of images in a folder and load those? Because sometimes there are blank images (no images) which loads.
Thanks in advance!
-
Senior Member
With your script you are also loading image0.jpg, which you may not have.
Use this updated random script instead to just load images 1-9 .
rand = math.round(math.random()*8+1);
Flash can not look into folders. In that case you will need a server side script like php,asp or cgi.
-
thank you so much pellepiano!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|