<?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"
	>
<channel>
	<title>Comments on: Get current url to Flash swf using an External Interface call</title>
	<atom:link href="http://blog.circlecube.com/2008/01/02/get-current-url-to-flash-swf-using-an-external-interface-call/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.circlecube.com/2008/01/02/get-current-url-to-flash-swf-using-an-external-interface-call/</link>
	<description>Evan Mullins</description>
	<pubDate>Tue, 19 Aug 2008 21:57:46 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.1</generator>
		<item>
		<title>By: Sohaib Ali</title>
		<link>http://blog.circlecube.com/2008/01/02/get-current-url-to-flash-swf-using-an-external-interface-call/#comment-801</link>
		<dc:creator>Sohaib Ali</dc:creator>
		<pubDate>Thu, 10 Jul 2008 04:33:23 +0000</pubDate>
		<guid isPermaLink="false">http://blog.circlecube.com/2008/01/02/get-current-url-to-flash-swf-using-an-external-interface-call/#comment-801</guid>
		<description></description>
		<content:encoded><![CDATA[<br />
]]></content:encoded>
	</item>
	<item>
		<title>By: nick</title>
		<link>http://blog.circlecube.com/2008/01/02/get-current-url-to-flash-swf-using-an-external-interface-call/#comment-367</link>
		<dc:creator>nick</dc:creator>
		<pubDate>Fri, 30 May 2008 02:29:30 +0000</pubDate>
		<guid isPermaLink="false">http://blog.circlecube.com/2008/01/02/get-current-url-to-flash-swf-using-an-external-interface-call/#comment-367</guid>
		<description>I'm trying to use this function to insert the current url when people submit a form, the code is below but the import flash.external.*; is created an endless loop how can I fix it, and is the way im getting the url ok or should i just put it into a variable instead of using the function? I appreciate any help

thanks

