里面调用Web服务的方法在动作脚本3.0 [英] Calling a method inside web service in action script 3.0
本文介绍了里面调用Web服务的方法在动作脚本3.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要调用内部的Web服务的方法,并传递给它它的参数,从动作脚本3.0 谁能帮助我PLZ?我搜索在互联网上发现一个柔性的解决方案,我不挠的工作,我用行动脚本3.0
I need to call a method inside web service and passing to it it's parameters from action script 3.0 can anyone help me plz? i searched all over the internet and found solutions with flex and i am not working with flex i am working with action script 3.0
推荐答案
我用的是这样的:
var request:URLRequest = new URLRequest();
request.url = 'http://example.org';
// If you're POSTing data:
request.method = URLRequestMethod.POST;
request.data = new URLVariables({ /* Your object */ });
var loader:URLLoader = new URLLoader();
loader.dataFormat = URLLoaderDataFormat.VARIABLES; // If you're using POST
try {
loader.load(request);
} catch(error:Error) {
// Handle error
}
trace(loader.data); // Result
文件:
- http://livedocs.adobe.com/flex/ 2 / langref /闪光灯/ NET / URLRequest.html
- http://livedocs.adobe.com/flex/ 2 / langref /闪光灯/ NET / URLLoader.html
- http://livedocs.adobe.com/flex/2/langref/flash/net/URLRequest.html
- http://livedocs.adobe.com/flex/2/langref/flash/net/URLLoader.html
这篇关于里面调用Web服务的方法在动作脚本3.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文