http://onlamp.com/pub/a/onlamp/2007/07/19/introduction-to-flex-using-php.html
http://livedocs.adobe.com/flex/3/html/help.html
http://cookbooks.adobe.com/post_Dynamic_Images___Buttons_in_Datagrid_using_MYSQL__-8703.html
Flipkart
Showing posts with label Flex. Show all posts
Showing posts with label Flex. Show all posts
Friday, April 23, 2010
Flex: Get Response from HTTPService
<mx:Script>
<![CDATA[
import mx.rpc.events.ResultEvent;
import mx.rpc.events.FaultEvent;
import mx.controls.Alert;
private var alert:Alert;
private function send_data():void {
userRequest.send();
}
private function httpService_fault(evt:FaultEvent):void {
var title:String = evt.type + " (" + evt.fault.faultCode + ")";
Alert.show(title);
}
private function httpService_result(evt:ResultEvent):void {
var msg:String = userRequest.lastResult.responce;
if(msg == '1') {
var url:String = "http://localhost/flex/firstapp/home.html";
var request:URLRequest = new URLRequest(url);
navigateToURL(request);
//Alert.show('correct');
}else{
Alert.show(msg);
}
}
]]>
</mx:Script>
<mx:HTTPService
id="userRequest"
url="http://localhost/flex/firstapp/index.php"
method="POST"
fault="httpService_fault(event);"
result="httpService_result(event)"
resultFormat="e4x"
>
<![CDATA[
import mx.rpc.events.ResultEvent;
import mx.rpc.events.FaultEvent;
import mx.controls.Alert;
private var alert:Alert;
private function send_data():void {
userRequest.send();
}
private function httpService_fault(evt:FaultEvent):void {
var title:String = evt.type + " (" + evt.fault.faultCode + ")";
Alert.show(title);
}
private function httpService_result(evt:ResultEvent):void {
var msg:String = userRequest.lastResult.responce;
if(msg == '1') {
var url:String = "http://localhost/flex/firstapp/home.html";
var request:URLRequest = new URLRequest(url);
navigateToURL(request);
//Alert.show('correct');
}else{
Alert.show(msg);
}
}
]]>
</mx:Script>
<mx:HTTPService
id="userRequest"
url="http://localhost/flex/firstapp/index.php"
method="POST"
fault="httpService_fault(event);"
result="httpService_result(event)"
resultFormat="e4x"
>
Subscribe to:
Posts (Atom)