1 Reply Latest reply on Jun 7, 2009 9:21 PM by dzeikei

    How to load all audio files what ever i have in a folder

    Raghuvasa Level 1

      Hi All,


      i done the application for playing audio files.


      everything is ok. it is running successfully.


      but what i want is i want to load all the audio files whatever i have in specified folder.


      becoz now i am doing like this.

                  private const server:String = "C:/Documents and Settings/rvasa/Desktop/"


                  private var dp:ArrayCollection = new ArrayCollection(["AleAle.mp3","Iddaru - Sasivadane.mp3"])


      and then setting for  combo box. so its displaying a list with those two files.


      we need to specify the audio file name in ArrayCollection if i place any new file in specified folder.


      but if i place any new audio file in specified folder it should be load automatically . i dont want to change any code.


      for that how can i load in array collection or how can i give path for that.


      Can any help me. am i clear?




        • 1. Re: How to load all audio files what ever i have in a folder

          I doubt Flash sandbox will let you scan the some folder for any new changes due to security issues.

          If it could, some malicious flash app could scan your My Documents folder and send contents back to some server.

          You could make the application read a playlist.xml in the folder that you can change when you add new files to the folder.

          That way you don't need to make any code changes and just update the xml playlist file.