<?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: Determining which server/domain a SWF is hosted on</title>
	<atom:link href="http://blog.flexexamples.com/2007/08/09/determining-which-serverdomain-a-swf-is-hosted-on/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flexexamples.com/2007/08/09/determining-which-serverdomain-a-swf-is-hosted-on/</link>
	<description>Just a bunch of Adobe Flex Examples</description>
	<lastBuildDate>Sun, 12 Feb 2012 14:19:03 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: umpirsky</title>
		<link>http://blog.flexexamples.com/2007/08/09/determining-which-serverdomain-a-swf-is-hosted-on/comment-page-1/#comment-9083</link>
		<dc:creator>umpirsky</dc:creator>
		<pubDate>Fri, 25 Mar 2011 08:29:08 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/09/determining-which-serverdomain-a-swf-is-hosted-on/#comment-9083</guid>
		<description>var localConnection:LocalConnection = new LocalConnection();
trace(localConnection.domain);</description>
		<content:encoded><![CDATA[<p>var localConnection:LocalConnection = new LocalConnection();<br />
trace(localConnection.domain);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: moonraider</title>
		<link>http://blog.flexexamples.com/2007/08/09/determining-which-serverdomain-a-swf-is-hosted-on/comment-page-1/#comment-8789</link>
		<dc:creator>moonraider</dc:creator>
		<pubDate>Fri, 31 Dec 2010 07:34:24 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/09/determining-which-serverdomain-a-swf-is-hosted-on/#comment-8789</guid>
		<description>I am new to flex. i wanted to do the following
i want an swf file to call another swf file which has widgets in it and is hosted on another server. like a main swf hosted on iis. i added link of another swf file (full qualified path on its config.xml file) which is hosted on apache. will it work</description>
		<content:encoded><![CDATA[<p>I am new to flex. i wanted to do the following<br />
i want an swf file to call another swf file which has widgets in it and is hosted on another server. like a main swf hosted on iis. i added link of another swf file (full qualified path on its config.xml file) which is hosted on apache. will it work</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jbuda</title>
		<link>http://blog.flexexamples.com/2007/08/09/determining-which-serverdomain-a-swf-is-hosted-on/comment-page-1/#comment-8167</link>
		<dc:creator>jbuda</dc:creator>
		<pubDate>Wed, 28 Jul 2010 08:50:36 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/09/determining-which-serverdomain-a-swf-is-hosted-on/#comment-8167</guid>
		<description>Very handy post, just been looking at how to do this with my Flex application, and found this solution spot on.

Thanks</description>
		<content:encoded><![CDATA[<p>Very handy post, just been looking at how to do this with my Flex application, and found this solution spot on.</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vineet</title>
		<link>http://blog.flexexamples.com/2007/08/09/determining-which-serverdomain-a-swf-is-hosted-on/comment-page-1/#comment-7025</link>
		<dc:creator>vineet</dc:creator>
		<pubDate>Mon, 15 Feb 2010 21:09:48 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/09/determining-which-serverdomain-a-swf-is-hosted-on/#comment-7025</guid>
		<description>Thanks for the posting. I have a flex application that communicates with a .net webservice. The problem is I do not want to hard code the webservice address. ie wsdl=&quot;http://.....&quot; How do I know the domain name at runtime where the application is hosted. Please help.</description>
		<content:encoded><![CDATA[<p>Thanks for the posting. I have a flex application that communicates with a .net webservice. The problem is I do not want to hard code the webservice address. ie wsdl=&#8221;http://&#8230;..&#8221; How do I know the domain name at runtime where the application is hosted. Please help.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://blog.flexexamples.com/2007/08/09/determining-which-serverdomain-a-swf-is-hosted-on/comment-page-1/#comment-6262</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Thu, 05 Nov 2009 19:42:32 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/09/determining-which-serverdomain-a-swf-is-hosted-on/#comment-6262</guid>
		<description>Great, thanx! :)</description>
		<content:encoded><![CDATA[<p>Great, thanx! :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter deHaan</title>
		<link>http://blog.flexexamples.com/2007/08/09/determining-which-serverdomain-a-swf-is-hosted-on/comment-page-1/#comment-5152</link>
		<dc:creator>Peter deHaan</dc:creator>
		<pubDate>Fri, 14 Aug 2009 03:32:55 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/09/determining-which-serverdomain-a-swf-is-hosted-on/#comment-5152</guid>
		<description>Steve,

I&#039;m a little unclear on what you&#039;re trying to do. Are you trying to load an external SWF into a Flex project at runtime (presumably using SWFLoader) and pass variables to the nested SWF?

If so, does this help:
&lt;pre lang=&quot;mxml&quot;&gt;
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;mx:Application xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot;&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            protected function btn_clickHandler(evt:MouseEvent):void {
                swfLdr.source = &quot;subApp.swf?text=&quot; + encodeURIComponent(txtInput.text) + &quot;&amp;color=&quot; + cp.selectedColor;
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:ApplicationControlBar dock=&quot;true&quot; defaultButton=&quot;{btn}&quot;&gt;
        &lt;mx:TextInput id=&quot;txtInput&quot; maxChars=&quot;32&quot; /&gt;
        &lt;mx:ColorPicker id=&quot;cp&quot; /&gt;
        &lt;mx:Button id=&quot;btn&quot; label=&quot;Send and Load&quot; click=&quot;btn_clickHandler(event);&quot; /&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:SWFLoader id=&quot;swfLdr&quot; width=&quot;320&quot; height=&quot;240&quot; /&gt;

&lt;/mx:Application&gt;
&lt;/pre&gt;

And my nested SWF, &lt;em&gt;subApp.swf&lt;/em&gt;, was built from the following (subApp.mxml):
&lt;pre lang=&quot;mxml&quot;&gt;
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;mx:Application xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot;
        backgroundColor=&quot;haloBlue&quot;
        applicationComplete=&quot;init();&quot;&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            protected function init():void {
                lbl.text = this.loaderInfo.parameters.text;
                lbl.setStyle(&quot;color&quot;, this.loaderInfo.parameters.color);
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:Text id=&quot;lbl&quot;
            fontSize=&quot;32&quot;
            width=&quot;90%&quot; height=&quot;90%&quot;
            horizontalCenter=&quot;0&quot; verticalCenter=&quot;0&quot; /&gt;

&lt;/mx:Application&gt;
&lt;/pre&gt;

Or, for bonus points, here&#039;s how you could create the loaded sub-application using ActionScript only (oooooh, fancy!):
&lt;pre lang=&quot;actionscript3&quot;&gt;
package {
    import flash.display.MovieClip;
    import flash.text.TextField;
    import flash.text.TextFormat;

    [SWF(width=&quot;320&quot;, height=&quot;240&quot;, backgroundColor=&quot;#CCCCCC&quot;)]

    public class subASApp extends MovieClip {
        public var tf:TextField;

        public function subASApp() {
            super();
            init();
        }

        private function init():void {
            var fmt:TextFormat = new TextFormat();
            fmt.font = &quot;Arial&quot;;
            fmt.size = 24;
            if (this.loaderInfo.parameters.hasOwnProperty(&quot;color&quot;)) {
                fmt.color = parseInt(this.loaderInfo.parameters.color);
            }

            tf = new TextField();
            tf.width = 300;
            tf.height = 220;
            tf.x = 10;
            tf.y = 10;
            tf.wordWrap = true;
            tf.multiline = true;
            tf.defaultTextFormat = fmt;
            tf.text = this.loaderInfo.parameters.text;
            if (tf.text.length == 0) {
                tf.text = &quot;(default)&quot;;
            }
            addChild(tf);
        }
    }
}
&lt;/pre&gt;

Peter</description>
		<content:encoded><![CDATA[<p>Steve,</p>
<p>I&#8217;m a little unclear on what you&#8217;re trying to do. Are you trying to load an external SWF into a Flex project at runtime (presumably using SWFLoader) and pass variables to the nested SWF?</p>
<p>If so, does this help:</p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;">&lt;?xml version=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Application</span> xmlns:mx=<span style="color: #ff0000;">&quot;http://www.adobe.com/2006/mxml&quot;</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #339933;">&lt;mx:Script&gt;</span>
<span style="color: #339933;">        &lt;![CDATA[</span>
<span style="color: #339933;">            protected function btn_clickHandler(evt:MouseEvent):void {</span>
<span style="color: #339933;">                swfLdr.source = &quot;subApp.swf?text=&quot; + encodeURIComponent(txtInput.text) + &quot;&amp;color=&quot; + cp.selectedColor;</span>
<span style="color: #339933;">            }</span>
<span style="color: #339933;">        ]]&gt;</span>
<span style="color: #339933;">    &lt;/mx:Script&gt;</span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:ApplicationControlBar</span> dock=<span style="color: #ff0000;">&quot;true&quot;</span> defaultButton=<span style="color: #ff0000;">&quot;{btn}&quot;</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:TextInput</span> id=<span style="color: #ff0000;">&quot;txtInput&quot;</span> maxChars=<span style="color: #ff0000;">&quot;32&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:ColorPicker</span> id=<span style="color: #ff0000;">&quot;cp&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Button</span> id=<span style="color: #ff0000;">&quot;btn&quot;</span> label=<span style="color: #ff0000;">&quot;Send and Load&quot;</span> click=<span style="color: #ff0000;">&quot;btn_clickHandler(event);&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:ApplicationControlBar</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:SWFLoader</span> id=<span style="color: #ff0000;">&quot;swfLdr&quot;</span> width=<span style="color: #ff0000;">&quot;320&quot;</span> height=<span style="color: #ff0000;">&quot;240&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Application</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p>And my nested SWF, <em>subApp.swf</em>, was built from the following (subApp.mxml):</p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;">&lt;?xml version=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Application</span> xmlns:mx=<span style="color: #ff0000;">&quot;http://www.adobe.com/2006/mxml&quot;</span></span>
<span style="color: #000000;">        backgroundColor=<span style="color: #ff0000;">&quot;haloBlue&quot;</span></span>
<span style="color: #000000;">        applicationComplete=<span style="color: #ff0000;">&quot;init();&quot;</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #339933;">&lt;mx:Script&gt;</span>
<span style="color: #339933;">        &lt;![CDATA[</span>
<span style="color: #339933;">            protected function init():void {</span>
<span style="color: #339933;">                lbl.text = this.loaderInfo.parameters.text;</span>
<span style="color: #339933;">                lbl.setStyle(&quot;color&quot;, this.loaderInfo.parameters.color);</span>
<span style="color: #339933;">            }</span>
<span style="color: #339933;">        ]]&gt;</span>
<span style="color: #339933;">    &lt;/mx:Script&gt;</span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Text</span> id=<span style="color: #ff0000;">&quot;lbl&quot;</span></span>
<span style="color: #000000;">            fontSize=<span style="color: #ff0000;">&quot;32&quot;</span></span>
<span style="color: #000000;">            width=<span style="color: #ff0000;">&quot;90%&quot;</span> height=<span style="color: #ff0000;">&quot;90%&quot;</span></span>
<span style="color: #000000;">            horizontalCenter=<span style="color: #ff0000;">&quot;0&quot;</span> verticalCenter=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Application</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p>Or, for bonus points, here&#8217;s how you could create the loaded sub-application using ActionScript only (oooooh, fancy!):</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #9900cc; font-weight: bold;">package</span> <span style="color: #000000;">&#123;</span>
    <span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">MovieClip</span><span style="color: #000066; font-weight: bold;">;</span>
    <span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.text</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">TextField</span><span style="color: #000066; font-weight: bold;">;</span>
    <span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.text</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">TextFormat</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
    <span style="color: #000000;">&#91;</span>SWF<span style="color: #000000;">&#40;</span><span style="color: #004993;">width</span>=<span style="color: #990000;">&quot;320&quot;</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">height</span>=<span style="color: #990000;">&quot;240&quot;</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">backgroundColor</span>=<span style="color: #990000;">&quot;#CCCCCC&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span>
&nbsp;
    <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> subASApp <span style="color: #0033ff; font-weight: bold;">extends</span> <span style="color: #004993;">MovieClip</span> <span style="color: #000000;">&#123;</span>
        <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> tf<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">TextField</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
        <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> subASApp<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
            <span style="color: #0033ff; font-weight: bold;">super</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
            <span style="color: #004993;">init</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
        <span style="color: #000000;">&#125;</span>
&nbsp;
        <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #004993;">init</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
            <span style="color: #6699cc; font-weight: bold;">var</span> fmt<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">TextFormat</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">TextFormat</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
            fmt<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">font</span> = <span style="color: #990000;">&quot;Arial&quot;</span><span style="color: #000066; font-weight: bold;">;</span>
            fmt<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">size</span> = <span style="color: #000000; font-weight:bold;">24</span><span style="color: #000066; font-weight: bold;">;</span>
            <span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">loaderInfo</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">parameters</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">hasOwnProperty</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;color&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
                fmt<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">color</span> = <span style="color: #004993;">parseInt</span><span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">loaderInfo</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">parameters</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">color</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
            <span style="color: #000000;">&#125;</span>
&nbsp;
            tf = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">TextField</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
            tf<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">width</span> = <span style="color: #000000; font-weight:bold;">300</span><span style="color: #000066; font-weight: bold;">;</span>
            tf<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">height</span> = <span style="color: #000000; font-weight:bold;">220</span><span style="color: #000066; font-weight: bold;">;</span>
            tf<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span> = <span style="color: #000000; font-weight:bold;">10</span><span style="color: #000066; font-weight: bold;">;</span>
            tf<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span> = <span style="color: #000000; font-weight:bold;">10</span><span style="color: #000066; font-weight: bold;">;</span>
            tf<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">wordWrap</span> = <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">;</span>
            tf<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">multiline</span> = <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">;</span>
            tf<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">defaultTextFormat</span> = fmt<span style="color: #000066; font-weight: bold;">;</span>
            tf<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">text</span> = <span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">loaderInfo</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">parameters</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">text</span><span style="color: #000066; font-weight: bold;">;</span>
            <span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>tf<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">text</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">length</span> == <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
                tf<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">text</span> = <span style="color: #990000;">&quot;(default)&quot;</span><span style="color: #000066; font-weight: bold;">;</span>
            <span style="color: #000000;">&#125;</span>
            <span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span>tf<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
        <span style="color: #000000;">&#125;</span>
    <span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://blog.flexexamples.com/2007/08/09/determining-which-serverdomain-a-swf-is-hosted-on/comment-page-1/#comment-5151</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Fri, 14 Aug 2009 02:52:24 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/09/determining-which-serverdomain-a-swf-is-hosted-on/#comment-5151</guid>
		<description>Hi 
I have a project where i have a flex application that launches a.swf file and need&#039;s to  add a uri value to the .swf, and i am not sure how to begin with this.

The .swf file currently has a datainput field where you can manually type the uri value, but i need the flex input value to automatically overwrite or be added to this component....

This is pulling my hair out, any help would be much appreciated. I would even compensate someone for helping me here as i have a deadline approaching.

Regards

steve</description>
		<content:encoded><![CDATA[<p>Hi<br />
I have a project where i have a flex application that launches a.swf file and need&#8217;s to  add a uri value to the .swf, and i am not sure how to begin with this.</p>
<p>The .swf file currently has a datainput field where you can manually type the uri value, but i need the flex input value to automatically overwrite or be added to this component&#8230;.</p>
<p>This is pulling my hair out, any help would be much appreciated. I would even compensate someone for helping me here as i have a deadline approaching.</p>
<p>Regards</p>
<p>steve</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pike Nike</title>
		<link>http://blog.flexexamples.com/2007/08/09/determining-which-serverdomain-a-swf-is-hosted-on/comment-page-1/#comment-4803</link>
		<dc:creator>Pike Nike</dc:creator>
		<pubDate>Tue, 28 Jul 2009 23:06:12 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/09/determining-which-serverdomain-a-swf-is-hosted-on/#comment-4803</guid>
		<description>sorry nevermind, wrong post</description>
		<content:encoded><![CDATA[<p>sorry nevermind, wrong post</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pike Nike</title>
		<link>http://blog.flexexamples.com/2007/08/09/determining-which-serverdomain-a-swf-is-hosted-on/comment-page-1/#comment-4802</link>
		<dc:creator>Pike Nike</dc:creator>
		<pubDate>Tue, 28 Jul 2009 23:04:56 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/09/determining-which-serverdomain-a-swf-is-hosted-on/#comment-4802</guid>
		<description>I found a work around for this problem:

use a full url in request.url as follows
&lt;pre lang=&quot;mxml&quot;&gt;
var serverName : String URLUtil.getServerName(Application.application.loaderInfo.url;
var request:URLRequest = new URLRequest();
request.url = &quot;https://&quot; + serverName + &quot;:8443/appContext/uploadServlet&quot;;
fileReference.upload(request);
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>I found a work around for this problem:</p>
<p>use a full url in request.url as follows</p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;">var serverName : String URLUtil.getServerName(Application.application.loaderInfo.url;
var request:URLRequest = new URLRequest();
request.url = &quot;https://&quot; + serverName + &quot;:8443/appContext/uploadServlet&quot;;
fileReference.upload(request);</pre></div></div>

]]></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-page-1/#comment-529</link>
		<dc:creator>peterd</dc:creator>
		<pubDate>Fri, 22 Aug 2008 22:19:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/09/determining-which-serverdomain-a-swf-is-hosted-on/#comment-529</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>
</channel>
</rss>

