0 Replies Latest reply on Nov 26, 2009 9:39 AM by Marky.d

    Loading Object From File Directory


      Hey Peeps,


      Pretty straight forward question I hope, how would I load a sound from a path such as


      C:\Users\Public\Music\Sample Music\Kalimba.mp3


      A preferred solution would be with actionscript alone (I know some things like this are possible with PHP etc.) and without prior knowledge of where the AIR file is saved at author time.


      I've seen some information on using File or FileReference classes but nothing conrete so that I could load the sound into a new Sound variable. Basicaly, as you might have guessed, i'm making a small media player that will play sound from the XML list iTunes can export.


      I've tried some stuff such as:

      var loader:URLLoader = new URLLoader(new URLRequest("C:\Users\Public\Music\Sample Music\Kalimba.mp3"));


      But obviously I can't load like this because its not in the same directory as the AIR file.


      Any help would be greatly appreciated!