Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-01-2006, 09:00 PM
als als is offline
Junior Member
 
Join Date: Jul 2006
Posts: 2
Default How to get all files in a folder into an array ?

Can someone show me an example how to load all files name in a specific folder (without path) into an array (in SWFKIT) and then pass back to Flash as an array so that I can access individual file name ? I've been looking at this forum but unable to find a solution.

Thanks in advanced.
Reply With Quote
  #2 (permalink)  
Old 07-02-2006, 07:55 PM
Senior Member
 
Join Date: Feb 2003
Posts: 212
Default Re:How to get all files in a folder into an array ?

Maybe this old project of my could be helpful to you
It lists the pdf-files in a directory and passes them to flash.
to view the pdf files you must have the foxit acitveX installed and registered. but it's not necessairy to build the file list.

project url:
http://www.vbsdiksmuide.be/pdfviewer.zip

foxit activeX url:
http://www.foxitsoftware.com/foxitre...Xwin32demo.zip
Reply With Quote
  #3 (permalink)  
Old 07-03-2006, 03:21 AM
als als is offline
Junior Member
 
Join Date: Jul 2006
Posts: 2
Default Re:How to get all files in a folder into an array ?

Hi meester,

Thanks for the sample and I'm really appreciate that. The sample looks complicated to me. Do you have a more simple example just to put all the files in a specific folder into an array (inside swfkit) then pass the array back to Flash so that I can use the individual file name ?

What about anyone here, especially the Admin, can help me with an example? I'm stuck here with my project. Thanks a lot.

Reply With Quote
  #4 (permalink)  
Old 07-03-2006, 07:33 AM
Senior Member
 
Join Date: Feb 2003
Posts: 212
Default Re:How to get all files in a folder into an array ?

I made you a new one

http://www.vbsdiksmuide.be/filelist.zip
Reply With Quote
  #5 (permalink)  
Old 07-03-2006, 02:52 PM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re:How to get all files in a folder into an array ?

Many many thanks to meester


To get all files in a specific folder:
Code:
var myfolder = new Folder("some folder");
var myfilearray = myfolder.files;
To pass the swfkit array to action script, first define an array in action script, say "myfilesinas", then transfer the array in the following way:
Code:
FlashPlayer.putArray("_root.myfilesinas", myfilearray);
In flash8 + swfkit (express, standard or pro) v3 (which will be coming out in about one week), you can call the Folder object directly in action script, thus making the task much easier:

Code:
var myfolder = new SWFKit.Folder("some folder");
var myfilesinas = myfolder.files;
myfolder.Release();
Reply With Quote
Reply

Was this information helpful?    Yes No



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 03:44 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.