# Understanding loadVars

**URL:** <https://forum.kirupa.com/t/understanding-loadvars/68837>\
**Category:** flash\
**Created:** [October 29, 2004, 12:18pm UTC](https://forum.kirupa.com/t/understanding-loadvars/68837 "2004-10-29T12:18:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![aegis](https://avatars.discourse-cdn.com/v4/letter/a/f17d59/32.png) [@aegis](https://forum.kirupa.com/u/aegis)\
**Post date:** [October 29, 2004, 12:18pm UTC](https://forum.kirupa.com/t/understanding-loadvars/68837/1 "2004-10-29T12:18:25Z")

</div>

Can someone let me know if I have this correct or not?

I have a Flash movie embeded into index.cfm that contains a textfield called ‘txtInfo’ on \_root. On Frame 1 I have:

var myLoadVars:LoadVars = new LoadVars();  
// set values  
myLoadVars.value1 = 10;  
myLoadVars.value2 = 20;  
myLoadVars.sendAndLoad("…/loadvars.cfm", “POST”);  
myLoadVars.onLoad = function() {  
\_root.txtInfo.text = myLoadVars.finalValue;  
}

The Flash file is located in /flash, that’s why I have …/loadvars.cfm instead of loadvars.cfm.

Anyways, I THOUGHT it would take value1 and value2, send it to that page via POST, then that page uses an internal script to add the 2 together and then output:

&finalValue=30

Well, I thought Flash would read the output’s source file and then parse that like in URL, so it would have a value called myLoadVars.finalValue, and it would be 30, which would display on the screen.

Instead, the page loads and nothing is displayed to the flash file. What am I doing wrong? (Sorry, I’m being self-taught), and there’s really structured method of learning AS2.0 outside reading a book. 🙂 Thanks guys!
