# Loadvars function problem

**URL:** <https://forum.kirupa.com/t/loadvars-function-problem/175471>\
**Category:** Uncategorized\
**Created:** [January 14, 2006, 8:06pm UTC](https://forum.kirupa.com/t/loadvars-function-problem/175471 "2006-01-14T20:06:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![torn](https://avatars.discourse-cdn.com/v4/letter/t/94ad74/32.png) [@torn](https://forum.kirupa.com/u/torn)\
**Post date:** [January 14, 2006, 8:06pm UTC](https://forum.kirupa.com/t/loadvars-function-problem/175471/1 "2006-01-14T20:06:42Z")

</div>

Hello  
I’m trying to load some variables off of my website to display in a flash file in flashmx 2004. What’s supposed to happen is once the variables load it executes a function. I’m not actually having a problem with the function, I’m having a problem getting the function to… well… function. I dont know if its that the variables are loading incorrectly or my actionscript is incorrect, but the function is even starting. I have a line in there to test and see if it even runs ta all, and it’s not.  
Normally, I would have done with the loadVariables(); function, but sometimes it takes a second to load the variables, so when the function executed it would split and display nothing.  
Here’s the code:

```auto

hey = new LoadVars();
hey.onLoad = function() { 
// this first line is to test and see if the function is even executing, which it apparently isn't
 test.text = "yo";
files = new Array();
fl = this[showthem];
files = fl.split(",");
c = files.length;
field.text = files[0];
i = 1;
while(i<c) {
 field.text = field.text + huh.text + files*;
 i = i + 1;
}
};
hey.load("[http://blindedgamers.com/forum/argh.php](http://blindedgamers.com/forum/argh.php)");
stop();

```

I hope I gave enough information.  
Thanks in advance.
