If sound is external:
PHP Code:
var music:Sound = new Sound()
music.load(new URLRequest("music.mp3")); 
music.play(0int.MAX_VALUE); 
// if music file is in another url (not in the same folder as the *.swf file) use "http://yoursite.com/music.mp3" instead.


If sound is in library, with class name "music":
PHP Code:
var music1:music = new music();
music1.play(0int.MAX_VALUE); 
And i have a method to loop forever... you play it MAX_VALUE times, and add a listener to listen for the music to finishes, then play it it again MAX_VALUE times.

PHP Code:
var music1:music = new music();
var 
chan:SoundChannel = new SoundChannel();
chan music1.play(0int.MAX_VALUE);
chan.addEventListener(Event.SOUND_COMPLETEloop);
function 
loop(e:Event):void
{
    
chan music1.play(0int.MAX_VALUE);

I have not waited for hours to see if it really loops, but I've waited quite long and it keeps playing...