<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	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/"
	>

<channel>
	<title>SlapBlog</title>
	<atom:link href="http://blog.slapthink.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.slapthink.net</link>
	<description>Flash, web dev, gaming, computing, craziness</description>
	<lastBuildDate>Mon, 26 Sep 2011 14:04:25 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Firebug lite easily in IE7</title>
		<link>http://blog.slapthink.net/2011/09/26/firebug-lite-easily-in-ie7/</link>
		<comments>http://blog.slapthink.net/2011/09/26/firebug-lite-easily-in-ie7/#comments</comments>
		<pubDate>Mon, 26 Sep 2011 14:03:49 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[debugging]]></category>
		<category><![CDATA[js]]></category>

		<guid isPermaLink="false">http://blog.slapthink.net/?p=166</guid>
		<description><![CDATA[Firebug is a great way to debug during web page development. Although it is not available natively in IE it can be easily added by pasting in the code below in the address bar of the page you want to use it.

javascript:var firebug=document.createElement&#40;'script'&#41;;firebug.setAttribute&#40;'src','http://getfirebug.com/releases/lite/1.2/firebug-lite-compressed.js'&#41;;document.body.appendChild&#40;firebug&#41;;&#40;function&#40;&#41;&#123;if&#40;window.firebug.version&#41;&#123;firebug.init&#40;&#41;;&#125;else&#123;setTimeout&#40;arguments.callee&#41;;&#125;&#125;&#41;&#40;&#41;;void&#40;firebug&#41;;

]]></description>
			<content:encoded><![CDATA[<p>Firebug is a great way to debug during web page development. Although it is not available natively in IE it can be easily added by pasting in the code below in the address bar of the page you want to use it.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">javascript<span style="color: #339933;">:</span><span style="color: #003366; font-weight: bold;">var</span> firebug<span style="color: #339933;">=</span>document.<span style="color: #660066;">createElement</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'script'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>firebug.<span style="color: #660066;">setAttribute</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'src'</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'http://getfirebug.com/releases/lite/1.2/firebug-lite-compressed.js'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>document.<span style="color: #660066;">body</span>.<span style="color: #660066;">appendChild</span><span style="color: #009900;">&#40;</span>firebug<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>window.<span style="color: #660066;">firebug</span>.<span style="color: #660066;">version</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>firebug.<span style="color: #660066;">init</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span><span style="color: #000066; font-weight: bold;">else</span><span style="color: #009900;">&#123;</span>setTimeout<span style="color: #009900;">&#40;</span>arguments.<span style="color: #660066;">callee</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>void<span style="color: #009900;">&#40;</span>firebug<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.slapthink.net/2011/09/26/firebug-lite-easily-in-ie7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LINQPad &#8211; great tool for testing LINQ</title>
		<link>http://blog.slapthink.net/2011/04/11/linqpad-great-tool-for-testing-linq/</link>
		<comments>http://blog.slapthink.net/2011/04/11/linqpad-great-tool-for-testing-linq/#comments</comments>
		<pubDate>Mon, 11 Apr 2011 17:33:25 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[LINQ]]></category>

		<guid isPermaLink="false">http://blog.slapthink.net/?p=160</guid>
		<description><![CDATA[If you&#8217;re dealing with LINQ in C# .Net there is a great tool called Linqpad that allows LINQ queries to be run from a GUI against your SQL DB.  The tool is free, but requires a license for intellisense support.
http://www.linqpad.net/
]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re dealing with LINQ in C# .Net there is a great tool called Linqpad that allows LINQ queries to be run from a GUI against your SQL DB.  The tool is free, but requires a license for intellisense support.</p>
<p><a href="http://www.linqpad.net/">http://www.linqpad.net/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.slapthink.net/2011/04/11/linqpad-great-tool-for-testing-linq/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Add leading zeros to a number in Javascript</title>
		<link>http://blog.slapthink.net/2010/06/16/add-leading-zeros-to-a-number-in-javascript/</link>
		<comments>http://blog.slapthink.net/2010/06/16/add-leading-zeros-to-a-number-in-javascript/#comments</comments>
		<pubDate>Wed, 16 Jun 2010 14:22:12 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[Working on the web]]></category>
		<category><![CDATA[js]]></category>

		<guid isPermaLink="false">http://blog.slapthink.net/?p=157</guid>
		<description><![CDATA[Needed a quick way to add leading zeros to numbers for a js countdown script. Not hard to do, now I can look at this post for the code when I need it again.

function addLeadingZeros&#40;n, totalDigits&#41;
	&#123;
	    if&#40;!totalDigits&#41;totalDigits = 2;
	    n = String&#40;n&#41;;
	    while &#40;n.length &#60; totalDigits&#41;
		n [...]]]></description>
			<content:encoded><![CDATA[<p>Needed a quick way to add leading zeros to numbers for a js countdown script. Not hard to do, now I can look at this post for the code when I need it again.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span> addLeadingZeros<span style="color: #009900;">&#40;</span>n<span style="color: #339933;">,</span> totalDigits<span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
	    <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>totalDigits<span style="color: #009900;">&#41;</span>totalDigits <span style="color: #339933;">=</span> <span style="color: #CC0000;">2</span><span style="color: #339933;">;</span>
	    n <span style="color: #339933;">=</span> String<span style="color: #009900;">&#40;</span>n<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	    <span style="color: #000066; font-weight: bold;">while</span> <span style="color: #009900;">&#40;</span>n.<span style="color: #660066;">length</span> <span style="color: #339933;">&lt;</span> totalDigits<span style="color: #009900;">&#41;</span>
		n <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;0&quot;</span><span style="color: #339933;">+</span>n<span style="color: #339933;">;</span>
	    <span style="color: #000066; font-weight: bold;">return</span> n<span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> num <span style="color: #339933;">=</span> <span style="color: #CC0000;">5</span><span style="color: #339933;">;</span>
&nbsp;
num <span style="color: #339933;">=</span> addLeadingZeros<span style="color: #009900;">&#40;</span>num<span style="color: #339933;">,</span> <span style="color: #CC0000;">3</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.slapthink.net/2010/06/16/add-leading-zeros-to-a-number-in-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Remove Crap from Wordpress dashboard</title>
		<link>http://blog.slapthink.net/2010/06/15/remove-crap-from-wordpress-dashboard/</link>
		<comments>http://blog.slapthink.net/2010/06/15/remove-crap-from-wordpress-dashboard/#comments</comments>
		<pubDate>Tue, 15 Jun 2010 16:27:24 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Working on the web]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://blog.slapthink.net/?p=151</guid>
		<description><![CDATA[
Wordpress is great software. I love the UI. I don&#8217;t like the extra clutter in the dashboard and neither do some of my clients. Getting rid of it (or adding to it)  is fairly easy. See http://codex.wordpress.org/Dashboard_Widgets_API  for all that you can do.
If you just need to quickly trim down the dashboard use [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.slapthink.net/wp-content/uploads/2010/06/Untitled-1.png"><img src="http://blog.slapthink.net/wp-content/uploads/2010/06/Untitled-1-300x127.png" alt="Wordpress Admin Screenshot" title="Wordpress Admin Screenshot" width="300" height="127" class="alignleft size-medium wp-image-154" /></a></p>
<p><a href="http://wordpress.org">Wordpress</a> is great software. I love the UI. I don&#8217;t like the extra clutter in the dashboard and neither do some of my clients. Getting rid of it (or adding to it)  is fairly easy. See <a href="http://codex.wordpress.org/Dashboard_Widgets_API">http://codex.wordpress.org/Dashboard_Widgets_API</a>  for all that you can do.</p>
<p>If you just need to quickly trim down the dashboard use the code below in your themes functions.php file.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">/************************
 * Control over widgets in admin dashboard
 ************************/</span>
add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'wp_dashboard_setup'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'_remove_dashboard_widgets'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> _remove_dashboard_widgets<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$wp_meta_boxes</span><span style="color: #339933;">;</span>
    <span style="color: #990000;">unset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$wp_meta_boxes</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'dashboard'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'normal'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'core'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'dashboard_plugins'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #990000;">unset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$wp_meta_boxes</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'dashboard'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'normal'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'core'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'dashboard_incoming_links'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #990000;">unset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$wp_meta_boxes</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'dashboard'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'side'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'core'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'dashboard_primary'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #990000;">unset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$wp_meta_boxes</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'dashboard'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'side'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'core'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'dashboard_secondary'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #990000;">unset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$wp_meta_boxes</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'dashboard'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'side'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'core'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'dashboard_quick_press'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.slapthink.net/2010/06/15/remove-crap-from-wordpress-dashboard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Time Sheet,  a nice Windows app for time tracking</title>
		<link>http://blog.slapthink.net/2010/06/14/144/</link>
		<comments>http://blog.slapthink.net/2010/06/14/144/#comments</comments>
		<pubDate>Mon, 14 Jun 2010 14:15:52 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[Working on the web]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://blog.slapthink.net/?p=144</guid>
		<description><![CDATA[
Found a great time tracking application for windows :  Time Sheet .
You can train it to associate an application/document title   with a project and track the time entered.
From the website:
&#34;TimeSheet is a powerful automated time &#38; task recording tool for professionals.
It will improve your accountability by increasing the billable hours: let the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.businessrunner.net/TimeSheet/"><img class="size-medium wp-image-146 alignright" title="Time Sheet Screenshot" src="http://blog.slapthink.net/wp-content/uploads/2010/06/TimeSheet-291x300.jpg" alt="Time Sheet Screenshot" width="291" height="300" /></a></p>
<p>Found a great time tracking application for windows :  <a href="http://www.businessrunner.net/TimeSheet/">Time Sheet </a>.</p>
<p>You can train it to associate an application/document title   with a project and track the time entered.</p>
<p>From the website:<br />
&quot;TimeSheet is a powerful automated time &amp; task recording tool for professionals.<br />
It will improve your accountability by increasing the billable hours: let the tool register what you are doing and for how long.&quot;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.slapthink.net/2010/06/14/144/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Trimming whitespace from a field in MYSQL</title>
		<link>http://blog.slapthink.net/2010/06/14/trimming-whitespace-from-a-field-in-mysql/</link>
		<comments>http://blog.slapthink.net/2010/06/14/trimming-whitespace-from-a-field-in-mysql/#comments</comments>
		<pubDate>Mon, 14 Jun 2010 13:53:28 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[Working on the web]]></category>
		<category><![CDATA[MYSQL]]></category>

		<guid isPermaLink="false">http://blog.slapthink.net/?p=138</guid>
		<description><![CDATA[Sometimes whitespace in user entered data can be annoying. Even more annoying if it is imported data, or better yet your fault for not trimming the input. Anyway, its a simple matter to trim a field in MYSQL &#8211; see the query below , preserved here for posterity.

UPDATE tablename
SET fieldName = TRIM&#40;fieldName&#41;

]]></description>
			<content:encoded><![CDATA[<p>Sometimes whitespace in user entered data can be annoying. Even more annoying if it is imported data, or better yet your fault for not trimming the input. Anyway, its a simple matter to trim a field in MYSQL &#8211; see the query below , preserved here for posterity.</p>

<div class="wp_syntax"><div class="code"><pre class="mysql" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">UPDATE</span> tablename
<span style="color: #990099; font-weight: bold;">SET</span> fieldName <span style="color: #CC0099;">=</span> <span style="color: #000099;">TRIM</span><span style="color: #FF00FF;">&#40;</span>fieldName<span style="color: #FF00FF;">&#41;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.slapthink.net/2010/06/14/trimming-whitespace-from-a-field-in-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Vimeo Embeds on the iPhone</title>
		<link>http://blog.slapthink.net/2010/06/11/vimeo-embeds-on-the-iphone/</link>
		<comments>http://blog.slapthink.net/2010/06/11/vimeo-embeds-on-the-iphone/#comments</comments>
		<pubDate>Fri, 11 Jun 2010 19:28:04 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[Working on the web]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[js]]></category>

		<guid isPermaLink="false">http://blog.slapthink.net/?p=125</guid>
		<description><![CDATA[Vimeo does not (at the time of this writing) have an iPhone/Pad version of their embed code. After seeing this solution , I had a need to do something similar but with all Vimeo embeds sitewide.
jQuery to the rescue and must be included for this to work &#8211; best used in a dom ready event.

 [...]]]></description>
			<content:encoded><![CDATA[<p>Vimeo does not (at the time of this writing) have an iPhone/Pad version of their embed code. After seeing <a href="http://t3chh3lp.com/blog/how-to-vimeo-embed-videos-working-on-ipad.html">this solution </a>, I had a need to do something similar but with all Vimeo embeds sitewide.</p>
<p>jQuery to the rescue and must be included for this to work &#8211; best used in a dom ready event.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">    <span style="color: #003366; font-weight: bold;">var</span> agent<span style="color: #339933;">=</span>navigator.<span style="color: #660066;">userAgent</span>.<span style="color: #660066;">toLowerCase</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #003366; font-weight: bold;">var</span> is_iphone <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>agent.<span style="color: #660066;">indexOf</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'iphone'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">!=</span><span style="color: #3366CC;">'-1'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #003366; font-weight: bold;">var</span> is_ipad <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>agent.<span style="color: #660066;">indexOf</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'ipad'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">!=</span><span style="color: #3366CC;">'-1'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>is_ipad <span style="color: #339933;">||</span> is_iphone<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'embed'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">each</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>i<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	    <span style="color: #003366; font-weight: bold;">var</span> el <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	    <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>el.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'src'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">indexOf</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'clip_id'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!=</span> <span style="color: #339933;">-</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		<span style="color: #003366; font-weight: bold;">var</span> reg <span style="color: #339933;">=</span>  <span style="color: #003366; font-weight: bold;">new</span> RegExp<span style="color: #009900;">&#40;</span><span style="color: #009966; font-style: italic;">/clip_id=\d*/gi</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #003366; font-weight: bold;">var</span> clipid <span style="color: #339933;">=</span> el.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'src'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">match</span><span style="color: #009900;">&#40;</span>reg<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		embed <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;&lt;video src='http://www.vimeo.com/play_redirect?&quot;</span><span style="color: #339933;">+</span> clipid <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;&amp;quality=mobile'  controls='controls' width='&quot;</span><span style="color: #339933;">+</span>el.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'width'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;' height='&quot;</span><span style="color: #339933;">+</span>el.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'height'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;'&gt;&lt;/video&gt;&quot;</span><span style="color: #339933;">;</span>
		el.<span style="color: #660066;">parent</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">after</span><span style="color: #009900;">&#40;</span>embed<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		el.<span style="color: #660066;">parent</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">remove</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	    <span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#125;</span></pre></div></div>

<p><strong>* Note:</strong> this solution requires  a Vimeo plus account and you  need to enable  “Mobile Embedding” found in | <em>Settings &gt; Embed  &#8211; for each embed.  Also, vimeo could change their architecture and break this system.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.slapthink.net/2010/06/11/vimeo-embeds-on-the-iphone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tinting/Colorizing a MovieClip in AS3</title>
		<link>http://blog.slapthink.net/2010/04/16/tintingcolorizing-a-movieclip-in-as3/</link>
		<comments>http://blog.slapthink.net/2010/04/16/tintingcolorizing-a-movieclip-in-as3/#comments</comments>
		<pubDate>Fri, 16 Apr 2010 13:38:39 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[AS3]]></category>

		<guid isPermaLink="false">http://blog.slapthink.net/?p=120</guid>
		<description><![CDATA[This task is one I seem to be doing repeatedly, so here is a snippet for all the world to enjoy.

import flash.geom.ColorTransform;
&#160;
private function tint&#40;c:Number, obj:*&#41; &#123;
			var myColor:ColorTransform  =  obj.transform.colorTransform;
				myColor.color = c;
				obj.transform.colorTransform = myColor;
		&#125;
&#160;
&#160;
tint&#40;0xffcc00, myMovieClip&#41;;

]]></description>
			<content:encoded><![CDATA[<p>This task is one I seem to be doing repeatedly, so here is a snippet for all the world to enjoy.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">geom</span>.<span style="color: #006600;">ColorTransform</span>;
&nbsp;
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> tint<span style="color: #66cc66;">&#40;</span>c:<span style="color: #0066CC;">Number</span>, obj:<span style="color: #66cc66;">*</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #000000; font-weight: bold;">var</span> myColor:ColorTransform  =  obj.<span style="color: #006600;">transform</span>.<span style="color: #006600;">colorTransform</span>;
				myColor.<span style="color: #0066CC;">color</span> = c;
				obj.<span style="color: #006600;">transform</span>.<span style="color: #006600;">colorTransform</span> = myColor;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
&nbsp;
tint<span style="color: #66cc66;">&#40;</span>0xffcc00, myMovieClip<span style="color: #66cc66;">&#41;</span>;</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.slapthink.net/2010/04/16/tintingcolorizing-a-movieclip-in-as3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ignoring xml tag case in AS3 (E4X)</title>
		<link>http://blog.slapthink.net/2010/03/31/ignoring-xml-tag-case-in-as3-e4x/</link>
		<comments>http://blog.slapthink.net/2010/03/31/ignoring-xml-tag-case-in-as3-e4x/#comments</comments>
		<pubDate>Wed, 31 Mar 2010 13:56:54 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://blog.slapthink.net/?p=115</guid>
		<description><![CDATA[Sometimes in flash you need to get an XMLList from tags while ignoring tag case.

&#60;xml&#62;
&#60;tagName&#62;contents&#60;/tagName&#62;
&#60;TAGNAME&#62;contents&#60;/TAGNAME&#62;
&#60;/xml&#62;

I have a class that extracts XHTML from the page where a swf is embeded. Works great except different browsers return different case for tags. Below is the snippet I used to get a node list no matter the tag case. [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes in flash you need to get an XMLList from tags while ignoring tag case.</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;xml<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;tagName<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>contents<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/tagName<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;TAGNAME<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>contents<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/TAGNAME<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/xml<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>I have a class that extracts XHTML from the page where a swf is embeded. Works great except different browsers return different case for tags. Below is the snippet I used to get a node list no matter the tag case. The example is getting all &#8220;span&#8221; tags.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span> nodeList:XMLList = <span style="color: #0066CC;">data</span>..<span style="color: #66cc66;">*</span>.<span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> RegExp<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'span'</span>,<span style="color: #ff0000;">&quot;i&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;test&quot;</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">name</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.slapthink.net/2010/03/31/ignoring-xml-tag-case-in-as3-e4x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple Ajax loading with Jquery</title>
		<link>http://blog.slapthink.net/2010/03/30/simple-ajax-loading-with-jquery/</link>
		<comments>http://blog.slapthink.net/2010/03/30/simple-ajax-loading-with-jquery/#comments</comments>
		<pubDate>Tue, 30 Mar 2010 21:10:06 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.slapthink.net/?p=109</guid>
		<description><![CDATA[For the sake of my memory I&#8217;m posting a simple jQuery ajax routine.

      $&#40;'a.ajax-enabled'&#41;.click&#40;function&#40;evt&#41;&#123;
         evt.preventDefault&#40;&#41;;
         $&#40;'#content'&#41;.load&#40;$&#40;this&#41;.attr&#40;'href'&#41; + ' #content'&#41;;
      &#125;&#41;;

]]></description>
			<content:encoded><![CDATA[<p>For the sake of my memory I&#8217;m posting a simple jQuery ajax routine.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">      $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'a.ajax-enabled'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>evt<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
         evt.<span style="color: #660066;">preventDefault</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
         $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#content'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">load</span><span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'href'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">' #content'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.slapthink.net/2010/03/30/simple-ajax-loading-with-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

