<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Aboutme - blog &#187; Flash</title>
	<atom:link href="http://blog.aboutme.be/category/flash/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.aboutme.be</link>
	<description></description>
	<lastBuildDate>Fri, 13 Jan 2012 08:58:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>websocket version 8 support in AIR Server</title>
		<link>http://blog.aboutme.be/2011/11/24/airserver-support-for-websocket-version-8/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=airserver-support-for-websocket-version-8</link>
		<comments>http://blog.aboutme.be/2011/11/24/airserver-support-for-websocket-version-8/#comments</comments>
		<pubDate>Thu, 24 Nov 2011 19:30:11 +0000</pubDate>
		<dc:creator>wouter</dc:creator>
				<category><![CDATA[Actionscript 3.0]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[html5]]></category>

		<guid isPermaLink="false">http://blog.aboutme.be/?p=242</guid>
		<description><![CDATA[It&#8217;s been a while since my last update on AIRServer &#8211; an actionscript library which enables you to set up a socket server in Adobe AIR, which listens to multiple socket inputs (native AMF sockets, websockets and P2P input). Some of my students noticed the websockets didn&#8217;t work in the latest versions of Google Chrome. [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been a while since my last update on AIRServer &#8211; an actionscript library which enables you to set up a socket server in Adobe AIR, which listens to multiple socket inputs (native AMF sockets, websockets and P2P input).</p>
<p>Some of my students noticed the websockets didn&#8217;t work in the latest versions of Google Chrome. This is because Google chrome uses another version of the websocket protocol. If you enjoy reading specs, you can find it at <a href="http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-10">http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-10</a> :-)</p>
<p>Anyway, took me quite some work, but I finally got it working. I was able to port some of the code of the Bauglir Internet Library (<a href="http://www.webnt.eu/index.php">http://www.webnt.eu/index.php</a>) to actionscript. AIRServer now supports both hybi-00 and hybi-10 of the protocol.</p>
<p><del datetime="2011-12-15T09:39:34+00:00"><a href="http://labs.aboutme.be/airserver/airserver-0.3.zip">You can download the updated library and demo&#8217;s here</a>. Enjoy!</del></p>
<p>Update on <a href="http://blog.aboutme.be/2011/12/23/airserver-0-5-socket-byte-concatenation/">http://blog.aboutme.be/2011/12/23/airserver-0-5-socket-byte-concatenation/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.aboutme.be/2011/11/24/airserver-support-for-websocket-version-8/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Source code for airserver space game</title>
		<link>http://blog.aboutme.be/2011/07/04/source-code-for-airserver-space-game/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=source-code-for-airserver-space-game</link>
		<comments>http://blog.aboutme.be/2011/07/04/source-code-for-airserver-space-game/#comments</comments>
		<pubDate>Mon, 04 Jul 2011 09:42:35 +0000</pubDate>
		<dc:creator>wouter</dc:creator>
				<category><![CDATA[Actionscript 3.0]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[html5]]></category>

		<guid isPermaLink="false">http://blog.aboutme.be/?p=198</guid>
		<description><![CDATA[Sorry for neglecting this follow-up post, but here it is: the source code for the airserver space game from my previous post. The zip file is actually a Flash Builder 4.5 workspace, containing the following projects: - AIRServer: the library project containing the AIRServer classes - CocoonP2P: the cocoon P2P library - DevineSpaceGameAIRServer: the AIR [...]]]></description>
			<content:encoded><![CDATA[<p>Sorry for neglecting this follow-up post, but here it is: <a href="http://labs.aboutme.be/airserver/space-game-flash-builder-workspace.zip">the source code for the airserver space game</a> from <a href="http://blog.aboutme.be/2011/06/23/airserver-example-multi-user-smartphone-controlled-game/">my previous post</a>.</p>
<p>The zip file is actually a Flash Builder 4.5 workspace, containing the following projects:</p>
<p>- AIRServer: the library project containing the AIRServer classes<br />
- CocoonP2P: the cocoon P2P library<br />
- DevineSpaceGameAIRServer: the AIR server, containing the space game<br />
- DevineSpaceGameControllerAMF: A mobile controller, using an AMF socket connection<br />
- DevineSpaceGameControllerP2P: A mobile controller, using CocoonP2P</p>
<p>When the game is running, you can control it through websockets aswel: surf to <a href="http://labs.aboutme.be/airserver/spaceshooter/">http://labs.aboutme.be/airserver/spaceshooter/</a> with an iPhone4 / iPod Touch 2 or iPad to control the game.</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.aboutme.be/2011/07/04/source-code-for-airserver-space-game/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AIRServer example: multi-user smartphone controlled game</title>
		<link>http://blog.aboutme.be/2011/06/23/airserver-example-multi-user-smartphone-controlled-game/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=airserver-example-multi-user-smartphone-controlled-game</link>
		<comments>http://blog.aboutme.be/2011/06/23/airserver-example-multi-user-smartphone-controlled-game/#comments</comments>
		<pubDate>Thu, 23 Jun 2011 14:49:48 +0000</pubDate>
		<dc:creator>wouter</dc:creator>
				<category><![CDATA[Actionscript 3.0]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[html5]]></category>

		<guid isPermaLink="false">http://blog.aboutme.be/?p=188</guid>
		<description><![CDATA[I wrote this game on top of my AIRServer library, as part of some multi-user explorations with the flash platform. The graphics were created by my HOWEST colleague Jynse Cremers :-) Users can join a 30-second spacegame. Each user controls a spaceship with their smartphone. The game itself was built with Adobe AIR and the [...]]]></description>
			<content:encoded><![CDATA[<p>I wrote this game on top of my AIRServer library, as part of some multi-user explorations with the flash platform. The graphics were created by my <a href="http://howest.be">HOWEST</a> colleague <a href="http://twitter.com/jynse">Jynse Cremers</a> :-)</p>
<p>Users can join a 30-second spacegame. Each user controls a spaceship with their smartphone. The game itself was built with Adobe AIR and the AIRServer actionscript library. To join the game users can choose between a native application built with Adobe AIR, or an html5/js websockets client in their browser.</p>
<p><del datetime="2011-07-04T09:43:12+00:00">I&#8217;ll release the source files after some cleaning up, so you can play around with it aswell!</del></p>
<p>Update: find the <a href="http://blog.aboutme.be/2011/07/04/source-code-for-airserver-space-game/">source files in the follow-up post</a>!</p>
<p><iframe src="http://player.vimeo.com/video/25446935?title=0&amp;byline=0&amp;portrait=0" width="500" height="284" frameborder="0"></iframe>
<p><a href="http://vimeo.com/25446935">Smartphone controlled game</a>  on <a href="http://vimeo.com">Vimeo</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.aboutme.be/2011/06/23/airserver-example-multi-user-smartphone-controlled-game/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Flash &#8211; HTML5 Drag and drop integration</title>
		<link>http://blog.aboutme.be/2010/02/21/flash-html5-drag-and-drop-integration/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=flash-html5-drag-and-drop-integration</link>
		<comments>http://blog.aboutme.be/2010/02/21/flash-html5-drag-and-drop-integration/#comments</comments>
		<pubDate>Sun, 21 Feb 2010 15:46:13 +0000</pubDate>
		<dc:creator>wouter</dc:creator>
				<category><![CDATA[Actionscript 3.0]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[html5]]></category>

		<guid isPermaLink="false">http://blog.aboutme.be/?p=138</guid>
		<description><![CDATA[After seeing Mario Klingemann&#8217;s HTML5 drag and drop demo, I wanted to write a library around it and make it a little more cross-browser. Register the necessary event listeners to the class and react to events such as dragging a file / element over your swf, dropping data or dropping a file on the swf. [...]]]></description>
			<content:encoded><![CDATA[<p>After seeing <a href="http://www.quasimondo.com/examples/draganddrop/dragAndDropFFF.php">Mario Klingemann&#8217;s HTML5 drag and drop demo</a>, I wanted to write a library around it and make it a little more cross-browser.</p>
<p>Register the necessary event listeners to the class and react to events such as dragging a file / element over your swf, dropping data or dropping a file on the swf.</p>
<p><code>FlashDragDrop.addEventListener(FlashDragDropEvent.DROP_DATA, dropDataHandler);</code></p>
<p>You don&#8217;t need to add any extra javascript to your flash embed, the javascript necessary to add the drag and drop support is injected automatically.</p>
<p>You can detect the drag and drop events in the latest versions of Firefox, Safari and IE. Accessing the content of the dropped files only works in the latest version of Firefox (try dropping an image).</p>
<p>You can <a href="http://labs.aboutme.be/flash_drag_drop/demo/">check out a demo</a> or <a href="http://labs.aboutme.be/flash_drag_drop/flash_drag_drop_source.zip">download the source files</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.aboutme.be/2010/02/21/flash-html5-drag-and-drop-integration/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Webcam Difference Keying</title>
		<link>http://blog.aboutme.be/2009/12/08/webcam-difference-keying/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=webcam-difference-keying</link>
		<comments>http://blog.aboutme.be/2009/12/08/webcam-difference-keying/#comments</comments>
		<pubDate>Tue, 08 Dec 2009 15:29:26 +0000</pubDate>
		<dc:creator>wouter</dc:creator>
				<category><![CDATA[Actionscript 3.0]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[pixelbender]]></category>

		<guid isPermaLink="false">http://blog.aboutme.be/?p=132</guid>
		<description><![CDATA[Some of my students are working on a project where they need a photo-booth-like keying application (take snapshot with somebody out of the picture, then step back in the picture and the background disappears). I&#8217;ve been experimenting with pixelbender the last week, and created some classes that do just that. Check out the example, and [...]]]></description>
			<content:encoded><![CDATA[<p>Some of my students are working on a project where they need a photo-booth-like keying application (take snapshot with somebody out of the picture, then step back in the picture and the background disappears). I&#8217;ve been experimenting with pixelbender the last week, and created some classes that do just that.</p>
<p><a href="http://labs.aboutme.be/difference_keying"><img src="http://blog.aboutme.be/wp-content/uploads/2009/12/difference_keying.jpg" alt="difference_keying" title="difference_keying" width="498" height="227" class="alignnone size-full wp-image-133" /></a></p>
<p><a href="http://labs.aboutme.be/difference_keying">Check out the example</a>, and play around with the parameters. Please note that it works best with a background without too much detail or similarities with the person in front. Also make sure there&#8217;s enough lighting.</p>
<p>You can <a href="http://blog.aboutme.be/wp-content/uploads/difference_keying/DifferenceKeying.zip">download the source files</a> and play around with them.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.aboutme.be/2009/12/08/webcam-difference-keying/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Actionscript 3.0 Gradients and Curves code generator</title>
		<link>http://blog.aboutme.be/2008/09/21/actionscript-30-gradients-and-curves-code-generator/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=actionscript-30-gradients-and-curves-code-generator</link>
		<comments>http://blog.aboutme.be/2008/09/21/actionscript-30-gradients-and-curves-code-generator/#comments</comments>
		<pubDate>Sun, 21 Sep 2008 16:26:37 +0000</pubDate>
		<dc:creator>wouter</dc:creator>
				<category><![CDATA[Actionscript 3.0]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://blog.aboutme.be/?p=74</guid>
		<description><![CDATA[Now and then, I have to use the drawing API to draw a gradient, or a bezier curve. Every time, I have to dig through the help, to check the meaning of the different parameters, and where they belong in the function call. To make this more easy, I created a little code generator for [...]]]></description>
			<content:encoded><![CDATA[<p>Now and then, I have to use the drawing API to draw a gradient, or a bezier curve. Every time, I have to dig through the help, to check the meaning of the different parameters, and where they belong in the function call. To make this more easy, I created a little code generator for gradients, and for drawing bezier curves with Actionscript 3.0.</p>
<p>Gradients code generator:</p>

    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="swfobj_0" width="550" height="400" align="none">
      <param name="movie" value="http://blog.aboutme.be/wp-content/uploads/2008/09/gradients_01.swf" />
      <param name="align" value="none" />
      <!--[if !IE]>-->
      <object type="application/x-shockwave-flash" data="http://blog.aboutme.be/wp-content/uploads/2008/09/gradients_01.swf" width="550" height="400" align="none">
      <!--<![endif]-->
        
      <!--[if !IE]>-->
      </object>
      <!--<![endif]-->
    </object>

<p>Beziers code generator</p>

    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="swfobj_1" width="550" height="400" align="none">
      <param name="movie" value="http://blog.aboutme.be/wp-content/uploads/2008/09/curveto_demo.swf" />
      <param name="align" value="none" />
      <!--[if !IE]>-->
      <object type="application/x-shockwave-flash" data="http://blog.aboutme.be/wp-content/uploads/2008/09/curveto_demo.swf" width="550" height="400" align="none">
      <!--<![endif]-->
        
      <!--[if !IE]>-->
      </object>
      <!--<![endif]-->
    </object>

]]></content:encoded>
			<wfw:commentRss>http://blog.aboutme.be/2008/09/21/actionscript-30-gradients-and-curves-code-generator/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>flash remoting with SWX and CakePHP</title>
		<link>http://blog.aboutme.be/2007/09/30/flash-remoting-with-swx-and-cakephp/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=flash-remoting-with-swx-and-cakephp</link>
		<comments>http://blog.aboutme.be/2007/09/30/flash-remoting-with-swx-and-cakephp/#comments</comments>
		<pubDate>Sun, 30 Sep 2007 01:56:25 +0000</pubDate>
		<dc:creator>wouter</dc:creator>
				<category><![CDATA[Actionscript 2.0]]></category>
		<category><![CDATA[cakephp]]></category>
		<category><![CDATA[cakeswxphp]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[swx]]></category>

		<guid isPermaLink="false">http://blog.aboutme.be/2007/09/30/flash-remoting-with-swx-and-cakephp/</guid>
		<description><![CDATA[So, you want to learn how to create a sexy blog in flash, creating posts, comments, database storage, &#8230;? Are you afraid of spending hours writing complex queries, parsing XML data or writing loads of php files? Don&#8217;t be, and see the power of cakephp and SWX combined. CakePHP being a rapid development framework for [...]]]></description>
			<content:encoded><![CDATA[<p>So, you want to learn how to create a sexy blog in flash, creating posts, comments, database storage, &#8230;? Are you afraid of spending hours writing complex queries, parsing XML data or writing loads of php files? Don&#8217;t be, and see the power of <a href="http://www.cakephp.org" target="_blank">cakephp</a> and <a href="http://swxformat.org" target="_blank">SWX</a> combined. CakePHP being a rapid development framework for PHP and SWX, the native data format for the flash platform!<span id="more-30"></span></p>
<p>If you don&#8217;t have a running webserver with PHP + mysql + phpmyadmin yet, you&#8217;ll have to 	install these packages first.</p>
<ul>
<li>Windows users can <a target="_blank" href="http://www.wampserver.com/en/">install WAMP</a>, which will install these packages at once on your development machine.</li>
<li>Mac users can <a target="_blank" href="http://sourceforge.net/projects/mamp">install MAMP</a>, which does the same (there is a MAMP bundle on swxformat, but we won&#8217;t use this one, as we&#8217;ll need to copy SWX to another directory anyway to work with cakephp).</li>
</ul>
<p>When you have your webserver set up, we&#8217;ll <a target="_blank" href="http://cakephp.org/downloads">download the latest version of cakephp</a>. Unzip it to you webroot (WAMP default: C:\wamp\www &#8211; MAMP default: /Applications/MAMP/htdocs) and rename the unzipped directory to &#8220;flashblog&#8221;. You now have the following file structure:</p>
<ul>
<li>WWW</li>
<ul>
<li>flashblog</li>
<ul>
<li>app</li>
<li>cake</li>
<li>docs</li>
<li>index.php</li>
<li>vendors</li>
</ul>
</ul>
</ul>
<p>If you are deploying on a webserver, make sure the app/tmp/ directory and it&#8217;s subdirectories are writeable (chmod 777).</p>
<p>After that, we&#8217;ll add <a target="_blank" href="http://blog.aboutme.be/cakeswxphp">cakeswxphp</a> to our cake install. <a target="_blank" href="http://blog.aboutme.be/cakeswxphp">Download cakeswxphp</a> and unzip it somewhere on your computer. Copy/Paste the content of the app and vendors dir of cakeswxphp to the same directories of your flashblog directory. If you did everything correctly, you can point your browser to: <a target="_blank" href="http://localhost/flashblog/explorer/">http://localhost/flashblog/explorer/</a>. This opens the SWX Service Explorer. Set the amf path to http://localhost/flashblog/amf.php (default).</p>
<p>This should give you an overview of the remoting services, which we can call via flash. Right now, the only service is amfphp/discovery_service&#8230;</p>
<p>Now that we have cakephp &#038; cakeswxphp installed, we will setup our database for our blog. Point your browser to the phpMyAdmin on your development machine (WAMP default: http://localhost/phpmyadmin &#8211; MAMP default: http://localhost/phpMyAdmin/).</p>
<p>Using phpmyadmin, create a new database called &#8220;flashblog&#8221;.</p>
<p><img id="image31" alt="afbeelding-1.png" src="http://blog.aboutme.be/wp-content/uploads/2007/09/afbeelding-1.png" /></p>
<p>Execute the following SQL to create the tables for our blog:</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">CREATE</span> <span style="color: #993333; font-weight: bold;">TABLE</span> <span style="color: #ff0000;">`comments`</span> <span style="color: #66cc66;">&#40;</span>
<span style="color: #ff0000;">`id`</span> <span style="color: #993333; font-weight: bold;">INT</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">11</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #993333; font-weight: bold;">AUTO_INCREMENT</span><span style="color: #66cc66;">,</span>
<span style="color: #ff0000;">`created`</span> datetime <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span>
<span style="color: #ff0000;">`modified`</span> datetime <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span>
<span style="color: #ff0000;">`post_id`</span> <span style="color: #993333; font-weight: bold;">INT</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">11</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span>
<span style="color: #ff0000;">`nickname`</span> <span style="color: #993333; font-weight: bold;">VARCHAR</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">64</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span>
<span style="color: #ff0000;">`title`</span> <span style="color: #993333; font-weight: bold;">VARCHAR</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">64</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span>
<span style="color: #ff0000;">`content`</span> text <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span>
<span style="color: #993333; font-weight: bold;">PRIMARY</span> <span style="color: #993333; font-weight: bold;">KEY</span>  <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">`id`</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#41;</span> ENGINE<span style="color: #66cc66;">=</span>MyISAM <span style="color: #993333; font-weight: bold;">DEFAULT</span> CHARSET<span style="color: #66cc66;">=</span>latin1 <span style="color: #993333; font-weight: bold;">AUTO_INCREMENT</span><span style="color: #66cc66;">=</span><span style="color: #cc66cc;">1</span> ; <span style="color: #993333; font-weight: bold;">CREATE</span> <span style="color: #993333; font-weight: bold;">TABLE</span> <span style="color: #ff0000;">`posts`</span> <span style="color: #66cc66;">&#40;</span>
<span style="color: #ff0000;">`id`</span> <span style="color: #993333; font-weight: bold;">INT</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">11</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #993333; font-weight: bold;">AUTO_INCREMENT</span><span style="color: #66cc66;">,</span>
<span style="color: #ff0000;">`created`</span> datetime <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span>
<span style="color: #ff0000;">`modified`</span> datetime <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span>
<span style="color: #ff0000;">`nickname`</span> <span style="color: #993333; font-weight: bold;">VARCHAR</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">64</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span>
<span style="color: #ff0000;">`title`</span> <span style="color: #993333; font-weight: bold;">VARCHAR</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">64</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span>
<span style="color: #ff0000;">`content`</span> text <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span>
<span style="color: #993333; font-weight: bold;">PRIMARY</span> <span style="color: #993333; font-weight: bold;">KEY</span>  <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">`id`</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#41;</span> ENGINE<span style="color: #66cc66;">=</span>MyISAM <span style="color: #993333; font-weight: bold;">DEFAULT</span> CHARSET<span style="color: #66cc66;">=</span>latin1 <span style="color: #993333; font-weight: bold;">AUTO_INCREMENT</span><span style="color: #66cc66;">=</span><span style="color: #cc66cc;">1</span> ;</pre></div></div>

<p>That&#8217;s it, our database is set up! Now it is time to write our cakephp classes to work with our database&#8230;</p>
<p>First of all, we need to tell cakephp how to access our database. Rename flashblog/app/config/database.php.default to database.php and open it in your favorite text/php editor. You can adjust the database configuration in the $default var in this file. In my case, it looks like this:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$default</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'driver'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'mysql'</span><span style="color: #339933;">,</span>
	<span style="color: #0000ff;">'connect'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'mysql_connect'</span><span style="color: #339933;">,</span>
	<span style="color: #0000ff;">'host'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'localhost'</span><span style="color: #339933;">,</span>
	<span style="color: #0000ff;">'login'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'root'</span><span style="color: #339933;">,</span>
	<span style="color: #0000ff;">'password'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'root'</span><span style="color: #339933;">,</span>
	<span style="color: #0000ff;">'database'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'flashblog'</span><span style="color: #339933;">,</span>
	<span style="color: #0000ff;">'prefix'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>If you point your browser to http://localhost/flashblog/ you should get the message that cake is able to connect to the database. If not, check your database settings again in flashblog/app/config/database.php.</p>
<p>So, we can connect to our database. Now we&#8217;ll define our post and comment models in php so that cakephp knows how to read and write posts and comments to the database. We could use the cake bake script to do this, but right now we&#8217;ll just write the code ourselves.</p>
<p>First of all, we&#8217;ll adjust the default model. Create app_model.php in flashblog/app/ with the following contents:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000000; font-weight: bold;">class</span> AppModel <span style="color: #000000; font-weight: bold;">extends</span> Model <span style="color: #009900;">&#123;</span>
	 <span style="color: #000000; font-weight: bold;">function</span> beforeSave<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
			<span style="color: #b1b100;">while</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">name</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>
					 <span style="color: #339933;">&amp;&amp;</span> <span style="color: #339933;">!</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">name</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">name</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>
					 <span style="color: #339933;">&amp;&amp;</span> <span style="color: #990000;">is_object</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">name</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">name</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
				<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">name</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">get_object_vars</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">name</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">name</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span>
		<span style="color: #009900;">&#125;</span>
		<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">name</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">primaryKey</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
			<span style="color: #990000;">eval</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'$this-&gt;'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">primaryKey</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">' =  $this-&gt;data[$this-&gt;name][$this-&gt;primaryKey];'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>Now, we can define our post and comments models. Create a file called post.php in flashblog/app/models/:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000000; font-weight: bold;">class</span> Post <span style="color: #000000; font-weight: bold;">extends</span> AppModel <span style="color: #009900;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$name</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'Post'</span><span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$hasMany</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
			<span style="color: #0000ff;">'Comment'</span> <span style="color: #339933;">=&gt;</span>
				<span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'className'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'Comment'</span><span style="color: #339933;">,</span>
						<span style="color: #0000ff;">'foreignKey'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'post_id'</span><span style="color: #339933;">,</span>
						<span style="color: #0000ff;">'dependent'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">true</span>
				<span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
	<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>Then, create comment.php in that same directory (flashblog/app/models/) :</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000000; font-weight: bold;">class</span> Comment <span style="color: #000000; font-weight: bold;">extends</span> AppModel <span style="color: #009900;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$name</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'Comment'</span><span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$belongsTo</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
			<span style="color: #0000ff;">'Post'</span> <span style="color: #339933;">=&gt;</span>
				<span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'className'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'Post'</span><span style="color: #339933;">,</span>
						<span style="color: #0000ff;">'foreignKey'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'post_id'</span>
				<span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
	<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>CakePHP now knows how to read and write posts and related comments to the database! Next, we will create our remoting methods (cake controllers) which we will call from flash.</p>
<p>Create posts_controller.php in flashblog/app/controllers:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000000; font-weight: bold;">class</span> PostsController <span style="color: #000000; font-weight: bold;">extends</span> AppController <span style="color: #009900;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$name</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'Posts'</span><span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$uses</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Post'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">function</span> getPosts<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">findAll</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #000000; font-weight: bold;">function</span> getPost<span style="color: #009900;">&#40;</span><span style="color: #000088;">$id</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">read</span><span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">null</span><span style="color: #339933;">,</span> <span style="color: #000088;">$id</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #000000; font-weight: bold;">function</span> savePost<span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">save</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #b1b100;">return</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">id</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #b1b100;">else</span><span style="color: #009900;">&#123;</span>
			<span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #000000; font-weight: bold;">function</span> deletePost<span style="color: #009900;">&#40;</span><span style="color: #000088;">$id</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">del</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$id</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #b1b100;">else</span><span style="color: #009900;">&#123;</span>
			<span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>Then, create the controller for our comments (flashblog/app/controller/comments_controller.php):</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000000; font-weight: bold;">class</span> CommentsController <span style="color: #000000; font-weight: bold;">extends</span> AppController <span style="color: #009900;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$name</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'Comments'</span><span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$uses</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Comment'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">function</span> saveComment<span style="color: #009900;">&#40;</span><span style="color: #000088;">$comment</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Comment</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">save</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$comment</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #b1b100;">return</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Comment</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">id</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #b1b100;">else</span><span style="color: #009900;">&#123;</span>
			<span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #000000; font-weight: bold;">function</span> deleteComment<span style="color: #009900;">&#40;</span><span style="color: #000088;">$id</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Comment</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">del</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$id</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #b1b100;">else</span><span style="color: #009900;">&#123;</span>
			<span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>And here ends the PHP side of our flash blog. Let&#8217;s have some fun with Flash &#038; ActionScript, shall we?</p>
<p>Launch up flash and create a new fla (Actionscript 2). Save it somewhere as &#8220;flashblog.fla&#8221;. Now we&#8217;ll write the methods to read/write/delete blogposts and comments. SWX remoting doesn&#8217;t really need extra classes (you loadMovie your data), but using the classes makes you code a lot smaller and easier to write. So <a href="http://swxformat.org/download/" target="_blank">download the SWX ActionScript library</a> and extract the &#8220;org&#8221; folder to the same directory as your flashblog.fla file.</p>
<p>When you&#8217;ve got the org folder in the same folder as your flashblog.fla file, go back to your flashblog.fla file, select frame one and open the actions panel. We&#8217;ll start with importing the SWX class and setting up our gateway:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">import</span> org.<span style="color: #006600;">swxformat</span>.<span style="color: #66cc66;">*</span>;
<span style="color: #000000; font-weight: bold;">var</span> swx:SWX = <span style="color: #000000; font-weight: bold;">new</span> SWX<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
swx.<span style="color: #006600;">gateway</span> = <span style="color: #ff0000;">&quot;http://localhost/flashblog/swx.php&quot;</span>;
swx.<span style="color: #006600;">encoding</span> = <span style="color: #ff0000;">&quot;POST&quot;</span>;</pre></div></div>

<p>Now we can write our actionscript functions to communicate with our swx php classes. The following function sends a new post to our php class, which inserts it in the database:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">/**
* function to create a new post
*/</span>
<span style="color: #000000; font-weight: bold;">function</span> createPost<span style="color: #66cc66;">&#40;</span>nickname:<span style="color: #0066CC;">String</span>, title:<span style="color: #0066CC;">String</span>, content:<span style="color: #0066CC;">String</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Void</span><span style="color: #66cc66;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">var</span> callDetails:<span style="color: #0066CC;">Object</span> = <span style="color: #66cc66;">&#123;</span>
		serviceClass: <span style="color: #ff0000;">&quot;PostsController&quot;</span>,
		method: <span style="color: #ff0000;">&quot;savePost&quot;</span>,
		args: <span style="color: #66cc66;">&#91;</span>nickname, title, content<span style="color: #66cc66;">&#93;</span>,
		result: <span style="color: #66cc66;">&#91;</span><span style="color: #0066CC;">this</span>, savePostResultHandler<span style="color: #66cc66;">&#93;</span>
	<span style="color: #66cc66;">&#125;</span>
	swx.<span style="color: #0066CC;">call</span><span style="color: #66cc66;">&#40;</span>callDetails<span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
<span style="color: #808080; font-style: italic;">/**
* called when the post was saved
*/</span>
<span style="color: #000000; font-weight: bold;">function</span> savePostResultHandler<span style="color: #66cc66;">&#40;</span>resultObj:<span style="color: #0066CC;">Object</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Void</span><span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>resultObj.<span style="color: #006600;">result</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #808080; font-style: italic;">//nr of saved post or false when failed</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>That&#8217;s all it takes. No query writing. No XML parsing. No complex php files&#8230;<br />
Now, let&#8217;s complete our actionscript code with the other functions to communicate with php:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">//we import the SWX classes</span>
<span style="color: #0066CC;">import</span> org.<span style="color: #006600;">swxformat</span>.<span style="color: #66cc66;">*</span>;
<span style="color: #808080; font-style: italic;">//create a new SWX instance</span>
<span style="color: #000000; font-weight: bold;">var</span> swx:SWX = <span style="color: #000000; font-weight: bold;">new</span> SWX<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #808080; font-style: italic;">//location of the SWX gateway</span>
swx.<span style="color: #006600;">gateway</span> = <span style="color: #ff0000;">&quot;http://localhost/flashblog/swx.php&quot;</span>;
<span style="color: #808080; font-style: italic;">//we'll transfer data using POST.</span>
swx.<span style="color: #006600;">encoding</span> = <span style="color: #ff0000;">&quot;POST&quot;</span>;
<span style="color: #808080; font-style: italic;">/**
*get all posts from the server
*/</span>
<span style="color: #000000; font-weight: bold;">function</span> getPosts<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Void</span><span style="color: #66cc66;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">var</span> callDetails:<span style="color: #0066CC;">Object</span> = <span style="color: #66cc66;">&#123;</span>
		serviceClass: <span style="color: #ff0000;">&quot;PostsController&quot;</span>,
		method: <span style="color: #ff0000;">&quot;getPosts&quot;</span>,
		result: <span style="color: #66cc66;">&#91;</span><span style="color: #0066CC;">this</span>, getPostsResultHandler<span style="color: #66cc66;">&#93;</span>
	<span style="color: #66cc66;">&#125;</span>
	swx.<span style="color: #0066CC;">call</span><span style="color: #66cc66;">&#40;</span>callDetails<span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
<span style="color: #808080; font-style: italic;">/*
* called when we receive the posts from the server
*/</span>
<span style="color: #000000; font-weight: bold;">function</span> getPostsResultHandler<span style="color: #66cc66;">&#40;</span>resultObj:<span style="color: #0066CC;">Object</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Void</span><span style="color: #66cc66;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">var</span> posts_length:<span style="color: #0066CC;">Number</span> = resultObj.<span style="color: #006600;">result</span>.<span style="color: #0066CC;">length</span>;
	<span style="color: #b1b100;">for</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> i:<span style="color: #0066CC;">Number</span> = <span style="color: #cc66cc;">0</span>; i <span style="color: #66cc66;">&lt;</span> posts_length; i++<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">var</span> post:<span style="color: #0066CC;">Object</span> = resultObj.<span style="color: #006600;">result</span><span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>;
		<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>post.<span style="color: #006600;">Post</span>.<span style="color: #006600;">title</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>post.<span style="color: #006600;">Post</span>.<span style="color: #006600;">content</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span>
<span style="color: #808080; font-style: italic;">/**
*get a post with given id
*/</span>
<span style="color: #000000; font-weight: bold;">function</span> getPost<span style="color: #66cc66;">&#40;</span>id:<span style="color: #0066CC;">Number</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Void</span><span style="color: #66cc66;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">var</span> callDetails:<span style="color: #0066CC;">Object</span> = <span style="color: #66cc66;">&#123;</span>
		serviceClass: <span style="color: #ff0000;">&quot;PostsController&quot;</span>,
		method: <span style="color: #ff0000;">&quot;getPost&quot;</span>,
		args: <span style="color: #66cc66;">&#91;</span>id<span style="color: #66cc66;">&#93;</span>,
		result: <span style="color: #66cc66;">&#91;</span><span style="color: #0066CC;">this</span>, getPostResultHandler<span style="color: #66cc66;">&#93;</span>
	<span style="color: #66cc66;">&#125;</span>
	swx.<span style="color: #0066CC;">call</span><span style="color: #66cc66;">&#40;</span>callDetails<span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
<span style="color: #808080; font-style: italic;">/*
* called when we receive the posts from the server
*/</span>
<span style="color: #000000; font-weight: bold;">function</span> getPostResultHandler<span style="color: #66cc66;">&#40;</span>resultObj:<span style="color: #0066CC;">Object</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Void</span><span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>resultObj.<span style="color: #006600;">result</span>.<span style="color: #006600;">Post</span>.<span style="color: #006600;">title</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>resultObj.<span style="color: #006600;">result</span>.<span style="color: #006600;">Comment</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
<span style="color: #808080; font-style: italic;">/**
* function to create a new post
*/</span>
<span style="color: #000000; font-weight: bold;">function</span> createPost<span style="color: #66cc66;">&#40;</span>nickname:<span style="color: #0066CC;">String</span>, title:<span style="color: #0066CC;">String</span>, content:<span style="color: #0066CC;">String</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Void</span><span style="color: #66cc66;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">var</span> callDetails:<span style="color: #0066CC;">Object</span> = <span style="color: #66cc66;">&#123;</span>
		serviceClass: <span style="color: #ff0000;">&quot;PostsController&quot;</span>,
		method: <span style="color: #ff0000;">&quot;savePost&quot;</span>,
		args: <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#123;</span>Post: <span style="color: #66cc66;">&#123;</span>nickname: nickname, title: title, content: content<span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#93;</span>,
		result: <span style="color: #66cc66;">&#91;</span><span style="color: #0066CC;">this</span>, savePostResultHandler<span style="color: #66cc66;">&#93;</span>
	<span style="color: #66cc66;">&#125;</span>
	swx.<span style="color: #0066CC;">call</span><span style="color: #66cc66;">&#40;</span>callDetails<span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
<span style="color: #808080; font-style: italic;">/**
* function to edit a post
*/</span>
<span style="color: #000000; font-weight: bold;">function</span> editPost<span style="color: #66cc66;">&#40;</span>id:<span style="color: #0066CC;">Number</span>, nickname:<span style="color: #0066CC;">String</span>, title:<span style="color: #0066CC;">String</span>, content:<span style="color: #0066CC;">String</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Void</span><span style="color: #66cc66;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">var</span> callDetails:<span style="color: #0066CC;">Object</span> = <span style="color: #66cc66;">&#123;</span>
		serviceClass: <span style="color: #ff0000;">&quot;PostsController&quot;</span>,
		method: <span style="color: #ff0000;">&quot;savePost&quot;</span>,
		args: <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#123;</span>Post: <span style="color: #66cc66;">&#123;</span>id: id, nickname: nickname, title: title, content: content<span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#93;</span>,
		result: <span style="color: #66cc66;">&#91;</span><span style="color: #0066CC;">this</span>, savePostResultHandler<span style="color: #66cc66;">&#93;</span>
	<span style="color: #66cc66;">&#125;</span>
	swx.<span style="color: #0066CC;">call</span><span style="color: #66cc66;">&#40;</span>callDetails<span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
<span style="color: #808080; font-style: italic;">/**
* called when the post was saved
*/</span>
<span style="color: #000000; font-weight: bold;">function</span> savePostResultHandler<span style="color: #66cc66;">&#40;</span>resultObj:<span style="color: #0066CC;">Object</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Void</span><span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>resultObj.<span style="color: #006600;">result</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #808080; font-style: italic;">//nr of saved post or false when failed</span>
<span style="color: #66cc66;">&#125;</span>
<span style="color: #808080; font-style: italic;">/*
* called when we receive the posts from the server
*/</span>
<span style="color: #000000; font-weight: bold;">function</span> getPostResultHandler<span style="color: #66cc66;">&#40;</span>resultObj:<span style="color: #0066CC;">Object</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Void</span><span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>resultObj.<span style="color: #006600;">result</span>.<span style="color: #006600;">Post</span>.<span style="color: #006600;">title</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #000000; font-weight: bold;">var</span> comments_length:<span style="color: #0066CC;">Number</span> = resultObj.<span style="color: #006600;">result</span>.<span style="color: #006600;">Comment</span>.<span style="color: #0066CC;">length</span>;
	<span style="color: #b1b100;">for</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> i:<span style="color: #0066CC;">Number</span> = <span style="color: #cc66cc;">0</span>; i <span style="color: #66cc66;">&lt;</span> comments_length; i++<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">var</span> comment:<span style="color: #0066CC;">Object</span> = resultObj.<span style="color: #006600;">result</span>.<span style="color: #006600;">Comment</span><span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>;
		<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>comment.<span style="color: #006600;">title</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>comment.<span style="color: #006600;">content</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span>
<span style="color: #808080; font-style: italic;">/**
*delete a post with given id
*/</span>
<span style="color: #000000; font-weight: bold;">function</span> deletePost<span style="color: #66cc66;">&#40;</span>id:<span style="color: #0066CC;">Number</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Void</span><span style="color: #66cc66;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">var</span> callDetails:<span style="color: #0066CC;">Object</span> = <span style="color: #66cc66;">&#123;</span>
		serviceClass: <span style="color: #ff0000;">&quot;PostsController&quot;</span>,
		method: <span style="color: #ff0000;">&quot;deletePost&quot;</span>,
		args: <span style="color: #66cc66;">&#91;</span>id<span style="color: #66cc66;">&#93;</span>,
		result: <span style="color: #66cc66;">&#91;</span><span style="color: #0066CC;">this</span>, deletePostResultHandler<span style="color: #66cc66;">&#93;</span>
	<span style="color: #66cc66;">&#125;</span>
	swx.<span style="color: #0066CC;">call</span><span style="color: #66cc66;">&#40;</span>callDetails<span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
<span style="color: #808080; font-style: italic;">/*
* called when we receive the posts from the server
*/</span>
<span style="color: #000000; font-weight: bold;">function</span> deletePostResultHandler<span style="color: #66cc66;">&#40;</span>resultObj:<span style="color: #0066CC;">Object</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Void</span><span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>resultObj.<span style="color: #006600;">result</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
<span style="color: #808080; font-style: italic;">/**
* function to create a new comment
*/</span>
<span style="color: #000000; font-weight: bold;">function</span> createComment<span style="color: #66cc66;">&#40;</span>post_id:<span style="color: #0066CC;">Number</span>, nickname:<span style="color: #0066CC;">String</span>, title:<span style="color: #0066CC;">String</span>, content:<span style="color: #0066CC;">String</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Void</span><span style="color: #66cc66;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">var</span> callDetails:<span style="color: #0066CC;">Object</span> = <span style="color: #66cc66;">&#123;</span>
		serviceClass: <span style="color: #ff0000;">&quot;CommentsController&quot;</span>,
		method: <span style="color: #ff0000;">&quot;saveComment&quot;</span>,
		args: <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#123;</span>Comment: <span style="color: #66cc66;">&#123;</span>post_id: post_id, nickname: nickname, title: title, content: content<span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#93;</span>,
		result: <span style="color: #66cc66;">&#91;</span><span style="color: #0066CC;">this</span>, saveCommentResultHandler<span style="color: #66cc66;">&#93;</span>
	<span style="color: #66cc66;">&#125;</span>
	swx.<span style="color: #0066CC;">call</span><span style="color: #66cc66;">&#40;</span>callDetails<span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
<span style="color: #808080; font-style: italic;">/**
* function to edit a comment
*/</span>
<span style="color: #000000; font-weight: bold;">function</span> editComment<span style="color: #66cc66;">&#40;</span>id:<span style="color: #0066CC;">Number</span>, post_id:<span style="color: #0066CC;">Number</span>, nickname:<span style="color: #0066CC;">String</span>, title:<span style="color: #0066CC;">String</span>, content:<span style="color: #0066CC;">String</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Void</span><span style="color: #66cc66;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">var</span> callDetails:<span style="color: #0066CC;">Object</span> = <span style="color: #66cc66;">&#123;</span>
		serviceClass: <span style="color: #ff0000;">&quot;CommentsController&quot;</span>,
		method: <span style="color: #ff0000;">&quot;saveComment&quot;</span>,
		args: <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#123;</span>Comment: <span style="color: #66cc66;">&#123;</span>id: id, post_id: post_id, nickname: nickname, title: title, content: content<span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#93;</span>,
		result: <span style="color: #66cc66;">&#91;</span><span style="color: #0066CC;">this</span>, saveCommentResultHandler<span style="color: #66cc66;">&#93;</span>
	<span style="color: #66cc66;">&#125;</span>
	swx.<span style="color: #0066CC;">call</span><span style="color: #66cc66;">&#40;</span>callDetails<span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
<span style="color: #808080; font-style: italic;">/**
* called when the comment was saved
*/</span>
<span style="color: #000000; font-weight: bold;">function</span> saveCommentResultHandler<span style="color: #66cc66;">&#40;</span>resultObj:<span style="color: #0066CC;">Object</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Void</span><span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>resultObj.<span style="color: #006600;">result</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #808080; font-style: italic;">//nr of saved post or false when failed</span>
<span style="color: #66cc66;">&#125;</span>
<span style="color: #808080; font-style: italic;">/**
*delete a comment with given id
*/</span>
<span style="color: #000000; font-weight: bold;">function</span> deleteComment<span style="color: #66cc66;">&#40;</span>id:<span style="color: #0066CC;">Number</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Void</span><span style="color: #66cc66;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">var</span> callDetails:<span style="color: #0066CC;">Object</span> = <span style="color: #66cc66;">&#123;</span>
		serviceClass: <span style="color: #ff0000;">&quot;CommentsController&quot;</span>,
		method: <span style="color: #ff0000;">&quot;deleteComment&quot;</span>,
		args: <span style="color: #66cc66;">&#91;</span>id<span style="color: #66cc66;">&#93;</span>,
		result: <span style="color: #66cc66;">&#91;</span><span style="color: #0066CC;">this</span>, deleteCommentResultHandler<span style="color: #66cc66;">&#93;</span>
	<span style="color: #66cc66;">&#125;</span>
	swx.<span style="color: #0066CC;">call</span><span style="color: #66cc66;">&#40;</span>callDetails<span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
<span style="color: #808080; font-style: italic;">/*
* called when we receive the posts from the server
*/</span>
<span style="color: #000000; font-weight: bold;">function</span> deleteCommentResultHandler<span style="color: #66cc66;">&#40;</span>resultObj:<span style="color: #0066CC;">Object</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Void</span><span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>resultObj.<span style="color: #006600;">result</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>You can test the functions by calling them manually through AS code. The next thing todo is create a gui to show posts, edit posts, etc. But that&#8217;s beyond the scope of this tutorial&#8230;</p>
<p>Happy flashing!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.aboutme.be/2007/09/30/flash-remoting-with-swx-and-cakephp/feed/</wfw:commentRss>
		<slash:comments>47</slash:comments>
		</item>
		<item>
		<title>CakeSWXPHP updated to SWX version 1.01</title>
		<link>http://blog.aboutme.be/2007/09/22/cakeswxphp-updated-to-swx-version-101/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=cakeswxphp-updated-to-swx-version-101</link>
		<comments>http://blog.aboutme.be/2007/09/22/cakeswxphp-updated-to-swx-version-101/#comments</comments>
		<pubDate>Sat, 22 Sep 2007 14:40:38 +0000</pubDate>
		<dc:creator>wouter</dc:creator>
				<category><![CDATA[Actionscript 2.0]]></category>
		<category><![CDATA[amfphp]]></category>
		<category><![CDATA[cakephp]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[swx]]></category>

		<guid isPermaLink="false">http://blog.aboutme.be/2007/09/22/cakeswxphp-updated-to-swx-version-101/</guid>
		<description><![CDATA[Aral Balkan released SWX version 1.0 a few weeks ago. I finally found the time to incorporate the changes into CakeSWXPHP! The changes include the swxAssembler class (instead of the old swfCompiler) and the rebranded service explorer. Go to the cakeswxphp page for the latest downloads!]]></description>
			<content:encoded><![CDATA[<p><a title="Blog of Aral Balkan" href="http://www.aralbalkan.com/">Aral Balkan</a> released <a title="Official SWX homepage" href="http://www.swxformat.org">SWX version 1.0</a> a few weeks ago. I finally found the time to incorporate the changes into CakeSWXPHP! The changes include the swxAssembler class (instead of the old swfCompiler) and the rebranded service explorer.</p>
<p>Go to the <a href="http://blog.aboutme.be/cakeswxphp">cakeswxphp page</a> for the latest downloads!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.aboutme.be/2007/09/22/cakeswxphp-updated-to-swx-version-101/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>CakeSWXPHP updated to SWX beta 1.3</title>
		<link>http://blog.aboutme.be/2007/08/07/cakeswxphp-updated-to-swx-beta-13/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=cakeswxphp-updated-to-swx-beta-13</link>
		<comments>http://blog.aboutme.be/2007/08/07/cakeswxphp-updated-to-swx-beta-13/#comments</comments>
		<pubDate>Tue, 07 Aug 2007 09:41:42 +0000</pubDate>
		<dc:creator>wouter</dc:creator>
				<category><![CDATA[Actionscript 2.0]]></category>
		<category><![CDATA[amfphp]]></category>
		<category><![CDATA[cakephp]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[swx]]></category>

		<guid isPermaLink="false">http://blog.aboutme.be/2007/08/07/cakeswxphp-updated-to-swx-beta-13/</guid>
		<description><![CDATA[I took some time updating my cakeswxphp package to the SWX beta 1.3. One of the new features is the new service explorer from SWX. You can test your cake gateway, pointing your browser to the /explorer/ directory, gateway location being: cake_amf_gateway.php Go to the cakeswxphp page for the latest downloads! Enjoy!]]></description>
			<content:encoded><![CDATA[<p>I took some time updating my cakeswxphp package to the SWX beta 1.3. One of the new features is the new service explorer from SWX.</p>
<p>You can test your cake gateway, pointing your browser to the /explorer/ directory, gateway location being: cake_amf_gateway.php</p>
<p>Go to the <a href="http://blog.aboutme.be/cakeswxphp">cakeswxphp page</a> for the latest downloads!</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.aboutme.be/2007/08/07/cakeswxphp-updated-to-swx-beta-13/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>call cakephp through swx / amf</title>
		<link>http://blog.aboutme.be/2007/08/03/call-cakephp-through-swx-amf/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=call-cakephp-through-swx-amf</link>
		<comments>http://blog.aboutme.be/2007/08/03/call-cakephp-through-swx-amf/#comments</comments>
		<pubDate>Fri, 03 Aug 2007 20:41:41 +0000</pubDate>
		<dc:creator>wouter</dc:creator>
				<category><![CDATA[Actionscript 2.0]]></category>
		<category><![CDATA[amfphp]]></category>
		<category><![CDATA[cakephp]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[swx]]></category>

		<guid isPermaLink="false">http://blog.aboutme.be/2007/08/03/call-cakephp-through-swx-amf/</guid>
		<description><![CDATA[As some of you might know, I&#8217;m a great fan of the cakephp framework. It is a rapid application framework for php. Cakephp already had a subproject called cakeamfphp. Looking at the code from cakeamfphp, I was able to get SWX running and call the cake controllers as remoting services. Go to the cakeswxphp page [...]]]></description>
			<content:encoded><![CDATA[<p>As some of you might know, I&#8217;m a great fan of the cakephp framework. It is a rapid application framework for php. Cakephp already had a subproject called cakeamfphp. Looking at the code from cakeamfphp, I was able to get SWX running and call the cake controllers as remoting services.</p>
<p>Go to the <a href="http://blog.aboutme.be/cakeswxphp">cakeswxphp page</a> for the latest downloads&#8230;</p>
<p>Just copy/past in your cake directory! Gateway locations are:</p>
<p>swx.php (SWX)<br />
amf.php (AMFPHP)<br />
json.php (JSON)</p>
<p>Currently it uses an adjusted version of SWX, based on SWX beta 1.0. I will try to update it to future versions of SWX when I get the time&#8230;</p>
<p>More info about SWX and cakephp at:</p>
<p><a target="_blank" title="SWX project" href="http://www.swxformat.org/">http://www.swxformat.org/</a><br />
<a target="_blank" title="aral balkan blog" href="http://www.aralbalkan.com/">http://www.aralbalkan.com/</a> (Aral Balkan, SWX author)<br />
<a target="_blank" title="cakephp project" href="http://www.cakephp.org/">http://www.cakephp.org/</a></p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.aboutme.be/2007/08/03/call-cakephp-through-swx-amf/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

