Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Dec 2010
    Location
    Washington State
    Posts
    33
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Calling from MySQL into Flash Builder

    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:
    Code:
    			<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

  • #2
    New Coder
    Join Date
    Dec 2010
    Location
    Washington State
    Posts
    33
    Thanks
    4
    Thanked 0 Times in 0 Posts
    No answers?

  • #3
    New Coder
    Join Date
    Jan 2012
    Location
    Columbus, Ohio, U.S.A
    Posts
    41
    Thanks
    0
    Thanked 8 Times in 8 Posts
    Hi,

    I was actually waiting for someone else to answer that may have more experience with this (as I've only done traditional html/php with a mySql database)

    The couple times I did use wamp/mamp with FLEX, I just simply copied everthing from my release build into the place where mamp can see them (wamp/www)

    and as far as bringing/binding the data back into Flex, have you thought of making xml in php before it gets brought to Flex? That's probably the best way I know of, that and bring them in as value objects through your arraycollection. IE: send your http request out, make a complete event, and then populate your arraycollection with the vo's. You might already be doing that though, and for that I apologize.

    Hopefully somebody can weigh in more on this subject. Have you tried asking on stackoverflow or actionscript.org?

    -Adam


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •