Link to an External URL : URLRequest « Development « Flex






Link to an External URL

          
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
    <mx:Script>
        
            import flash.net.navigateToURL;
            private function goToURL() : void
            {
                navigateToURL( new URLRequest( newUrl.text ),target.selectedItem as String );
            }
      
    </mx:Script>
    <mx:TextInput id="newUrl" top="10" left="10" right="10" text="http://www.google.com/" />
    <mx:ComboBox id="target" top="40" left="10" dataProvider="{ [ '_blank', '_self' ] }" /> 
    <mx:Button label="Go" left="10" top="70" click="goToURL()"/>
</mx:Application>

   
    
    
    
    
    
    
    
    
    
  








Related examples in the same category

1.Use URLRequest for google financeUse URLRequest for google finance
2.Use navigateToURL and URLRequestUse navigateToURL and URLRequest
3.Passing parameter to URLRequest
4.Use Loader to load a URLRequest
5.Use URLRequest to load a file from local file systemUse URLRequest to load a file from local file system
6.Pass in parameter to URLRequestPass in parameter to URLRequest
7.Pass a URLRequest object to the navigateToURL()Pass a URLRequest object to the navigateToURL()
8.Append variables to the request string before Sending data with a URLRequest objectAppend variables to the request string before Sending data with a URLRequest object
9.Use data property of URLRequest to add URL variables to a GET or POST requestUse data property of URLRequest to add URL variables to a GET or POST request
10.Use URLVariables to append variable to a URLRequestUse URLVariables to append variable to a URLRequest
11.Use navigateToURL() method with basic JavaScript functions in the URLRequest itselfUse navigateToURL() method with basic JavaScript functions in the URLRequest itself
12.Open a new browser windowOpen a new browser window
13.Navigate With Get MethodNavigate With Get Method
14.When passing parameters by using the navigateToURL() method, you must enclose each parameter in quotation marksWhen passing parameters by using the navigateToURL() method, you must enclose each parameter in quotation marks
15.Email With NavigateToURL methodEmail With NavigateToURL method
16.Defines a simple URL to navigate toDefines a simple URL to navigate to
17.Opening multiple windows with the navigateToURL() method