<?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>Jawad.pk &#187; flash communication symfony</title>
	<atom:link href="http://jawad.pk/blog/tag/flash-communication-symfony/feed/" rel="self" type="application/rss+xml" />
	<link>http://jawad.pk/blog</link>
	<description>WEB 2.0 / RIAs Expert.</description>
	<lastBuildDate>Tue, 06 Sep 2011 12:43:02 +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>Using Flash with Symfony!</title>
		<link>http://jawad.pk/blog/2008/07/21/using-flash-with-symfony/</link>
		<comments>http://jawad.pk/blog/2008/07/21/using-flash-with-symfony/#comments</comments>
		<pubDate>Mon, 21 Jul 2008 18:57:22 +0000</pubDate>
		<dc:creator>Jawad Khan</dc:creator>
				<category><![CDATA[Flash Actionscript]]></category>
		<category><![CDATA[symfony]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[flash communication symfony]]></category>
		<category><![CDATA[flash with symfony]]></category>
		<category><![CDATA[symfony with flash]]></category>

		<guid isPermaLink="false">http://itsjawad.wordpress.com/?p=15</guid>
		<description><![CDATA[well being a flash developer and being a symfony developer feels really good .. Anyways, Symfony is awsome framework for developing today&#8217;s web-applications with its nice and fine MVC architecture. So symfony developers and flash developers should know how they will work together seamlessly. First thing is to embed the flash into your template, we [...]]]></description>
			<content:encoded><![CDATA[<p>well being a flash developer and being a symfony developer feels really good <img src='http://jawad.pk/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .. Anyways, Symfony is awsome framework for developing today&#8217;s web-applications with its nice and fine MVC architecture. So symfony developers and flash developers should know how they will work together seamlessly.<br />
First thing is to embed the flash into your template, we know that all the assets, graphics, javascripts, css etc belongs to the web folder of symfony&#8217;s project directory structure. So flash files will go here as well. I will recommend to create a folder named &#8216;flash&#8217; .</p>
<p>to embed the flash in your template, you will use same &lt;object&gt; tag as done in the normal html files, but ofcourse you will give the relative or absolute url of your flash src, for this purpose we can use functions like _compute_public_path(&#8230;) in symfony. it will take flash file&#8217;s parameters, like its name, extension and folder. this function returns the path which will be used for the embed source.</p>
<p>Now we are done with embeding, and now we will focus on data communication b/w flash and symfony, guess what its even more easier..  The right way to communicate data is in xml format. e.g. if my flash movie requires usernames and birthdays for all the members of my site, I will create an action specifically for the flash component, let&#8217;s say executeGetBirthdays(), i will create the template against the action as well.. Now i will put the xml generation logic in my action and i will print the resultant xml in my templateSuccess.php. Now I want the template to not to display irrelevant header and other info and just needs to start with the xml document root tag, so that my flash component can easily parse it. Therefore, I will put following line in the action:<br />
$this-&gt;setLayout(false);</p>
<p>Calling a symfony action from the flash is simple, just create an instance from the XML class..i.e<br />
x1 = new XML();//xml class rather<br />
x1.onLoad = function()<br />
{<br />
// xml parsing and rest of the stuff<br />
}</p>
<p>x1.load(&#8216;getBirthDays&#8217;);</p>
]]></content:encoded>
			<wfw:commentRss>http://jawad.pk/blog/2008/07/21/using-flash-with-symfony/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

