# Undefined variable?

**URL:** <https://forum.kirupa.com/t/undefined-variable/168551>\
**Category:** Uncategorized\
**Created:** [November 8, 2005, 3:54am UTC](https://forum.kirupa.com/t/undefined-variable/168551 "2005-11-08T03:54:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![atokatim](https://avatars.discourse-cdn.com/v4/letter/a/bbe5ce/32.png) [@atokatim](https://forum.kirupa.com/u/atokatim)\
**Post date:** [November 8, 2005, 3:54am UTC](https://forum.kirupa.com/t/undefined-variable/168551/1 "2005-11-08T03:54:04Z")

</div>

almost got this working, but still need a little help!

this is an example of what i type…

[http://www.mysite.com/test.swf?folder=64](http://www.mysite.com/test.swf?folder=64)

this is what i get…

undefined

I have created a test swf file to make sure the variable is sending and coming back the way i want it. here is my script in php…

if($member-\>active == 1){  
$fileURL=“[http://www.mysite.com/test/",$folder,"/mytest.xml](http://www.mysite.com/test/)”;  
print “playurl=$fileURL”;  
}

i am not sure how exactly it pulls the variable from flash, but i think it works for my mysql stuff that i have in the php file.

Here is my actionscript in flash…

lvOut = new LoadVars();  
lvIn = new LoadVars();  
lvIn.onLoad = function (success)  
{  
\_root.vartext.text = lvIn.playurl;  
}  
lvOut.folder = \_level0.folder;  
lvOut.sendAndLoad(“[http://www.mysite.com/variables.php](http://www.mysite.com/variables.php)?folder=” + \_level0.folder + “”, lvIn, “POST”);

I got that script from a post on this site, but just edited it so it will work with my variables. the part where it says…

lvOut.sendAndLoad(“[http://www.mysite.com/variables.php](http://www.mysite.com/variables.php)?folder=” + \_level0.folder + “”, lvIn, “POST”);

i tried loading just variables.php instead of the ?folder= blah, and that did not work either ☹

if there is anything i need to change, please tell me!!! i need to get this freakin script working!

Thanks!  
Tim
