<?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>radikalFX &#187; Flash</title>
	<atom:link href="http://radikalfx.com/category/flash/feed/" rel="self" type="application/rss+xml" />
	<link>http://radikalfx.com</link>
	<description>In full FX</description>
	<lastBuildDate>Tue, 27 Dec 2011 11:44:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Communication between Flash and Javascript</title>
		<link>http://radikalfx.com/2008/04/03/communication-between-flash-and-javascript/</link>
		<comments>http://radikalfx.com/2008/04/03/communication-between-flash-and-javascript/#comments</comments>
		<pubDate>Thu, 03 Apr 2008 17:02:21 +0000</pubDate>
		<dc:creator>cra5h</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://radikalfx.com/2008/04/03/communication-between-flash-and-javascript/</guid>
		<description><![CDATA[Today I spend some time looking at the best way to communicating between a Flash Object and the Javascript in the page containing the Flash Object. After seeing a lot of out of date solutions I came by this article from Adobe: Using the External API for Flashâ€“JavaScript Communication It makes it really easy to [...]]]></description>
			<content:encoded><![CDATA[<p>Today I spend some time looking at the best way to communicating between a Flash Object and the Javascript in the page containing the Flash Object. After seeing a lot of out of date solutions I came by this article from Adobe:</p>
<blockquote><p><a href="http://www.adobe.com/devnet/flash/articles/external_interface_05.html">Using the External API for Flashâ€“JavaScript Communication</a></p></blockquote>
<p>It makes it really easy to do the communication between the two technologies by using the following code in Flash</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">external</span>.<span style="color: #66cc66;">*</span>;
<span style="color: #808080; font-style: italic;">// The name of a JavaScript function to call </span>
<span style="color: #000000; font-weight: bold;">var</span> callJasFunction:<span style="color: #0066CC;">String</span> = <span style="color: #ff0000;">&quot;callJavascript&quot;</span>;
<span style="color: #808080; font-style: italic;">//parameter </span>
<span style="color: #000000; font-weight: bold;">var</span> msg:<span style="color: #0066CC;">String</span> = <span style="color: #ff0000;">&quot;Hello. ^^&quot;</span>;
<span style="color: #808080; font-style: italic;">// The return value after calling JavaScript </span>
<span style="color: #000000; font-weight: bold;">var</span> returnValue:<span style="color: #0066CC;">String</span> = ExternalInterface.<span style="color: #0066CC;">call</span><span style="color: #66cc66;">&#40;</span>callJasFunction, msg<span style="color: #66cc66;">&#41;</span>.<span style="color: #0066CC;">toString</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
return_txt.<span style="color: #0066CC;">text</span> = returnValue;</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://radikalfx.com/2008/04/03/communication-between-flash-and-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

