1 Reply Latest reply on Jul 13, 2006 3:10 PM by ntsiii

    Cannot pass Value Using getURL() in Flex 2.0

    meticoolus
      I have pasted a piece of code to pass value using query string,I am sure there wouldn't be any problem with code.But I get error calling getURL() method.

      The error I am getting on compilation is,

      Call to a possibly undefined method getURL.

      4: {
      5: getURL("QueryStringSample.mxml");
      6: }

      I also tried giving entire url as " http://localhost:8080/Test/QueryStringSample.mxml", since I am running the application using local Tomcat server.both the mxml apps,That is, calling.mxml(PassParam.mxml) and called.mxml(QueryStringSample.mxml) are in same package/Folder (Test).
      what is the cause for this probblem .

      my code..

      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" >
      <mx:Script>
      function passVal():void
      {
      getURL("QueryStringSample.mxml");
      }

      </mx:Script>

      <mx:VBox>
      <mx:HBox>
      <mx:Label text="Name: " />
      <mx:TextInput id="nameInput" />
      </mx:HBox>
      <mx:HBox>
      <mx:Label text="Hometown: " />
      <mx:TextInput id="homeTownInput" />

      </mx:HBox>
      <mx:Button label="pass param" click="passVal();" />
      </mx:VBox>
      </mx:Application>

      Thanks in Advance.
        • 1. Re: Cannot pass Value Using getURL() in Flex 2.0
          ntsiii Level 3
          Now that the Flex 2.0 forums are all set up, it is time to start using them for 2.0 questions. So in the future, don't post 2.0 questions here.

          In the meantime, getURL has been changed to navigateToURL(). See the docs for details.

          Also, I think you are mixing Flex 1.5 and 2.0. 2.0 does not use a server, and you do not call mxml file directly. Instead you compile the swf with FlexBuilder or the command line compiler, and call the html wrapper.

          Tracy