title: Adobe AIR: How to play local mp3 file?
body: <p>I'm testing Adobe AIR with flex, and I wanted to play a mp3 via an open file dialog, I did that :</p>
  
  <pre><code>import flash.filesystem.*;
  import flash.events.Event;
  import flash.media.*;
  import mx.core.SoundAsset;
  
  public var loadedFile:File;
  public var channel:SoundChannel;
  public var song:SoundAsset;
  
  
  private function loadFile():void {
   loadedFile = new File();
   loadedFile.browseForOpen("Open multimedia File");
   loadedFile.addEventListener(Event.SELECT, fileSelected);
  }
  
  private function fileSelected(event:Event):void {
   song = new SoundAsset()
   song.load(URLRequest(loadedFile.url));
   channel = song.play();
  }
  </code></pre>
  
  <p>But when I try to open a file, after the Open file dialog close, I get this error :</p>
  
  <pre><code>TypeError: Error #1034: Type Coercion failed: cannot convert "file:///C:/Users/Kedare/Music/05-Scene%20V%20~%20Prelude.mp3" to flash.net.URLRequest.
  </code></pre>
  
  <p>I can't find anything related to that on Google or another documentation, all the docs I find is related to play a sound using URL and not Local files :(</p>
  
  <p>Any idea of what can be the problem ? What can I do ?</p>
  
  <p>Thank you !</p>