1 Reply Latest reply on Jan 4, 2008 10:04 PM by Gregory Lafrance

    External site linkage

    adertraining Level 1
      okay I am super new to Flex, so please forgive my slowness and ignorance.

      I am trying to design a site that will allow users to access external websites (like on a link page).

      The HTML syntax for this is <a href="www.googl.com">Google Search</a>

      In my code I tried:
      <mx:HTTPService id="nappylo" url="' http://www.nappylocs.com'"> <mx:Text text="Nappy Locs" color="#d58743" y="123" x="24" fontSize="12" fontWeight="bold"/>
      </mx:HTTPService>

      * What am I doing wrong ... help me please!
        • 1. Re: External site linkage
          Gregory Lafrance Level 6
          Use URLRequest together with navigateToURL.

          _self Specifies the current frame in the current window.

          _blank Specifies a new window. This new window acts as a pop-up window in the client's browser, so you must be aware that a pop-up blocker could prevent it from loading.

          _parent Specifies the parent of the current frame.

          _top Specifies the top-level frame in the current window.
          ------------------- sample code ------------------------
          <?xml version="1.0"?>
          <!-- wrapper/SimplestNavigateToURL.mxml -->
          <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml">
          <mx:Script><![CDATA[
          import flash.net.*;
          public function openNewWindow(event:MouseEvent):void {
          var u:URLRequest = new URLRequest(" http://www.nappylocs.com");
          navigateToURL(u,"_blank");
          }
          ]]></mx:Script>
          <mx:Button label="Nappy Locs" click="openNewWindow(event)"/>
          </mx:Application>