<?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: Publish template for JavaScript solution</title>
	<atom:link href="http://www.peterelst.com/blog/2003/10/10/publish-template-for-javascript-solution/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.peterelst.com/blog/2003/10/10/publish-template-for-javascript-solution/</link>
	<description>Flash Platform Geek</description>
	<lastBuildDate>Wed, 04 Jan 2012 21:31:54 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: aSH</title>
		<link>http://www.peterelst.com/blog/2003/10/10/publish-template-for-javascript-solution/comment-page-1/#comment-38</link>
		<dc:creator>aSH</dc:creator>
		<pubDate>Wed, 30 Nov -0001 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">/?p=21#comment-38</guid>
		<description>Great contribution Peter. &lt;br /&gt;
Thank you.&lt;br /&gt;
Respectfully,&lt;br /&gt;
aSH</description>
		<content:encoded><![CDATA[<p>Great contribution Peter. <br />
Thank you.<br />
Respectfully,<br />
aSH</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martijn de Visser</title>
		<link>http://www.peterelst.com/blog/2003/10/10/publish-template-for-javascript-solution/comment-page-1/#comment-43</link>
		<dc:creator>Martijn de Visser</dc:creator>
		<pubDate>Wed, 30 Nov -0001 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">/?p=21#comment-43</guid>
		<description>nice one!&lt;br /&gt;
&lt;br /&gt;
now, on to updating my sites... ;-)</description>
		<content:encoded><![CDATA[<p>nice one!</p>
<p>now, on to updating my sites&#8230; ;-)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: B</title>
		<link>http://www.peterelst.com/blog/2003/10/10/publish-template-for-javascript-solution/comment-page-1/#comment-56</link>
		<dc:creator>B</dc:creator>
		<pubDate>Wed, 30 Nov -0001 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">/?p=21#comment-56</guid>
		<description>excellent.. best solution so far :o)</description>
		<content:encoded><![CDATA[<p>excellent.. best solution so far :o)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex</title>
		<link>http://www.peterelst.com/blog/2003/10/10/publish-template-for-javascript-solution/comment-page-1/#comment-91</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Wed, 30 Nov -0001 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">/?p=21#comment-91</guid>
		<description>Here&#039;s a suggested update to deal with flashvars and includes the color in the embed tag - I think this was missed..&lt;br /&gt;
&lt;br /&gt;
function insertFlash(swf,width,height,bgcolor,params,pairs) {&lt;br /&gt;
	// set default bgcolor if not provided&lt;br /&gt;
	if(!bgcolor &#124;&#124; bgcolor==&quot;&quot;) bgcolor = &quot;#FFFFFF&quot;;&lt;br /&gt;
&lt;br /&gt;
	//parse pairs&lt;br /&gt;
	var flashvars=&quot;&quot;;&lt;br /&gt;
	var writeAmp=false;&lt;br /&gt;
	for(var i in pairs){&lt;br /&gt;
		if (writeAmp){flashvars=flashvars+&quot;&amp;&quot;;}else{writeAmp=true;}&lt;br /&gt;
		flashvars=flashvars+i+&quot;=&quot;+escape(pairs[i]);&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
	if(!params) params = new Object();&lt;br /&gt;
	if(!params.version) params.version = &quot;6,0,0,0&quot;;&lt;br /&gt;
	if(!params.FlashVars) params.FlashVars=flashvars;&lt;br /&gt;
&lt;br /&gt;
	// parse parameters&lt;br /&gt;
	var objectParams = &quot;&quot;;&lt;br /&gt;
	var embedParams = &quot;&quot;;&lt;br /&gt;
	for(var i in params) {&lt;br /&gt;
		objectParams += &quot;\n&quot;;&lt;br /&gt;
		embedParams += i+&quot;=&quot;+params[i];&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	// write the object&lt;br /&gt;
	document.write(&quot;&quot;);&lt;br /&gt;
	document.write(&quot;&quot;); &lt;br /&gt;
	document.write(&quot;&quot;);&lt;br /&gt;
	document.write(&quot;&quot;);&lt;br /&gt;
	document.write(objectParams);&lt;br /&gt;
	document.write(&quot;&quot;);&lt;br /&gt;
	document.write(&quot;&quot;);&lt;br /&gt;
}</description>
		<content:encoded><![CDATA[<p>Here&#8217;s a suggested update to deal with flashvars and includes the color in the embed tag &#8211; I think this was missed..</p>
<p>function insertFlash(swf,width,height,bgcolor,params,pairs) {<br />
	// set default bgcolor if not provided<br />
	if(!bgcolor || bgcolor==&#8221;") bgcolor = &#8220;#FFFFFF&#8221;;</p>
<p>	//parse pairs<br />
	var flashvars=&#8221;";<br />
	var writeAmp=false;<br />
	for(var i in pairs){<br />
		if (writeAmp){flashvars=flashvars+&#8221;&amp;&#8221;;}else{writeAmp=true;}<br />
		flashvars=flashvars+i+&#8221;=&#8221;+escape(pairs[i]);<br />
	}</p>
<p>
	if(!params) params = new Object();<br />
	if(!params.version) params.version = &#8220;6,0,0,0&#8243;;<br />
	if(!params.FlashVars) params.FlashVars=flashvars;</p>
<p>	// parse parameters<br />
	var objectParams = &#8220;&#8221;;<br />
	var embedParams = &#8220;&#8221;;<br />
	for(var i in params) {<br />
		objectParams += &#8220;\n&#8221;;<br />
		embedParams += i+&#8221;=&#8221;+params[i];<br />
	}</p>
<p>	// write the object<br />
	document.write(&#8220;&#8221;);<br />
	document.write(&#8220;&#8221;); <br />
	document.write(&#8220;&#8221;);<br />
	document.write(&#8220;&#8221;);<br />
	document.write(objectParams);<br />
	document.write(&#8220;&#8221;);<br />
	document.write(&#8220;&#8221;);<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex</title>
		<link>http://www.peterelst.com/blog/2003/10/10/publish-template-for-javascript-solution/comment-page-1/#comment-92</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Wed, 30 Nov -0001 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">/?p=21#comment-92</guid>
		<description>er...the code in that post above didn&#039;t come out quite right...</description>
		<content:encoded><![CDATA[<p>er&#8230;the code in that post above didn&#8217;t come out quite right&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Elst</title>
		<link>http://www.peterelst.com/blog/2003/10/10/publish-template-for-javascript-solution/comment-page-1/#comment-93</link>
		<dc:creator>Peter Elst</dc:creator>
		<pubDate>Wed, 30 Nov -0001 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">/?p=21#comment-93</guid>
		<description>Thanks for the suggestion Alex, the code came through alright, I&#039;ll see what&#039;s going wrong with it in the comments section.&lt;br /&gt;
&lt;br /&gt;
Ofcourse FlashVars could already be used by specifying them in the object that gets passed to the script as an object. Color in the embed tag is an ommision on my part, that will soon get fixed. Thanks for the feedback!</description>
		<content:encoded><![CDATA[<p>Thanks for the suggestion Alex, the code came through alright, I&#8217;ll see what&#8217;s going wrong with it in the comments section.</p>
<p>Ofcourse FlashVars could already be used by specifying them in the object that gets passed to the script as an object. Color in the embed tag is an ommision on my part, that will soon get fixed. Thanks for the feedback!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

