Loading/Iterating through an images folder to store in a table

Hello!

I'm relatively new to Corona SDK development, but have been working exclusively in iPhone dev for roughly 2 years now...

So, here's my question!

I'm trying to create a slideshow that loads screenshots for a movie.

I want to code my class file so that it automatically counts the "Images" folder and then iterates through the images into the slideshow.

How would I begin to approach that using Lua and the Corona SDK?

Thank you very much for your help! :D

You would simply iterate through every image filename found in the folder and assign them to a table.

@Danny, that is interesting, how do you enumerate the files in a directory using CoronaSDK?

cheers,

?:)

I can provide a proper example in a few hours.

But basically you would use lua's io library to read the contents of a folder

oh that will be wonderful... I know of ways to make it work but requires c extensions, pure lua code that runs in CoronaSDK sandbox will be so awesome.

Each day is such a learning...

My way to manage this would be to have a list of the files that are included with the app and everytime a new file is added or removed, that list is updated, so I would just read that list and know the file that exist.

if it can be dynamically enumerated as you say, that will be wonderful...

cheers,

?:)

views:1644 update:2011/10/28 9:34:19
corona forums © 2003-2011