# AS3 Loadvars not working after publish

**URL:** https://forum.kirupa.com/t/as3-loadvars-not-working-after-publish/319364
**Category:** flash
**Created:** [February 17, 2011, 8:49pm UTC](https://forum.kirupa.com/t/as3-loadvars-not-working-after-publish/319364 "2011-02-17T20:49:23Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![anqe\_tb](https://avatars.discourse-cdn.com/v4/letter/a/9fc348/32.png) [@anqe\_tb](https://forum.kirupa.com/u/anqe_tb)
#### Post date: [February 17, 2011, 8:49pm UTC](https://forum.kirupa.com/t/as3-loadvars-not-working-after-publish/319364/1 "2011-02-17T20:49:23Z")

</div>

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;

```auto
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!
