6 Replies Latest reply on May 14, 2007 6:38 PM by splitzer

    how to get url parameters?

    splitzer Level 1
      I tried to implement the sample provided in help section of flex, but for some reason it wont work. Isnt there a easier way to get url variables in flex? Also, the problem is that i already have funtion which is being called by creationComplete, how can i implement another function which is this initVars()?

      <?xml version="1.0"?>
      <!-- wrapper/ApplicationParameters.mxml -->
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" creationComplete="initVars()">
      // Declare bindable properties in Application scope.
      public var myName:String;
      public var myHometown:String;

      // Assign values to new properties.
      private function initVars():void {
      myName = Application.application.parameters.myName;
      myHometown = Application.application.parameters.myHometown;

      <mx:Label text="Name: "/>
      <mx:Label text="{myName}" fontWeight="bold"/>
      <mx:Label text="Hometown: "/>
      <mx:Label text="{myHometown}" fontWeight="bold"/>

      Thank you,