Ask a Question related to Macromedia Flash Data Integration, Design and Development.
-
LuckysCharms2000 #1
Loading images dynamically
I have a slideshow that I am working on and the way the slideshow works is that
it assigns any number of images i define to an array.
problem is, i dont know how to check how many images are in a particular
folder on the hard drive. the number of images being displayed could be
anywhere from 1-200. "numofImages" is the variable that I am going to use to
cap off the looping statement... how do I tell flash to: "look in this folder
on the hard drive", "read how many elements are in the folder", "record that
number in 'numofImages' "?
I have some of my relavent code here:
//NUMBER VARIABLE FOR ARRAY
var N:Number;
//NUMBER VARIABLE FOR THE NEXT IMAGE LOADED FROM THE ARRAY
var nxtImage:Number = 0;
/*FOR STATEMENT... IF N IS LESS THAN numofImages ADD TO IT
AND THEN REPEAT THE STATEMENT IMG_ARY[N]
RESET THE IMG_VAR VARIABLE AND PRINT IT*/
for (N=0;N<numofImages;N++) {
img_var = "image"+N+".jpg";
img_ary[N] = img_var;
}
LuckysCharms2000 Guest
-
Dynamically loading xml content
I?m creating a menu bar in which the links have to be dynamically created based on the values in the xml, and the number of links(buttons) may even... -
Dynamically loading PNG and GIF files through XML
Hello, I have a project where I need to use XML to dynamically load PNG and GIF files not just JPEGs. I have found forums and information from... -
dynamically loading css-rules!
what is the question, I dont get it, you said it print correctly the styles, so what's the problem ? Savut "Sindre Hiåsen" <paalhi@ifi.uio.no>... -
dynamically loading images and manipulating them
Hi I am trying to load a series of images(jpg) based on information returned by a cold fusion query, and then break the images up into pages of... -
dynamically loading video
hi flashbrains, anyone know if its possible to dynamically load a video file into a flash movie? i want to have the my SWF reading a text file to... -
Motion Maker #2
Re: Loading images dynamically
Flash cannot look into server folders.
You need a server side script that will determine the number of files and
send that count back to Flash.
--
Lon Hosford
[url]www.lonhosford.com[/url]
May many happy bits flow your way!
"LuckysCharms2000" <webforumsuser@macromedia.com> wrote in message
news:dnpqlb$j5a$1@forums.macromedia.com...
I have a slideshow that I am working on and the way the slideshow works is
that
it assigns any number of images i define to an array.
problem is, i dont know how to check how many images are in a particular
folder on the hard drive. the number of images being displayed could be
anywhere from 1-200. "numofImages" is the variable that I am going to use
to
cap off the looping statement... how do I tell flash to: "look in this
folder
on the hard drive", "read how many elements are in the folder", "record that
number in 'numofImages' "?
I have some of my relavent code here:
//NUMBER VARIABLE FOR ARRAY
var N:Number;
//NUMBER VARIABLE FOR THE NEXT IMAGE LOADED FROM THE ARRAY
var nxtImage:Number = 0;
/*FOR STATEMENT... IF N IS LESS THAN numofImages ADD TO IT
AND THEN REPEAT THE STATEMENT IMG_ARY[N]
RESET THE IMG_VAR VARIABLE AND PRINT IT*/
for (N=0;N<numofImages;N++) {
img_var = "image"+N+".jpg";
img_ary[N] = img_var;
}
Motion Maker Guest
-
danredman #3
Re: Loading images dynamically
there are solutions...
if the flash can't read how many images are in that folder, U can help him...
if in the folder is images named image#.jpg where # is the number, and there
are no missing numbers U can stop where the image is no more loading in a movie
clip in at most 3s (timeout)
kind of:
loadmovie("image"+index+".jpg",q);
wait 3s (can do a loop for 3*fps or make frames for 3s)
if(q.getBytesLoaded<1){//there are no more files}
or U can put a .txt file with the N=#, and load it into fla, so U don't have
to change the fla just edit the .txt file when number of images
danredman Guest
-
zensoldier #4
Re: Loading images dynamically
IF you can process asp then its easy to get the count.
dim totalFiles
Set imgDirectory=Server.CreateObject("Scripting.FileSy stemObject")
Set imageFiles=imgDirectory.GetFolder(Server.MapPath"/images/"))
For each filefound in imageFiles.files
totalFiles = totalFiles + 1
next
zensoldier Guest
-
LuckysCharms2000 #5
Re: Loading images dynamically
thanks guys ill look into that
LuckysCharms2000 Guest



Reply With Quote

