The answer to your issue is both simple and surprising, if you're not used to AS3.
In AS3, the flash.* classes tend to, when a setter is used, make and store a copy of the passed object. Since they store a copy, any modification on the original instance after the setter isn't applied on the copy, and thus is ignored.
It is the case of, for example, DisplayObject.filters
, ContextMenu.customItems
or URLRequest.data
.
In your code, you are setting varSend.data = variables
before filling variables
. You should do the reverse :
variables.uname = uname_txt.text;
variables.sendRequest = "parse";
varSend.data = variables;
// Send the data to the php file
varLoader.load(varSend);
Only some classes do that, and even then, they usually don't do it with all of their setters.