3 Replies Latest reply on May 8, 2007 12:20 AM by M. Huisman

    Loading web page in Flex App

    thedex1
      Hi,

      How are all of you. Actually I want to load webpage for example www.xmy.com/index.php into my Flex application. Should I use htmlText component to load page into. Also can you please tell me the procedure to load any URL. I shall be very thankful to you.

      Best regards,
      ..::DW
        • 1. Re: Loading web page in Flex App
          Rahul Mainkar
          Hi,
          The following code enables you to load any specified url when the button is clicked in your flash application.
          Put the function goURL () into <mx: script> while running the application.

          public function goURL( uri:String ):void
          {
          import flash.net.navigateToURL;
          navigateToURL( new URLRequest( uri ) , "_blank" )


          }


          <mx:Button id="myBtn" click="goURL(' http://www.adobe.com")/>

          I hope this have solved your querry.
          • 2. Re: Loading web page in Flex App
            thedex1 Level 1
            Hi Rahul,

            Thank you for your reply. Well you solve my problem by 50%. I need to as well if it is possible to load the webpage within Flex component such as TextArea or htmlText component. When we use goToURL() function, it will open the URL in a web browser such IE or Firefox(whichever is installed). I mean to ask you if Flex support built-in web browser?

            I shall be very thankful to you.

            Best Regards
            ..::DW
            • 3. Re: Loading web page in Flex App
              M. Huisman Level 1
              quote:

              Originally posted by: thedex1
              Hi Rahul,

              Thank you for your reply. Well you solve my problem by 50%. I need to as well if it is possible to load the webpage within Flex component such as TextArea or htmlText component. When we use goToURL() function, it will open the URL in a web browser such IE or Firefox(whichever is installed). I mean to ask you if Flex support built-in web browser?

              I shall be very thankful to you.

              Best Regards
              ..::DW

              Flex only supports a build-in browser trough the Apollo runtime.