stop();
System.useCodepage = true;
send_btn.onRelease = function() {
	
	import flash.external.*;

	function geturlhttp() {
	_root.urlPath = ExternalInterface.call("window.location.href.toString");
}
	
	my_vars = new LoadVars();
	my_vars.url = geturlhttp();
	my_vars.email = email_box.text;
	my_vars.name = name_box.text;
	if (my_vars.name != "" and my_vars.email != "" and my_vars.url != "") {

		my_vars.sendAndLoad("mailer.php", my_vars, "POST");
		gotoAndStop(2);
	} else {
		error_clip.gotoAndPlay(2);
	}
	my_vars.onLoad = function() {
		gotoAndStop(3);
	};
};
email_box.onSetFocus = subject_box.onSetFocus=message_box.onSetFocus=function () {
	if (error_clip._currentframe != 1) {
		error_clip.gotoAndPlay(6);
	}
};</description>
		<content:encoded><![CDATA[<p>I&#8217;m trying to use this function to insert the current url when people submit a form, the code is below but the import flash.external.*; is created an endless loop how can I fix it, and is the way im getting the url ok or should i just put it into a variable instead of using the function? I appreciate any help</p>
<p>thanks</p>
<p>stop();<br />
System.useCodepage = true;<br />
send_btn.onRelease = function() {</p>
<p>	import flash.external.*;</p>
<p>	function geturlhttp() {<br />
	_root.urlPath = ExternalInterface.call(&#8221;window.location.href.toString&#8221;);<br />
}</p>
<p>	my_vars = new LoadVars();<br />
	my_vars.url = geturlhttp();<br />
	my_vars.email = email_box.text;<br />
	my_vars.name = name_box.text;<br />
	if (my_vars.name != &#8220;&#8221; and my_vars.email != &#8220;&#8221; and my_vars.url != &#8220;&#8221;) {</p>
<p>		my_vars.sendAndLoad(&#8221;mailer.php&#8221;, my_vars, &#8220;POST&#8221;);<br />
		gotoAndStop(2);<br />
	} else {<br />
		error_clip.gotoAndPlay(2);<br />
	}<br />
	my_vars.onLoad = function() {<br />
		gotoAndStop(3);<br />
	};<br />
};<br />
email_box.onSetFocus = subject_box.onSetFocus=message_box.onSetFocus=function () {<br />
	if (error_clip._currentframe != 1) {<br />
		error_clip.gotoAndPlay(6);<br />
	}<br />
};</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sander van den Berg</title>
		<link>http://blog.circlecube.com/2008/01/02/get-current-url-to-flash-swf-using-an-external-interface-call/#comment-362</link>
		<dc:creator>Sander van den Berg</dc:creator>
		<pubDate>Thu, 29 May 2008 14:55:45 +0000</pubDate>
		<guid isPermaLink="false">http://blog.circlecube.com/2008/01/02/get-current-url-to-flash-swf-using-an-external-interface-call/#comment-362</guid>
		<description>Hello all!

@John: Think this will only give the URL of the location of the SWF, it won't give you the URL of the screen in which you are viewing the SWF.

for example: 
domain 1: contains SWF
domain 2: contains html file with embed sourcecode.

You want the URL of domain 2, so you can track ur SWF.


This is my issue aswell. Since im gonna work with paying clients, having their own layout. I want to dynamicly get their XML file containing layout info (which is on my server) based on a URL or Domainname send by them automaticly when viewing my SWF.</description>
		<content:encoded><![CDATA[<p>Hello all!</p>
<p>@John: Think this will only give the URL of the location of the SWF, it won&#8217;t give you the URL of the screen in which you are viewing the SWF.</p>
<p>for example:<br />
domain 1: contains SWF<br />
domain 2: contains html file with embed sourcecode.</p>
<p>You want the URL of domain 2, so you can track ur SWF.</p>
<p>This is my issue aswell. Since im gonna work with paying clients, having their own layout. I want to dynamicly get their XML file containing layout info (which is on my server) based on a URL or Domainname send by them automaticly when viewing my SWF.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John T. Bailey</title>
		<link>http://blog.circlecube.com/2008/01/02/get-current-url-to-flash-swf-using-an-external-interface-call/#comment-306</link>
		<dc:creator>John T. Bailey</dc:creator>
		<pubDate>Tue, 20 May 2008 15:36:14 +0000</pubDate>
		<guid isPermaLink="false">http://blog.circlecube.com/2008/01/02/get-current-url-to-flash-swf-using-an-external-interface-call/#comment-306</guid>
		<description>What is the advantage of using the ExternalInterface technique as you've described over the following:

[actionscript]
import flash.net.LocalConnection;
var lc:LocalConnection = new LocalConnection();
var domain:String = lc.domain;
trace(domain);
[/actionscript]</description>
		<content:encoded><![CDATA[<p>What is the advantage of using the ExternalInterface technique as you&#8217;ve described over the following:</p>
<p>[actionscript]<br />
import flash.net.LocalConnection;<br />
var lc:LocalConnection = new LocalConnection();<br />
var domain:String = lc.domain;<br />
trace(domain);<br />
[/actionscript]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Evan Mullins</title>
		<link>http://blog.circlecube.com/2008/01/02/get-current-url-to-flash-swf-using-an-external-interface-call/#comment-163</link>
		<dc:creator>Evan Mullins</dc:creator>
		<pubDate>Fri, 21 Mar 2008 04:30:59 +0000</pubDate>
		<guid isPermaLink="false">http://blog.circlecube.com/2008/01/02/get-current-url-to-flash-swf-using-an-external-interface-call/#comment-163</guid>
		<description>I've written an updated post on this subject see &lt;a href="http://blog.circlecube.com/2008/03/20/get-current-url-and-query-string-parameters-to-flash-tutorial/" rel="nofollow"&gt;Get Current URL and Query String Parameters&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>I&#8217;ve written an updated post on this subject see <a href="http://blog.circlecube.com/2008/03/20/get-current-url-and-query-string-parameters-to-flash-tutorial/"  rel="nofollow">Get Current URL and Query String Parameters</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kirk Strobeck</title>
		<link>http://blog.circlecube.com/2008/01/02/get-current-url-to-flash-swf-using-an-external-interface-call/#comment-145</link>
		<dc:creator>Kirk Strobeck</dc:creator>
		<pubDate>Tue, 04 Mar 2008 15:16:10 +0000</pubDate>
		<guid isPermaLink="false">http://blog.circlecube.com/2008/01/02/get-current-url-to-flash-swf-using-an-external-interface-call/#comment-145</guid>
		<description>I developed a new simple web tool that uses FScommand from flash and SWFObjecy implementation from the Javascript side. The two pair up nicely to make a functional addressing system in flash.

Check it out =&#62; &lt;a href="http://flashurl.net" rel="nofollow"&gt;http://flashURL.net&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>I developed a new simple web tool that uses FScommand from flash and SWFObjecy implementation from the Javascript side. The two pair up nicely to make a functional addressing system in flash.</p>
<p>Check it out =&gt; <a href="http://flashurl.net" onclick="javascript:pageTracker._trackPageview('/outbound/comment/flashurl.net');" rel="nofollow">http://flashURL.net</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ed McManus</title>
		<link>http://blog.circlecube.com/2008/01/02/get-current-url-to-flash-swf-using-an-external-interface-call/#comment-91</link>
		<dc:creator>Ed McManus</dc:creator>
		<pubDate>Sat, 09 Feb 2008 03:41:25 +0000</pubDate>
		<guid isPermaLink="false">http://blog.circlecube.com/2008/01/02/get-current-url-to-flash-swf-using-an-external-interface-call/#comment-91</guid>
		<description>Hi Guys,

Just thought you might like to know there's a solution to this problem. The following snippit works across all browsers I've tested (tho clearly it requires JS access):

var result:String = ExternalInterface.call('eval', 'window.location.href');

Hope it helps!</description>
		<content:encoded><![CDATA[<p>Hi Guys,</p>
<p>Just thought you might like to know there&#8217;s a solution to this problem. The following snippit works across all browsers I&#8217;ve tested (tho clearly it requires JS access):</p>
<p>var result:String = ExternalInterface.call(&#8217;eval&#8217;, &#8216;window.location.href&#8217;);</p>
<p>Hope it helps!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James</title>
		<link>http://blog.circlecube.com/2008/01/02/get-current-url-to-flash-swf-using-an-external-interface-call/#comment-85</link>
		<dc:creator>James</dc:creator>
		<pubDate>Fri, 01 Feb 2008 16:54:42 +0000</pubDate>
		<guid isPermaLink="false">http://blog.circlecube.com/2008/01/02/get-current-url-to-flash-swf-using-an-external-interface-call/#comment-85</guid>
		<description>@Evan - Thanks for this, learnt something new - just a shame it doesn't play ball in IE.

@agi - Good suggestion, I think that'll work...</description>
		<content:encoded><![CDATA[<p>@Evan - Thanks for this, learnt something new - just a shame it doesn&#8217;t play ball in IE.</p>
<p>@agi - Good suggestion, I think that&#8217;ll work&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: agi</title>
		<link>http://blog.circlecube.com/2008/01/02/get-current-url-to-flash-swf-using-an-external-interface-call/#comment-76</link>
		<dc:creator>agi</dc:creator>
		<pubDate>Sun, 27 Jan 2008 08:24:10 +0000</pubDate>
		<guid isPermaLink="false">http://blog.circlecube.com/2008/01/02/get-current-url-to-flash-swf-using-an-external-interface-call/#comment-76</guid>
		<description>You can also use location.href and pass it through SWFObject to get the current url of a page like:

so.addVariable("urlPageName", location.href);

I used it a couple of times across projects that needed to work locally and on the server. This worked fine for me across IE and Firefox.</description>
		<content:encoded><![CDATA[<p>You can also use location.href and pass it through SWFObject to get the current url of a page like:</p>
<p>so.addVariable(&#8221;urlPageName&#8221;, location.href);</p>
<p>I used it a couple of times across projects that needed to work locally and on the server. This worked fine for me across IE and Firefox.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Evan Mullins</title>
		<link>http://blog.circlecube.com/2008/01/02/get-current-url-to-flash-swf-using-an-external-interface-call/#comment-74</link>
		<dc:creator>Evan Mullins</dc:creator>
		<pubDate>Fri, 25 Jan 2008 16:12:10 +0000</pubDate>
		<guid isPermaLink="false">http://blog.circlecube.com/2008/01/02/get-current-url-to-flash-swf-using-an-external-interface-call/#comment-74</guid>
		<description>It is interesting, it seems to have a lot to do with the Microsoft's dealings with Active content. Clicking on the "&lt;a href="http://blog.circlecube.com/wp-content/uploads/2008/01/externalinterface.html" target="_blank" rel="nofollow"&gt;External Interface html Example&lt;/a&gt;" link does work in IE. I have struggled at getting this to work in IE scenarios also. Any suggestions?</description>
		<content:encoded><![CDATA[<p>It is interesting, it seems to have a lot to do with the Microsoft&#8217;s dealings with Active content. Clicking on the &#8220;<a href="http://blog.circlecube.com/wp-content/uploads/2008/01/externalinterface.html"  target="_blank" rel="nofollow">External Interface html Example</a>&#8221; link does work in IE. I have struggled at getting this to work in IE scenarios also. Any suggestions?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
