How to choose from directory? (Noob question)

Hello! Need your little help guys!

In my app, i have a picture.

And i want to create the following:

when i tap a picture, it opens a documents folder and allows you to select some picture, when you tap one from the list, it will substitute previous picture with selected one.

What function allows to open some folder and choose file from list?

And how can i substitute file with loaded one?

Thanks in advance! [import]uid: 169507 topic_id: 33211 reply_id: 333211[/import]

For getting a list of files from a directory, you need to turn to LFS (Lua File System). This was added in a daily build at some point, so make sure you are running the latest daily build (might have been in 840, not sure, def. in 971)

There is a lovely blog post on using LFS: http://www.coronalabs.com/blog/2012/05/08/luafilesystem-lfs-tutorial/

You of course will be responsible for displaying all the info.

Now for the second part of your category: Swapping images. You can’t really swap them. You would have to have Pic1 loaded and showing at some, X, Y location, then load the next image into a new display image object, show it at the same X, Y then delete the old one. [import]uid: 19626 topic_id: 33211 reply_id: 131969[/import]

For getting a list of files from a directory, you need to turn to LFS (Lua File System). This was added in a daily build at some point, so make sure you are running the latest daily build (might have been in 840, not sure, def. in 971)

There is a lovely blog post on using LFS: http://www.coronalabs.com/blog/2012/05/08/luafilesystem-lfs-tutorial/

You of course will be responsible for displaying all the info.

Now for the second part of your category: Swapping images. You can’t really swap them. You would have to have Pic1 loaded and showing at some, X, Y location, then load the next image into a new display image object, show it at the same X, Y then delete the old one. [import]uid: 19626 topic_id: 33211 reply_id: 131969[/import]