Image browsing system

Hey people,

I am working on an image browser.
The setup:
ex. I’ve put four .jpeg files in a folder “project_1” and named them 1.jpg ; 2.jpg ; 3.jpg ; 4.jpg
I’ve got three .jpg images in the folder “project_2”, named 1.jpg ; 2.jpg ; 3.jpg
and one image in “project_3”, named 1.jpg

Now I want to know how I can detect the highest number in each project folder in order to know how many ‘thumbnail’ buttons I have to build. (simple buttons with a dynamic txtfield that says ‘1’ ‘2’ ‘3’ etc… )

I can use a txt-file that says project_1_thumbs=4&project_2_thumbs=3&… but it has to be possible without this …

this shouldn’t be too hard, but I can’t figure it out.

help

greets,
Stanley

use array…

project_1array = ["1.jpeg","2.jpeg","3.jpg","4.jpg"];
//then trace it with
trace(project_1array.length)