The Daily Click ::. Forums ::. Klik Coding Help ::. List object in MMF2 - Displaying list of files in a directory.
 

Post Reply  Post Oekaki 
 

Posted By Message

KevinHaag



Registered
  28/01/2005
Points
  266

VIP Member
27th December, 2007 at 21:08:35 -

I want to create a list object, and have it so at the start of the level, it displays a list of all the files in a certain directory.

For example:
c:/my documents/my music

Also, how would I go about so in another list box, it displays a list of artists of all the mp3 files in that same directory.

Is this possible?


 
Image
http://www.kevinhaag.ca

\/\/olf

Creative Genius

Registered
  06/08/2005
Points
  76

VIP Member
27th December, 2007 at 21:51:48 -

list of artists? I dont think thats possible altho a list of mp3 files is possible. I saw a tutorial somewhere. You'll probably have to use the file object along with the list object.

 
Image

www.OldMansTale.net
Sign the Petition! Go go Go!!

KevinHaag



Registered
  28/01/2005
Points
  266

VIP Member
27th December, 2007 at 23:21:05 -

Anyone got any ideas on how to actually do it?

 
Image
http://www.kevinhaag.ca

DaVince

This fool just HAD to have a custom rating

Registered
  04/09/2004
Points
  7998

Game of the Week WinnerClickzine StaffHas Donated, Thank You!Cardboard BoxDos Rules!
28th December, 2007 at 08:04:07 -

Loop through all elements in the list, checking if the last three characters are "mp3". If they are, keep them in the list, else remove them from the list.

I'm not sure, but I think the list object also had the possibility of showing only files of certain types, by saying "X:\Folder\*.mp3". Not sure.

(Also, Windows directories use a backslash, not a normal slash. )

 
Old member (~2004-2007).

KevinHaag



Registered
  28/01/2005
Points
  266

VIP Member
28th December, 2007 at 19:21:37 -

Well i'm just new to MMF2 so I really need some help to do this.

 
Image
http://www.kevinhaag.ca
   

Post Reply



 



Advertisement

Worth A Click