如何从Flash中的aspx页面访问值?
海正在尝试访问 aspx 变量。但我不能这样做。我不知道如何解决我的问题。请任何人帮助我。正在使用 flash professional cs5。
import flash.net.URLRequest;
import flash.net.URLVariables;
import flash.net.URLRequestMethod;
import flash.events.Event;
var myRequest:URLRequest = new URLRequest();
var myVariables:URLVariables = new URLVariables();
var myLoader:URLLoader = new URLLoader();
myRequest.url = "http://xxxx";
myRequest.method = URLRequestMethod.POST;
myLoader.addEventListener(Event.COMPLETE, sendComplete);
myLoader.load(myRequest);
function sendComplete(e:Event):void{
trace(myLoader.load(myRequest));
}
Hai am trying to access the aspx variable.But i can't to do this.I dunno how to Solve my problem.anybody kindly help me.am using flash professional cs5.
import flash.net.URLRequest;
import flash.net.URLVariables;
import flash.net.URLRequestMethod;
import flash.events.Event;
var myRequest:URLRequest = new URLRequest();
var myVariables:URLVariables = new URLVariables();
var myLoader:URLLoader = new URLLoader();
myRequest.url = "http://xxxx";
myRequest.method = URLRequestMethod.POST;
myLoader.addEventListener(Event.COMPLETE, sendComplete);
myLoader.load(myRequest);
function sendComplete(e:Event):void{
trace(myLoader.load(myRequest));
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您需要将 ASPX 变量作为隐藏标记写入文档中,然后通过在 ActionScript 中调用 JavaScript 来提取它。检查外部接口。
或者,另一种最简单的方法是将 aspx 变量编写为 flash var。 查看此处。
或者您可以使用ExternalInterface 来访问查询字符串。检查 Flash ActionScript 抓取查询字符串值
You need to write the ASPX variable in to the document as a hidden tag maybe and then extract it by calling JavaScript inside ActionScript. Check ExternalInterface.
OR, the the other easiest way is to write the aspx variable as a flash var. Check here.
OR you can use the ExternalInterface to access the query string. Check Flash ActionScript Grab Query String Value
尝试此代码,URLLoaderDataFormat.TEXT。这将检索文本。
try this code,URLLoaderDataFormat.TEXT.this will retrieve the text.