My weather widget won't run on my local server

Hello all,

I have made a weather widget using a really good tutorial from the tech labs that connects to and retrieves an XML file and then displays the info. If anyone is interested the link is:

It works fine when I test it in Flash but when I publish it to my local server (I am using MAMP) it won’t run. It seams to be trying to connect to the website but something is stopping it. Here is my AS3 code:


//allow domains

Security.allowDomain("*", "");

//ini settings

icons_mc.visible = false;


var weather_xml_url:String = "*&dayf=5&link=xoap&prod=xoap&par=1112820817&key=d779b6bc4e05ee58&unit=m";

var weather:XML = new XML();
var weather_url:URLRequest = new URLRequest(weather_xml_url);
var weatherLoader:URLLoader = new URLLoader(weather_url);

weatherLoader.addEventListener(Event.COMPLETE, weatherLoaded);

function weatherLoaded(e:Event):void
    weather = XML(;
    temp_txt.text =;

    icons_mc.visible = true;

    var weather_icon:int = Number(;

    //set the complementary text
    var ud:String = weather.head.ud;
    var us:String =;
    var city:String = weather.loc.dnam;
    var time:String =;
    var sunrise:String = weather.loc.sunr;
    var sunset:String = weather.loc.suns;
    var temp:String =;
    var flik:String =;
    var update:String =;

    var term:String;
    var wind_v:String =;
    var wind_gust:String =;
    var wind_d:String =;
    var wind_t:String =;

    var hmid:String =;
    var vis:String =;

    visability_txt.text = vis+" "+ud;
    time_txt.text = time;
    winddirect_txt.text = wind_t;
    windspd_txt.text = wind_v+" "+us;
    sunrise_txt.text = sunrise;
    sunset_txt.text = sunset;
    update_txt.text = "Forecast last updated at "+update;


Any help would be really appreciated?

Thank you