Preloading A MP3


With kirupa i learned how to load an external SWF and JPG and make a preloader of it. Now I need to preload a MP3 and I can’t. The code I did my self was:

var soundLoader:Sound;

function loadSound(url:String):void {
// Set properties on my Loader object
soundLoader = new Sound();
soundLoader.load(new URLRequest(url));
soundLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, soundLoading);
soundLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, soundLoaded);

// escolhe o ficheiro para download

function soundLoaded(e:Event):void {
trace(“loaded :)”);

function soundLoading(e:ProgressEvent):void {

what am I doing rong? I’m having an error:

1119: Access of possibly undefined property contentLoaderInfo through a reference with static type

Can someone teach me what I am doing rong?