AS3 Loadvars not working after publish

Hi All,

I’m having an issue with some AS3 Loadvars. This works fine when running as preview (^+Ent), however after publishing this doesn’t work. I’m very new (this is my first ‘dip’ into the flash world!). Could someone help me. I’ve posted the code below;

myData = new LoadVars();

myData.load("http://mywebsite.com/myflashdata.asp");

myData.onLoad = function(success) {
    if(success){
        L_Var1.text = this.RetVar1;
        L_Var2.text = this.RetVar2;
        _level0.gotoAndStop(2);
    } else {
        _level0.gotoAndStop(80);
    }
};

Whenever this runs in preview, frame 2 is shown without issue. If run after publishing, frame 80 is shown, but without the trace i cannot see why… Please Help!