This content has been marked as final. Show 3 replies
So what is it you want - some way of obtaining a list of all files in a
folder, or a "browse" dialog?
Director's getNthFilenameInFolder() and FileIO's displayOpen() will do
this, as will Buddy API - with Buddy's commands being more complete and
Thanks for the response Sean.
I'll look into the suggestions you made. I'm actually dealing with an original Flash based client project. At the 11th hour they realized "I can't pull dynamic files off the drive with Flash."
In order to integrate the solution, I'll use Director to index the folders upon load and write an xml file to the drive. Then I'll use Flash to read the file and use a flash/Director behaviour to open the documents"
If you download the "One Sprite Demo' from http://www.lingoworkshop.com/Codelib/OSW/Downloads.php, look for a file in there called "TreeDemo_filebrowser.dir". Basically its demonstrating how to use the treeview widget. You could make it into a functioning filebrowser by changing the following line from
-- example of changing the label
myNodeTreeRef.SetNodeValue("Opening...", args.path )
-- open the selected file using BuddyAPI
res= baOpenFile(pathToOpen, "Normal")
if (res <> 0) then alert ("error " & res & " opening file")
There's probably a few other things you might want to do (filter the file list, provide a different starting directory etc - but it might be a start)