3 Replies Latest reply on Mar 13, 2008 4:28 AM by SujitG

    Some questions

    |>AoA<|_killa Level 1
      I've stumbled across Flex while I was looking at using Ajax for a project. Because Flex seems to be alot more "responsive", i've chosen to go with it. But I have some questions before I begin working on the project:

      1. How can I use different screens/forms/... For example if I were to create a login screen, and the user logs in, it would go to the next screen.

      2. Is it possible to make/use a control array, like you can in C# (create controls on runtime)

      3. Is there any way that I can increase/decrease the height of the window(s). This would be useful if there are alot of controls to be added at runtime

      4. I've noticed that you can't use Flex to directly access a mysql database, but you can use PHP/asp.net/... How can I protect the PHP that selects/inserts information, so that only my flex project will be able to use it.

      5. Is it possible to do some calculations with a control from the control array like this:

      control[5].Text = control[0].Text * 6

      But then with something like eval() in PHP. Cause the formula are stored in a DB and need to use variables entered by the user.
        • 1. Re: Some questions
          SujitG Level 2
          1. Check out view states
          2.Yes, you can create controls at runtime. You can also create arrays containing controls
          3. You can try layout containers
          4. In your PHP you can try checking the domain from which the request is coming from. (Not sure if there are better solutions)
          5. This should be possible, i haven't tried this.

          In case you did not visit the URL included below, please visit.
          Flex 3 Help

          Hope this helps.
          • 2. Some questions
            |>AoA<|_killa Level 1
            Thanks for the reply :)

            Guess the first 4 questions are answered.

            For the fifth: maybe I could make a php page that I call from flex, which does the eval thingy?

            Also what's the difference between a module and a component?
            • 3. Re: Some questions
              SujitG Level 2
              In short

              Module is something which you will load on the run. i.e module is compiled as a individual SWF (not included in the main application SWF). The components are compiled into the main application SWF.

              Module is used for separating your code and component is a way in which you can reuse a code.

              Hope this helps.