Load mp3 sound file : MP3 « Development « Flash / Flex / ActionScript






Load mp3 sound file

 
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 sound:Sound = new Sound(new URLRequest("sound.mp3"));
        sound.play();

    }
  }
}

        








Related examples in the same category

1.Load mp3 file from a URL
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