<?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: Passing URL parameters to a Flash application</title>
	<atom:link href="http://cornelcreanga.com/2009/07/passing-url-parameters-to-a-flash-application/feed/" rel="self" type="application/rss+xml" />
	<link>http://cornelcreanga.com/2009/07/passing-url-parameters-to-a-flash-application/</link>
	<description>Random thoughts about software development.</description>
	<lastBuildDate>Fri, 16 Sep 2011 11:37:12 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
	<item>
		<title>By: cornel</title>
		<link>http://cornelcreanga.com/2009/07/passing-url-parameters-to-a-flash-application/comment-page-1/#comment-10777</link>
		<dc:creator>cornel</dc:creator>
		<pubDate>Thu, 02 Jul 2009 21:15:38 +0000</pubDate>
		<guid isPermaLink="false">http://cornelcreanga.com/?p=109#comment-10777</guid>
		<description>Andrew,

I think that in the first method you forgot to decode the variables (that the purpose of using URLVariables class)</description>
		<content:encoded><![CDATA[<p>Andrew,</p>
<p>I think that in the first method you forgot to decode the variables (that the purpose of using URLVariables class)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew Odri</title>
		<link>http://cornelcreanga.com/2009/07/passing-url-parameters-to-a-flash-application/comment-page-1/#comment-10771</link>
		<dc:creator>Andrew Odri</dc:creator>
		<pubDate>Thu, 02 Jul 2009 18:15:39 +0000</pubDate>
		<guid isPermaLink="false">http://cornelcreanga.com/?p=109#comment-10771</guid>
		<description>The method I tend to use is the following:

1. Use the following function to extract the query variables:


function getQueryParameter(variable) {
 var query = window.location.search.substring(1);
 var vars = query.split(&quot;&amp;&quot;);
 for (var i=0;i&lt;vars.length;i++) {
   var pair = vars[i].split(&quot;=&quot;);
   if (pair[0] == variable) {
     return pair[1];
   }
 }
}


2. Embed the *.swf using SWFObject, then call getQueryParameter(variable) and assign it the appropriate flash variable:


var flashvars = {
  name1: getQueryParameter(&quot;name1&quot;),
  name2: getQueryParameter(&quot;name2&quot;),
  name3: getQueryParameter(&quot;name3&quot;)
};
var params = {
  menu: &quot;false&quot;
};
var attributes = {
  id: &quot;myDynamicContent&quot;,
  name: &quot;myDynamicContent&quot;
};

swfobject.embedSWF(&quot;myContent.swf&quot;, &quot;myContent&quot;, &quot;300&quot;, &quot;120&quot;, &quot;9.0.0&quot;,&quot;expressInstall.swf&quot;, flashvars, params, attributes);
</description>
		<content:encoded><![CDATA[<p>The method I tend to use is the following:</p>
<p>1. Use the following function to extract the query variables:</p>
<p>function getQueryParameter(variable) {<br />
 var query = window.location.search.substring(1);<br />
 var vars = query.split(&#8220;&amp;&#8221;);<br />
 for (var i=0;i&lt;vars.length;i++) {<br />
   var pair = vars[i].split(&#8220;=&#8221;);<br />
   if (pair[0] == variable) {<br />
     return pair[1];<br />
   }<br />
 }<br />
}</p>
<p>2. Embed the *.swf using SWFObject, then call getQueryParameter(variable) and assign it the appropriate flash variable:</p>
<p>var flashvars = {<br />
  name1: getQueryParameter(&#8220;name1&#8243;),<br />
  name2: getQueryParameter(&#8220;name2&#8243;),<br />
  name3: getQueryParameter(&#8220;name3&#8243;)<br />
};<br />
var params = {<br />
  menu: &#8220;false&#8221;<br />
};<br />
var attributes = {<br />
  id: &#8220;myDynamicContent&#8221;,<br />
  name: &#8220;myDynamicContent&#8221;<br />
};</p>
<p>swfobject.embedSWF(&#8220;myContent.swf&#8221;, &#8220;myContent&#8221;, &#8220;300&#8243;, &#8220;120&#8243;, &#8220;9.0.0&#8243;,&#8221;expressInstall.swf&#8221;, flashvars, params, attributes);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cornel</title>
		<link>http://cornelcreanga.com/2009/07/passing-url-parameters-to-a-flash-application/comment-page-1/#comment-10731</link>
		<dc:creator>cornel</dc:creator>
		<pubDate>Wed, 01 Jul 2009 14:22:37 +0000</pubDate>
		<guid isPermaLink="false">http://cornelcreanga.com/?p=109#comment-10731</guid>
		<description>Thanks for the info

Cornel.</description>
		<content:encoded><![CDATA[<p>Thanks for the info</p>
<p>Cornel.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sebastian</title>
		<link>http://cornelcreanga.com/2009/07/passing-url-parameters-to-a-flash-application/comment-page-1/#comment-10727</link>
		<dc:creator>Sebastian</dc:creator>
		<pubDate>Wed, 01 Jul 2009 12:48:46 +0000</pubDate>
		<guid isPermaLink="false">http://cornelcreanga.com/?p=109#comment-10727</guid>
		<description>Hi,

you can also use swfObject. It provides a nice way to send Variables to a Flash app, be it URL-Variables or hardcoded values inside the html.
you can find this here:
http://code.google.com/p/swfobject/</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>you can also use swfObject. It provides a nice way to send Variables to a Flash app, be it URL-Variables or hardcoded values inside the html.<br />
you can find this here:<br />
<a href="http://code.google.com/p/swfobject/" rel="nofollow">http://code.google.com/p/swfobject/</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>

