0 Replies Latest reply on Feb 21, 2012 4:40 AM by Micke@KGK

    Change URLRequest to a data binder




      I want the soundloader to select the audiofile based on the info in an XML-file so I am trying to manipulate the code:


      var snd:Sound = new Sound();
      snd.load(new URLRequest("audio/world.mp3"));


      in to say


      var snd:Sound = new Sound();
      snd.load(new URLRequest("{data.audio}"));


      which doesn'ät work at all...


      since I want the code to locate the info from an xml-file that has the following tags for example:


      <name>Arabian Nights</name>
      <style>FullOn Psytrance</style>
      <length>32 seconds</length>
      <bpm>149 BPM</bpm>


      All other info works fine loading name, number, style and so on. But how do I manipulate the code so I fethes the info on which file to play from the XML-file?

      Thank you!