views:

52

answers:

2

Looking to start a project that would require me to use Flash or Flex (I have not worked with either of these yet, yikes!!!). Flash would be the front end user interface that needs to display items pulled from a MySQL Database (I was thinking ajax via jQuery but open to suggestions). My question is, What would be the best approach for something like this?

High level

Flash calls to display image through ajax/php from Db

I don't know how to code the Flash part, any tutorials that kinda sound like what I'm doing? suggestions? thoughts? other ideas?

Side Note: The database table will contain text that describes the image being passed to flash, so I would like to display both the text and image.

Thanks for any advice/help, --Phill

A: 

Here's a tutorial about setting up flash to work with PHP & MySQL: link

GSto
Thanks looks simple enough, but I'm sure I will have more questions ;)
Phill Pafford
what about FLEX, I hear this might be more suited as to what I'm looking for?
Phill Pafford
Flex would probably be helpful for the UI, and maybe RPC, but for the most part, if you build it all in Flash or if you decide to use the Flex framework, it won't much change the retrieval of data from the database.
Alex Jillard
any goog flex/php frameworks?
Phill Pafford
you can use flash/php framework in flex too. flex itself is a framework in flash.
Amarghosh
+1  A: 

I'd recommend you try AMFPHP or ZendAMF. Both of these use AMF3 (which requires you to use Actionscript 3/FlashCS3+), and it is one of the quickest ways to get data into Flash.

You could also use php to generate an xml file and just request that url in Flash to load up the XML. You can also use ajax like you said, but it's probably going to be the slowest method open to you, unless you're working with very small data sets.

Regardless of the method you choose, I'd suggest you use Actionscript 3. It's much faster and if you use XML, it'll be a life saver.

Alex Jillard
So your recommendation is to use PHP to build XML (on the fly) and Flash read that?
Phill Pafford
Yes, that's an option you have. It won't be as fast as using AMF though. My first recommendation is to use AMF, then if you can't get that to work, or don't want to, have PHP generate the XML file. Again, depends on the size of the dataset. Large XML files can cripple flash.
Alex Jillard
I'm thinking 12 to 18 images it needs to pull but these images are dynamic as well so not the same images will be pulled every time. I'm going the route of AMFPHP which looks like something I can use. Thanks. Another side question, would flex be better for this or would you stick with flash?
Phill Pafford
It really doesn't matter. I'd check both out and decide which you are more comfortable with, or which might be more useful to have knowledge in down the road. Just keep in mind both are AS3, so there isn't a huge difference between the two. Flex is just a framework for AS3, with some extra XML based syntax for describing UI and whatnot.
Alex Jillard