<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" 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/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>plasticular inscriptor</title>
	
	<link>http://www.plasticstare.com/plains</link>
	<description />
	<lastBuildDate>Thu, 02 Feb 2012 02:19:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/plasticstare" /><feedburner:info uri="plasticstare" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Flash Tracing to flashlog.txt</title>
		<link>http://feedproxy.google.com/~r/plasticstare/~3/duWPtcVFaow/</link>
		<comments>http://www.plasticstare.com/plains/2011/06/23/flash-tracing-to-flashlog-txt/#comments</comments>
		<pubDate>Fri, 24 Jun 2011 01:16:32 +0000</pubDate>
		<dc:creator>plains</dc:creator>
				<category><![CDATA[random]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[debugging]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[process]]></category>

		<guid isPermaLink="false">http://www.plasticstare.com/plains/?p=378</guid>
		<description><![CDATA[To confuse an earlier brief post&#8230;(&#8220;trace() not working in Flash Builder?&#8221;), I just wanted to post another quick blurb on how to address an issue I ran into setting up logging from the flash player to flashlog.txt, by means of the mm.cfg file. As often noted, in order to set up the ability to monitor [...]]]></description>
			<content:encoded><![CDATA[<p>To confuse an earlier brief post&#8230;(&#8220;trace() not working in Flash Builder?&#8221;), I just wanted to post another quick blurb on how to address an issue I ran into setting up logging from the flash player to flashlog.txt, by means of the mm.cfg file.</p>
<p>As often noted, in order to set up the ability to monitor traced outputs to disk from the flash player, one must:<br />
1. Install the debugger version of the flash player.<br />
2. Create the default named file to which the logging will be sent at (on mac anyway) ~/Library/Preferences/Macromedia/Flash\ Player/Logs/flashlog.txt. You can query online for the proper location for Linux and Windows.<br />
3. On mac, create the mm.cfg file in /Library/Application\ Support/Macromedia<br />
4. Add these lines to the mm.cfg file:<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ErrorReportingEnable=1<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TraceOutputFileEnable=1<br />
5. Restart you machine.</p>
<p>In some cases, however, this does not actually work &#8212; that is, nothing gets written to the file, and there is no error to look for. I figured it might be permissions, so changing the permissions for flashlog.txt to 660 (sudo chmod 660 flashlog.txt) fixed the issue. Note that group needs to be set to be readable/writable. After doing a search for the issue online with &#8220;chmod&#8221; in the search terms, I also found a reference noting that the mm.cfg file needed to have its permissions changed to 755, but I don&#8217;t think that is probably necessary. It wasn&#8217;t for me.</p>
<img src="http://feeds.feedburner.com/~r/plasticstare/~4/duWPtcVFaow" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.plasticstare.com/plains/2011/06/23/flash-tracing-to-flashlog-txt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.plasticstare.com/plains/2011/06/23/flash-tracing-to-flashlog-txt/</feedburner:origLink></item>
		<item>
		<title>svndiff2html: Convert SVN Diffs to More Readable HTML</title>
		<link>http://feedproxy.google.com/~r/plasticstare/~3/qzlCS7hIqLU/</link>
		<comments>http://www.plasticstare.com/plains/2011/03/17/svndiff2html-convert-svn-diffs-to-more-readable-html/#comments</comments>
		<pubDate>Thu, 17 Mar 2011 14:24:36 +0000</pubDate>
		<dc:creator>plains</dc:creator>
				<category><![CDATA[random]]></category>

		<guid isPermaLink="false">http://www.plasticstare.com/plains/2011/03/17/svndiff2html-convert-svn-diffs-to-more-readable-html/</guid>
		<description><![CDATA[Recently I wanted an easy way to generate diffs from svn that I could easily read &#8212; i.e. with some sort of markup. TextMate automatically displays diffs in an attractive manner, and in a manner that makes them much easier to decipher visually. It also allows you to export any code file as html, which [...]]]></description>
			<content:encoded><![CDATA[<div class='posterous_autopost'>
<p>Recently I wanted an easy way to generate diffs from svn that I could easily read &#8212; i.e. with some sort of markup. TextMate automatically displays diffs in an attractive manner, and in a manner that makes them much easier to decipher visually. It also allows you to export any code file as html, which is also nice; however, I didn&#8217;t want to keep having to open all my diffs in TextMate just for the sake of formatting them. I also wanted to be able to generate them quickly and be able to distribute them as standalone files that could ostensibly be viewed in a web browser.</p>
<p>I did a little research and found a script over at&nbsp;<a href="http://www.linuxjournal.com/content/convert-diff-output-colorized-html">http://www.linuxjournal.com/content/convert-diff-output-colorized-html</a> which was fairly close to what I wanted to do, so I started with that and modified its processing algorithm and css styling to match my TextMate output. After getting that working with static svn diff output files, I added the ability to simply navigate to the desired directory in the command line and invoke the script to output the html formatted diff.</p>
<p>At that point, I decided that there were 2 key comparisons that were important to me generally &#8212; svn diff -r HEAD and svn diff -r PREV:HEAD &#8212; which output the diff for the local file to the repository version, and the diff for the head as compared to the previous revision. In other words, one compares the stuff on your machine to the repository, and the other can compare what you just committed to what was there before. I added those, and a help command, and that become svndiff2html. I hope this helps someone save some time. Code follows after the break&#8230;</p>
<p><span id="more-7434"></span></p>
<p>
<div class="data type-bash">
<table cellspacing="0" cellpadding="0">
<tr>
<td>
<pre class="line_numbers"><span rel="#L1" id="L1">1</span> <span rel="#L2" id="L2">2</span> <span rel="#L3" id="L3">3</span> <span rel="#L4" id="L4">4</span> <span rel="#L5" id="L5">5</span> <span rel="#L6" id="L6">6</span> <span rel="#L7" id="L7">7</span> <span rel="#L8" id="L8">8</span> <span rel="#L9" id="L9">9</span> <span rel="#L10" id="L10">10</span> <span rel="#L11" id="L11">11</span> <span rel="#L12" id="L12">12</span> <span rel="#L13" id="L13">13</span> <span rel="#L14" id="L14">14</span> <span rel="#L15" id="L15">15</span> <span rel="#L16" id="L16">16</span> <span rel="#L17" id="L17">17</span> <span rel="#L18" id="L18">18</span> <span rel="#L19" id="L19">19</span> <span rel="#L20" id="L20">20</span> <span rel="#L21" id="L21">21</span> <span rel="#L22" id="L22">22</span> <span rel="#L23" id="L23">23</span> <span rel="#L24" id="L24">24</span> <span rel="#L25" id="L25">25</span> <span rel="#L26" id="L26">26</span> <span rel="#L27" id="L27">27</span> <span rel="#L28" id="L28">28</span> <span rel="#L29" id="L29">29</span> <span rel="#L30" id="L30">30</span> <span rel="#L31" id="L31">31</span> <span rel="#L32" id="L32">32</span> <span rel="#L33" id="L33">33</span> <span rel="#L34" id="L34">34</span> <span rel="#L35" id="L35">35</span> <span rel="#L36" id="L36">36</span> <span rel="#L37" id="L37">37</span> <span rel="#L38" id="L38">38</span> <span rel="#L39" id="L39">39</span> <span rel="#L40" id="L40">40</span> <span rel="#L41" id="L41">41</span> <span rel="#L42" id="L42">42</span> <span rel="#L43" id="L43">43</span> <span rel="#L44" id="L44">44</span> <span rel="#L45" id="L45">45</span> <span rel="#L46" id="L46">46</span> <span rel="#L47" id="L47">47</span> <span rel="#L48" id="L48">48</span> <span rel="#L49" id="L49">49</span> <span rel="#L50" id="L50">50</span> <span rel="#L51" id="L51">51</span> <span rel="#L52" id="L52">52</span> <span rel="#L53" id="L53">53</span> <span rel="#L54" id="L54">54</span> <span rel="#L55" id="L55">55</span> <span rel="#L56" id="L56">56</span> <span rel="#L57" id="L57">57</span> <span rel="#L58" id="L58">58</span> <span rel="#L59" id="L59">59</span> <span rel="#L60" id="L60">60</span> <span rel="#L61" id="L61">61</span> <span rel="#L62" id="L62">62</span> <span rel="#L63" id="L63">63</span> <span rel="#L64" id="L64">64</span> <span rel="#L65" id="L65">65</span> <span rel="#L66" id="L66">66</span> <span rel="#L67" id="L67">67</span> <span rel="#L68" id="L68">68</span> <span rel="#L69" id="L69">69</span> <span rel="#L70" id="L70">70</span> <span rel="#L71" id="L71">71</span> <span rel="#L72" id="L72">72</span> <span rel="#L73" id="L73">73</span> <span rel="#L74" id="L74">74</span> <span rel="#L75" id="L75">75</span> <span rel="#L76" id="L76">76</span> <span rel="#L77" id="L77">77</span> <span rel="#L78" id="L78">78</span> <span rel="#L79" id="L79">79</span> <span rel="#L80" id="L80">80</span> <span rel="#L81" id="L81">81</span> <span rel="#L82" id="L82">82</span> <span rel="#L83" id="L83">83</span> <span rel="#L84" id="L84">84</span> <span rel="#L85" id="L85">85</span> <span rel="#L86" id="L86">86</span> <span rel="#L87" id="L87">87</span> <span rel="#L88" id="L88">88</span> <span rel="#L89" id="L89">89</span> <span rel="#L90" id="L90">90</span> <span rel="#L91" id="L91">91</span> <span rel="#L92" id="L92">92</span> <span rel="#L93" id="L93">93</span> <span rel="#L94" id="L94">94</span> <span rel="#L95" id="L95">95</span> <span rel="#L96" id="L96">96</span> <span rel="#L97" id="L97">97</span> <span rel="#L98" id="L98">98</span> <span rel="#L99" id="L99">99</span> <span rel="#L100" id="L100">100</span> <span rel="#L101" id="L101">101</span> <span rel="#L102" id="L102">102</span> <span rel="#L103" id="L103">103</span> <span rel="#L104" id="L104">104</span> <span rel="#L105" id="L105">105</span> <span rel="#L106" id="L106">106</span> <span rel="#L107" id="L107">107</span> <span rel="#L108" id="L108">108</span> <span rel="#L109" id="L109">109</span> <span rel="#L110" id="L110">110</span> <span rel="#L111" id="L111">111</span> <span rel="#L112" id="L112">112</span> <span rel="#L113" id="L113">113</span> <span rel="#L114" id="L114">114</span> <span rel="#L115" id="L115">115</span> <span rel="#L116" id="L116">116</span> <span rel="#L117" id="L117">117</span> <span rel="#L118" id="L118">118</span> <span rel="#L119" id="L119">119</span> <span rel="#L120" id="L120">120</span> <span rel="#L121" id="L121">121</span> <span rel="#L122" id="L122">122</span> <span rel="#L123" id="L123">123</span> <span rel="#L124" id="L124">124</span> <span rel="#L125" id="L125">125</span> <span rel="#L126" id="L126">126</span> <span rel="#L127" id="L127">127</span> <span rel="#L128" id="L128">128</span> <span rel="#L129" id="L129">129</span> <span rel="#L130" id="L130">130</span> <span rel="#L131" id="L131">131</span> <span rel="#L132" id="L132">132</span> <span rel="#L133" id="L133">133</span> <span rel="#L134" id="L134">134</span> <span rel="#L135" id="L135">135</span> <span rel="#L136" id="L136">136</span> <span rel="#L137" id="L137">137</span> <span rel="#L138" id="L138">138</span> <span rel="#L139" id="L139">139</span> <span rel="#L140" id="L140">140</span> <span rel="#L141" id="L141">141</span> <span rel="#L142" id="L142">142</span> <span rel="#L143" id="L143">143</span> <span rel="#L144" id="L144">144</span> <span rel="#L145" id="L145">145</span> <span rel="#L146" id="L146">146</span> <span rel="#L147" id="L147">147</span> <span rel="#L148" id="L148">148</span> <span rel="#L149" id="L149">149</span> <span rel="#L150" id="L150">150</span> <span rel="#L151" id="L151">151</span> <span rel="#L152" id="L152">152</span> <span rel="#L153" id="L153">153</span> <span rel="#L154" id="L154">154</span> <span rel="#L155" id="L155">155</span> <span rel="#L156" id="L156">156</span> <span rel="#L157" id="L157">157</span> <span rel="#L158" id="L158">158</span> <span rel="#L159" id="L159">159</span> <span rel="#L160" id="L160">160</span> <span rel="#L161" id="L161">161</span> <span rel="#L162" id="L162">162</span> <span rel="#L163" id="L163">163</span> <span rel="#L164" id="L164">164</span> <span rel="#L165" id="L165">165</span> <span rel="#L166" id="L166">166</span> <span rel="#L167" id="L167">167</span> <span rel="#L168" id="L168">168</span> <span rel="#L169" id="L169">169</span> <span rel="#L170" id="L170">170</span> <span rel="#L171" id="L171">171</span> <span rel="#L172" id="L172">172</span> <span rel="#L173" id="L173">173</span> <span rel="#L174" id="L174">174</span> <span rel="#L175" id="L175">175</span> <span rel="#L176" id="L176">176</span> <span rel="#L177" id="L177">177</span> <span rel="#L178" id="L178">178</span> <span rel="#L179" id="L179">179</span> <span rel="#L180" id="L180">180</span> <span rel="#L181" id="L181">181</span> <span rel="#L182" id="L182">182</span> <span rel="#L183" id="L183">183</span> <span rel="#L184" id="L184">184</span> <span rel="#L185" id="L185">185</span> <span rel="#L186" id="L186">186</span> <span rel="#L187" id="L187">187</span> <span rel="#L188" id="L188">188</span> <span rel="#L189" id="L189">189</span> <span rel="#L190" id="L190">190</span> <span rel="#L191" id="L191">191</span> <span rel="#L192" id="L192">192</span> <span rel="#L193" id="L193">193</span> <span rel="#L194" id="L194">194</span> <span rel="#L195" id="L195">195</span> <span rel="#L196" id="L196">196</span> <span rel="#L197" id="L197">197</span> <span rel="#L198" id="L198">198</span> <span rel="#L199" id="L199">199</span> <span rel="#L200" id="L200">200</span> <span rel="#L201" id="L201">201</span> <span rel="#L202" id="L202">202</span> <span rel="#L203" id="L203">203</span> <span rel="#L204" id="L204">204</span> <span rel="#L205" id="L205">205</span> <span rel="#L206" id="L206">206</span> <span rel="#L207" id="L207">207</span> <span rel="#L208" id="L208">208</span> <span rel="#L209" id="L209">209</span> <span rel="#L210" id="L210">210</span> <span rel="#L211" id="L211">211</span> <span rel="#L212" id="L212">212</span> <span rel="#L213" id="L213">213</span> <span rel="#L214" id="L214">214</span> <span rel="#L215" id="L215">215</span> <span rel="#L216" id="L216">216</span> <span rel="#L217" id="L217">217</span> <span rel="#L218" id="L218">218</span> <span rel="#L219" id="L219">219</span> <span rel="#L220" id="L220">220</span> <span rel="#L221" id="L221">221</span> <span rel="#L222" id="L222">222</span> <span rel="#L223" id="L223">223</span> <span rel="#L224" id="L224">224</span> <span rel="#L225" id="L225">225</span> <span rel="#L226" id="L226">226</span> <span rel="#L227" id="L227">227</span> <span rel="#L228" id="L228">228</span> <span rel="#L229" id="L229">229</span> <span rel="#L230" id="L230">230</span> <span rel="#L231" id="L231">231</span> <span rel="#L232" id="L232">232</span> <span rel="#L233" id="L233">233</span> <span rel="#L234" id="L234">234</span> <span rel="#L235" id="L235">235</span> <span rel="#L236" id="L236">236</span> <span rel="#L237" id="L237">237</span> <span rel="#L238" id="L238">238</span> <span rel="#L239" id="L239">239</span> <span rel="#L240" id="L240">240</span> <span rel="#L241" id="L241">241</span> <span rel="#L242" id="L242">242</span> <span rel="#L243" id="L243">243</span> <span rel="#L244" id="L244">244</span> <span rel="#L245" id="L245">245</span> <span rel="#L246" id="L246">246</span> <span rel="#L247" id="L247">247</span> <span rel="#L248" id="L248">248</span> <span rel="#L249" id="L249">249</span> <span rel="#L250" id="L250">250</span> <span rel="#L251" id="L251">251</span> <span rel="#L252" id="L252">252</span> <span rel="#L253" id="L253">253</span> <span rel="#L254" id="L254">254</span> <span rel="#L255" id="L255">255</span> <span rel="#L256" id="L256">256</span> <span rel="#L257" id="L257">257</span> <span rel="#L258" id="L258">258</span> <span rel="#L259" id="L259">259</span> <span rel="#L260" id="L260">260</span> <span rel="#L261" id="L261">261</span> <span rel="#L262" id="L262">262</span> <span rel="#L263" id="L263">263</span> <span rel="#L264" id="L264">264</span> <span rel="#L265" id="L265">265</span> <span rel="#L266" id="L266">266</span> <span rel="#L267" id="L267">267</span> <span rel="#L268" id="L268">268</span> <span rel="#L269" id="L269">269</span> <span rel="#L270" id="L270">270</span> <span rel="#L271" id="L271">271</span> <span rel="#L272" id="L272">272</span> <span rel="#L273" id="L273">273</span> <span rel="#L274" id="L274">274</span> <span rel="#L275" id="L275">275</span> <span rel="#L276" id="L276">276</span> <span rel="#L277" id="L277">277</span> <span rel="#L278" id="L278">278</span> <span rel="#L279" id="L279">279</span> <span rel="#L280" id="L280">280</span> <span rel="#L281" id="L281">281</span> <span rel="#L282" id="L282">282</span> <span rel="#L283" id="L283">283</span> <span rel="#L284" id="L284">284</span> <span rel="#L285" id="L285">285</span> <span rel="#L286" id="L286">286</span> <span rel="#L287" id="L287">287</span> <span rel="#L288" id="L288">288</span> <span rel="#L289" id="L289">289</span> <span rel="#L290" id="L290">290</span> <span rel="#L291" id="L291">291</span> <span rel="#L292" id="L292">292</span> <span rel="#L293" id="L293">293</span> <span rel="#L294" id="L294">294</span> <span rel="#L295" id="L295">295</span> <span rel="#L296" id="L296">296</span> <span rel="#L297" id="L297">297</span> <span rel="#L298" id="L298">298</span> <span rel="#L299" id="L299">299</span> <span rel="#L300" id="L300">300</span> <span rel="#L301" id="L301">301</span> <span rel="#L302" id="L302">302</span> <span rel="#L303" id="L303">303</span> <span rel="#L304" id="L304">304</span> <span rel="#L305" id="L305">305</span> <span rel="#L306" id="L306">306</span> <span rel="#L307" id="L307">307</span> <span rel="#L308" id="L308">308</span> <span rel="#L309" id="L309">309</span> <span rel="#L310" id="L310">310</span> <span rel="#L311" id="L311">311</span> <span rel="#L312" id="L312">312</span> <span rel="#L313" id="L313">313</span> <span rel="#L314" id="L314">314</span> <span rel="#L315" id="L315">315</span> <span rel="#L316" id="L316">316</span> <span rel="#L317" id="L317">317</span> <span rel="#L318" id="L318">318</span> <span rel="#L319" id="L319">319</span> <span rel="#L320" id="L320">320</span> <span rel="#L321" id="L321">321</span> <span rel="#L322" id="L322">322</span> <span rel="#L323" id="L323">323</span> <span rel="#L324" id="L324">324</span> <span rel="#L325" id="L325">325</span> <span rel="#L326" id="L326">326</span> <span rel="#L327" id="L327">327</span> <span rel="#L328" id="L328">328</span> <span rel="#L329" id="L329">329</span> <span rel="#L330" id="L330">330</span> <span rel="#L331" id="L331">331</span> <span rel="#L332" id="L332">332</span> <span rel="#L333" id="L333">333</span> <span rel="#L334" id="L334">334</span> <span rel="#L335" id="L335">335</span> <span rel="#L336" id="L336">336</span> <span rel="#L337" id="L337">337</span> </pre>
</td>
<td width="100%">
<div class="highlight">
<pre />
<div class="line" id="LC1"><span class="c">#!/bin/bash</span></div>
<div class="line" id="LC2"></div>
<div class="line" id="LC3"><span class="c"># svndiff2html runs svn diff on the current directory path and outputs a</span></div>
<div class="line" id="LC4"><span class="c"># formatted HTML file to provide easier legibility.</span></div>
<div class="line" id="LC5"></div>
<div class="line" id="LC6"><span class="nv">diff</span><span class="o">=</span><span class="s2">&quot;&quot;</span>;</div>
<div class="line" id="LC7"><span class="nv">out</span><span class="o">=</span><span class="s2">&quot;&quot;</span>;</div>
<div class="line" id="LC8"><span class="nv">html</span><span class="o">=</span><span class="s2">&quot;&quot;</span>;</div>
<div class="line" id="LC9"><span class="nv">args</span><span class="o">=</span><span class="s2">&quot;&quot;</span>;</div>
<div class="line" id="LC10"></div>
<div class="line" id="LC11"><span class="c"># ******************************************************************************</span></div>
<div class="line" id="LC12"><span class="c"># FUNCTIONS</span></div>
<div class="line" id="LC13"><span class="c"># ******************************************************************************</span></div>
<div class="line" id="LC14"></div>
<div class="line" id="LC15"><span class="k">function </span>displayHelp</div>
<div class="line" id="LC16"><span class="o">{</span></div>
<div class="line" id="LC17">	<span class="nb">echo</span> <span class="s2">&quot;     &quot;</span>;</div>
<div class="line" id="LC18">	<span class="nb">echo</span> <span class="s2">&quot;diff2html -- outputs an html encoded diff file for the current svn repo.&quot;</span>;</div>
<div class="line" id="LC19">	<span class="nb">echo</span> <span class="s2">&quot;     &quot;</span>;</div>
<div class="line" id="LC20">	<span class="nb">echo</span> <span class="s2">&quot;USAGE:&quot;</span>;</div>
<div class="line" id="LC21">	<span class="nb">echo</span> <span class="s2">&quot;     diff2html [-local or -l] outputPath&quot;</span>;</div>
<div class="line" id="LC22">	<span class="nb">echo</span> <span class="s2">&quot;     &quot;</span>;</div>
<div class="line" id="LC23">	<span class="nb">echo</span> <span class="s2">&quot;PARAMETERS:&quot;</span></div>
<div class="line" id="LC24">	<span class="nb">echo</span> <span class="s2">&quot;     -local (optional)&quot;</span></div>
<div class="line" id="LC25">	<span class="nb">echo</span> <span class="s2">&quot;     This parameter tells diff2html to make the comparison between &quot;</span></div>
<div class="line" id="LC26">	<span class="nb">echo</span> <span class="s2">&quot;     the local file changes and the current state of the svn repository.&quot;</span>;</div>
<div class="line" id="LC27">	<span class="nb">echo</span> <span class="s2">&quot;     If -local is not present, the script will compare the most recent &quot;</span>;</div>
<div class="line" id="LC28">	<span class="nb">echo</span> <span class="s2">&quot;     commit to the repository with the repo version previous to it.&quot;</span>;</div>
<div class="line" id="LC29">	<span class="nb">echo</span> <span class="s2">&quot;     &quot;</span>;</div>
<div class="line" id="LC30">	<span class="nb">echo</span> <span class="s2">&quot;     outputPath&quot;</span>;</div>
<div class="line" id="LC31">	<span class="nb">echo</span> <span class="s2">&quot;     This is simply the output path for the html file that is generated&quot;</span>;</div>
<div class="line" id="LC32">	<span class="nb">echo</span> <span class="s2">&quot;     by the script.&quot;</span>;</div>
<div class="line" id="LC33">	<span class="nb">echo</span> <span class="s2">&quot;     &quot;</span>;</div>
<div class="line" id="LC34">	<span class="nb">echo</span> <span class="s2">&quot;To use, add to PATH, chmod to 755, navigate to folder of svn files&quot;</span>;</div>
<div class="line" id="LC35">	<span class="nb">echo</span> <span class="s2">&quot;that are to be diff&#39;ed, and run diff2html. (diff2html must be run within&quot;</span>;</div>
<div class="line" id="LC36">	<span class="nb">echo</span> <span class="s2">&quot;the directory of the files to be diffed.)&quot;</span>;</div>
<div class="line" id="LC37"><span class="o">}</span></div>
<div class="line" id="LC38"></div>
<div class="line" id="LC39"><span class="k">function </span>pipeout</div>
<div class="line" id="LC40"><span class="o">{</span></div>
<div class="line" id="LC41">	<span class="c"># echo -n &quot;$1&quot;;</span></div>
<div class="line" id="LC42">	<span class="nb">echo</span> -n <span class="s2">&quot;$1&quot;</span> &gt;&gt; <span class="nv">$out</span>;</div>
<div class="line" id="LC43"><span class="o">}</span></div>
<div class="line" id="LC44"></div>
<div class="line" id="LC45"><span class="c"># ******************************************************************************</span></div>
<div class="line" id="LC46"></div>
<div class="line" id="LC47"></div>
<div class="line" id="LC48"><span class="c"># Parse the parameters</span></div>
<div class="line" id="LC49"><span class="k">if</span> <span class="o">[[</span> <span class="s2">&quot;$1&quot;</span> <span class="o">==</span> <span class="s2">&quot;-h&quot;</span> <span class="o">||</span> <span class="s2">&quot;$1&quot;</span> <span class="o">==</span> <span class="s2">&quot;-help&quot;</span> <span class="o">||</span> <span class="s2">&quot;$1&quot;</span> <span class="o">==</span> <span class="s2">&quot;help&quot;</span> <span class="o">]]</span>; <span class="k">then</span></div>
<div class="line" id="LC50"><span class="k">	</span>displayHelp;</div>
<div class="line" id="LC51">	<span class="nb">exit</span>;</div>
<div class="line" id="LC52"><span class="k">elif</span> <span class="o">[[</span> <span class="s2">&quot;$1&quot;</span> <span class="o">==</span> <span class="s2">&quot;-local&quot;</span> <span class="o">||</span> <span class="s2">&quot;$1&quot;</span> <span class="o">==</span> <span class="s2">&quot;-l&quot;</span> <span class="o">]]</span>; <span class="k">then</span></div>
<div class="line" id="LC53">	<span class="c"># for comparing local to repo</span></div>
<div class="line" id="LC54">	<span class="nv">args</span><span class="o">=</span><span class="s2">&quot;HEAD&quot;</span>;</div>
<div class="line" id="LC55">	<span class="c"># diff=`svn diff --no-diff-deleted -x &quot;-u -b -w --ignore-eol-style&quot; -r HEAD`;</span></div>
<div class="line" id="LC56">	<span class="nv">out</span><span class="o">=</span><span class="s2">&quot;$2&quot;</span>;</div>
<div class="line" id="LC57"><span class="k">else</span></div>
<div class="line" id="LC58">	<span class="c"># for comparing the most recent commit to the one previous</span></div>
<div class="line" id="LC59">	<span class="nv">args</span><span class="o">=</span><span class="s2">&quot;PREV:HEAD&quot;</span>;</div>
<div class="line" id="LC60">	<span class="c"># diff=`svn diff --no-diff-deleted -x &quot;-u -b -w --ignore-eol-style&quot; -r PREV:HEAD`;</span></div>
<div class="line" id="LC61">	<span class="nv">out</span><span class="o">=</span><span class="s2">&quot;$1&quot;</span>;</div>
<div class="line" id="LC62"><span class="k">fi</span></div>
<div class="line" id="LC63"></div>
<div class="line" id="LC64"><span class="c"># Error if not enough parameters have been entered</span></div>
<div class="line" id="LC65"><span class="k">if</span> <span class="o">[</span> <span class="s2">&quot;$out&quot;</span> <span class="o">==</span> <span class="s2">&quot;&quot;</span> <span class="o">]</span>; <span class="k">then</span></div>
<div class="line" id="LC66"><span class="k">	</span><span class="nb">echo</span>;</div>
<div class="line" id="LC67">	<span class="nb">echo</span> <span class="s2">&quot;ERROR! *************************************&quot;</span>;</div>
<div class="line" id="LC68">	<span class="nb">echo</span> <span class="s2">&quot;You must at least enter an output file path.&quot;</span>;</div>
<div class="line" id="LC69">	<span class="nb">echo</span> <span class="s2">&quot;Enter &#39;diff2html help&#39; for usage.&quot;</span></div>
<div class="line" id="LC70">	<span class="nb">echo</span>;</div>
<div class="line" id="LC71">	<span class="nb">exit</span>;</div>
<div class="line" id="LC72"><span class="k">fi</span></div>
<div class="line" id="LC73"></div>
<div class="line" id="LC74"><span class="nb">echo</span>;</div>
<div class="line" id="LC75"><span class="k">if</span> <span class="o">[</span> <span class="s2">&quot;$args&quot;</span> <span class="o">==</span> <span class="s2">&quot;HEAD&quot;</span> <span class="o">]</span>; <span class="k">then</span></div>
<div class="line" id="LC76"><span class="k">	</span><span class="nb">echo</span> <span class="s2">&quot;NOTE: Keep in mind files not &#39;added&#39; to source control will not be &quot;</span>;</div>
<div class="line" id="LC77">	<span class="nb">echo</span> <span class="s2">&quot;included in the diff. Please first &#39;add&#39; those files to run local diff &quot;</span>;</div>
<div class="line" id="LC78">	<span class="nb">echo</span> <span class="s2">&quot;on them. (These files with be displayed in their entirety.)&quot;</span>;</div>
<div class="line" id="LC79">	<span class="nb">echo</span>;</div>
<div class="line" id="LC80">	<span class="nb">echo</span> <span class="s2">&quot;Sending local diff to: $out&quot;</span>;</div>
<div class="line" id="LC81"><span class="k">else</span></div>
<div class="line" id="LC82"><span class="k">	</span><span class="nb">echo</span> <span class="s2">&quot;Sending head to previous diff to: $out&quot;</span>;</div>
<div class="line" id="LC83"><span class="k">fi</span></div>
<div class="line" id="LC84"></div>
<div class="line" id="LC85"></div>
<div class="line" id="LC86"><span class="nb">echo</span> <span class="s2">&quot;&quot;</span> &gt; <span class="nv">$out</span>;</div>
<div class="line" id="LC87"></div>
<div class="line" id="LC88"><span class="c"># Send the header of the html file to the output file</span></div>
<div class="line" id="LC89">pipeout <span class="s2">&quot;</span></div>
<div class="line" id="LC90"><span class="s2">&lt;html&gt;</span></div>
<div class="line" id="LC91"><span class="s2">&lt;head&gt;</span></div>
<div class="line" id="LC92"><span class="s2">&lt;title&gt;Diff for $PWD&lt;/title&gt;</span></div>
<div class="line" id="LC93"><span class="s2">&lt;/head&gt;</span></div>
<div class="line" id="LC94"><span class="s2">        &lt;style media=\&quot;screen\&quot; type=\&quot;text/css\&quot;&gt;</span></div>
<div class="line" id="LC95"></div>
<div class="line" id="LC96"><span class="s2">body {</span></div>
<div class="line" id="LC97"><span class="s2">	margin: 0;</span></div>
<div class="line" id="LC98"><span class="s2">	padding: 0;</span></div>
<div class="line" id="LC99"><span class="s2">	background-color: #000000;</span></div>
<div class="line" id="LC100"><span class="s2">}</span></div>
<div class="line" id="LC101"></div>
<div class="line" id="LC102"><span class="s2">pre {</span></div>
<div class="line" id="LC103"><span class="s2">	color: #F8F8F8;</span></div>
<div class="line" id="LC104"><span class="s2">	background-color: #0B161D;</span></div>
<div class="line" id="LC105"></div>
<div class="line" id="LC106"><span class="s2">	margin: 0;</span></div>
<div class="line" id="LC107"><span class="s2">	padding: 0 0 0 2px;</span></div>
<div class="line" id="LC108"><span class="s2">	font-family: PanicSans, monospace;</span></div>
<div class="line" id="LC109"><span class="s2">	font-size: 12px;</span></div>
<div class="line" id="LC110"><span class="s2">	line-height: 1.3em;</span></div>
<div class="line" id="LC111"><span class="s2">	word-wrap: break-word;</span></div>
<div class="line" id="LC112"><span class="s2">	white-space: pre;</span></div>
<div class="line" id="LC113"><span class="s2">	white-space: pre-wrap;</span></div>
<div class="line" id="LC114"><span class="s2">	white-space: -moz-pre-wrap;</span></div>
<div class="line" id="LC115"><span class="s2">	white-space: -o-pre-wrap;</span></div>
<div class="line" id="LC116"></div>
<div class="line" id="LC117"></div>
<div class="line" id="LC118"><span class="s2">   padding-top: 0.2em;</span></div>
<div class="line" id="LC119"><span class="s2">   padding-bottom: 0.1em;</span></div>
<div class="line" id="LC120"><span class="s2">}</span></div>
<div class="line" id="LC121"></div>
<div class="line" id="LC122"><span class="s2">pre span {</span></div>
<div class="line" id="LC123"><span class="s2">   padding-top: 0.2em;</span></div>
<div class="line" id="LC124"><span class="s2">   padding-bottom: 0.1em;</span></div>
<div class="line" id="LC125"><span class="s2">}</span></div>
<div class="line" id="LC126"></div>
<div class="line" id="LC127"><span class="s2">/* Comment */</span></div>
<div class="line" id="LC128"><span class="s2">pre .comment {</span></div>
<div class="line" id="LC129"><span class="s2">	color: #F8F8F8;</span></div>
<div class="line" id="LC130"><span class="s2">	font-style: italic;</span></div>
<div class="line" id="LC131"><span class="s2">	background-color: #0B161D;</span></div>
<div class="line" id="LC132"><span class="s2">}</span></div>
<div class="line" id="LC133"><span class="s2">/* diff.header */</span></div>
<div class="line" id="LC134"><span class="s2">pre.textmate-source.plasticcodewrap .meta_diff, pre.textmate-source.plasticcodewrap .meta_diff_header {</span></div>
<div class="line" id="LC135"><span class="s2">	color: #F8F8F8;</span></div>
<div class="line" id="LC136"><span class="s2">	font-style: italic;</span></div>
<div class="line" id="LC137"><span class="s2">	background-color: #0E2231;</span></div>
<div class="line" id="LC138"><span class="s2">}</span></div>
<div class="line" id="LC139"></div>
<div class="line" id="LC140"><span class="s2">/* diff.header */</span></div>
<div class="line" id="LC141"><span class="s2">pre .at2 {</span></div>
<div class="line" id="LC142"><span class="s2">	color: #F8F8F8;</span></div>
<div class="line" id="LC143"><span class="s2">	font-style: italic;</span></div>
<div class="line" id="LC144"><span class="s2">	font-weight: bold;</span></div>
<div class="line" id="LC145"><span class="s2">	background-color: #0B161D;</span></div>
<div class="line" id="LC146"><span class="s2">}</span></div>
<div class="line" id="LC147"></div>
<div class="line" id="LC148"><span class="s2">/* diff.deleted */</span></div>
<div class="line" id="LC149"><span class="s2">pre .minus {</span></div>
<div class="line" id="LC150"><span class="s2">	color: #F8F8F8;</span></div>
<div class="line" id="LC151"><span class="s2">	background-color: #D03620;</span></div>
<div class="line" id="LC152"><span class="s2">}</span></div>
<div class="line" id="LC153"><span class="s2">/* diff.inserted */</span></div>
<div class="line" id="LC154"><span class="s2">pre .plus {</span></div>
<div class="line" id="LC155"><span class="s2">	color: #F8F8F8;</span></div>
<div class="line" id="LC156"><span class="s2">	background-color: #41A83E;</span></div>
<div class="line" id="LC157"><span class="s2">}</span></div>
<div class="line" id="LC158"></div>
<div class="line" id="LC159"><span class="s2">pre span .index   {</span></div>
<div class="line" id="LC160"><span class="s2">    background-color: #0E2231;</span></div>
<div class="line" id="LC161"><span class="s2">}</span></div>
<div class="line" id="LC162"></div>
<div class="line" id="LC163"><span class="s2">pre span .index:before {</span></div>
<div class="line" id="LC164"><span class="s2">/*    content:\&quot;&lt;div&gt;&lt;/div&gt;\&quot;;*/</span></div>
<div class="line" id="LC165"><span class="s2">}</span></div>
<div class="line" id="LC166"></div>
<div class="line" id="LC167"><span class="s2">.break {</span></div>
<div class="line" id="LC168"><span class="s2">    padding-top:15px;</span></div>
<div class="line" id="LC169"><span class="s2">}</span></div>
<div class="line" id="LC170"></div>
<div class="line" id="LC171"><span class="s2">.headerDivider {</span></div>
<div class="line" id="LC172"><span class="s2">    background-color: #0E2231;</span></div>
<div class="line" id="LC173"><span class="s2">    padding-bottom: 4px;</span></div>
<div class="line" id="LC174"><span class="s2">}</span></div>
<div class="line" id="LC175"></div>
<div class="line" id="LC176"><span class="s2">pre .minus3   {</span></div>
<div class="line" id="LC177"><span class="s2">	font-weight: bold;</span></div>
<div class="line" id="LC178"><span class="s2">	background-color: #280A06; /*#0B161D;*/</span></div>
<div class="line" id="LC179"><span class="s2">}</span></div>
<div class="line" id="LC180"><span class="s2">pre .plus3 {</span></div>
<div class="line" id="LC181"><span class="s2">	font-weight: bold;</span></div>
<div class="line" id="LC182"><span class="s2">	background-color: #0B230E; /*#0B161D;*/</span></div>
<div class="line" id="LC183"><span class="s2">}</span></div>
<div class="line" id="LC184"><span class="s2">pre .only     { color: purple;                   }</span></div>
<div class="line" id="LC185"><span class="s2">pre .diff     { color: #8A2BE2;                    }</span></div>
<div class="line" id="LC186"></div>
<div class="line" id="LC187"></div>
<div class="line" id="LC188"><span class="s2">/* diff.changed */</span></div>
<div class="line" id="LC189"><span class="s2">pre.textmate-source.plasticcodewrap .markup_changed {</span></div>
<div class="line" id="LC190"><span class="s2">	color: #F8F8F8;</span></div>
<div class="line" id="LC191"><span class="s2">	background-color: #C4B14A;</span></div>
<div class="line" id="LC192"><span class="s2">}</span></div>
<div class="line" id="LC193"><span class="s2">&lt;/style&gt;</span></div>
<div class="line" id="LC194"><span class="s2">&lt;body&gt;</span></div>
<div class="line" id="LC195"><span class="s2">&lt;pre&gt;</span></div>
<div class="line" id="LC196"><span class="s2">&lt;span class=\&quot;comment\&quot;&gt;</span></div>
<div class="line" id="LC197"><span class="s2">========= DIFFS =========&quot;</span>;</div>
<div class="line" id="LC198"></div>
<div class="line" id="LC199"><span class="nb">echo</span> -n <span class="s1">&#39;&#39;</span></div>
<div class="line" id="LC200"></div>
<div class="line" id="LC201"></div>
<div class="line" id="LC202"><span class="nv">first</span><span class="o">=</span>1</div>
<div class="line" id="LC203"><span class="nv">diffseen</span><span class="o">=</span>0</div>
<div class="line" id="LC204"><span class="nv">lastonly</span><span class="o">=</span>0</div>
<div class="line" id="LC205"><span class="nv">folderPropertiesSkipped</span><span class="o">=</span>0</div>
<div class="line" id="LC206"></div>
<div class="line" id="LC207"><span class="nv">OIFS</span><span class="o">=</span><span class="nv">$IFS</span></div>
<div class="line" id="LC208"><span class="nv">IFS</span><span class="o">=</span><span class="s1">&#39;</span></div>
<div class="line" id="LC209"><span class="s1">&#39;</span></div>
<div class="line" id="LC210"></div>
<div class="line" id="LC211"><span class="c"># Pipe out the svn diff to our processing loop to add html tags</span></div>
<div class="line" id="LC212">svn diff --no-diff-deleted -x <span class="s2">&quot;-u -b -w --ignore-eol-style&quot;</span> -r <span class="nv">$args</span> | <span class="k">while </span><span class="nb">read</span> -r s</div>
<div class="line" id="LC213"><span class="k">do</span></div>
<div class="line" id="LC214">	<span class="c"># echo &quot;$line&quot;;</span></div>
<div class="line" id="LC215"></div>
<div class="line" id="LC216">&nbsp;&nbsp;&nbsp;&nbsp;<span class="c"># Get beginning of line to determine what type</span></div>
<div class="line" id="LC217">&nbsp;&nbsp;&nbsp;&nbsp;<span class="c"># of diff line it is.</span></div>
<div class="line" id="LC218">&nbsp;&nbsp;&nbsp;&nbsp;<span class="nv">t1</span><span class="o">=</span><span class="k">${</span><span class="nv">s</span><span class="p">:</span><span class="nv">0</span><span class="p">:</span><span class="nv">1</span><span class="k">}</span></div>
<div class="line" id="LC219">&nbsp;&nbsp;&nbsp;&nbsp;<span class="nv">t2</span><span class="o">=</span><span class="k">${</span><span class="nv">s</span><span class="p">:</span><span class="nv">0</span><span class="p">:</span><span class="nv">2</span><span class="k">}</span></div>
<div class="line" id="LC220">&nbsp;&nbsp;&nbsp;&nbsp;<span class="nv">t3</span><span class="o">=</span><span class="k">${</span><span class="nv">s</span><span class="p">:</span><span class="nv">0</span><span class="p">:</span><span class="nv">3</span><span class="k">}</span></div>
<div class="line" id="LC221">&nbsp;&nbsp;&nbsp;&nbsp;<span class="nv">t4</span><span class="o">=</span><span class="k">${</span><span class="nv">s</span><span class="p">:</span><span class="nv">0</span><span class="p">:</span><span class="nv">4</span><span class="k">}</span></div>
<div class="line" id="LC222">&nbsp;&nbsp;&nbsp;&nbsp;<span class="nv">t6</span><span class="o">=</span><span class="k">${</span><span class="nv">s</span><span class="p">:</span><span class="nv">0</span><span class="p">:</span><span class="nv">6</span><span class="k">}</span></div>
<div class="line" id="LC223">&nbsp;&nbsp;&nbsp;&nbsp;<span class="nv">t7</span><span class="o">=</span><span class="k">${</span><span class="nv">s</span><span class="p">:</span><span class="nv">0</span><span class="p">:</span><span class="nv">7</span><span class="k">}</span></div>
<div class="line" id="LC224"></div>
<div class="line" id="LC225">&nbsp;&nbsp;&nbsp;&nbsp;<span class="c"># Determine HTML class to use.</span></div>
<div class="line" id="LC226">&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">if</span> <span class="o">[[</span> <span class="s2">&quot;$t7&quot;</span> <span class="o">==</span> <span class="s1">&#39;Only in&#39;</span> <span class="o">]]</span>; <span class="k">then</span></div>
<div class="line" id="LC227"><span class="k">        </span><span class="nv">cls</span><span class="o">=</span><span class="s1">&#39;only&#39;</span></div>
<div class="line" id="LC228">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">if</span> <span class="o">[[</span> <span class="nv">$diffseen</span> -eq 0 <span class="o">]]</span>; <span class="k">then</span></div>
<div class="line" id="LC229"><span class="k">            </span><span class="nv">diffseen</span><span class="o">=</span>1</div>
<div class="line" id="LC230">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">if</span> <span class="o">[</span> <span class="nv">$folderPropertiesSkipped</span> -eq 1 <span class="o">]</span>; <span class="k">then</span></div>
<div class="line" id="LC231"><span class="k">				</span><span class="nb">echo</span> -n <span class="s1">&#39;&lt;/span&gt;&#39;</span> &gt;&gt; <span class="nv">$out</span>;</div>
<div class="line" id="LC232">			<span class="k">fi</span></div>
<div class="line" id="LC233"><span class="k">        else</span></div>
<div class="line" id="LC234"><span class="k">            if</span> <span class="o">[[</span> <span class="nv">$lastonly</span> -eq 0 <span class="o">]]</span>; <span class="k">then</span></div>
<div class="line" id="LC235"><span class="k">                if</span> <span class="o">[</span> <span class="nv">$folderPropertiesSkipped</span> -eq 1 <span class="o">]</span>; <span class="k">then</span></div>
<div class="line" id="LC236"><span class="k">					</span><span class="nb">echo</span> <span class="s2">&quot;&lt;/div&gt;&quot;</span> &gt;&gt; <span class="nv">$out</span>;</div>
<div class="line" id="LC237">				<span class="k">fi</span></div>
<div class="line" id="LC238"><span class="k">            fi</span></div>
<div class="line" id="LC239"><span class="k">        fi</span></div>
<div class="line" id="LC240"><span class="k">        if</span> <span class="o">[[</span> <span class="nv">$lastonly</span> -eq 0 <span class="o">]]</span>; <span class="k">then</span></div>
<div class="line" id="LC241"><span class="k">            if</span> <span class="o">[</span> <span class="nv">$folderPropertiesSkipped</span> -eq 1 <span class="o">]</span>; <span class="k">then</span></div>
<div class="line" id="LC242"><span class="k">				</span><span class="nb">echo</span> <span class="s2">&quot;&lt;div class=&#39;diffdiv&#39;&gt;&quot;</span> &gt;&gt; <span class="nv">$out</span>;</div>
<div class="line" id="LC243">			<span class="k">fi</span></div>
<div class="line" id="LC244"><span class="k">        fi</span></div>
<div class="line" id="LC245"><span class="k">        </span><span class="nv">lastonly</span><span class="o">=</span>1</div>
<div class="line" id="LC246">&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">elif</span> <span class="o">[[</span> <span class="s2">&quot;$t4&quot;</span> <span class="o">==</span> <span class="s1">&#39;diff&#39;</span> <span class="o">]]</span>; <span class="k">then</span></div>
<div class="line" id="LC247"><span class="k">        </span><span class="nv">cls</span><span class="o">=</span><span class="s1">&#39;diff&#39;</span></div>
<div class="line" id="LC248">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">if</span> <span class="o">[[</span> <span class="nv">$diffseen</span> -eq 0 <span class="o">]]</span>; <span class="k">then</span></div>
<div class="line" id="LC249"><span class="k">            </span><span class="nv">diffseen</span><span class="o">=</span>1</div>
<div class="line" id="LC250">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">if</span> <span class="o">[</span> <span class="nv">$folderPropertiesSkipped</span> -eq 1 <span class="o">]</span>; <span class="k">then</span></div>
<div class="line" id="LC251"><span class="k">				</span><span class="nb">echo</span> -n <span class="s1">&#39;&lt;/span&gt;&#39;</span> &gt;&gt; <span class="nv">$out</span>;</div>
<div class="line" id="LC252">			<span class="k">fi</span></div>
<div class="line" id="LC253"><span class="k">        else</span></div>
<div class="line" id="LC254"><span class="k">            if</span> <span class="o">[</span> <span class="nv">$folderPropertiesSkipped</span> -eq 1 <span class="o">]</span>; <span class="k">then</span></div>
<div class="line" id="LC255"><span class="k">				</span><span class="nb">echo</span> <span class="s2">&quot;&lt;/div&gt;&quot;</span> &gt;&gt; <span class="nv">$out</span>;</div>
<div class="line" id="LC256">			<span class="k">fi</span></div>
<div class="line" id="LC257"><span class="k">        fi</span></div>
<div class="line" id="LC258"><span class="k">        if</span> <span class="o">[</span> <span class="nv">$folderPropertiesSkipped</span> -eq 1 <span class="o">]</span>; <span class="k">then</span></div>
<div class="line" id="LC259"><span class="k">			</span><span class="nb">echo</span> <span class="s2">&quot;&lt;div class=&#39;diffdiv&#39;&gt;&quot;</span> &gt;&gt; <span class="nv">$out</span>;</div>
<div class="line" id="LC260">		<span class="k">fi</span></div>
<div class="line" id="LC261"><span class="k">        </span><span class="nv">lastonly</span><span class="o">=</span>0</div>
<div class="line" id="LC262">&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">elif</span>  <span class="o">[[</span> <span class="s2">&quot;$t3&quot;</span> <span class="o">==</span> <span class="s1">&#39;+++&#39;</span>  <span class="o">]]</span>; <span class="k">then</span></div>
<div class="line" id="LC263"><span class="k">        </span><span class="nv">cls</span><span class="o">=</span><span class="s1">&#39;plus3&#39;</span></div>
<div class="line" id="LC264">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="nv">lastonly</span><span class="o">=</span>0</div>
<div class="line" id="LC265">&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">elif</span>  <span class="o">[[</span> <span class="s2">&quot;$t6&quot;</span> <span class="o">==</span> <span class="s1">&#39;Index:&#39;</span>  <span class="o">]]</span>; <span class="k">then</span></div>
<div class="line" id="LC266"><span class="k">        </span><span class="nv">cls</span><span class="o">=</span><span class="s1">&#39;index&#39;</span></div>
<div class="line" id="LC267">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="nv">lastonly</span><span class="o">=</span>0</div>
<div class="line" id="LC268">		<span class="nv">folderPropertiesSkipped</span><span class="o">=</span>1</div>
<div class="line" id="LC269">&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">elif</span>  <span class="o">[[</span> <span class="s2">&quot;$t6&quot;</span> <span class="o">==</span> <span class="s1">&#39;======&#39;</span>  <span class="o">]]</span>; <span class="k">then</span></div>
<div class="line" id="LC270"><span class="k">        </span><span class="nv">cls</span><span class="o">=</span><span class="s1">&#39;headerDivider&#39;</span></div>
<div class="line" id="LC271">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="nv">lastonly</span><span class="o">=</span>0</div>
<div class="line" id="LC272">&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">elif</span>  <span class="o">[[</span> <span class="s2">&quot;$t3&quot;</span> <span class="o">==</span> <span class="s1">&#39;---&#39;</span>  <span class="o">]]</span>; <span class="k">then</span></div>
<div class="line" id="LC273"><span class="k">        </span><span class="nv">cls</span><span class="o">=</span><span class="s1">&#39;minus3&#39;</span></div>
<div class="line" id="LC274">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="nv">lastonly</span><span class="o">=</span>0</div>
<div class="line" id="LC275">&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">elif</span>  <span class="o">[[</span> <span class="s2">&quot;$t2&quot;</span> <span class="o">==</span> <span class="s1">&#39;@@&#39;</span>   <span class="o">]]</span>; <span class="k">then</span></div>
<div class="line" id="LC276"><span class="k">        </span><span class="nv">cls</span><span class="o">=</span><span class="s1">&#39;at2&#39;</span></div>
<div class="line" id="LC277">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="nv">lastonly</span><span class="o">=</span>0</div>
<div class="line" id="LC278">&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">elif</span>  <span class="o">[[</span> <span class="s2">&quot;$t1&quot;</span> <span class="o">==</span> <span class="s1">&#39;+&#39;</span>    <span class="o">]]</span>; <span class="k">then</span></div>
<div class="line" id="LC279"><span class="k">        </span><span class="nv">cls</span><span class="o">=</span><span class="s1">&#39;plus&#39;</span></div>
<div class="line" id="LC280">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="nv">lastonly</span><span class="o">=</span>0</div>
<div class="line" id="LC281">&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">elif</span>  <span class="o">[[</span> <span class="s2">&quot;$t1&quot;</span> <span class="o">==</span> <span class="s1">&#39;-&#39;</span>    <span class="o">]]</span>; <span class="k">then</span></div>
<div class="line" id="LC282"><span class="k">        </span><span class="nv">cls</span><span class="o">=</span><span class="s1">&#39;minus&#39;</span></div>
<div class="line" id="LC283">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="nv">lastonly</span><span class="o">=</span>0</div>
<div class="line" id="LC284">&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">else</span></div>
<div class="line" id="LC285"><span class="k">        </span><span class="nv">cls</span><span class="o">=</span></div>
<div class="line" id="LC286">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="nv">lastonly</span><span class="o">=</span>0</div>
<div class="line" id="LC287">&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">fi</span></div>
<div class="line" id="LC288"></div>
<div class="line" id="LC289">&nbsp;&nbsp;&nbsp;&nbsp;<span class="c"># Convert &amp;, &lt;, &gt; to HTML entities.</span></div>
<div class="line" id="LC290">&nbsp;&nbsp;&nbsp;&nbsp;<span class="nv">s</span><span class="o">=</span><span class="k">$(</span>sed -e <span class="s1">&#39;s/\&amp;/\&amp;amp;/g&#39;</span> -e <span class="s1">&#39;s/&lt;/\&amp;lt;/g&#39;</span> -e <span class="s1">&#39;s/&gt;/\&amp;gt;/g&#39;</span> &lt;&lt;&lt;<span class="s2">&quot;$s&quot;</span><span class="k">)</span></div>
<div class="line" id="LC291">&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">if</span> <span class="o">[[</span> <span class="nv">$first</span> -eq 1 <span class="o">]]</span>; <span class="k">then</span></div>
<div class="line" id="LC292"><span class="k">        </span><span class="nv">first</span><span class="o">=</span>0</div>
<div class="line" id="LC293">&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">else</span></div>
<div class="line" id="LC294"><span class="k">        if</span> <span class="o">[</span> <span class="nv">$folderPropertiesSkipped</span> -eq 1 <span class="o">]</span>; <span class="k">then</span></div>
<div class="line" id="LC295"><span class="k">			</span><span class="nb">echo</span> &gt;&gt; <span class="nv">$out</span>;</div>
<div class="line" id="LC296">		<span class="k">fi</span></div>
<div class="line" id="LC297"><span class="k">    fi</span></div>
<div class="line" id="LC298"></div>
<div class="line" id="LC299">&nbsp;&nbsp;&nbsp;&nbsp;<span class="c"># Output the line.</span></div>
<div class="line" id="LC300">	<span class="k">if</span> <span class="o">[</span> <span class="nv">$folderPropertiesSkipped</span> -eq 1 <span class="o">]</span>; <span class="k">then</span></div>
<div class="line" id="LC301"><span class="k">	    if</span> <span class="o">[</span> <span class="s2">&quot;$cls&quot;</span> <span class="o">==</span> <span class="s2">&quot;index&quot;</span> <span class="o">]</span>; <span class="k">then</span></div>
<div class="line" id="LC302"><span class="k">	        </span><span class="nb">echo</span> -n <span class="s1">&#39;&lt;div class=&quot;break&quot;&gt;&lt;span&gt; &lt;/span&gt;&lt;/div&gt;&lt;span class=&quot;&#39;</span><span class="k">${</span><span class="nv">cls</span><span class="k">}</span><span class="s1">&#39;&quot;&gt;&#39;</span><span class="k">${</span><span class="nv">s</span><span class="k">}</span><span class="s1">&#39;&lt;/span&gt;&#39;</span> &gt;&gt; <span class="nv">$out</span>;</div>
<div class="line" id="LC303">	    <span class="k">elif</span> <span class="o">[</span> <span class="s2">&quot;$cls&quot;</span> <span class="o">==</span> <span class="s2">&quot;headerDivider&quot;</span> <span class="o">]</span>; <span class="k">then</span></div>
<div class="line" id="LC304"><span class="k">	        </span><span class="nb">echo</span> -n <span class="s1">&#39;&lt;div class=&quot;headerDivider&quot;&gt;&lt;span class=&quot;index&quot;&gt;&#39;</span><span class="k">${</span><span class="nv">s</span><span class="k">}</span><span class="s1">&#39;&lt;/span&gt;&lt;/div&gt;&#39;</span> &gt;&gt; <span class="nv">$out</span>;</div>
<div class="line" id="LC305">	    <span class="k">elif</span> <span class="o">[</span> <span class="s2">&quot;$cls&quot;</span> <span class="o">==</span> <span class="s2">&quot;at2&quot;</span> <span class="o">]</span>; <span class="k">then</span></div>
<div class="line" id="LC306"><span class="k">	        </span><span class="nb">echo</span> -n <span class="s1">&#39;&lt;div style=&quot;padding-top:2px&quot;&gt;&lt;span&gt; &lt;/span&gt;&lt;/div&gt;&lt;span class=&quot;&#39;</span><span class="k">${</span><span class="nv">cls</span><span class="k">}</span><span class="s1">&#39;&quot;&gt;&#39;</span><span class="k">${</span><span class="nv">s</span><span class="k">}</span><span class="s1">&#39;&lt;/span&gt;&#39;</span> &gt;&gt; <span class="nv">$out</span>;</div>
<div class="line" id="LC307">	    <span class="k">elif</span> <span class="o">[[</span> <span class="s2">&quot;$cls&quot;</span> <span class="o">]]</span>; <span class="k">then</span></div>
<div class="line" id="LC308"><span class="k">	        </span><span class="nb">echo</span> -n <span class="s1">&#39;&lt;span class=&quot;&#39;</span><span class="k">${</span><span class="nv">cls</span><span class="k">}</span><span class="s1">&#39;&quot;&gt;&#39;</span><span class="k">${</span><span class="nv">s</span><span class="k">}</span><span class="s1">&#39;&lt;/span&gt;&#39;</span> &gt;&gt; <span class="nv">$out</span>;</div>
<div class="line" id="LC309">	    <span class="k">else</span></div>
<div class="line" id="LC310"><span class="k">	        </span><span class="nb">echo</span> -n <span class="k">${</span><span class="nv">s</span><span class="k">}</span> &gt;&gt; <span class="nv">$out</span>;</div>
<div class="line" id="LC311">	    <span class="k">fi</span></div>
<div class="line" id="LC312"><span class="k">	fi</span></div>
<div class="line" id="LC313"></div>
<div class="line" id="LC314"><span class="k">done</span></div>
<div class="line" id="LC315"></div>
<div class="line" id="LC316"><span class="nv">IFS</span><span class="o">=</span><span class="nv">$OIFS</span></div>
<div class="line" id="LC317"></div>
<div class="line" id="LC318"><span class="k">if</span> <span class="o">[[</span> <span class="nv">$diffseen</span> -eq 0  <span class="o">&amp;&amp;</span>  <span class="nv">$onlyseen</span> -eq 0 <span class="o">]]</span>; <span class="k">then</span></div>
<div class="line" id="LC319"><span class="k">    </span><span class="nb">echo</span> -n <span class="s1">&#39;&lt;/span&gt;&#39;</span> &gt;&gt; <span class="nv">$out</span>;</div>
<div class="line" id="LC320"><span class="k">else</span></div>
<div class="line" id="LC321"><span class="k">    </span><span class="nb">echo</span> <span class="s2">&quot;&lt;/div&gt;&quot;</span> &gt;&gt; <span class="nv">$out</span>;</div>
<div class="line" id="LC322"><span class="k">fi</span></div>
<div class="line" id="LC323"><span class="nb">echo</span> &gt;&gt; <span class="nv">$out</span>;</div>
<div class="line" id="LC324"></div>
<div class="line" id="LC325"></div>
<div class="line" id="LC326"><span class="c"># Add the footer to the output file</span></div>
<div class="line" id="LC327">pipeout <span class="s2">&quot;</span></div>
<div class="line" id="LC328"></div>
<div class="line" id="LC329"></div>
<div class="line" id="LC330"><span class="s2">========= END OF DIFFS =========</span></div>
<div class="line" id="LC331"><span class="s2">&lt;/span&gt;</span></div>
<div class="line" id="LC332"><span class="s2">&lt;/pre&gt;</span></div>
<div class="line" id="LC333"><span class="s2">&lt;/body&gt;</span></div>
<div class="line" id="LC334"><span class="s2">&lt;/html&gt;</span></div>
<div class="line" id="LC335"><span class="s2">&quot;</span>;</div>
<div class="line" id="LC336"></div>
<div class="line" id="LC337"><span class="nb">echo</span> <span class="s2">&quot;HTML diff complete.&quot;</span>;</div>
</pre>
</div>
</td>
</tr>
</table></div>
</p>
<p style="font-size: 10px;"> Posted by way of <a href="http://plains.posterous.com/svndiff2html-create-more-readable-diffs">Plains of the Plastic Intafon</a> </p>
</p></div>
<img src="http://feeds.feedburner.com/~r/plasticstare/~4/qzlCS7hIqLU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.plasticstare.com/plains/2011/03/17/svndiff2html-convert-svn-diffs-to-more-readable-html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.plasticstare.com/plains/2011/03/17/svndiff2html-convert-svn-diffs-to-more-readable-html/</feedburner:origLink></item>
		<item>
		<title>Pass flashvars from an embedded swf to a loaded swf.</title>
		<link>http://feedproxy.google.com/~r/plasticstare/~3/2Mr6V7GsJis/</link>
		<comments>http://www.plasticstare.com/plains/2010/10/14/pass-flashvars-from-an-embedded-swf-to-a-loaded-swf/#comments</comments>
		<pubDate>Fri, 15 Oct 2010 06:24:02 +0000</pubDate>
		<dc:creator>plains</dc:creator>
				<category><![CDATA[flash]]></category>

		<guid isPermaLink="false">http://www.plasticstare.com/plains/2010/10/14/pass-flashvars-from-an-embedded-swf-to-a-loaded-swf/</guid>
		<description><![CDATA[This is somewhat trivial though not entirely intuitive &#8212; passing flashvars from an embedded flash movie to a flash movie that the swf is loading. I was working on some code recently that accomplished this task using one solution that I have seen most often &#8212; by passing the flashvars as query string parameters. In [...]]]></description>
			<content:encoded><![CDATA[<div class='posterous_autopost'>
<p>This is somewhat trivial though not entirely intuitive -- passing flashvars from an embedded flash movie to a flash movie that the swf is loading. I was working on some code recently that accomplished this task using one solution that I have seen most often -- by passing the flashvars as query string parameters. In other words:</p>
<p>SwfA.swf is embedded on the page and has the flash var "userName" with the value "Voytek". SwfB.swf is loaded by&nbsp;SwfA.swf, and must utilize the userName variable. Often this will be accomplished by loading&nbsp;SwfB&nbsp;using the URL "SwfB.swf?userName=Voytek". This works just fine for most cases. There are, however some cases where this can be problematic. For example, suppose the site this is to be deployed on is a high traffic site and a caching system is employed to cache the swf files. Depending on the caching server, it may be that files are cached according to their *full* URL, which means that if we now need to load the swf with the userName "Milgrim", we have cached the file a second time referenced by the URL "SwfB.swf?userName=Milgrim". Now deploy this on a site with hundreds of thousands of users, and you might as well not even cache the swf files at all.</p>
<p>Fortunately, it came to my attention that the loaded swf&nbsp;SwfB&nbsp;can access the flashVars just as easily as&nbsp;SwfA, it just so happens that that action of getting the flashVars needs to be made asynchronously. As long as the loaded swf&nbsp;SwfB&nbsp;has already been added to the stage, it can access the flashVars via "stage<span class="s1">.</span>loaderInfo<span class="s1">.</span>parameters" (rather than accessing the flashVars in the embedded SwfA using "root<span class="s1">.</span>loaderInfo<span class="s1">.</span>parameters"). In order for this to be possible however, SwfB must be loaded and added to the display list of the stage.</p>
<div class="igBar"><span id="lcode-1"><a href="#" onclick="javascript:showCodeTxt('code-1'); return false;">View as Plain Text<img class="poparrow" src="http://www.plasticstare.com/plains/wp-content/plugins/ig_syntax_hilite/img/poparrow.gif"/></a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-1">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">package</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#123;</span>&nbsp; &nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; import flash.<span style="">display</span>.<span style="">Sprite</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; import flash.<span style="">display</span>.<span style="">Loader</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; import flash.<span style="">net</span>.<span style="">URLRequest</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#008000;">/** </span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">&nbsp; &nbsp;&nbsp; * Loads SwfB in the same way a swf usually loads a swf. </span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">&nbsp; &nbsp;&nbsp; */</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; public class SwfA extends Sprite</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; public function SwfA<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var flashVars:Object = root.<span style="">loaderInfo</span>.<span style="">parameters</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var s:String = this + &amp;quot;\n&amp;quot;;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for <span style="color:#006600; font-weight:bold;">&#40;</span>var i:String in flashVars<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; s += i + &amp;quot; = &amp;quot; + flashVars<span style="color:#006600; font-weight:bold;">&#91;</span>i<span style="color:#006600; font-weight:bold;">&#93;</span> + &amp;quot;\n&amp;quot;;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; trace<span style="color:#006600; font-weight:bold;">&#40;</span>&amp;quot;Main Client FlashVars:&amp;quot; + s<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var ldr:Loader = new Loader<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var urlReq:URLRequest = new URLRequest<span style="color:#006600; font-weight:bold;">&#40;</span>&amp;quot;SwfB.<span style="">swf</span>&amp;quot;<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ldr.<span style="">load</span><span style="color:#006600; font-weight:bold;">&#40;</span>urlReq<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; addChild<span style="color:#006600; font-weight:bold;">&#40;</span>ldr<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">package</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; import flash.<span style="">display</span>.<span style="">Sprite</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; import flash.<span style="">events</span>.<span style="">Event</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#008000;">/**</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">&nbsp; &nbsp;&nbsp; * This class is loaded by SwfA and waits until it has been added to the stage</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">&nbsp; &nbsp;&nbsp; * in order to obtain the flash vars from the stage.loaderInfo.</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">&nbsp; &nbsp;&nbsp; */</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; public class SwfB extends Sprite</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; public function SwfB<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; addEventListener<span style="color:#006600; font-weight:bold;">&#40;</span>Event.<span style="">ADDED_TO_STAGE</span>, onAddedToStage<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; private function onAddedToStage<span style="color:#006600; font-weight:bold;">&#40;</span>e:Event<span style="color:#006600; font-weight:bold;">&#41;</span>:void</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var flashVars:Object = stage.<span style="">loaderInfo</span>.<span style="">parameters</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var s:String = this + &amp;quot;\n&amp;quot;;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for <span style="color:#006600; font-weight:bold;">&#40;</span>var i:String in flashVars<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; s += i + &amp;quot; = &amp;quot; + flashVars<span style="color:#006600; font-weight:bold;">&#91;</span>i<span style="color:#006600; font-weight:bold;">&#93;</span> + &amp;quot;\n&amp;quot;;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; trace<span style="color:#006600; font-weight:bold;">&#40;</span>&amp;quot;Loaded Swf FlashVars when Added to Stage: &amp;quot; + s<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>As you can see from the code above, SwfA just loads SwfB just like you would normally do. SwfB just listens for its own&nbsp;ADDED_TO_STAGE event and then grabs the flashVars from the stage's loaderInfo. The only catch is that if the UI build or some other immediate process depends on the flashVars, then you need to make sure and wait for the ADDED_TO_STAGE event in order to proceed.</p>
<p style="font-size: 10px;"> Posted by way of <a href="http://plains.posterous.com/pass-flashvars-from-an-embedded-swf-to-a-load">micro-plains</a> </p>
</p></div>
<img src="http://feeds.feedburner.com/~r/plasticstare/~4/2Mr6V7GsJis" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.plasticstare.com/plains/2010/10/14/pass-flashvars-from-an-embedded-swf-to-a-loaded-swf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.plasticstare.com/plains/2010/10/14/pass-flashvars-from-an-embedded-swf-to-a-loaded-swf/</feedburner:origLink></item>
		<item>
		<title>trace() not working in Flash Builder?</title>
		<link>http://feedproxy.google.com/~r/plasticstare/~3/3f2GioQ9SrQ/</link>
		<comments>http://www.plasticstare.com/plains/2010/10/14/trace-not-working-in-flash-builder/#comments</comments>
		<pubDate>Thu, 14 Oct 2010 20:29:25 +0000</pubDate>
		<dc:creator>plains</dc:creator>
				<category><![CDATA[random]]></category>

		<guid isPermaLink="false">http://www.plasticstare.com/plains/2010/10/14/trace-not-working-in-flash-builder/</guid>
		<description><![CDATA[Tip for the day: If trace() is not working in Flash Builder debug mode, try quitting Flash Builder and all browsers and delete the mm.cfg file. For some reason this fixed the issue for me... Posted via email from micro-plains]]></description>
			<content:encoded><![CDATA[<div class='posterous_autopost'>
<p>Tip for the day: If trace() is not working in Flash Builder debug mode, try quitting Flash Builder and all browsers and delete the mm.cfg file. For some reason this fixed the issue for me...</p>
<p style="font-size: 10px;"> <a href="http://posterous.com">Posted via email</a>  from <a href="http://plains.posterous.com/trace-not-working-in-flash-builder">micro-plains</a> </p>
</p></div>
<img src="http://feeds.feedburner.com/~r/plasticstare/~4/3f2GioQ9SrQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.plasticstare.com/plains/2010/10/14/trace-not-working-in-flash-builder/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.plasticstare.com/plains/2010/10/14/trace-not-working-in-flash-builder/</feedburner:origLink></item>
		<item>
		<title>Translate Mac line endings to Unix for grep</title>
		<link>http://feedproxy.google.com/~r/plasticstare/~3/TvmmUVFrtbI/</link>
		<comments>http://www.plasticstare.com/plains/2010/10/13/translate-mac-line-endings-to-unix-for-grep/#comments</comments>
		<pubDate>Thu, 14 Oct 2010 01:08:04 +0000</pubDate>
		<dc:creator>plains</dc:creator>
				<category><![CDATA[random]]></category>

		<guid isPermaLink="false">http://www.plasticstare.com/plains/2010/10/13/translate-mac-line-endings-to-unix-for-grep/</guid>
		<description><![CDATA[Today I was attempting to run a grep search on all the *.as files in the project code I am working with. The code in places is both old and new and has been edited in a variety of editors, from the Flash IDE, to TextMate, to Flash Builder, to who knows how else. The [...]]]></description>
			<content:encoded><![CDATA[<div class='posterous_autopost'>
<p>Today I was attempting to run a grep search on all the *.as files in the project code I am working with. The code in places is both old and new and has been edited in a variety of editors, from the Flash IDE, to TextMate, to Flash Builder, to who knows how else. The unfortunate result of this history is that many of the files have Mac style line endings (\r) instead of Unix style line endings (\n). When trying to run a grep search on these files, the search returns a bunch of jumbled code salad.</p>
<p>Since I was only really wanting to do the search for now, I ended up using:</p>
<blockquote class="posterous_short_quote"><p><code>tr '\r' '\n' &lt;filename.txt | grep searchstring</code></p>
</blockquote>
<p>This works by using the transform command to convert the mac line endings, and pipe out the result to a grep search that is now happy. For more permanent results, the line endings could be replaced entirely using:</p>
<blockquote class="posterous_short_quote"><p><code>perl -pi -e 's/\r/\n/g' textfile.txt</code></p></blockquote>
<p>The "tr" command, however, was a great temporary work around for running the search on the files that I needed to run, since I didn't want to end up having to recommit a bunch of files to SVN just to change the line-endings. The original jumbled search result I was getting was somewhat inexplicable until I started analyzing the reason why it worked for some files and not for others. Hope this helps someone out there.</p>
<p style="font-size: 10px;"> <a href="http://posterous.com">Posted via email</a>  from <a href="http://plains.posterous.com/translate-mac-line-endings-to-unix-for-grep">micro-plains</a> </p>
</p></div>
<img src="http://feeds.feedburner.com/~r/plasticstare/~4/TvmmUVFrtbI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.plasticstare.com/plains/2010/10/13/translate-mac-line-endings-to-unix-for-grep/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.plasticstare.com/plains/2010/10/13/translate-mac-line-endings-to-unix-for-grep/</feedburner:origLink></item>
		<item>
		<title>ExternalInterface.available and Security Errors</title>
		<link>http://feedproxy.google.com/~r/plasticstare/~3/IohXfMEX16M/</link>
		<comments>http://www.plasticstare.com/plains/2010/10/07/externalinterface-available-and-security-errors/#comments</comments>
		<pubDate>Thu, 07 Oct 2010 16:43:40 +0000</pubDate>
		<dc:creator>plains</dc:creator>
				<category><![CDATA[flash]]></category>

		<guid isPermaLink="false">http://www.plasticstare.com/plains/2010/10/07/externalinterface-available-and-security-errors/</guid>
		<description><![CDATA[Something I suppose I had never really tested thoroughly before having not had to deal too much with random application embeds in the wild is the issue with ExternalInterface.available not quite doing what you might expect. According to Adobe documentation, this property Indicates whether this player is in a container that offers an external interface. [...]]]></description>
			<content:encoded><![CDATA[<div class='posterous_autopost'>
<p>Something I suppose I had never really tested thoroughly before having not had to deal too much with random application embeds in the wild is the issue with ExternalInterface.available not quite doing what you might expect. According to Adobe documentation, this property</p>
<blockquote class="posterous_medium_quote"><p>Indicates whether this player is in a container that offers an external interface.      If the external interface is available, this property is <code>true</code>; otherwise,      it is <code>false</code>.</p>
</blockquote>
<p>This is usually fine, as long as your embed has allowScriptAccess defined to either "always" or "sameDomain" (when the embed lives on the same domain as the swf). In addition, when prescribing embed code for folks to use, one would normally provide the embed code with allowScriptAccess set to "always" if there was a need to use ExternalInterface. Unfortunately, the ExternalInterface.available property will return true in cases where the allowScriptAccess parameter is not set to allow access (such as on Facebook flash embeds, where it is always rewritten to "never") or when an industrious embedder has removed all the seemingly extraneous parameters from the embed.</p>
<p>The solution for this scenario is to always use a try-catch statement to trap any errors that occur when trying to access the ExternalInterface, and deal with the error accordingly. This might look something like:</p>
<p>&nbsp;&nbsp;&nbsp; if (ExternalInterface.available) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; try {<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ExternalInterface.addCallback("moo", onMoo);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } catch (error:SecurityError) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; trace("Error: " + error.toString());<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp; } else {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; trace("ExternalInterface is not available for this container.");<br />&nbsp;&nbsp;&nbsp; }</p>
<p>This is not super pretty, but this will ensure that the app doesn't generate any unexpected behavior in the wild.</p>
<p style="font-size: 10px;"> <a href="http://posterous.com">Posted via email</a>  from <a href="http://plains.posterous.com/externalinterfaceavailable-and-security-error">micro-plains</a> </p>
</p></div>
<img src="http://feeds.feedburner.com/~r/plasticstare/~4/IohXfMEX16M" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.plasticstare.com/plains/2010/10/07/externalinterface-available-and-security-errors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.plasticstare.com/plains/2010/10/07/externalinterface-available-and-security-errors/</feedburner:origLink></item>
		<item>
		<title>Flash Text Metrics</title>
		<link>http://feedproxy.google.com/~r/plasticstare/~3/kvq0llR9P4I/</link>
		<comments>http://www.plasticstare.com/plains/2010/08/17/flash-text-metrics/#comments</comments>
		<pubDate>Tue, 17 Aug 2010 23:57:21 +0000</pubDate>
		<dc:creator>plains</dc:creator>
				<category><![CDATA[actionscript]]></category>

		<guid isPermaLink="false">http://www.plasticstare.com/plains/2010/08/17/flash-text-metrics/</guid>
		<description><![CDATA[via blog.six4rty.ch I like the article at http://blog.six4rty.ch/2010/07/31/as3-multiline-textfields-and-line-metrics/, mainly because of this graphic. I found it somewhere before long ago (maybe the same place) -- it is a big help when dealing with customized text layout situations in flash where you have to do manual baseline aligment and such. Posted via email from micro-plains]]></description>
			<content:encoded><![CDATA[<div class='posterous_autopost'>
<div class="posterous_bookmarklet_entry"> <a href='http://posterous.com/getfile/files.posterous.com/plains/ljpuIsrJznGcsDckbFoCAoDzyGmgDwcCxqADhcgpxvuCgChszHglDvEnzIdm/media_httpblogsix4rty_xbzbq.jpg.scaled1000.jpg'><img src="http://posterous.com/getfile/files.posterous.com/plains/ljpuIsrJznGcsDckbFoCAoDzyGmgDwcCxqADhcgpxvuCgChszHglDvEnzIdm/media_httpblogsix4rty_xbzbq.jpg.scaled500.jpg" width="500" height="335"/></a>
<div class="posterous_quote_citation">via <a href="http://blog.six4rty.ch/wp-content/uploads/2010/07/text-metrics.jpg">blog.six4rty.ch</a></div>
<p>I like the article at <a href="http://blog.six4rty.ch/2010/07/31/as3-multiline-textfields-and-line-metrics/">http://blog.six4rty.ch/2010/07/31/as3-multiline-textfields-and-line-metrics/</a>, mainly because of this graphic. I found it somewhere before long ago (maybe the same place) -- it is a big help when dealing with customized text layout situations in flash where you have to do manual baseline aligment and such.</p>
</div>
<p style="font-size: 10px;"> <a href="http://posterous.com">Posted via email</a>  from <a href="http://plains.posterous.com/flash-text-metrics">micro-plains</a> </p>
</p></div>
<img src="http://feeds.feedburner.com/~r/plasticstare/~4/kvq0llR9P4I" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.plasticstare.com/plains/2010/08/17/flash-text-metrics/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.plasticstare.com/plains/2010/08/17/flash-text-metrics/</feedburner:origLink></item>
		<item>
		<title>More Orange. Morelomo.</title>
		<link>http://feedproxy.google.com/~r/plasticstare/~3/fzoVkg6o2oE/</link>
		<comments>http://www.plasticstare.com/plains/2010/07/28/more-orange-morelomo/#comments</comments>
		<pubDate>Thu, 29 Jul 2010 06:58:28 +0000</pubDate>
		<dc:creator>plains</dc:creator>
				<category><![CDATA[random]]></category>

		<guid isPermaLink="false">http://www.plasticstare.com/plains/2010/07/28/more-orange-morelomo/</guid>
		<description><![CDATA[via flickr.com I've been playing around with the MoreLomo app for iPhone...in lieu of getting a Harenezumi... Posted via email from Intafonetic]]></description>
			<content:encoded><![CDATA[<div class='posterous_autopost'>
<div class="posterous_bookmarklet_entry"> <img src="http://posterous.com/getfile/files.posterous.com/intafon/godjfjFhBCHmCourohcaIxEiHBsrgbheaAfHvhnHGlcrgwsCIloDzfAmHyzg/media_httpfarm5static_dpHqB.jpg.scaled500.jpg" width="375" height="500"/>
<div class="posterous_quote_citation">via <a href="http://www.flickr.com/photos/intafon/4839567587/">flickr.com</a></div>
<p>I've been playing around with the MoreLomo app for iPhone...in lieu of getting a Harenezumi...</p>
</div>
<p style="font-size: 10px;">  <a href="http://posterous.com">Posted via email</a>   from <a href="http://intafon.posterous.com/more-orange-morelomo">Intafonetic</a>  </p>
</p></div>
<img src="http://feeds.feedburner.com/~r/plasticstare/~4/fzoVkg6o2oE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.plasticstare.com/plains/2010/07/28/more-orange-morelomo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.plasticstare.com/plains/2010/07/28/more-orange-morelomo/</feedburner:origLink></item>
		<item>
		<title>ParisWest: Fettes Brot – Bettina (featuring Walter by Mykita)</title>
		<link>http://feedproxy.google.com/~r/plasticstare/~3/lFusLHOLQ60/</link>
		<comments>http://www.plasticstare.com/plains/2010/07/28/pariswest-fettes-brot-bettina-featuring-walter-by-mykita/#comments</comments>
		<pubDate>Thu, 29 Jul 2010 05:24:50 +0000</pubDate>
		<dc:creator>plains</dc:creator>
				<category><![CDATA[random]]></category>

		<guid isPermaLink="false">http://www.plasticstare.com/plains/2010/07/28/pariswest-fettes-brot-bettina-featuring-walter-by-mykita/</guid>
		<description><![CDATA[via pariswestoptical.blogspot.com This is what happens when I idly look at eyeglass frames... Posted via email from Intafonerous]]></description>
			<content:encoded><![CDATA[<div class='posterous_autopost'>
<div class="posterous_bookmarklet_entry"> <embed src="http://widgets.vodpod.com/w/video_embed/Groupvideo.1467514" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" allowscriptaccess="never" wmode="transparent" height="350" flashvars="" width="425" />
<div class="posterous_quote_citation">via <a href="http://pariswestoptical.blogspot.com/2008/08/fettes-brot-bettina-featuring-walter-by.html">pariswestoptical.blogspot.com</a></div>
<p>This is what happens when I idly look at eyeglass frames...</p>
</div>
<p style="font-size: 10px;">  <a href="http://posterous.com">Posted via email</a>   from <a href="http://intafon.posterous.com/pariswest-fettes-brot-bettina-featuring-walte">Intafonerous</a>  </p>
</p></div>
<img src="http://feeds.feedburner.com/~r/plasticstare/~4/lFusLHOLQ60" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.plasticstare.com/plains/2010/07/28/pariswest-fettes-brot-bettina-featuring-walter-by-mykita/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.plasticstare.com/plains/2010/07/28/pariswest-fettes-brot-bettina-featuring-walter-by-mykita/</feedburner:origLink></item>
		<item>
		<title>Fix the Focus Rect for fl.controls.TextInput in AS3</title>
		<link>http://feedproxy.google.com/~r/plasticstare/~3/Gc4s70dxYds/</link>
		<comments>http://www.plasticstare.com/plains/2009/05/28/fix-the-focus-rect-for-flcontrolstextinput-in-as3/#comments</comments>
		<pubDate>Thu, 28 May 2009 22:35:04 +0000</pubDate>
		<dc:creator>plains</dc:creator>
				<category><![CDATA[actionscript]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[flash as3 component textinput]]></category>

		<guid isPermaLink="false">http://www.plasticstare.com/plains/?p=288</guid>
		<description><![CDATA[The AS3 components in CS4 allow for visually showing that the component is focused, using a code generated or libary asset sprite as the focusRect. This can be changed using the focusRect property or through the #setStyle method inherited by all UIComponent's. The outlying size of the focusRect can also be altered by setting the [...]]]></description>
			<content:encoded><![CDATA[<p>The AS3 components in CS4 allow for visually showing that the component is focused, using a code generated or libary asset sprite as the focusRect. This can be changed using the focusRect property or through the #setStyle method inherited by all UIComponent's. The outlying size of the focusRect can also be altered by setting the focusRectPadding style, which designates the number of pixels outside the size of the component that the focusRect sits. Unfortunately, if you are using TextInput, and likely TextArea, setting this padding to 0 results in hiding the focusRect behind the component skin (the grey outline for the TextInput). This is a result of the fact that the UIComponent#drawFocus sets the childIndex of the focusRect sprite to 0, essentially placing it behind the TextInput border. I wanted to create a subclass of TextInput for which I didn't need to reset several defaults every time I used it, so I created the class below, which also fixes the 0 padding focusRect issue.<br />
<span id="more-288"></span></p>
<pre class="brush: as3; title: ; notranslate">
package {

	import fl.controls.TextInput;
	import fl.managers.IFocusManagerComponent;

	/**
	 * Extends the TextInput component in order to set the default width and
	 * height, and sets the focusRectPadding to 0 (so the focus rectangle lies
	 * directly on top of the grey text input border skin.
	 */
	public class TextInput2 extends TextInput implements IFocusManagerComponent {

		/**
		 * @constructor
		 */
		public function TextInput2() {
			super();
			textField.width = 1;
			textField.height = 1;
			width = 64;
			height = 18;
			setStyle(&quot;focusRectPadding&quot;, 0);
		}

		/**
		 * The UIComponent class, when the component is in focus, creates the
		 * uiFocusRect and sets it at childIndex 0. Unfortunately, the text input
		 * skin is then above the focus rect, and so the focus rect disappears
		 * when the focusRectPadding is 0. This calls the parent implementation,
		 * then ensures that the focus rect is visible by changing its
		 * child index.
		 */
		override public function drawFocus(draw:Boolean):void {
			super.drawFocus(draw);

			if (uiFocusRect != null) {
				setChildIndex(uiFocusRect, numChildren - 1);
			}
		}
	}
}
</pre>
<p>UPDATE: I updated the above script to set the size of the TextField in the TextInput component to be 1x1. This also fixes the problem that the TextField is created as 100x100 pixels when it is first created (as are all dynamically generated text fields). This matters if you wish to use any customized layout (such as the Yahoo astra layout managers), and don't want to have to call drawNow() or wait a frame to finalize layout settings in a UI.</p>
<img src="http://feeds.feedburner.com/~r/plasticstare/~4/Gc4s70dxYds" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.plasticstare.com/plains/2009/05/28/fix-the-focus-rect-for-flcontrolstextinput-in-as3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.plasticstare.com/plains/2009/05/28/fix-the-focus-rect-for-flcontrolstextinput-in-as3/</feedburner:origLink></item>
		<item>
		<title>Line-width on Shapes in Flash, and scale9Grid Results</title>
		<link>http://feedproxy.google.com/~r/plasticstare/~3/A4i7VDneHAQ/</link>
		<comments>http://www.plasticstare.com/plains/2009/05/20/line-width-on-shapes-in-flash/#comments</comments>
		<pubDate>Wed, 20 May 2009 22:18:42 +0000</pubDate>
		<dc:creator>plains</dc:creator>
				<category><![CDATA[actionscript]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[linewidth]]></category>
		<category><![CDATA[problem]]></category>
		<category><![CDATA[scale9Grid]]></category>

		<guid isPermaLink="false">http://www.plasticstare.com/plains/?p=275</guid>
		<description><![CDATA[A quick note regarding something I've been meaning to post a short note about for a while, for those that might be running into problems resulting from shapes drawn in flash with an outline. I ran into this recently again, so I thought I'd post for any concerned parties out there. Regardless of whether or [...]]]></description>
			<content:encoded><![CDATA[<p>A quick note regarding something I've been meaning to post a short note about for a while, for those that might be running into problems resulting from shapes drawn in flash with an outline. I ran into this recently again, so I thought I'd post for any concerned parties out there.</p>
<p>Regardless of whether or not a shape, such as a rectangle, is drawn in Flash with a hairline border line, or a borderline of 1, the result on an unscaled shape is essentially the same. The crisp outline of the shape is drawn with a pixel width of 1. The downside of this occurs when trying to create pixel perfect UI's, and especially those using shapes with a scalenine grid assigned to them.<br />
<span id="more-275"></span><br />
Using the AS3 drawing API, you can create a rectangle that has a lineStyle with a width of 1, and some fill, which would look something like this:</p>
<pre class="brush: as3; light: true; title: ; notranslate">var sh:Shape = new Shape();
sh.graphics.lineStyle(1, 0xFF0000);
sh.graphics.beginFill(0xFF6600);
sh.graphics.drawRect(0, 0, 100, 100);
sh.graphics.endFill();
addChild(sh);
trace(&quot;Size: &quot; + sh.width + &quot; x &quot; + sh.height);</pre>
<p>The code above so draws an orange rectangle with a red border that is <em>201</em> pixels wide and <em>101</em> pixels tall. If you don't know why, the reason is because flash draws the line <em>on</em> the pixel width and height of the rectangle with a line size of 1. This makes your shape 201 x 101; thankfully, Flash <em>will</em> report the width and height correctly as 201 x 101.</p>
<p>This gets stickier if you have a shape that is used as a component skin, and has a scale9Grid applied to it. In this case you will likely be working with a component that you <em>expect</em> to take up 200x100 pixels on the stage when you tell it to be that size. However, if the skin used features "line" outlines at its borders, your component will get drawn on the stage with extra pixels. If you dig into the Flash component skins, you will notice that most of the skins use <em>fills</em> for any borders on the shapes (even 1 pixel wide borders) so that the scale9Grid enabled shapes will scale correctly to the pixel. That being said, the proper way to draw the simple skin shape in this case, programmatically, would be:</p>
<pre class="brush: as3; light: true; title: ; notranslate">
var sh2:Shape = new Shape();
sh2.graphics.beginFill(0xFF0000);
sh2.graphics.drawRect(0, 0, 200, 100);
sh2.graphics.beginFill(0xFF6600);
sh2.graphics.drawRect(1, 1, 198, 98);
sh2.graphics.endFill();
addChild(sh2);
trace(&quot;Size: &quot; + sh2.width + &quot; x &quot; + sh2.height);
</pre>
<p>Incidentally, this also often cleans up some anti-aliasing at the corners of rectangular shapes which I believe is cause by some weirdness in the way the "caps" are drawn on the shapes. (but don't quote me on that...)</p>
<img src="http://feeds.feedburner.com/~r/plasticstare/~4/A4i7VDneHAQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.plasticstare.com/plains/2009/05/20/line-width-on-shapes-in-flash/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.plasticstare.com/plains/2009/05/20/line-width-on-shapes-in-flash/</feedburner:origLink></item>
		<item>
		<title>AS3 ComboBox close error.</title>
		<link>http://feedproxy.google.com/~r/plasticstare/~3/HftcPJkoiEs/</link>
		<comments>http://www.plasticstare.com/plains/2009/04/13/as3-combobox-close-error/#comments</comments>
		<pubDate>Mon, 13 Apr 2009 17:45:38 +0000</pubDate>
		<dc:creator>plains</dc:creator>
				<category><![CDATA[actionscript]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[combobox]]></category>
		<category><![CDATA[flash]]></category>

		<guid isPermaLink="false">http://www.plasticstare.com/plains/?p=271</guid>
		<description><![CDATA[Just a quick note for those possibly searching for ComboBox AS3 and "Cannot access a property or method of a null object reference." When using the AS3 ComboBox, the above error will be thrown when the ComboBox loses focus, if the ComboBox is in its open state and it has lost reference to the stage. [...]]]></description>
			<content:encoded><![CDATA[<p>Just a quick note for those possibly searching for ComboBox AS3 and "Cannot access a property or method of a null object reference." When using the AS3 ComboBox, the above error will be thrown when the ComboBox loses focus, if the ComboBox is in its open state and it has lost reference to the stage. In other words, if you have a UI pane that contains the ComboBox, and you are removing the pane, make sure to first call #close() on all instances of the ComboBox, then remove the container from its parent container. (This can be replicated by clicking open the ComboBox, then clicking on the stage.) Unfortunately, the isOpen property for the ComboBox is not publicly accessible, but the #close() method is a NOOP if it is already closed, so just making sure to close it is no big deal. I ran into this error because I was listening for a stage focus event which triggered the immediate removal of the container pane in question, but I didn't find any relevant references in a quick web search, so I thought I'd make a quick post with the solution.</p>
<img src="http://feeds.feedburner.com/~r/plasticstare/~4/HftcPJkoiEs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.plasticstare.com/plains/2009/04/13/as3-combobox-close-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.plasticstare.com/plains/2009/04/13/as3-combobox-close-error/</feedburner:origLink></item>
		<item>
		<title>Liven up Livedocs: Search from Quicksilver</title>
		<link>http://feedproxy.google.com/~r/plasticstare/~3/Lv0AEkkHXgc/</link>
		<comments>http://www.plasticstare.com/plains/2009/04/01/liven-up-livedocs-search-from-quicksilver/#comments</comments>
		<pubDate>Wed, 01 Apr 2009 20:10:07 +0000</pubDate>
		<dc:creator>plains</dc:creator>
				<category><![CDATA[actionscript]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[quicksilver]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[livedocs]]></category>
		<category><![CDATA[techtip]]></category>

		<guid isPermaLink="false">http://www.plasticstare.com/plains/?p=263</guid>
		<description><![CDATA[Several months ago I jumped back into AS3 development for flash and I once again, therefore, jumped back into using the actionscript livedocs. LiveDocs are great, but I've always found navigating to them to be a big chore, even from a bookmark in a browser. In addition, the search functionality for LiveDocs to often be [...]]]></description>
			<content:encoded><![CDATA[<p>Several months ago I jumped back into AS3 development for flash and I once again, therefore, jumped back into using the actionscript livedocs. LiveDocs are great, but I've always found navigating to them to be a big chore, even from a bookmark in a browser. In addition, the search functionality for LiveDocs to often be frustrating. The other day it occurred to me, however, that the same search capability used to trigger <a href="http://www.google.com/url?sa=U&amp;start=1&amp;q=http://yubnub.org/&amp;ei=SsbTSbeiMZ-WswOypJ2tCg&amp;sig2=xoz9DuLQzGYPXqMUyfD-9Q&amp;usg=AFQjCNHPiIwr8PXYpzOAd3YbVRqRtPbtuA">yubnub</a> commands from Quicksilver could be implemented to search LiveDocs as well. Check out this tutorial at <a href="http://www.lifeclever.com/quicksilver-yubnub-rapid-web-searches-and-more/">lifeclever</a> to find out how to access yubnub from Quicksilver. The same principle can be used for searching live docs (and for searching the adobe help docs for flash 10 player AS3. Instead of using using the search URL <code>"qss-http://www.yubnub.org/parser/parse?command=***", use the following query URLs in a </code><code>quicksilver </code><code>web search trigger:</code></p>
<p>Flash 9 LiveDocs:  <code>qss-http://www.google.com/search?&amp;btnI&amp;q=site%3Ahttp%3A%2F%2Flivedocs.adobe.com%2Fflash%2F9.0%2FActionScriptLangRefV3%2F+***</code></p>
<p>Flash 10 Help Docs:  <code>qss-http://www.google.com/search?&amp;btnI&amp;q=site%3Ahttp%3A%2F%2Fhelp.adobe.com%2Fen_US%2FAS3LCR%2FFlash_10.0%2F+***</code></p>
<p>Basically, since there is no convenient way I found to use the search mechanisms on the Adobe site, these queries are running a google lucky search on the wildcard applied search term, while restricting the search to the site pertinent to the docs of interest. Running the assigned key command will trigger the Quicksilver text entry box; simply enter the term, such as "vector" for Flash 10, and the google lucky search will be performed. Since the lucky search is restricted to the livedocs and the help docs, the first search result returned will be the frameless html page in the docs for the search term. When searching for the docs for a specific actionscript term, this cuts the search time for a term down to a couple of seconds, which is highly convenient...</p>
<img src="http://feeds.feedburner.com/~r/plasticstare/~4/Lv0AEkkHXgc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.plasticstare.com/plains/2009/04/01/liven-up-livedocs-search-from-quicksilver/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.plasticstare.com/plains/2009/04/01/liven-up-livedocs-search-from-quicksilver/</feedburner:origLink></item>
		<item>
		<title>Quicksilver Adium Message Script</title>
		<link>http://feedproxy.google.com/~r/plasticstare/~3/d22G7Mzio8w/</link>
		<comments>http://www.plasticstare.com/plains/2008/08/07/quicksilver-adium-message-script/#comments</comments>
		<pubDate>Fri, 08 Aug 2008 03:59:18 +0000</pubDate>
		<dc:creator>plains</dc:creator>
				<category><![CDATA[applescript]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[community]]></category>
		<category><![CDATA[geek]]></category>
		<category><![CDATA[quicksilver]]></category>
		<category><![CDATA[random]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://www.plasticstare.com/plains/?p=247</guid>
		<description><![CDATA[The Adium plug-in for Quicksilver has been kaput for quite a while now, and I have found myself as of late with folks at work I need to contact who keep themselves in the invisible state in their messenger (like my manager . I have come to loath having to go to Adium and go [...]]]></description>
			<content:encoded><![CDATA[<p>The Adium plug-in for Quicksilver has been kaput for quite a while now, and I have found myself as of late with folks at work I need to contact who keep themselves in the invisible state in their messenger (like my manager <img src='http://www.plasticstare.com/plains/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> . I have come to loath having to go to Adium and go to the menu bar with the mouse and select "show offline contacts" and then find the person I want to IM and click their name, then "hide offline contacts" again. I also don't care about having to use the contact list interface anyway, really, if I didn't have to, so I wrote this applescript to use in Quicksilver.</p>
<p>To install, uncompress this script and put it in your ~/Library/Application Support/Quicksilver/Actions directory, and restart Quicksilver.</p>
<p>To use, invoke Quicksilver and type "." to enter text mode. Type all or part of the name of the person you wish to IM. Hit <Tab> and type "Adium" (or "Ad" or "Adi") and select "AdiumContactor" with the arrow keys and hit <Return>.</p>
<p>The script will search for any instance of the text you enter in your contacts, both in their IM names, as well as their display names. If one match is found, it will open an IM window for that contact. If multiple contacts are found, a window will open allowing you to select the one you want, using whatever account it belongs to. (in other words, if you search "bil", you will be able to choose from "Bill Todd", bileInMyStomach@gmail.com, actionscriptAbility@hotmail.com, etc.) Careful using some search terms, such as "com", as it will return all your MSN messenger accounts (whose screennames are defined by the contact's email address)</p>
<p><span class="downloadable"><em>PlasticWare Downloadable ::</em><br />
AdiumContactor for Quicksilver (Aug. 07, 2008)<br />
Download (~10,000 bytes) :: <a href="http://www.plasticstare.com/plasticware/applescript/AdiumContactor.zip">AdiumContactor.zip</a></span></p>
<img src="http://feeds.feedburner.com/~r/plasticstare/~4/d22G7Mzio8w" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.plasticstare.com/plains/2008/08/07/quicksilver-adium-message-script/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.plasticstare.com/plains/2008/08/07/quicksilver-adium-message-script/</feedburner:origLink></item>
		<item>
		<title>quicksilver, curl, applescript, proxy-config, twitter</title>
		<link>http://feedproxy.google.com/~r/plasticstare/~3/D62FkWPTvuQ/</link>
		<comments>http://www.plasticstare.com/plains/2008/08/05/quicksilver-curl-applescript-proxy-config-twitter/#comments</comments>
		<pubDate>Wed, 06 Aug 2008 02:11:23 +0000</pubDate>
		<dc:creator>plains</dc:creator>
				<category><![CDATA[applescript]]></category>
		<category><![CDATA[geek]]></category>
		<category><![CDATA[quicksilver]]></category>
		<category><![CDATA[terminal]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://www.plasticstare.com/plains/?p=238</guid>
		<description><![CDATA[This explains how to use Quicksilver to send posts to Twitter from within a firewall. I made this my little lunch project today. First, let's start with the basics. If you set up your work proxy server in your network config, there is not really any way to easily retrieve those settings. Let's say you [...]]]></description>
			<content:encoded><![CDATA[<p>This explains how to use Quicksilver to send posts to Twitter from within a firewall. I made this my little lunch project today. First, let's start with the basics. If you set up your work proxy server in your network config, there is not really any way to easily retrieve those settings. Let's say you are using http://proxy.myco.com:3128 for your http proxy settings. In the Terminal, you have not actually set your http_proxy environment variable. <a href="http://www.cs.usyd.edu.au/%7Emassad/project-proxy-config.html">Mark Assad has proxy-config</a> available for download. You can grab that, put it in one of your path directories, and then in your .bashrc or .zshrc file the following:</p>
<pre class="brush: plain; light: true; title: ; notranslate">export http_proxy=`proxy-config -h`
export https_proxy=`proxy-config -s`
export ftp_proxy=`proxy-config -f`</pre>
<p>This will set your environment proxy variables to whatever they are currently set to in your Network Preferences. I got part of this also from <a href="http://tomayko.com/writings/os-x-network-location-support-from-the-command-line">Ryan Tomayko's blog</a>.This is important if you are inside a firewall at work.</p>
<p>The simplest way to post a tweet to twitter from the command line would be to do so using cURL. If you don't have cURL installed, you will need to install it. If you aren't familiar with cURL, it is basically a command-line tool for grabbing html documents (or whatever else). See <a href="http://www.plasticstare.com/plains/2008/03/20/copy-and-continue-copying-large-files-over-file-sharing/">this post</a> for another use. I got this idea, as well as the applescript for using it with Quicksilver, from <a href="http://blog.codahale.com/2007/01/15/tweet-twitter-quicksilver/">Coda Hale's blog</a>. Read that post for a full explanation of using Quicksilver and an applescript for posting to twitter from Quicksilver -- it has a pretty thorough explanation.</p>
<p>If you are inside a firewall, however, this will likely fail because the cURL command requires that the proxy settings be provided. So, I took the script from Coda's post, combined it with the comment on his post from Daan Kortenbach, and then enabled that for use with the system's proxy settings. The new script follows:</p>
<pre class="brush: plain; title: ; notranslate">
using terms from application &quot;GrowlHelperApp&quot;
	-- Register Growl
	on growlRegister()
		tell application &quot;GrowlHelperApp&quot;
			register as application &quot;Tweet&quot; all notifications {&quot;Alert&quot;} default notifications {&quot;Alert&quot;} icon of application &quot;Quicksilver.app&quot;
		end tell
	end growlRegister

	-- Notify using Growl
	-- Example: growlNotify(&quot;This is an Alert&quot;,&quot;This is a test of the Growl Alert System&quot;)
	on growlNotify(grrTitle, grrDescription)
		tell application &quot;GrowlHelperApp&quot;
			notify with name &quot;Alert&quot; title grrTitle description grrDescription application name &quot;Tweet&quot;
		end tell
	end growlNotify
end using terms from

using terms from application &quot;Quicksilver&quot;
	on process text tweet
		tell application &quot;Keychain Scripting&quot;
			set twitter_key to first Internet key of current keychain whose server is &quot;twitter.com&quot;
			set twitter_login to quoted form of (account of twitter_key &amp; &quot;:&quot; &amp; password of twitter_key)
		end tell
		set twitter_status to quoted form of (&quot;status=&quot; &amp; tweet)

                -- I have proxy-config in a directory &quot;~/bin&quot;
		set the_proxy to do shell script &quot;~/bin/proxy-config -h&quot;

		try
			if (the_proxy = &quot;&quot;) then
				set results to do shell script &quot;curl --user &quot; &amp; twitter_login &amp; &quot; --data-binary &quot; &amp; twitter_status &amp; &quot; http://twitter.com/statuses/update.json&quot;
			else
				set results to do shell script &quot;curl --proxy &quot; &amp; the_proxy &amp; &quot; --user &quot; &amp; twitter_login &amp; &quot; --data-binary &quot; &amp; twitter_status &amp; &quot; http://twitter.com/statuses/update.json&quot;
			end if
			growlRegister()
			growlNotify(&quot;Tweet Sent&quot;, tweet)
		on error
			(* In case curl fails for some reason,  alert us *)
			growlRegister()
			growlNotify(&quot;Error&quot;, &quot;There was an error sending your tweet.&quot;)
		end try

	end process text
end using terms from
</pre>
<img src="http://feeds.feedburner.com/~r/plasticstare/~4/D62FkWPTvuQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.plasticstare.com/plains/2008/08/05/quicksilver-curl-applescript-proxy-config-twitter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.plasticstare.com/plains/2008/08/05/quicksilver-curl-applescript-proxy-config-twitter/</feedburner:origLink></item>
		<item>
		<title>Breakaway Saves My Ears</title>
		<link>http://feedproxy.google.com/~r/plasticstare/~3/5qSNxWzmlME/</link>
		<comments>http://www.plasticstare.com/plains/2008/07/30/breakaway-saves-my-ears/#comments</comments>
		<pubDate>Wed, 30 Jul 2008 18:15:23 +0000</pubDate>
		<dc:creator>plains</dc:creator>
				<category><![CDATA[apple]]></category>
		<category><![CDATA[applescript]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[travel]]></category>

		<guid isPermaLink="false">http://www.plasticstare.com/plains/?p=235</guid>
		<description><![CDATA[I wrote a post a while back about the pesky habit of my MacBook Pro trying to make me go deaf. I plug my laptop into a stereo via the headphone jack at home and listen to music. In order to get the sound levels right at home, I increase the volume to full volume [...]]]></description>
			<content:encoded><![CDATA[<p>I wrote a post a while back about the pesky habit of my MacBook Pro trying to make me go deaf. I plug my laptop into a stereo via the headphone jack at home and listen to music. In order to get the sound levels right at home, I increase the volume to full volume (otherwise I have to turn up the stereo and I get lots of noise and hum). When I leave in the morning, I unplug my laptop and the MacBook resets its volume to the pre-headphone jack volume. Fine. Unfortunately, when I get to work, I plug-in my headphones, start checking email, hit my keyboard command for iTunes play, and proceed to deafen myself with full volume, as the machine automatically resets the system volume to the previous headphone jack volume level.</p>
<p>Today I deafened myself, but upon searching, discovered <a href="http://balthamos.awardspace.com/applications/">Alloc Init</a>, which features a nice little app called <a href="http://www.macupdate.com/info.php/id/23361">Breakaway</a>. The main feature of this app is to pause iTunes or launch the screensaver when the headphone jack status is changed (plugged in or out). However, the nicer thing about the app is that it also allows the user to trigger an applescript on the same events. I created the following script called setVolumeTo20of100:</p>
<p><code>tell application "Finder"<br />
	set volume output volume 20<br />
end tell</code></p>
<p>After creating a custom trigger in Breakaway, my system volume will always be reset to 20 when I plug in something to the headphone jack. Since I don't care about having to increase the volume at home automatically, this is fine for now, since I will most importantly not deafen myself in the morning at work. I will perhaps post an update later that checks the the network preferences for the current location for setting the volume automatically based on location, which will automate things a little more. Meanwhile, I highly recommend this nice little app. (Note: the interface for creating custom triggers is a little clunky, so you may have to play with it a little first, but it does work -- just be patient.)</p>
<img src="http://feeds.feedburner.com/~r/plasticstare/~4/5qSNxWzmlME" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.plasticstare.com/plains/2008/07/30/breakaway-saves-my-ears/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.plasticstare.com/plains/2008/07/30/breakaway-saves-my-ears/</feedburner:origLink></item>
		<item>
		<title>resurfacing_2008_r0.2*</title>
		<link>http://feedproxy.google.com/~r/plasticstare/~3/o0rPXSNNuzc/</link>
		<comments>http://www.plasticstare.com/plains/2008/07/13/resurfacing_2008_r02/#comments</comments>
		<pubDate>Sun, 13 Jul 2008 11:05:52 +0000</pubDate>
		<dc:creator>plains</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[resurface]]></category>

		<guid isPermaLink="false">http://www.plasticstare.com/plains/?p=227</guid>
		<description><![CDATA[The second stage of resurfacing the site is "finished." The theme is still based on Sandbox, but I have modified some of the files so far to add some styling content that wasn't possible with the theme as it was. I had considered adding a second theme layer on top of Sandbox and then utilize [...]]]></description>
			<content:encoded><![CDATA[<p>The second stage of resurfacing the site is "finished." The theme is still based on Sandbox, but I have modified some of the files so far to add some styling content that wasn't possible with the theme as it was. I had considered adding a second theme layer on top of Sandbox and then utilize a thin CSS-only styling theme on top of that, but it seemed like overkill. My intent was to try to get as much future code updates from Sandbox for free, but if the theme in progress gets wonky, then it will just be time to rework the site again. At this point, the only files that have really changed are style.css, header.php, footer.php, and sidebar.php. The styling is still incomplete. The next step is to finish flushing out and refining the generic styles, as well as flush out some of the other pieces that need styling, such as the Twitter and Flickr feeds. At that point, it will be time to add in a couple of other things as well.</p>
<img src="http://feeds.feedburner.com/~r/plasticstare/~4/o0rPXSNNuzc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.plasticstare.com/plains/2008/07/13/resurfacing_2008_r02/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.plasticstare.com/plains/2008/07/13/resurfacing_2008_r02/</feedburner:origLink></item>
		<item>
		<title>resurfacing_2008_r0.1*</title>
		<link>http://feedproxy.google.com/~r/plasticstare/~3/vI4HhY6jvVs/</link>
		<comments>http://www.plasticstare.com/plains/2008/07/11/resurfacing_2008_r01/#comments</comments>
		<pubDate>Fri, 11 Jul 2008 08:44:14 +0000</pubDate>
		<dc:creator>plains</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[resurface]]></category>

		<guid isPermaLink="false">http://www.plasticstare.com/plains/?p=226</guid>
		<description><![CDATA[The shame: I realized the other day that the "design" that was current on this site until today had been there for a really long time. Since I have been working on other things and just posting here and there, I had also neglected the fact that there were some massive breakages that just looked [...]]]></description>
			<content:encoded><![CDATA[<p>The shame: I realized the other day that the "design" that was current on this site until today had been there for a <em>really</em> long time. Since I have been working on other things and just posting here and there, I had also neglected the fact that there were some massive breakages that just looked really bad, as if something had been attempted and had failed.</p>
<p>The solution: I decided it was finally time to resurface the site, but do so quickly so as to actually get things working again. So, the current state you see here is the result. Not finished, but at least not entirely broken. I did a little research, and decided that I would try out the <a href="http://www.plaintxt.org/themes/sandbox/">Sandbox theme</a>. I appreciated what they are trying to do, and I also decided that I should go ahead and start basically from scratch with a foundation that has some nice semantic markup to build on.</p>
<p>The project: What you see here in progress is actually a new theme that I am building on top of Sandbox, tentatively called Plastic Laminate, utilizing pretty much just new CSS on top of the existing Sandbox for now, and then I may actually do some reskinning or plugin building as well, to cover any areas missing content I want. That being said, if things look a bit wonky or like a blog with little design effort applied at the moment, that's because its still in transition...</p>
<img src="http://feeds.feedburner.com/~r/plasticstare/~4/vI4HhY6jvVs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.plasticstare.com/plains/2008/07/11/resurfacing_2008_r01/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.plasticstare.com/plains/2008/07/11/resurfacing_2008_r01/</feedburner:origLink></item>
		<item>
		<title>“Googling” Flash</title>
		<link>http://feedproxy.google.com/~r/plasticstare/~3/ypJV8H1wqSw/</link>
		<comments>http://www.plasticstare.com/plains/2008/07/01/googling-flash/#comments</comments>
		<pubDate>Tue, 01 Jul 2008 21:25:28 +0000</pubDate>
		<dc:creator>plains</dc:creator>
				<category><![CDATA[flash]]></category>
		<category><![CDATA[geek]]></category>
		<category><![CDATA[media]]></category>
		<category><![CDATA[random]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://www.plasticstare.com/plains/?p=223</guid>
		<description><![CDATA[I have to say, this is fairly interesting news. Flash was adopted early by many web-shops wanting to give the user an "integrated media experience" that couldn't be provided by straight html sites. Since then, the tools have been developed to do site analytics of flash web applications, and flash and the flex framework have [...]]]></description>
			<content:encoded><![CDATA[<p>I have to say, this is fairly interesting news. Flash was adopted early by many web-shops wanting to give the user an "integrated media experience" that couldn't be provided by straight html sites. Since then, the tools have been developed to do site analytics of flash web applications, and flash and the flex framework have come a long way toward optimizing development work-flow. Unfortunately, one of the big things that has been missing is search, or rather search recognition; ironically, many Flash sites are really marketing driven advertising sites, yet their content has not historically been searchable through search engines such as Google. A flash site for "Product XYZ" would likely get less of a ranking on search engines than a blog entry discussing XYZ or a flickr image of someone's dog named "XYZ." Looks like Google is looking to level that playing field by now making the move to <a title="google crawls flash" href="http://googleblog.blogspot.com/2008/06/google-learns-to-crawl-flash.html">crawl flash sites</a> as well. Should be interesting to see how this effects search, and where this takes advertising and adwords technologies and the like.</p>
<img src="http://feeds.feedburner.com/~r/plasticstare/~4/ypJV8H1wqSw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.plasticstare.com/plains/2008/07/01/googling-flash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.plasticstare.com/plains/2008/07/01/googling-flash/</feedburner:origLink></item>
		<item>
		<title>Document Editing in OSX Preview</title>
		<link>http://feedproxy.google.com/~r/plasticstare/~3/-x1M0RIYmoM/</link>
		<comments>http://www.plasticstare.com/plains/2008/06/19/document-editing-in-osx-preview/#comments</comments>
		<pubDate>Thu, 19 Jun 2008 22:36:39 +0000</pubDate>
		<dc:creator>plains</dc:creator>
				<category><![CDATA[apple]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[media]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://www.plasticstare.com/plains/?p=222</guid>
		<description><![CDATA[The biggest problem I've ever had with PDF files is the fact that I don't own Adobe Acrobat Pro. So when it comes to making multipage designed documents, I've either been stuck doing some creative artboard configuration in Illustrator, or stuck "printing" documents (such as from Photoshop, etc.) to PDF and then using a command [...]]]></description>
			<content:encoded><![CDATA[<p>The biggest problem I've ever had with PDF files is the fact that I don't own Adobe Acrobat Pro. So when it comes to making multipage designed documents, I've either been stuck doing some creative artboard configuration in Illustrator, or stuck "printing" documents (such as from Photoshop, etc.) to PDF and then using a command line script to merge the files together.</p>
<p>I found this nice <a title="macworld preview article" href="http://www.macworld.com/article/132468/2008/04/workingmac2504.html">MacWorld</a> article that discusses some of the newer (or at least new to me) functionality in Preview for OSX, which details some really nice features, including document merging and annotation, as well as some nice formatting features. Looking forward to using this for making designeriffic podcast/mix PDF booklets, multipage Illustrator-formatted resumes, and whatever else.</p>
<img src="http://feeds.feedburner.com/~r/plasticstare/~4/-x1M0RIYmoM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.plasticstare.com/plains/2008/06/19/document-editing-in-osx-preview/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.plasticstare.com/plains/2008/06/19/document-editing-in-osx-preview/</feedburner:origLink></item>
		<item>
		<title>Quickfix for Quicksilver Triggers Preferences</title>
		<link>http://feedproxy.google.com/~r/plasticstare/~3/vWM2SGsdodE/</link>
		<comments>http://www.plasticstare.com/plains/2008/06/18/quickfix-for-quicksilver-triggers-preferences/#comments</comments>
		<pubDate>Thu, 19 Jun 2008 00:46:13 +0000</pubDate>
		<dc:creator>plains</dc:creator>
				<category><![CDATA[apple]]></category>
		<category><![CDATA[geek]]></category>
		<category><![CDATA[quicksilver]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://www.plasticstare.com/plains/?p=221</guid>
		<description><![CDATA[I saw several references to the problem I was having with the Triggers preferences in Quicksilver in different blogs. At issue? Well, the Triggers preferences would give me a spinner and never load. All the posts I read discussed how the app is not currently in active development and kind of left it at that [...]]]></description>
			<content:encoded><![CDATA[<p>I saw several references to the problem I was having with the Triggers preferences in Quicksilver in different blogs. At issue? Well, the Triggers preferences would give me a spinner and never load. All the posts I read discussed how the app is not currently in active development and kind of left it at that so at first I thought maybe I was just out of luck. Today, I finally got around to trying a couple of things. I don't know what the exact cause was, but for some reason the Triggers.plist file in the Application Support/Quicksilver directory was wonky. I changed its name and restarted Quicksilver and that seemed to fix the problem. I then re-added the same triggers in the prefs pane and was back to work. I *think* it had something to do with conflicting trigger id's or something in the plist file, though I am not sure. In any case, removing the old plist file fixed the issue.</p>
<img src="http://feeds.feedburner.com/~r/plasticstare/~4/vWM2SGsdodE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.plasticstare.com/plains/2008/06/18/quickfix-for-quicksilver-triggers-preferences/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.plasticstare.com/plains/2008/06/18/quickfix-for-quicksilver-triggers-preferences/</feedburner:origLink></item>
		<item>
		<title>SMS Spam Blockage</title>
		<link>http://feedproxy.google.com/~r/plasticstare/~3/Ak6KIFEA8Vc/</link>
		<comments>http://www.plasticstare.com/plains/2008/06/13/sms-spam-blockage/#comments</comments>
		<pubDate>Fri, 13 Jun 2008 17:26:45 +0000</pubDate>
		<dc:creator>plains</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[random]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://www.plasticstare.com/plains/?p=220</guid>
		<description><![CDATA[Until I actually redesign this site and create a way to manage postlets or miniposts or nanoposts... I just thought I would repost this nice little story from the New York Times on blocking SMS spam. As the author points out, the solution is not totally ironclad, but it's good to know that the mobile [...]]]></description>
			<content:encoded><![CDATA[<p>Until I actually redesign this site and create a way to manage postlets or miniposts or nanoposts... I just thought I would repost this nice little story from the New York Times on <a title="block SMS Spam" href="http://www.nytimes.com/2008/06/12/technology/personaltech/12pogue-email.html">blocking SMS spam</a>. As the author points out, the solution is not totally ironclad, but it's good to know that the mobile carriers at least recognize the issue and are starting to act on it. I feel truly weird saying it, but kudos to ATT and Verizon for getting with the program ... and come on, Sprint and Tmobile, get with it!</p>
<img src="http://feeds.feedburner.com/~r/plasticstare/~4/Ak6KIFEA8Vc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.plasticstare.com/plains/2008/06/13/sms-spam-blockage/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.plasticstare.com/plains/2008/06/13/sms-spam-blockage/</feedburner:origLink></item>
		<item>
		<title>Safari and the Slim VM</title>
		<link>http://feedproxy.google.com/~r/plasticstare/~3/7X5uvXy3zhc/</link>
		<comments>http://www.plasticstare.com/plains/2008/04/04/safari-and-the-slim-vm/#comments</comments>
		<pubDate>Sat, 05 Apr 2008 06:45:09 +0000</pubDate>
		<dc:creator>plains</dc:creator>
				<category><![CDATA[apple]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[vmware]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://www.plasticstare.com/plains/?p=218</guid>
		<description><![CDATA[Having just acquired the phone, and having finally upgraded to Leopard last weekend, I started using Safari a little to get some bookmarks I wanted on the iPhone. It seemed pretty snappy, although I wasn't really putting it through any grueling paces. Since I was going through the trouble of upgrading my computer, I decided [...]]]></description>
			<content:encoded><![CDATA[<p>Having just acquired the phone, and having finally upgraded to Leopard last weekend, I started using Safari a little to get some bookmarks I wanted on the iPhone. It seemed pretty snappy, although I wasn't really putting it through any grueling paces. Since I was going through the trouble of upgrading my computer, I decided to go ahead and do some early spring cleaning as well, cutting files and unused applications, and applying a draconian filter to my process of eliminating music from my machine. (down to about 22gb of music on an 80gb drive - I promise I am trying) One BIG target for trimming on my machine was my Windows XP virtual machine that I run through Fusion. Fusion has come a long way since I started at VmWare, and I have to say, its a pretty great product (no I can't claim any credit, wrong group). I use this VM everyday at work developing and testing WebAccess (beta 2 just released last Friday), but I swear, for a fairly basic installation, it was taking up nearly 10gb of space on my drive. I was running some tests with a slim XP vm that ran at about 3gb or so (see the article on LifeHacker: <a href="http://lifehacker.com/374376/trim-down-windows-to-the-bare-essentials">http://lifehacker.com/374376/trim-down-windows-to-the-bare-essentials</a>). This slim vm also happened to have Safari 3 (and every other browser you might want to run tests with) installed on it, and since we recently got WebAccess running well on Safari I thought I would give it a spin. I was pretty amazed at what I found.</p>
<p>I ran some comparisons of Safari 3 running WebAccess *in a VM* on my MacBook against Firefox 2 running in OSX. I had heard Safari was fast, but I didn't really believe the hype, and I figured that Safari on Windows would probably be relegated to the land of second class software, like IE always was on the Mac. In all the operations managing a Server 2.0 instance, Safari was by far faster, and in most cases was nearly 3 times faster than Firefox 2. I know that Firefox 3 is supposed to be fast also, but from what I've seen so far its still fairly buggy.</p>
<p>This got me re-evaluating what to use for my daily browsing. I've been using Camino, which I switched to because it used the Gecko rendering engine, but was an OSX native application, so it played (more) nicely in the Mac environment. I had originally switched to Firefox a few years ago because it was the better alternative on the Mac, and well, out of principal, because it wasn't Safari. However, the speed of 3.0 and integration with my new mobile device has got me using it again. Now if only delicious played better with iPhone...</p>
<img src="http://feeds.feedburner.com/~r/plasticstare/~4/7X5uvXy3zhc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.plasticstare.com/plains/2008/04/04/safari-and-the-slim-vm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.plasticstare.com/plains/2008/04/04/safari-and-the-slim-vm/</feedburner:origLink></item>
		<item>
		<title>Lebanon, Kansas</title>
		<link>http://feedproxy.google.com/~r/plasticstare/~3/r1vm6y2SylU/</link>
		<comments>http://www.plasticstare.com/plains/2008/03/30/lebanon-kansas/#comments</comments>
		<pubDate>Mon, 31 Mar 2008 02:52:40 +0000</pubDate>
		<dc:creator>plains</dc:creator>
				<category><![CDATA[community]]></category>
		<category><![CDATA[conspiracy]]></category>
		<category><![CDATA[flickr]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://www.plasticstare.com/plains/2008/03/30/lebanon-kansas/</guid>
		<description><![CDATA[I decided to try out a couple of 3rd party apps for the iPhone that have to do with taking photos. The ability to glean the location of the phone and the fact that it has a built in camera makes it the perfect candidate for easy geotagged photos. I previewed a few apps. One [...]]]></description>
			<content:encoded><![CDATA[<p>I decided to try out a couple of 3rd party apps for the iPhone that have to do with taking photos. The ability to glean the location of the phone and the fact that it has a built in camera makes it the perfect candidate for easy geotagged photos. I previewed a few apps. One of them was iFlickr, which provides the user with the ability of shooting the photo up to the user's Flickr account as soon as it is taken. This was the only one I could find with this feature, but I was still pretty excited. I was a little disappointed to find out that no Exif data was actually saved (so no date or time info, no camera data, etc.), but I thought it would still be great. Well, it was pretty interesting, although the photo I first took in my apartment was about 5 blocks off, moreso a discrepancy that you would get using the iPhone Maps application.</p>
<p><a href="http://www.flickr.com/photos/intafon/2375369139/" title="lebanon_hybrid by ⌫ uɐλɹ, on Flickr"><img src="http://farm3.static.flickr.com/2286/2375369139_12714abaf9_m.jpg" alt="lebanon_hybrid" style="margin: 0pt 5px 5px 0pt" align="left" height="122" width="240" /></a> Then a strange thing happened. I took a photo at work using iFlickr, and I discovered a mysterious place in cyberspace that to my knowledge was never disclosed by William Gibson. This place is a field outside of rural Lebanon, Kansas, known by some on Google as the Cowboy Stencil Capital of the Universe. In the 2000 census, this small rural town had a population of 300. It is also apparently known as a community suffering from rural flight as documented in a 2006 New York Times article. However, to date, 836 photos have been geotagged to a field about a mile and a half to the northwest of the town center, 3 or more photos probably for each of the remaining citizens of Lebanon. Ostensibly, this is some bug in the iFlickr code where the app gets confused and default to this quaint locale, or, perhaps it is a little joke by the creator of the app. I would like to think that there is some more profound reason, and that this could be a William Gibson plot unfolding before our eyes. Regardless, this is an interesting spacial meta-tagging glitch - when you view my photo on the map, it looks as though tall buildings have sprouted from a field...</p>
<img src="http://feeds.feedburner.com/~r/plasticstare/~4/r1vm6y2SylU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.plasticstare.com/plains/2008/03/30/lebanon-kansas/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://www.plasticstare.com/plains/2008/03/30/lebanon-kansas/</feedburner:origLink></item>
		<item>
		<title>Hiragana, Katakana, Kanji on iPhone</title>
		<link>http://feedproxy.google.com/~r/plasticstare/~3/UCEy1GcBHKk/</link>
		<comments>http://www.plasticstare.com/plains/2008/03/30/hiragana-katakana-kanji-on-iphone/#comments</comments>
		<pubDate>Mon, 31 Mar 2008 02:18:37 +0000</pubDate>
		<dc:creator>plains</dc:creator>
				<category><![CDATA[apple]]></category>
		<category><![CDATA[geek]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://www.plasticstare.com/plains/2008/03/30/hiragana-katakana-kanji-on-iphone/</guid>
		<description><![CDATA[Here is a really quick and rough tutorial for enabling the Japanese keyboard on your iPhone, which allows you to type in hiragana, katakana, and kanji. For some reason, even though there is rumor that the iPhone will be making its way sometime not too far from now to Japan, the Japanese language keyboard is [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a really quick and rough tutorial for enabling the Japanese keyboard on your iPhone, which allows you to type in hiragana, katakana, and kanji. For some reason, even though there is rumor that the iPhone will be making its way sometime not too far from now to Japan, the Japanese language keyboard is not enabled on the device, though its functionality is clearly working and arguably ready to go. (Thanks to the info <a href="http://web.mac.com/mac_scott/OS_X_and_iPhone_Hacks/Step-by-step.html" title="iphonehacks" target="_blank">http://web.mac.com/mac_scott/</a> and some others for getting me the necessary steps to get this working.) This assumes that you aren't afraid to get your hand a little dirty with some command line action on your iPhone. I also claim no responsibility for what *may* happen when performing this task. I'm not sure what damage you could do if things get ugly, so proceed with caution. This addresses the problem that I ran into, wherein I cannot login to the Term-vt100 app for the iPhone, so I had to get creative about how to change a file to enable the Japanese keyboard. My phone is running firmware version 1.1.4; it seems that somewhere 1.1.3 or later, this login problem arose.</p>
<p>The first steps are to jailbreak your phone, and install a few of the necessary apps, including BossPrefs, the BSD Subsystem package, and the OpenSsh client. Once you do this, you can disable Edge, make sure WiFi is enabled,  and enable the SSH service. You will want to do both, as the "alpine" password is well known, and you might as well be as safe as possible about this.</p>
<p>I found the file I needed to change under the /var/mobile directory on the iPhone. When you have started SSH on your iPhone and connected to your wireless router, check the ip address in BossPrefs under WiFi. Fire up the Terminal on your computer also connected to the same network, and enter the following (replace xx.xx.xx.xx with the IP address of your iPhone):</p>
<p><code>scp root@xx.xx.xx.xx:/var/mobile/Library/Preferences/.GlobalPreferences.plist ~/Desktop/GlobalPreferences.plist</code></p>
<p>You will need to enter "alpine" when prompted for the password. Now check to see if GlobalPreferences.plist is now on your Desktop. Now you can edit this file in two ways. Most importantly, in this file, you need to change the "AppleKeyboards" node to also include a node for "ja" in addition to "en_US". You can convert the plist to an XML text file by running the following in the Terminal, and edit the file in your favorite text editor:</p>
<p><code>plutil -convert xml1 ~/Desktop/GlobalPreferences.plist</code></p>
<p>Change the block of text that looks like:</p>
<p><code>&lt;key&gt;AppleKeyboards&lt;/key&gt;<br />
&lt;array&gt;<br />
&lt;string&gt;en_US&lt;/string&gt;<br />
&lt;/array&gt;</code></p>
<p>and add the "ja" node so it looks like:</p>
<p><code>&lt;key&gt;AppleKeyboards&lt;/key&gt;<br />
&lt;array&gt;<br />
&lt;string&gt;en_US&lt;/string&gt;<br />
&lt;string&gt;ja&lt;/string&gt;<br />
&lt;/array&gt;</code></p>
<p>Then to convert it back to binary (the format that it was in), run this in the Terminal:</p>
<p><code>plutil -convert binary1 ~/Desktop/GlobalPreferences.plist</code></p>
<p>However, the *easier* way to edit the file, is to double-click it, which in OSX, should open the file in Property List Editor. Once in there, click the triangle next to "AppleKeyboards". You will see one String with the value "en_US". Click the "New Sibling" button in the editor and type "ja" in the new field provided. Then save.</p>
<p>Once you have edited your prefs file, you need to stick it back on the phone. Run this in the Terminal:</p>
<p><code>scp ~/Desktop/GlobalPreferences.plist root@xx.xx.xx.xx:/var/mobile/Library/Preferences/.GlobalPreferences.plist</code></p>
<p>You will again be prompted for the same password. Once the upload is complete, go to BossPrefs, and turn off SSH and turn back on Edge. Restart your iPhone. You should now be able to type Japanese characters. Go to Notes. You should see a little globe icon next to the space bar. If you click this it will squash the keyboard down some and when you type, you will see options in Japanese charaters for what you are typing. It behaves similarly to typing Japanese on your Mac keyboard. For example, when you type "hanashimasu", you will see "はなします" as an option in the space above the keyboard. Click the globe to toggle between modes.</p>
<img src="http://feeds.feedburner.com/~r/plasticstare/~4/UCEy1GcBHKk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.plasticstare.com/plains/2008/03/30/hiragana-katakana-kanji-on-iphone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.plasticstare.com/plains/2008/03/30/hiragana-katakana-kanji-on-iphone/</feedburner:origLink></item>
	</channel>
</rss>

