all groups > flash data integration > march 2007 >
You're in the

flash data integration

group:

Integrate Flash graphic with MySQL???


Integrate Flash graphic with MySQL??? bob_reist
3/13/2007 8:09:51 PM
flash data integration:
I am a DBA and I provide data to the developers at my company in XML format.
The developers create Flash graphics and use the XML to populate data
variables. I want to start requiring the developers to make calls directly to
my MySQL databases so anytime i have to make a change to the underlying data, I
don't get stuck generating an updated XML file for the developers.

My developers tell me a Flash graphic cannot make a call directly to a mySQL
database. They say Flash has to reference a page in which variables are
defined, such as an XML, PHP, ASP page etc. This page, they say, is generated
from database info, but Flash does not directly make the call to the database
.... that another programming technology (XML, PHP, etc.) does and has to parse
the information, making it available to Flash.

Can anyone weigh in on this and if so, point me to anything that would show
how a Flash graphic can make a call directly to mySQL and get back the XML it
needs ... heck, I can create the view so the database has the XML waiting for
the call ... I just need to know if this is doable so I can better work with
our developers.

Thanks!
:confused;
Re: Integrate Flash graphic with MySQL??? FlashGen
3/15/2007 12:00:00 AM
On 2007-03-13 20:09:51 +0000, "bob_reist" <webforumsuser@macromedia.com> said:

[quoted text, click to view]

Hi Confused. To keep this clear here are your options:

Content developed in Flash version 8 or lower will require some form of
middleware solution to extract data from your mySQL DB and pass it to
Flash. This could PHP, ASP, CGI etc. The reason behind this is that the
version of the language these version of Flash use does not have
support for greater levels of integration beyond traditional web
paradigms

When Flash 9 is released (and this also applies to the already
available Flex 2) the version of Actionscript (3.0) has support for
binary socket development. Therefore it should be possible to create a
native mySQL connector with this version of Actionscript. Thus removing
the need to have scripts as a 'go-between' .

However, the Flash 9 VM is relatively new and therefore you may not get
buy-in from the business organization to move to a new version straight
away.

--
regs
m

------------------------------------
Mike Jones
FlashGen.Com
------------------------------------
w./ www.flashgen.com
e./ forum_postsATflashgenDOTcom
b./ blog.flashgen.com
------------------------------------
Re: Integrate Flash graphic with MySQL??? tonyhigham
3/15/2007 3:02:46 AM
This is definitely doable. With flash remoting, your flash file can send a
query to php, which will execute the query and return the results. Although it
does need PHP for the middle bit, the queries can be built and the data parsed
entirely in flash, with PHP just acting as a 'dumb' dispatcher.

That being said, with the release of Flash 9 and AS3, flash is able to make
calls to the MySQL DB directly.

For instance, for classroommanager.org, I build queries in Flash based on user
interaction and send ALL queries (SELECT, ALTER, CREATE, UPDATE, DELETE, etc)
to a single PHP function, which executes the query, then returns the data to
flash in a tidy callback that uses actionscript arrays, so I don't even have to
deserialize any data.
Re: Integrate Flash graphic with MySQL??? MotionMaker
3/15/2007 5:40:04 PM
Create a script that will take the SQL statement and dumps the query results to
an generic XML format such as using the field names as the tag names and CDATA
for the values. As a DBA you probably already know of such canned scripts.

Be sure you sanitize the SQL statements if you can to SQL avoid attacks.

Now the Flash developers can send the SQL statement via a HTML form and see
the XML returned and change their programming accordingly.
AddThis Social Bookmark Button