<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.2.1" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Determining which server/domain a SWF is hosted on</title>
	<link>http://blog.flexexamples.com/2007/08/09/determining-which-serverdomain-a-swf-is-hosted-on/</link>
	<description>A bunch of examples for Adobe Flex and ActionScript</description>
	<pubDate>Fri, 05 Dec 2008 09:48:53 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.1</generator>

	<item>
		<title>By: peterd</title>
		<link>http://blog.flexexamples.com/2007/08/09/determining-which-serverdomain-a-swf-is-hosted-on/#comment-14875</link>
		<author>peterd</author>
		<pubDate>Fri, 22 Aug 2008 22:19:03 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/08/09/determining-which-serverdomain-a-swf-is-hosted-on/#comment-14875</guid>
		<description>jlafferty,

You are welcome. That will be $3 please.

Peter</description>
		<content:encoded><![CDATA[<p>jlafferty,</p>
<p>You are welcome. That will be $3 please.</p>
<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jlafferty</title>
		<link>http://blog.flexexamples.com/2007/08/09/determining-which-serverdomain-a-swf-is-hosted-on/#comment-14874</link>
		<author>jlafferty</author>
		<pubDate>Fri, 22 Aug 2008 22:13:21 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/08/09/determining-which-serverdomain-a-swf-is-hosted-on/#comment-14874</guid>
		<description>Thanks PD. I did a quick web search because I forgot how to do this and you had the answer. :)</description>
		<content:encoded><![CDATA[<p>Thanks PD. I did a quick web search because I forgot how to do this and you had the answer. :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charles</title>
		<link>http://blog.flexexamples.com/2007/08/09/determining-which-serverdomain-a-swf-is-hosted-on/#comment-12437</link>
		<author>Charles</author>
		<pubDate>Fri, 02 May 2008 13:29:49 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/08/09/determining-which-serverdomain-a-swf-is-hosted-on/#comment-12437</guid>
		<description>Thanks for this solution peterd.
Congrats for the post.

Charles, www.tldsco.com</description>
		<content:encoded><![CDATA[<p>Thanks for this solution peterd.<br />
Congrats for the post.</p>
<p>Charles, <a href="http://www.tldsco.com" rel="nofollow">www.tldsco.com</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peterd</title>
		<link>http://blog.flexexamples.com/2007/08/09/determining-which-serverdomain-a-swf-is-hosted-on/#comment-10132</link>
		<author>peterd</author>
		<pubDate>Sat, 05 Apr 2008 01:13:03 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/08/09/determining-which-serverdomain-a-swf-is-hosted-on/#comment-10132</guid>
		<description>Wayne,

I don't believe it does, but you could use the ExternalInterface API to get that information from your HTML container using JavaScript. For example, see &lt;a href="http://blog.flexexamples.com/2008/03/11/returning-values-from-javascript-in-your-flex-applications-using-the-externalinterface-api/" rel="nofollow"&gt;&lt;u&gt;"Returning values from JavaScript in your Flex applications using the ExternalInterface API"&lt;/u&gt;&lt;/a&gt;.

Peter</description>
		<content:encoded><![CDATA[<p>Wayne,</p>
<p>I don&#8217;t believe it does, but you could use the ExternalInterface API to get that information from your HTML container using JavaScript. For example, see <a href="http://blog.flexexamples.com/2008/03/11/returning-values-from-javascript-in-your-flex-applications-using-the-externalinterface-api/" rel="nofollow"><u>&#8220;Returning values from JavaScript in your Flex applications using the ExternalInterface API&#8221;</u></a>.</p>
<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wayne</title>
		<link>http://blog.flexexamples.com/2007/08/09/determining-which-serverdomain-a-swf-is-hosted-on/#comment-10122</link>
		<author>Wayne</author>
		<pubDate>Fri, 04 Apr 2008 23:39:34 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/08/09/determining-which-serverdomain-a-swf-is-hosted-on/#comment-10122</guid>
		<description>peterd,
Very handy. Does URLUtil has functions to get referer and user agent, similar to PHP's $_SERVER['HTTP_REFERER'] and $_SERVER['HTTP_USER_AGENT']? Thank you.
Wayne</description>
		<content:encoded><![CDATA[<p>peterd,<br />
Very handy. Does URLUtil has functions to get referer and user agent, similar to PHP&#8217;s $_SERVER[&#8217;HTTP_REFERER&#8217;] and $_SERVER[&#8217;HTTP_USER_AGENT&#8217;]? Thank you.<br />
Wayne</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dale</title>
		<link>http://blog.flexexamples.com/2007/08/09/determining-which-serverdomain-a-swf-is-hosted-on/#comment-7119</link>
		<author>Dale</author>
		<pubDate>Thu, 21 Feb 2008 17:52:12 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/08/09/determining-which-serverdomain-a-swf-is-hosted-on/#comment-7119</guid>
		<description>Thanks for this one peterd - I'd been scouring around all morning trying to find a solution like this!</description>
		<content:encoded><![CDATA[<p>Thanks for this one peterd - I&#8217;d been scouring around all morning trying to find a solution like this!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peterd</title>
		<link>http://blog.flexexamples.com/2007/08/09/determining-which-serverdomain-a-swf-is-hosted-on/#comment-129</link>
		<author>peterd</author>
		<pubDate>Fri, 10 Aug 2007 16:30:06 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/08/09/determining-which-serverdomain-a-swf-is-hosted-on/#comment-129</guid>
		<description>Dasa,

Yes, I believe you can use &lt;code&gt;Application.application.url&lt;/code&gt; if you just have one main SWF (&lt;code&gt;Application.application.url&lt;/code&gt; and &lt;code&gt;Application.application.loaderInfo.url&lt;/code&gt; should return the same value), but if you're loading another Flex SWF using the SWFLoader control, I believe they start returning different values.

For example, in the loaded SWF, I believe &lt;code&gt;Application.application.loaderInfo.url&lt;/code&gt; returns the current losded SWF file's URL, whereas &lt;code&gt;Application.application.url&lt;/code&gt; returns the &lt;em&gt;parent&lt;/em&gt; SWFs URL.

At least thats what I think.</description>
		<content:encoded><![CDATA[<p>Dasa,</p>
<p>Yes, I believe you can use <code>Application.application.url</code> if you just have one main SWF (<code>Application.application.url</code> and <code>Application.application.loaderInfo.url</code> should return the same value), but if you&#8217;re loading another Flex SWF using the SWFLoader control, I believe they start returning different values.</p>
<p>For example, in the loaded SWF, I believe <code>Application.application.loaderInfo.url</code> returns the current losded SWF file&#8217;s URL, whereas <code>Application.application.url</code> returns the <em>parent</em> SWFs URL.</p>
<p>At least thats what I think.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dasa</title>
		<link>http://blog.flexexamples.com/2007/08/09/determining-which-serverdomain-a-swf-is-hosted-on/#comment-128</link>
		<author>Dasa</author>
		<pubDate>Fri, 10 Aug 2007 15:54:29 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/08/09/determining-which-serverdomain-a-swf-is-hosted-on/#comment-128</guid>
		<description>Couldn't you also just use Application.application.url ?</description>
		<content:encoded><![CDATA[<p>Couldn&#8217;t you also just use Application.application.url ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peterd</title>
		<link>http://blog.flexexamples.com/2007/08/09/determining-which-serverdomain-a-swf-is-hosted-on/#comment-126</link>
		<author>peterd</author>
		<pubDate>Fri, 10 Aug 2007 14:29:31 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/08/09/determining-which-serverdomain-a-swf-is-hosted-on/#comment-126</guid>
		<description>Charly,

Yep, its a String. If I would have displayed the full URL, it would have shown:
http://blog.flexexamples.com/wp-content/uploads/Application_loaderInfo_url_test/bin/main.swf

Although I used the &lt;code&gt;URLUtil.getServerName()&lt;/code&gt; method to just return the server name, or just "blog.flexexamples.com".</description>
		<content:encoded><![CDATA[<p>Charly,</p>
<p>Yep, its a String. If I would have displayed the full URL, it would have shown:<br />
<a href="http://blog.flexexamples.com/wp-content/uploads/Application_loaderInfo_url_test/bin/main.swf" rel="nofollow">http://blog.flexexamples.com/wp-content/uploads/Application_loaderInfo_url_test/bin/main.swf</a></p>
<p>Although I used the <code>URLUtil.getServerName()</code> method to just return the server name, or just &#8220;blog.flexexamples.com&#8221;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charly</title>
		<link>http://blog.flexexamples.com/2007/08/09/determining-which-serverdomain-a-swf-is-hosted-on/#comment-123</link>
		<author>Charly</author>
		<pubDate>Fri, 10 Aug 2007 08:26:13 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/08/09/determining-which-serverdomain-a-swf-is-hosted-on/#comment-123</guid>
		<description>Hi,

what kind of dataType is returned from the loaderInfo.url? Must be a String...isn't it?</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>what kind of dataType is returned from the loaderInfo.url? Must be a String&#8230;isn&#8217;t it?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
