Load mp3 file from a URL : MP3 « Development « Flash / Flex / ActionScript






Load mp3 file from a URL

 

package{
  import flash.display.Sprite;
    import flash.media.*;
    import flash.events.*;
    import flash.net.*;
    import flash.text.*;
  public class Main extends Sprite{
    public function Main(){

        var song:Sound = new Sound(new URLRequest("http://server.com/robotPicksFlowers.mp3"));
        song.play();

    }
  }
}

        








Related examples in the same category

1.Load mp3 sound file
2.Find Out When a Sound Finishes Playing
3.Tracking the Progress of a Playing Sound
4.Reading the Level of a Sound
5.Calculating Spectrum Data
6.ID3 Reader