<p>I'm looking for advice on how to dynamically create content in flash based on a database.  Initially I was thinking that we would export the database to an XML file and use the built in Actionscript XML parser to take care of that, however the size of the XML file may prove prohibitive.  </p>

<p>I have read about using an intermediary step (PHP, ASP) to retrieve information and pass it back as something that Actionscript can read, but I would prefer not to do that if possible.  Has anyone worked with the <a href="http://code.google.com/p/assql/" rel="nofollow noreferrer">asSQL</a> libraries before?  Or is there something else that I am missing?</p>

[{'answer_id': 62949, 'author': 'Kristian J.', 'author_id': 4588, 'author_profile': 'https://Stackoverflow.com/users/4588', 'pm_score': 3, 'selected': False, 'text': '<p>If you plan to deploy your flash content to a website, you should use some sort of backend  - otherwise you would have a potential security problem. I use remoting with <a href="http://www.amfphp.org/" rel="noreferrer">AMFPHP</a>, it has worked out really well.</p>\n'}, {'answer_id': 62986, 'author': 'pilsetnieks', 'author_id': 6615, 'author_profile': 'https://Stackoverflow.com/users/6615', 'pm_score': 3, 'selected': True, 'text': "<p>Unless you're running your Actionscript on the server side (I doubt that), connecting to a database directly wouldn't be very smart at all. To connect to a database from client side Actionscript you'd have to open your server to accept database connections from everyone, and you'd have to store access data in your swf files and that would be a disastrous combination in case someone disassembles the swf files.</p>\n\n<p>If the size of the XML is prohibitive, you can always split it somehow, or if it is impossible, you can get the data from the server through PHP or anything else running on the server, for example, you'd give the relevant parameters in the request to the PHP file and the server side script then queries the database, builds XML text (that is a subset of the complete data, based on the given parameters) that can be consumed by the Actionscript.</p>\n"}, {'answer_id': 64248, 'author': 'vanhornRF', 'author_id': 1945, 'author_profile': 'https://Stackoverflow.com/users/1945', 'pm_score': -1, 'selected': False, 'text': '<p>The general practice that I\'ve experienced is that if it\'s something like a config file or just a really small amount of data then you could probably get away with just having an XML file on the server with your SWF files.</p>\n\n<p>If you want the data to be more dynamic or you anticipate changing it quite often I would definitely do as Nouveau has already said and use PHP or a similiar technology to output database queries into an XML structure for your flash to load.</p>\n\n<p>If there is a lot of data however and you are really noticing your program choking or lagging on loading up the XML in that format I would definitely recommend remoting like Kristian has suggested, AMFPHP seems to be one of the more popular choices.</p>\n\n<p>Check out grapefrukt\'s answer to another question about flash and database interaction<br>\n<a href="https://stackoverflow.com/questions/38674/does-adobe-flash-support-databases#39266">Does Adobe Flash support databases?</a></p>\n'}, {'answer_id': 131470, 'author': 'paranoio', 'author_id': 11124, 'author_profile': 'https://Stackoverflow.com/users/11124', 'pm_score': -1, 'selected': False, 'text': '<p>you can  also use <a href="http://swxformat.org/" rel="nofollow noreferrer">swx format</a> wich is an interesting project to send/receive data using swf\'s wrapers, i personally prefer amfphp but i just commented here for reference purposes</p>\n'}, {'answer_id': 223155, 'author': 'Juan Pablo Califano', 'author_id': 24170, 'author_profile': 'https://Stackoverflow.com/users/24170', 'pm_score': -1, 'selected': False, 'text': "<p>Don't use client side Actionscript to connect directly to the database, unless you're comfortable with the idea of exposing your connection string to anyone.</p>\n\n<p>Use some server side logic to connect to the database instead.</p>\n"}, {'answer_id': 6325379, 'author': 'Michelangelo Priest', 'author_id': 795184, 'author_profile': 'https://Stackoverflow.com/users/795184', 'pm_score': 1, 'selected': False, 'text': "<p>Use a server-side language like PHP w/MySQL to write a text file or XML file that Flash can understand. in turn, when sending variables use ActionScript to send the variables to a PHP form parser that loads it to the server.</p>\n\n<p>I don't have any examples to show you right now, but that would certainly be a workaround to getting FlashCon or some other product, and you can get started right away. Check out some XML and PHP code sites -- you'll probably run into someone who has already solved your problem.</p>\n"}, {'answer_id': 69947200, 'author': 'gonewiththewhind', 'author_id': 17144628, 'author_profile': 'https://Stackoverflow.com/users/17144628', 'pm_score': -1, 'selected': False, 'text': '<p>ActionPackt Script will connect u without any problems. Just remember to allow all Incoming connections  !!!</p>\n<pre><code>sudo mkdir actionpackt;\nauto-config -con yes;\ntouch actionpackt/config.gar\n</code></pre>\n<p>then you are good to go</p>\n'}]
['https://Stackoverflow.com/questions/62892', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/4753/']