<?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: ExternalInterface API Examples</title>
	<atom:link href="http://www.mikechambers.com/blog/2005/10/25/externalinterface-api-examples/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mikechambers.com/blog/2005/10/25/externalinterface-api-examples/</link>
	<description>code = joy</description>
	<lastBuildDate>Thu, 11 Mar 2010 21:22:56 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Daveb</title>
		<link>http://www.mikechambers.com/blog/2005/10/25/externalinterface-api-examples/comment-page-1/#comment-16888</link>
		<dc:creator>Daveb</dc:creator>
		<pubDate>Fri, 02 Oct 2009 14:24:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikechambers.com/blog/?p=922#comment-16888</guid>
		<description>Communication between JavaScript and ActionScript fails if a Flash or Flex movie uses ExternalInterface inside a form tag in Internet Explorer.

solution

Add the following script after the embedded Flash movie: 

window.[flash_movie_id] = document.forms[0].[flash_movie_id] ; 

For example, if your flash_movie_id is called &quot;sample&quot; you would use the following: 

window.sample = document.forms[0].sample; 

http://kb2.adobe.com/cps/400/kb400730.html</description>
		<content:encoded><![CDATA[<p>Communication between JavaScript and ActionScript fails if a Flash or Flex movie uses ExternalInterface inside a form tag in Internet Explorer.</p>
<p>solution</p>
<p>Add the following script after the embedded Flash movie: </p>
<p>window.[flash_movie_id] = document.forms[0].[flash_movie_id] ; </p>
<p>For example, if your flash_movie_id is called &#8220;sample&#8221; you would use the following: </p>
<p>window.sample = document.forms[0].sample; </p>
<p><a href="http://kb2.adobe.com/cps/400/kb400730.html" rel="nofollow">http://kb2.adobe.com/cps/400/kb400730.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tiberiu</title>
		<link>http://www.mikechambers.com/blog/2005/10/25/externalinterface-api-examples/comment-page-1/#comment-6358</link>
		<dc:creator>tiberiu</dc:creator>
		<pubDate>Thu, 11 Jan 2007 21:52:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikechambers.com/blog/?p=922#comment-6358</guid>
		<description>The workarownd doesn&#039;t work in IE; It works, but with errors
</description>
		<content:encoded><![CDATA[<p>The workarownd doesn&#8217;t work in IE; It works, but with errors</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: brian dunnington</title>
		<link>http://www.mikechambers.com/blog/2005/10/25/externalinterface-api-examples/comment-page-1/#comment-6357</link>
		<dc:creator>brian dunnington</dc:creator>
		<pubDate>Tue, 09 May 2006 23:59:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikechambers.com/blog/?p=922#comment-6357</guid>
		<description>here is my workaround for the &quot;movies inside of FORM tags dont work properly&quot; bug. simply include the following javascript BEFORE the flash movies in the HTML. (this code is based on the work by anonym[+] posted in the macromedia livedocs)

&lt;script type=&quot;text/javascript&quot;&gt;
function ExternalInterfaceManager()
{
	this.registerMovie = function(movieName) {
			if(!window.fakeMovies) window.fakeMovies = new Array();
			window.fakeMovies[window.fakeMovies.length] = movieName;
		}
	this.initialize = function() {
			if(document.all)
			{
				if(window.fakeMovies)
				{
					for(i=0;i&lt;window.fakeMovies.length;i++)
					{
						window[window.fakeMovies[i]] = new Object();
					}
					window.onload = initializeExternalInterface;
				}
			}

		}
}

function initializeExternalInterface()
{
	for(i=0;i&lt;window.fakeMovies.length;i++)
	{
		var movieName = window.fakeMovies[i];
		var fakeMovie = window[movieName];
		var realMovie = document.getElementById(movieName);

		for(var method in fakeMovie)
		{
			realMovie[method] = function() {flashFunction = &quot;&lt;invoke name=\&quot;&quot; + method.toString() + &quot;\&quot; returntype=\&quot;javascript\&quot;&gt;&quot; + __flash__argumentsToXML(arguments, 0) + &quot;&lt;/invoke&gt;&quot;;this.CallFunction(flashFunction);}
		}

		window[movieName] = realMovie;
	}
}

&lt;/script&gt;


&lt;script type=&quot;text/javascript&quot;&gt;
var eim = new ExternalInterfaceManager();
eim.registerMovie(&quot;ShockwaveFlash1&quot;);
eim.registerMovie(&quot;ShockwaveFlash2&quot;);
eim.initialize();
&lt;/script&gt;</description>
		<content:encoded><![CDATA[<p>here is my workaround for the &#8220;movies inside of FORM tags dont work properly&#8221; bug. simply include the following javascript BEFORE the flash movies in the HTML. (this code is based on the work by anonym[+] posted in the macromedia livedocs)</p>
<p>&lt;script type=&#8221;text/javascript&#8221;&gt;<br />
function ExternalInterfaceManager()<br />
{<br />
	this.registerMovie = function(movieName) {<br />
			if(!window.fakeMovies) window.fakeMovies = new Array();<br />
			window.fakeMovies[window.fakeMovies.length] = movieName;<br />
		}<br />
	this.initialize = function() {<br />
			if(document.all)<br />
			{<br />
				if(window.fakeMovies)<br />
				{<br />
					for(i=0;i&lt;window.fakeMovies.length;i++)<br />
					{<br />
						window[window.fakeMovies[i]] = new Object();<br />
					}<br />
					window.onload = initializeExternalInterface;<br />
				}<br />
			}</p>
<p>		}<br />
}</p>
<p>function initializeExternalInterface()<br />
{<br />
	for(i=0;i&lt;window.fakeMovies.length;i++)<br />
	{<br />
		var movieName = window.fakeMovies[i];<br />
		var fakeMovie = window[movieName];<br />
		var realMovie = document.getElementById(movieName);</p>
<p>		for(var method in fakeMovie)<br />
		{<br />
			realMovie[method] = function() {flashFunction = &#8220;&lt;invoke name=\&#8221;" + method.toString() + &#8220;\&#8221; returntype=\&#8221;javascript\&#8221;&gt;&#8221; + __flash__argumentsToXML(arguments, 0) + &#8220;&lt;/invoke&gt;&#8221;;this.CallFunction(flashFunction);}<br />
		}</p>
<p>		window[movieName] = realMovie;<br />
	}<br />
}</p>
<p>&lt;/script&gt;</p>
<p>&lt;script type=&#8221;text/javascript&#8221;&gt;<br />
var eim = new ExternalInterfaceManager();<br />
eim.registerMovie(&#8220;ShockwaveFlash1&#8243;);<br />
eim.registerMovie(&#8220;ShockwaveFlash2&#8243;);<br />
eim.initialize();<br />
&lt;/script&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Youness Chraibi</title>
		<link>http://www.mikechambers.com/blog/2005/10/25/externalinterface-api-examples/comment-page-1/#comment-6356</link>
		<dc:creator>Youness Chraibi</dc:creator>
		<pubDate>Wed, 15 Feb 2006 19:21:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikechambers.com/blog/?p=922#comment-6356</guid>
		<description>Hi Mike,

I am having a similar problem to Mesh, in IE the External Interface call is unable to correctly call the given script if the Flash is inside a  tag.

The error message is:

...
Error: &#039;componentName&#039; is undefined
Code: 0

where componentName is the Flash component name.

Is there any work around (appart from using getURL(&quot;javascript:...&quot;)) ?

Thanks a Lot,

Youness</description>
		<content:encoded><![CDATA[<p>Hi Mike,</p>
<p>I am having a similar problem to Mesh, in IE the External Interface call is unable to correctly call the given script if the Flash is inside a  tag.</p>
<p>The error message is:</p>
<p>&#8230;<br />
Error: &#8216;componentName&#8217; is undefined<br />
Code: 0</p>
<p>where componentName is the Flash component name.</p>
<p>Is there any work around (appart from using getURL(&#8220;javascript:&#8230;&#8221;)) ?</p>
<p>Thanks a Lot,</p>
<p>Youness</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Luis Bontempo</title>
		<link>http://www.mikechambers.com/blog/2005/10/25/externalinterface-api-examples/comment-page-1/#comment-6355</link>
		<dc:creator>Luis Bontempo</dc:creator>
		<pubDate>Tue, 10 Jan 2006 17:17:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikechambers.com/blog/?p=922#comment-6355</guid>
		<description>Hi Mike,

I am having a similar problem to Mesh, in IE the External Interface call is unable to correctly call the given script if the Flash is inside a  tag.

The error message is:

[code]
...
Error: &#039;[i]componentName[/i]&#039; is undefined
Code: 0
[/code]

where [i]componentName[/i] is the Flash component name.

Is there any work around (appart from using getURL(&quot;javascript:...&quot;)) ?

Thanks a Lot,

Luis</description>
		<content:encoded><![CDATA[<p>Hi Mike,</p>
<p>I am having a similar problem to Mesh, in IE the External Interface call is unable to correctly call the given script if the Flash is inside a  tag.</p>
<p>The error message is:</p>
<p>[code]<br />
...<br />
Error: '[i]componentName[/i]' is undefined<br />
Code: 0<br />
[/code]</p>
<p>where [i]componentName[/i] is the Flash component name.</p>
<p>Is there any work around (appart from using getURL(&#8220;javascript:&#8230;&#8221;)) ?</p>
<p>Thanks a Lot,</p>
<p>Luis</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dan</title>
		<link>http://www.mikechambers.com/blog/2005/10/25/externalinterface-api-examples/comment-page-1/#comment-6354</link>
		<dc:creator>dan</dc:creator>
		<pubDate>Wed, 04 Jan 2006 19:05:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikechambers.com/blog/?p=922#comment-6354</guid>
		<description>we are using externalInterface with c#
while we can get messages back and forth, we are having problems when we make a class for the communications
is there a scope issue when you make a class for externalInterface functionality?
it doesnt seem to like to communicate with other objects or raise events
or am i doing something wrong?</description>
		<content:encoded><![CDATA[<p>we are using externalInterface with c#<br />
while we can get messages back and forth, we are having problems when we make a class for the communications<br />
is there a scope issue when you make a class for externalInterface functionality?<br />
it doesnt seem to like to communicate with other objects or raise events<br />
or am i doing something wrong?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Julien Couvreur</title>
		<link>http://www.mikechambers.com/blog/2005/10/25/externalinterface-api-examples/comment-page-1/#comment-6353</link>
		<dc:creator>Julien Couvreur</dc:creator>
		<pubDate>Wed, 28 Dec 2005 21:17:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikechambers.com/blog/?p=922#comment-6353</guid>
		<description>Hi Mike,

I&#039;m using ExternalInterface in Flash 8 and encountered a performance problem. Passing large parameters (a 30-100k string) to ExternalInterface.call takes a really long time (20-100sec) even if no processing occurs on the javascript side.

Any advice, comment or work-around?

Thanks,</description>
		<content:encoded><![CDATA[<p>Hi Mike,</p>
<p>I&#8217;m using ExternalInterface in Flash 8 and encountered a performance problem. Passing large parameters (a 30-100k string) to ExternalInterface.call takes a really long time (20-100sec) even if no processing occurs on the javascript side.</p>
<p>Any advice, comment or work-around?</p>
<p>Thanks,</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott Williams</title>
		<link>http://www.mikechambers.com/blog/2005/10/25/externalinterface-api-examples/comment-page-1/#comment-6352</link>
		<dc:creator>Scott Williams</dc:creator>
		<pubDate>Fri, 18 Nov 2005 15:58:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikechambers.com/blog/?p=922#comment-6352</guid>
		<description>Hi Mike, great presentation on this at Max.  I&#039;ve started building .Net apps using the Flash ActiveX control embedded within a C# app.  Many of the apps I build requre irregularly shaped windows -- meaning a transparent background.

The problem is that I can&#039;t figure out how to tell the control not to draw the background (you can have flash content with transparent backgrounds when running within HTML.  So I&#039;m assuming that browsers that use it have a way to make backgrounds transparent).  The &quot;WMode&quot; property doesn&#039;t seem to do the trick for me.  Any suggestions?</description>
		<content:encoded><![CDATA[<p>Hi Mike, great presentation on this at Max.  I&#8217;ve started building .Net apps using the Flash ActiveX control embedded within a C# app.  Many of the apps I build requre irregularly shaped windows &#8212; meaning a transparent background.</p>
<p>The problem is that I can&#8217;t figure out how to tell the control not to draw the background (you can have flash content with transparent backgrounds when running within HTML.  So I&#8217;m assuming that browsers that use it have a way to make backgrounds transparent).  The &#8220;WMode&#8221; property doesn&#8217;t seem to do the trick for me.  Any suggestions?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: eru</title>
		<link>http://www.mikechambers.com/blog/2005/10/25/externalinterface-api-examples/comment-page-1/#comment-6351</link>
		<dc:creator>eru</dc:creator>
		<pubDate>Sun, 06 Nov 2005 08:28:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikechambers.com/blog/?p=922#comment-6351</guid>
		<description>Hi Mike,
    Can you include some examples of using this API with a .NET assembly? If you could put up some straight Flash 8 ones too that would be great.

Thanks,
   eru</description>
		<content:encoded><![CDATA[<p>Hi Mike,<br />
    Can you include some examples of using this API with a .NET assembly? If you could put up some straight Flash 8 ones too that would be great.</p>
<p>Thanks,<br />
   eru</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paulo Azevedo</title>
		<link>http://www.mikechambers.com/blog/2005/10/25/externalinterface-api-examples/comment-page-1/#comment-6350</link>
		<dc:creator>Paulo Azevedo</dc:creator>
		<pubDate>Wed, 26 Oct 2005 06:59:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikechambers.com/blog/?p=922#comment-6350</guid>
		<description>Mike , have you noticed that this API does not work in IE, if you put the flash Object inside   tags? Still, it works fine in Firefox.</description>
		<content:encoded><![CDATA[<p>Mike , have you noticed that this API does not work in IE, if you put the flash Object inside   tags? Still, it works fine in Firefox.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
