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;
{
}
{
}
Word教程网 | Excel教程网 | Dreamweaver教程网 | Fireworks教程网 | PPT教程网 | FLASH教程网 | PS教程网 |
HTML教程网 | DIV CSS教程网 | FLASH AS教程网 | ACCESS教程网 | SQL SERVER教程网 | C语言教程网 | JAVASCRIPT教程网 |
ASP教程网 | ASP.NET教程网 | CorelDraw教程网 |