4 Replies Latest reply on Feb 3, 2007 8:49 PM by davidmedifit

    Need help

    Imlucky7
      I m new in Flex Application. During a Flex Application Developement I am facing a problem.

      I have two mxml files.
      a) Login.mxml, b) HomePage.mxml
      In Login.mxml, users will enter his login id and password.
      After successful authentication check user can move to HomePage.mxml

      I want to forward this login id(parameter) into HomePage.mxml file for further execution. Can anyone tell me how can I pass a parameter from one mxml file to another mxml file.
        • 1. Re: Need help
          187_2007 Level 1
          There really is a lot out there on the web that can help you. This is a basic fundamental thing. If you are doing a login/homepage example you can use States to handle it. Check around and if you cannot find anything, come back and let's work it out.
          • 2. Re: Need help
            Imlucky7 Level 1
            Thank You for reply..

            I am not completely sure whether you are talking about Satate Change or not.
            If you are talking about state change, it will not solve my problem. Because "Login.mxml" and "HomePage.mxml" are two different mxml:Aplication. I want to pass parameter b/t two different mxml:Application page.

            I will be very greatfull, if you post few corresponding link where it is described through example.
            • 3. Re: Need help
              Robert S Level 1
              You will want to learn first and foremost about creating and dispatching events and creating event listeners... I used a custom event to bubble the data from my login-form to the application form. This is the most common way to do this. Events are the primary way to move data from one component to the next (MXML Files Being Components in your app).

              You can create a work around by having a public variable in the Application and then referencing the application for the public variable, but this is not the recommended practice.
              • 4. Re: Need help
                davidmedifit Level 1
                If you look at Adobe labs, you may be able to find examples of passing parameters from one Flex app to another. An alternative is to set a variable at the browser level, and pass the parameters that way.

                I'll make a suggestion - take it or leave it - put the authentication in "homepage.mxml". Reduce the complexity, increase the security.

                Cheers,

                David