{ "type": "class", | |
"qname": "mx.utils.URLUtil", | |
"baseClassname": "" | |
, | |
"description": "The URLUtil class is a static class with methods for working with full and relative URLs within Flex.", | |
"tags": [ | |
{ "tagName": "see", | |
"values": ["mx.managers.BrowserManager"]}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Flex 3"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ], | |
"members": [ | |
{ "type": "method", | |
"qname": "getServerNameWithPort", | |
"namespace": "public", | |
"bindable": [], | |
"details": ["static"], | |
"deprecated": {}, | |
"description": "Returns the domain and port information from the specified URL.", | |
"tags": [ | |
{ "tagName": "param", | |
"values": ["url The URL to analyze."]}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Flex 3"]}, | |
{ "tagName": "return", | |
"values": ["The server name and port of the specified URL."]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ], | |
"return": "String", | |
"params": [{ "name": "url", "type": "String"}]} | |
, | |
{ "type": "method", | |
"qname": "getServerName", | |
"namespace": "public", | |
"bindable": [], | |
"details": ["static"], | |
"deprecated": {}, | |
"description": "Returns the server name from the specified URL.", | |
"tags": [ | |
{ "tagName": "param", | |
"values": ["url The URL to analyze."]}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Flex 3"]}, | |
{ "tagName": "return", | |
"values": ["The server name of the specified URL."]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ], | |
"return": "String", | |
"params": [{ "name": "url", "type": "String"}]} | |
, | |
{ "type": "method", | |
"qname": "getPort", | |
"namespace": "public", | |
"bindable": [], | |
"details": ["static"], | |
"deprecated": {}, | |
"description": "Returns the port number from the specified URL.", | |
"tags": [ | |
{ "tagName": "param", | |
"values": ["url The URL to analyze."]}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Flex 3"]}, | |
{ "tagName": "return", | |
"values": ["The port number of the specified URL."]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ], | |
"return": "uint", | |
"params": [{ "name": "url", "type": "String"}]} | |
, | |
{ "type": "method", | |
"qname": "getFullURL", | |
"namespace": "public", | |
"bindable": [], | |
"details": ["static"], | |
"deprecated": {}, | |
"description": "Converts a potentially relative URL to a fully-qualified URL. If the URL is not relative, it is returned as is. If the URL starts with a slash, the host and port from the root URL are prepended. Otherwise, the host, port, and path are prepended.", | |
"tags": [ | |
{ "tagName": "param", | |
"values": ["rootURL URL used to resolve the URL specified by the <code>url</code> parameter, if <code>url</code> is relative.", "url URL to convert."]}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Flex 3"]}, | |
{ "tagName": "return", | |
"values": ["Fully-qualified URL."]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ], | |
"return": "String", | |
"params": [{ "name": "rootURL", "type": "String"}, | |
{ "name": "url", "type": "String"}]} | |
, | |
{ "type": "method", | |
"qname": "isHttpURL", | |
"namespace": "public", | |
"bindable": [], | |
"details": ["static"], | |
"deprecated": {}, | |
"description": "Determines if the URL uses the HTTP, HTTPS, or RTMP protocol.", | |
"tags": [ | |
{ "tagName": "param", | |
"values": ["url The URL to analyze."]}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Flex 3"]}, | |
{ "tagName": "return", | |
"values": ["<code>true</code> if the URL starts with "http://", "https://", or "rtmp://"."]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ], | |
"return": "Boolean", | |
"params": [{ "name": "url", "type": "String"}]} | |
, | |
{ "type": "method", | |
"qname": "isHttpsURL", | |
"namespace": "public", | |
"bindable": [], | |
"details": ["static"], | |
"deprecated": {}, | |
"description": "Determines if the URL uses the secure HTTPS protocol.", | |
"tags": [ | |
{ "tagName": "param", | |
"values": ["url The URL to analyze."]}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Flex 3"]}, | |
{ "tagName": "return", | |
"values": ["<code>true</code> if the URL starts with "https://"."]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ], | |
"return": "Boolean", | |
"params": [{ "name": "url", "type": "String"}]} | |
, | |
{ "type": "method", | |
"qname": "getProtocol", | |
"namespace": "public", | |
"bindable": [], | |
"details": ["static"], | |
"deprecated": {}, | |
"description": "Returns the protocol section of the specified URL. The following examples show what is returned based on different URLs: <pre>\\n getProtocol("https://localhost:2700/") returns "https"\\n getProtocol("rtmp://www.myCompany.com/myMainDirectory/groupChatApp/HelpDesk") returns "rtmp"\\n getProtocol("rtmpt:/sharedWhiteboardApp/June2002") returns "rtmpt"\\n getProtocol("rtmp::1234/chatApp/room_name") returns "rtmp"\\n </pre>", | |
"tags": [ | |
{ "tagName": "param", | |
"values": ["url String containing the URL to parse."]}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Flex 3"]}, | |
{ "tagName": "return", | |
"values": ["The protocol or an empty String if no protocol is specified."]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ], | |
"return": "String", | |
"params": [{ "name": "url", "type": "String"}]} | |
, | |
{ "type": "method", | |
"qname": "replaceProtocol", | |
"namespace": "public", | |
"bindable": [], | |
"details": ["static"], | |
"deprecated": {}, | |
"description": "Replaces the protocol of the specified URI with the given protocol. needs to be replaced. or an empty String if the URI does not contain a protocol.", | |
"tags": [ | |
{ "tagName": "param", | |
"values": ["uri String containing the URI in which the protocol", "newProtocol String containing the new protocol to use."]}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Flex 3"]}, | |
{ "tagName": "return", | |
"values": ["The URI with the protocol replaced,"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ], | |
"return": "String", | |
"params": [{ "name": "uri", "type": "String"}, | |
{ "name": "newProtocol", "type": "String"}]} | |
, | |
{ "type": "method", | |
"qname": "replacePort", | |
"namespace": "public", | |
"bindable": [], | |
"details": ["static"], | |
"deprecated": {}, | |
"description": "Returns a new String with the port replaced with the specified port. If there is no port in the specified URI, the port is inserted. This method expects that a protocol has been specified within the URI.", | |
"tags": [ | |
{ "tagName": "param", | |
"values": ["uri String containing the URI in which the port is replaced.", "newPort uint containing the new port to subsitute."]}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Flex 3"]}, | |
{ "tagName": "return", | |
"values": ["The URI with the new port."]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ], | |
"return": "String", | |
"params": [{ "name": "uri", "type": "String"}, | |
{ "name": "newPort", "type": "uint"}]} | |
, | |
{ "type": "method", | |
"qname": "replaceTokens", | |
"namespace": "public", | |
"bindable": [], | |
"details": ["static"], | |
"deprecated": {}, | |
"description": "Returns a new String with the port and server tokens replaced with the port and server from the currently running application. which should be replaced by the port and server from the application.", | |
"tags": [ | |
{ "tagName": "param", | |
"values": ["url String containing the <code>SERVER_NAME_TOKEN</code> and/or <code>SERVER_NAME_PORT</code>"]}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Flex 3"]}, | |
{ "tagName": "return", | |
"values": ["The URI with the port and server replaced."]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ], | |
"return": "String", | |
"params": [{ "name": "url", "type": "String"}]} | |
, | |
{ "type": "method", | |
"qname": "urisEqual", | |
"namespace": "public", | |
"bindable": [], | |
"details": ["static"], | |
"deprecated": {}, | |
"description": "Tests whether two URI Strings are equivalent, ignoring case and differences in trailing slashes.", | |
"tags": [ | |
{ "tagName": "param", | |
"values": ["uri1 The first URI to compare.", "uri2 The second URI to compare."]}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Flex 3"]}, | |
{ "tagName": "return", | |
"values": ["<code>true</code> if the URIs are equal. Otherwise, <code>false</code>."]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ], | |
"return": "Boolean", | |
"params": [{ "name": "uri1", "type": "String"}, | |
{ "name": "uri2", "type": "String"}]} | |
, | |
{ "type": "method", | |
"qname": "hasTokens", | |
"namespace": "public", | |
"bindable": [], | |
"details": ["static"], | |
"deprecated": {}, | |
"description": "Given a url, determines whether the url contains the server.name and server.port tokens.", | |
"tags": [ | |
{ "tagName": "param", | |
"values": ["url A url string."]}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 10", "AIR 1.5"]}, | |
{ "tagName": "productversion", | |
"values": ["Flex 4"]}, | |
{ "tagName": "return", | |
"values": ["<code>true</code> if the url contains server.name and server.port tokens."]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ], | |
"return": "Boolean", | |
"params": [{ "name": "url", "type": "String"}]} | |
, | |
{ "type": "method", | |
"qname": "hasUnresolvableTokens", | |
"namespace": "public", | |
"bindable": [], | |
"details": ["static"], | |
"deprecated": {}, | |
"description": "If the <code>LoaderConfig.url</code> property is not available, the <code>replaceTokens()</code> method will not replace the server name and port properties properly.", | |
"tags": [ | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Flex 3"]}, | |
{ "tagName": "return", | |
"values": ["<code>true</code> if the <code>LoaderConfig.url</code> property is not available. Otherwise, <code>false</code>."]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ], | |
"return": "Boolean", | |
"params": []} | |
, | |
{ "type": "field", | |
"qname": "SERVER_NAME_TOKEN", | |
"return": "String", | |
"namespace": "public", | |
"bindable": [], | |
"details": ["static"], | |
"deprecated": {}, | |
"description": "The pattern in the String that is passed to the <code>replaceTokens()</code> method that is replaced by the application's server name.", | |
"tags": [ | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Flex 3"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ]}, | |
{ "type": "field", | |
"qname": "SERVER_PORT_TOKEN", | |
"return": "String", | |
"namespace": "public", | |
"bindable": [], | |
"details": ["static"], | |
"deprecated": {}, | |
"description": "The pattern in the String that is passed to the <code>replaceTokens()</code> method that is replaced by the application's port.", | |
"tags": [ | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Flex 3"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ]}, | |
{ "type": "field", | |
"qname": "CONTEXT_ROOT_TOKEN", | |
"return": "String", | |
"namespace": "public", | |
"bindable": [], | |
"details": ["static"], | |
"deprecated": {}, | |
"description": "The pattern in the String that is passed to the <code>replaceTokens()</code> method that is replaced by the application's server name.", | |
"tags": [ | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Flex 3"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ]}, | |
{ "type": "method", | |
"qname": "objectToString", | |
"namespace": "public", | |
"bindable": [], | |
"details": ["static"], | |
"deprecated": {}, | |
"description": "Enumerates an object's dynamic properties (by using a <code>for..in</code> loop) and returns a String. You typically use this method to convert an ActionScript object to a String that you then append to the end of a URL. By default, invalid URL characters are URL-encoded (converted to the <code>%XX</code> format). <p>For example: <pre>\\n var o:Object = { name: "Alex", age: 21 };\\n var s:String = URLUtil.objectToString(o,";",true);\\n trace(s);\\n </pre> Prints "name=Alex;age=21" to the trace log. </p>", | |
"tags": [ | |
{ "tagName": "param", | |
"values": ["object The object to convert to a String.", "separator The character that separates each of the object's <code>property:value</code> pair in the String.", "encodeURL Whether or not to URL-encode the String."]}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Flex 3"]}, | |
{ "tagName": "return", | |
"values": ["The object that was passed to the method."]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ], | |
"return": "String", | |
"params": [{ "name": "object", "type": "Object"}, | |
{ "name": "separator", "type": "String"}, | |
{ "name": "encodeURL", "type": "Boolean"}]} | |
, | |
{ "type": "method", | |
"qname": "stringToObject", | |
"namespace": "public", | |
"bindable": [], | |
"details": ["static"], | |
"deprecated": {}, | |
"description": "Returns an object from a String. The String contains <code>name=value</code> pairs, which become dynamic properties of the returned object. These property pairs are separated by the specified <code>separator</code>. This method converts Numbers and Booleans, Arrays (defined by "[]"), and sub-objects (defined by "{}"). By default, URL patterns of the format <code>%XX</code> are converted to the appropriate String character. <p>For example: <pre>\\n var s:String = "name=Alex;age=21";\\n var o:Object = URLUtil.stringToObject(s, ";", true);\\n </pre> Returns the object: <code>{ name: "Alex", age: 21 }</code>. </p>", | |
"tags": [ | |
{ "tagName": "param", | |
"values": ["string The String to convert to an object.", "separator The character that separates <code>name=value</code> pairs in the String.", "decodeURL Whether or not to decode URL-encoded characters in the String."]}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Flex 3"]}, | |
{ "tagName": "return", | |
"values": ["The object containing properties and values extracted from the String passed to this method."]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ], | |
"return": "Object", | |
"params": [{ "name": "string", "type": "String"}, | |
{ "name": "separator", "type": "String"}, | |
{ "name": "decodeURL", "type": "Boolean"}]} | |
] | |
} |