<head> web conference: October 24-26, 2008

10.12.2007

Creating a Flash Blog - concept

At work I've been tasked with creating a database driven blog with a Flash front end. While this may sound simple enough, it can get pretty complicated. I've done this twice already and each time the app gets better and better. My first version was built with the flash front end first. The Flash front end read in XML and displayed it in a creative way. To get the database integration I simply wrote a PHP script that queried the database and then echoed out formatted XML that was read into flash and displayed. Easy enough right? Only took me a few day to wrap my head around it. Flash->PHP->database->PHP/XML->Flash was the data flow. The tricky part was to build a blog creation tool. I used PHP/AJAX/MySQL for the back end in this case. The tricky part here was that since this blog was going to be displayed in a Flash front end I needed to build in a preview step that showed the author what it would look like once it was in Flash. This created all sorts of problems with moving data from PHP to Flash to XML and back and keeping it all current. I finally got it all working but it's pretty clunky and buggy.

Today I did this tutorial from Wouter Verweirder which does something similar with SWX and cakePHP. The great thing about this approach is all the PHP,SQL queries,XML formatting is all done for you. It took me a while to get everything up and running on my webserver (the tutorial is written to be built locally). With a little help from Wouter (awesome name btw) got it all set up. Now I can integrate my Flash WYSIWYG interface with these clean method calls to cakePHP and I get all my data in native Flash objects (thanks SWX). It's super easy. Once I get it all put together I'll put up a link so that everyone can see it. For now, just wanted to get the props out there for all the people in the PHP and Flash communities that are smarter than me and making my life easier. I hope I do you proud!

w00t on!

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home