2 Replies Latest reply on Jan 31, 2012 7:40 PM by drkstr_1

    Flash/Flex Help

    DGKim

      Okay, so I've got a design from Flash Catalyst imported into Flash Builder. The design is great and all, but I need to load data from the MySQL database... that is, dynamically into a data list.

       

      I've looked at every tutorial, and I understand what they're saying, but I really am struggling with the most basic steps! I have a list of a few problems/things I've done.

       

      Things I've done:

      1. I've installed WAMP for local debugging.

      2. I've gotten the Zend framework in the wamp/www folder.

       

      Problems/Questions:

      1. For some reason, my Flash Import won't find/create a Main.html to debug with. Do I need to choose the one in the original project file?

      2. Where is the best place to create a new project folder? Right now, they're under Adobe Flash Builder with PHP 4.5 (or something like that). Do they need to be in wamp/www?

      3. How exactly can I bind the data to parts on the data list? For example, how can I specify that a certain row from the result will go to a certain item of text? (i.e. $row['event_name'] would be in the text1 field). Here's the code for the dummy data:

       

                  <fx:DesignLayer d:userLabel="Data">

                      <fx:DesignLayer d:userLabel="one">

                          <s:List skinClass="components.DataList4" x="175" y="454">

                              <s:ArrayCollection>

                                  <fx:Object image2="@Embed('/assets/images/main/Layer 23.png')" text1="Orchestra Concert" text2="CVHS Theatre" text3="Janurary 18" text4="7:00 - 8:00"/>

                                  <fx:Object image2="@Embed('/assets/images/main/Layer 23.png')" text1="Wrestling" text2="CVHS Gym" text3="Janurary 19" text4="7:00 - 9:00"/>

                                  <fx:Object image2="@Embed('/assets/images/main/Layer 23.png')" text1="JV Basketball" text2="CVHS Gym" text3="Janurary 20" text4="4:00 - 5:15"/>

                                  <fx:Object image2="@Embed('/assets/images/main/Layer 23.png')" text1="Frosh Basketball" text2="Ferris Gym" text3="Janurary 20" text4="5:30 - 7:30"/>

                                  <fx:Object image2="@Embed('/assets/images/main/Layer 23.png')" text1="Varsity Basketball " text2="CVHS Gym" text3="Janurary 20" text4="5:30 - 8:45"/>

                              </s:ArrayCollection>

                          </s:List>

                      </fx:DesignLayer>

                  </fx:DesignLayer>

       

      4. Why can't Flash Builder find my project when I try to enable PHP support? The only one that comes out is RemoteSystemsTempFiles. Is it because there's no gateway.php? And if there is supposed to be a gateway.php, how come Flash Builder doesn't automatically create one where I've decided to create the project?

      5. One way of getting MySQL data is by going to the design mode and whatnot but how could I do it directly in the mxml code?

      6. How can I create a php method that will return multiple variables as different variables, instead of all of them being put in an array like the generated files?

       

      I know this is a lot of questions, so I'd appreciate any one of these questions being answered.

       

      Thanks!

      DG Kim

        • 1. Re: Flash/Flex Help
          DGKim Level 1

          Hey hate to bump, but I still haven't gotten any answers for this...

          • 2. Re: Flash/Flex Help
            drkstr_1 Level 4

            1. For some reason, my Flash Import won't find/create a Main.html to debug with. Do I need to choose the one in the original project file?

            I don't understand the issue. Is there a reason why debugging with the default index.html is not an option? Can you elaberate more on what you are trying to achieve in the end?

            2. Where is the best place to create a new project folder? Right now, they're under Adobe Flash Builder with PHP 4.5 (or something like that). Do they need to be in wamp/www?

            The best place to keep your projects are in what's called a "Workspace." The folder you described is the default Workspace used by flash builder, but I actually have my own top level folder where I keep workspaces that I can easily switch to. Each workspace holds a set of dependent projects that are linked together, in one way or another, to create a final project build. I actually have Eclipse extensions for Java and PHP development installed in my flash builder, so my workspaces usually contain server-side projects along side of my Flex projects.

             

            You would not want to put projects in your www directory. This is your build directory, and should only contain the final output of the project build (the "bin" files).

            3. How exactly can I bind the data to parts on the data list? For example, how can I specify that a certain row from the result will go to a certain item of text? (i.e. $row['event_name'] would be in the text1 field). Here's the code for the dummy data:

            Can you post a full test case with as little code as possible that demonstrates the problem? Include the end result you are hoping to achieve.

            4. Why can't Flash Builder find my project when I try to enable PHP support? The only one that comes out is RemoteSystemsTempFiles. Is it because there's no gateway.php? And if there is supposed to be a gateway.php, how come Flash Builder doesn't automatically create one where I've decided to create the project?

            You need to provide more info on the steps you are taking, and where your expectations differ from the result.

             

            5. One way of getting MySQL data is by going to the design mode and whatnot but how could I do it directly in the mxml code?

             

            I would suggest going through the section "Get started with Flex and PHP" on this page:

             

            http://www.adobe.com/devnet/flex/flex_php.html

             

            6. How can I create a php method that will return multiple variables as different variables, instead of all of them being put in an array like the generated files?

            This is a great tutorial on setting up the nuts and bolts:

             

            http://www.adobe.com/devnet/flex/articles/crud_flex_php_zend.html