send and recive vars to and from php
This week's featured product
Audio Recorder for Adobe Flash
This is a fully customizable Audio Recorder for Adobe Flash, built with support for exporting MP3 files. Your user will be able to record with ease, because everything you need is in the component (no need for a streaming server).
Become a premium member
Flabell and Themesbell membership provides users with the ability to download any of our components for Adobe Flash and website themes for free, during an entire year.
read more


Subcribe to topic RSS

Products RSS Feed
Follow us on twitter
support@flabell.com
almatm
on 13/4/10
almatm
on 13/4/10
var variables:URLVariables = new URLVariables();
// Build the varSend variable
// Be sure you place the proper location reference to your PHP config file here
var varSend:URLRequest = new URLRequest("config_flash.php");
varSend.method = URLRequestMethod.POST;
varSend.data = variables;
// Build the varLoader variable
var varLoader:URLLoader = new URLLoader;
varLoader.dataFormat = URLLoaderDataFormat.VARIABLES;
varLoader.addEventListener(Event.COMPLETE, completeHandler);
variables.uname = uname_txt.text;
variables.sendRequest = "parse";
// Send the data to the php file
varLoader.load(varSend);
// When the data comes back from PHP we display it here
function completeHandler(event:Event):void{
var phpVar1 = event.target.data.var1;
var phpVar2 = event.target.data.var2;
result1_txt.text = phpVar1;
result2_txt.text = phpVar2;
}
}
flash says:
TypeError: Error #2007: ???????? text ?? ?????? ???? ????? ????.
at flash.text::TextField/set text()
at MethodInfo-1()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/onComplete()
bobocel
on 14/4/10
You can also try one of our free components if you like, which uses PHP to store the variables.