<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Returning values from JavaScript in your Flex applications using the ExternalInterface API</title>
	<atom:link href="http://blog.flexexamples.com/2008/03/11/returning-values-from-javascript-in-your-flex-applications-using-the-externalinterface-api/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flexexamples.com/2008/03/11/returning-values-from-javascript-in-your-flex-applications-using-the-externalinterface-api/</link>
	<description>Just a bunch of Adobe Flex Examples</description>
	<lastBuildDate>Mon, 13 Feb 2012 01:38:13 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: hari</title>
		<link>http://blog.flexexamples.com/2008/03/11/returning-values-from-javascript-in-your-flex-applications-using-the-externalinterface-api/comment-page-1/#comment-2852</link>
		<dc:creator>hari</dc:creator>
		<pubDate>Wed, 06 May 2009 08:36:48 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/03/11/returning-values-from-javascript-in-your-flex-applications-using-the-externalinterface-api/#comment-2852</guid>
		<description>hi peter, this is realy what im looking for.
simple example, just simple example that explains everything.

great!</description>
		<content:encoded><![CDATA[<p>hi peter, this is realy what im looking for.<br />
simple example, just simple example that explains everything.</p>
<p>great!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul</title>
		<link>http://blog.flexexamples.com/2008/03/11/returning-values-from-javascript-in-your-flex-applications-using-the-externalinterface-api/comment-page-1/#comment-2853</link>
		<dc:creator>Paul</dc:creator>
		<pubDate>Wed, 10 Dec 2008 17:38:01 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/03/11/returning-values-from-javascript-in-your-flex-applications-using-the-externalinterface-api/#comment-2853</guid>
		<description>I have downloaded the source and imported into Flex.  How do I get it to run?</description>
		<content:encoded><![CDATA[<p>I have downloaded the source and imported into Flex.  How do I get it to run?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nathan king</title>
		<link>http://blog.flexexamples.com/2008/03/11/returning-values-from-javascript-in-your-flex-applications-using-the-externalinterface-api/comment-page-1/#comment-2851</link>
		<dc:creator>nathan king</dc:creator>
		<pubDate>Wed, 23 Jul 2008 17:38:33 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/03/11/returning-values-from-javascript-in-your-flex-applications-using-the-externalinterface-api/#comment-2851</guid>
		<description>found it - for anyone else looking - you have to register the javascript function and associate it with the internal flex function you wish to call using the following syntax within your flex app:

ExternalInterface.addCallback(&quot;jsFunctionName&quot;, flexFunctionName);

or just try searching this blog (duh), apologies.
http://blog.flexexamples.com/2008/03/11/calling-actionscript-functions-from-your-html-templates-using-the-externalinterface-api/</description>
		<content:encoded><![CDATA[<p>found it &#8211; for anyone else looking &#8211; you have to register the javascript function and associate it with the internal flex function you wish to call using the following syntax within your flex app:</p>
<p>ExternalInterface.addCallback(&#8220;jsFunctionName&#8221;, flexFunctionName);</p>
<p>or just try searching this blog (duh), apologies.<br />
<a href="http://blog.flexexamples.com/2008/03/11/calling-actionscript-functions-from-your-html-templates-using-the-externalinterface-api/" rel="nofollow">http://blog.flexexamples.com/2008/03/11/calling-actionscript-functions-from-your-html-templates-using-the-externalinterface-api/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nathan king</title>
		<link>http://blog.flexexamples.com/2008/03/11/returning-values-from-javascript-in-your-flex-applications-using-the-externalinterface-api/comment-page-1/#comment-2854</link>
		<dc:creator>nathan king</dc:creator>
		<pubDate>Wed, 23 Jul 2008 15:30:24 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/03/11/returning-values-from-javascript-in-your-flex-applications-using-the-externalinterface-api/#comment-2854</guid>
		<description>poking around to find out if JS can make a call to a function inside a flex app without flex initiating the interaction. Thoughts?
Thank you so much forthe code examples,
-Nathan</description>
		<content:encoded><![CDATA[<p>poking around to find out if JS can make a call to a function inside a flex app without flex initiating the interaction. Thoughts?<br />
Thank you so much forthe code examples,<br />
-Nathan</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peterd</title>
		<link>http://blog.flexexamples.com/2008/03/11/returning-values-from-javascript-in-your-flex-applications-using-the-externalinterface-api/comment-page-1/#comment-2848</link>
		<dc:creator>peterd</dc:creator>
		<pubDate>Fri, 21 Mar 2008 23:38:52 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/03/11/returning-values-from-javascript-in-your-flex-applications-using-the-externalinterface-api/#comment-2848</guid>
		<description>MArcio,

If you&#039;re using the &lt;code&gt;creationComplete&lt;/code&gt; event, it may be a timing issue. With the ExternalInterface API there is never really a guarantee that the Flex app will complete before/after the HTML container its in.

What if you try using a timer and putting a delay of say, 2 seconds? (or 4 seconds).
If the code works in that scenario, I would guess its a simple timing issue and the HTML just isn&#039;t fully initialized yet.

Peter</description>
		<content:encoded><![CDATA[<p>MArcio,</p>
<p>If you&#8217;re using the <code>creationComplete</code> event, it may be a timing issue. With the ExternalInterface API there is never really a guarantee that the Flex app will complete before/after the HTML container its in.</p>
<p>What if you try using a timer and putting a delay of say, 2 seconds? (or 4 seconds).<br />
If the code works in that scenario, I would guess its a simple timing issue and the HTML just isn&#8217;t fully initialized yet.</p>
<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MArcio</title>
		<link>http://blog.flexexamples.com/2008/03/11/returning-values-from-javascript-in-your-flex-applications-using-the-externalinterface-api/comment-page-1/#comment-2850</link>
		<dc:creator>MArcio</dc:creator>
		<pubDate>Fri, 21 Mar 2008 18:55:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/03/11/returning-values-from-javascript-in-your-flex-applications-using-the-externalinterface-api/#comment-2850</guid>
		<description>arr.appVersion: undefined

I&#039;m usign on creationComplete of my mx:Application

&lt;pre class=&quot;code&quot;&gt;
private function callJavaScript_BrowserInfo():void {
var keys:Array = &quot;appCodeName,appName,appVersion,cookieEnabled,language,platform,systemLanguage,userAgent,userLanguage&quot;.split(&quot;,&quot;);
var arr:Array = ExternalInterface.call(&quot;getNavigatorObject&quot;, keys);
trace(&quot;arr.appVersion: &quot; + arr.appVersion);
dataGrid.dataProvider = arr;
if (arr){
for (var i:int = 0; i
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>arr.appVersion: undefined</p>
<p>I&#8217;m usign on creationComplete of my mx:Application</p>
<pre class="code">
private function callJavaScript_BrowserInfo():void {
var keys:Array = "appCodeName,appName,appVersion,cookieEnabled,language,platform,systemLanguage,userAgent,userLanguage".split(",");
var arr:Array = ExternalInterface.call("getNavigatorObject", keys);
trace("arr.appVersion: " + arr.appVersion);
dataGrid.dataProvider = arr;
if (arr){
for (var i:int = 0; i
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: peterd</title>
		<link>http://blog.flexexamples.com/2008/03/11/returning-values-from-javascript-in-your-flex-applications-using-the-externalinterface-api/comment-page-1/#comment-2849</link>
		<dc:creator>peterd</dc:creator>
		<pubDate>Fri, 21 Mar 2008 16:29:23 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/03/11/returning-values-from-javascript-in-your-flex-applications-using-the-externalinterface-api/#comment-2849</guid>
		<description>MArcio,

Does calling &lt;code&gt;trace(arr.appVersion);&lt;/code&gt; work after calling &lt;code&gt;ExternalInterface.call()&lt;/code&gt;?

Peter</description>
		<content:encoded><![CDATA[<p>MArcio,</p>
<p>Does calling <code>trace(arr.appVersion);</code> work after calling <code>ExternalInterface.call()</code>?</p>
<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MArcio</title>
		<link>http://blog.flexexamples.com/2008/03/11/returning-values-from-javascript-in-your-flex-applications-using-the-externalinterface-api/comment-page-1/#comment-2847</link>
		<dc:creator>MArcio</dc:creator>
		<pubDate>Fri, 21 Mar 2008 15:04:55 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/03/11/returning-values-from-javascript-in-your-flex-applications-using-the-externalinterface-api/#comment-2847</guid>
		<description>How to trace a value returned for example

&lt;pre class=&quot;code&quot;&gt;
private function callJavaScript():void {
var keys:Array = &quot;appCodeName,appName,appVersion,cookieEnabled,language,platform,systemLanguage,userAgent,userLanguage&quot;.split(&quot;,&quot;);
var arr:Array = ExternalInterface.call(&quot;getNavigatorObject&quot;, keys);
for (var i:int = 0; i
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>How to trace a value returned for example</p>
<pre class="code">
private function callJavaScript():void {
var keys:Array = "appCodeName,appName,appVersion,cookieEnabled,language,platform,systemLanguage,userAgent,userLanguage".split(",");
var arr:Array = ExternalInterface.call("getNavigatorObject", keys);
for (var i:int = 0; i
</pre>
]]></content:encoded>
	</item>
</channel>
</rss>

