hey..
can someone remind me how to recieve a variable in PHP sent from flash using sendandload..
cheers
Printable View
hey..
can someone remind me how to recieve a variable in PHP sent from flash using sendandload..
cheers
hey all..
answered my own question its the HTTP POST VARS..
my next problem is that the send and load is failing!.. it is fine when inside a test file on its own but when i cut and paste the code into the .fla im working with the send and load fails..
What is the most common reasions for this and why would it work in one file but not another?
first frame of timeline:
simple_lv = new LoadVars();
//the function when data is recieved back
simple_lv.onLoad = function(success:Boolean) {//works in another file
if (success) {
sametxt.text = this.same;
name_txt0.text = this.newname0;
name_txt1.text = this.newname1;
} else {
name_txt0.text = "oh no";// i keep getting this..
}
};
button.onRelease = function() {
simple_lv.myname = _parent.user.name;
simple_lv.sendAndLoad("name.php", simple_lv, "POST");
work.text = myname.text;
phpsee.text = simple_lv.myname;
};
stop();
any ideas?
cheers all
Hi,
probably the most commom source of this problem is testing inside flsh rather than in the browser
Musicman
not sure i get you there?.. both the test and the actual project are being viewed through a browser.
the only diffrence between the two is the place from which the PHP script gets its starting variable..
thanks..
Could I have a look at these things (swf installed on a server, not a fla)
Musicman
its ok iv cut the elements out of the proper file into the working one.. was just one of those times when the most basic thing wont at all?
last week a stop action on the timeline didnt work... flash can be weird sometimes..
thanks for your help.