AS3.0 中已经没有了loadVars. 对于习惯使用AS2.0 loadVars传参的可以参考一下.
myLoader.addEventListener(Event.COMPLETE, loadSuccessful); myVariables.var1 = "hello"; myRequest.method = URLRequestMethod.POST; myLoader.load(myRequest); function loadSuccessful($evt:Event):void trace("参数已发送"); function loadError($evt:IOErrorEvent):void trace("发送失败.");
var myRequest:URLRequest = new URLRequest("http://www.webstudio.com.cn/msg.php");
var myLoader:URLLoader = new URLLoader();
var myVariables:URLVariables = new URLVariables();
myLoader.addEventListener(IOErrorEvent.IO_ERROR, loadError);
myVariables.var2 = "hi";
myRequest.data = myVariables;
{
}
{
}
admin#flashas.net (#为@) 联系QQ:
:40777822
浙ICP备06033001号