# Why loadVars doesn't work?

**URL:** https://forum.kirupa.com/t/why-loadvars-doesnt-work/29105
**Category:** Uncategorized
**Created:** [August 22, 2003, 6:53am UTC](https://forum.kirupa.com/t/why-loadvars-doesnt-work/29105 "2003-08-22T06:53:45Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![SBUH](https://avatars.discourse-cdn.com/v4/letter/s/4bbf92/32.png) [@SBUH](https://forum.kirupa.com/u/SBUH)
#### Post date: [August 22, 2003, 6:53am UTC](https://forum.kirupa.com/t/why-loadvars-doesnt-work/29105/1 "2003-08-22T06:53:45Z")

</div>

Hello, I have asp page to retrieve back the info from database. And use flash to reload the datas and show the info.

I can see all the variables and value on the asp page, but don’t understand why nothing shown on the flash page using  
myData = new LoadVars();  
myData.source = “cart.asp”  
myData.load(myData.source, myData);  
myData.onLoad = function() {  
…  
}

I wonder whether it is ok that flash page can just load part of the code and show?? Or it should load everthing onto the flashpage??

Thanks !!

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 22, 2003, 6:59am UTC](https://forum.kirupa.com/t/why-loadvars-doesnt-work/29105/2 "2003-08-22T06:59:15Z")

</div>

You let the most important part of the code out 😛 Please post the whole code, including the function.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 22, 2003, 9:36am UTC](https://forum.kirupa.com/t/why-loadvars-doesnt-work/29105/3 "2003-08-22T09:36:31Z")

</div>

\_root.screen.text = myData.textTL\_text;  
\_root.screen.\_x = myData.xpositionTL\_text;  
\_root.screen.\_y = myData.ypositionTL\_text;  
\_root.screen.\_xscale = myData.xscaleTL\_text;  
\_root.screen.\_yscale = myData.yscaleTL\_text;  
\_root.screen.\_rotation = myData.rotationTL\_text;  
leftsformat = new TextFormat();  
leftsformat.font = myData.fontTL\_text;  
leftsformat.color = myData.colorTL\_text;  
\_root.screen.setTextFormat(leftsformat);

```
_root.mulscreen.text = myData.textTL_multext;
_root.mulscreen._x = myData.xpositionTL_multext;
_root.mulscreen._y = myData.ypositionTL_multext;
_root.mulscreen._xscale = myData.xscaleTL_multext;
_root.mulscreen._yscale = myData.yscaleTL_multext;
_root.mulscreen._rotation = myData.rotationTL_multext;
leftmformat = new TextFormat();
leftmformat.font = myData.fontTL_multext;
leftmformat.color = myData.colorTL_multext;
_root.mulscreen.setTextFormat(leftmformat);
imF = "uploadedimage/"+this.bg_id+"left.jpg";
imgaF = "uploadedimage/"+this.galleryLTL_pic;
_root.imagemc.loadMovie(imF);
_root.gallery.loadMovie(imgaF);
_root.gallery._rotation=_root.leftrotationgl;

```

And screen, mulscreen are two textfields, gallery is the movieclip

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 22, 2003, 9:43am UTC](https://forum.kirupa.com/t/why-loadvars-doesnt-work/29105/4 "2003-08-22T09:43:00Z")

</div>

[AS]  
myData = new LoadVars();  
myData.source = "cart.asp"  
myData.onLoad = function() {  
\_root.screen.text = this.textTL\_text;  
\_root.screen.\_x = this.xpositionTL\_text;  
\_root.screen.\_y = this.ypositionTL\_text;  
\_root.screen.\_xscale = this.xscaleTL\_text;  
\_root.screen.\_yscale = this.yscaleTL\_text;  
\_root.screen.\_rotation = this.rotationTL\_text;  
leftsformat = new TextFormat();  
leftsformat.font = this.fontTL\_text;  
leftsformat.color = this.colorTL\_text;  
\_root.screen.setTextFormat(leftsformat);

\_root.mulscreen.text = this.textTL\_multext;  
\_root.mulscreen.\_x = this.xpositionTL\_multext;  
\_root.mulscreen.\_y = this.ypositionTL\_multext;  
\_root.mulscreen.\_xscale = this.xscaleTL\_multext;  
\_root.mulscreen.\_yscale = this.yscaleTL\_multext;  
\_root.mulscreen.\_rotation = this.rotationTL\_multext;  
leftmformat = new TextFormat();  
leftmformat.font = this.fontTL\_multext;  
leftmformat.color = this.colorTL\_multext;  
\_root.mulscreen.setTextFormat(leftmformat);  
imF = “uploadedimage/”+this.bg\_id+“left.jpg”;  
imgaF = “uploadedimage/”+this.galleryLTL\_pic;  
\_root.imagemc.loadMovie(imF);  
\_root.gallery.loadMovie(imgaF);  
\_root.gallery.\_rotation=\_root.leftrotationgl;  
}  
myData.load(myData.source, myData);  
[/AS]

That should do it. I saw you used myData.variable, I’m not sure if that works (seems not, since it didn’t work for you :P), but I am sure that this.variable works since loadVars is an object. So I changed them all to this.variable.

Is leftrotationgl also a variable from the ASP file ? If so, change \_root.leftrotationgl to this.leftrotationgl.

Remember [this thread](http://www.kirupaforum.com/forums/showthread.php?s=&threadid=32072) ?

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 22, 2003, 12:56pm UTC](https://forum.kirupa.com/t/why-loadvars-doesnt-work/29105/5 "2003-08-22T12:56:46Z")

</div>

Hello, I tested it once again, but still it doesn’t work. I have no idea what is wrong. In asp page, the variable are like &a=&b=&  
and in flashpage, it is the same as what u said. Then what other possibility of mistake I can made?

Thanks for your code!

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 22, 2003, 1:02pm UTC](https://forum.kirupa.com/t/why-loadvars-doesnt-work/29105/6 "2003-08-22T13:02:42Z")

</div>

Your ASP output should be like this: &textTL\_text=This is text loaded from the database through ASP&xpositionTL\_text=25&ypositionTL\_text=45&xscaleTL\_text=102& …

And so on. The values I used (This is text… ,25,45,102) are just examples, they can be any value. If the output is like that it should work. If it still doesn’t work, can I see the FLA and the URL of the script ?

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 22, 2003, 1:19pm UTC](https://forum.kirupa.com/t/why-loadvars-doesnt-work/29105/7 "2003-08-22T13:19:57Z")

</div>

Hello, I am sorry to say at this moment, the link is not active. So I attach the asp and .fla in attachment. Thanks very much for your help and hope you have some good suggestion. Thanks again!

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 22, 2003, 1:39pm UTC](https://forum.kirupa.com/t/why-loadvars-doesnt-work/29105/8 "2003-08-22T13:39:16Z")

</div>

If the link is not active it’s pretty obvious that it doesn’t work. Sorry, my host doesn’t support ASP, so I can’t test it.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 22, 2003, 2:09pm UTC](https://forum.kirupa.com/t/why-loadvars-doesnt-work/29105/9 "2003-08-22T14:09:51Z")

</div>

Thanks, and could you have a look at the code of cart.txt in my zip file?

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 22, 2003, 6:11pm UTC](https://forum.kirupa.com/t/why-loadvars-doesnt-work/29105/10 "2003-08-22T18:11:21Z")

</div>

Sorry, I know nothing of ASP ☹
