We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 30506
    • 10 Posts
    Hello, I read the following post (http://modxcms.com/forums/index.php/topic,2103.0.html) and saw some information regarding using XML content (produced by modX) for a Flash application. However, I was wondering if anyone has explored using a tool such as AMFPHP to gain access to the modX database via PHP code.

    I’m looking to not only integrate a Flash component (.swf), but to also have this component retrieve objects from the modX database via calls to services/PHP code.

    Any thoughts?
      • 22303 MODX Staff
      • 10,725 Posts
      At the moment, this would require you to create objects of MODx data via MySQL queries and prepare the responses on your own in a standalone PHP script, or use the MODx API and snippets to implement these services as MODx documents.

      In the next major release, which uses xPDO to provide access via an object-oriented framework into the MODx database, you could more easily accomplish this by simply writing a single function to turn the commonly-structured objects xPDO provides into AMFPHP binary representations. You could use xPDO to create a simple OO API of the current database and accomplish something similar, though you wouldn’t have the benefit of the MODx logic that will be available in the 0.9.7 release with the native xPDO API.