2 Replies Latest reply on Jul 16, 2009 6:05 AM by megharajdeepak

    How to use URL parameters in Flex?


      Hello Everyone,


      I wanted to know how can the parameters passed in a URL be used in our Flex application. I searched in the forum and tried these links:






      In the second link, this is the solution provided:


         1. // if we've detected an acceptable version
         2. // embed the Flash Content SWF when all tests are passed
         3. AC_FL_RunContent(
         4.         "src", "ffManager",
         5.         "width", "100%",
         6.         "height", "100%",
         7.         "align", "middle",
         8.         "id", "ffManager",
         9.         "quality", "high",
        10.         "bgcolor", "#869ca7",
        11.         "name", "FFManager",
        12.         "allowScriptAccess","sameDomain",
        13.         "type", "application/x-shockwave-flash",
        14.         "pluginspage", "http://www.adobe.com/go/getflashplayer",
        15.         "flashvars","username=dvega"
        16. );


      private function init():void {
          // grab the username so we can track who is logged in
          [Bindable] private var:username= Application.application.parameters.username;


      But here, I am getting the hardcoded value (ie.,dvega) as the data inside my flex application. Instead I would need the dynamic data that is passed through the URL. For Ex: if I use the URL,

      I need would need to use the name 'Arush' inside the application. Can you please help me on how and what part of the code is to be modified?


      Thank you,

      Warm regards,