Let Flash use WordPress content
Last week I set up a fresh WordPress system for a client to function as a Content Managament System.
This week I am trying to load content that is managed and stored by WordPress in to a Flash front-end.Currently our client has a Flash application running on the frontpage of his site which allow a user to browse content (that’s also available as html) in an appealing way. Currently this Flash application gets it’s content from a static .xml file.
But now that the new site uses WordPress as a CMS tool, it’s time to rewrite this (static) Flash application so it loads categories and related posts from WordPress and display it in a more dynamic way.
Goal
Here is a quick list of things I want to achieve:
- The Flash application outputs all categories (except for the standard ‘Uncategorized’ category)
- For every category flash retrieves the five most recent posts (including custom key value pairs defined within WordPress)
- The Flash application cycles through all the different categories and posts inside those categories, displaying photos and/or video which are defined by using the Custom Fields feature in WP.
The Front-End
For the front-end, this is how I set up my project:
- A Actionscript 3.0 only project set up using Flex Builder 3.
- Using Flash CS4 to create all my visual assets and export those as .SWC components so I can import them into my AS3 project.
- The PureMVC framework for creating powerful, manageable applications.
The Back-End
Obviously for the back-end, in this case, I use WordPress. WordPress stores all it’s content in a MySQL database.
- WordPress comes with an XML-RPC implementation which allows you to display and manipulate content in a (custom made) client application through a set of PHP functions (API).
Tim Wilsons PressConnect
After playing a lot with the XML-RPC functionality of WordPress itself, I discovered that, just like Tim Wilson said, it’s quiet limited when it comes to displaying content.
I came across PressConnect, a simple php script for connection a Flash application to a WordPress blog.
Flash communicates with WordPress through PHP by talking in the XML language.
Actually, with PressConnect you bypass the WordPress engine and talk directly with the wp mysql database through php.
In the next update I’ll try to show some screenshots and code snippets on how PressConnect works, also in comparison to the simple XML-RPC.
Related posts:
- Using Wordpress as a CMS works like a charm
This week i worked on a site development project for one of our clients. Basically the idea was to pimp... - Flash CS3 Datagrid with AMFPHP
Wade Arnold wrote an interesting article about connecting flash to a MySql database with the help of AMFPHP, flash remoting.... - Customizable ComboBox (Flash CS3)
Here is an example of how to customize the font (size, style, color) for the two components List and TextField... - Actionscript 3 Datastructures
This morning I came across a interesting AS3 implementation of the common known data structures.... - Importing Cinema4D model into Papervision3D 2.0
Preparing a custom made object in Cinema4D for use in Papervision Flash and importing the exported .dae into flash....
links for 2009-01-21 | Oxygene Blog
links for 2009-01-22 | Oxygene Blog