Methods relying on URL strings in ActionScript 3 now use URLRequest (flash.net.URLRequest) instances instead of direct string values for URLs. URLRequest instances contain the following properties:
• contentType:String
• data:Object
• method:String
• requestHeaders:Array
• url:String
which relates to the URL itself (specified in the url property).
For example, when using navigateToURL() (flash.net.navigateToURL) (getURL() replacement), instead of passing a string of the URL to navigate to, you use a URLRequest instance.
ActionScript Code:
var request:URLRequest = new URLRequest("http://www.adobe.com/");
navigateToURL(request);
2007年5月7日星期一
URLRequest for URL Strings
订阅:
博文评论 (Atom)
0 评论:
发表评论