# LoadVars = success, but my vars are undefined?

**URL:** https://forum.kirupa.com/t/loadvars-success-but-my-vars-are-undefined/112229
**Category:** Uncategorized
**Created:** [June 4, 2004, 11:29pm UTC](https://forum.kirupa.com/t/loadvars-success-but-my-vars-are-undefined/112229 "2004-06-04T23:29:08Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Freddythunder](https://avatars.discourse-cdn.com/v4/letter/f/8edcca/32.png) [@Freddythunder](https://forum.kirupa.com/u/Freddythunder)
#### Post date: [June 4, 2004, 11:29pm UTC](https://forum.kirupa.com/t/loadvars-success-but-my-vars-are-undefined/112229/1 "2004-06-04T23:29:08Z")

</div>

Hello all!  
I’ve been working with LoadVars a lot recently and like it very much so. However, I have encountered a new problem. As always, I have searched through a bunch of threads to no avail; if this is a repeated question, please trout slap me and I’ll apologize! Anywho -

I have this array that already works in my Flash project:

```auto

angles = [0, 35, 100, 72, 72, 81];

```

Now I want to pull those numbers in the array from a changing PHP program. To start, I’m using a test file:

```php

&p1=0&p2=35&p3=100&p4=72&p5=72&p6=81

```

Then I have actions like this right before I need those pulled in:

```auto

lv = new LoadVars();
lv.onLoad = function(success){
if(success){
p1 = this.p1;
p2 = this.p2;
p3 = this.p3;
p4 = this.p4;
p5 = this.p5;
p6 = this.p6;
trace(p1); //returns a zero
}
}
lv.load("myStupidTextFile.txt");
trace(p1); //returns 'undefined'

```

How do I get those variables to register outside of the loadVars? There has to be a way, right??!!
