|Published (Last):||18 March 2005|
|PDF File Size:||16.63 Mb|
|ePub File Size:||1.94 Mb|
|Price:||Free* [*Free Regsitration Required]|
Looks up a class that previously had an alias registered through a call to the registerClassAlias method. This method does not interact with the flash. String — The alias to find. Opens or replaces a window in the application that contains the Flash Player container usually a browser.
Attackers may try to manipulate these external sources to perform attacks such as cross-site scripting. Therefore, developers should validate all URLs before passing them to this function. Good data validation for URLs can mean different things depending on the usage of the URL within the overall application.
In Flash Player 10 and later running in a browser, using this method programmatically to open a pop-up window may not be successful. Various browsers and browser configurations may block pop-up windows at any time; it is not possible to guarantee any pop-up window will appear.
However, for the best chance of success, use this method to open a pop-up window only in code that executes as a direct result of a user action for example, in an event handler for a mouse click or key-press event. If the syntax appears to be invalid, the POST operation is subject to the security rules applied to uploads.
We have reduced support for legacy browsers.
In AIR, on mobile platforms, the sms: URI schemes are supported. The URL syntax is subject to the platform conventions.
For example, on Android, the URI scheme must be lower case. When you navigate to a URL using one of these schemes, the runtime opens the URL in the default application for handling the scheme. Thus, navigating to tel: A separate application or utility, such as a phone dialer must be available to process the URL. If you do not specify a value for this parameter, a new empty window is created.
The other values don’t apply.
When code in a SWF file that is running in the local-with-filesystem sandbox calls the navigateToURL function and specifies a custom window name for the window parameter, the window name is transfered into a random name. Within the same session until you close the containing browser windowif you call the function again and specify the same name for the window parameter, the same random string is used.
When you encode an object into AMF, this function saves the alias for its class, so that you can recover the class when decoding the object. If the encoding context did not register an alias for an object’s class, the object is encoded as an anonymous object.
AS3: Linking to Another Webpage
Similarly, if the decoding context does not have the same alias registered, an anonymous object is created for the decoded data. The encoding and decoding contexts do not need to use the same class for an alias; they can intentionally change classes, provided that the destination class contains all of the members that the source class serializes.
String — The alias to use. Class — The class associated with the given alias. Sends a Navigatdtourl request to a server, but ignores any response. To examine the server response, use the URLLoader.
You cannot connect to commonly reserved ports.
Retrieving Data from Server Returns Class — The class associated with the given alias. If not found, an exception will be thrown. Throws ReferenceError — The alias was not registered. For additional security, you may also choose to validate the path of the URL navigahetourl to validate that the URL conforms to the RFC guidelines For example, the following code shows a simple example of performing data validation by denying any URL that does not begin with http: The following example opens the URL http: Example provided by ActionScriptExamples.
The following example illustrates the syntax for launching the device telephone dialer with a specified number. The following example illustrates the syntax for launching the device text message application with a specified receipient. The following example illustrates the syntax for launching the Android Market app.
The search parameter is set to find the Flash Player app.
Kornesh Kanan: getURL in ActionScript 3 (navigateToURL)
Throws TypeError — If either parameter is null. This example uses the registerClassAlias function to register an alias com. Because an alias is registered for the class, the object is able to be deserialized as an instance of ExampleClass, and the code outputs true. If the registerClassAlias call were removed, the code would output false. The POST operation must be performed in response to a user-initiated action, such as a mouse click or key press.
You can avoid this situation by reclassifying this SWF file as local-with-networking or trusted. SecurityError — You cannot connect to commonly reserved ports. Class Looks up a class that previously had an alias registered through a call to the registerClassAlias method.
ReferenceError — The alias was not registered. You can enter the name of a specific window or use one of the following values: IOError — The digest property of the request navigateoturl is not null. Local untrusted SWF files may not communicate with the Internet.
A navigate operation attempted to evaluate a scripting pseudo-URL, but the containing document usually an HTML document in a browser is from a sandbox to which you do not have access.
You cannot navigate a window with a nondefault name from within a SWF navigatstourl that is in the local-with-filesystem sandbox. Error — If the method is not called in response to a user action, such as a mouse event or keypress event.
TypeError — If either parameter is null.