2 Replies Latest reply on Aug 10, 2006 10:06 PM by francois-yanick

    URL Parameters


      I am new to Flex and as it is now not anymore a cost issue, we are trying to get a better and deeper look at this technology to built our next web projects/applications.

      As I tried to convert some of our work in ColdFusion, I did not found anything YET that is can deal with URL parameters. In coldfusion, for example, we can deal with URL.[variablename]. In our case, we had used this method previously to deal with the language (such as English, French and Spanish). How to retrieve and deal with this kind of information in Flex?

      In another word, if I call http://mywebsite/home.mxml?language=english. How I can use interactivity with the variable "language" in the URL to see which language has been chosen by the user?

      Thank you,
        • 1. Re: URL Parameters
          ntsiii Level 3
          Ok, I have not actually done this in 2.0, but here goes.

          First in 1.5, you could do what you show because the mxml file was on a servr, and that server coud take your parameters, and use them when it generated the html wrapper to create and pass "flashvars" into the SWF. In 1.5 the values would go into public variables witht he same name as the parameter/flashvar.

          In 2.0, the same thing can be done, but since you don't have a Flex server(unless you use FDS), you must call an asp or jsp or some other dynamic html generation platform, which can take the parameters and build the object/embed tag with the flashvars. You access the values in flex using a special object (parameters? arguments? I don't exactly recall.)

          • 2. Re: URL Parameters
            francois-yanick Level 1
            After few experiences, I found that it is possible to include more than one compiled SWF (compiled with Flex technology) so I am now able to navigate through normal ColdFusion page and than, have a better management on URL parameters.

            Thank you for your in as it serve me to look for another solution than the SWF itself.